smodusermc's picture
download
raw
277 kB
var k;
k || (k = typeof Module !== 'undefined' ? Module : {});
k.hk || (k.hk = 0);
k.hk++;
k.ENVIRONMENT_IS_PTHREAD || k.$ww || function(a) {
function b(n, p, q, u) {
if ("object" === typeof process && "object" === typeof process.versions && "string" === typeof process.versions.node) require("fs").readFile(n, function(r, B) {
r ? u(r) : q(B.buffer)
});
else {
var w = new XMLHttpRequest;
w.open("GET", n, !0);
w.responseType = "arraybuffer";
w.onprogress = function(r) {
var B = p;
r.total && (B = r.total);
if (r.loaded) {
w.Ki ? k.Aj[n].loaded = r.loaded : (w.Ki = !0, k.Aj || (k.Aj = {}), k.Aj[n] = {
loaded: r.loaded,
total: B
});
var y = B = r = 0,
G;
for (G in k.Aj) {
var L = k.Aj[G];
r += L.total;
B += L.loaded;
y++
}
r = Math.ceil(r * k.hk / y);
k.setStatus && k.setStatus(`Downloading data... (/)`)
} else !k.Aj && k.setStatus && k.setStatus("Downloading data...")
};
w.onerror = function() {
throw Error("NetworkError for: " + n);
};
w.onload = function() {
if (200 == w.status || 304 == w.status || 206 == w.status || 0 == w.status && w.response) q(w.response);
else throw Error(w.statusText + " : " + w.responseURL);
};
w.send(null)
}
}
function c(n) {
console.error("package error:", n)
}
function d() {
function n(w, r, B) {
this.start = w;
this.end =
r;
this.audio = B
}
function p(w) {
if (!w) throw "Loading data file failed." + Error().stack;
if (w.constructor.name !== ArrayBuffer.name) throw "bad input to processPackageData" + Error().stack;
w = new Uint8Array(w);
n.prototype.Qi = w;
w = a.files;
for (var r = 0; r < w.length; ++r) n.prototype.Ki[w[r].filename].onload();
k.removeRunDependency("datafile_runner.data")
}
k.FS_createPath("/", "assets", !0, !0);
n.prototype = {
Ki: {},
open: function(w, r) {
this.name = r;
this.Ki[r] = this;
k.addRunDependency(`fp ${this.name}`)
},
send: function() {},
onload: function() {
this.finish(this.Qi.subarray(this.start,
this.end))
},
finish: function(w) {
k.FS_createDataFile(this.name, null, w, !0, !0, !0);
k.removeRunDependency(`fp ${this.name}`);
this.Ki[this.name] = null
}
};
for (var q = a.files, u = 0; u < q.length; ++u)(new n(q[u].start, q[u].end, q[u].audio || 0)).open("GET", q[u].filename);
k.addRunDependency("datafile_runner.data");
k.Yk || (k.Yk = {});
k.Yk["runner.data"] = {
im: !1
};
h ? (p(h), h = null) : g = p
}
"object" === typeof window ? window.encodeURIComponent(window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf("/")) +
"/") : "undefined" === typeof process && "undefined" !== typeof location && encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf("/")) + "/");
"function" !== typeof k.locateFilePackage || k.locateFile || (k.locateFile = k.locateFilePackage, l("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)"));
var e = k.locateFile ? k.locateFile("runner.data", "") : "runner.data",
f = a.remote_package_size,
g = null,
h = k.getPreloadedPackage ?
k.getPreloadedPackage(e, f) : null;
h || b(e, f, function(n) {
g ? (g(n), g = null) : h = n
}, c);
k.calledRun ? d() : (k.preRun || (k.preRun = []), k.preRun.push(d))
}({
"files": [{
"filename": "/assets/options.ini",
"start": 0,
"end": 81,
"audio": 0
}],
"remote_package_size": 81,
"package_uuid": "d1ab2220-b86c-4c5b-b4e8-1b7cae341c0c"
});
this.doGMLCallback = function(a, b) {
b = JSON.stringify(b);
var c = aa(b) + 1,
d = m(c);
t(b, v, d, c);
console.log("AddAsyncMethod=" + g_pAddAsyncMethod + ", methodToCall=" + a + ", stringOnWasmHeap=" + d + ", argsAsJSON=" + b);
k.dynCall("vii", g_pAddAsyncMethod, [a, d])
};
this.triggerAdPrefix = function(a, b, c, d, e) {
var f = m(80),
g = f + 16,
h = f + 32,
n = f + 48,
p = f + 64;
ba(f + 0, a, 16);
ba(g, b, 16);
ba(h, c, 16);
ba(n, d, 16);
ba(p, e, 16);
return f
};
this.ModuleName = function() {
return k
};
this.triggerAdPostfix = function(a) {
ca(a)
};
this.triggerPaymentPrefix = function(a) {
var b = m(16);
ba(b, a, 16);
return b
};
this.triggerPaymentPostfix = function(a) {
ca(a)
};
var da = null,
ea = [],
ha = null,
ia = null,
ja = null,
ka = null,
la = null;
function ma() {
da && ("visible" === document.visibilityState ? da.resume() : da.suspend())
}
var na = void 0,
oa = void 0;
this.gx_set_default_unhandled_exception_handler = function(a, b) {
na = a;
oa = b;
hasJSExceptionHandler = function() {
return !0
};
doJSExceptionHandler = function(c) {
na(JSON.parse(c), oa)
}
};
var pa = void 0;
this.OGX_startDRMCheck = function() {
pa && k.dynCall("v", pa)
};
var qa = void 0,
ra = void 0,
sa = void 0,
ta = void 0;
this.GM_pause = function() {
qa && k.dynCall("v", qa)
};
this.GM_unpause = function() {
ra && k.dynCall("v", ra)
};
this.GM_tick = function() {
sa && k.dynCall("vd", sa, [performance.now()])
};
this.GM_is_multiplayer = function() {
return ta ? k.dynCall("i", ta) : 0
};
var ua = void 0,
va = void 0;
this.GM_get_view_status = function() {
var a = void 0;
if (ua) {
var b = k.dynCall("i", ua);
a = b ? x(v, b) : "";
a = JSON.parse(a);
ca(b)
}
return a
};
this.GM_set_view_status = function(a) {
if (va) {
a = JSON.stringify(a);
var b = aa(a) + 1,
c = m(b);
t(a, v, c, b);
console.log("GM_set_view_status=" + va + ", stringOnWasmHeap=" + c + ", argsAsJSON=" + a);
k.dynCall("vi", va, [c])
}
};
var wa = [],
xa = !1,
ya = !1;
this.activate_clipboard = function() {
!xa && navigator.clipboard && navigator.permissions && !ya && (ya = !0, navigator.permissions.query({
name: "clipboard-read",
Xl: !0
}).then(function(a) {
if ("granted" == a.state || "prompt" == a.state) {
xa = !0;
ya = !1;
for (a = 0; a < wa.length; ++a) navigator.clipboard.writeText(wa[a]);
wa = [];
navigator.clipboard.readText().then(b => {
"" != b && wa.push(b)
}).catch(() => {})
}
}))
};
this.clipboard_has_text = function() {
if (!xa) return activate_clipboard(), !1;
navigator.clipboard.readText().then(a => {
"" != a && wa.push(a)
}).catch(() => {});
return 0 < wa.length
};
this.clipboard_get_text = function() {
var a = "";
xa ? 0 < wa.length && (a = wa.pop()) : activate_clipboard();
return a
};
this.clipboard_set_text = function(a) {
xa ? navigator.clipboard && navigator.clipboard.writeText(a) : (activate_clipboard(), wa.push(a))
};
var za = {},
Aa = {},
Ba = "";
this.__gx_cache_file = function(a) {
if (window.oprt && window.oprt.gameFiles) {
var b = window.origin + "/" + a.name,
c = new URLSearchParams(window.location.search);
const d = c.get("game"),
e = c.get("track");
c = c.get("release");
null != d && null != e && null != c && (b = window.location.origin + "/" + d + "/" + e + "/" + c + "/" + a.name);
console.log("__gx_cache_file for " + b);
b = new Request(b);
let f = a.name + ":" + a.md5;
window.oprt.gameFiles.fetchAndCache(f, Ba, b).then(g => {
g.arrayBuffer().then(function() {
console.log("fetchAndCache complete for file:id " +
f);
Aa[a.name] = {
name: a.name,
md5: a.md5,
fileId: f,
version: Ba
}
})
})
}
return Promise.resolve()
};
this.__gx_check_cache = function(a, b) {
var c = void 0 != Aa[a];
b && console.log("__gx_check_cache for " + a + " cached files " + JSON.stringify(Aa) + " manifest files " + JSON.stringify(za));
!c && void 0 != za[a] && b && this.__gx_cache_file(za[a]);
return c
};
this.__gx_prepare_cache = function(a) {
Ba = a;
return new Promise(function(b, c) {
if (window.oprt && window.oprt.gameFiles) {
let e = manifestFiles().split(";");
var d = manifestFilesMD5();
window.oprt.gameFiles.keys().then(f => {
console.log("current cache entries are " + JSON.stringify(f));
var g = {};
let h = [];
for (var n = 0; n < f.length; ++n) {
var p = f[n],
q = p.fileId,
u = "",
w = q.indexOf(":");
0 <= w && (u = q.substring(w + 1), q = q.substring(0, w));
w = e.indexOf(q);
console.log("considering file " + q + " for deleting, indexOf is " + w + " cached MD5 is " +
u + " manifest md5 is " + (0 > w ? " not present" : d[w]));
0 > w || d[w] != u ? h.push(window.oprt.gameFiles.delete(p.fileId, p.version)) : g[q] = {
name: q,
md5: u,
fileId: p.fileId,
version: p.version
}
}
console.log("current cache files are " + JSON.stringify(g));
Aa = g;
f = {};
for (n = 0; n < e.length; ++n) f[e[n]] = {
name: e[n],
md5: d[n]
};
za = f;
void 0 == Aa["game.unx"] ? (console.log("caching game.unx"), this.__gx_cache_file(za["game.unx"]).then(() => {
b({
cachedFiles: Aa,
allFiles: e
})
})) : b({
cachedFiles: Aa,
allFiles: e
})
}).catch(f => {
c(Error("error trying to enumerate cache keys - " +
JSON.stringify(f)))
})
} else c(Error("unable to cache, API not found"))
})
};
this.__gx_async_wget2 = function(a, b, c, d, e, f, g) {
window.oprt && window.oprt.gameFiles && (a = Aa[a], a = window.oprt.gameFiles.match(a.fileId, a.version), a.catch(() => {
k.dynCall("vi", g, [d])
}), a.then(h => h.arrayBuffer()).then(h => {
h = new Uint8Array(h);
var n = m(h.length);
v.set(h, n);
f && k.dynCall("viiii", f, [4294967295, d, n, h.length]);
e && e(n)
}))
};
var Ca = {},
Da = void 0;
this.__js_override_script_function = function(a, b) {
Ca[a] = b;
if (Da) {
b = aa(a) + 1;
var c = m(b);
t(a, v, c, b);
k.dynCall("vpi", Da, [c, 1]);
ca(c)
}
};
this.__js_remove_override_script_function = function(a) {
Ca[a] = void 0;
if (Da) {
var b = aa(a) + 1,
c = m(b);
t(a, v, c, b);
k.dynCall("vpi", Da, [c, 0]);
ca(c)
}
};
this.__call_override_script_function = function(a, b, c, d) {
var e = "undefined";
void 0 !== Ca[a] && (d = void 0 != d && "" != d ? JSON.parse(d) : [], d.unshift(c), d.unshift(b), a = Ca[a].apply(null, d), e = void 0 != a ? JSON.stringify(a) : "undefined");
return e
};
var Ea = void 0,
Fa = void 0,
Ga = void 0,
Ha = void 0,
Ia = void 0,
Ja = void 0;
this.__js_call_gml = function(a, b, c, d, e) {
var f = Array.prototype.slice.call(arguments, 5);
f = JSON.stringify(f);
f = Ka(f);
var g = k.dynCall("pipppp", Ga, [a, c, d, e, f]),
h = g ? x(v, g) : "";
h = JSON.parse(h);
ca(g);
ca(f);
return h
};
this.__js_call_var = function(a, b, c, d) {
b = (a = k.dynCall("pipp", Ia, [a, c, d])) ? x(v, a) : "";
b = JSON.parse(b);
ca(a);
return b
};
this.__js_call_varSet = function(a, b, c) {
var d = Array.prototype.slice.call(arguments, 3);
d = JSON.stringify(d);
d = Ka(d);
return k.dynCall("iippp", Ja, [a, c, 0, d])
};
this.__js_get_gml = function() {
if (void 0 == Ea && (Ea = {}, Fa)) {
var a = k.dynCall("iipp", Fa, [-1, 0, 0]),
b = k.dynCall("iipp", Fa, [-2, 0, 0]),
c = k.dynCall("iippp", Ha, [-1, 0, 0, 0]),
d = m(12),
e = d + 4,
f = d + 8;
for (let p = 0; p < a; p++) {
k.dynCall("iipp", Fa, [p, d, e]);
var g = k.getValue(d, "*"),
h = g ? x(v, g) : "",
n = k.getValue(e, "*");
Ea[h] = this.__js_call_gml.bind(this, p, h, n);
ca(g)
}
for (a = 0; a < b; a++) k.dynCall("iipp", Fa, [a + 1E5, d, e]), h = (g = k.getValue(d, "*")) ? x(v, g) : "", n = k.getValue(e, "*"), Ea[h] = this.__js_call_gml.bind(this, a + 1E5, h, n), ca(g);
for (a = 0; a < c; a++) k.dynCall("iippp",
Ha, [a, d, e, f]), h = (g = k.getValue(d, "*")) ? x(v, g) : "", b = k.getValue(e, "*"), n = k.getValue(f, "*"), 0 != b && 0 != n ? Object.defineProperty(Ea, h, {
get: this.__js_call_var.bind(this, a, h, b),
set: this.__js_call_varSet.bind(this, a, h, n)
}) : 0 != b ? Object.defineProperty(Ea, h, {
get: this.__js_call_var.bind(this, a, h, b)
}) : 0 != n && Object.defineProperty(Ea, h, {
set: this.__js_call_varSet.bind(this, a, h, n)
}), ca(g);
ca(d)
}
return Ea
};
GXMFS = {
lj: {},
Si: function(a) {
return z.Si.apply(null, arguments)
},
zk: (a, b, c) => {
GXMFS.ik(a, (d, e) => {
if (d) return c(d);
GXMFS.jk(a, (f, g) => {
if (f) return c(f);
GXMFS.sk(b ? g : e, b ? e : g, c)
})
})
},
Hl: () => {
GXMFS.lj = {}
},
tl: (a, b) => {
var c = GXMFS.lj[a];
c || (c = window.oprt.gameStorage.open(a), GXMFS.lj[a] = c);
return b(null, c)
},
ik: (a, b) => {
function c(h) {
return "." !== h && ".." !== h
}
function d(h) {
return n => La(h + "/" + n)
}
var e = {};
for (a = Ma(a.oj).filter(c).map(d(a.oj)); a.length;) {
var f = a.pop();
try {
var g = Na(f)
} catch (h) {
return b(h)
}
C(g.mode) &&
a.push.apply(a, Ma(f).filter(c).map(d(f)));
e[f] = {
timestamp: g.mtime
}
}
return b(null, {
type: "local",
entries: e
})
},
jk: (a, b) => {
GXMFS.tl(a.oj, (c, d) => {
if (c) return b(c);
d.list().then(e => {
b(null, {
type: "remote",
storage: d,
entries: e
})
}).catch(b)
})
},
lk: (a, b) => {
try {
var c = Oa(a).node;
var d = Na(a)
} catch (e) {
return b(e)
}
return C(d.mode) ? b(null, {
timestamp: d.mtime,
mode: d.mode
}) : 32768 === (d.mode & 61440) ? (c.Mi = Pa(c), b(null, {
timestamp: d.mtime,
mode: d.mode,
contents: c.Mi
})) : b(Error("node type not supported"))
},
xk: (a, b, c) => {
try {
if (C(b.mode)) Qa(a,
b.mode);
else if (32768 === (b.mode & 61440)) Ra(a, b.contents);
else return c(Error("node type not supported"));
Sa(a, b.mode);
Ta(a, b.timestamp, b.timestamp)
} catch (d) {
return c(d)
}
c(null)
},
uk: (a, b) => {
try {
var c = Na(a);
C(c.mode) ? Ua(a) : 32768 === (c.mode & 61440) && Va(a)
} catch (d) {
return b(d)
}
b(null)
},
mk: (a, b, c) => {
a.get(b).then(d => {
c(null, d)
}).catch(c)
},
yk: (a, b, c, d) => {
a.put(c, b).then(() => {
d(null)
}).catch(d)
},
vk: (a, b, c) => {
a.delete(b).then(() => {
c(null)
}).catch(c)
},
sk: (a, b, c) => {
function d(p) {
e--;
if (p && !h) return h = !0, console.error("Reconcile failed"),
c(p);
if (0 === e && !h) return console.info("Reconcile finished successfully"), c(null)
}
console.info("Starting reconcile");
var e = 0,
f = [];
Object.keys(a.entries).forEach(function(p) {
var q = a.entries[p],
u = b.entries[p];
u && q.timestamp.getTime() == u.timestamp.getTime() || (f.push(p), e++)
});
console.debug(`${f.length} entries to create/update on the ${"local"===b.type?"local filesystem":"remote filesystem"}`);
var g = [];
Object.keys(b.entries).forEach(function(p) {
a.entries[p] || (g.push(p), e++)
});
console.debug(`${g.length} entries to remove from the ${"local"===
b.type?"local filesystem":"remote filesystem"}`);
if (0 == e) return c(null);
var h = !1,
n = "remote" === a.type ? a.storage : b.storage;
f.sort().forEach(p => {
"local" === b.type ? GXMFS.mk(n, p, (q, u) => {
if (q) return d(q);
GXMFS.xk(p, u, d)
}) : GXMFS.lk(p, (q, u) => {
if (q) return d(q);
GXMFS.yk(n, p, u, d)
})
});
g.sort().reverse().forEach(p => {
"local" === b.type ? GXMFS.uk(p, d) : GXMFS.vk(n, p, d)
})
}
};
var Wa = Object.assign({}, k),
Xa = [],
Ya = "./this.program",
Za = (a, b) => {
throw b;
},
$a = "object" == typeof window,
ab = "function" == typeof importScripts,
bb = "object" == typeof process && "object" == typeof process.versions && "string" == typeof process.versions.node,
cb = "",
db, eb, fb;
if (bb) {
var fs = require("fs"),
gb = require("path");
cb = ab ? gb.dirname(cb) + "/" : __dirname + "/";
db = (a, b) => {
a = hb(a) ? new URL(a) : gb.normalize(a);
return fs.readFileSync(a, b ? void 0 : "utf8")
};
fb = a => {
a = db(a, !0);
a.buffer || (a = new Uint8Array(a));
return a
};
eb = (a, b, c, d = !0) => {
a = hb(a) ? new URL(a) : gb.normalize(a);
fs.readFile(a, d ? void 0 : "utf8", (e, f) => {
e ? c(e) : b(d ? f.buffer : f)
})
};
!k.thisProgram && 1 < process.argv.length && (Ya = process.argv[1].replace(/\\/g, "/"));
Xa = process.argv.slice(2);
"undefined" != typeof module && (module.exports = k);
process.on("uncaughtException", a => {
if (!("unwind" === a || a instanceof ib || a.context instanceof ib)) throw a;
});
Za = (a, b) => {
process.exitCode = a;
throw b;
};
k.inspect = () => "[Emscripten Module object]"
} else if ($a || ab) ab ? cb = self.location.href : "undefined" != typeof document && document.currentScript && (cb = document.currentScript.src), cb = 0 !== cb.indexOf("blob:") ? cb.substr(0, cb.replace(/[?#].*/, "").lastIndexOf("/") + 1) : "", db = a => {
var b = new XMLHttpRequest;
b.open("GET", a, !1);
b.send(null);
return b.responseText
}, ab && (fb = a => {
var b =
new XMLHttpRequest;
b.open("GET", a, !1);
b.responseType = "arraybuffer";
b.send(null);
return new Uint8Array(b.response)
}), eb = (a, b, c) => {
var d = new XMLHttpRequest;
d.open("GET", a, !0);
d.responseType = "arraybuffer";
d.onload = () => {
200 == d.status || 0 == d.status && d.response ? b(d.response) : c()
};
d.onerror = c;
d.send(null)
};
var jb = k.print || console.log.bind(console),
l = k.printErr || console.error.bind(console);
Object.assign(k, Wa);
Wa = null;
k.arguments && (Xa = k.arguments);
k.thisProgram && (Ya = k.thisProgram);
k.quit && (Za = k.quit);
var kb;
k.wasmBinary && (kb = k.wasmBinary);
"object" != typeof WebAssembly && lb("no native wasm support detected");
var mb, nb = !1,
ob, D, v, pb, qb, E, F, H, rb;
function sb() {
var a = mb.buffer;
k.HEAP8 = D = new Int8Array(a);
k.HEAP16 = pb = new Int16Array(a);
k.HEAPU8 = v = new Uint8Array(a);
k.HEAPU16 = qb = new Uint16Array(a);
k.HEAP32 = E = new Int32Array(a);
k.HEAPU32 = F = new Uint32Array(a);
k.HEAPF32 = H = new Float32Array(a);
k.HEAPF64 = rb = new Float64Array(a)
}
var tb = [],
ub = [],
vb = [],
wb = [],
xb = [],
yb = !1;
function zb() {
var a = k.preRun.shift();
tb.unshift(a)
}
var Ab = 0,
Bb = null,
Cb = null;
function Db() {
Ab++;
k.monitorRunDependencies && k.monitorRunDependencies(Ab)
}
function Eb() {
Ab--;
k.monitorRunDependencies && k.monitorRunDependencies(Ab);
if (0 == Ab && (null !== Bb && (clearInterval(Bb), Bb = null), Cb)) {
var a = Cb;
Cb = null;
a()
}
}
function lb(a) {
if (k.onAbort) k.onAbort(a);
a = "Aborted(" + a + ")";
l(a);
nb = !0;
ob = 1;
a += ". Build with -sASSERTIONS for more info.";
yb && Fb();
throw new WebAssembly.RuntimeError(a);
}
var Gb = a => a.startsWith("data:application/octet-stream;base64,"),
hb = a => a.startsWith("file://"),
Hb;
Hb = "runner.wasm";
if (!Gb(Hb)) {
var Ib = Hb;
Hb = k.locateFile ? k.locateFile(Ib, cb) : cb + Ib
}
function Jb(a) {
if (a == Hb && kb) return new Uint8Array(kb);
if (fb) return fb(a);
throw "both async and sync fetching of the wasm failed";
}
function Kb(a) {
if (!kb && ($a || ab)) {
if ("function" == typeof fetch && !hb(a)) return fetch(a, {
credentials: "same-origin"
}).then(b => {
if (!b.ok) throw "failed to load wasm binary file at '" + a + "'";
return b.arrayBuffer()
}).catch(() => Jb(a));
if (eb) return new Promise((b, c) => {
eb(a, d => b(new Uint8Array(d)), c)
})
}
return Promise.resolve().then(() => Jb(a))
}
function Lb(a, b, c) {
return Kb(a).then(d => WebAssembly.instantiate(d, b)).then(d => d).then(c, d => {
l(`failed to asynchronously prepare wasm: `);
lb(d)
})
}
function Mb(a, b) {
var c = Hb;
kb || "function" != typeof WebAssembly.instantiateStreaming || Gb(c) || hb(c) || bb || "function" != typeof fetch ? Lb(c, a, b) : fetch(c, {
credentials: "same-origin"
}).then(d => WebAssembly.instantiateStreaming(d, a).then(b, function(e) {
l(`wasm streaming compile failed: `);
l("falling back to ArrayBuffer instantiation");
return Lb(c, a, b)
}))
}
var I, J, Vb = {
1535288: (a, b, c, d) => {
a = __call_override_script_function(a ? x(v, a) : "", b, c, d ? x(v, d) : "");
return Ka(a)
},
1535410: () => hasJSExceptionHandler(),
1535475: a => {
doJSExceptionHandler(a ? x(v, a) : "")
},
1535519: a => {
window.parent.postMessage(a ? x(v, a) : "", "*")
},
1535573: () => document.querySelector("canvas").getBoundingClientRect().left,
1535693: () => document.querySelector("canvas").getBoundingClientRect().top,
1535812: () => {
var a = document.querySelector("canvas").getBoundingClientRect();
return a.right - a.left
},
1535945: () => {
var a = document.querySelector("canvas").getBoundingClientRect();
return a.bottom - a.top
},
1536078: (a, b, c, d, e, f) => {
gxc_request_room(a ? x(v, a) : "", b ? x(v, b) : "", c, d, e ? x(v, e) : "", f ? x(v, f) : "")
},
1536180: (a, b, c, d) => {
gxc_join_room(a ? x(v, a) : "", b ? x(v, b) : "", c ? x(v, c) : "", d ? x(v, d) : "")
},
1536271: () => {
var a = document.getElementById("stats-button");
a && (a.style.visibility = "visible");
if (a = document.getElementById("log-state-button")) a.style.visibility = "visible"
},
1536520: () => {
var a = document.getElementById("stats-button");
a && (a.style.visibility =
"visible");
if (a = document.getElementById("log-state-button")) a.style.visibility = "visible"
},
1536769: (a, b) => {
var c = document.getElementById("multiplayer-stats-container");
if (c && "visible" == c.style.visibility) {
if (c = document.getElementById("multiplayer-stats")) c.innerHTML = a ? x(v, a) : "";
void 0 != report_stats && report_stats(b)
}
},
1537093: a => {
"function" == typeof showRollbackMessage && showRollbackMessage(a ? x(v, a) : "")
},
1537186: () => {
var a = document.getElementById("stats-button");
a && (a.style.visibility = "hidden");
if (a =
document.getElementById("share-button")) a.style.visibility = "hidden";
if (a = document.getElementById("log-state-button")) a.style.visibility = "hidden"
},
1537548: (a, b) => {
gxc_set_player_status(a, b ? x(v, b) : "")
},
1537599: a => {
gxc_report_status(a ? x(v, a) : "")
},
1537640: (a, b, c) => {
gxc_get_player_info(a ? x(v, a) : "", b ? x(v, b) : "", c ? x(v, c) : "")
},
1537719: (a, b) => {
gxc_set_room_info(a, b)
},
1537750: (a, b, c) => {
gxc_get_player_info(a ? x(v, a) : "", b ? x(v, b) : "", c ? x(v, c) : "")
},
1537829: (a, b, c) => {
gxc_receive_chat_message(a ? x(v, a) : "", b, c)
},
1537885: (a,
b) => webtransport_set_relay(a ? x(v, a) : "", b),
1537942: a => {
webtransport_destroy(a)
},
1537972: (a, b, c) => {
webtransport_send(a, b, c)
},
1538007: (a, b, c) => webtransport_receive(a, b, c),
1538052: a => {
"function" == typeof wallpaper_init_config_controls && wallpaper_init_config_controls(JSON.parse(a ? x(v, a) : ""))
},
1538179: a => {
"function" == typeof wallpaper_init_subscriptions && wallpaper_init_subscriptions(JSON.parse(a ? x(v, a) : ""))
},
1538302: a => {
alert(a ? x(v, a) : "")
},
1538332: a => {
alert(a ? x(v, a) : "")
},
1538361: () => clipboard_has_text(),
1538409: () => {
var a = clipboard_get_text(),
b = aa(a) + 1,
c = m(b);
t(a, v, c, b + 1);
return c
},
1538585: a => {
clipboard_set_text(a ? x(v, a) : "")
},
1538628: () => {
var a = -1;
window.matchMedia("(orientation:portrait)").matches ? a = 1 : window.matchMedia("(orientation:landscape)").matches && (a = 0);
return a
},
1538806: a => {
a = window.open(a ? x(v, a) : "", "_blank");
null != a && a.focus()
},
1538891: () => Ka(navigator.userAgent.toString()),
1538966: () => Ka(window.location.href),
1539031: () => {
var a = document.querySelector("canvas");
null != a.Ki && (a.Ki.pause(),
a.Ki.removeAttribute("src"), a.Ki.load(), console.log("Closing video player"), a.Ki.remove(), a.Ki = null)
},
1539349: (a, b, c) => {
var d = document.querySelector("canvas");
if (null != d.Mj) return b = d.Mj.getImageData(0, 0, b, c), b = new Uint8Array(b.data.buffer), D.set(b, a), 1;
console.log("Not rendering video as context is null");
return 0
},
1539686: () => {
var a = document.querySelector("canvas");
return null != a.Ki ? a.Ki.videoWidth : 0
},
1539833: () => {
var a = document.querySelector("canvas");
return null != a.Ki ? a.Ki.videoHeight : 0
},
1539981: () => {
var a = document.querySelector("canvas");
return null == a.Ki || a.Ki.ended ? -1 : 0
},
1540136: a => {
var b = document.querySelector("canvas");
null != b.Ki && (b.Ki.volume = a)
},
1540269: a => {
function b() {
function h() {
const q = document.querySelector("canvas").Ki;
null != q && (q.muted = !1)
}
console.log("Adding unmute listener");
var n = "mousedown",
p = "mouseup";
"ontouchstart" in window && (n = "touchstart", p = "touchend");
if (window.PointerEvent || window.navigator.pointerEnabled || window.navigator.msPointerEnabled) n = "pointerdown", p = "pointerup";
document.body.addEventListener(n, h, {
once: !0
});
document.body.addEventListener(p, h, {
once: !0
});
console.log("Done unmute listener")
}
const c = () => {
var h = document.querySelector("canvas");
null !== h.Ki && (null == h.$i ? (h.$i = document.createElement("canvas"), h.$i.style.cssText = "position:fixed; top:1px; left:1px; width:1px; height:1px", h.$i.width = h.Ki.videoWidth, h.$i.height = h.Ki.videoHeight, document.body.appendChild(h.$i), h.Mj = h.$i.getContext("2d", {
alpha: !1,
Yl: !1,
powerPreference: "low-power",
desynchronized: !0,
preserveDrawingBuffer: !0
})) :
(h.Ki.videoWidth != h.$i.width && (h.$i.width = h.Ki.videoWidth), h.$i.height != h.Ki.videoHeight && (h.$i.height = h.Ki.videoHeight)), null != h.Ki && null != h.Mj ? h.Mj.drawImage(h.Ki, 0, 0) : console.log("player or context is null not drawing video"), null != h.Ki ? null != h.Ki.src ? h.Ki.requestVideoFrameCallback(c) : console.log("stopping video player callback check") : console.log("Not requesting callback as videoplayer is null"))
};
var d = document.querySelector("canvas");
null == d.Ki ? d.Ki = document.createElement("video") : (d.Ki.remove(),
d.Ki = document.createElement("video"), d.Ki.pause());
a = a ? x(v, a) : "";
var e = void 0;
try {
e = JSON.parse(a)
} catch {}
console.log("using srcpath:" + a);
void 0 !== e ? "mediaDevices" in navigator && "getUserMedia" in navigator.mediaDevices ? (console.log("getUserMedia supported"), navigator.mediaDevices.getUserMedia(e).then(h => {
console.log("getUserMedia completed");
d.Ki.srcObject = h;
d.Ki.requestVideoFrameCallback(c)
}).catch(h => {
console.error("Error accessing the camera: ", h)
})) : console.log("no getUserMedia support in this browser") :
(console.log("Failed to parse json, presuming it's a path:" + a), d.Ki.muted = !1, a = a.toLowerCase(), a = a.replace(/ /g, "_"), console.log("Converted path to:" + a), d.Ki.src = a, d.Ki.requestVideoFrameCallback(c), d.Ki.load());
const f = {
Rl: k.cwrap("video_playback_ended", "", "")
},
g = {
Sl: k.cwrap("video_playback_started", "", "")
};
console.log("About to add ended callback");
d.Ki.addEventListener("ended", function() {
f.Rl()
});
console.log("About to add playing callback");
d.Ki.addEventListener("playing", function() {
console.log("Video playing event called");
g.Sl()
}, !0);
a = d.Ki.play();
void 0 !== a && a.then(() => {}).catch(() => {
console.log("video_open failed. User must interact with the page before video with audio can be played. Attempting to play the video muted");
d.Ki.muted = !0;
d.Ki.play();
b()
})
},
1544833: () => {
var a = document.querySelector("canvas");
null != a.Ki && a.Ki.pause()
},
1544964: () => {
var a = document.querySelector("canvas");
null != a.Ki && a.Ki.play()
},
1545094: a => {
var b = document.querySelector("canvas");
null != b.Ki && (b.Ki.loop = .5 < a ? !0 : !1)
},
1545287: a => {
var b = document.querySelector("canvas");
null != b.Ki && (b.Ki.currentTime = a)
},
1545427: () => {
var a = document.querySelector("canvas");
return null == a.Ki || isNaN(a.Ki.duration) ? 0 : a.Ki.duration
},
1545622: () => {
var a = document.querySelector("canvas");
return null != a.Ki ? a.Ki.currentTime : 0
},
1545774: () => {
var a = document.querySelector("canvas");
return null != a.Ki ? a.Ki.ended ? 0 : a.Ki.paused ? 3 : a.Ki.readyState < a.Ki.HAVE_CURRENT_DATA ? 1 : 2 : 0
},
1546294: () => {
var a = document.querySelector("canvas");
return null != a.Ki ? a.Ki.loop : 0
},
1546439: () => {
var a = document.querySelector("canvas");
return null != a.Ki ? a.Ki.volume : 0
},
1546586: (a, b, c, d) => {
var e = document.querySelector("canvas");
if (MediaRecorder.isTypeSupported("video/webm;codecs=vp9")) {
console.log("CheckMediaRecorder::vp9 supported");
var f = {
mimeType: "video/webm; codecs=vp9"
}
} else MediaRecorder.isTypeSupported("video/webm;codecs=vp8") ? (f = {
mimeType: "video/webm; codecs=vp8"
}, console.log("CheckMediaRecorder::vp8 supported")) : console.log("CheckMediaRecorder::No vp8 or vp9 support");
e.Ek = e.captureStream(c);
e.Ek.getVideoTracks().find(g =>
g.enabled);
null == e.gj && (e.gj = document.createElement("canvas"), e.gj.style.cssText = "position:fixed; top:1px; left:1px; width:1px; height:1px", e.gj.width = a, e.gj.height = b, document.body.appendChild(e.gj), console.log("Game Canvas width:" + e.width + " height:" + e.height), e.bl = e.gj.getContext("2d", {
alpha: !1,
desynchronized: !0,
antialias: !0,
powerPreference: "low-power",
preserveDrawingBuffer: !0
}), e.rj = document.createElement("video"), e.rj.autoplay = !0, e.rj.Vl = !0, e.rj.muted = !0, e.rj.style.cssText = "position:fixed;top:1px;left:1px;width:1px;height:1px",
document.body.appendChild(e.rj), e.rj.srcObject = e.Ek, a = e.gj.captureStream(c), 0 < d && (d = da.createMediaStreamDestination().stream.getAudioTracks().find(g => g.enabled), a.addTrack(d)), f = new MediaRecorder(a, f), e.jj = [], f.ondataavailable = function(g) {
e.jj.push(g.data)
}, e.Qi = f);
null == e.bk && (e.bk = setInterval(() => e.bl.drawImage(e.rj, 0, 0, e.width, e.height, 0, 0, e.gj.width, e.gj.height), 1E3 / c));
e.Qi && "recording" != e.Qi.state && e.Qi.start()
},
1549082: a => {
var b = document.querySelector("canvas");
if (b.Qi && ("recording" == b.Qi.state ||
"paused" == b.Qi.state)) {
var c = a ? x(v, a) : "";
b.Qi.onstop = function() {
var d = new Blob(b.jj, {
type: "video/webm"
});
b.jj = [];
clearInterval(b.bk);
b.bk = null;
const e = {
qk: k.cwrap("post_video_upload_callback", "", ["string"])
};
if (c.startsWith("http")) fetch(c, {
method: "PUT",
body: d
}).then(() => {
e.qk("upload completed")
}).catch(g => {
e.qk("Error uploading: " + g)
});
else if ("" != c) {
d = URL.createObjectURL(d);
var f = document.createElement("a");
document.body.appendChild(f);
f.style = "display: none";
f.href = d;
f.download = c;
f.click();
window.URL.revokeObjectURL(d);
e.qk("filesaved")
}
};
b.Qi.stop();
console.log("saving chunks to movie")
}
},
1550226: () => {
var a = document.querySelector("canvas");
a.Qi && "recording" == a.Qi.state && a.Qi.pause()
},
1550396: () => {
var a = document.querySelector("canvas");
a.Qi && "paused" == a.Qi.state && a.Qi.resume()
},
1550564: (a, b, c, d, e, f) => {
triggerAd(a ? x(v, a) : "", b, c, d, e, f)
},
1550617: (a, b) => {
triggerPayment(a ? x(v, a) : "", b)
},
1550659: () => {
Nb(!0, function() {
Ob("GXC_FSSyncCompleted", "void")
})
},
1550734: () => {
var a = 640;
"number" == typeof window.innerWidth ? a = window.innerWidth *
window.devicePixelRatio : document.documentElement && document.documentElement.clientWidth ? a = document.documentElement.clientWidth : document.body && document.body.clientWidth && (a = document.body.clientWidth);
return a
},
1551066: () => {
var a = void 0;
"number" == typeof window.innerHeight ? a = window.innerHeight * window.devicePixelRatio : document.documentElement && document.documentElement.clientHeight ? a = document.documentElement.clientHeight : document.body && document.body.clientHeight && (a = document.body.clientHeight);
if (void 0 ===
a) return 480;
var b = document.querySelector(".output-button");
null != b && (a -= b.offsetHeight + 16);
return a
},
1551560: (a, b, c, d) => {
var e = -1;
if (void 0 != window.oprt) {
var f = window.oprt.unlockOrientation,
g = window.oprt.lockPortraitOrientation,
h = window.oprt.lockLandscapeOrientation;
a = (a ? 1 : 0) | (b ? 2 : 0) | (c ? 4 : 0);
a |= d ? 8 : 0;
15 != (a & 15) && 0 != a || void 0 == f || "function" != typeof f || (f(), console.log("unlocking all orientations"));
0 != (a & 5) && void 0 != h && "function" == typeof h ? (h(), console.log("Locking to Landscape"), e = 0) : 0 != (a & 10) &&
void 0 != g && "function" == typeof g && (g(), console.log("Locking to Portrait"), e = 0)
}
return e
},
1552548: a => {
a ? void 0 != window.oprt && void 0 != window.oprt.enterFullscreen ? (console.log("enterFullscreen"), window.oprt.enterFullscreen()) : (console.log("canvas requesting enterFullscreen"), a = document.querySelector("canvas"), void 0 != a.requestFullscreen ? a.requestFullscreen({
navigationUI: "hide"
}) : void 0 != a.webkitRequestFullscreen ? a.webkitRequestFullscreen() : a.mozRequestFullScreen && a.mozRequestFullScreen()) : void 0 != window.oprt &&
void 0 != window.oprt.exitFullscreen ? (console.log("exitFullscreen"), window.oprt.exitFullscreen()) : (console.log("exitFullscreen via document"), void 0 != document.exitFullscreen ? document.exitFullscreen() : void 0 != document.webkitExitFullscreen ? document.webkitExitFullscreen() : void 0 != document.mozCancelFullScreen && document.mozCancelFullScreen())
},
1553506: () => screen.width,
1553531: () => screen.height,
1553557: (a, b) => {
this.onGameSetWindowSize && onGameSetWindowSize(a, b)
},
1553626: a => {
document.title = a ? x(v, a) : ""
},
1553665: (a,
b) => {
this.onGameSetWindowSize && onGameSetWindowSize(a, b)
},
1553734: a => {
document.querySelector("canvas").style.cursor = a ? x(v, a) : ""
},
1553833: () => {
var a = document.getElementById("canvas").getContext("webgl"),
b = a.getExtension("WEBGL_compressed_texture_astc");
null == b && console.log("Failed to get WEBGL_compressed_texture_astc extension.");
b = a.getExtension("WEBGL_compressed_texture_s3tc");
null == b && console.log("Failed to get WEBGL_compressed_texture_s3tc extension.");
b = a.getExtension("WEBGL_compressed_texture_s3tc_srgb");
null == b && console.log("Failed to get WEBGL_compressed_texture_s3tc_srgb extension.")
},
1554426: () => screen.width,
1554451: () => screen.height,
1554477: () => screen.width,
1554502: () => screen.height,
1554528: () => {
var a = document.getElementById("canvas");
const b = a.style.visibility;
a.style.visibility = "hidden";
a.offsetHeight;
a.style.visibility = b
},
1554766: (a, b) => {
g_pWadLoadCallback && g_pWadLoadCallback(a, b)
},
1554826: () => {
var a = manifestFiles(),
b = aa(a) + 1,
c = m(b);
t(a, v, c, b);
return c
},
1554982: a => __gx_check_cache(a ? x(v, a) :
"", !0) ? 1 : 0,
1555044: (a, b, c, d, e, f, g, h) => {
__gx_async_wget2(a ? x(v, a) : "", b ? x(v, b) : "", c ? x(v, c) : "", d, e, f, g, h)
},
1555141: () => {
(function() {
function a() {
try {
console.log("Requesting permission"), DeviceMotionEvent && "function" === typeof DeviceMotionEvent.requestPermission ? DeviceMotionEvent.requestPermission().then(e => {
({
Vj: k.cwrap("on_request_permission_callback", "", ["string", "string"])
}).Vj(e, "DeviceMotion")
}) : b.Vj("Permission unknown", "DeviceMotion")
} catch (e) {
b.Vj("Permission unknown", "DeviceMotion")
}
}
const b = {
Vj: k.cwrap("on_request_permission_callback", "", ["string", "string"])
};
var c = "mousedown",
d = "mouseup";
"ontouchstart" in window && (c = "touchstart", d = "touchend");
if (window.PointerEvent || window.navigator.pointerEnabled || window.navigator.msPointerEnabled) c = "pointerdown", d = "pointerup";
document.body.addEventListener(c, a, {
once: !0
});
document.body.addEventListener(d, a, {
once: !0
})
})()
},
1556397: a => {
setAddAsyncMethod(a)
},
1556424: (a, b, c, d) => {
__gx_prepare_cache(c ? x(v, c) : "").then(e => {
console.log("Prepare cache completed" +
JSON.stringify(e));
k.dynCall("vi", a, [b])
}).catch(e => {
console.log("Prepare cache error " + e);
k.dynCall("vi", a, [d])
})
},
1556704: () => {
window.addEventListener("deviceorientation", function(a) {
({
Fl: k.cwrap("on_orientation_update_callback", "", ["float", "float", "float"])
}).Fl(a.alpha, a.beta, a.gamma)
}, !0);
window.addEventListener("message", a => {
const b = {
Wk: k.cwrap("on_post_message_callback", "", ["string", "string"])
};
"string" === typeof a.data || a.data instanceof String ? b.Wk(a.data, a.origin) : b.Wk(JSON.stringify(a.data),
a.origin)
});
window.parent.postMessage("gm_post_message_listener_setup_complete", "*")
},
1557421: a => __gx_check_cache(a ? x(v, a) : "", !1) ? 1 : 0,
1557482: (a, b) => {
g_pWadLoadCallback && g_pWadLoadCallback(a, b)
},
1557542: a => {
window.location.replace(a ? x(v, a) : "")
},
1557589: () => {
this.onFirstFrameRendered && onFirstFrameRendered()
},
1557652: (a, b) => {
this.chrome && this.chrome.runtime && chrome.runtime.sendMessage(a ? x(v, a) : "", {
command: b ? x(v, b) : ""
})
},
1557789: (a, b, c, d, e) => {
function f(h) {
if (h.hash) {
var n = 0;
(new Uint8Array(h.hash)).every(p => {
n = n + p & 255;
return !0
});
g.cl(n, b)
}
}
const g = {
cl: k.cwrap("YYSum", "", ["number", "number"])
};
this.chrome && this.chrome.runtime && (e = v.subarray(e, e + 20), a = a ? x(v, a) : "", chrome.runtime.sendMessage(c ? x(v, c) : "", {
command: d ? x(v, d) : "",
randomString: a,
hash: e
}, f))
},
1558349: () => window.matchMedia("(any-hover: none)").matches || window.matchMedia("(any-hover: hover) and (pointer: coarse)").matches || "undefined" != typeof window.oprt,
1558522: (a, b, c, d, e, f, g) => {
qa = a;
ra = b;
ua = c;
va = d;
sa = e;
ta = f;
pa = g
},
1558685: (a, b, c, d, e, f) => {
Da = a;
Fa =
b;
Ga = c;
Ha = d;
Ia = e;
Ja = f
},
1558840: (a, b) => {
a = prompt(a ? x(v, a) : "", b ? x(v, b) : "");
b = aa(a) + 1;
var c = m(b);
t(a, v, c, b + 1);
return c
},
1559036: a => confirm(a ? x(v, a) : "") ? 1 : 0,
1559083: (a, b) => {
a = prompt(a ? x(v, a) : "", b ? x(v, b) : "");
b = 1;
a ? b += aa(a) : a = "";
var c = m(b);
t(a, v, c, b + 1);
return c
},
1559314: a => confirm(a ? x(v, a) : "") ? 1 : 0,
1559361: a => {
alert(a ? x(v, a) : "")
},
1559391: () => {
Pb("/_savedata");
window.oprt && window.oprt.gameStorage ? Qb(GXMFS, "/_savedata") : Qb(K, "/_savedata");
Nb(!0, function() {
Ob("FSSyncCompleted", "void")
})
},
1559613: () => {
Nb(!1,
function() {})
},
1559651: () => {
Nb(!1, function() {})
},
1559688: () => {
Nb(!1, function() {})
},
1559726: () => {
da = new AudioContext;
document.addEventListener("visibilitychange", ma)
},
1559848: () => {
da.close().then(function() {
da = null;
document.removeEventListener("visibilitychange", ma)
})
},
1560007: () => {
function a() {
da.resume().then(function() {
document.body.removeEventListener(b, a);
document.body.removeEventListener(c, a)
})
}
let b = "mousedown",
c = "mouseup";
"ontouchstart" in window && (b = "touchstart", c = "touchend");
if (window.PointerEvent ||
window.navigator.pointerEnabled || window.navigator.msPointerEnabled) b = "pointerdown", c = "pointerup";
document.body.addEventListener(b, a);
document.body.addEventListener(c, a)
},
1560711: () => {
da.suspend()
},
1560744: () => null != da,
1560784: () => {
if (null == da) return 4;
switch (da.state) {
case "suspended":
return 0;
case "running":
return 1;
case "closed":
return 2;
case "interrupted":
return 3
}
},
1560978: () => null == da ? 0 : da.currentTime,
1561056: () => null == da ? 0 : da.sampleRate,
1561133: () => null == da ? 0 : da.destination.channelCount,
1561222: (a,
b, c, d, e, f) => {
e = da.createBuffer(b, d, e);
for (let g = 0; g < b; ++g) {
const h = e.getChannelData(g);
for (let n = 0; n < d; ++n) h[n] = Rb(a + c * (g + n * b), "float")
}
a = da.createBufferSource();
a.buffer = e;
a.connect(da.destination);
a.start(f);
return f + e.duration
},
1561868: a => {
navigator.mediaDevices && navigator.mediaDevices.getUserMedia && navigator.mediaDevices.getUserMedia({
audio: !0
}).then(b => {
const c = d => {
d = d.getAudioTracks();
if (0 < d.length) return d[0].getSettings().channelCount
};
ia = b;
ja = new AudioContext({
sampleRate: a
});
ja.audioWorklet.addModule("audio-worklet.js").then(() => {
ka = new AudioWorkletNode(ja, "audio-worklet");
ka.port.onmessage = e => {
ea.push(e.data)
};
ha = new MediaStreamAudioSourceNode(ja, {
mediaStream: b
});
const d = c(b);
1 < d ? (la = new ChannelMergerNode(ja, {
numberOfInputs: d
}), ha.connect(la), la.connect(ka)) : ha.connect(ka);
ja.resume()
}).catch(d => {
console.error(d);
ia && ia.getTracks().forEach(e => {
e.stop()
});
la = ha = ka = ia = ja = null
})
}).catch(b => {
console.error(b)
})
},
1563645: () => {
ea = [];
ia.getTracks().forEach(a => {
a.stop()
});
ka.port.postMessage(!0);
ha.disconnect();
ha = null;
null != la &&
(la.disconnect(), la = null);
ka.disconnect();
ka = null;
ja.close().then(() => {
ja = null
}).catch(a => {
console.error(a)
})
},
1564237: (a, b, c) => {
b /= c;
for (let d = 0; d < b; ++d) {
const e = ea.shift();
for (let f = 0; f < c; ++f) Sb(a + 2 * (d * c + f), e[f], "i16")
}
},
1564581: a => ea.length * a,
1564667: () => null != ha && null != ka ? 1 : 0,
1564780: () => "undefined" !== typeof AudioContext || "undefined" !== typeof webkitAudioContext ? !0 : !1,
1564927: () => "undefined" !== typeof navigator.mediaDevices && "undefined" !== typeof navigator.mediaDevices.getUserMedia || "undefined" !==
typeof navigator.webkitGetUserMedia ? !0 : !1,
1565161: a => {
"undefined" === typeof k.SDL2 && (k.SDL2 = {});
var b = k.SDL2;
a ? b.capture = {} : b.audio = {};
b.Ri || ("undefined" !== typeof AudioContext ? b.Ri = new AudioContext : "undefined" !== typeof webkitAudioContext && (b.Ri = new webkitAudioContext), b.Ri && Tb(b.Ri));
return void 0 === b.Ri ? -1 : 0
},
1565654: () => k.SDL2.Ri.sampleRate,
1565722: (a, b, c, d) => {
function e() {}
function f(h) {
void 0 !== g.capture.Jj && (clearTimeout(g.capture.Jj), g.capture.Jj = void 0);
g.capture.Tj = g.Ri.createMediaStreamSource(h);
g.capture.Ui = g.Ri.createScriptProcessor(b, a, 1);
g.capture.Ui.onaudioprocess = function(n) {
void 0 !== g && void 0 !== g.capture && (n.outputBuffer.getChannelData(0).fill(0), g.capture.ek = n.inputBuffer, Ub("vi", c, [d]))
};
g.capture.Tj.connect(g.capture.Ui);
g.capture.Ui.connect(g.Ri.destination);
g.capture.stream = h
}
var g = k.SDL2;
g.capture.Xj = g.Ri.createBuffer(a, b, g.Ri.sampleRate);
g.capture.Xj.getChannelData(0).fill(0);
g.capture.Jj = setTimeout(function() {
g.capture.ek = g.capture.Xj;
Ub("vi", c, [d])
}, b / g.Ri.sampleRate * 1E3);
void 0 !== navigator.mediaDevices && void 0 !== navigator.mediaDevices.getUserMedia ? navigator.mediaDevices.getUserMedia({
audio: !0,
video: !1
}).then(f).catch(e) : void 0 !== navigator.webkitGetUserMedia && navigator.webkitGetUserMedia({
audio: !0,
video: !1
}, f, e)
},
1567374: (a, b, c, d) => {
var e = k.SDL2;
e.audio.Ui = e.Ri.createScriptProcessor(b, 0, a);
e.audio.Ui.onaudioprocess = function(f) {
void 0 !== e && void 0 !== e.audio && (e.audio.Lk = f.outputBuffer, Ub("vi", c, [d]))
};
e.audio.Ui.connect(e.Ri.destination)
},
1567784: (a, b) => {
for (var c = k.SDL2,
d = c.capture.ek.numberOfChannels, e = 0; e < d; ++e) {
var f = c.capture.ek.getChannelData(e);
if (f.length != b) throw "Web Audio capture buffer length mismatch! Destination size: " + f.length + " samples vs expected " + b + " samples!";
if (1 == d)
for (var g = 0; g < b; ++g) Sb(a + 4 * g, f[g], "float");
else
for (g = 0; g < b; ++g) Sb(a + 4 * (g * d + e), f[g], "float")
}
},
1568389: (a, b) => {
for (var c = k.SDL2, d = c.audio.Lk.numberOfChannels, e = 0; e < d; ++e) {
var f = c.audio.Lk.getChannelData(e);
if (f.length != b) throw "Web Audio output buffer length mismatch! Destination size: " +
f.length + " samples vs expected " + b + " samples!";
for (var g = 0; g < b; ++g) f[g] = H[a + (g * d + e << 2) >> 2]
}
},
1568869: a => {
var b = k.SDL2;
if (a) {
void 0 !== b.capture.Jj && clearTimeout(b.capture.Jj);
if (void 0 !== b.capture.stream) {
a = b.capture.stream.getAudioTracks();
for (var c = 0; c < a.length; c++) b.capture.stream.removeTrack(a[c]);
b.capture.stream = void 0
}
void 0 !== b.capture.Ui && (b.capture.Ui.onaudioprocess = function() {}, b.capture.Ui.disconnect(), b.capture.Ui = void 0);
void 0 !== b.capture.Tj && (b.capture.Tj.disconnect(), b.capture.Tj =
void 0);
void 0 !== b.capture.Xj && (b.capture.Xj = void 0);
b.capture = void 0
} else void 0 != b.audio.Ui && (b.audio.Ui.disconnect(), b.audio.Ui = void 0), b.audio = void 0;
void 0 !== b.Ri && void 0 === b.audio && void 0 === b.capture && (b.Ri.close(), b.Ri = void 0)
},
1570041: (a, b, c) => {
k.SDL2 || (k.SDL2 = {});
var d = k.SDL2;
d.gl !== k.canvas && (d.bj = k.createContext(k.canvas, !1, !0), d.gl = k.canvas);
if (d.w !== a || d.h !== b || d.vl !== d.bj) d.image = d.bj.createImageData(a, b), d.w = a, d.h = b, d.vl = d.bj;
a = d.image.data;
b = c >> 2;
var e = 0;
if ("undefined" !== typeof CanvasPixelArray &&
a instanceof CanvasPixelArray)
for (c = a.length; e < c;) {
var f = E[b];
a[e] = f & 255;
a[e + 1] = f >> 8 & 255;
a[e + 2] = f >> 16 & 255;
a[e + 3] = 255;
b++;
e += 4
} else if (d.jl !== a && (d.il = new Int32Array(a.buffer), d.kl = new Uint8Array(a.buffer), d.jl = a), a = d.il, c = a.length, a.set(E.subarray(b, b + c)), a = d.kl, b = 3, e = b + 4 * c, 0 == c % 8)
for (; b < e;) a[b] = 255, b = b + 4 | 0, a[b] = 255, b = b + 4 | 0, a[b] = 255, b = b + 4 | 0, a[b] = 255, b = b + 4 | 0, a[b] = 255, b = b + 4 | 0, a[b] = 255, b = b + 4 | 0, a[b] = 255, b = b + 4 | 0, a[b] = 255, b = b + 4 | 0;
else
for (; b < e;) a[b] = 255, b = b + 4 | 0;
d.bj.putImageData(d.image, 0, 0)
},
1571510: (a,
b, c, d, e) => {
var f = document.createElement("canvas");
f.width = a;
f.height = b;
var g = f.getContext("2d");
a = g.createImageData(a, b);
b = a.data;
e >>= 2;
var h = 0,
n;
if ("undefined" !== typeof CanvasPixelArray && b instanceof CanvasPixelArray)
for (n = b.length; h < n;) {
var p = E[e];
b[h] = p & 255;
b[h + 1] = p >> 8 & 255;
b[h + 2] = p >> 16 & 255;
b[h + 3] = p >> 24 & 255;
e++;
h += 4
} else b = new Int32Array(b.buffer), n = b.length, b.set(E.subarray(e, e + n));
g.putImageData(a, 0, 0);
c = 0 === c && 0 === d ? "url(" + f.toDataURL() + "), auto" : "url(" + f.toDataURL() + ") " + c + " " + d + ", auto";
d =
m(c.length + 1);
t(c, v, d, c.length + 1);
return d
},
1572499: a => {
k.canvas && (k.canvas.style.cursor = a ? x(v, a) : "")
},
1572582: () => {
k.canvas && (k.canvas.style.cursor = "none")
},
1572651: () => window.innerWidth,
1572681: () => window.innerHeight
};
function ib(a) {
this.name = "ExitStatus";
this.message = `Program terminated with exit()`;
this.status = a
}
var Wb = (a, b, c) => {
a.addEventListener(b, c, {
once: !0
})
},
Tb = a => {
var b;
b || (b = [document, document.getElementById("canvas")]);
["keydown", "mousedown", "touchstart"].forEach(c => {
b.forEach(d => {
d && Wb(d, c, () => {
"suspended" === a.state && a.resume()
})
})
})
},
Xb = a => {
for (; 0 < a.length;) a.shift()(k)
},
Yb = [],
Zb, M = a => {
var b = Yb[a];
b || (a >= Yb.length && (Yb.length = a + 1), Yb[a] = b = Zb.get(a));
return b
},
Ub = (a, b, c) => {
a.includes("j") ? (a = k["dynCall_" + a], b = c && c.length ? a.apply(null, [b].concat(c)) : a.call(null, b)) : b = M(b).apply(null, c);
return b
};
function Rb(a, b = "i8") {
b.endsWith("*") && (b = "*");
switch (b) {
case "i1":
return D[a >> 0];
case "i8":
return D[a >> 0];
case "i16":
return pb[a >> 1];
case "i32":
return E[a >> 2];
case "i64":
lb("to do getValue(i64) use WASM_BIGINT");
case "float":
return H[a >> 2];
case "double":
return rb[a >> 3];
case "*":
return F[a >> 2];
default:
lb(`invalid type for getValue: `)
}
}
var $b = k.noExitRuntime || !0;
function Sb(a, b, c = "i8") {
c.endsWith("*") && (c = "*");
switch (c) {
case "i1":
D[a >> 0] = b;
break;
case "i8":
D[a >> 0] = b;
break;
case "i16":
pb[a >> 1] = b;
break;
case "i32":
E[a >> 2] = b;
break;
case "i64":
lb("to do setValue(i64) use WASM_BIGINT");
case "float":
H[a >> 2] = b;
break;
case "double":
rb[a >> 3] = b;
break;
case "*":
F[a >> 2] = b;
break;
default:
lb(`invalid type for setValue: `)
}
}
var bc = (a, b) => {
for (var c = 0, d = a.length - 1; 0 <= d; d--) {
var e = a[d];
"." === e ? a.splice(d, 1) : ".." === e ? (a.splice(d, 1), c++) : c && (a.splice(d, 1), c--)
}
if (b)
for (; c; c--) a.unshift("..");
return a
},
La = a => {
var b = "/" === a.charAt(0),
c = "/" === a.substr(-1);
(a = bc(a.split("/").filter(d => !!d), !b).join("/")) || b || (a = ".");
a && c && (a += "/");
return (b ? "/" : "") + a
},
cc = a => {
var b = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);
a = b[0];
b = b[1];
if (!a && !b) return ".";
b && (b = b.substr(0, b.length - 1));
return a + b
},
dc = a => {
if ("/" === a) return "/";
a = La(a);
a = a.replace(/\/$/, "");
var b = a.lastIndexOf("/");
return -1 === b ? a : a.substr(b + 1)
},
ec = () => {
if ("object" == typeof crypto && "function" == typeof crypto.getRandomValues) return c => crypto.getRandomValues(c);
if (bb) try {
var a = require("crypto");
if (a.randomFillSync) return c => a.randomFillSync(c);
var b = a.randomBytes;
return c => (c.set(b(c.byteLength)), c)
} catch (c) {}
lb("initRandomDevice")
},
fc = a => (fc = ec())(a);
function gc() {
for (var a = "", b = !1, c = arguments.length - 1; - 1 <= c && !b; c--) {
b = 0 <= c ? arguments[c] : hc;
if ("string" != typeof b) throw new TypeError("Arguments to path.resolve must be strings");
if (!b) return "";
a = b + "/" + a;
b = "/" === b.charAt(0)
}
a = bc(a.split("/").filter(d => !!d), !b).join("/");
return (b ? "/" : "") + a || "."
}
var ic = (a, b) => {
function c(g) {
for (var h = 0; h < g.length && "" === g[h]; h++);
for (var n = g.length - 1; 0 <= n && "" === g[n]; n--);
return h > n ? [] : g.slice(h, n - h + 1)
}
a = gc(a).substr(1);
b = gc(b).substr(1);
a = c(a.split("/"));
b = c(b.split("/"));
for (var d = Math.min(a.length, b.length), e = d, f = 0; f < d; f++)
if (a[f] !== b[f]) {
e = f;
break
} d = [];
for (f = e; f < a.length; f++) d.push("..");
d = d.concat(b.slice(e));
return d.join("/")
},
jc = "undefined" != typeof TextDecoder ? new TextDecoder("utf8") : void 0,
x = (a, b, c) => {
var d = b + c;
for (c = b; a[c] && !(c >= d);) ++c;
if (16 < c - b &&
a.buffer && jc) return jc.decode(a.subarray(b, c));
for (d = ""; b < c;) {
var e = a[b++];
if (e & 128) {
var f = a[b++] & 63;
if (192 == (e & 224)) d += String.fromCharCode((e & 31) << 6 | f);
else {
var g = a[b++] & 63;
e = 224 == (e & 240) ? (e & 15) << 12 | f << 6 | g : (e & 7) << 18 | f << 12 | g << 6 | a[b++] & 63;
65536 > e ? d += String.fromCharCode(e) : (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023))
}
} else d += String.fromCharCode(e)
}
return d
},
kc = [],
aa = a => {
for (var b = 0, c = 0; c < a.length; ++c) {
var d = a.charCodeAt(c);
127 >= d ? b++ : 2047 >= d ? b += 2 : 55296 <= d && 57343 >= d ? (b += 4, ++c) : b += 3
}
return b
},
t = (a, b, c, d) => {
if (!(0 < d)) return 0;
var e = c;
d = c + d - 1;
for (var f = 0; f < a.length; ++f) {
var g = a.charCodeAt(f);
if (55296 <= g && 57343 >= g) {
var h = a.charCodeAt(++f);
g = 65536 + ((g & 1023) << 10) | h & 1023
}
if (127 >= g) {
if (c >= d) break;
b[c++] = g
} else {
if (2047 >= g) {
if (c + 1 >= d) break;
b[c++] = 192 | g >> 6
} else {
if (65535 >= g) {
if (c + 2 >= d) break;
b[c++] = 224 | g >> 12
} else {
if (c + 3 >= d) break;
b[c++] = 240 | g >> 18;
b[c++] = 128 | g >> 12 & 63
}
b[c++] = 128 | g >> 6 & 63
}
b[c++] = 128 | g & 63
}
}
b[c] = 0;
return c - e
};
function lc(a, b) {
var c = Array(aa(a) + 1);
a = t(a, c, 0, c.length);
b && (c.length = a);
return c
}
var mc = [];
function nc(a, b) {
mc[a] = {
input: [],
output: [],
ij: b
};
oc(a, pc)
}
var pc = {
open(a) {
var b = mc[a.node.rdev];
if (!b) throw new N(43);
a.tty = b;
a.seekable = !1
},
close(a) {
a.tty.ij.fsync(a.tty)
},
fsync(a) {
a.tty.ij.fsync(a.tty)
},
read(a, b, c, d) {
if (!a.tty || !a.tty.ij.Ok) throw new N(60);
for (var e = 0, f = 0; f < d; f++) {
try {
var g = a.tty.ij.Ok(a.tty)
} catch (h) {
throw new N(29);
}
if (void 0 === g && 0 === e) throw new N(6);
if (null === g || void 0 === g) break;
e++;
b[c + f] = g
}
e && (a.node.timestamp = Date.now());
return e
},
write(a, b, c, d) {
if (!a.tty || !a.tty.ij.rk) throw new N(60);
try {
for (var e = 0; e < d; e++) a.tty.ij.rk(a.tty, b[c +
e])
} catch (f) {
throw new N(29);
}
d && (a.node.timestamp = Date.now());
return e
}
},
qc = {
Ok() {
a: {
if (!kc.length) {
var a = null;
if (bb) {
var b = Buffer.alloc(256),
c = 0,
d = process.stdin.fd;
try {
c = fs.readSync(d, b)
} catch (e) {
if (e.toString().includes("EOF")) c = 0;
else throw e;
}
0 < c ? a = b.slice(0, c).toString("utf-8") : a = null
} else "undefined" != typeof window && "function" == typeof window.prompt ? (a = window.prompt("Input: "), null !== a && (a += "\n")) : "function" == typeof readline && (a = readline(), null !== a && (a += "\n"));
if (!a) {
a = null;
break a
}
kc = lc(a, !0)
}
a =
kc.shift()
}
return a
},
rk(a, b) {
null === b || 10 === b ? (jb(x(a.output, 0)), a.output = []) : 0 != b && a.output.push(b)
},
fsync(a) {
a.output && 0 < a.output.length && (jb(x(a.output, 0)), a.output = [])
},
yl() {
return {
bm: 25856,
dm: 5,
am: 191,
cm: 35387,
$l: [3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
}
},
zl() {
return 0
},
Al() {
return [24, 80]
}
},
rc = {
rk(a, b) {
null === b || 10 === b ? (l(x(a.output, 0)), a.output = []) : 0 != b && a.output.push(b)
},
fsync(a) {
a.output && 0 < a.output.length && (l(x(a.output, 0)), a.output = [])
}
};
function Pa(a) {
return a.Mi ? a.Mi.subarray ? a.Mi.subarray(0, a.Oi) : new Uint8Array(a.Mi) : new Uint8Array(0)
}
function sc(a, b) {
var c = a.Mi ? a.Mi.length : 0;
c >= b || (b = Math.max(b, c * (1048576 > c ? 2 : 1.125) >>> 0), 0 != c && (b = Math.max(b, 256)), c = a.Mi, a.Mi = new Uint8Array(b), 0 < a.Oi && a.Mi.set(c.subarray(0, a.Oi), 0))
}
var z = {
ej: null,
Si() {
return z.createNode(null, "/", 16895, 0)
},
createNode(a, b, c, d) {
if (24576 === (c & 61440) || 4096 === (c & 61440)) throw new N(63);
z.ej || (z.ej = {
dir: {
node: {
dj: z.Li.dj,
Vi: z.Li.Vi,
lookup: z.Li.lookup,
Uj: z.Li.Uj,
rename: z.Li.rename,
unlink: z.Li.unlink,
rmdir: z.Li.rmdir,
readdir: z.Li.readdir,
symlink: z.Li.symlink
},
stream: {
vj: z.Ni.vj
}
},
file: {
node: {
dj: z.Li.dj,
Vi: z.Li.Vi
},
stream: {
vj: z.Ni.vj,
read: z.Ni.read,
write: z.Ni.write,
Nj: z.Ni.Nj,
nk: z.Ni.nk,
Uk: z.Ni.Uk
}
},
link: {
node: {
dj: z.Li.dj,
Vi: z.Li.Vi,
readlink: z.Li.readlink
},
stream: {}
},
Kk: {
node: {
dj: z.Li.dj,
Vi: z.Li.Vi
},
stream: tc
}
});
c = uc(a, b, c, d);
C(c.mode) ? (c.Li = z.ej.dir.node, c.Ni = z.ej.dir.stream, c.Mi = {}) : 32768 === (c.mode & 61440) ? (c.Li = z.ej.file.node, c.Ni = z.ej.file.stream, c.Oi = 0, c.Mi = null) : 40960 === (c.mode & 61440) ? (c.Li = z.ej.link.node, c.Ni = z.ej.link.stream) : 8192 === (c.mode & 61440) && (c.Li = z.ej.Kk.node, c.Ni = z.ej.Kk.stream);
c.timestamp = Date.now();
a && (a.Mi[b] = c, a.timestamp = c.timestamp);
return c
},
Li: {
dj(a) {
var b = {};
b.dev = 8192 === (a.mode & 61440) ? a.id : 1;
b.ino = a.id;
b.mode = a.mode;
b.nlink =
1;
b.uid = 0;
b.gid = 0;
b.rdev = a.rdev;
C(a.mode) ? b.size = 4096 : 32768 === (a.mode & 61440) ? b.size = a.Oi : 40960 === (a.mode & 61440) ? b.size = a.link.length : b.size = 0;
b.atime = new Date(a.timestamp);
b.mtime = new Date(a.timestamp);
b.ctime = new Date(a.timestamp);
b.fl = 4096;
b.blocks = Math.ceil(b.size / b.fl);
return b
},
Vi(a, b) {
void 0 !== b.mode && (a.mode = b.mode);
void 0 !== b.timestamp && (a.timestamp = b.timestamp);
if (void 0 !== b.size && (b = b.size, a.Oi != b))
if (0 == b) a.Mi = null, a.Oi = 0;
else {
var c = a.Mi;
a.Mi = new Uint8Array(b);
c && a.Mi.set(c.subarray(0,
Math.min(b, a.Oi)));
a.Oi = b
}
},
lookup() {
throw vc[44];
},
Uj(a, b, c, d) {
return z.createNode(a, b, c, d)
},
rename(a, b, c) {
if (C(a.mode)) {
try {
var d = wc(b, c)
} catch (f) {}
if (d)
for (var e in d.Mi) throw new N(55);
}
delete a.parent.Mi[a.name];
a.parent.timestamp = Date.now();
a.name = c;
b.Mi[c] = a;
b.timestamp = a.parent.timestamp;
a.parent = b
},
unlink(a, b) {
delete a.Mi[b];
a.timestamp = Date.now()
},
rmdir(a, b) {
var c = wc(a, b),
d;
for (d in c.Mi) throw new N(55);
delete a.Mi[b];
a.timestamp = Date.now()
},
readdir(a) {
var b = [".", ".."],
c;
for (c in a.Mi) a.Mi.hasOwnProperty(c) &&
b.push(c);
return b
},
symlink(a, b, c) {
a = z.createNode(a, b, 41471, 0);
a.link = c;
return a
},
readlink(a) {
if (40960 !== (a.mode & 61440)) throw new N(28);
return a.link
}
},
Ni: {
read(a, b, c, d, e) {
var f = a.node.Mi;
if (e >= a.node.Oi) return 0;
a = Math.min(a.node.Oi - e, d);
if (8 < a && f.subarray) b.set(f.subarray(e, e + a), c);
else
for (d = 0; d < a; d++) b[c + d] = f[e + d];
return a
},
write(a, b, c, d, e, f) {
b.buffer === D.buffer && (f = !1);
if (!d) return 0;
a = a.node;
a.timestamp = Date.now();
if (b.subarray && (!a.Mi || a.Mi.subarray)) {
if (f) return a.Mi = b.subarray(c, c + d), a.Oi =
d;
if (0 === a.Oi && 0 === e) return a.Mi = b.slice(c, c + d), a.Oi = d;
if (e + d <= a.Oi) return a.Mi.set(b.subarray(c, c + d), e), d
}
sc(a, e + d);
if (a.Mi.subarray && b.subarray) a.Mi.set(b.subarray(c, c + d), e);
else
for (f = 0; f < d; f++) a.Mi[e + f] = b[c + f];
a.Oi = Math.max(a.Oi, e + d);
return d
},
vj(a, b, c) {
1 === c ? b += a.position : 2 === c && 32768 === (a.node.mode & 61440) && (b += a.node.Oi);
if (0 > b) throw new N(28);
return b
},
Nj(a, b, c) {
sc(a.node, b + c);
a.node.Oi = Math.max(a.node.Oi, b + c)
},
nk(a, b, c, d, e) {
if (32768 !== (a.node.mode & 61440)) throw new N(43);
a = a.node.Mi;
if (e & 2 ||
a.buffer !== D.buffer) {
if (0 < c || c + b < a.length) a.subarray ? a = a.subarray(c, c + b) : a = Array.prototype.slice.call(a, c, c + b);
c = !0;
lb();
b = void 0;
if (!b) throw new N(48);
D.set(a, b)
} else c = !1, b = a.byteOffset;
return {
Ij: b,
yj: c
}
},
Uk(a, b, c, d) {
z.Ni.write(a, b, 0, d, c, !1);
return 0
}
}
},
xc = (a, b, c) => {
var d = `al `;
eb(a, e => {
e || lb(`Loading data file "" failed (no arrayBuffer).`);
b(new Uint8Array(e));
d && Eb(d)
}, () => {
if (c) c();
else throw `Loading data file "" failed.`;
});
d && Db(d)
},
yc = k.preloadPlugins || [],
Bc = (a, b, c, d) => {
"undefined" !=
typeof zc && Ac();
var e = !1;
yc.forEach(f => {
!e && f.canHandle(b) && (f.handle(a, b, c, d), e = !0)
});
return e
},
Dc = (a, b, c, d, e, f, g, h, n, p) => {
function q(r) {
function B(y) {
p && p();
h || Cc(a, b, y, d, e, n);
f && f();
Eb(w)
}
Bc(r, u, B, () => {
g && g();
Eb(w)
}) || B(r)
}
var u = b ? gc(La(a + "/" + b)) : a,
w = `cp `;
Db(w);
"string" == typeof c ? xc(c, r => q(r), g) : q(c)
},
Ec = (a, b) => {
var c = 0;
a && (c |= 365);
b && (c |= 146);
return c
},
K = {
lj: {},
indexedDB: () => {
if ("undefined" != typeof indexedDB) return indexedDB;
var a = null;
"object" == typeof window && (a = window.indexedDB || window.mozIndexedDB ||
window.webkitIndexedDB || window.msIndexedDB);
a || lb("IDBFS used, but indexedDB not supported");
return a
},
al: 21,
qj: "FILE_DATA",
Si: function(a) {
return z.Si.apply(null, arguments)
},
zk: (a, b, c) => {
K.ik(a, (d, e) => {
if (d) return c(d);
K.jk(a, (f, g) => {
if (f) return c(f);
K.sk(b ? g : e, b ? e : g, c)
})
})
},
Hl: () => {
Object.values(K.lj).forEach(a => a.close());
K.lj = {}
},
sl: (a, b) => {
var c = K.lj[a];
if (c) return b(null, c);
try {
var d = K.indexedDB().open(a, K.al)
} catch (e) {
return b(e)
}
if (!d) return b("Unable to connect to IndexedDB");
d.onupgradeneeded =
e => {
var f = e.target.result;
e = e.target.transaction;
var g;
f.objectStoreNames.contains(K.qj) ? g = e.objectStore(K.qj) : g = f.createObjectStore(K.qj);
g.indexNames.contains("timestamp") || g.createIndex("timestamp", "timestamp", {
unique: !1
})
};
d.onsuccess = () => {
c = d.result;
K.lj[a] = c;
b(null, c)
};
d.onerror = e => {
b(e.target.error);
e.preventDefault()
}
},
ik: (a, b) => {
function c(h) {
return "." !== h && ".." !== h
}
function d(h) {
return n => La(h + "/" + n)
}
var e = {};
for (a = Ma(a.oj).filter(c).map(d(a.oj)); a.length;) {
var f = a.pop();
try {
var g = Na(f)
} catch (h) {
return b(h)
}
C(g.mode) &&
a.push.apply(a, Ma(f).filter(c).map(d(f)));
e[f] = {
timestamp: g.mtime
}
}
return b(null, {
type: "local",
entries: e
})
},
jk: (a, b) => {
var c = {};
K.sl(a.oj, (d, e) => {
if (d) return b(d);
try {
var f = e.transaction([K.qj], "readonly");
f.onerror = g => {
b(g.target.error);
g.preventDefault()
};
f.objectStore(K.qj).index("timestamp").openKeyCursor().onsuccess = g => {
g = g.target.result;
if (!g) return b(null, {
type: "remote",
db: e,
entries: c
});
c[g.primaryKey] = {
timestamp: g.key
};
g.continue()
}
} catch (g) {
return b(g)
}
})
},
lk: (a, b) => {
try {
var c = Oa(a).node;
var d = Na(a)
} catch (e) {
return b(e)
}
return C(d.mode) ? b(null, {
timestamp: d.mtime,
mode: d.mode
}) : 32768 === (d.mode & 61440) ? (c.Mi = Pa(c), b(null, {
timestamp: d.mtime,
mode: d.mode,
contents: c.Mi
})) : b(Error("node type not supported"))
},
xk: (a, b, c) => {
try {
if (C(b.mode)) Qa(a, b.mode);
else if (32768 === (b.mode & 61440)) Ra(a, b.contents);
else return c(Error("node type not supported"));
Sa(a, b.mode);
Ta(a, b.timestamp, b.timestamp)
} catch (d) {
return c(d)
}
c(null)
},
uk: (a, b) => {
try {
var c = Na(a);
C(c.mode) ? Ua(a) : 32768 === (c.mode & 61440) && Va(a)
} catch (d) {
return b(d)
}
b(null)
},
mk: (a, b, c) => {
a = a.get(b);
a.onsuccess = d => {
c(null, d.target.result)
};
a.onerror = d => {
c(d.target.error);
d.preventDefault()
}
},
yk: (a, b, c, d) => {
try {
var e = a.put(c, b)
} catch (f) {
d(f);
return
}
e.onsuccess = () => {
d(null)
};
e.onerror = f => {
d(f.target.error);
f.preventDefault()
}
},
vk: (a, b, c) => {
a = a.delete(b);
a.onsuccess = () => {
c(null)
};
a.onerror = d => {
c(d.target.error);
d.preventDefault()
}
},
sk: (a, b, c) => {
function d(q) {
if (q && !h) return h = !0, c(q)
}
var e = 0,
f = [];
Object.keys(a.entries).forEach(function(q) {
var u = a.entries[q],
w = b.entries[q];
w && u.timestamp.getTime() == w.timestamp.getTime() || (f.push(q), e++)
});
var g = [];
Object.keys(b.entries).forEach(function(q) {
a.entries[q] || (g.push(q), e++)
});
if (!e) return c(null);
var h = !1,
n = ("remote" === a.type ? a.db : b.db).transaction([K.qj], "readwrite"),
p = n.objectStore(K.qj);
n.onerror = q => {
d(this.error);
q.preventDefault()
};
n.oncomplete = () => {
h || c(null)
};
f.sort().forEach(q => {
"local" === b.type ? K.mk(p, q, (u, w) => {
if (u) return d(u);
K.xk(q, w, d)
}) : K.lk(q, (u, w) => {
if (u) return d(u);
K.yk(p, q, w, d)
})
});
g.sort().reverse().forEach(q => {
"local" === b.type ? K.uk(q, d) : K.vk(p, q, d)
})
}
},
Fc = null,
Gc = {},
Hc = [],
Ic = 1,
Jc = null,
hc = "/",
Kc = !0,
N = null,
vc = {},
Lc = 0;
function Oa(a, b = {}) {
a = gc(a);
if (!a) return {
path: "",
node: null
};
b = Object.assign({
Mk: !0,
tk: 0
}, b);
if (8 < b.tk) throw new N(32);
a = a.split("/").filter(g => !!g);
for (var c = Fc, d = "/", e = 0; e < a.length; e++) {
var f = e === a.length - 1;
if (f && b.parent) break;
c = wc(c, a[e]);
d = La(d + "/" + a[e]);
c.nj && (!f || f && b.Mk) && (c = c.nj.root);
if (!f || b.tj)
for (f = 0; 40960 === (c.mode & 61440);)
if (c = Mc(d), d = gc(cc(d), c), c = Oa(d, {
tk: b.tk + 1
}).node, 40 < f++) throw new N(32);
}
return {
path: d,
node: c
}
}
function Nc(a) {
for (var b;;) {
if (a === a.parent) return a = a.Si.oj, b ? "/" !== a[a.length - 1] ? `/` : a + b : a;
b = b ? `${a.name}/` : a.name;
a = a.parent
}
}
function Oc(a, b) {
for (var c = 0, d = 0; d < b.length; d++) c = (c << 5) - c + b.charCodeAt(d) | 0;
return (a + c >>> 0) % Jc.length
}
function Pc(a) {
var b = Oc(a.parent.id, a.name);
a.Bj = Jc[b];
Jc[b] = a
}
function Qc(a) {
var b = Oc(a.parent.id, a.name);
if (Jc[b] === a) Jc[b] = a.Bj;
else
for (b = Jc[b]; b;) {
if (b.Bj === a) {
b.Bj = a.Bj;
break
}
b = b.Bj
}
}
function wc(a, b) {
var c;
if (c = (c = Rc(a, "x")) ? c : a.Li.lookup ? 0 : 2) throw new N(c, a);
for (c = Jc[Oc(a.id, b)]; c; c = c.Bj) {
var d = c.name;
if (c.parent.id === a.id && d === b) return c
}
return a.Li.lookup(a, b)
}
function uc(a, b, c, d) {
a = new Sc(a, b, c, d);
Pc(a);
return a
}
function C(a) {
return 16384 === (a & 61440)
}
function Tc(a) {
var b = ["r", "w", "rw"][a & 3];
a & 512 && (b += "w");
return b
}
function Rc(a, b) {
if (Kc) return 0;
if (!b.includes("r") || a.mode & 292) {
if (b.includes("w") && !(a.mode & 146) || b.includes("x") && !(a.mode & 73)) return 2
} else return 2;
return 0
}
function Uc(a, b) {
try {
return wc(a, b), 20
} catch (c) {}
return Rc(a, "wx")
}
function Vc(a, b, c) {
try {
var d = wc(a, b)
} catch (e) {
return e.Pi
}
if (a = Rc(a, "wx")) return a;
if (c) {
if (!C(d.mode)) return 54;
if (d === d.parent || Nc(d) === hc) return 10
} else if (C(d.mode)) return 31;
return 0
}
function Xc() {
for (var a = 0; 4096 >= a; a++)
if (!Hc[a]) return a;
throw new N(33);
}
function Yc(a) {
a = Hc[a];
if (!a) throw new N(8);
return a
}
function Zc(a, b = -1) {
$c || ($c = function() {
this.Ki = {}
}, $c.prototype = {}, Object.defineProperties($c.prototype, {
object: {
get() {
return this.node
},
set(c) {
this.node = c
}
},
flags: {
get() {
return this.Ki.flags
},
set(c) {
this.Ki.flags = c
}
},
position: {
get() {
return this.Ki.position
},
set(c) {
this.Ki.position = c
}
}
}));
a = Object.assign(new $c, a); - 1 == b && (b = Xc());
a.fd = b;
return Hc[b] = a
}
var tc = {
open(a) {
a.Ni = Gc[a.node.rdev].Ni;
a.Ni.open && a.Ni.open(a)
},
vj() {
throw new N(70);
}
};
function oc(a, b) {
Gc[a] = {
Ni: b
}
}
function ad() {
for (var a = [], b = [Fc.Si]; b.length;) {
var c = b.pop();
a.push(c);
b.push.apply(b, c.Tk)
}
return a
}
function Nb(a, b) {
function c(g) {
Lc--;
return b(g)
}
function d(g) {
if (g) {
if (!d.nl) return d.nl = !0, c(g)
} else ++f >= e.length && c(null)
}
"function" == typeof a && (b = a, a = !1);
Lc++;
1 < Lc && l(`warning: FS.syncfs operations in flight at once, probably just doing extra work`);
var e = ad(),
f = 0;
e.forEach(g => {
if (!g.type.zk) return d(null);
g.type.zk(g, a, d)
})
}
function Qb(a, b) {
var c = "/" === b,
d = !b;
if (c && Fc) throw new N(10);
if (!c && !d) {
var e = Oa(b, {
Mk: !1
});
b = e.path;
e = e.node;
if (e.nj) throw new N(10);
if (!C(e.mode)) throw new N(54);
}
b = {
type: a,
om: {},
oj: b,
Tk: []
};
a = a.Si(b);
a.Si = b;
b.root = a;
c ? Fc = a : e && (e.nj = b, e.Si && e.Si.Tk.push(b))
}
function bd(a, b, c) {
var d = Oa(a, {
parent: !0
}).node;
a = dc(a);
if (!a || "." === a || ".." === a) throw new N(28);
var e = Uc(d, a);
if (e) throw new N(e);
if (!d.Li.Uj) throw new N(63);
return d.Li.Uj(d, a, b, c)
}
function Pb(a, b) {
return bd(a, (void 0 !== b ? b : 511) & 1023 | 16384, 0)
}
function Qa(a, b) {
a = a.split("/");
for (var c = "", d = 0; d < a.length; ++d)
if (a[d]) {
c += "/" + a[d];
try {
Pb(c, b)
} catch (e) {
if (20 != e.Pi) throw e;
}
}
}
function cd(a, b, c) {
"undefined" == typeof c && (c = b, b = 438);
return bd(a, b | 8192, c)
}
function dd(a, b) {
if (!gc(a)) throw new N(44);
var c = Oa(b, {
parent: !0
}).node;
if (!c) throw new N(44);
b = dc(b);
var d = Uc(c, b);
if (d) throw new N(d);
if (!c.Li.symlink) throw new N(63);
c.Li.symlink(c, b, a)
}
function Ua(a) {
var b = Oa(a, {
parent: !0
}).node;
a = dc(a);
var c = wc(b, a),
d = Vc(b, a, !0);
if (d) throw new N(d);
if (!b.Li.rmdir) throw new N(63);
if (c.nj) throw new N(10);
b.Li.rmdir(b, a);
Qc(c)
}
function Ma(a) {
a = Oa(a, {
tj: !0
}).node;
if (!a.Li.readdir) throw new N(54);
return a.Li.readdir(a)
}
function Va(a) {
var b = Oa(a, {
parent: !0
}).node;
if (!b) throw new N(44);
a = dc(a);
var c = wc(b, a),
d = Vc(b, a, !1);
if (d) throw new N(d);
if (!b.Li.unlink) throw new N(63);
if (c.nj) throw new N(10);
b.Li.unlink(b, a);
Qc(c)
}
function Mc(a) {
a = Oa(a).node;
if (!a) throw new N(44);
if (!a.Li.readlink) throw new N(28);
return gc(Nc(a.parent), a.Li.readlink(a))
}
function Na(a, b) {
a = Oa(a, {
tj: !b
}).node;
if (!a) throw new N(44);
if (!a.Li.dj) throw new N(63);
return a.Li.dj(a)
}
function ed(a) {
return Na(a, !0)
}
function Sa(a, b) {
a = "string" == typeof a ? Oa(a, {
tj: !0
}).node : a;
if (!a.Li.Vi) throw new N(63);
a.Li.Vi(a, {
mode: b & 4095 | a.mode & -4096,
timestamp: Date.now()
})
}
function Ta(a, b, c) {
a = Oa(a, {
tj: !0
}).node;
a.Li.Vi(a, {
timestamp: Math.max(b, c)
})
}
function fd(a, b, c) {
if ("" === a) throw new N(44);
if ("string" == typeof b) {
var d = {
r: 0,
"r+": 2,
w: 577,
"w+": 578,
a: 1089,
"a+": 1090
} [b];
if ("undefined" == typeof d) throw Error(`Unknown file open mode: `);
b = d
}
c = b & 64 ? ("undefined" == typeof c ? 438 : c) & 4095 | 32768 : 0;
if ("object" == typeof a) var e = a;
else {
a = La(a);
try {
e = Oa(a, {
tj: !(b & 131072)
}).node
} catch (f) {}
}
d = !1;
if (b & 64)
if (e) {
if (b & 128) throw new N(20);
} else e = bd(a, c, 0), d = !0;
if (!e) throw new N(44);
8192 === (e.mode & 61440) && (b &= -513);
if (b & 65536 && !C(e.mode)) throw new N(54);
if (!d &&
(c = e ? 40960 === (e.mode & 61440) ? 32 : C(e.mode) && ("r" !== Tc(b) || b & 512) ? 31 : Rc(e, Tc(b)) : 44)) throw new N(c);
if (b & 512 && !d) {
c = e;
c = "string" == typeof c ? Oa(c, {
tj: !0
}).node : c;
if (!c.Li.Vi) throw new N(63);
if (C(c.mode)) throw new N(31);
if (32768 !== (c.mode & 61440)) throw new N(28);
if (d = Rc(c, "w")) throw new N(d);
c.Li.Vi(c, {
size: 0,
timestamp: Date.now()
})
}
b &= -131713;
e = Zc({
node: e,
path: Nc(e),
flags: b,
seekable: !0,
position: 0,
Ni: e.Ni,
Pl: [],
error: !1
});
e.Ni.open && e.Ni.open(e);
!k.logReadFiles || b & 1 || (gd || (gd = {}), a in gd || (gd[a] = 1));
return e
}
function hd(a) {
if (null === a.fd) throw new N(8);
a.uj && (a.uj = null);
try {
a.Ni.close && a.Ni.close(a)
} catch (b) {
throw b;
} finally {
Hc[a.fd] = null
}
a.fd = null
}
function jd(a, b, c) {
if (null === a.fd) throw new N(8);
if (!a.seekable || !a.Ni.vj) throw new N(70);
if (0 != c && 1 != c && 2 != c) throw new N(28);
a.position = a.Ni.vj(a, b, c);
a.Pl = [];
return a.position
}
function kd(a, b, c, d, e, f) {
if (0 > d || 0 > e) throw new N(28);
if (null === a.fd) throw new N(8);
if (0 === (a.flags & 2097155)) throw new N(8);
if (C(a.node.mode)) throw new N(31);
if (!a.Ni.write) throw new N(28);
a.seekable && a.flags & 1024 && jd(a, 0, 2);
var g = "undefined" != typeof e;
if (!g) e = a.position;
else if (!a.seekable) throw new N(70);
b = a.Ni.write(a, b, c, d, e, f);
g || (a.position += b);
return b
}
function Ra(a, b) {
var c = {
Ik: !0
};
c.flags = c.flags || 577;
a = fd(a, c.flags, c.mode);
if ("string" == typeof b) {
var d = new Uint8Array(aa(b) + 1);
b = t(b, d, 0, d.length);
kd(a, d, 0, b, void 0, c.Ik)
} else if (ArrayBuffer.isView(b)) kd(a, b, 0, b.byteLength, void 0, c.Ik);
else throw Error("Unsupported data type");
hd(a)
}
function ld() {
N || (N = function(a, b) {
this.name = "ErrnoError";
this.node = b;
this.Jl = function(c) {
this.Pi = c
};
this.Jl(a);
this.message = "FS error"
}, N.prototype = Error(), N.prototype.constructor = N, [44].forEach(a => {
vc[a] = new N(a);
vc[a].stack = "<generic error, no stack>"
}))
}
var md;
function nd(a, b) {
a = "string" == typeof a ? a : Nc(a);
for (b = b.split("/").reverse(); b.length;) {
var c = b.pop();
if (c) {
var d = La(a + "/" + c);
try {
Pb(d)
} catch (e) {}
a = d
}
}
return d
}
function od(a, b, c, d) {
a = La(("string" == typeof a ? a : Nc(a)) + "/" + b);
c = Ec(c, d);
return bd(a, (void 0 !== c ? c : 438) & 4095 | 32768, 0)
}
function Cc(a, b, c, d, e, f) {
var g = b;
a && (a = "string" == typeof a ? a : Nc(a), g = b ? La(a + "/" + b) : a);
a = Ec(d, e);
g = bd(g, (void 0 !== a ? a : 438) & 4095 | 32768, 0);
if (c) {
if ("string" == typeof c) {
b = Array(c.length);
d = 0;
for (e = c.length; d < e; ++d) b[d] = c.charCodeAt(d);
c = b
}
Sa(g, a | 146);
b = fd(g, 577);
kd(b, c, 0, c.length, 0, f);
hd(b);
Sa(g, a)
}
return g
}
function pd(a, b, c, d) {
a = La(("string" == typeof a ? a : Nc(a)) + "/" + b);
b = Ec(!!c, !!d);
pd.Rk || (pd.Rk = 64);
var e = pd.Rk++ << 8 | 0;
oc(e, {
open(f) {
f.seekable = !1
},
close() {
d && d.buffer && d.buffer.length && d(10)
},
read(f, g, h, n) {
for (var p = 0, q = 0; q < n; q++) {
try {
var u = c()
} catch (w) {
throw new N(29);
}
if (void 0 === u && 0 === p) throw new N(6);
if (null === u || void 0 === u) break;
p++;
g[h + q] = u
}
p && (f.node.timestamp = Date.now());
return p
},
write(f, g, h, n) {
for (var p = 0; p < n; p++) try {
d(g[h + p])
} catch (q) {
throw new N(29);
}
n && (f.node.timestamp = Date.now());
return p
}
});
return cd(a, b, e)
}
function qd(a) {
if (!(a.Bl || a.Cl || a.link || a.Mi)) {
if ("undefined" != typeof XMLHttpRequest) throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");
if (db) try {
a.Mi = lc(db(a.url), !0), a.Oi = a.Mi.length
} catch (b) {
throw new N(29);
} else throw Error("Cannot load without read() or XMLHttpRequest.");
}
}
function rd(a, b, c, d, e) {
function f() {
this.kk = !1;
this.jj = []
}
f.prototype.get = function(q) {
if (!(q > this.length - 1 || 0 > q)) {
var u = q % this.chunkSize;
return this.Pk(q / this.chunkSize | 0)[u]
}
};
f.prototype.Ki = function(q) {
this.Pk = q
};
f.prototype.Hk = function() {
var q = new XMLHttpRequest;
q.open("HEAD", c, !1);
q.send(null);
if (!(200 <= q.status && 300 > q.status || 304 === q.status)) throw Error("Couldn't load " + c + ". Status: " + q.status);
var u = Number(q.getResponseHeader("Content-length")),
w, r = (w = q.getResponseHeader("Accept-Ranges")) &&
"bytes" === w;
q = (w = q.getResponseHeader("Content-Encoding")) && "gzip" === w;
var B = 1048576;
r || (B = u);
var y = this;
y.Ki(G => {
var L = G * B,
O = (G + 1) * B - 1;
O = Math.min(O, u - 1);
if ("undefined" == typeof y.jj[G]) {
var A = y.jj;
if (L > O) throw Error("invalid range (" + L + ", " + O + ") or no bytes requested!");
if (O > u - 1) throw Error("only " + u + " bytes available! programmer error!");
var P = new XMLHttpRequest;
P.open("GET", c, !1);
u !== B && P.setRequestHeader("Range", "bytes=" + L + "-" + O);
P.responseType = "arraybuffer";
P.overrideMimeType && P.overrideMimeType("text/plain; charset=x-user-defined");
P.send(null);
if (!(200 <= P.status && 300 > P.status || 304 === P.status)) throw Error("Couldn't load " + c + ". Status: " + P.status);
L = void 0 !== P.response ? new Uint8Array(P.response || []) : lc(P.responseText || "", !0);
A[G] = L
}
if ("undefined" == typeof y.jj[G]) throw Error("doXHR failed!");
return y.jj[G]
});
if (q || !u) B = u = 1, B = u = this.Pk(0).length, jb("LazyFiles on gzip forces download of the whole file when length is accessed");
this.el = u;
this.dl = B;
this.kk = !0
};
if ("undefined" != typeof XMLHttpRequest) {
if (!ab) throw "Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";
var g = new f;
Object.defineProperties(g, {
length: {
get: function() {
this.kk || this.Hk();
return this.el
}
},
chunkSize: {
get: function() {
this.kk || this.Hk();
return this.dl
}
}
});
var h = void 0
} else h = c, g = void 0;
var n = od(a, b, d, e);
g ? n.Mi = g : h && (n.Mi = null, n.url = h);
Object.defineProperties(n, {
Oi: {
get: function() {
return this.Mi.length
}
}
});
var p = {};
Object.keys(n.Ni).forEach(q => {
var u = n.Ni[q];
p[q] = function() {
qd(n);
return u.apply(null, arguments)
}
});
p.read = (q, u, w, r, B) => {
qd(n);
q = q.node.Mi;
if (B >= q.length) u = 0;
else {
r = Math.min(q.length -
B, r);
if (q.slice)
for (var y = 0; y < r; y++) u[w + y] = q[B + y];
else
for (y = 0; y < r; y++) u[w + y] = q.get(B + y);
u = r
}
return u
};
p.nk = () => {
qd(n);
lb();
throw new N(48);
};
n.Ni = p;
return n
}
var sd = {},
$c, gd, td = (a, b) => a ? x(v, a, b) : "";
function ud(a, b, c) {
if ("/" === b.charAt(0)) return b;
a = -100 === a ? hc : Yc(a).path;
if (0 == b.length) {
if (!c) throw new N(44);
return a
}
return La(a + "/" + b)
}
function vd(a, b, c) {
try {
var d = a(b)
} catch (f) {
if (f && f.node && La(b) !== La(Nc(f.node))) return -54;
throw f;
}
E[c >> 2] = d.dev;
E[c + 4 >> 2] = d.mode;
F[c + 8 >> 2] = d.nlink;
E[c + 12 >> 2] = d.uid;
E[c + 16 >> 2] = d.gid;
E[c + 20 >> 2] = d.rdev;
J = [d.size >>> 0, (I = d.size, 1 <= +Math.abs(I) ? 0 < I ? +Math.floor(I / 4294967296) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296) >>> 0 : 0)];
E[c + 24 >> 2] = J[0];
E[c + 28 >> 2] = J[1];
E[c + 32 >> 2] = 4096;
E[c + 36 >> 2] = d.blocks;
a = d.atime.getTime();
b = d.mtime.getTime();
var e = d.ctime.getTime();
J = [Math.floor(a / 1E3) >>> 0, (I = Math.floor(a / 1E3), 1 <=
+Math.abs(I) ? 0 < I ? +Math.floor(I / 4294967296) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296) >>> 0 : 0)];
E[c + 40 >> 2] = J[0];
E[c + 44 >> 2] = J[1];
F[c + 48 >> 2] = a % 1E3 * 1E3;
J = [Math.floor(b / 1E3) >>> 0, (I = Math.floor(b / 1E3), 1 <= +Math.abs(I) ? 0 < I ? +Math.floor(I / 4294967296) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296) >>> 0 : 0)];
E[c + 56 >> 2] = J[0];
E[c + 60 >> 2] = J[1];
F[c + 64 >> 2] = b % 1E3 * 1E3;
J = [Math.floor(e / 1E3) >>> 0, (I = Math.floor(e / 1E3), 1 <= +Math.abs(I) ? 0 < I ? +Math.floor(I / 4294967296) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296) >>> 0 : 0)];
E[c + 72 >> 2] = J[0];
E[c + 76 >> 2] = J[1];
F[c + 80 >> 2] = e % 1E3 * 1E3;
J = [d.ino >>> 0, (I = d.ino, 1 <= +Math.abs(I) ? 0 < I ? +Math.floor(I / 4294967296) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296) >>> 0 : 0)];
E[c + 88 >> 2] = J[0];
E[c + 92 >> 2] = J[1];
return 0
}
var wd = void 0;
function xd() {
var a = E[+wd >> 2];
wd += 4;
return a
}
var yd = a => 0 === a % 4 && (0 !== a % 100 || 0 === a % 400),
zd = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335],
Ad = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
Ka = a => {
var b = aa(a) + 1,
c = m(b);
c && t(a, v, c, b);
return c
},
Kd = (a, b) => {
Bd = a;
Cd = b;
if (Dd)
if (Ed || (Ed = !0), 0 == a) Fd = function() {
var d = Math.max(0, Gd + b - Hd()) | 0;
setTimeout(Id, d)
};
else if (1 == a) Fd = function() {
Jd(Id)
};
else if (2 == a) {
if ("undefined" == typeof setImmediate) {
var c = [];
addEventListener("message", d => {
if ("setimmediate" === d.data || "setimmediate" === d.data.target) d.stopPropagation(),
c.shift()()
}, !0);
setImmediate = function(d) {
c.push(d);
ab ? (void 0 === k.setImmediates && (k.setImmediates = []), k.setImmediates.push(d), postMessage({
target: "setimmediate"
})) : postMessage("setimmediate", "*")
}
}
Fd = function() {
setImmediate(Id)
}
}
},
Hd;
Hd = () => performance.now();
var Rd = a => {
!Dd || lb("emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.");
Dd = a;
var b = Ld;
Ed = !1;
Id = function() {
if (!nb)
if (0 < Md.length) {
var c = Md.shift();
c.jm(c.Zl);
if (Nd) {
var d = Nd,
e = 0 == d % 1 ? d - 1 : Math.floor(d);
Nd = c.fm ? e : (8 * d + (e + .5)) / 9
}
k.setStatus && (c = k.statusMessage || "Please wait...", d = Nd, e = Od.hm, d ? d < e ? k.setStatus(c + " (" + (e - d) + "/" + e + ")") : k.setStatus(c) : k.setStatus(""));
b <
Ld || setTimeout(Id, 0)
} else if (!(b < Ld))
if (Pd = Pd + 1 | 0, 1 == Bd && 1 < Cd && 0 != Pd % Cd) Fd();
else {
0 == Bd && (Gd = Hd());
if (R)
for (c = R.Dj, R.Dj = R.Kj, R.Kj = c, c = R.pj, R.pj = R.Zj, R.Zj = c, c = 0; 21 >= c; ++c) R.pj[c] = 0;
nb || k.preMainLoop && !1 === k.preMainLoop() || (Qd(a), k.postMainLoop && k.postMainLoop());
b < Ld || ("object" == typeof SDL && SDL.audio && SDL.audio.Gl && SDL.audio.Gl(), Fd())
}
}
},
Sd = a => {
a instanceof ib || "unwind" == a || Za(1, a)
},
Td = a => {
ob = a;
if (!$b) {
if (k.onExit) k.onExit(a);
nb = !0
}
Za(a, new ib(a))
},
Ud = a => {
ob = a;
Td(a)
},
Qd = a => {
if (!nb) try {
if (a(), !$b) try {
ob =
a = ob, Td(a)
} catch (b) {
Sd(b)
}
} catch (b) {
Sd(b)
}
},
Vd = a => {
setTimeout(() => {
Qd(a)
}, 1E4)
},
Ed = !1,
Fd = null,
Ld = 0,
Dd = null,
Bd = 0,
Cd = 0,
Pd = 0,
Md = [],
Od = {},
Gd, Id, Nd, Wd = !1,
Xd = !1,
Yd = [];
function Ac() {
function a() {
Xd = document.pointerLockElement === k.canvas || document.mozPointerLockElement === k.canvas || document.webkitPointerLockElement === k.canvas || document.msPointerLockElement === k.canvas
}
if (!Zd) {
Zd = !0;
yc.push({
canHandle: function(c) {
return !k.nm && /\.(jpg|jpeg|png|bmp)$/i.test(c)
},
handle: function(c, d, e, f) {
var g = new Blob([c], {
type: $d(d)
});
g.size !== c.length && (g = new Blob([(new Uint8Array(c)).buffer], {
type: $d(d)
}));
var h = URL.createObjectURL(g),
n = new Image;
n.onload = () => {
n.complete || lb(`Image could not be decoded`);
var p = document.createElement("canvas");
p.width = n.width;
p.height = n.height;
p.getContext("2d").drawImage(n, 0, 0);
URL.revokeObjectURL(h);
e && e(c)
};
n.onerror = () => {
l(`Image could not be decoded`);
f && f()
};
n.src = h
}
});
yc.push({
canHandle: function(c) {
return !k.mm && c.substr(-4) in {
".ogg": 1,
".wav": 1,
".mp3": 1
}
},
handle: function(c, d, e) {
function f() {
g || (g = !0, e && e(c))
}
var g = !1,
h = URL.createObjectURL(new Blob([c], {
type: $d(d)
})),
n = new Audio;
n.addEventListener("canplaythrough", () => f(n), !1);
n.onerror = function() {
if (!g) {
l(`warning: browser could not fully decode audio , trying slower base64 approach`);
for (var p = "", q = 0, u = 0, w = 0; w < c.length; w++)
for (q = q << 8 | c[w], u += 8; 6 <= u;) {
var r = q >> u - 6 & 63;
u -= 6;
p += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [r]
}
2 == u ? (p += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [(q & 3) << 4], p += "==") : 4 == u && (p += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" [(q & 15) << 2], p += "=");
n.src = "data:audio/x-" + d.substr(-3) + ";base64," + p;
f(n)
}
};
n.src = h;
Vd(() => {
f(n)
})
}
});
var b = k.canvas;
b && (b.requestPointerLock = b.requestPointerLock || b.mozRequestPointerLock ||
b.webkitRequestPointerLock || b.msRequestPointerLock || (() => {}), b.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock || document.msExitPointerLock || (() => {}), b.exitPointerLock = b.exitPointerLock.bind(document), document.addEventListener("pointerlockchange", a, !1), document.addEventListener("mozpointerlockchange", a, !1), document.addEventListener("webkitpointerlockchange", a, !1), document.addEventListener("mspointerlockchange", a, !1), k.elementPointerLock && b.addEventListener("click",
c => {
!Xd && k.canvas.requestPointerLock && (k.canvas.requestPointerLock(), c.preventDefault())
}, !1))
}
}
function ae(a, b, c, d) {
if (b && k.bj && a == k.canvas) return k.bj;
var e;
if (b) {
var f = {
antialias: !1,
alpha: !1,
Pj: "undefined" != typeof WebGL2RenderingContext ? 2 : 1
};
if (d)
for (var g in d) f[g] = d[g];
if ("undefined" != typeof be && (e = ce(a, f))) var h = de[e].Zi
} else h = a.getContext("2d");
if (!h) return null;
c && (b || "undefined" == typeof S || lb("cannot set in module if GLctx is used, but we are a non-GL context that would replace it"), k.bj = h, b && ee(e), k.Ql = b, Yd.forEach(n => n()), Ac());
return h
}
var fe = !1,
ge = void 0,
he = void 0;
function ie(a, b) {
function c() {
Wd = !1;
var f = d.parentNode;
(document.fullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document.webkitFullscreenElement || document.webkitCurrentFullScreenElement) === f ? (d.exitFullscreen = je, ge && d.requestPointerLock(), Wd = !0, he ? ("undefined" != typeof SDL && (E[SDL.screen >> 2] = F[SDL.screen >> 2] | 8388608), ke(k.canvas), le()) : ke(d)) : (f.parentNode.insertBefore(d, f), f.parentNode.removeChild(f), he ? ("undefined" != typeof SDL && (E[SDL.screen >> 2] = F[SDL.screen >> 2] &
-8388609), ke(k.canvas), le()) : ke(d));
if (k.onFullScreen) k.onFullScreen(Wd);
if (k.onFullscreen) k.onFullscreen(Wd)
}
ge = a;
he = b;
"undefined" == typeof ge && (ge = !0);
"undefined" == typeof he && (he = !1);
var d = k.canvas;
fe || (fe = !0, document.addEventListener("fullscreenchange", c, !1), document.addEventListener("mozfullscreenchange", c, !1), document.addEventListener("webkitfullscreenchange", c, !1), document.addEventListener("MSFullscreenChange", c, !1));
var e = document.createElement("div");
d.parentNode.insertBefore(e, d);
e.appendChild(d);
e.requestFullscreen = e.requestFullscreen || e.mozRequestFullScreen || e.msRequestFullscreen || (e.webkitRequestFullscreen ? () => e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : null) || (e.webkitRequestFullScreen ? () => e.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT) : null);
e.requestFullscreen()
}
function je() {
if (!Wd) return !1;
(document.exitFullscreen || document.cancelFullScreen || document.mozCancelFullScreen || document.msExitFullscreen || document.webkitCancelFullScreen || (() => {})).apply(document, []);
return !0
}
var me = 0;
function Jd(a) {
if ("function" == typeof requestAnimationFrame) requestAnimationFrame(a);
else {
var b = Date.now();
if (0 === me) me = b + 1E3 / 60;
else
for (; b + 2 >= me;) me += 1E3 / 60;
setTimeout(a, Math.max(me - b, 0))
}
}
function $d(a) {
return {
jpg: "image/jpeg",
jpeg: "image/jpeg",
png: "image/png",
bmp: "image/bmp",
ogg: "audio/ogg",
wav: "audio/wav",
mp3: "audio/mpeg"
} [a.substr(a.lastIndexOf(".") + 1)]
}
var ne = [];
function le() {
var a = k.canvas;
ne.forEach(b => b(a.width, a.height))
}
function ke(a, b, c) {
b && c ? (a.Tl = b, a.ul = c) : (b = a.Tl, c = a.ul);
var d = b,
e = c;
k.forcedAspectRatio && 0 < k.forcedAspectRatio && (d / e < k.forcedAspectRatio ? d = Math.round(e * k.forcedAspectRatio) : e = Math.round(d / k.forcedAspectRatio));
if ((document.fullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document.webkitFullscreenElement || document.webkitCurrentFullScreenElement) === a.parentNode && "undefined" != typeof screen) {
var f = Math.min(screen.width / d, screen.height / e);
d = Math.round(d * f);
e = Math.round(e *
f)
}
he ? (a.width != d && (a.width = d), a.height != e && (a.height = e), "undefined" != typeof a.style && (a.style.removeProperty("width"), a.style.removeProperty("height"))) : (a.width != b && (a.width = b), a.height != c && (a.height = c), "undefined" != typeof a.style && (d != b || e != c ? (a.style.setProperty("width", d + "px", "important"), a.style.setProperty("height", e + "px", "important")) : (a.style.removeProperty("width"), a.style.removeProperty("height"))))
}
var zc = {},
Zd, T = 12288,
oe = !1,
pe = 0,
qe = 0,
re = 0,
se = {
alpha: !1,
depth: !1,
stencil: !1,
antialias: !1
},
te = {},
ue, ve = a => {
var b = a.getExtension("ANGLE_instanced_arrays");
b && (a.vertexAttribDivisor = (c, d) => b.vertexAttribDivisorANGLE(c, d), a.drawArraysInstanced = (c, d, e, f) => b.drawArraysInstancedANGLE(c, d, e, f), a.drawElementsInstanced = (c, d, e, f, g) => b.drawElementsInstancedANGLE(c, d, e, f, g))
},
we = a => {
var b = a.getExtension("OES_vertex_array_object");
b && (a.createVertexArray = () => b.createVertexArrayOES(), a.deleteVertexArray = c => b.deleteVertexArrayOES(c),
a.bindVertexArray = c => b.bindVertexArrayOES(c), a.isVertexArray = c => b.isVertexArrayOES(c))
},
xe = a => {
var b = a.getExtension("WEBGL_draw_buffers");
b && (a.drawBuffers = (c, d) => b.drawBuffersWEBGL(c, d))
},
ye = a => {
a.gm = a.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")
},
ze = a => {
a.lm = a.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")
},
Ae = 1,
Be = [],
Ce = {},
V = [],
De = [],
Ee = [],
Fe = [],
Ge = [],
He = [],
de = [],
Ie = [],
Je = [],
Ke = [],
Le = [],
Me = [1, 1, 2, 2, 4, 4, 4, 2, 3, 4, 8],
Ne = {},
Oe = {},
Pe = 4;
function W(a) {
Qe || (Qe = a)
}
var Re = a => {
for (var b = Ae++, c = a.length; c < b; c++) a[c] = null;
return b
};
function Se(a) {
Te = !1;
for (var b = 0; b < R.Sk; ++b) {
var c = R.kj[b];
if (c.Gj && c.enabled) {
Te = !0;
var d = c.Yj;
d = 0 < d ? a * d : c.size * Me[c.type - 5120] * a;
var e = 32 - Math.clz32(0 === d ? 0 : d - 1);
var f = R.Dj[e],
g = R.pj[e];
R.pj[e] = R.pj[e] + 1 & 63;
var h = f[g];
h ? e = h : (h = S.getParameter(34964), f[g] = S.createBuffer(), S.bindBuffer(34962, f[g]), S.bufferData(34962, 1 << e, 35048), S.bindBuffer(34962, h), e = f[g]);
S.bindBuffer(34962, e);
S.bufferSubData(34962, 0, v.subarray(c.Ij, c.Ij + d));
c.Dk.call(S, b, c.size, c.type, c.pk, c.Yj, 0)
}
}
}
var ce = (a, b) => {
a.ck || (a.ck = a.getContext, a.getContext = function(d, e) {
e = a.ck(d, e);
return "webgl" == d == e instanceof WebGLRenderingContext ? e : null
});
var c = 1 < b.Pj ? a.getContext("webgl2", b) : a.getContext("webgl", b);
return c ? Ue(c, b) : 0
},
Ue = (a, b) => {
var c = Re(de),
d = {
handle: c,
attributes: b,
version: b.Pj,
Zi: a
};
a.canvas && (a.canvas.Ej = d);
de[c] = d;
("undefined" == typeof b.gk || b.gk) && Ve(d);
d.Sk = d.Zi.getParameter(34921);
d.kj = [];
for (a = 0; a < d.Sk; a++) d.kj[a] = {
enabled: !1,
Gj: !1,
size: 0,
type: 0,
pk: 0,
Yj: 0,
Ij: 0,
Dk: null
};
d.pj = [];
d.Zj = [];
d.pj.length = d.Zj.length = 22;
d.Dj = [];
d.Kj = [];
d.Dj.length = d.Kj.length = 22;
d.Cj = [];
d.Cj.length = 22;
for (a = 0; 21 >= a; ++a) {
d.Cj[a] = null;
d.pj[a] = d.Zj[a] = 0;
d.Dj[a] = [];
d.Kj[a] = [];
b = d.Dj[a];
var e = d.Kj[a];
b.length = e.length = 64;
for (var f = 0; 64 > f; ++f) b[f] = e[f] = null
}
return c
},
ee = a => {
R = de[a];
k.bj = S = R && R.Zi;
return !(a && !S)
},
Ve = a => {
a || (a = R);
if (!a.wl) {
a.wl = !0;
var b = a.Zi;
ve(b);
we(b);
xe(b);
ye(b);
ze(b);
2 <= a.version && (b.aj = b.getExtension("EXT_disjoint_timer_query_webgl2"));
if (2 > a.version || !b.aj) b.aj = b.getExtension("EXT_disjoint_timer_query");
b.El = b.getExtension("WEBGL_multi_draw");
(b.getSupportedExtensions() || []).forEach(c => {
c.includes("lose_context") || c.includes("debug") || b.getExtension(c)
})
}
},
be = {},
Qe, R, Te, We = [],
Xe = (a, b) => {
We.length = 0;
for (var c; c = v[a++];) {
var d = 105 != c;
d &= 112 != c;
b += d && b % 8 ? 4 : 0;
We.push(112 == c ? F[b >> 2] : 105 == c ? E[b >> 2] : rb[b >> 3]);
b += d ? 8 : 4
}
return We
},
Ye = (a, b, c) => {
b = Xe(b, c);
return Vb[a].apply(null, b)
},
Ze = {},
$e = 0;
function af() {
var a = $e;
$e++;
return a
}
var df = a => {
var b = bf();
a = a();
cf(b);
return a
},
ef = 0;
function ff() {
for (var a = gf.length - 1; 0 <= a; --a) hf(a);
gf = [];
jf = []
}
var jf = [];
function kf(a, b, c) {
function d(g, h) {
if (g.length != h.length) return !1;
for (var n in g)
if (g[n] != h[n]) return !1;
return !0
}
for (var e in jf) {
var f = jf[e];
if (f.Ak == a && d(f.Gk, c)) return
}
jf.push({
Ak: a,
Xk: b,
Gk: c
});
jf.sort((g, h) => g.Xk < h.Xk)
}
function lf(a) {
for (var b = 0; b < jf.length; ++b) jf[b].Ak == a && (jf.splice(b, 1), --b)
}
function mf() {
return navigator.userActivation ? navigator.userActivation.isActive : ef && nf.Fj
}
function of() {
if (mf())
for (var a = 0; a < jf.length; ++a) {
var b = jf[a];
jf.splice(a, 1);
--a;
b.Ak.apply(null, b.Gk)
}
}
var gf = [];
function hf(a) {
var b = gf[a];
b.target.removeEventListener(b.Ti, b.ol, b.Wi);
gf.splice(a, 1)
}
function pf(a) {
function b(d) {
++ef;
nf = a;
of();
a.Yi(d);
of();
--ef
}
if (!a.target) return -4;
if (a.Xi) a.ol = b, a.target.addEventListener(a.Ti, b, a.Wi), gf.push(a), qf || (wb.push(ff), qf = !0);
else
for (var c = 0; c < gf.length; ++c) gf[c].target == a.target && gf[c].Ti == a.Ti && hf(c--);
return 0
}
function rf(a) {
return a ? a == window ? "#window" : a == screen ? "#screen" : a && a.nodeName ? a.nodeName : "" : ""
}
function sf() {
return document.fullscreenEnabled || document.webkitFullscreenEnabled
}
var tf = {},
qf, nf, uf, vf, wf, xf, yf, zf, Af, Bf, Cf, Df, Ef, Ff, Gf = {},
Hf = [0, "undefined" != typeof document ? document : 0, "undefined" != typeof window ? window : 0],
If = a => {
a = 2 < a ? a ? x(v, a) : "" : a;
return Hf[a] || ("undefined" != typeof document ? document.querySelector(a) : void 0)
},
Jf = (a, b, c) => {
a = If(a);
if (!a) return -4;
E[b >> 2] = a.width;
E[c >> 2] = a.height
},
Lf = a => {
var b = aa(a) + 1,
c = Kf(b);
t(a, v, c, b);
return c
},
Mf = a => df(() => {
var b = Kf(8),
c = b + 4,
d = Lf(a.id);
Jf(d, b, c);
return [E[b >> 2], E[c >> 2]]
}),
Nf = (a, b, c) => {
a = If(a);
if (!a) return -4;
a.width = b;
a.height =
c;
return 0
},
Of = (a, b, c) => {
a.em ? df(() => {
var d = Lf(a.id);
Nf(d, b, c)
}) : (a.width = b, a.height = c)
},
Pf = a => {
function b() {
document.fullscreenElement || document.webkitFullscreenElement || (document.removeEventListener("fullscreenchange", b), document.removeEventListener("webkitfullscreenchange", b), Of(a, d, e), a.style.width = f, a.style.height = g, a.style.backgroundColor = h, n || (document.body.style.backgroundColor = "white"), document.body.style.backgroundColor = n, a.style.paddingLeft = p, a.style.paddingRight = q, a.style.paddingTop = u,
a.style.paddingBottom = w, a.style.marginLeft = r, a.style.marginRight = B, a.style.marginTop = y, a.style.marginBottom = G, document.body.style.margin = L, document.documentElement.style.overflow = O, document.body.scroll = A, a.style.mj = P, a.Ej && a.Ej.Zi.viewport(0, 0, d, e), Gf.Oj && M(Gf.Oj)(37, 0, Gf.Jk))
}
var c = Mf(a),
d = c[0],
e = c[1],
f = a.style.width,
g = a.style.height,
h = a.style.backgroundColor,
n = document.body.style.backgroundColor,
p = a.style.paddingLeft,
q = a.style.paddingRight,
u = a.style.paddingTop,
w = a.style.paddingBottom,
r = a.style.marginLeft,
B = a.style.marginRight,
y = a.style.marginTop,
G = a.style.marginBottom,
L = document.body.style.margin,
O = document.documentElement.style.overflow,
A = document.body.scroll,
P = a.style.mj;
document.addEventListener("fullscreenchange", b);
document.addEventListener("webkitfullscreenchange", b)
},
Qf = (a, b, c) => {
a.style.paddingLeft = a.style.paddingRight = c + "px";
a.style.paddingTop = a.style.paddingBottom = b + "px"
},
Rf = a => 0 > Hf.indexOf(a) ? a.getBoundingClientRect() : {
left: 0,
top: 0
},
Sf = (a, b) => {
if (0 != b.wk || 0 != b.dk) {
Pf(a);
var c = b.Kl ? innerWidth :
screen.width,
d = b.Kl ? innerHeight : screen.height,
e = Rf(a),
f = e.width;
e = e.height;
var g = Mf(a),
h = g[0];
g = g[1];
3 == b.wk ? (Qf(a, (d - e) / 2, (c - f) / 2), c = f, d = e) : 2 == b.wk && (c * g < h * d ? (f = g * c / h, Qf(a, (d - f) / 2, 0), d = f) : (f = h * d / g, Qf(a, 0, (c - f) / 2), c = f));
a.style.backgroundColor || (a.style.backgroundColor = "black");
document.body.style.backgroundColor || (document.body.style.backgroundColor = "black");
a.style.width = c + "px";
a.style.height = d + "px";
1 == b.ql && (a.style.mj = "optimizeSpeed", a.style.mj = "-moz-crisp-edges", a.style.mj = "-o-crisp-edges", a.style.mj =
"-webkit-optimize-contrast", a.style.mj = "optimize-contrast", a.style.mj = "crisp-edges", a.style.mj = "pixelated");
f = 2 == b.dk ? devicePixelRatio : 1;
0 != b.dk && (c = c * f | 0, d = d * f | 0, Of(a, c, d), a.Ej && a.Ej.Zi.viewport(0, 0, c, d))
}
if (a.requestFullscreen) a.requestFullscreen();
else if (a.webkitRequestFullscreen) a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
else return sf() ? -3 : -1;
Gf = b;
b.Oj && M(b.Oj)(37, 0, b.Jk);
return 0
},
Tf = a => {
if (a.requestPointerLock) a.requestPointerLock();
else return document.body.requestPointerLock ?
-3 : -1;
return 0
},
Uf = (a, b) => {
rb[a >> 3] = b.timestamp;
for (var c = 0; c < b.axes.length; ++c) rb[a + 8 * c + 16 >> 3] = b.axes[c];
for (c = 0; c < b.buttons.length; ++c) rb[a + 8 * c + 528 >> 3] = "object" == typeof b.buttons[c] ? b.buttons[c].value : b.buttons[c];
for (c = 0; c < b.buttons.length; ++c) E[a + 4 * c + 1040 >> 2] = "object" == typeof b.buttons[c] ? b.buttons[c].pressed : 1 == b.buttons[c];
E[a + 1296 >> 2] = b.connected;
E[a + 1300 >> 2] = b.index;
E[a + 8 >> 2] = b.axes.length;
E[a + 12 >> 2] = b.buttons.length;
t(b.id, v, a + 1304, 64);
t(b.mapping, v, a + 1368, 64)
};
function Vf(a) {
S.activeTexture(a)
}
var Wf = (a, b) => {
S.attachShader(V[a], Ge[b])
},
Xf = (a, b) => {
34962 == a ? S.zj = b : 34963 == a && (S.Hj = b);
35051 == a ? S.fk = b : 35052 == a && (S.cj = b);
S.bindBuffer(a, Be[b])
},
Yf = (a, b) => {
S.bindFramebuffer(a, De[b])
},
Zf = (a, b) => {
S.bindRenderbuffer(a, Ee[b])
},
$f = (a, b) => {
S.bindTexture(a, Fe[b])
},
ag = a => {
S.bindVertexArray(He[a]);
a = S.getParameter(34965);
S.Hj = a ? a.name | 0 : 0
};
function bg(a, b) {
S.blendEquationSeparate(a, b)
}
function cg(a, b) {
S.blendFunc(a, b)
}
function dg(a, b, c, d) {
S.blendFuncSeparate(a, b, c, d)
}
var eg = (a, b, c, d) => {
2 <= R.version ? c && b ? S.bufferData(a, v, d, c, b) : S.bufferData(a, b, d) : S.bufferData(a, c ? v.subarray(c, c + b) : b, d)
};
function fg(a) {
return S.checkFramebufferStatus(a)
}
function gg(a) {
S.clear(a)
}
function hg(a, b, c, d) {
S.clearColor(a, b, c, d)
}
function ig(a) {
S.clearDepth(a)
}
function jg(a) {
S.clearStencil(a)
}
var kg = (a, b, c, d) => {
S.colorMask(!!a, !!b, !!c, !!d)
},
lg = a => {
S.compileShader(Ge[a])
},
mg = (a, b, c, d, e, f, g, h) => {
2 <= R.version ? S.cj || !g ? S.compressedTexImage2D(a, b, c, d, e, f, g, h) : S.compressedTexImage2D(a, b, c, d, e, f, v, h, g) : S.compressedTexImage2D(a, b, c, d, e, f, h ? v.subarray(h, h + g) : null)
},
ng = () => {
var a = Re(V),
b = S.createProgram();
b.name = a;
b.Sj = b.Qj = b.Rj = 0;
b.Ck = 1;
V[a] = b;
return a
},
og = a => {
var b = Re(Ge);
Ge[b] = S.createShader(a);
return b
},
pg = (a, b) => {
for (var c = 0; c < a; c++) {
var d = E[b + 4 * c >> 2],
e = Be[d];
e && (S.deleteBuffer(e), e.name = 0,
Be[d] = null, d == S.zj && (S.zj = 0), d == S.Hj && (S.Hj = 0), d == S.fk && (S.fk = 0), d == S.cj && (S.cj = 0))
}
},
qg = (a, b) => {
for (var c = 0; c < a; ++c) {
var d = E[b + 4 * c >> 2],
e = De[d];
e && (S.deleteFramebuffer(e), e.name = 0, De[d] = null)
}
},
rg = a => {
if (a) {
var b = V[a];
b ? (S.deleteProgram(b), b.name = 0, V[a] = null) : W(1281)
}
},
sg = (a, b) => {
for (var c = 0; c < a; c++) {
var d = E[b + 4 * c >> 2],
e = Ee[d];
e && (S.deleteRenderbuffer(e), e.name = 0, Ee[d] = null)
}
},
tg = a => {
if (a) {
var b = Ge[a];
b ? (S.deleteShader(b), Ge[a] = null) : W(1281)
}
},
ug = (a, b) => {
for (var c = 0; c < a; c++) {
var d = E[b + 4 * c >> 2],
e = Fe[d];
e && (S.deleteTexture(e), e.name = 0, Fe[d] = null)
}
},
vg = (a, b) => {
for (var c = 0; c < a; c++) {
var d = E[b + 4 * c >> 2];
S.deleteVertexArray(He[d]);
He[d] = null
}
};
function wg(a) {
S.depthFunc(a)
}
var xg = a => {
S.depthMask(!!a)
};
function yg(a, b) {
S.depthRange(a, b)
}
function zg(a) {
S.disable(a)
}
var Ag = a => {
R.kj[a].enabled = !1;
S.disableVertexAttribArray(a)
},
Bg = (a, b, c) => {
Se(b + c);
S.drawArrays(a, b, c);
Te && S.bindBuffer(34962, Be[S.zj])
},
Cg = (a, b, c, d) => {
S.drawArraysInstanced(a, b, c, d)
},
Dg = [],
Eg = (a, b) => {
for (var c = Dg[a], d = 0; d < a; d++) c[d] = E[b + 4 * d >> 2];
S.drawBuffers(c)
},
Fg = (a, b, c, d) => {
if (!S.Hj) {
var e = 1 * Me[c - 5120] * b;
var f = 32 - Math.clz32(0 === e ? 0 : e - 1);
var g = R.Cj[f];
g ? f = g : (g = S.getParameter(34965), R.Cj[f] = S.createBuffer(), S.bindBuffer(34963, R.Cj[f]), S.bufferData(34963, 1 << f, 35048), S.bindBuffer(34963, g), f = R.Cj[f]);
S.bindBuffer(34963, f);
S.bufferSubData(34963, 0, v.subarray(d, d + e));
d = 0
}
Se(b);
S.drawElements(a, b, c, d);
Te && S.bindBuffer(34962, Be[S.zj]);
S.Hj || S.bindBuffer(34963, null)
},
Gg = (a, b, c, d, e) => {
S.drawElementsInstanced(a, b, c, d, e)
};
function Hg(a) {
S.enable(a)
}
var Ig = a => {
R.kj[a].enabled = !0;
S.enableVertexAttribArray(a)
};
function Jg() {
S.flush()
}
var Kg = a => {
switch (a) {
case 34962:
a = 34964;
break;
case 34963:
a = 34965;
break;
case 35051:
a = 35053;
break;
case 35052:
a = 35055;
break;
case 35982:
a = 35983;
break;
case 36662:
a = 36662;
break;
case 36663:
a = 36663;
break;
case 35345:
a = 35368
}
return (a = S.getParameter(a)) ? a.name | 0 : 0
},
Lg = a => {
switch (a) {
case 34962:
case 34963:
case 36662:
case 36663:
case 35051:
case 35052:
case 35882:
case 35982:
case 35345:
return !0;
default:
return !1
}
},
Mg = (a, b, c, d) => {
S.framebufferRenderbuffer(a, b, c, Ee[d])
},
Ng = (a, b, c, d, e) => {
S.framebufferTexture2D(a, b, c, Fe[d],
e)
};
function Og(a) {
S.frontFace(a)
}
var Pg = (a, b, c, d) => {
for (var e = 0; e < a; e++) {
var f = S[c](),
g = f && Re(d);
f ? (f.name = g, d[g] = f) : W(1282);
E[b + 4 * e >> 2] = g
}
},
Qg = (a, b) => {
Pg(a, b, "createBuffer", Be)
},
Rg = (a, b) => {
Pg(a, b, "createFramebuffer", De)
},
Sg = (a, b) => {
Pg(a, b, "createRenderbuffer", Ee)
},
Tg = (a, b) => {
Pg(a, b, "createTexture", Fe)
};
function Ug(a, b) {
Pg(a, b, "createVertexArray", He)
}
var Vg = (a, b, c, d, e, f, g, h) => {
b = V[b];
if (a = S[a](b, c)) d = h && t(a.name, v, h, d), e && (E[e >> 2] = d), f && (E[f >> 2] = a.size), g && (E[g >> 2] = a.type)
},
Wg = (a, b, c, d, e, f, g) => {
Vg("getActiveUniform", a, b, c, d, e, f, g)
},
Xg = (a, b) => S.getAttribLocation(V[a], b ? x(v, b) : ""),
Yg = (a, b) => {
F[a >> 2] = b;
F[a + 4 >> 2] = (b - F[a >> 2]) / 4294967296
},
Zg = (a, b, c) => {
if (b) {
var d = void 0;
switch (a) {
case 36346:
d = 1;
break;
case 36344:
0 != c && 1 != c && W(1280);
return;
case 34814:
case 36345:
d = 0;
break;
case 34466:
var e = S.getParameter(34467);
d = e ? e.length : 0;
break;
case 33309:
if (2 > R.version) {
W(1282);
return
}
d = 2 * (S.getSupportedExtensions() || []).length;
break;
case 33307:
case 33308:
if (2 > R.version) {
W(1280);
return
}
d = 33307 == a ? 3 : 0
}
if (void 0 === d) switch (e = S.getParameter(a), typeof e) {
case "number":
d = e;
break;
case "boolean":
d = e ? 1 : 0;
break;
case "string":
W(1280);
return;
case "object":
if (null === e) switch (a) {
case 34964:
case 35725:
case 34965:
case 36006:
case 36007:
case 32873:
case 34229:
case 36662:
case 36663:
case 35053:
case 35055:
case 36010:
case 35097:
case 35869:
case 32874:
case 36389:
case 35983:
case 35368:
case 34068:
d =
0;
break;
default:
W(1280);
return
} else {
if (e instanceof Float32Array || e instanceof Uint32Array || e instanceof Int32Array || e instanceof Array) {
for (a = 0; a < e.length; ++a) switch (c) {
case 0:
E[b + 4 * a >> 2] = e[a];
break;
case 2:
H[b + 4 * a >> 2] = e[a];
break;
case 4:
D[b + a >> 0] = e[a] ? 1 : 0
}
return
}
try {
d = e.name | 0
} catch (f) {
W(1280);
l("GL_INVALID_ENUM in glGet" + c + "v: Unknown object returned from WebGL getParameter(" + a + ")! (error: " + f + ")");
return
}
}
break;
default:
W(1280);
l("GL_INVALID_ENUM in glGet" + c + "v: Native code calling glGet" + c + "v(" +
a + ") and it returns " + e + " of type " + typeof e + "!");
return
}
switch (c) {
case 1:
Yg(b, d);
break;
case 0:
E[b >> 2] = d;
break;
case 2:
H[b >> 2] = d;
break;
case 4:
D[b >> 0] = d ? 1 : 0
}
} else W(1281)
},
$g = () => {
var a = S.getError() || Qe;
Qe = 0;
return a
},
ah = (a, b) => {
Zg(a, b, 2)
},
bh = (a, b, c, d) => {
if (c) {
b = S.getIndexedParameter(a, b);
switch (typeof b) {
case "boolean":
a = b ? 1 : 0;
break;
case "number":
a = b;
break;
case "object":
if (null === b) switch (a) {
case 35983:
case 35368:
a = 0;
break;
default:
W(1280);
return
} else if (b instanceof WebGLBuffer) a = b.name | 0;
else {
W(1280);
return
} break;
default:
W(1280);
return
}
switch (d) {
case 1:
Yg(c, a);
break;
case 0:
E[c >> 2] = a;
break;
case 2:
H[c >> 2] = a;
break;
case 4:
D[c >> 0] = a ? 1 : 0;
break;
default:
throw "internal emscriptenWebGLGetIndexed() error, bad type: " + d;
}
} else W(1281)
},
ch = (a, b) => {
Zg(a, b, 0)
},
dh = (a, b, c, d) => {
a = S.getProgramInfoLog(V[a]);
null === a && (a = "(unknown error)");
b = 0 < b && d ? t(a, v, d, b) : 0;
c && (E[c >> 2] = b)
},
eh = (a, b, c) => {
if (c)
if (a >= Ae) W(1281);
else if (a = V[a], 35716 == b) a = S.getProgramInfoLog(a), null === a && (a = "(unknown error)"), E[c >> 2] = a.length + 1;
else if (35719 ==
b) {
if (!a.Sj)
for (b = 0; b < S.getProgramParameter(a, 35718); ++b) a.Sj = Math.max(a.Sj, S.getActiveUniform(a, b).name.length + 1);
E[c >> 2] = a.Sj
} else if (35722 == b) {
if (!a.Qj)
for (b = 0; b < S.getProgramParameter(a, 35721); ++b) a.Qj = Math.max(a.Qj, S.getActiveAttrib(a, b).name.length + 1);
E[c >> 2] = a.Qj
} else if (35381 == b) {
if (!a.Rj)
for (b = 0; b < S.getProgramParameter(a, 35382); ++b) a.Rj = Math.max(a.Rj, S.getActiveUniformBlockName(a, b).length + 1);
E[c >> 2] = a.Rj
} else E[c >> 2] = S.getProgramParameter(a, b);
else W(1281)
},
fh = (a, b, c) => {
if (c) {
a = Ie[a];
b = 2 >
R.version ? S.aj.getQueryObjectEXT(a, b) : S.getQueryParameter(a, b);
var d;
"boolean" == typeof b ? d = b ? 1 : 0 : d = b;
Yg(c, d)
} else W(1281)
},
gh = (a, b, c) => {
if (c) {
a = S.aj.getQueryObjectEXT(Ie[a], b);
var d;
"boolean" == typeof a ? d = a ? 1 : 0 : d = a;
E[c >> 2] = d
} else W(1281)
},
hh = (a, b, c, d) => {
a = S.getShaderInfoLog(Ge[a]);
null === a && (a = "(unknown error)");
b = 0 < b && d ? t(a, v, d, b) : 0;
c && (E[c >> 2] = b)
},
ih = (a, b, c) => {
c ? 35716 == b ? (a = S.getShaderInfoLog(Ge[a]), null === a && (a = "(unknown error)"), E[c >> 2] = a ? a.length + 1 : 0) : 35720 == b ? (a = S.getShaderSource(Ge[a]), E[c >>
2] = a ? a.length + 1 : 0) : E[c >> 2] = S.getShaderParameter(Ge[a], b) : W(1281)
},
jh = a => {
var b = Ne[a];
if (!b) {
switch (a) {
case 7939:
b = S.getSupportedExtensions() || [];
b = b.concat(b.map(d => "GL_" + d));
b = Ka(b.join(" "));
break;
case 7936:
case 7937:
case 37445:
case 37446:
(b = S.getParameter(a)) || W(1280);
b = b && Ka(b);
break;
case 7938:
b = S.getParameter(7938);
b = 2 <= R.version ? "OpenGL ES 3.0 (" + b + ")" : "OpenGL ES 2.0 (" + b + ")";
b = Ka(b);
break;
case 35724:
b = S.getParameter(35724);
var c = b.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);
null !==
c && (3 == c[1].length && (c[1] += "0"), b = "OpenGL ES GLSL ES " + c[1] + " (" + b + ")");
b = Ka(b);
break;
default:
W(1280)
}
Ne[a] = b
}
return b
},
kh = a => "]" == a.slice(-1) && a.lastIndexOf("["),
lh = a => {
var b = a.Lj,
c = a.$k,
d;
if (!b)
for (a.Lj = b = {}, a.Zk = {}, d = 0; d < S.getProgramParameter(a, 35718); ++d) {
var e = S.getActiveUniform(a, d);
var f = e.name;
e = e.size;
var g = kh(f);
g = 0 < g ? f.slice(0, g) : f;
var h = a.Ck;
a.Ck += e;
c[g] = [e, h];
for (f = 0; f < e; ++f) b[h] = f, a.Zk[h++] = g
}
},
mh = (a, b) => {
b = b ? x(v, b) : "";
if (a = V[a]) {
lh(a);
var c = a.Lj,
d = 0,
e = b,
f = kh(b);
0 < f && (d = parseInt(b.slice(f +
1)) >>> 0, e = b.slice(0, f));
if ((e = a.$k[e]) && d < e[0] && (d += e[1], c[d] = c[d] || S.getUniformLocation(a, b))) return d
} else W(1281);
return -1
},
X = a => {
var b = S.hl;
if (b) {
var c = b.Lj[a];
"number" == typeof c && (b.Lj[a] = c = S.getUniformLocation(b, b.Zk[a] + (0 < c ? "[" + c + "]" : "")));
return c
}
W(1282)
},
nh = (a, b, c, d) => {
if (c)
if (a = V[a], lh(a), a = S.getUniform(a, X(b)), "number" == typeof a || "boolean" == typeof a) switch (d) {
case 0:
E[c >> 2] = a;
break;
case 2:
H[c >> 2] = a
} else
for (b = 0; b < a.length; b++) switch (d) {
case 0:
E[c + 4 * b >> 2] = a[b];
break;
case 2:
H[c + 4 * b >> 2] =
a[b]
} else W(1281)
},
oh = (a, b, c, d) => {
if (c)
if (R.kj[a].enabled && l("glGetVertexAttrib*v on client-side array: not supported, bad data returned"), a = S.getVertexAttrib(a, b), 34975 == b) E[c >> 2] = a && a.name;
else if ("number" == typeof a || "boolean" == typeof a) switch (d) {
case 0:
E[c >> 2] = a;
break;
case 2:
H[c >> 2] = a;
break;
case 5:
E[c >> 2] = Math.fround(a)
} else
for (b = 0; b < a.length; b++) switch (d) {
case 0:
E[c + 4 * b >> 2] = a[b];
break;
case 2:
H[c + 4 * b >> 2] = a[b];
break;
case 5:
E[c + 4 * b >> 2] = Math.fround(a[b])
} else W(1281)
},
ph = (a, b, c) => {
oh(a, b, c, 0)
},
qh =
a => (a = He[a]) ? S.isVertexArray(a) : 0,
rh = a => {
a = V[a];
S.linkProgram(a);
a.Lj = 0;
a.$k = {}
},
sh = (a, b) => {
3317 == a && (Pe = b);
S.pixelStorei(a, b)
},
th = a => {
a -= 5120;
return 0 == a ? D : 1 == a ? v : 2 == a ? pb : 4 == a ? E : 6 == a ? H : 5 == a || 28922 == a || 28520 == a || 30779 == a || 30782 == a ? F : qb
},
uh = (a, b, c, d, e) => {
a = th(a);
var f = 31 - Math.clz32(a.BYTES_PER_ELEMENT),
g = Pe;
return a.subarray(e >> f, e + d * (c * ({
5: 3,
6: 4,
8: 2,
29502: 3,
29504: 4,
26917: 2,
26918: 2,
29846: 3,
29847: 4
} [b - 6402] || 1) * (1 << f) + g - 1 & -g) >> f)
},
vh = (a, b, c, d, e, f, g) => {
if (2 <= R.version)
if (S.fk) S.readPixels(a, b, c, d, e,
f, g);
else {
var h = th(f);
S.readPixels(a, b, c, d, e, f, h, g >> 31 - Math.clz32(h.BYTES_PER_ELEMENT))
}
else(g = uh(f, e, c, d, g)) ? S.readPixels(a, b, c, d, e, f, g) : W(1280)
};
function wh(a, b, c, d) {
S.renderbufferStorage(a, b, c, d)
}
function xh(a, b, c, d) {
S.scissor(a, b, c, d)
}
var yh = (a, b, c, d) => {
for (var e = "", f = 0; f < b; ++f) {
var g = d ? E[d + 4 * f >> 2] : -1;
e += td(E[c + 4 * f >> 2], 0 > g ? void 0 : g)
}
S.shaderSource(Ge[a], e)
};
function zh(a, b, c) {
S.stencilFunc(a, b, c)
}
function Ah(a) {
S.stencilMask(a)
}
function Bh(a, b, c) {
S.stencilOp(a, b, c)
}
var Ch = (a, b, c, d, e, f, g, h, n) => {
if (2 <= R.version)
if (S.cj) S.texImage2D(a, b, c, d, e, f, g, h, n);
else if (n) {
var p = th(h);
S.texImage2D(a, b, c, d, e, f, g, h, p, n >> 31 - Math.clz32(p.BYTES_PER_ELEMENT))
} else S.texImage2D(a, b, c, d, e, f, g, h, null);
else S.texImage2D(a, b, c, d, e, f, g, h, n ? uh(h, g, d, e, n) : null)
};
function Dh(a, b, c) {
S.texParameterf(a, b, c)
}
var Eh = (a, b, c, d, e, f, g, h, n) => {
if (2 <= R.version)
if (S.cj) S.texSubImage2D(a, b, c, d, e, f, g, h, n);
else if (n) {
var p = th(h);
S.texSubImage2D(a, b, c, d, e, f, g, h, p, n >> 31 - Math.clz32(p.BYTES_PER_ELEMENT))
} else S.texSubImage2D(a, b, c, d, e, f, g, h, null);
else p = null, n && (p = uh(h, g, e, f, n)), S.texSubImage2D(a, b, c, d, e, f, g, h, p)
},
Fh = (a, b) => {
S.uniform1f(X(a), b)
},
Gh = [],
Hh = (a, b, c) => {
if (2 <= R.version) b && S.uniform1fv(X(a), H, c >> 2, b);
else {
if (288 >= b)
for (var d = Gh[b - 1], e = 0; e < b; ++e) d[e] = H[c + 4 * e >> 2];
else d = H.subarray(c >> 2, c + 4 * b >> 2);
S.uniform1fv(X(a),
d)
}
},
Ih = (a, b) => {
S.uniform1i(X(a), b)
},
Jh = [],
Kh = (a, b, c) => {
if (2 <= R.version) b && S.uniform1iv(X(a), E, c >> 2, b);
else {
if (288 >= b)
for (var d = Jh[b - 1], e = 0; e < b; ++e) d[e] = E[c + 4 * e >> 2];
else d = E.subarray(c >> 2, c + 4 * b >> 2);
S.uniform1iv(X(a), d)
}
},
Lh = (a, b, c) => {
if (2 <= R.version) b && S.uniform2fv(X(a), H, c >> 2, 2 * b);
else {
if (144 >= b)
for (var d = Gh[2 * b - 1], e = 0; e < 2 * b; e += 2) d[e] = H[c + 4 * e >> 2], d[e + 1] = H[c + (4 * e + 4) >> 2];
else d = H.subarray(c >> 2, c + 8 * b >> 2);
S.uniform2fv(X(a), d)
}
},
Mh = (a, b, c) => {
if (2 <= R.version) b && S.uniform2iv(X(a), E, c >> 2, 2 * b);
else {
if (144 >=
b)
for (var d = Jh[2 * b - 1], e = 0; e < 2 * b; e += 2) d[e] = E[c + 4 * e >> 2], d[e + 1] = E[c + (4 * e + 4) >> 2];
else d = E.subarray(c >> 2, c + 8 * b >> 2);
S.uniform2iv(X(a), d)
}
},
Nh = (a, b, c) => {
if (2 <= R.version) b && S.uniform3fv(X(a), H, c >> 2, 3 * b);
else {
if (96 >= b)
for (var d = Gh[3 * b - 1], e = 0; e < 3 * b; e += 3) d[e] = H[c + 4 * e >> 2], d[e + 1] = H[c + (4 * e + 4) >> 2], d[e + 2] = H[c + (4 * e + 8) >> 2];
else d = H.subarray(c >> 2, c + 12 * b >> 2);
S.uniform3fv(X(a), d)
}
},
Oh = (a, b, c) => {
if (2 <= R.version) b && S.uniform3iv(X(a), E, c >> 2, 3 * b);
else {
if (96 >= b)
for (var d = Jh[3 * b - 1], e = 0; e < 3 * b; e += 3) d[e] = E[c + 4 * e >> 2], d[e + 1] = E[c +
(4 * e + 4) >> 2], d[e + 2] = E[c + (4 * e + 8) >> 2];
else d = E.subarray(c >> 2, c + 12 * b >> 2);
S.uniform3iv(X(a), d)
}
},
Ph = (a, b, c) => {
if (2 <= R.version) b && S.uniform4fv(X(a), H, c >> 2, 4 * b);
else {
if (72 >= b) {
var d = Gh[4 * b - 1],
e = H;
c >>= 2;
for (var f = 0; f < 4 * b; f += 4) {
var g = c + f;
d[f] = e[g];
d[f + 1] = e[g + 1];
d[f + 2] = e[g + 2];
d[f + 3] = e[g + 3]
}
} else d = H.subarray(c >> 2, c + 16 * b >> 2);
S.uniform4fv(X(a), d)
}
},
Qh = (a, b, c) => {
if (2 <= R.version) b && S.uniform4iv(X(a), E, c >> 2, 4 * b);
else {
if (72 >= b)
for (var d = Jh[4 * b - 1], e = 0; e < 4 * b; e += 4) d[e] = E[c + 4 * e >> 2], d[e + 1] = E[c + (4 * e + 4) >> 2], d[e + 2] = E[c +
(4 * e + 8) >> 2], d[e + 3] = E[c + (4 * e + 12) >> 2];
else d = E.subarray(c >> 2, c + 16 * b >> 2);
S.uniform4iv(X(a), d)
}
},
Rh = (a, b, c, d) => {
if (2 <= R.version) b && S.uniformMatrix2fv(X(a), !!c, H, d >> 2, 4 * b);
else {
if (72 >= b)
for (var e = Gh[4 * b - 1], f = 0; f < 4 * b; f += 4) e[f] = H[d + 4 * f >> 2], e[f + 1] = H[d + (4 * f + 4) >> 2], e[f + 2] = H[d + (4 * f + 8) >> 2], e[f + 3] = H[d + (4 * f + 12) >> 2];
else e = H.subarray(d >> 2, d + 16 * b >> 2);
S.uniformMatrix2fv(X(a), !!c, e)
}
},
Sh = (a, b, c, d) => {
if (2 <= R.version) b && S.uniformMatrix3fv(X(a), !!c, H, d >> 2, 9 * b);
else {
if (32 >= b)
for (var e = Gh[9 * b - 1], f = 0; f < 9 * b; f += 9) e[f] = H[d +
4 * f >> 2], e[f + 1] = H[d + (4 * f + 4) >> 2], e[f + 2] = H[d + (4 * f + 8) >> 2], e[f + 3] = H[d + (4 * f + 12) >> 2], e[f + 4] = H[d + (4 * f + 16) >> 2], e[f + 5] = H[d + (4 * f + 20) >> 2], e[f + 6] = H[d + (4 * f + 24) >> 2], e[f + 7] = H[d + (4 * f + 28) >> 2], e[f + 8] = H[d + (4 * f + 32) >> 2];
else e = H.subarray(d >> 2, d + 36 * b >> 2);
S.uniformMatrix3fv(X(a), !!c, e)
}
},
Th = (a, b, c, d) => {
if (2 <= R.version) b && S.uniformMatrix4fv(X(a), !!c, H, d >> 2, 16 * b);
else {
if (18 >= b) {
var e = Gh[16 * b - 1],
f = H;
d >>= 2;
for (var g = 0; g < 16 * b; g += 16) {
var h = d + g;
e[g] = f[h];
e[g + 1] = f[h + 1];
e[g + 2] = f[h + 2];
e[g + 3] = f[h + 3];
e[g + 4] = f[h + 4];
e[g + 5] = f[h + 5];
e[g +
6] = f[h + 6];
e[g + 7] = f[h + 7];
e[g + 8] = f[h + 8];
e[g + 9] = f[h + 9];
e[g + 10] = f[h + 10];
e[g + 11] = f[h + 11];
e[g + 12] = f[h + 12];
e[g + 13] = f[h + 13];
e[g + 14] = f[h + 14];
e[g + 15] = f[h + 15]
}
} else e = H.subarray(d >> 2, d + 64 * b >> 2);
S.uniformMatrix4fv(X(a), !!c, e)
}
},
Uh = a => {
a = V[a];
S.useProgram(a);
S.hl = a
},
Vh = (a, b) => {
S.vertexAttribDivisor(a, b)
},
Wh = (a, b, c, d, e, f) => {
var g = R.kj[a];
S.zj ? (g.Gj = !1, S.vertexAttribPointer(a, b, c, !!d, e, f)) : (g.size = b, g.type = c, g.pk = d, g.Yj = e, g.Ij = f, g.Gj = !0, g.Dk = function(h, n, p, q, u, w) {
this.vertexAttribPointer(h, n, p, q, u, w)
})
};
function Xh(a, b, c, d) {
S.viewport(a, b, c, d)
}
var Yh = (a, b) => {
if (!sf()) return -1;
a = If(a);
return a ? a.requestFullscreen || a.webkitRequestFullscreen ? mf() ? Sf(a, b) : b.ll ? (kf(Sf, 1, [a, b]), 1) : -2 : -3 : -4
},
Zh = (a, b) => {
var c = {
target: If(2),
Ti: "beforeunload",
Xi: b,
Yi: (d = event) => {
var e = M(b)(28, 0, a);
e && (e = e ? x(v, e) : "");
if (e) return d.preventDefault(), d.returnValue = e
},
Wi: !0
};
return pf(c)
},
$h = (a, b, c, d, e, f) => {
vf || (vf = m(256));
a = {
target: If(a),
Ti: f,
Xi: d,
Yi: (g = event) => {
var h = g.target.id ? g.target.id : "",
n = vf;
t(rf(g.target), v, n + 0, 128);
t(h, v, n + 128, 128);
M(d)(e, n, b) && g.preventDefault()
},
Wi: c
};
return pf(a)
},
ai = (a, b, c, d, e) => {
xf || (xf = m(280));
return pf({
target: a,
Ti: e,
Xi: d,
Yi: (f = event) => {
var g = xf,
h = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement,
n = !!h;
E[g >> 2] = n;
E[g + 4 >> 2] = sf();
var p = n ? h : wf,
q = p && p.id ? p.id : "";
t(rf(p), v, g + 8, 128);
t(q, v, g + 136, 128);
E[g + 264 >> 2] = p ? p.clientWidth : 0;
E[g + 268 >> 2] = p ? p.clientHeight : 0;
E[g + 272 >> 2] = screen.width;
E[g + 276 >> 2] = screen.height;
n && (wf = h);
M(d)(19, g, b) && f.preventDefault()
},
Wi: c
})
},
bi = (a, b,
c, d, e) => {
yf || (yf = m(1432));
b = {
target: If(2),
Fj: !0,
Ti: e,
Xi: c,
Yi: (f = event) => {
var g = yf;
Uf(g, f.gamepad);
M(c)(d, g, a) && f.preventDefault()
},
Wi: b
};
return pf(b)
},
ci = (a, b, c, d, e, f) => {
zf || (zf = m(176));
a = {
target: If(a),
Fj: !0,
Ti: f,
Xi: d,
Yi: g => {
var h = zf;
rb[h >> 3] = g.timeStamp;
var n = h >> 2;
E[n + 2] = g.location;
E[n + 3] = g.ctrlKey;
E[n + 4] = g.shiftKey;
E[n + 5] = g.altKey;
E[n + 6] = g.metaKey;
E[n + 7] = g.repeat;
E[n + 8] = g.charCode;
E[n + 9] = g.keyCode;
E[n + 10] = g.which;
t(g.key || "", v, h + 44, 32);
t(g.code || "", v, h + 76, 32);
t(g.char || "", v, h + 108, 32);
t(g.locale ||
"", v, h + 140, 32);
M(d)(e, h, b) && g.preventDefault()
},
Wi: c
};
return pf(a)
},
di = (a, b, c) => {
rb[a >> 3] = b.timeStamp;
a >>= 2;
E[a + 2] = b.screenX;
E[a + 3] = b.screenY;
E[a + 4] = b.clientX;
E[a + 5] = b.clientY;
E[a + 6] = b.ctrlKey;
E[a + 7] = b.shiftKey;
E[a + 8] = b.altKey;
E[a + 9] = b.metaKey;
pb[2 * a + 20] = b.button;
pb[2 * a + 21] = b.buttons;
E[a + 11] = b.movementX;
E[a + 12] = b.movementY;
c = Rf(c);
E[a + 13] = b.clientX - c.left;
E[a + 14] = b.clientY - c.top
},
ei = (a, b, c, d, e, f) => {
Af || (Af = m(72));
a = If(a);
return pf({
target: a,
Fj: "mousemove" != f && "mouseenter" != f && "mouseleave" != f,
Ti: f,
Xi: d,
Yi: (g = event) => {
di(Af, g, a);
M(d)(e, Af, b) && g.preventDefault()
},
Wi: c
})
},
fi = (a, b, c, d, e) => {
Bf || (Bf = m(260));
return pf({
target: a,
Ti: e,
Xi: d,
Yi: (f = event) => {
var g = Bf,
h = document.pointerLockElement || document.Ki || document.$i || document.Qi;
E[g >> 2] = !!h;
var n = h && h.id ? h.id : "";
t(rf(h), v, g + 4, 128);
t(n, v, g + 132, 128);
M(d)(20, g, b) && f.preventDefault()
},
Wi: c
})
},
gi = (a, b, c, d) => {
Cf || (Cf = m(36));
a = If(a);
return pf({
target: a,
Ti: "resize",
Xi: d,
Yi: (e = event) => {
if (e.target == a) {
var f = document.body;
if (f) {
var g = Cf;
E[g >> 2] = e.detail;
E[g +
4 >> 2] = f.clientWidth;
E[g + 8 >> 2] = f.clientHeight;
E[g + 12 >> 2] = innerWidth;
E[g + 16 >> 2] = innerHeight;
E[g + 20 >> 2] = outerWidth;
E[g + 24 >> 2] = outerHeight;
E[g + 28 >> 2] = pageXOffset;
E[g + 32 >> 2] = pageYOffset;
M(d)(10, g, b) && e.preventDefault()
}
}
},
Wi: c
})
},
hi = (a, b, c, d, e, f) => {
Df || (Df = m(1696));
a = If(a);
return pf({
target: a,
Fj: "touchstart" == f || "touchend" == f,
Ti: f,
Xi: d,
Yi: g => {
for (var h, n = {}, p = g.touches, q = 0; q < p.length; ++q) h = p[q], h.Qk = h.Vk = 0, n[h.identifier] = h;
for (q = 0; q < g.changedTouches.length; ++q) h = g.changedTouches[q], h.Qk = 1, n[h.identifier] =
h;
for (q = 0; q < g.targetTouches.length; ++q) n[g.targetTouches[q].identifier].Vk = 1;
p = Df;
rb[p >> 3] = g.timeStamp;
var u = p >> 2;
E[u + 3] = g.ctrlKey;
E[u + 4] = g.shiftKey;
E[u + 5] = g.altKey;
E[u + 6] = g.metaKey;
u += 7;
var w = Rf(a),
r = 0;
for (q in n)
if (h = n[q], E[u] = h.identifier, E[u + 1] = h.screenX, E[u + 2] = h.screenY, E[u + 3] = h.clientX, E[u + 4] = h.clientY, E[u + 5] = h.pageX, E[u + 6] = h.pageY, E[u + 7] = h.Qk, E[u + 8] = h.Vk, E[u + 9] = h.clientX - w.left, E[u + 10] = h.clientY - w.top, u += 13, 31 < ++r) break;
E[p + 8 >> 2] = r;
M(d)(e, p, b) && g.preventDefault()
},
Wi: c
})
},
ii = (a, b, c) => {
var d =
Hf[1];
Ef || (Ef = m(8));
return pf({
target: d,
Ti: "visibilitychange",
Xi: c,
Yi: (e = event) => {
var f = Ef,
g = ["hidden", "visible", "prerender", "unloaded"].indexOf(document.visibilityState);
E[f >> 2] = document.hidden;
E[f + 4 >> 2] = g;
M(c)(21, f, a) && e.preventDefault()
},
Wi: b
})
},
ji = (a, b, c, d, e, f) => {
a = {
target: If(a),
Ti: f,
Xi: d,
Yi: (g = event) => {
M(d)(e, 0, b) && g.preventDefault()
},
Wi: c
};
pf(a)
},
ki = (a, b, c, d) => {
Ff || (Ff = m(104));
return pf({
target: a,
Fj: !0,
Ti: "wheel",
Xi: d,
Yi: (e = event) => {
var f = Ff;
di(f, e, a);
rb[f + 72 >> 3] = e.deltaX;
rb[f + 80 >> 3] = e.deltaY;
rb[f + 88 >> 3] = e.deltaZ;
E[f + 96 >> 2] = e.deltaMode;
M(d)(9, f, b) && e.preventDefault()
},
Wi: c
})
};
function li() {
this.yj = [void 0];
this.Nk = []
}
var mi, ni;
function oi(a, b, c, d, e) {
function f() {
var U = 0,
fa = 0;
A.response && L && 0 === F[a + 12 >> 2] && (fa = A.response.byteLength);
0 < fa && (U = m(fa), v.set(new Uint8Array(A.response), U));
F[a + 12 >> 2] = U;
Yg(a + 16, fa);
Yg(a + 24, 0);
(U = A.response ? A.response.byteLength : 0) && Yg(a + 32, U);
qb[a + 40 >> 1] = A.readyState;
qb[a + 42 >> 1] = A.status;
A.statusText && t(A.statusText, v, a + 44, 64)
}
var g = F[a + 8 >> 2];
if (g) {
var h = g ? x(v, g) : "",
n = a + 112,
p = td(n + 0);
p || (p = "GET");
var q = F[n + 56 >> 2],
u = F[n + 68 >> 2],
w = F[n + 72 >> 2];
g = F[n + 76 >> 2];
var r = F[n + 80 >> 2],
B = F[n + 84 >> 2],
y = F[n + 88 >> 2],
G = F[n + 52 >> 2],
L = !!(G & 1),
O = !!(G & 2);
G = !!(G & 64);
u = u ? u ? x(v, u) : "" : void 0;
w = w ? w ? x(v, w) : "" : void 0;
var A = new XMLHttpRequest;
A.withCredentials = !!v[n + 60 >> 0];
A.open(p, h, !G, u, w);
G || (A.timeout = q);
A.Qi = h;
A.responseType = "arraybuffer";
r && (h = r ? x(v, r) : "", A.overrideMimeType(h));
if (g)
for (;;) {
n = F[g >> 2];
if (!n) break;
h = F[g + 4 >> 2];
if (!h) break;
g += 8;
n = n ? x(v, n) : "";
h = h ? x(v, h) : "";
A.setRequestHeader(n, h)
}
var P = mi.Nj(A);
F[a >> 2] = P;
g = B && y ? v.slice(B, B + y) : null;
A.onload = U => {
mi.has(P) && (f(), 200 <= A.status && 300 > A.status ? b && b(a, A, U) : c && c(a,
A, U))
};
A.onerror = U => {
mi.has(P) && (f(), c && c(a, A, U))
};
A.ontimeout = U => {
mi.has(P) && c && c(a, A, U)
};
A.onprogress = U => {
if (mi.has(P)) {
var fa = L && O && A.response ? A.response.byteLength : 0,
Q = 0;
0 < fa && L && O && (Q = m(fa), v.set(new Uint8Array(A.response), Q));
F[a + 12 >> 2] = Q;
Yg(a + 16, fa);
Yg(a + 24, U.loaded - fa);
Yg(a + 32, U.total);
qb[a + 40 >> 1] = A.readyState;
3 <= A.readyState && 0 === A.status && 0 < U.loaded && (A.status = 200);
qb[a + 42 >> 1] = A.status;
A.statusText && t(A.statusText, v, a + 44, 64);
d && d(a, A, U);
Q && ca(Q)
}
};
A.onreadystatechange = U => {
mi.has(P) && (qb[a +
40 >> 1] = A.readyState, 2 <= A.readyState && (qb[a + 42 >> 1] = A.status), e && e(a, A, U))
};
try {
A.send(g)
} catch (U) {
c && c(a, A, U)
}
} else c(a, 0, "no url specified!")
}
function pi(a, b, c, d) {
var e = ni;
if (e) {
var f = F[a + 112 + 64 >> 2];
f || (f = F[a + 8 >> 2]);
var g = f ? x(v, f) : "";
try {
var h = e.transaction(["FILES"], "readwrite").objectStore("FILES").put(b, g);
h.onsuccess = () => {
qb[a + 40 >> 1] = 4;
qb[a + 42 >> 1] = 200;
t("OK", v, a + 44, 64);
c(a, 0, g)
};
h.onerror = n => {
qb[a + 40 >> 1] = 4;
qb[a + 42 >> 1] = 413;
t("Payload Too Large", v, a + 44, 64);
d(a, 0, n)
}
} catch (n) {
d(a, 0, n)
}
} else d(a, 0, "IndexedDB not available!")
}
function qi(a, b, c) {
var d = ni;
if (d) {
var e = F[a + 112 + 64 >> 2];
e || (e = F[a + 8 >> 2]);
e = e ? x(v, e) : "";
try {
var f = d.transaction(["FILES"], "readonly").objectStore("FILES").get(e);
f.onsuccess = g => {
if (g.target.result) {
g = g.target.result;
var h = g.byteLength || g.length,
n = m(h);
v.set(new Uint8Array(g), n);
F[a + 12 >> 2] = n;
Yg(a + 16, h);
Yg(a + 24, 0);
Yg(a + 32, h);
qb[a + 40 >> 1] = 4;
qb[a + 42 >> 1] = 200;
t("OK", v, a + 44, 64);
b(a, 0, g)
} else qb[a + 40 >> 1] = 4, qb[a + 42 >> 1] = 404, t("Not Found", v, a + 44, 64), c(a, 0, "no data")
};
f.onerror = g => {
qb[a + 40 >> 1] = 4;
qb[a + 42 >> 1] = 404;
t("Not Found", v, a + 44, 64);
c(a, 0, g)
}
} catch (g) {
c(a, 0, g)
}
} else c(a, 0, "IndexedDB not available!")
}
function ri(a, b, c) {
var d = ni;
if (d) {
var e = F[a + 112 + 64 >> 2];
e || (e = F[a + 8 >> 2]);
e = e ? x(v, e) : "";
try {
var f = d.transaction(["FILES"], "readwrite").objectStore("FILES").delete(e);
f.onsuccess = g => {
g = g.target.result;
F[a + 12 >> 2] = 0;
Yg(a + 16, 0);
Yg(a + 24, 0);
Yg(a + 32, 0);
qb[a + 40 >> 1] = 4;
qb[a + 42 >> 1] = 200;
t("OK", v, a + 44, 64);
b(a, 0, g)
};
f.onerror = g => {
qb[a + 40 >> 1] = 4;
qb[a + 42 >> 1] = 404;
t("Not Found", v, a + 44, 64);
c(a, 0, g)
}
} catch (g) {
c(a, 0, g)
}
} else c(a, 0, "IndexedDB not available!")
}
var si = ["default", "low-power", "high-performance"],
ti = [null],
Y = null,
ui = {},
wi = () => {
if (!vi) {
var a = {
USER: "web_user",
LOGNAME: "web_user",
PATH: "/",
PWD: "/",
HOME: "/home/web_user",
LANG: ("object" == typeof navigator && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8",
_: Ya || "./this.program"
},
b;
for (b in ui) void 0 === ui[b] ? delete a[b] : a[b] = ui[b];
var c = [];
for (b in a) c.push(`=${a[b]}`);
vi = c
}
return vi
},
vi, xi = a => {
a = a.split(".");
for (var b = 0; 4 > b; b++) {
var c = Number(a[b]);
if (isNaN(c)) return null;
a[b] = c
}
return (a[0] | a[1] << 8 | a[2] << 16 | a[3] << 24) >>> 0
},
zi = a => {
var b, c, d = [];
if (!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(a)) return null;
if ("::" === a) return [0, 0, 0, 0, 0, 0, 0, 0];
a = a.startsWith("::") ? a.replace("::", "Z:") : a.replace("::", ":Z:");
0 < a.indexOf(".") ? (a = a.replace(RegExp("[.]", "g"), ":"), a = a.split(":"), a[a.length - 4] = parseInt(a[a.length - 4]) + 256 * parseInt(a[a.length - 3]), a[a.length -
3] = parseInt(a[a.length - 2]) + 256 * parseInt(a[a.length - 1]), a = a.slice(0, a.length - 2)) : a = a.split(":");
for (b = c = 0; b < a.length; b++)
if ("string" == typeof a[b])
if ("Z" === a[b]) {
for (c = 0; c < 8 - a.length + 1; c++) d[b + c] = 0;
--c
} else d[b + c] = yi(parseInt(a[b], 16));
else d[b + c] = a[b];
return [d[1] << 16 | d[0], d[3] << 16 | d[2], d[5] << 16 | d[4], d[7] << 16 | d[6]]
},
Ai = 1,
Bi = {};
function Ci(a) {
var b = xi(a);
if (null !== b) return a;
b = zi(a);
if (null !== b) return a;
Bi[a] ? b = Bi[a] : (b = Ai++, 65535 > b || lb("exceeded max address mappings of 65535"), b = "172.29." + (b & 255) + "." + (b & 65280), Bi[a] = b);
return b
}
var Di = a => (a & 255) + "." + (a >> 8 & 255) + "." + (a >> 16 & 255) + "." + (a >> 24 & 255),
Ei = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
Fi = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
Gi = (a, b, c, d) => {
function e(r, B, y) {
for (r = "number" == typeof r ? r.toString() : r || ""; r.length < B;) r = y[0] + r;
return r
}
function f(r, B) {
return e(r, B, "0")
}
function g(r, B) {
function y(L) {
return 0 > L ? -1 : 0 < L ? 1 : 0
}
var G;
0 === (G = y(r.getFullYear() - B.getFullYear())) && 0 === (G = y(r.getMonth() - B.getMonth())) && (G = y(r.getDate() - B.getDate()));
return G
}
function h(r) {
switch (r.getDay()) {
case 0:
return new Date(r.getFullYear() -
1, 11, 29);
case 1:
return r;
case 2:
return new Date(r.getFullYear(), 0, 3);
case 3:
return new Date(r.getFullYear(), 0, 2);
case 4:
return new Date(r.getFullYear(), 0, 1);
case 5:
return new Date(r.getFullYear() - 1, 11, 31);
case 6:
return new Date(r.getFullYear() - 1, 11, 30)
}
}
function n(r) {
var B = r.wj;
for (r = new Date((new Date(r.xj + 1900, 0, 1)).getTime()); 0 < B;) {
var y = r.getMonth(),
G = (yd(r.getFullYear()) ? Ei : Fi)[y];
if (B > G - r.getDate()) B -= G - r.getDate() + 1, r.setDate(1), 11 > y ? r.setMonth(y + 1) : (r.setMonth(0), r.setFullYear(r.getFullYear() +
1));
else {
r.setDate(r.getDate() + B);
break
}
}
y = new Date(r.getFullYear() + 1, 0, 4);
B = h(new Date(r.getFullYear(), 0, 4));
y = h(y);
return 0 >= g(B, r) ? 0 >= g(y, r) ? r.getFullYear() + 1 : r.getFullYear() : r.getFullYear() - 1
}
var p = F[d + 40 >> 2];
d = {
Nl: E[d >> 2],
Ml: E[d + 4 >> 2],
$j: E[d + 8 >> 2],
Bk: E[d + 12 >> 2],
ak: E[d + 16 >> 2],
xj: E[d + 20 >> 2],
fj: E[d + 24 >> 2],
wj: E[d + 28 >> 2],
rm: E[d + 32 >> 2],
Ll: E[d + 36 >> 2],
Ol: p ? p ? x(v, p) : "" : ""
};
c = c ? x(v, c) : "";
p = {
"%c": "%a %b %d %H:%M:%S %Y",
"%D": "%m/%d/%y",
"%F": "%Y-%m-%d",
"%h": "%b",
"%r": "%I:%M:%S %p",
"%R": "%H:%M",
"%T": "%H:%M:%S",
"%x": "%m/%d/%y",
"%X": "%H:%M:%S",
"%Ec": "%c",
"%EC": "%C",
"%Ex": "%m/%d/%y",
"%EX": "%H:%M:%S",
"%Ey": "%y",
"%EY": "%Y",
"%Od": "%d",
"%Oe": "%e",
"%OH": "%H",
"%OI": "%I",
"%Om": "%m",
"%OM": "%M",
"%OS": "%S",
"%Ou": "%u",
"%OU": "%U",
"%OV": "%V",
"%Ow": "%w",
"%OW": "%W",
"%Oy": "%y"
};
for (var q in p) c = c.replace(new RegExp(q, "g"), p[q]);
var u = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
w = "January February March April May June July August September October November December".split(" ");
p = {
"%a": r => u[r.fj].substring(0,
3),
"%A": r => u[r.fj],
"%b": r => w[r.ak].substring(0, 3),
"%B": r => w[r.ak],
"%C": r => f((r.xj + 1900) / 100 | 0, 2),
"%d": r => f(r.Bk, 2),
"%e": r => e(r.Bk, 2, " "),
"%g": r => n(r).toString().substring(2),
"%G": r => n(r),
"%H": r => f(r.$j, 2),
"%I": r => {
r = r.$j;
0 == r ? r = 12 : 12 < r && (r -= 12);
return f(r, 2)
},
"%j": r => {
for (var B = 0, y = 0; y <= r.ak - 1; B += (yd(r.xj + 1900) ? Ei : Fi)[y++]);
return f(r.Bk + B, 3)
},
"%m": r => f(r.ak + 1, 2),
"%M": r => f(r.Ml, 2),
"%n": () => "\n",
"%p": r => 0 <= r.$j && 12 > r.$j ? "AM" : "PM",
"%S": r => f(r.Nl, 2),
"%t": () => "\t",
"%u": r => r.fj || 7,
"%U": r => f(Math.floor((r.wj +
7 - r.fj) / 7), 2),
"%V": r => {
var B = Math.floor((r.wj + 7 - (r.fj + 6) % 7) / 7);
2 >= (r.fj + 371 - r.wj - 2) % 7 && B++;
if (B) 53 == B && (y = (r.fj + 371 - r.wj) % 7, 4 == y || 3 == y && yd(r.xj) || (B = 1));
else {
B = 52;
var y = (r.fj + 7 - r.wj - 1) % 7;
(4 == y || 5 == y && yd(r.xj % 400 - 1)) && B++
}
return f(B, 2)
},
"%w": r => r.fj,
"%W": r => f(Math.floor((r.wj + 7 - (r.fj + 6) % 7) / 7), 2),
"%y": r => (r.xj + 1900).toString().substring(2),
"%Y": r => r.xj + 1900,
"%z": r => {
r = r.Ll;
var B = 0 <= r;
r = Math.abs(r) / 60;
return (B ? "+" : "-") + String("0000" + (r / 60 * 100 + r % 60)).slice(-4)
},
"%Z": r => r.Ol,
"%%": () => "%"
};
c = c.replace(/%%/g,
"\x00\x00");
for (q in p) c.includes(q) && (c = c.replace(new RegExp(q, "g"), p[q](d)));
c = c.replace(/\0\0/g, "%");
q = lc(c, !1);
if (q.length > b) return 0;
D.set(q, a);
return q.length - 1
},
Ob = (a, b, c, d) => {
var e = {
string: p => {
var q = 0;
null !== p && void 0 !== p && 0 !== p && (q = Lf(p));
return q
},
array: p => {
var q = Kf(p.length);
D.set(p, q);
return q
}
};
a = k["_" + a];
var f = [],
g = 0;
if (d)
for (var h = 0; h < d.length; h++) {
var n = e[c[h]];
n ? (0 === g && (g = bf()), f[h] = n(d[h])) : f[h] = d[h]
}
c = a.apply(null, f);
return c = function(p) {
0 !== g && cf(g);
return "string" === b ? p ? x(v, p) :
"" : "boolean" === b ? !!p : p
}(c)
};
function Sc(a, b, c, d) {
a || (a = this);
this.parent = a;
this.Si = a.Si;
this.nj = null;
this.id = Ic++;
this.name = b;
this.mode = c;
this.Li = {};
this.Ni = {};
this.rdev = d
}
Object.defineProperties(Sc.prototype, {
read: {
get: function() {
return 365 === (this.mode & 365)
},
set: function(a) {
a ? this.mode |= 365 : this.mode &= -366
}
},
write: {
get: function() {
return 146 === (this.mode & 146)
},
set: function(a) {
a ? this.mode |= 146 : this.mode &= -147
}
},
Cl: {
get: function() {
return C(this.mode)
}
},
Bl: {
get: function() {
return 8192 === (this.mode & 61440)
}
}
});
ld();
Jc = Array(4096);
Qb(z, "/");
Pb("/tmp");
Pb("/home");
Pb("/home/web_user");
(function() {
Pb("/dev");
oc(259, {
read: () => 0,
write: (d, e, f, g) => g
});
cd("/dev/null", 259);
nc(1280, qc);
nc(1536, rc);
cd("/dev/tty", 1280);
cd("/dev/tty1", 1536);
var a = new Uint8Array(1024),
b = 0,
c = () => {
0 === b && (b = fc(a).byteLength);
return a[--b]
};
pd("/dev", "random", c);
pd("/dev", "urandom", c);
Pb("/dev/shm");
Pb("/dev/shm/tmp")
})();
(function() {
Pb("/proc");
var a = Pb("/proc/self");
Pb("/proc/self/fd");
Qb({
Si() {
var b = uc(a, "fd", 16895, 73);
b.Li = {
lookup(c, d) {
var e = Yc(+d);
c = {
parent: null,
Si: {
oj: "fake"
},
Li: {
readlink: () => e.path
}
};
return c.parent = c
}
};
return b
}
}, "/proc/self/fd")
})();
k.FS_createPath = nd;
k.FS_createDataFile = Cc;
k.FS_createPreloadedFile = Dc;
k.FS_unlink = Va;
k.FS_createLazyFile = rd;
k.FS_createDevice = pd;
k.requestFullscreen = (a, b) => ie(a, b);
k.requestAnimationFrame = a => Jd(a);
k.setCanvasSize = (a, b, c) => {
ke(k.canvas, a, b);
c || le()
};
k.pauseMainLoop = () => {
Fd = null;
Ld++
};
k.resumeMainLoop = () => {
Ld++;
var a = Bd,
b = Cd,
c = Dd;
Dd = null;
Rd(c);
Kd(a, b);
Fd()
};
k.getUserMedia = () => {
window.getUserMedia || (window.getUserMedia = navigator.getUserMedia || navigator.mozGetUserMedia);
window.getUserMedia(void 0)
};
k.createContext = (a, b, c, d) => ae(a, b, c, d);
for (var S, Hi = 0; 32 > Hi; ++Hi) Dg.push(Array(Hi));
var Ii = new Float32Array(288);
for (Hi = 0; 288 > Hi; ++Hi) Gh[Hi] = Ii.subarray(0, Hi + 1);
var Ji = new Int32Array(288);
for (Hi = 0; 288 > Hi; ++Hi) Jh[Hi] = Ji.subarray(0, Hi + 1);
mi = new li;
Db("library_fetch_init");
(function(a, b) {
try {
var c = indexedDB.open("emscripten_filesystem", 1)
} catch (d) {
b(d);
return
}
c.onupgradeneeded = d => {
d = d.target.result;
d.objectStoreNames.contains("FILES") && d.deleteObjectStore("FILES");
d.createObjectStore("FILES")
};
c.onsuccess = d => a(d.target.result);
c.onerror = d => b(d)
})(a => {
ni = a;
Eb("library_fetch_init")
}, () => {
ni = !1;
Eb("library_fetch_init")
});
Object.assign(li.prototype, {
get(a) {
return this.yj[a]
},
has(a) {
return void 0 !== this.yj[a]
},
Nj(a) {
var b = this.Nk.pop() || this.yj.length;
this.yj[b] = a;
return b
},
rl(a) {
this.yj[a] = void 0;
this.Nk.push(a)
}
});
var Pi = {
Tb: function(a) {
try {
a = a ? x(v, a) : "";
var b = Oa(a, {
tj: !0
});
if (null === b.node) throw new N(44);
if (!C(b.node.mode)) throw new N(54);
var c = Rc(b.node, "x");
if (c) throw new N(c);
hc = b.path;
return 0
} catch (d) {
if ("undefined" == typeof sd || "ErrnoError" !== d.name) throw d;
return -d.Pi
}
},
Ia: function(a, b, c) {
wd = c;
try {
var d = Yc(a);
switch (b) {
case 0:
var e = xd();
if (0 > e) return -28;
for (; Hc[e];) e++;
return Zc(d, e).fd;
case 1:
case 2:
return 0;
case 3:
return d.flags;
case 4:
return e = xd(), d.flags |= e, 0;
case 5:
return e = xd(), pb[e + 0 >> 1] = 2,
0;
case 6:
case 7:
return 0;
case 16:
case 8:
return -28;
case 9:
return E[Li() >> 2] = 28, -1;
default:
return -28
}
} catch (f) {
if ("undefined" == typeof sd || "ErrnoError" !== f.name) throw f;
return -f.Pi
}
},
Kb: function(a, b, c) {
try {
var d = Yc(a);
d.uj || (d.uj = Ma(d.path));
a = 0;
for (var e = jd(d, 0, 1), f = Math.floor(e / 280); f < d.uj.length && a + 280 <= c;) {
var g = d.uj[f];
if ("." === g) {
var h = d.node.id;
var n = 4
} else if (".." === g) h = Oa(d.path, {
parent: !0
}).node.id, n = 4;
else {
var p = wc(d.node, g);
h = p.id;
n = 8192 === (p.mode & 61440) ? 2 : C(p.mode) ? 4 : 40960 === (p.mode & 61440) ?
10 : 8
}
J = [h >>> 0, (I = h, 1 <= +Math.abs(I) ? 0 < I ? +Math.floor(I / 4294967296) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296) >>> 0 : 0)];
E[b + a >> 2] = J[0];
E[b + a + 4 >> 2] = J[1];
J = [280 * (f + 1) >>> 0, (I = 280 * (f + 1), 1 <= +Math.abs(I) ? 0 < I ? +Math.floor(I / 4294967296) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296) >>> 0 : 0)];
E[b + a + 8 >> 2] = J[0];
E[b + a + 12 >> 2] = J[1];
pb[b + a + 16 >> 1] = 280;
D[b + a + 18 >> 0] = n;
t(g, v, b + a + 19, 256);
a += 280;
f += 1
}
jd(d, 280 * f, 0);
return a
} catch (q) {
if ("undefined" == typeof sd || "ErrnoError" !== q.name) throw q;
return -q.Pi
}
},
Ub: function(a, b, c) {
wd = c;
try {
var d = Yc(a);
switch (b) {
case 21509:
return d.tty ? 0 : -59;
case 21505:
if (!d.tty) return -59;
if (d.tty.ij.yl) {
b = [3, 28, 127, 21, 4, 0, 1, 0, 17, 19, 26, 0, 18, 15, 23, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var e = xd();
E[e >> 2] = 25856;
E[e + 4 >> 2] = 5;
E[e + 8 >> 2] = 191;
E[e + 12 >> 2] = 35387;
for (var f = 0; 32 > f; f++) D[e + f + 17 >> 0] = b[f] || 0
}
return 0;
case 21510:
case 21511:
case 21512:
return d.tty ? 0 : -59;
case 21506:
case 21507:
case 21508:
if (!d.tty) return -59;
if (d.tty.ij.zl)
for (e = xd(), b = [], f = 0; 32 > f; f++) b.push(D[e + f + 17 >> 0]);
return 0;
case 21519:
if (!d.tty) return -59;
e = xd();
return E[e >> 2] = 0;
case 21520:
return d.tty ? -28 : -59;
case 21531:
e = xd();
if (!d.Ni.xl) throw new N(59);
return d.Ni.xl(d, b, e);
case 21523:
if (!d.tty) return -59;
d.tty.ij.Al && (f = [24, 80], e = xd(), pb[e >> 1] = f[0], pb[e + 2 >> 1] = f[1]);
return 0;
case 21524:
return d.tty ? 0 : -59;
case 21515:
return d.tty ? 0 : -59;
default:
return -28
}
} catch (g) {
if ("undefined" == typeof sd || "ErrnoError" !== g.name) throw g;
return -g.Pi
}
},
Ob: function(a, b) {
try {
return a = a ? x(v, a) : "", vd(ed, a, b)
} catch (c) {
if ("undefined" == typeof sd || "ErrnoError" !== c.name) throw c;
return -c.Pi
}
},
Lb: function(a, b, c) {
try {
return b = b ? x(v, b) : "", b = ud(a, b), b = La(b), "/" === b[b.length - 1] && (b = b.substr(0, b.length - 1)), Pb(b, c), 0
} catch (d) {
if ("undefined" == typeof sd || "ErrnoError" !== d.name) throw d;
return -d.Pi
}
},
Pb: function(a, b, c, d) {
try {
b = b ? x(v, b) : "";
var e = d & 256;
b = ud(a, b, d & 4096);
return vd(e ? ed : Na, b, c)
} catch (f) {
if ("undefined" == typeof sd || "ErrnoError" !== f.name) throw f;
return -f.Pi
}
},
Fa: function(a, b, c, d) {
wd = d;
try {
b = b ? x(v, b) : "";
b = ud(a, b);
var e = d ? xd() : 0;
return fd(b, c, e).fd
} catch (f) {
if ("undefined" == typeof sd ||
"ErrnoError" !== f.name) throw f;
return -f.Pi
}
},
Jb: function(a, b, c, d) {
try {
b = b ? x(v, b) : "";
b = ud(a, b);
if (0 >= d) return -28;
var e = Mc(b),
f = Math.min(d, aa(e)),
g = D[c + f];
t(e, v, c, d + 1);
D[c + f] = g;
return f
} catch (h) {
if ("undefined" == typeof sd || "ErrnoError" !== h.name) throw h;
return -h.Pi
}
},
Gb: function(a, b, c, d) {
try {
b = b ? x(v, b) : "";
d = d ? x(v, d) : "";
b = ud(a, b);
d = ud(c, d);
a = b;
var e = cc(a),
f = cc(d),
g = dc(a),
h = dc(d);
var n = Oa(a, {
parent: !0
});
var p = n.node;
n = Oa(d, {
parent: !0
});
var q = n.node;
if (!p || !q) throw new N(44);
if (p.Si !== q.Si) throw new N(75);
var u = wc(p, g),
w = ic(a, f);
if ("." !== w.charAt(0)) throw new N(28);
w = ic(d, e);
if ("." !== w.charAt(0)) throw new N(55);
try {
var r = wc(q, h)
} catch (G) {}
if (u !== r) {
var B = C(u.mode),
y = Vc(p, g, B);
if (y) throw new N(y);
if (y = r ? Vc(q, h, B) : Uc(q, h)) throw new N(y);
if (!p.Li.rename) throw new N(63);
if (u.nj || r && r.nj) throw new N(10);
if (q !== p && (y = Rc(p, "w"))) throw new N(y);
Qc(u);
try {
p.Li.rename(u, q, h)
} catch (G) {
throw G;
} finally {
Pc(u)
}
}
return 0
} catch (G) {
if ("undefined" == typeof sd || "ErrnoError" !== G.name) throw G;
return -G.Pi
}
},
Hb: function(a) {
try {
return a =
a ? x(v, a) : "", Ua(a), 0
} catch (b) {
if ("undefined" == typeof sd || "ErrnoError" !== b.name) throw b;
return -b.Pi
}
},
Qb: function(a, b) {
try {
return a = a ? x(v, a) : "", vd(Na, a, b)
} catch (c) {
if ("undefined" == typeof sd || "ErrnoError" !== c.name) throw c;
return -c.Pi
}
},
Ib: function(a, b, c) {
try {
return b = b ? x(v, b) : "", b = ud(a, b), 0 === c ? Va(b) : 512 === c ? Ua(b) : lb("Invalid flags passed to unlinkat"), 0
} catch (d) {
if ("undefined" == typeof sd || "ErrnoError" !== d.name) throw d;
return -d.Pi
}
},
dh: function(a) {
if (mi.has(a)) {
var b = mi.get(a);
mi.rl(a);
0 < b.readyState &&
4 > b.readyState && b.abort()
}
},
bh: function(a, b, c) {
a = mi.get(a).getAllResponseHeaders();
var d = aa(a) + 1;
t(a, v, b, c);
return Math.min(d, c)
},
ch: function(a) {
return aa(mi.get(a).getAllResponseHeaders()) + 1
},
Rb: () => !0,
yb: function(a, b, c) {
a = new Date(1E3 * (b + 2097152 >>> 0 < 4194305 - !!a ? (a >>> 0) + 4294967296 * b : NaN));
E[c >> 2] = a.getUTCSeconds();
E[c + 4 >> 2] = a.getUTCMinutes();
E[c + 8 >> 2] = a.getUTCHours();
E[c + 12 >> 2] = a.getUTCDate();
E[c + 16 >> 2] = a.getUTCMonth();
E[c + 20 >> 2] = a.getUTCFullYear() - 1900;
E[c + 24 >> 2] = a.getUTCDay();
E[c + 28 >> 2] = (a.getTime() -
Date.UTC(a.getUTCFullYear(), 0, 1, 0, 0, 0, 0)) / 864E5 | 0
},
zb: function(a, b, c) {
a = new Date(1E3 * (b + 2097152 >>> 0 < 4194305 - !!a ? (a >>> 0) + 4294967296 * b : NaN));
E[c >> 2] = a.getSeconds();
E[c + 4 >> 2] = a.getMinutes();
E[c + 8 >> 2] = a.getHours();
E[c + 12 >> 2] = a.getDate();
E[c + 16 >> 2] = a.getMonth();
E[c + 20 >> 2] = a.getFullYear() - 1900;
E[c + 24 >> 2] = a.getDay();
E[c + 28 >> 2] = (yd(a.getFullYear()) ? zd : Ad)[a.getMonth()] + a.getDate() - 1 | 0;
E[c + 36 >> 2] = -(60 * a.getTimezoneOffset());
b = (new Date(a.getFullYear(), 6, 1)).getTimezoneOffset();
var d = (new Date(a.getFullYear(),
0, 1)).getTimezoneOffset();
E[c + 32 >> 2] = (b != d && a.getTimezoneOffset() == Math.min(d, b)) | 0
},
Ab: function(a) {
var b = new Date(E[a + 20 >> 2] + 1900, E[a + 16 >> 2], E[a + 12 >> 2], E[a + 8 >> 2], E[a + 4 >> 2], E[a >> 2], 0),
c = E[a + 32 >> 2],
d = b.getTimezoneOffset(),
e = (new Date(b.getFullYear(), 6, 1)).getTimezoneOffset(),
f = (new Date(b.getFullYear(), 0, 1)).getTimezoneOffset(),
g = Math.min(f, e);
0 > c ? E[a + 32 >> 2] = Number(e != f && g == d) : 0 < c != (g == d) && (e = Math.max(f, e), b.setTime(b.getTime() + 6E4 * ((0 < c ? g : e) - d)));
E[a + 24 >> 2] = b.getDay();
E[a + 28 >> 2] = (yd(b.getFullYear()) ?
zd : Ad)[b.getMonth()] + b.getDate() - 1 | 0;
E[a >> 2] = b.getSeconds();
E[a + 4 >> 2] = b.getMinutes();
E[a + 8 >> 2] = b.getHours();
E[a + 12 >> 2] = b.getDate();
E[a + 16 >> 2] = b.getMonth();
E[a + 20 >> 2] = b.getYear();
a = b.getTime() / 1E3;
return Mi((I = a, 1 <= +Math.abs(I) ? 0 < I ? +Math.floor(I / 4294967296) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296) >>> 0 : 0)), a >>> 0
},
Bb: function(a) {
var b = new Date(Date.UTC(E[a + 20 >> 2] + 1900, E[a + 16 >> 2], E[a + 12 >> 2], E[a + 8 >> 2], E[a + 4 >> 2], E[a >> 2], 0));
E[a + 24 >> 2] = b.getUTCDay();
E[a + 28 >> 2] = (b.getTime() - Date.UTC(b.getUTCFullYear(),
0, 1, 0, 0, 0, 0)) / 864E5 | 0;
a = b.getTime() / 1E3;
return Mi((I = a, 1 <= +Math.abs(I) ? 0 < I ? +Math.floor(I / 4294967296) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296) >>> 0 : 0)), a >>> 0
},
Fb: (a, b, c) => {
function d(n) {
return (n = n.toTimeString().match(/\(([A-Za-z ]+)\)$/)) ? n[1] : "GMT"
}
var e = (new Date).getFullYear(),
f = new Date(e, 0, 1),
g = new Date(e, 6, 1);
e = f.getTimezoneOffset();
var h = g.getTimezoneOffset();
F[a >> 2] = 60 * Math.max(e, h);
E[b >> 2] = Number(e != h);
a = d(f);
b = d(g);
a = Ka(a);
b = Ka(b);
h < e ? (F[c >> 2] = a, F[c + 4 >> 2] = b) : (F[c >> 2] = b, F[c + 4 >> 2] = a)
},
j: () => {
lb("")
},
wh: a => {
if (12448 == a) return T = 12288, 1;
T = 12300;
return 0
},
zh: (a, b, c, d, e) => {
if (62E3 != a) T = 12296, c = 0;
else {
if (b)
for (;;) {
a = E[b >> 2];
if (12321 == a) se.alpha = 0 < E[b + 4 >> 2];
else if (12325 == a) se.depth = 0 < E[b + 4 >> 2];
else if (12326 == a) se.stencil = 0 < E[b + 4 >> 2];
else if (12337 == a) a = E[b + 4 >> 2], se.antialias = 0 < a;
else if (12338 == a) a = E[b + 4 >> 2], se.antialias = 1 == a;
else if (12544 == a) se.km = 12547 != E[b + 4 >> 2];
else if (12344 == a) break;
b += 8
}
c && d || e ? (e && (E[e >> 2] = 1), c && 0 < d && (F[c >> 2] = 62002), T = 12288, c = 1) : (T = 12300, c = 0)
}
return c
},
mh: (a, b, c, d) => {
if (62E3 != a) return T = 12296, 0;
for (a = 1;;) {
b = E[d >> 2];
if (12440 == b) a = E[d + 4 >> 2];
else if (12344 == b) break;
else return T = 12292, 0;
d += 8
}
if (2 > a || 3 < a) return T = 12293, 0;
se.Pj = a - 1;
se.Dl = 0;
ue = ce(k.canvas, se);
if (0 != ue) return T = 12288, ee(ue), k.Ql = !0, Yd.forEach(function(e) {
e()
}), ee(null), 62004;
T = 12297;
return 0
},
oh: (a, b) => {
if (62E3 != a) return T = 12296, 0;
if (62002 != b) return T = 12293, 0;
T = 12288;
return 62006
},
nh: (a, b) => {
if (62E3 != a) return T = 12296, 0;
if (62004 != b) return T = 12294, 0;
a = ue;
R === de[a] && (R = null);
if ("object" == typeof tf)
for (var c =
de[a].Zi.canvas, d = 0; d < gf.length; ++d) gf[d].target != c || hf(d--);
de[a] && de[a].Zi.canvas && (de[a].Zi.canvas.Ej = void 0);
de[a] = null;
T = 12288;
pe == b && (pe = 0);
return 1
},
qh: (a, b) => {
if (62E3 != a) return T = 12296, 0;
if (62006 != b) return T = 12301, 1;
qe == b && (qe = 0);
re == b && (re = 0);
T = 12288;
return 1
},
Ah: (a, b, c, d) => {
if (62E3 != a) return T = 12296, 0;
if (62002 != b) return T = 12293, 0;
if (!d) return T = 12300, 0;
T = 12288;
switch (c) {
case 12320:
return E[d >> 2] = se.alpha ? 32 : 24, 1;
case 12321:
return E[d >> 2] = se.alpha ? 8 : 0, 1;
case 12322:
return E[d >> 2] = 8, 1;
case 12323:
return E[d >>
2] = 8, 1;
case 12324:
return E[d >> 2] = 8, 1;
case 12325:
return E[d >> 2] = se.depth ? 24 : 0, 1;
case 12326:
return E[d >> 2] = se.stencil ? 8 : 0, 1;
case 12327:
return E[d >> 2] = 12344, 1;
case 12328:
return E[d >> 2] = 62002, 1;
case 12329:
return E[d >> 2] = 0, 1;
case 12330:
return E[d >> 2] = 4096, 1;
case 12331:
return E[d >> 2] = 16777216, 1;
case 12332:
return E[d >> 2] = 4096, 1;
case 12333:
return E[d >> 2] = 0, 1;
case 12334:
return E[d >> 2] = 0, 1;
case 12335:
return E[d >> 2] = 12344, 1;
case 12337:
return E[d >> 2] = se.antialias ? 4 : 0, 1;
case 12338:
return E[d >> 2] = se.antialias ?
1 : 0, 1;
case 12339:
return E[d >> 2] = 4, 1;
case 12340:
return E[d >> 2] = 12344, 1;
case 12341:
case 12342:
case 12343:
return E[d >> 2] = -1, 1;
case 12345:
case 12346:
return E[d >> 2] = 0, 1;
case 12347:
return E[d >> 2] = 0, 1;
case 12348:
return E[d >> 2] = 1;
case 12349:
case 12350:
return E[d >> 2] = 0, 1;
case 12351:
return E[d >> 2] = 12430, 1;
case 12352:
return E[d >> 2] = 4, 1;
case 12354:
return E[d >> 2] = 0, 1;
default:
return T = 12292, 0
}
},
Va: () => {
T = 12288;
return 62E3
},
lh: () => T,
xh: (a, b, c) => {
if (62E3 != a) return T = 12296, 0;
b && (E[b >> 2] = 1);
c && (E[c >> 2] = 4);
oe = !0;
T =
12288;
return 1
},
rh: (a, b, c, d) => {
if (62E3 != a) return T = 12296, 0;
if (0 != d && 62004 != d) return T = 12294, 0;
if (0 != c && 62006 != c || 0 != b && 62006 != b) return T = 12301, 0;
ee(d ? ue : null);
pe = d;
re = b;
qe = c;
T = 12288;
return 1
},
kh: (a, b) => {
if (62E3 != a) return T = 12296, 0;
T = 12288;
if (te[b]) return te[b];
switch (b) {
case 12371:
a = Ka("Emscripten");
break;
case 12372:
a = Ka("1.4 Emscripten EGL");
break;
case 12373:
a = Ka("");
break;
case 12429:
a = Ka("OpenGL_ES");
break;
default:
return T = 12300, 0
}
return te[b] = a
},
sh: () => {
if (oe)
if (k.bj)
if (k.bj.isContextLost()) T =
12302;
else return T = 12288, 1;
else T = 12290;
else T = 12289;
return 0
},
th: (a, b) => {
if (62E3 != a) return T = 12296, 0;
0 == b ? Kd(0, 0) : Kd(1, b);
T = 12288;
return 1
},
yh: a => {
if (62E3 != a) return T = 12296, 0;
re = qe = pe = 0;
oe = !1;
T = 12288;
return 1
},
vh: () => {
T = 12288;
return 1
},
uh: () => {
T = 12288;
return 1
},
t: (a, b, c) => Ye(a, b, c),
a: (a, b, c) => Ye(a, b, c),
e: (a, b, c) => {
b = Xe(b, c);
return Vb[a].apply(null, b)
},
pa: (a, b, c) => Ye(a, b, c),
Nh: (a, b, c, d, e, f, g, h) => {
function n() {
g && df(() => {
var w = 0;
q.statusText && (w = Lf(q.statusText));
M(g)(u, d, q.status, w)
})
}
var p = a ? x(v,
a) : "";
a = b ? x(v, b) : "";
c = c ? x(v, c) : "";
var q = new XMLHttpRequest;
q.open(a, p, !0);
q.responseType = "arraybuffer";
var u = af();
q.onload = function() {
if (200 <= q.status && 300 > q.status || 0 === q.status && "http" != p.substr(0, 4).toLowerCase()) {
var w = new Uint8Array(q.response),
r = m(w.length);
v.set(w, r);
f && M(f)(u, d, r, w.length);
e && ca(r)
} else n();
delete Ze[u]
};
q.onerror = function() {
n();
delete Ze[u]
};
q.onprogress = function(w) {
h && M(h)(u, d, w.loaded, w.lengthComputable || void 0 === w.lengthComputable ? w.total : 0)
};
q.onabort = function() {
delete Ze[u]
};
"POST" == a ? (q.setRequestHeader("Content-type", "application/x-www-form-urlencoded"), q.send(c)) : q.send(null);
Ze[u] = q;
return u
},
Fh: a => {
clearInterval(a)
},
aa: () => Date.now(),
gh: () => {
if (!sf()) return -1;
lf(Sf);
var a = Hf[1];
if (a.exitFullscreen) a.fullscreenElement && a.exitFullscreen();
else if (a.webkitExitFullscreen) a.webkitFullscreenElement && a.webkitExitFullscreen();
else return -1;
return 0
},
Pa: () => {
lf(Tf);
if (document.exitPointerLock) document.exitPointerLock();
else return -1;
return 0
},
Rh: Jf,
x: () => "number" == typeof devicePixelRatio &&
devicePixelRatio || 1,
o: (a, b, c) => {
a = If(a);
if (!a) return -4;
a = Rf(a);
rb[b >> 3] = a.width;
rb[c >> 3] = a.height;
return 0
},
Ya: (a, b) => {
if (0 > a || a >= uf.length) return -5;
if (!uf[a]) return -7;
Uf(b, uf[a]);
return 0
},
$: Hd,
Bh: () => uf.length,
jh: (a, b) => {
E[a >> 2] = screen.width;
E[b >> 2] = screen.height
},
Jg: Vf,
Ig: Wf,
Nd: (a, b) => {
S.beginQuery(a, Ie[b])
},
Zg: (a, b) => {
S.aj.beginQueryEXT(a, Ie[b])
},
qd: function(a) {
S.beginTransformFeedback(a)
},
Hg: (a, b, c) => {
S.bindAttribLocation(V[a], b, c ? x(v, c) : "")
},
Gg: Xf,
nd: (a, b, c) => {
S.bindBufferBase(a, b, Be[c])
},
od: (a,
b, c, d, e) => {
S.bindBufferRange(a, b, Be[c], d, e)
},
Fg: Yf,
Eg: Zf,
vc: (a, b) => {
S.bindSampler(a, Je[b])
},
Dg: $f,
nc: (a, b) => {
S.bindTransformFeedback(a, Ke[b])
},
vd: ag,
Rg: ag,
Cg: function(a, b, c, d) {
S.blendColor(a, b, c, d)
},
Bg: function(a) {
S.blendEquation(a)
},
Ag: bg,
zg: cg,
yg: dg,
Ad: function(a, b, c, d, e, f, g, h, n, p) {
S.blitFramebuffer(a, b, c, d, e, f, g, h, n, p)
},
xg: eg,
wg: (a, b, c, d) => {
2 <= R.version ? c && S.bufferSubData(a, b, v, d, c) : S.bufferSubData(a, b, v.subarray(d, d + c))
},
vg: fg,
ug: gg,
Sc: function(a, b, c, d) {
S.clearBufferfi(a, b, c, d)
},
Tc: (a, b, c) => {
S.clearBufferfv(a,
b, H, c >> 2)
},
Vc: (a, b, c) => {
S.clearBufferiv(a, b, E, c >> 2)
},
Uc: (a, b, c) => {
S.clearBufferuiv(a, b, F, c >> 2)
},
tg: hg,
sg: ig,
rg: jg,
Ec: (a, b, c, d) => S.clientWaitSync(Le[a], b, (c >>> 0) + 4294967296 * d),
qg: kg,
pg: lg,
og: mg,
Sd: (a, b, c, d, e, f, g, h, n) => {
S.cj ? S.compressedTexImage3D(a, b, c, d, e, f, g, h, n) : S.compressedTexImage3D(a, b, c, d, e, f, g, v, n, h)
},
ng: (a, b, c, d, e, f, g, h, n) => {
2 <= R.version ? S.cj || !h ? S.compressedTexSubImage2D(a, b, c, d, e, f, g, h, n) : S.compressedTexSubImage2D(a, b, c, d, e, f, g, v, n, h) : S.compressedTexSubImage2D(a, b, c, d, e, f, g, n ? v.subarray(n,
n + h) : null)
},
Rd: (a, b, c, d, e, f, g, h, n, p, q) => {
S.cj ? S.compressedTexSubImage3D(a, b, c, d, e, f, g, h, n, p, q) : S.compressedTexSubImage3D(a, b, c, d, e, f, g, h, n, v, q, p)
},
Qc: function(a, b, c, d, e) {
S.copyBufferSubData(a, b, c, d, e)
},
mg: function(a, b, c, d, e, f, g, h) {
S.copyTexImage2D(a, b, c, d, e, f, g, h)
},
lg: function(a, b, c, d, e, f, g, h) {
S.copyTexSubImage2D(a, b, c, d, e, f, g, h)
},
Td: function(a, b, c, d, e, f, g, h, n) {
S.copyTexSubImage3D(a, b, c, d, e, f, g, h, n)
},
kg: ng,
jg: og,
ig: function(a) {
S.cullFace(a)
},
hg: pg,
gg: qg,
fg: rg,
Pd: (a, b) => {
for (var c = 0; c < a; c++) {
var d =
E[b + 4 * c >> 2],
e = Ie[d];
e && (S.deleteQuery(e), Ie[d] = null)
}
},
$g: (a, b) => {
for (var c = 0; c < a; c++) {
var d = E[b + 4 * c >> 2],
e = Ie[d];
e && (S.aj.deleteQueryEXT(e), Ie[d] = null)
}
},
eg: sg,
xc: (a, b) => {
for (var c = 0; c < a; c++) {
var d = E[b + 4 * c >> 2],
e = Je[d];
e && (S.deleteSampler(e), e.name = 0, Je[d] = null)
}
},
dg: tg,
Fc: a => {
if (a) {
var b = Le[a];
b ? (S.deleteSync(b), b.name = 0, Le[a] = null) : W(1281)
}
},
cg: ug,
mc: (a, b) => {
for (var c = 0; c < a; c++) {
var d = E[b + 4 * c >> 2],
e = Ke[d];
e && (S.deleteTransformFeedback(e), e.name = 0, Ke[d] = null)
}
},
ud: vg,
Qg: vg,
bg: wg,
ag: xg,
$f: yg,
_f: (a,
b) => {
S.detachShader(V[a], Ge[b])
},
Zf: zg,
Yf: Ag,
Xf: Bg,
Jc: Cg,
Mg: Cg,
Xb: Cg,
_d: Cg,
Yb: Cg,
Hd: Eg,
Yd: Eg,
Ng: Eg,
Wf: Fg,
Ic: Gg,
Lg: Gg,
Vb: Gg,
Wb: Gg,
Zd: Gg,
Wd: (a, b, c, d, e, f) => {
Fg(a, d, e, f)
},
Vf: Hg,
Uf: Ig,
Md: function(a) {
S.endQuery(a)
},
Yg: a => {
S.aj.endQueryEXT(a)
},
pd: function() {
S.endTransformFeedback()
},
Hc: (a, b) => (a = S.fenceSync(a, b)) ? (b = Re(Le), a.name = b, Le[b] = a, b) : 0,
Tf: function() {
S.finish()
},
Sf: Jg,
wd: (a, b, c) => {
if (Lg(a)) {
var d = Ce[Kg(a)];
d ? d.Fk & 16 ? 0 > b || 0 > c || b + c > d.length ? (W(1281), l("invalid range in glFlushMappedBufferRange")) :
S.bufferSubData(a, d.offset, v.subarray(d.hj + b, d.hj + b + c)) : (W(1282), l("buffer was not mapped with GL_MAP_FLUSH_EXPLICIT_BIT in glFlushMappedBufferRange")) : (W(1282), l("buffer was never mapped in glFlushMappedBufferRange"))
} else W(1280), l("GL_INVALID_ENUM in glFlushMappedBufferRange")
},
Rf: Mg,
Qf: Ng,
yd: (a, b, c, d, e) => {
S.framebufferTextureLayer(a, b, Fe[c], d, e)
},
Pf: Og,
Of: Qg,
Mf: Rg,
Qd: (a, b) => {
Pg(a, b, "createQuery", Ie)
},
ah: (a, b) => {
for (var c = 0; c < a; c++) {
var d = S.aj.createQueryEXT();
if (!d) {
for (W(1282); c < a;) E[b + 4 * c++ >>
2] = 0;
break
}
var e = Re(Ie);
d.name = e;
Ie[e] = d;
E[b + 4 * c >> 2] = e
}
},
Lf: Sg,
yc: (a, b) => {
Pg(a, b, "createSampler", Je)
},
Kf: Tg,
lc: (a, b) => {
Pg(a, b, "createTransformFeedback", Ke)
},
td: Ug,
Pg: Ug,
Nf: function(a) {
S.generateMipmap(a)
},
Jf: (a, b, c, d, e, f, g) => {
Vg("getActiveAttrib", a, b, c, d, e, f, g)
},
If: Wg,
Lc: (a, b, c, d, e) => {
a = V[a];
if (a = S.getActiveUniformBlockName(a, b)) e && 0 < c ? (c = t(a, v, e, c), d && (E[d >> 2] = c)) : d && (E[d >> 2] = 0)
},
Mc: (a, b, c, d) => {
if (d)
if (a = V[a], 35393 == c) E[d >> 2] = S.getActiveUniformBlockName(a, b).length + 1;
else {
if (a = S.getActiveUniformBlockParameter(a,
b, c), null !== a)
if (35395 == c)
for (c = 0; c < a.length; c++) E[d + 4 * c >> 2] = a[c];
else E[d >> 2] = a
}
else W(1281)
},
Oc: (a, b, c, d, e) => {
if (e)
if (0 < b && 0 == c) W(1281);
else {
a = V[a];
for (var f = [], g = 0; g < b; g++) f.push(E[c + 4 * g >> 2]);
if (a = S.getActiveUniforms(a, f, d))
for (b = a.length, g = 0; g < b; g++) E[e + 4 * g >> 2] = a[g]
}
else W(1281)
},
Hf: (a, b, c, d) => {
a = S.getAttachedShaders(V[a]);
var e = a.length;
e > b && (e = b);
E[c >> 2] = e;
for (b = 0; b < e; ++b) E[d + 4 * b >> 2] = Ge.indexOf(a[b])
},
Gf: Xg,
Ff: (a, b) => {
Zg(a, b, 4)
},
zc: (a, b, c) => {
c ? Yg(c, S.getBufferParameter(a, b)) : W(1281)
},
Ef: (a,
b, c) => {
c ? E[c >> 2] = S.getBufferParameter(a, b) : W(1281)
},
Id: (a, b, c) => {
if (35005 == b) {
b = 0;
if (a = Ce[Kg(a)]) b = a.hj;
E[c >> 2] = b
} else W(1280), l("GL_INVALID_ENUM in glGetBufferPointerv")
},
Df: $g,
Cf: ah,
cd: (a, b) => S.getFragDataLocation(V[a], b ? x(v, b) : ""),
Bf: (a, b, c, d) => {
a = S.getFramebufferAttachmentParameter(a, b, c);
if (a instanceof WebGLRenderbuffer || a instanceof WebGLTexture) a = a.name | 0;
E[d >> 2] = a
},
Ac: (a, b, c) => bh(a, b, c, 1),
Cc: (a, b) => {
Zg(a, b, 1)
},
rd: (a, b, c) => bh(a, b, c, 0),
Af: ch,
ac: (a, b, c, d, e) => {
if (0 > d) W(1281);
else if (e) {
if (a =
S.getInternalformatParameter(a, b, c), null !== a)
for (b = 0; b < a.length && b < d; ++b) E[e + 4 * b >> 2] = a[b]
} else W(1281)
},
hc: () => {
W(1282)
},
yf: dh,
zf: eh,
Tg: fh,
Vg: gh,
Sg: fh,
Kd: (a, b, c) => {
if (c) {
a = S.getQueryParameter(Ie[a], b);
var d;
"boolean" == typeof a ? d = a ? 1 : 0 : d = a;
E[c >> 2] = d
} else W(1281)
},
Ug: gh,
Ld: (a, b, c) => {
c ? E[c >> 2] = S.getQuery(a, b) : W(1281)
},
Wg: (a, b, c) => {
c ? E[c >> 2] = S.aj.getQueryEXT(a, b) : W(1281)
},
xf: (a, b, c) => {
c ? E[c >> 2] = S.getRenderbufferParameter(a, b) : W(1281)
},
pc: (a, b, c) => {
c ? H[c >> 2] = S.getSamplerParameter(Je[a], b) : W(1281)
},
qc: (a,
b, c) => {
c ? E[c >> 2] = S.getSamplerParameter(Je[a], b) : W(1281)
},
vf: hh,
uf: (a, b, c, d) => {
a = S.getShaderPrecisionFormat(a, b);
E[c >> 2] = a.rangeMin;
E[c + 4 >> 2] = a.rangeMax;
E[d >> 2] = a.precision
},
tf: (a, b, c, d) => {
if (a = S.getShaderSource(Ge[a])) b = 0 < b && d ? t(a, v, d, b) : 0, c && (E[c >> 2] = b)
},
wf: ih,
sf: jh,
Rc: (a, b) => {
if (2 > R.version) return W(1282), 0;
var c = Oe[a];
if (c) return 0 > b || b >= c.length ? (W(1281), 0) : c[b];
switch (a) {
case 7939:
return c = S.getSupportedExtensions() || [], c = c.concat(c.map(function(d) {
return "GL_" + d
})), c = c.map(function(d) {
return Ka(d)
}),
c = Oe[a] = c, 0 > b || b >= c.length ? (W(1281), 0) : c[b];
default:
return W(1280), 0
}
},
Bc: (a, b, c, d, e) => {
0 > c ? W(1281) : e ? (a = S.getSyncParameter(Le[a], b), null !== a && (E[e >> 2] = a, d && (E[d >> 2] = 1))) : W(1281)
},
rf: (a, b, c) => {
c ? H[c >> 2] = S.getTexParameter(a, b) : W(1281)
},
qf: (a, b, c) => {
c ? E[c >> 2] = S.getTexParameter(a, b) : W(1281)
},
ld: (a, b, c, d, e, f, g) => {
a = V[a];
if (a = S.getTransformFeedbackVarying(a, b)) g && 0 < c ? (c = t(a.name, v, g, c), d && (E[d >> 2] = c)) : d && (E[d >> 2] = 0), e && (E[e >> 2] = a.size), f && (E[f >> 2] = a.type)
},
Nc: (a, b) => S.getUniformBlockIndex(V[a], b ? x(v, b) :
""),
Pc: (a, b, c, d) => {
if (d)
if (0 < b && (0 == c || 0 == d)) W(1281);
else {
a = V[a];
for (var e = [], f = 0; f < b; f++) e.push(td(E[c + 4 * f >> 2]));
if (a = S.getUniformIndices(a, e))
for (b = a.length, f = 0; f < b; f++) E[d + 4 * f >> 2] = a[f]
}
else W(1281)
},
nf: mh,
pf: (a, b, c) => {
nh(a, b, c, 2)
},
of: (a, b, c) => {
nh(a, b, c, 0)
},
dd: (a, b, c) => nh(a, b, c, 0),
jd: ph,
id: ph,
kf: (a, b, c) => {
c ? (R.kj[a].enabled && l("glGetVertexAttribPointer on client-side array: not supported, bad data returned"), E[c >> 2] = S.getVertexAttribOffset(a, b)) : W(1281)
},
mf: (a, b, c) => {
oh(a, b, c, 2)
},
lf: (a, b, c) => {
oh(a,
b, c, 5)
},
jf: function(a, b) {
S.hint(a, b)
},
ec: (a, b, c) => {
for (var d = Dg[b], e = 0; e < b; e++) d[e] = E[c + 4 * e >> 2];
S.invalidateFramebuffer(a, d)
},
dc: (a, b, c, d, e, f, g) => {
for (var h = Dg[b], n = 0; n < b; n++) h[n] = E[c + 4 * n >> 2];
S.invalidateSubFramebuffer(a, h, d, e, f, g)
},
hf: a => (a = Be[a]) ? S.isBuffer(a) : 0,
gf: function(a) {
return S.isEnabled(a)
},
ff: a => (a = De[a]) ? S.isFramebuffer(a) : 0,
ef: a => (a = V[a]) ? S.isProgram(a) : 0,
Od: a => (a = Ie[a]) ? S.isQuery(a) : 0,
_g: a => (a = Ie[a]) ? S.aj.isQueryEXT(a) : 0,
df: a => (a = Ee[a]) ? S.isRenderbuffer(a) : 0,
wc: a => (a = Je[a]) ? S.isSampler(a) : 0,
cf: a => (a = Ge[a]) ? S.isShader(a) : 0,
Gc: a => S.isSync(Le[a]),
bf: a => (a = Fe[a]) ? S.isTexture(a) : 0,
kc: a => S.isTransformFeedback(Ke[a]),
sd: qh,
Og: qh,
af: function(a) {
S.lineWidth(a)
},
$e: rh,
xd: (a, b, c, d) => {
if (0 != (d & 33)) return l("glMapBufferRange access does not support MAP_READ or MAP_UNSYNCHRONIZED"), 0;
if (0 == (d & 2)) return l("glMapBufferRange access must include MAP_WRITE"), 0;
if (0 == (d & 12)) return l("glMapBufferRange access must include INVALIDATE_BUFFER or INVALIDATE_RANGE"), 0;
if (!Lg(a)) return W(1280), l("GL_INVALID_ENUM in glMapBufferRange"),
0;
var e = m(c);
a = Kg(a);
if (!e) return 0;
Ce[a] || (Ce[a] = {});
a = Ce[a];
a.offset = b;
a.length = c;
a.hj = e;
a.Fk = d;
return e
},
jc: function() {
S.pauseTransformFeedback()
},
Ze: sh,
Ye: function(a, b) {
S.polygonOffset(a, b)
},
gc: () => {
W(1280)
},
fc: () => {
W(1280)
},
Xg: (a, b) => {
S.aj.queryCounterEXT(Ie[a], b)
},
Xd: function(a) {
S.readBuffer(a)
},
Xe: vh,
We: () => {},
Ve: wh,
zd: function(a, b, c, d, e) {
S.renderbufferStorageMultisample(a, b, c, d, e)
},
ic: function() {
S.resumeTransformFeedback()
},
Ue: (a, b) => {
S.sampleCoverage(a, !!b)
},
sc: (a, b, c) => {
S.samplerParameterf(Je[a],
b, c)
},
rc: (a, b, c) => {
S.samplerParameterf(Je[a], b, H[c >> 2])
},
uc: (a, b, c) => {
S.samplerParameteri(Je[a], b, c)
},
tc: (a, b, c) => {
S.samplerParameteri(Je[a], b, E[c >> 2])
},
Te: xh,
Se: () => {
W(1280)
},
Re: yh,
Qe: zh,
Pe: function(a, b, c, d) {
S.stencilFuncSeparate(a, b, c, d)
},
Oe: Ah,
Ne: function(a, b) {
S.stencilMaskSeparate(a, b)
},
Me: Bh,
Le: function(a, b, c, d) {
S.stencilOpSeparate(a, b, c, d)
},
Ke: Ch,
Vd: (a, b, c, d, e, f, g, h, n, p) => {
if (S.cj) S.texImage3D(a, b, c, d, e, f, g, h, n, p);
else if (p) {
var q = th(n);
S.texImage3D(a, b, c, d, e, f, g, h, n, q, p >> 31 - Math.clz32(q.BYTES_PER_ELEMENT))
} else S.texImage3D(a,
b, c, d, e, f, g, h, n, null)
},
Je: Dh,
Ie: (a, b, c) => {
S.texParameterf(a, b, H[c >> 2])
},
He: function(a, b, c) {
S.texParameteri(a, b, c)
},
Ge: (a, b, c) => {
S.texParameteri(a, b, E[c >> 2])
},
cc: function(a, b, c, d, e) {
S.texStorage2D(a, b, c, d, e)
},
bc: function(a, b, c, d, e, f) {
S.texStorage3D(a, b, c, d, e, f)
},
Fe: Eh,
Ud: (a, b, c, d, e, f, g, h, n, p, q) => {
if (S.cj) S.texSubImage3D(a, b, c, d, e, f, g, h, n, p, q);
else if (q) {
var u = th(p);
S.texSubImage3D(a, b, c, d, e, f, g, h, n, p, u, q >> 31 - Math.clz32(u.BYTES_PER_ELEMENT))
} else S.texSubImage3D(a, b, c, d, e, f, g, h, n, p, null)
},
md: (a, b, c,
d) => {
a = V[a];
for (var e = [], f = 0; f < b; f++) e.push(td(E[c + 4 * f >> 2]));
S.transformFeedbackVaryings(a, e, d)
},
Ee: Fh,
De: Hh,
Ce: Ih,
Be: Kh,
bd: (a, b) => {
S.uniform1ui(X(a), b)
},
Zc: (a, b, c) => {
b && S.uniform1uiv(X(a), F, c >> 2, b)
},
Ae: (a, b, c) => {
S.uniform2f(X(a), b, c)
},
ze: Lh,
ye: (a, b, c) => {
S.uniform2i(X(a), b, c)
},
xe: Mh,
ad: (a, b, c) => {
S.uniform2ui(X(a), b, c)
},
Yc: (a, b, c) => {
b && S.uniform2uiv(X(a), F, c >> 2, 2 * b)
},
we: (a, b, c, d) => {
S.uniform3f(X(a), b, c, d)
},
ve: Nh,
ue: (a, b, c, d) => {
S.uniform3i(X(a), b, c, d)
},
te: Oh,
$c: (a, b, c, d) => {
S.uniform3ui(X(a), b, c, d)
},
Xc: (a, b, c) => {
b && S.uniform3uiv(X(a), F, c >> 2, 3 * b)
},
se: (a, b, c, d, e) => {
S.uniform4f(X(a), b, c, d, e)
},
re: Ph,
qe: (a, b, c, d, e) => {
S.uniform4i(X(a), b, c, d, e)
},
pe: Qh,
_c: (a, b, c, d, e) => {
S.uniform4ui(X(a), b, c, d, e)
},
Wc: (a, b, c) => {
b && S.uniform4uiv(X(a), F, c >> 2, 4 * b)
},
Kc: (a, b, c) => {
a = V[a];
S.uniformBlockBinding(a, b, c)
},
oe: Rh,
Gd: (a, b, c, d) => {
b && S.uniformMatrix2x3fv(X(a), !!c, H, d >> 2, 6 * b)
},
Ed: (a, b, c, d) => {
b && S.uniformMatrix2x4fv(X(a), !!c, H, d >> 2, 8 * b)
},
ne: Sh,
Fd: (a, b, c, d) => {
b && S.uniformMatrix3x2fv(X(a), !!c, H, d >> 2, 6 * b)
},
Cd: (a, b, c, d) => {
b &&
S.uniformMatrix3x4fv(X(a), !!c, H, d >> 2, 12 * b)
},
me: Th,
Dd: (a, b, c, d) => {
b && S.uniformMatrix4x2fv(X(a), !!c, H, d >> 2, 8 * b)
},
Bd: (a, b, c, d) => {
b && S.uniformMatrix4x3fv(X(a), !!c, H, d >> 2, 12 * b)
},
Jd: a => {
if (!Lg(a)) return W(1280), l("GL_INVALID_ENUM in glUnmapBuffer"), 0;
var b = Ce[Kg(a)];
if (!b || !b.hj) return W(1282), l("buffer was never mapped in glUnmapBuffer"), 0;
b.Fk & 16 || (2 <= R.version ? S.bufferSubData(a, b.offset, v, b.hj, b.length) : S.bufferSubData(a, b.offset, v.subarray(b.hj, b.hj + b.length)));
ca(b.hj);
b.hj = 0;
return 1
},
le: Uh,
ke: a => {
S.validateProgram(V[a])
},
je: function(a, b) {
S.vertexAttrib1f(a, b)
},
ie: (a, b) => {
S.vertexAttrib1f(a, H[b >> 2])
},
he: function(a, b, c) {
S.vertexAttrib2f(a, b, c)
},
ge: (a, b) => {
S.vertexAttrib2f(a, H[b >> 2], H[b + 4 >> 2])
},
fe: function(a, b, c, d) {
S.vertexAttrib3f(a, b, c, d)
},
ee: (a, b) => {
S.vertexAttrib3f(a, H[b >> 2], H[b + 4 >> 2], H[b + 8 >> 2])
},
de: function(a, b, c, d, e) {
S.vertexAttrib4f(a, b, c, d, e)
},
ce: (a, b) => {
S.vertexAttrib4f(a, H[b >> 2], H[b + 4 >> 2], H[b + 8 >> 2], H[b + 12 >> 2])
},
oc: Vh,
Kg: Vh,
Zb: Vh,
$d: Vh,
_b: Vh,
hd: function(a, b, c, d, e) {
S.vertexAttribI4i(a,
b, c, d, e)
},
fd: (a, b) => {
S.vertexAttribI4i(a, E[b >> 2], E[b + 4 >> 2], E[b + 8 >> 2], E[b + 12 >> 2])
},
gd: function(a, b, c, d, e) {
S.vertexAttribI4ui(a, b, c, d, e)
},
ed: (a, b) => {
S.vertexAttribI4ui(a, F[b >> 2], F[b + 4 >> 2], F[b + 8 >> 2], F[b + 12 >> 2])
},
kd: (a, b, c, d, e) => {
var f = R.kj[a];
S.zj ? (f.Gj = !1, S.vertexAttribIPointer(a, b, c, d, e)) : (f.size = b, f.type = c, f.pk = !1, f.Yj = d, f.Ij = e, f.Gj = !0, f.Dk = function(g, h, n, p, q, u) {
this.vertexAttribIPointer(g, h, n, q, u)
})
},
be: Wh,
ae: Xh,
Dc: (a, b, c, d) => {
S.waitSync(Le[a], b, (c >>> 0) + 4294967296 * d)
},
na: () => 0,
fh: () => !ab,
Sb: (a, b,
c) => v.copyWithin(a, b, b + c),
Eh: (a, b) => {
function c(d) {
M(a)(d, b) && requestAnimationFrame(c)
}
return requestAnimationFrame(c)
},
hh: (a, b, c) => Yh(a, {
wk: E[c >> 2],
dk: E[c + 4 >> 2],
ql: E[c + 8 >> 2],
ll: b,
Oj: E[c + 12 >> 2],
Jk: E[c + 16 >> 2]
}),
ja: (a, b) => {
a = If(a);
return a ? a.requestPointerLock ? mf() ? Tf(a) : b ? (kf(Tf, 2, [a]), 1) : -2 : -1 : -4
},
Eb: a => {
var b = v.length;
a >>>= 0;
if (2147483648 < a) return !1;
for (var c = 1; 4 >= c; c *= 2) {
var d = b * (1 + .2 / c);
d = Math.min(d, a + 100663296);
var e = Math;
d = Math.max(a, d);
a: {
e = (e.min.call(e, 2147483648, d + (65536 - d % 65536) % 65536) -
mb.buffer.byteLength + 65535) / 65536;
try {
mb.grow(e);
sb();
var f = 1;
break a
} catch (g) {}
f = void 0
}
if (f) return !0
}
return !1
},
Za: () => (uf = navigator.getGamepads ? navigator.getGamepads() : navigator.webkitGetGamepads ? navigator.webkitGetGamepads() : null) ? 0 : -1,
Qa: (a, b, c) => "undefined" == typeof onbeforeunload ? -1 : 1 !== c ? -5 : Zh(a, b),
L: (a, b, c, d) => $h(a, b, c, d, 12, "blur"),
s: Nf,
ka: (a, b, c) => {
a = If(a);
if (!a) return -4;
a.style.width = b + "px";
a.style.height = c + "px";
return 0
},
M: (a, b, c, d) => $h(a, b, c, d, 13, "focus"),
ma: (a, b, c, d) => {
if (!sf()) return -1;
a = If(a);
if (!a) return -4;
ai(a, b, c, d, "webkitfullscreenchange");
return ai(a, b, c, d, "fullscreenchange")
},
Xa: (a, b, c) => navigator.getGamepads || navigator.webkitGetGamepads ? bi(a, b, c, 26, "gamepadconnected") : -1,
Wa: (a, b, c) => navigator.getGamepads || navigator.webkitGetGamepads ? bi(a, b, c, 27, "gamepaddisconnected") : -1,
Dh: (a, b, c) => setInterval(() => {
Qd(() => M(a)(c))
}, b),
T: (a, b, c, d) => ci(a, b, c, d, 2, "keydown"),
la: (a, b, c, d) => ci(a, b, c, d, 1, "keypress"),
S: (a, b, c, d) => ci(a, b, c, d, 3, "keyup"),
R: (a, b, c, d) => ei(a, b, c, d, 5, "mousedown"),
Ua: (a,
b, c, d) => ei(a, b, c, d, 33, "mouseenter"),
Ta: (a, b, c, d) => ei(a, b, c, d, 34, "mouseleave"),
P: (a, b, c, d) => ei(a, b, c, d, 8, "mousemove"),
Gh: (a, b, c, d) => ei(a, b, c, d, 35, "mouseover"),
Q: (a, b, c, d) => ei(a, b, c, d, 6, "mouseup"),
N: (a, b, c, d) => {
if (!document || !document.body || !(document.body.requestPointerLock || document.body.ck || document.body.Wl || document.body.Ul)) return -1;
a = If(a);
if (!a) return -4;
fi(a, b, c, d, "mozpointerlockchange");
fi(a, b, c, d, "webkitpointerlockchange");
fi(a, b, c, d, "mspointerlockchange");
return fi(a, b, c, d, "pointerlockchange")
},
Sa: (a, b, c, d) => gi(a, b, c, d),
H: (a, b, c, d) => hi(a, b, c, d, 25, "touchcancel"),
J: (a, b, c, d) => hi(a, b, c, d, 23, "touchend"),
I: (a, b, c, d) => hi(a, b, c, d, 24, "touchmove"),
K: (a, b, c, d) => hi(a, b, c, d, 22, "touchstart"),
Ra: (a, b, c) => Hf[1] ? ii(a, b, c) : -4,
Lh: (a, b, c, d) => {
ji(a, b, c, d, 31, "webglcontextlost");
return 0
},
Jh: (a, b, c, d) => {
ji(a, b, c, d, 32, "webglcontextrestored");
return 0
},
O: (a, b, c, d) => (a = If(a)) ? "undefined" != typeof a.onwheel ? ki(a, b, c, d) : -1 : -4,
ih: a => document.title = a ? x(v, a) : "",
n: () => {
throw "Please compile your program with async support in order to use asynchronous operations like emscripten_sleep";
},
eh: function(a, b, c, d, e) {
function f(Q) {
w ? Q() : Qd(Q)
}
var g = a + 112,
h = F[g + 36 >> 2],
n = F[g + 40 >> 2],
p = F[g + 44 >> 2],
q = F[g + 48 >> 2],
u = F[g + 52 >> 2],
w = !!(u & 64),
r = Q => {
f(() => {
h ? M(h)(Q) : b && b(Q)
})
},
B = Q => {
f(() => {
p ? M(p)(Q) : d && d(Q)
})
},
y = Q => {
f(() => {
n ? M(n)(Q) : c && c(Q)
})
},
G = Q => {
f(() => {
q ? M(q)(Q) : e && e(Q)
})
},
L = Q => {
oi(Q, r, y, B, G)
},
O = (Q, Wc) => {
pi(Q, Wc.response, ac => {
f(() => {
h ? M(h)(ac) : b && b(ac)
})
}, ac => {
f(() => {
h ? M(h)(ac) : b && b(ac)
})
})
},
A = Q => {
oi(Q, O, y, B, G)
},
P = td(g + 0),
U = !!(u & 16),
fa = !!(u & 4);
u = !!(u & 32);
if ("EM_IDB_STORE" === P) L = F[g + 84 >> 2], pi(a, v.slice(L,
L + F[g + 88 >> 2]), r, y);
else if ("EM_IDB_DELETE" === P) ri(a, r, y);
else if (U) {
if (u) return 0;
oi(a, fa ? O : r, y, B, G)
} else qi(a, r, u ? y : fa ? A : L);
return a
},
Qh: (a, b) => {
b >>= 2;
b = {
alpha: !!E[b],
depth: !!E[b + 1],
stencil: !!E[b + 2],
antialias: !!E[b + 3],
premultipliedAlpha: !!E[b + 4],
preserveDrawingBuffer: !!E[b + 5],
powerPreference: si[E[b + 6]],
failIfMajorPerformanceCaveat: !!E[b + 7],
Pj: E[b + 8],
Dl: E[b + 9],
gk: E[b + 10],
pl: E[b + 11],
pm: E[b + 12],
qm: E[b + 13]
};
a = If(a);
return !a || b.pl ? 0 : ce(a, b)
},
Ph: (a, b) => {
a = de[a];
b = b ? x(v, b) : "";
b.startsWith("GL_") && (b = b.substr(3));
"ANGLE_instanced_arrays" == b && ve(S);
"OES_vertex_array_object" == b && we(S);
"WEBGL_draw_buffers" == b && xe(S);
"WEBGL_draw_instanced_base_vertex_base_instance" == b && ye(S);
"WEBGL_multi_draw_instanced_base_vertex_base_instance" == b && ze(S);
"WEBGL_multi_draw" == b && (S.El = S.getExtension("WEBGL_multi_draw"));
return !!a.Zi.getExtension(b)
},
Hh: (a, b) => {
if (!b) return -5;
a = de[a];
if (!a) return -3;
var c = a.Zi;
if (!c) return -3;
c = c.getContextAttributes();
E[b >> 2] = c.alpha;
E[b + 4 >> 2] = c.depth;
E[b + 8 >> 2] = c.stencil;
E[b + 12 >> 2] = c.antialias;
E[b +
16 >> 2] = c.premultipliedAlpha;
E[b + 20 >> 2] = c.preserveDrawingBuffer;
E[b + 24 >> 2] = c.powerPreference && si.indexOf(c.powerPreference);
E[b + 28 >> 2] = c.failIfMajorPerformanceCaveat;
E[b + 32 >> 2] = a.version;
E[b + 36 >> 2] = 0;
E[b + 40 >> 2] = a.attributes.gk;
return 0
},
Ih: () => R ? R.handle : 0,
Mh: a => {
a >>= 2;
for (var b = 0; 14 > b; ++b) E[a + b] = 0;
E[a] = E[a + 1] = E[a + 3] = E[a + 4] = E[a + 8] = E[a + 10] = 1
},
Oh: a => ee(a) ? 0 : -5,
oa: a => {
var b = ti[a];
if (!b) return -3;
b.onopen = b.onerror = b.onclose = b.onmessage = null;
delete ti[a];
return 0
},
Ch: () => "undefined" != typeof WebSocket,
Ba: a => {
if ("undefined" == typeof WebSocket) return -1;
if (!a) return -5;
var b = a >> 2;
a = td(E[b]);
a = (b = E[b + 1]) ? new WebSocket(a, (b ? x(v, b) : "").split(",")) : new WebSocket(a);
a.binaryType = "arraybuffer";
b = ti.length;
ti[b] = a;
return b
},
_a: (a, b, c) => {
a = ti[a];
if (!a) return -3;
a.send(v.subarray(b, b + c));
return 0
},
Kh: (a, b) => {
a = ti[a];
if (!a) return -3;
b = b ? x(v, b) : "";
a.send(b);
return 0
},
qa: (a, b, c) => {
Y || (Y = m(1024));
var d = ti[a];
if (!d) return -3;
d.onclose = function(e) {
F[Y >> 2] = a;
F[Y + 4 >> 2] = e.wasClean;
F[Y + 8 >> 2] = e.code;
t(e.reason, v, Y + 10, 512);
M(c)(0,
Y, b)
};
return 0
},
ta: (a, b, c) => {
Y || (Y = m(1024));
var d = ti[a];
if (!d) return -3;
d.onerror = function() {
F[Y >> 2] = a;
M(c)(0, Y, b)
};
return 0
},
ya: (a, b, c) => {
Y || (Y = m(1024));
var d = ti[a];
if (!d) return -3;
d.onmessage = function(e) {
F[Y >> 2] = a;
if ("string" == typeof e.data) {
var f = Ka(e.data),
g = aa(e.data) + 1;
F[Y + 12 >> 2] = 1
} else g = e.data.byteLength, f = m(g), D.set(new Uint8Array(e.data), f), F[Y + 12 >> 2] = 0;
F[Y + 4 >> 2] = f;
F[Y + 8 >> 2] = g;
M(c)(0, Y, b);
ca(f)
};
return 0
},
Aa: (a, b, c) => {
Y || (Y = m(1024));
var d = ti[a];
if (!d) return -3;
d.onopen = function() {
F[Y >> 2] = a;
M(c)(0, Y, b)
};
return 0
},
Mb: (a, b) => {
var c = 0;
wi().forEach((d, e) => {
var f = b + c;
e = F[a + 4 * e >> 2] = f;
for (f = 0; f < d.length; ++f) D[e++ >> 0] = d.charCodeAt(f);
D[e >> 0] = 0;
c += d.length + 1
});
return 0
},
Nb: (a, b) => {
var c = wi();
F[a >> 2] = c.length;
var d = 0;
c.forEach(e => d += e.length + 1);
F[b >> 2] = d;
return 0
},
b: Ud,
E: function(a) {
try {
var b = Yc(a);
hd(b);
return 0
} catch (c) {
if ("undefined" == typeof sd || "ErrnoError" !== c.name) throw c;
return c.Pi
}
},
Ha: function(a, b, c, d) {
try {
a: {
var e = Yc(a);a = b;
for (var f, g = b = 0; g < c; g++) {
var h = F[a >> 2],
n = F[a + 4 >> 2];
a += 8;
var p =
e,
q = h,
u = n,
w = f,
r = D;
if (0 > u || 0 > w) throw new N(28);
if (null === p.fd) throw new N(8);
if (1 === (p.flags & 2097155)) throw new N(8);
if (C(p.node.mode)) throw new N(31);
if (!p.Ni.read) throw new N(28);
var B = "undefined" != typeof w;
if (!B) w = p.position;
else if (!p.seekable) throw new N(70);
var y = p.Ni.read(p, r, q, u, w);
B || (p.position += y);
var G = y;
if (0 > G) {
var L = -1;
break a
}
b += G;
if (G < n) break;
"undefined" !== typeof f && (f += G)
}
L = b
}
F[d >> 2] = L;
return 0
}
catch (O) {
if ("undefined" == typeof sd || "ErrnoError" !== O.name) throw O;
return O.Pi
}
},
Cb: function(a,
b, c, d, e) {
b = c + 2097152 >>> 0 < 4194305 - !!b ? (b >>> 0) + 4294967296 * c : NaN;
try {
if (isNaN(b)) return 61;
var f = Yc(a);
jd(f, b, d);
J = [f.position >>> 0, (I = f.position, 1 <= +Math.abs(I) ? 0 < I ? +Math.floor(I / 4294967296) >>> 0 : ~~+Math.ceil((I - +(~~I >>> 0)) / 4294967296) >>> 0 : 0)];
E[e >> 2] = J[0];
E[e + 4 >> 2] = J[1];
f.uj && 0 === b && 0 === d && (f.uj = null);
return 0
} catch (g) {
if ("undefined" == typeof sd || "ErrnoError" !== g.name) throw g;
return g.Pi
}
},
Ga: function(a, b, c, d) {
try {
a: {
var e = Yc(a);a = b;
for (var f, g = b = 0; g < c; g++) {
var h = F[a >> 2],
n = F[a + 4 >> 2];
a += 8;
var p = kd(e, D,
h, n, f);
if (0 > p) {
var q = -1;
break a
}
b += p;
"undefined" !== typeof f && (f += p)
}
q = b
}
F[d >> 2] = q;
return 0
}
catch (u) {
if ("undefined" == typeof sd || "ErrnoError" !== u.name) throw u;
return u.Pi
}
},
ph: (a, b, c, d) => {
function e(u, w, r, B, y, G) {
var L = 10 === u ? 28 : 16;
if (10 === u) a: {
var O = "";
var A, P = 0,
U = 0,
fa = 0,
Q = 0;y = [y[0] & 65535, y[0] >> 16, y[1] & 65535, y[1] >> 16, y[2] & 65535, y[2] >> 16, y[3] & 65535, y[3] >> 16];
var Wc = !0;
for (A = 0; 5 > A; A++)
if (0 !== y[A]) {
Wc = !1;
break
} if (Wc) {
A = Di(y[6] | y[7] << 16);
if (-1 === y[5]) {
O = "::ffff:" + A;
break a
}
if (0 === y[5]) {
"0.0.0.0" === A && (A =
"");
"0.0.0.1" === A && (A = "1");
O = "::" + A;
break a
}
}
for (A = 0; 8 > A; A++) 0 === y[A] && (1 < A - U && (Q = 0), U = A, Q++),
Q > P && (P = Q, fa = A - P + 1);
for (A = 0; 8 > A; A++) 1 < P && 0 === y[A] && A >= fa && A < fa + P ? A === fa && (O += ":", 0 === fa && (O += ":")) : (O += Number(Ni(y[A] & 65535)).toString(16), O += 7 > A ? ":" : "")
}
else O = Di(y);
y = O;
L = m(L);
a: {
O = y;
switch (u) {
case 2:
O = xi(O);
v.fill(0, L, L + 16);
pb[L >> 1] = u;
E[L + 4 >> 2] = O;
pb[L + 2 >> 1] = yi(G);
break;
case 10:
O = zi(O);
v.fill(0, L, L + 28);
E[L >> 2] = u;
E[L + 8 >> 2] = O[0];
E[L + 12 >> 2] = O[1];
E[L + 16 >> 2] = O[2];
E[L + 20 >> 2] = O[3];
pb[L + 2 >> 1] = yi(G);
break;
default:
G =
5;
break a
}
G = 0
}!G || lb();
G = m(32);
E[G + 4 >> 2] = u;
E[G + 8 >> 2] = w;
E[G + 12 >> 2] = r;
F[G + 24 >> 2] = B;
F[G + 20 >> 2] = L;
E[G + 16 >> 2] = 10 === u ? 28 : 16;
E[G + 28 >> 2] = 0;
return G
}
var f = 0,
g = 0,
h = 0,
n = 0,
p = 0,
q = 0;
c && (h = E[c >> 2], n = E[c + 4 >> 2], p = E[c + 8 >> 2], q = E[c + 12 >> 2]);
p && !q && (q = 2 === p ? 17 : 6);
!p && q && (p = 17 === q ? 2 : 1);
0 === q && (q = 6);
0 === p && (p = 1);
if (!a && !b) return -2;
if (h & -1088 || 0 !== c && E[c >> 2] & 2 && !a) return -1;
if (h & 32) return -2;
if (0 !== p && 1 !== p && 2 !== p) return -7;
if (0 !== n && 2 !== n && 10 !== n) return -6;
if (b && (b = b ? x(v, b) : "", g = parseInt(b, 10), isNaN(g))) return h & 1024 ? -2 : -8;
if (!a) return 0 === n && (n = 2), 0 === (h & 1) && (2 === n ? f = Oi(2130706433) : f = [0, 0, 0, 1]), a = e(n, p, q, null, f, g), F[d >> 2] = a, 0;
a = a ? x(v, a) : "";
f = xi(a);
if (null !== f)
if (0 === n || 2 === n) n = 2;
else if (10 === n && h & 8) f = [0, 0, Oi(65535), f], n = 10;
else return -2;
else if (f = zi(a), null !== f)
if (0 === n || 10 === n) n = 10;
else return -2;
if (null != f) return a = e(n, p, q, a, f, g), F[d >> 2] = a, 0;
if (h & 4) return -2;
a = Ci(a);
f = xi(a);
0 === n ? n = 2 : 10 === n && (f = [0, 0, Oi(65535), f]);
a = e(n, p, q, null, f, g);
F[d >> 2] = a;
return 0
},
fa: Vf,
ra: Wf,
B: Xf,
qb: Yf,
y: Zf,
c: $f,
Ca: bg,
Da: cg,
C: dg,
tb: eg,
pb: fg,
D: gg,
ba: hg,
Ja: ig,
$b: jg,
_: kg,
mb: lg,
W: mg,
jb: ng,
ob: og,
vb: pg,
da: qg,
ua: rg,
z: sg,
v: tg,
ha: ug,
Ma: wg,
Ea: xg,
_e: yg,
l: zg,
sb: Ag,
rb: Bg,
m: Hg,
q: Ig,
F: Jg,
va: Mg,
r: Ng,
xb: Og,
ub: Qg,
Ka: Rg,
xa: Sg,
g: Tg,
U: Wg,
u: Xg,
Na: $g,
Oa: ah,
ia: ch,
hb: dh,
V: eh,
lb: hh,
sa: ih,
k: jh,
d: mh,
ib: rh,
La: sh,
ea: vh,
wa: wh,
w: xh,
nb: yh,
Y: zh,
wb: Ah,
Z: Bh,
h: Ch,
f: Dh,
ca: Eh,
X: Fh,
gb: Hh,
A: Ih,
db: Kh,
fb: Lh,
cb: Mh,
eb: Nh,
bb: Oh,
p: Ph,
ab: Qh,
$a: Rh,
Sh,
za: Th,
kb: Uh,
i: Wh,
G: Xh,
ga: Gi,
Db: (a, b, c, d) => Gi(a, b, c, d)
},
Z = function() {
function a(c) {
Z = c.exports;
mb = Z.Th;
sb();
Zb = Z.Wh;
ub.unshift(Z.Uh);
Eb("wasm-instantiate");
return Z
}
var b = {
a: Pi
};
Db("wasm-instantiate");
if (k.instantiateWasm) try {
return k.instantiateWasm(b, a)
} catch (c) {
return l(`Module.instantiateWasm callback failed with error: `), !1
}
Mb(b, function(c) {
a(c.instance)
});
return {}
}(),
ba = k._memcpy = (a, b, c) => (ba = k._memcpy = Z.Vh)(a, b, c),
m = a => (m = Z.Xh)(a),
ca = a => (ca = Z.Yh)(a),
Li = () => (Li = Z.Zh)(),
yi = a => (yi = Z._h)(a);
k._chat_callback = (a, b) => (k._chat_callback = Z.$h)(a, b);
k._join_game_callback = a => (k._join_game_callback = Z.ai)(a);
k._api_error_callback = (a, b) => (k._api_error_callback = Z.bi)(a, b);
k._create_game_callback = (a, b, c) => (k._create_game_callback = Z.ci)(a, b, c);
k._player_info_callback = (a, b, c, d, e, f) => (k._player_info_callback = Z.di)(a, b, c, d, e, f);
k._log_next_game_state = () => (k._log_next_game_state = Z.ei)();
k._start_game = () => (k._start_game = Z.fi)();
var Oi = a => (Oi = Z.gi)(a),
Ni = a => (Ni = Z.hi)(a);
k._wallpaper_update_config = a => (k._wallpaper_update_config = Z.ii)(a);
k._wallpaper_reset_config = () => (k._wallpaper_reset_config = Z.ji)();
k._wallpaper_update_subscription_data = a => (k._wallpaper_update_subscription_data = Z.ki)(a);
k._video_playback_started = () => (k._video_playback_started = Z.li)();
k._video_playback_ended = () => (k._video_playback_ended = Z.mi)();
k._post_video_upload_callback = a => (k._post_video_upload_callback = Z.ni)(a);
k._GXC_FSSyncCompleted = () => (k._GXC_FSSyncCompleted = Z.oi)();
k._on_post_message_callback = (a, b) => (k._on_post_message_callback = Z.pi)(a, b);
k._on_orientation_update_callback = (a, b, c) => (k._on_orientation_update_callback = Z.qi)(a, b, c);
k._on_request_permission_callback = (a, b) => (k._on_request_permission_callback = Z.ri)(a, b);
k._YYSum = (a, b) => (k._YYSum = Z.si)(a, b);
var Qi = k._main = (a, b) => (Qi = k._main = Z.ti)(a, b);
k._FSSyncCompleted = () => (k._FSSyncCompleted = Z.ui)();
var Fb = () => (Fb = Z.vi)(),
Mi = a => (Mi = Z.wi)(a),
bf = () => (bf = Z.xi)(),
cf = a => (cf = Z.yi)(a),
Kf = a => (Kf = Z.zi)(a);
k.dynCall_viij = (a, b, c, d, e) => (k.dynCall_viij = Z.Ai)(a, b, c, d, e);
k.dynCall_vij = (a, b, c, d) => (k.dynCall_vij = Z.Bi)(a, b, c, d);
k.dynCall_iiiiiij = (a, b, c, d, e, f, g, h) => (k.dynCall_iiiiiij = Z.Ci)(a, b, c, d, e, f, g, h);
k.dynCall_iiji = (a, b, c, d, e) => (k.dynCall_iiji = Z.Di)(a, b, c, d, e);
k.dynCall_jiji = (a, b, c, d, e) => (k.dynCall_jiji = Z.Ei)(a, b, c, d, e);
k.dynCall_ji = (a, b) => (k.dynCall_ji = Z.Fi)(a, b);
k.dynCall_viijii = (a, b, c, d, e, f, g) => (k.dynCall_viijii = Z.Gi)(a, b, c, d, e, f, g);
k.dynCall_iiiiij = (a, b, c, d, e, f, g) => (k.dynCall_iiiiij = Z.Hi)(a, b, c, d, e, f, g);
k.dynCall_iiiiijj = (a, b, c, d, e, f, g, h, n) => (k.dynCall_iiiiijj = Z.Ii)(a, b, c, d, e, f, g, h, n);
k.dynCall_iiiiiijj = (a, b, c, d, e, f, g, h, n, p) => (k.dynCall_iiiiiijj = Z.Ji)(a, b, c, d, e, f, g, h, n, p);
k.addRunDependency = Db;
k.removeRunDependency = Eb;
k.FS_createPath = nd;
k.FS_createLazyFile = rd;
k.FS_createDevice = pd;
k.dynCall = Ub;
k.cwrap = (a, b, c, d) => {
var e = !c || c.every(f => "number" === f || "boolean" === f);
return "string" !== b && e && !d ? k["_" + a] : function() {
return Ob(a, b, c, arguments)
}
};
k.getValue = Rb;
k.FS_createPreloadedFile = Dc;
k.FS_createDataFile = Cc;
k.FS_unlink = Va;
var Ri;
Cb = function Si() {
Ri || Ti();
Ri || (Cb = Si)
};
function Ui(a = []) {
var b = Qi;
a.unshift(Ya);
var c = a.length,
d = Kf(4 * (c + 1)),
e = d;
a.forEach(g => {
F[e >> 2] = Lf(g);
e += 4
});
F[e >> 2] = 0;
try {
var f = b(c, d);
Ud(f, !0)
} catch (g) {
Sd(g)
}
}
function Ti() {
var a = Xa;
function b() {
if (!Ri && (Ri = !0, k.calledRun = !0, !nb)) {
yb = !0;
k.noFSInit || md || (md = !0, ld(), k.stdin = k.stdin, k.stdout = k.stdout, k.stderr = k.stderr, k.stdin ? pd("/dev", "stdin", k.stdin) : dd("/dev/tty", "/dev/stdin"), k.stdout ? pd("/dev", "stdout", null, k.stdout) : dd("/dev/tty", "/dev/stdout"), k.stderr ? pd("/dev", "stderr", null, k.stderr) : dd("/dev/tty1", "/dev/stderr"), fd("/dev/stdin", 0), fd("/dev/stdout", 1), fd("/dev/stderr", 1));
Kc = !1;
Xb(ub);
Xb(vb);
if (k.onRuntimeInitialized) k.onRuntimeInitialized();
Vi &&
Ui(a);
if (k.postRun)
for ("function" == typeof k.postRun && (k.postRun = [k.postRun]); k.postRun.length;) {
var c = k.postRun.shift();
xb.unshift(c)
}
Xb(xb)
}
}
if (!(0 < Ab)) {
if (k.preRun)
for ("function" == typeof k.preRun && (k.preRun = [k.preRun]); k.preRun.length;) zb();
Xb(tb);
0 < Ab || (k.setStatus ? (k.setStatus("Running..."), setTimeout(function() {
setTimeout(function() {
k.setStatus("")
}, 1);
b()
}, 1)) : b())
}
}
if (k.preInit)
for ("function" == typeof k.preInit && (k.preInit = [k.preInit]); 0 < k.preInit.length;) k.preInit.pop()();
var Vi = !0;
k.noInitialRun && (Vi = !1);
Ti();
(function() {
if ("undefined" != typeof window && !window.Ki) {
webtransport_async_read = async d => {
try {
let g = d.transport.datagrams.readable.getReader();
for (var e = !1; !e;) {
var f;
({
value: f,
done: e
} = await g.read());
d.Wj.push(f)
}
console.log("Closing WebTransport connection")
} catch (g) {
console.error("Could not open channel to read datagrams, " + g)
}
};
webtransport_async_connect = async (d, e) => {
try {
await d.transport.ready;
console.log("Connected successfully to relay.");
try {
d.sj = d.transport.datagrams.writable.getWriter()
} catch (f) {
console.error("Could not open channel to send datagrams, " + f)
}
} catch (f) {
console.error("Connection failed to " +
e + ", " + f)
}
d.transport.closed.then(() => {
d.sj = null;
console.log("Connection to " + e + " closed gracefully")
}).catch(() => {
d.sj = null;
console.error("Connection to " + e + " closed abruptly")
});
webtransport_async_read(d)
};
class c {
constructor() {
this.sj = this.transport = null;
this.Wj = [];
this.url = ""
}
destroy() {
null != this.transport && this.transport && (this.transport.close(), this.transport = null);
this.sj = null
}
async connect(d, e) {
try {
d.transport = new WebTransport(e)
} catch (f) {
console.error("Failed to initialise WebTransport, " +
f)
}
await webtransport_async_connect(d, e)
}
async send(d, e) {
null == this.transport && await this.connect(this, this.url);
for (var f = 10; !this.sj && f;) await new Promise(n => setTimeout(n, 100)), f--;
if (this.sj) {
d = k.HEAPU8.subarray(d, d + e);
f = new ArrayBuffer(e);
for (var g = new Uint8Array(f), h = 0; h < e; h++) g[h] = d[h];
this.sj.write(f)
} else console.log("DatagramWriter is not initialized. Couldn't send message.")
}
Il(d, e) {
if (0 == this.Wj.length) return -1;
var f = this.Wj[0];
this.Wj.shift();
var g = f.length;
if (g > e) return -1;
d = k.HEAPU8.subarray(d,
d + g);
for (e = 0; e < g; e++) d[e] = f[e];
return g
}
}
var a = [],
b = 0;
webtransport_set_relay = (d, e) => {
const f = b++;
a[f] = new c;
a[f].url = d + ":" + e;
return f
};
webtransport_send = (d, e, f) => {
a[d].send(e, f)
};
webtransport_receive = (d, e, f) => a[d].Il(e, f);
webtransport_destroy = d => {
a[d].destroy();
a[d] = null
}
}
})();
"undefined" != typeof window && (api_error_callback = k.cwrap("api_error_callback", null, ["number", "string"]), create_game_callback = k.cwrap("create_game_callback", null, ["string", "string", "string"]), join_game_callback = k.cwrap("join_game_callback", null, ["string"]), chat_callback = k.cwrap("chat_callback", null, ["string", "number"]), player_info_callback = k.cwrap("player_info_callback", null, "number string string string bool string".split(" ")), log_next_game_state = k.cwrap("log_next_game_state", null, []), start_game = k.cwrap("start_game",
null, []), init_request_parameters = a => {
var b = {
method: "POST",
credentials: "include",
headers: {}
};
b.headers["Content-Type"] = "application/json;charset=UTF-8";
b.headers["Access-Control-Allow-Credentials"] = "true";
b.body = JSON.stringify(a);
return b
}, gxc_room_size = 4, gxc_local_player = 0, gxc_player_info = [], gxc_set_room_info = (a, b) => {
gxc_room_size = a;
gxc_local_player = b
}, set_local_share_url = a => {
window.shareUrl = a;
if (a = document.getElementById("share-button")) a.style.visibility = "visible"
}, post_share_url = a => {
if (window.parent) {
var b = {
type: "share_url"
};
b.shareUrl = a;
window.parent.postMessage(b, "*")
}
}, gxc_request_room = (a, b, c, d, e, f) => {
var g = location.host.startsWith("localhost") || location.host.startsWith("test.vectorwars.gmx.dev");
g && (e = "debug");
console.log("Requesting " + c + "-player game with game-id " + e);
var h = {};
h.region = b;
h.roomSize = c;
h.lateJoin = !!d;
b = init_request_parameters(h);
fetch("https://" + a + "/gg/games/" + e + "/rooms" + (f.length ? "?trackId=" + f : ""), b).then(n => {
n.ok ? n.json().then(p => {
var q = p.data.shareUrl,
u = p.data.roomUrl;
p = p.data.joinRoomUrl;
g ? (q = location.protocol + "//" + location.host + location.pathname + "?game=debug&roomUrl=" + u, set_local_share_url(q)) : post_share_url(q);
create_game_callback(p, q, u)
}) : n.json().then(p => {
if (window.parent) {
var q = {
type: "api_error"
};
q.error = p.errors[0].code;
window.parent.postMessage(q, "*")
}
api_error_callback(n.status, p.errors[0].code)
})
})
}, gxc_join_room = (a, b, c, d) => {
console.log("Joining game '" + b + "' with track-id '" + c + "' on environment '" + a + "' using url " + d);
var e = {};
"debug" != b && (e.gameId = b, e.trackId = c);
e.roomUrl =
d;
b = init_request_parameters(e);
fetch("https://" + a + "/gg/rooms", b).then(f => {
f.ok ? f.json().then(g => {
join_game_callback(g.data.roomUrl)
}) : f.json().then(g => {
if (window.parent) {
var h = {
type: "api_error"
};
h.error = g.errors[0].code;
window.parent.postMessage(h, "*")
}
api_error_callback(f.status, g.errors[0].code)
})
});
location.host.startsWith("localhost") || location.host.startsWith("test.vectorwars.gmx.dev") ? set_local_share_url(window.location.href) : post_share_url(window.location.href)
}, gxc_get_player_info = (a, b, c) => {
console.log("Requesting player info.");
var d = {
method: "GET",
credentials: "include",
headers: {}
};
d.headers["Content-Type"] = "application/json;charset=UTF-8";
d.headers["Access-Control-Allow-Credentials"] = "true";
let e = "https://" + b + "/images/AvatarPlaceholder.png";
fetch("https://" + a + "/gg/v2/rooms?roomUrl=" + c, d).then(f => {
f.ok ? f.json().then(g => {
gxc_player_info = g.data.players;
gxc_player_info.forEach(h => {
null !== h.playerId && (null === h.user.userId ? (h.user.userId = "", h.user.guest = !0) : h.user.guest = !1, null === h.user.username &&
(h.user.username = "unknown"), null === h.user.avatarUrl && (h.user.avatarUrl = e))
});
window.parent && (g = {
type: "players"
}, g.roomSize = gxc_room_size, g.local = gxc_local_player, g.players = gxc_player_info, window.parent.postMessage(g, "*"));
gxc_player_info.forEach(h => {
null !== h.playerId && player_info_callback(h.playerId, h.user.username, h.user.avatarUrl, h.status, h.user.guest, h.user.userId)
})
}) : (404 == f.status && [0, 1, 2, 3].forEach(g => player_info_callback(g, "unknown", e, "JOINED", !0, "")), f.json().then(g => console.log(g)))
})
},
gxc_set_player_status = (a, b) => {
gxc_player_info.forEach(d => {
d.playerId === a && (d.status = b)
});
if (window.parent) {
var c = {
type: "players"
};
c.roomSize = gxc_room_size;
c.local = gxc_local_player;
c.players = gxc_player_info;
window.parent.postMessage(c, "*")
}
}, window.addEventListener("message", a => {
if (a && a.data && "parent_send_chat_message" == a.data.type) {
var b = a.data.ml;
if (null === b || void 0 === b) b = -1;
chat_callback(a.data.content || "", b)
}
}), gxc_receive_chat_message = (a, b, c) => {
window.parent.postMessage({
type: "receive_chat_message",
content: a,
src: b,
ml: c
}, "*")
}, gxc_report_status = a => {
window.parent.postMessage({
type: "report_status",
status: a
}, "*")
});
"undefined" != typeof window && (wallpaper_update_config = k.cwrap("wallpaper_update_config", null, ["string"]), wallpaper_reset_config = k.cwrap("wallpaper_reset_config", null, ["string"]), wallpaper_update_subscription_data = k.cwrap("wallpaper_update_subscription_data", null, ["string"]));

Xet Storage Details

Size:
277 kB
·
Xet hash:
8aabd97aa059a4a54e91900ec101d7ee9a69d8a35c44b5ea1f971f27b12277c1

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.