Files
discord-decomp/sources/by-id/module-01331.jsx
T
2026-07-27 16:20:00 +03:00

1019 lines
38 KiB
React

/* Metro module 1331; source: unknown; dependencies: [6, 7, 1332, 1329] */
function _fun15205(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#15205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:6, offset: 0x00e26527, size: 107 bytes, params: 8, frame: 17
const env0_0 = require;
const env0_2 = require(6) /* metro dependency 6 */;
const env0_3 = require(7) /* metro dependency 7 */;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
exports.ReflectionTypeCheck = undefined;
exports.ReflectionTypeCheck = _fun15206();
}
function _fun15206() { // fn#15206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:153, offset: 0x00e26592, size: 216 bytes, params: 1, frame: 15
return env0_3(ReflectionTypeCheck, [{key: 'prepare', value: value_15208}, {key: 'is', value: value_15209},
{key: 'field', value: value_15214}, {key: 'message', value: function(a0, a1, a2, a3) {
return a2 ? a1.isAssignable(a0, a3) : a1.is(a0, a3);
}}, {key: 'messages', value: value_15216}, {key: 'scalar', value: value_15217}, {key: 'scalars',
value: value_15218}, {key: 'mapKeys', value: value_15219}]);
}
function ReflectionTypeCheck({fields}) { // fn#15207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:174, offset: 0x00e2666a, size: 56 bytes, params: 2, frame: 13
env1_2(this, ReflectionTypeCheck);
this.fields = fields === null ? [] : fields !== undefined ? fields : [];
}
function value_15208() { // fn#15208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:313, offset: 0x00e266a2, size: 402 bytes, params: 1, frame: 24
var r6;
var r12;
var items;
var items2;
var items3;
var iterator;
var iterator2;
var item;
var item2;
var oneof;
var push;
var localName;
var kind;
var value;
var repeat;
var opt;
var includes;
var error;
var object2;
if (!this.data) {
iterator = this.fields[Symbol.iterator]();
iterator2 = iterator.next;
r6 = iterator;
item2 = Reflect.apply(iterator2, r6, []);
item = item2.value;
item2 = item2.done ? undefined : r6;
if (item2 === undefined) {
}
object2 = {req: [], known: []};
object2.oneofs = global.Object.values([]);
this.data = object2;
}
return undefined;
reducibleLoop3: while (true) {
try {
oneof = item.oneof;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
if (oneof) {
try {
includes = items3.includes;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
oneof = item.oneof;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
value = Reflect.apply(includes, items3, [oneof]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
reducibleJoin2: while (true) {
if (value) {
r6 = item2;
break reducibleJoin2;
}
try {
push = items3.push;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
oneof = item.oneof;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
Reflect.apply(push, items3, [oneof]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
push = items.push;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
oneof = item.oneof;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
Reflect.apply(push, items, [oneof]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
push = items2.push;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
oneof = item.oneof;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
Reflect.apply(push, items2, [oneof]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
r6 = item2;
break reducibleJoin2;
}
} else {
try {
push = items2.push;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
localName = item.localName;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
Reflect.apply(push, items2, [localName]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
kind = item.kind;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
value = kind === 'scalar';
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
reducibleJoin2: while (true) {
reducibleJoin37: while (true) {
if (value) {
try {
opt = item.opt;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
if (opt) {
try {
repeat = item.repeat;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
value = !repeat;
r12 = value;
break reducibleJoin37;
}
r12 = opt;
break reducibleJoin37;
}
try {
value = kind === 'enum';
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
if (value) {
try {
opt = item.opt;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
if (opt) {
try {
repeat = item.repeat;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
value = !repeat;
r12 = value;
break reducibleJoin37;
}
r12 = opt;
break reducibleJoin37;
}
try {
value = kind === 'message';
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
if (value) {
try {
repeat = item.repeat;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
if (repeat) {
try {
push = items.push;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
localName = item.localName;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
Reflect.apply(push, items, [localName]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
r6 = item2;
break reducibleJoin2;
}
r6 = item2;
break reducibleJoin2;
}
try {
value = kind !== 'map';
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
if (value) {
r6 = item2;
break reducibleJoin2;
}
try {
push = items.push;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
localName = item.localName;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
Reflect.apply(push, items, [localName]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
r6 = item2;
break reducibleJoin2;
}
if (r12) {
r6 = item2;
break reducibleJoin2;
}
try {
push = items.push;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
localName = item.localName;
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
try {
Reflect.apply(push, items, [localName]);
} catch (error) {
try {
item2.return();
} catch {
}
throw error;
}
r6 = item2;
break reducibleJoin2;
}
}
item2 = Reflect.apply(iterator2, r6, []);
item = item2.value;
item2 = item2.done ? undefined : r6;
if (item2 === undefined) {
break reducibleLoop3;
}
continue reducibleLoop3;
}
object2 = {req: items, known: items2};
const Object = global.Object;
object2.oneofs = Object.values(items3);
this.data = object2;
}
function value_15209(a0, a1) { // fn#15209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:730, offset: 0x00e26834, size: 438 bytes, params: 3, frame: 26
var r1;
var r12;
var r13;
var value;
var prepare;
var Object;
var keys;
var data;
var length;
var req;
var length2;
var some;
var closure;
var oneofs;
var iterator;
var iterator2;
var item;
var item2;
var value2;
var v;
var error;
var fields;
var iterator3;
var item3;
var oneof;
var field;
var localName;
var property;
exceptionSkip37: while (true) {
exceptionLanding37: while (true) {
exceptionSkip23: while (true) {
exceptionLanding23: while (true) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = this;
value = arguments.length > 2;
reducibleJoin2: while (true) {
if (value) {
value = arguments[2] !== undefined;
r1 = value;
break reducibleJoin2;
}
r1 = value;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r1) {
value = arguments[2];
r1 = value;
break reducibleJoin4;
}
break reducibleJoin4;
}
var env0_3 = r1;
if (a1 < 0) {
return true;
}
if (a0 != null) {
reducibleJoin41: while (true) {
if (typeof a0 === 'object') {
prepare = this.prepare;
Reflect.apply(prepare, this, []);
Object = global.Object;
keys = Object.keys;
value = Reflect.apply(keys, Object, [a0]);
var env0_4 = value;
data = this.data;
var env0_5 = data;
length = value.length;
req = data.req;
length2 = req.length;
if (!(length < length2)) {
req = data.req;
some = req.some;
reducibleJoin40: while (true) {
if (Reflect.apply(some, req, [_fun15210])) {
break reducibleJoin40;
}
if (!r1) {
some = value.some;
reducibleJoin12: while (true) {
if (Reflect.apply(some, value, [function(a0) {
return !data.known.includes(a0);
}])) {
return false;
}
break reducibleJoin12;
}
}
if (a1 < 1) {
return true;
}
closure = value_15209_loop;
oneofs = data.oneofs;
iterator = oneofs[Symbol.iterator]();
iterator2 = iterator.next;
r12 = iterator;
reducibleLoop14: while (true) {
item2 = Reflect.apply(iterator2, r12, []);
item = item2.value;
item2 = item2.done ? undefined : r12;
if (item2 !== undefined) {
try {
var env0_6 = item;
} catch (error) {
break exceptionLanding23;
}
try {
value = closure();
} catch (error) {
break exceptionLanding23;
}
try {
value2 = value === 0;
} catch (error) {
break exceptionLanding23;
}
if (value2) {
r12 = item2;
continue reducibleLoop14;
}
if (value) {
try {
v = value.v;
} catch (error) {
break exceptionLanding23;
}
item2.return();
return v;
}
r12 = item2;
continue reducibleLoop14;
}
fields = this.fields;
iterator = fields[Symbol.iterator]();
iterator3 = iterator.next;
r13 = iterator;
reducibleLoop25: while (true) {
item3 = Reflect.apply(iterator3, r13, []);
item = item3.value;
item3 = item3.done ? undefined : r13;
if (item3 === undefined) {
return true;
}
try {
oneof = item.oneof;
} catch (error) {
break exceptionLanding37;
}
try {
value = oneof !== undefined;
} catch (error) {
break exceptionLanding37;
}
if (value) {
r13 = item3;
continue reducibleLoop25;
}
try {
field = this.field;
} catch (error) {
break exceptionLanding37;
}
try {
localName = item.localName;
} catch (error) {
break exceptionLanding37;
}
try {
property = a0[localName];
} catch (error) {
break exceptionLanding37;
}
try {
value = Reflect.apply(field, this, [property, item, r1, a1]);
} catch (error) {
break exceptionLanding37;
}
if (!value) {
item3.return();
return false;
}
r13 = item3;
continue reducibleLoop25;
}
}
}
}
return false;
}
break reducibleJoin41;
}
}
return false;
break exceptionSkip23;
}
try {
item2.return();
} catch {
}
throw error;
break exceptionSkip23;
}
break exceptionSkip37;
}
try {
item3.return();
} catch {
}
throw error;
break exceptionSkip37;
}
}
function value_15214(a0, a1, a2, a3) { // fn#15214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:1489, offset: 0x00e26ae7, size: 618 bytes, params: 5, frame: 22
var r2;
var V;
var messages;
var value;
var T;
var scalars;
var value2;
const ScalarType = (require(1329) /* metro dependency 1329 */).ScalarType;
var scalar;
const repeat = a1.repeat;
let kind = a1.kind;
if (kind === 'scalar') {
return a0 === undefined ? a1.opt : repeat ? this.scalars(a0, a1.T, a3, a1.L) : this.scalar(a0, a1.T, a1.L);
}
if (kind === 'enum') {
if (a0 === undefined) {
r2 = a1.opt;
} else if (repeat) {
scalars = this.scalars;
value = environment.__proto__;
value = Reflect.apply(scalars, this, [a0, ScalarType.INT32, a3]);
r2 = value;
} else {
scalar = this.scalar;
value = environment.__proto__;
value = Reflect.apply(scalar, this, [a0, ScalarType.INT32]);
r2 = value;
}
return r2;
}
if (kind === 'message') {
return a0 === undefined || (repeat ? this.messages(a0, a1.T(), a2, a3) : this.message(a0, a1.T(), a2, a3));
}
if (kind !== 'map') {
return true;
}
if (typeof a0 === 'object') {
if (a0 === null) {
return false;
}
if (a3 < 2) {
return true;
}
var mapKeys = this.mapKeys;
var K = a1.K;
if (Reflect.apply(mapKeys, this, [a0, K, a3])) {
V = a1.V;
kind = V.kind;
if (kind === 'scalar') {
scalars = this.scalars;
value = global.Object.values(a0);
V = a1.V;
T = V.T;
V = a1.V;
return Reflect.apply(scalars, this, [value, T, a3, V.L]);
}
if (kind === 'enum') {
scalars = this.scalars;
value = global.Object.values(a0);
value2 = environment.__proto__;
return Reflect.apply(scalars, this, [value, ScalarType.INT32, a3]);
}
if (kind === 'message') {
messages = this.messages;
value = global.Object.values(a0);
V = a1.V;
return Reflect.apply(messages, this, [value, V.T(), a2, a3]);
}
return true;
}
}
return false;
}
function value_15216(a0, a1, a2, a3) { // fn#15216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:2288, offset: 0x00e26d7c, size: 185 bytes, params: 5, frame: 19
var r5;
var r1;
var length;
var value;
var is;
var property;
var isAssignable;
const Array = global.Array;
if (Array.isArray(a0)) {
if (a3 < 2) {
return true;
}
length = a0.length;
value = 0;
if (a2) {
if (value < length) {
if (value < a3) {
r1 = value;
loopExit12: while (true) {
isAssignable = a1.isAssignable;
property = a0[r1];
if (Reflect.apply(isAssignable, a1, [property, a3 - 1])) {
value = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
length = a0.length;
if (!(value < length)) {
return true;
}
if (!(value < a3)) {
return true;
}
r1 = value;
continue;
}
break loopExit12;
}
return false;
}
return true;
}
return true;
}
if (value < length) {
if (value < a3) {
r5 = value;
loopExit6: while (true) {
is = a1.is;
property = a0[r5];
if (Reflect.apply(is, a1, [property, a3 - 1])) {
value = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
length = a0.length;
if (!(value < length)) {
return true;
}
if (!(value < a3)) {
return true;
}
r5 = value;
continue;
}
break loopExit6;
}
return false;
}
return true;
}
return true;
}
return false;
}
function value_15217(a0, a1, a2) { // fn#15217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:2533, offset: 0x00e26e35, size: 584 bytes, params: 4, frame: 17
var r5;
const LongType = (require(1329) /* metro dependency 1329 */).LongType;
let value = typeof a0;
const ScalarType = (require(1329) /* metro dependency 1329 */).ScalarType;
const UINT64 = ScalarType.UINT64;
if (UINT64 === a1) {
if (LongType.BIGINT === a2) {
return value === 'bigint';
}
if (LongType.NUMBER === a2) {
value = value === 'number';
return value && !global.isNaN(a0);
}
return value === 'string';
}
const FIXED64 = ScalarType.FIXED64;
if (FIXED64 === a1) {
if (LongType.BIGINT === a2) {
return value === 'bigint';
}
if (LongType.NUMBER === a2) {
value = value === 'number';
return value && !global.isNaN(a0);
}
return value === 'string';
}
const INT64 = ScalarType.INT64;
if (INT64 === a1) {
if (LongType.BIGINT === a2) {
return value === 'bigint';
}
if (LongType.NUMBER === a2) {
value = value === 'number';
return value && !global.isNaN(a0);
}
return value === 'string';
}
const SFIXED64 = ScalarType.SFIXED64;
if (SFIXED64 === a1) {
if (LongType.BIGINT === a2) {
return value === 'bigint';
}
if (LongType.NUMBER === a2) {
value = value === 'number';
return value && !global.isNaN(a0);
}
return value === 'string';
}
const SINT64 = ScalarType.SINT64;
if (SINT64 === a1) {
if (LongType.BIGINT === a2) {
return value === 'bigint';
}
if (LongType.NUMBER === a2) {
value = value === 'number';
return value && !global.isNaN(a0);
}
return value === 'string';
}
const BOOL = ScalarType.BOOL;
if (BOOL === a1) {
return value === 'boolean';
}
const STRING = ScalarType.STRING;
if (STRING === a1) {
return value === 'string';
}
const BYTES = ScalarType.BYTES;
if (BYTES === a1) {
return a0 instanceof global.Uint8Array;
}
const DOUBLE = ScalarType.DOUBLE;
if (DOUBLE === a1) {
value = value === 'number';
r5 = value && !global.isNaN(a0);
} else {
var FLOAT = ScalarType.FLOAT;
if (FLOAT === a1) {
value = value === 'number';
return value && !global.isNaN(a0);
}
value = value === 'number';
r5 = value && global.Number.isInteger(a0);
}
return r5;
}
function value_15218(a0, a1, a2, a3) { // fn#15218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:3198, offset: 0x00e2707d, size: 134 bytes, params: 5, frame: 18
var r0;
var length;
var value;
var scalar;
let Array = global.Array;
if (Array.isArray(a0)) {
if (a2 < 2) {
return true;
}
Array = global.Array;
if (Array.isArray(a0)) {
length = a0.length;
value = 0;
if (value < length) {
if (value < a2) {
r0 = value;
loopExit6: while (true) {
scalar = this.scalar;
if (Reflect.apply(scalar, this, [a0[r0], a1, a3])) {
value = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
length = a0.length;
if (!(value < length)) {
return true;
}
if (!(value < a2)) {
return true;
}
r0 = value;
continue;
}
break loopExit6;
}
return false;
}
return true;
}
return true;
}
return true;
}
return false;
}
function value_15219(a0, a1, a2) { // fn#15219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:3389, offset: 0x00e27103, size: 392 bytes, params: 4, frame: 21
var scalars;
const Object = global.Object;
let value = Object.keys(a0);
const ScalarType = (require(1329) /* metro dependency 1329 */).ScalarType;
const INT32 = ScalarType.INT32;
if (INT32 === a1) {
scalars = this.scalars;
value = value.slice(0, a2);
return Reflect.apply(scalars, this, [value.map(function(a0) {
return (0, global.parseInt)(a0);
}), a1, a2]);
}
const FIXED32 = ScalarType.FIXED32;
if (FIXED32 === a1) {
scalars = this.scalars;
value = value.slice(0, a2);
return Reflect.apply(scalars, this, [value.map(function(a0) {
return (0, global.parseInt)(a0);
}), a1, a2]);
}
const SFIXED32 = ScalarType.SFIXED32;
if (SFIXED32 === a1) {
scalars = this.scalars;
value = value.slice(0, a2);
return Reflect.apply(scalars, this, [value.map(function(a0) {
return (0, global.parseInt)(a0);
}), a1, a2]);
}
const SINT32 = ScalarType.SINT32;
if (SINT32 === a1) {
scalars = this.scalars;
value = value.slice(0, a2);
return Reflect.apply(scalars, this, [value.map(function(a0) {
return (0, global.parseInt)(a0);
}), a1, a2]);
}
const UINT32 = ScalarType.UINT32;
if (UINT32 === a1) {
scalars = this.scalars;
value = value.slice(0, a2);
return Reflect.apply(scalars, this, [value.map(function(a0) {
return (0, global.parseInt)(a0);
}), a1, a2]);
}
const BOOL = ScalarType.BOOL;
if (BOOL === a1) {
scalars = this.scalars;
value = value.slice(0, a2);
return Reflect.apply(scalars, this, [value.map(function(a0) {
var value = a0;
return value == 'true' || value != 'false' && value;
}), a1, a2]);
}
scalars = this.scalars;
const LongType = (require(1329) /* metro dependency 1329 */).LongType;
const STRING = LongType.STRING;
return Reflect.apply(scalars, this, [value, a1, a2, STRING]);
}
function _fun15210(a0) { // fn#15210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:958, offset: 0x00e269ea, size: 25 bytes, params: 2, frame: 11
const binding = env0_4;
return !binding.includes(a0);
}
function value_15209_loop() { // fn#15212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:1093, owner: value_15209._loop, offset: 0x00e26a22, size: 169 bytes, params: 1, frame: 18
var value4;
const property = env0_0[env0_6];
const value3 = undefined;
const moduleValue = require(1332) /* metro dependency 1332 */;
if (moduleValue.isOneofGroup(property)) {
if (value3 === property.oneofKind) {
return 0;
}
value4 = env0_2.fields.find(_fun15213);
return value4 && env0_2.field(property[property.oneofKind], value4, env0_3, require) ? value3 : {v: false};
}
return {v: false};
}
function _fun15213({localName}) { // fn#15213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1458:1216, offset: 0x00e26acb, size: 28 bytes, params: 2, frame: 2
return localName === env0_0.oneofKind;
}