Files
discord-decomp/_bundle/Module197.js
T
2026-11-01 12:12:55 +02:00

877 lines
22 KiB
JavaScript

// Metro module 197 (f198).
function $mk113346($env) {
return function(a0) {
let env31139;
L10: {
const r2 = $env;
const r4 = $env.$parent;
const r3 = r2[0];
const r7 = r2[1];
const r10 = env31139 = {
$parent: r4
};
env31139[0] = r3;
env31139[1] = r7;
const r5 = r4.$parent;
const r9 = r5[6];
const r8 = r4[0];
const r12 = r9(r8.next, r8, a0);
if (r12.type !== "throw") {
const arg = r12.arg;
env31139[2] = arg;
const value = arg.value;
if (value && typeof value === "object" && r5[1].call(value, "__await")) {
const r34 = r4[1].resolve(value.__await);
const r36 = $mk113347(r10);
r34.then($mk113346(r10), r36);
break L10;
}
const r26 = r4[1].resolve(value);
const r28 = $mk113349(r10);
r26.then($mk113348(r10), r28);
} else {
r7(r12.arg);
}
}
};
}
function $mk113347($env) {
return function(a0) {
let env31140;
L10: {
const r2 = $env;
const r4 = $env.$parent;
const r3 = r2[0];
const r7 = r2[1];
const r10 = env31140 = {
$parent: r4
};
env31140[0] = r3;
env31140[1] = r7;
const r5 = r4.$parent;
const r9 = r5[6];
const r8 = r4[0];
const r12 = r9(r8.throw, r8, a0);
if (r12.type !== "throw") {
const arg = r12.arg;
env31140[2] = arg;
const value = arg.value;
if (value && typeof value === "object" && r5[1].call(value, "__await")) {
const r34 = r4[1].resolve(value.__await);
const r36 = $mk113347(r10);
r34.then($mk113346(r10), r36);
break L10;
}
const r26 = r4[1].resolve(value);
const r28 = $mk113349(r10);
r26.then($mk113348(r10), r28);
} else {
r7(r12.arg);
}
}
};
}
function $mk113348($env) {
return function(a0) {
const r1 = $env;
const r2 = r1[2];
r2.value = a0;
(0, r1[0])(r2);
};
}
function $mk113349($env) {
return function(a0) {
let r17, r31;
let env31141;
const r3 = $env;
const r6 = $env.$parent;
const r2 = r3[0];
const r7 = r3[1];
const r4 = env31141 = {
$parent: r6
};
env31141[0] = r2;
env31141[1] = r7;
const r10 = r6.$parent;
const r9 = r10[6];
const r8 = r6[0];
const r12 = r9(r8.throw, r8, a0);
if (r12.type !== "throw") {
const arg = r12.arg;
env31141[2] = arg;
const value = arg.value;
if (value && typeof value === "object" && r10[1].call(value, "__await")) {
const r35 = r6[1].resolve(value.__await);
const r37 = $mk113347(r4);
r31 = r35.then($mk113346(r4), r37);
} else {
const r27 = r6[1].resolve(value);
const r29 = $mk113349(r4);
r31 = r27.then($mk113348(r4), r29);
}
r17 = r31;
} else {
r7(r12.arg);
r17 = void 0;
}
return r17;
};
}
function $mk100964($env) {
return function enqueue(a0, a1) {
let r11;
let env28622;
const r1 = $env;
const r2 = env28622 = {
$parent: $env
};
env28622[0] = a0;
env28622[1] = a1;
const r4 = r1[2];
if (r4) {
const callInvokeWithMethodAndArg = function callInvokeWithMethodAndArg() {
return new env28622.$parent[1]($mk117508(env28622));
};
r11 = r4.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg);
} else {
r11 = new r1[1]($mk117508(r2));
}
r1[2] = r11;
return r11;
};
}
function $mk100965($env) {
return function invoke(a0, a1) {
const r10 = $env;
const r4 = r10[3];
const r9 = $env.$parent;
if (r4 === r9[9]) {
throw new Error("Generator is already running");
}
if (r4 === r9[10]) {
if (a0 === "throw") {
throw a1;
}
return {
value: void 0,
done: true
};
}
const r19 = r10[2];
r19.method = a0;
r19.arg = a1;
while (true) {
const r11 = r10[2];
const delegate = r11.delegate;
if (delegate) {
const r22 = (0, r9[17])(delegate, r11);
if (r22) {
if (r22 === r9[11]) {
continue;
}
return r22;
}
}
if (r11.method === "next") {
const arg = r11.arg;
r11._sent = arg;
r11.sent = arg;
} else if (r11.method === "throw") {
if (r10[3] === r9[7]) {
r10[3] = r9[10];
throw r11.arg;
}
r11.dispatchException(r11.arg);
} else if (r11.method === "return") {
r11.abrupt("return", r11.arg);
}
r10[3] = r9[9];
const r39 = (0, r9[6])(r10[0], r10[1], r11);
if (r39.type === "normal") {
r10[3] = r11.done ? r9[10] : r9[8];
if (r39.arg !== r9[11]) {
return {
value: r39.arg,
done: r11.done
};
}
} else if (r39.type === "throw") {
r10[3] = r9[10];
r11.method = "throw";
r11.arg = r39.arg;
}
}
};
}
function $mk100966($env) {
return function next() {
let r3, r12;
const r4 = $env;
const r0 = r4[1] + 1;
r4[1] = r0;
const length = r4[0].length;
const r5 = $env.$parent;
if (r0 < length) {
do {
const r6 = r5[1];
r3 = r4[0];
if (r6.call(r3, r4[1])) {
const r17 = r4[2];
r17.value = r3[r4[1]];
r17.done = false;
return r17;
}
r12 = r4[1] + 1;
r4[1] = r12;
} while (r12 < r3.length);
}
const r14 = r4[2];
r14.value = void 0;
r14.done = true;
return r14;
};
}
function $mk117508($env) {
return function(a0, a1) {
let env31848;
L10: {
const r2 = $env;
const r4 = $env.$parent;
const r3 = r2[0];
const r9 = r2[1];
const r10 = env31848 = {
$parent: r4
};
env31848[0] = a0;
env31848[1] = a1;
const r11 = r4.$parent;
const r8 = r11[6];
const r6 = r4[0];
const r13 = r8(r6[r3], r6, r9);
if (r13.type !== "throw") {
const arg = r13.arg;
env31848[2] = arg;
const value = arg.value;
if (value && typeof value === "object" && r11[1].call(value, "__await")) {
const r35 = r4[1].resolve(value.__await);
const r37 = $mk113347(r10);
r35.then($mk113346(r10), r37);
break L10;
}
const r27 = r4[1].resolve(value);
const r29 = $mk113349(r10);
r27.then($mk113348(r10), r29);
} else {
a1(r13.arg);
}
}
};
}
const r1 = typeof module === "object" ? module.exports : {};
(function(a0) {
"use strict";
let r31;
let env12203 = {};
env12203[0] = a0;
const r1 = function(a0, a1, a2) {
Object.defineProperty(a0, a1, {
value: a2,
enumerable: true,
configurable: true,
writable: true
});
return a0[a1];
};
env12203[5] = r1;
env12203[6] = function tryCatch(a0, a1, a2) {
let r5;
try {
r5 = {
type: "normal",
arg: a0.call(a1, a2)
};
} catch ($e) {
return {
type: "throw",
arg: $e
};
}
return r5;
};
const Generator = function Generator() {};
env12203[12] = Generator;
const GeneratorFunction = function GeneratorFunction() {};
env12203[13] = GeneratorFunction;
const GeneratorFunctionPrototype = function GeneratorFunctionPrototype() {};
env12203[14] = GeneratorFunctionPrototype;
const AsyncIterator2 = function(a0, a1) {
let env23596;
const r1 = env23596 = {
$parent: env12203
};
env23596[0] = a0;
env23596[1] = a1;
(0, env12203[2])(this, "_invoke", {
value: $mk100964(r1)
});
};
env12203[16] = AsyncIterator2;
env12203[17] = function maybeInvokeDelegate(a0, a1) {
let r25;
const method = a1.method;
const r10 = a0.iterator[method];
if (r10 === void 0) {
a1.delegate = null;
let r40 = method === "throw" && a0.iterator.return;
if (r40) {
a1.method = "return";
a1.arg = void 0;
(0, env12203[17])(a0, a1);
r40 = a1.method === "throw";
}
if (!r40 && method !== "return") {
a1.method = "throw";
a1.arg = new TypeError("The iterator does not provide a '" + method + "' method");
}
return env12203[11];
}
const r18 = (0, env12203[6])(r10, a0.iterator, a1.arg);
if (r18.type === "throw") {
a1.method = "throw";
a1.arg = r18.arg;
a1.delegate = null;
return env12203[11];
}
const arg = r18.arg;
if (arg) {
const done = arg.done;
let r27 = arg;
if (done) {
a1[a0.resultName] = arg.value;
a1.next = a0.nextLoc;
if (a1.method !== "return") {
a1.method = "next";
a1.arg = void 0;
}
a1.delegate = null;
r27 = env12203[11];
}
r25 = r27;
} else {
a1.method = "throw";
a1.arg = new TypeError("iterator result is not an object");
a1.delegate = null;
r25 = env12203[11];
}
return r25;
};
env12203[18] = function pushTryEntry(a0) {
const r4 = {
tryLoc: a0[0]
};
if (1 in a0) {
r4.catchLoc = a0[1];
}
if (2 in a0) {
r4.finallyLoc = a0[2];
r4.afterLoc = a0[3];
}
this.tryEntries.push(r4);
};
env12203[19] = function resetTryEntry(a0) {
const completion = a0.completion || {};
completion.type = "normal";
delete completion["arg"];
a0.completion = completion;
};
const Context = function Context(a0) {
this.tryEntries = [{
tryLoc: "root"
}];
a0.forEach(env12203[18], this);
this.reset(true);
};
env12203[20] = Context;
env12203[21] = function doneResult() {
return {
value: void 0,
done: true
};
};
const prototype = Object.prototype;
const hasOwnProperty = prototype.hasOwnProperty;
env12203[1] = hasOwnProperty;
const r16 = Object.defineProperty || function(a0, a1, a2) {
a0[a1] = a2.value;
};
env12203[2] = r16;
const r8 = typeof globalThis.Symbol === "function" ? Symbol : {};
const r28 = r8.iterator || "@@iterator";
env12203[3] = r28;
const r14 = r8.asyncIterator || "@@asyncIterator";
const r9 = r8.toStringTag || "@@toStringTag";
env12203[4] = r9;
try {
r1({}, "");
r31 = r1;
} catch ($e) {
const r33 = function(a0, a1, a2) {
a0[a1] = a2;
return a2;
};
env12203[5] = r33;
r31 = r33;
}
const wrap = function wrap(a0, a1, a2, a3) {
const r1 = a1 && a1.prototype instanceof env12203[12] ? a1 : env12203[12];
let r4 = a3;
const r13 = Object.create(r1.prototype);
const r14 = env12203[20];
if (!a3) {
r4 = [];
}
let env23594;
const r6 = {
__proto__: r14.prototype
};
r6.tryEntries = [{
tryLoc: "root"
}];
r4.forEach(env12203[18], r6);
r6.reset(true);
const r24 = env12203[2];
const r25 = env23594 = {
$parent: env12203
};
env23594[0] = a0;
env23594[1] = a2;
env23594[2] = r6;
env23594[3] = env12203[7];
r24(r13, "_invoke", {
value: $mk100965(r25)
});
return r13;
};
const values = function values(a0) {
let env23597;
const r6 = env23597 = {
$parent: env12203
};
env23597[0] = a0;
if (a0) {
const r3 = a0[env12203[3]];
if (r3) {
return r3.call(a0);
}
if (typeof a0.next === "function") {
return a0;
}
if (!isNaN(a0.length)) {
env23597[1] = -1;
const next3 = $mk100966(r6);
env23597[2] = next3;
next3.next = next3;
return next3;
}
}
return {
next: env12203[21]
};
};
a0.wrap = wrap;
env12203[7] = "suspendedStart";
env12203[8] = "suspendedYield";
env12203[9] = "executing";
env12203[10] = "completed";
env12203[11] = {};
let r17 = {};
r31(r17, r28, function() {
return this;
});
const getPrototypeOf = Object.getPrototypeOf;
const r44 = getPrototypeOf && getPrototypeOf(getPrototypeOf(values([])));
if ((r44 ? r44 !== prototype : r44) && hasOwnProperty.call(r44, r28)) {
r17 = r44;
}
const defineIteratorMethods = function defineIteratorMethods(c23595_0) {
["next", "throw", "return"].forEach(function(item) {
(0, env12203[5])(c23595_0, item, function(a0) {
return this._invoke(item, a0);
});
});
};
const prototype2 = Object.create(r17);
Generator.prototype = prototype2;
GeneratorFunctionPrototype.prototype = prototype2;
env12203[15] = prototype2;
GeneratorFunction.prototype = GeneratorFunctionPrototype;
r16(prototype2, "constructor", {
value: GeneratorFunctionPrototype,
configurable: true
});
r16(GeneratorFunctionPrototype, "constructor", {
value: GeneratorFunction,
configurable: true
});
GeneratorFunction.displayName = r31(GeneratorFunctionPrototype, r9, "GeneratorFunction");
a0.isGeneratorFunction = function(a0) {
const r3 = typeof a0 === "function" ? a0.constructor : typeof a0 === "function";
return !!r3 && (r3 === env12203[13] || (r3.displayName || r3.name) === "GeneratorFunction");
};
a0.mark = function(a0) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(a0, env12203[14]);
} else {
a0.__proto__ = env12203[14];
(0, env12203[5])(a0, env12203[4], "GeneratorFunction");
}
a0.prototype = Object.create(env12203[15]);
return a0;
};
a0.awrap = function(a0) {
return {
__await: a0
};
};
defineIteratorMethods(AsyncIterator2.prototype);
r31(AsyncIterator2.prototype, r14, function() {
return this;
});
a0.AsyncIterator = AsyncIterator2;
a0.async = function(a0, a1, a2, a3, a4) {
const r4 = a4 === void 0 ? Promise : a4;
const r5 = env12203[16];
const r15 = a1 ? a1.prototype instanceof env12203[12] ? a1 : env12203[12] : env12203[12];
let r9 = a3;
const r10 = Object.create(r15.prototype);
const r19 = env12203[20];
if (!a3) {
r9 = [];
}
let env23599;
let env23600;
const r11 = {
__proto__: r19.prototype
};
r11.tryEntries = [{
tryLoc: "root"
}];
r9.forEach(env12203[18], r11);
r11.reset(true);
const r30 = env12203[2];
const r31 = env23599 = {
$parent: env12203
};
env23599[0] = a0;
env23599[1] = a2;
env23599[2] = r11;
env23599[3] = env12203[7];
r30(r10, "_invoke", {
value: $mk100965(r31)
});
const r38 = {
__proto__: r5.prototype
};
const r39 = env23600 = {
$parent: env12203
};
env23600[0] = r10;
env23600[1] = r4;
env23600[2] = void 0;
r30(r38, "_invoke", {
value: $mk100964(r39)
});
let c23598_0 = r38;
return env12203[0].isGeneratorFunction(a1) ? r38 : r38.next().then(function(result) {
return result.done ? result.value : c23598_0.next();
});
};
defineIteratorMethods(prototype2);
r31(prototype2, r9, "Generator");
r31(prototype2, r28, function() {
return this;
});
r31(prototype2, "toString", function() {
return "[object Generator]";
});
a0.keys = function(a0) {
const r11 = Object(a0);
let c23601_0 = r11;
const r12 = [];
let c23601_1 = r12;
for (const key in r11) {
r12.push(key);
}
r12.reverse();
const next2 = function next() {
let r3;
if (c23601_1.length) {
do {
r3 = c23601_1;
const value = r3.pop();
if (value in c23601_0) {
next2.value = value;
next2.done = false;
return next2;
}
} while (r3.length);
}
next2.done = true;
return next2;
};
return next2;
};
a0.values = values;
Context.prototype = {
constructor: Context,
reset: function reset(a0) {
this.prev = 0;
this.next = 0;
this._sent = void 0;
this.sent = void 0;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = void 0;
this.tryEntries.forEach(env12203[19]);
if (!a0) {
for (const key in this) {
if (key.charAt(0) === "t" && env12203[1].call(this, key) && !isNaN(+key.slice(1))) {
this[key] = void 0;
}
}
}
},
stop: function stop() {
this.done = true;
const completion = this.tryEntries[0].completion;
if (completion.type === "throw") {
throw completion.arg;
}
return this.rval;
},
dispatchException: function dispatchException(a0) {
if (this.done) {
throw a0;
}
let r0 = this.tryEntries.length - 1;
while (0 <= r0) {
const r8 = this.tryEntries[r0];
const { completion, tryLoc } = r8;
const r1 = r0;
if (tryLoc === "root") {
completion.type = "throw";
completion.arg = a0;
this.next = "end";
return false;
}
L21: {
if (r8.tryLoc <= this.prev) {
const r15 = env12203[1];
const r25 = r15.call(r8, "catchLoc");
const r27 = r15.call(r8, "finallyLoc");
if (r25 && r27) {
if (this.prev < r8.catchLoc) {
const catchLoc2 = r8.catchLoc;
completion.type = "throw";
completion.arg = a0;
this.next = catchLoc2;
this.method = "next";
this.arg = void 0;
return true;
}
if (this.prev < r8.finallyLoc) {
const finallyLoc2 = r8.finallyLoc;
completion.type = "throw";
completion.arg = a0;
this.next = finallyLoc2;
return false;
}
break L21;
}
if (r25) {
if (this.prev < r8.catchLoc) {
const catchLoc = r8.catchLoc;
completion.type = "throw";
completion.arg = a0;
this.next = catchLoc;
this.method = "next";
this.arg = void 0;
return true;
}
} else {
if (!r27) {
throw new Error("try statement without catch or finally");
}
if (this.prev < r8.finallyLoc) {
const finallyLoc = r8.finallyLoc;
completion.type = "throw";
completion.arg = a0;
this.next = finallyLoc;
return false;
}
}
}
}
r0 = r1 - 1;
}
},
abrupt: function abrupt(a0, a1) {
let r30;
let r0 = this.tryEntries.length - 1;
let r8 = void 0;
while (0 <= r0) {
const r12 = this.tryEntries[r0];
const tryLoc = r12.tryLoc;
const prev = this.prev;
const r1 = r0;
if (tryLoc <= prev && env12203[1].call(r12, "finallyLoc")) {
const prev2 = this.prev;
const finallyLoc = r12.finallyLoc;
r8 = r12;
if (prev2 < finallyLoc) {
break;
}
}
r0 = r1 - 1;
r8 = void 0;
}
if ((r8 ? a0 === "break" || a0 === "continue" : r8) && r8.tryLoc <= a1 && a1 <= r8.finallyLoc) {
r8 = null;
}
const r28 = r8 ? r8.completion : {};
r28.type = a0;
r28.arg = a1;
if (r8) {
this.method = "next";
this.next = r8.finallyLoc;
r30 = env12203[11];
} else {
r30 = this.complete(r28);
}
return r30;
},
complete: function complete(a0, a1) {
if (a0.type === "throw") {
throw a0.arg;
}
L10: {
if (a0.type !== "break" && a0.type !== "continue") {
if (a0.type === "return") {
const arg = a0.arg;
this.arg = arg;
this.rval = arg;
this.method = "return";
this.next = "end";
break L10;
}
if (!(a0.type === "normal" && a1)) {
break L10;
}
this.next = a1;
} else {
this.next = a0.arg;
}
}
return env12203[11];
},
finish: function finish(a0) {
let r0 = this.tryEntries.length - 1;
while (0 <= r0) {
const r7 = this.tryEntries[r0];
const finallyLoc = r7.finallyLoc;
const r1 = r0;
if (finallyLoc === a0) {
this.complete(r7.completion, r7.afterLoc);
const completion = r7.completion || {};
completion.type = "normal";
delete completion["arg"];
r7.completion = completion;
return env12203[11];
}
r0 = r1 - 1;
}
},
catch: function(a0) {
let r0 = this.tryEntries.length - 1;
while (0 <= r0) {
const r8 = this.tryEntries[r0];
const tryLoc = r8.tryLoc;
const r1 = r0;
if (tryLoc === a0) {
const completion = r8.completion;
const type = completion.type;
let r22 = void 0;
if (type === "throw") {
const arg = completion.arg;
const completion2 = r8.completion || {};
completion2.type = "normal";
delete completion2["arg"];
r8.completion = completion2;
r22 = arg;
}
return r22;
}
r0 = r1 - 1;
}
throw new Error("illegal catch attempt");
},
delegateYield: function delegateYield(a0, a1, a2) {
let iterator;
let env23602;
L10: {
const r6 = env23602 = {
$parent: env12203
};
env23602[0] = a0;
if (a0) {
const r4 = a0[env12203[3]];
if (r4) {
iterator = r4.call(a0);
break L10;
}
const next3 = a0.next;
iterator = a0;
if (typeof next3 === "function") {
break L10;
}
if (!isNaN(a0.length)) {
env23602[1] = -1;
const next4 = $mk100966(r6);
env23602[2] = next4;
next4.next = next4;
iterator = next4;
} else {
iterator = {
next: env12203[21]
};
}
} else {
iterator = {
next: env12203[21]
};
}
}
this.delegate = {
iterator,
resultName: a1,
nextLoc: a2
};
if (this.method === "next") {
this.arg = void 0;
}
return env12203[11];
}
};
return a0;
})(r1);
try {
globalThis.regeneratorRuntime = r1;
} catch ($e) {
if (typeof globalThis.globalThis === "object") {
globalThis.globalThis.regeneratorRuntime = r1;
} else {
Function("r", "regeneratorRuntime = r")(r1);
}
}