323 lines
13 KiB
TypeScript
323 lines
13 KiB
TypeScript
/* Metro module 6269; source: stores/GuildMemberRequesterStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1945, 6270, 694, 566, 2] */
|
|
function _fun49494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:6, offset: 0x011fb985, size: 467 bytes, params: 8, frame: 22
|
|
const _arrayLikeToArray_49500 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const closure = CONNECTION_CLOSED_49501;
|
|
const requestFromMessages = function(a0, a1) {
|
|
var env0_0 = a0;
|
|
a1.forEach(_fun49504);
|
|
return false;
|
|
};
|
|
const closure2 = LOCAL_MESSAGES_LOADED_49506;
|
|
const closure3 = function({guildId, data}) {
|
|
var env0_0 = undefined;
|
|
if (guildId != null) {
|
|
var items = [];
|
|
env0_0 = items;
|
|
data.forEach(_fun49508);
|
|
requestFromMessages(guildId, items);
|
|
}
|
|
return false;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
let value3 = new (importDefault(6270) /* metro dependency 6270: GuildMemberRequester */)((importDefault(1945) /* metro dependency 1945: GuildMemberStore */).isMember,
|
|
_fun49511);
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
_fun49512(Store).displayName = 'GuildMemberRequesterStore';
|
|
value3 = new value3(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_CLOSED: closure,
|
|
CONNECTION_OPEN: closure, CONNECTION_RESUMED: CONNECTION_RESUMED_49517,
|
|
GUILD_MEMBERS_CHUNK_BATCH: GUILD_MEMBERS_CHUNK_BATCH_49518, SEARCH_MESSAGES_SUCCESS: closure3,
|
|
MOD_VIEW_SEARCH_MESSAGES_SUCCESS: closure3, LOCAL_MESSAGES_LOADED: closure2, LOAD_MESSAGES_SUCCESS: closure2,
|
|
LOAD_MESSAGES_AROUND_SUCCESS: closure2, LOAD_RECENT_MENTIONS_SUCCESS: closure2,
|
|
LOAD_PINNED_MESSAGES_SUCCESS: LOAD_PINNED_MESSAGES_SUCCESS_49522,
|
|
CONVERSATION_FETCH_SUCCESS: CONVERSATION_FETCH_SUCCESS_49524});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/GuildMemberRequesterStore.tsx');
|
|
exports.default = value3;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_49495() { // fn#49495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:170, offset: 0x011fbb58, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_49495_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_49498(a0, a1) { // fn#49498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:363, offset: 0x011fbbb6, size: 370 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun49499;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_49500(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_49500(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_49500(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun49499;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
}
|
|
|
|
function _requestMember(a0, a1) { // fn#49502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1430, offset: 0x011fbd28, size: 29 bytes, params: 3, frame: 13
|
|
env0_9.request(a0, a1);
|
|
return false;
|
|
}
|
|
|
|
function requestFromMessages(a0, a1) { // fn#49503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1484, offset: 0x011fbd45, size: 31 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
a1.forEach(_fun49504);
|
|
return false;
|
|
}
|
|
|
|
function LOAD_MESSAGES_AROUND_SUCCESS_49506({channelId, messages}) { // fn#49506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1648, offset: 0x011fbdcf, size: 73 bytes, params: 2, frame: 15
|
|
const channel = ChannelStore.getChannel(channelId);
|
|
let r0 = channel != null && channel.guild_id != null;
|
|
if (r0) {
|
|
requestFromMessages(channel.guild_id, messages);
|
|
r0 = false;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function MOD_VIEW_SEARCH_MESSAGES_SUCCESS_49507({guildId, data}) { // fn#49507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1792, offset: 0x011fbe18, size: 71 bytes, params: 2, frame: 15
|
|
if (guildId != null) {
|
|
data.forEach(function({messages}) {
|
|
messages.forEach(_fun49509);
|
|
});
|
|
requestFromMessages(guildId, []);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function _fun49511(a0, a1) { // fn#49511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1304, offset: 0x011fbe95, size: 71 bytes, params: 3, frame: 14
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_MEMBERS_REQUEST', guildIds: [a0],
|
|
userIds: a1});
|
|
}
|
|
|
|
function _fun49512(a0) { // fn#49512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1989, offset: 0x011fbedc, size: 116 bytes, params: 2, frame: 16
|
|
const closure = GuildMemberRequesterStore;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: 'initialize', value: function() {
|
|
this.waitFor(ChannelStore, GuildMemberStore);
|
|
}}, {key: 'requestMember', value: function(a0, a1) {
|
|
_requestMember(a0, a1);
|
|
}}, {key: 'getDebugState', value: value_49516}]);
|
|
}
|
|
|
|
function CONNECTION_RESUMED_49517() { // fn#49517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2722, offset: 0x011fbf80, size: 21 bytes, params: 1, frame: 9
|
|
env0_9.requestUnacknowledged();
|
|
return false;
|
|
}
|
|
|
|
function GUILD_MEMBERS_CHUNK_BATCH_49518({chunks}) { // fn#49518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2820, offset: 0x011fbf95, size: 71 bytes, params: 2, frame: 14
|
|
var r1;
|
|
var value3;
|
|
var value4;
|
|
const closure = function(a0) {
|
|
var env0_0 = a0;
|
|
a0.members.forEach(_fun49520);
|
|
if (a0.notFound != null) {
|
|
a0.notFound.forEach(_fun49521);
|
|
}
|
|
};
|
|
const value = _createForOfIteratorHelperLoose_49498(chunks);
|
|
const value2 = value();
|
|
let done = value2.done;
|
|
if (!done) {
|
|
for (r1 = value2; true; r1 = value4) {
|
|
value3 = r1.value;
|
|
closure(value3);
|
|
value4 = value();
|
|
done = value4.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function LOAD_PINNED_MESSAGES_SUCCESS_49522({pins, channelId}) { // fn#49522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:3420, offset: 0x011fc073, size: 90 bytes, params: 2, frame: 15
|
|
var guild_id;
|
|
var requestFromMessagesBinding;
|
|
var value;
|
|
const channel = ChannelStore.getChannel(channelId);
|
|
let r0 = channel != null && channel.guild_id != null;
|
|
if (r0) {
|
|
requestFromMessagesBinding = requestFromMessages;
|
|
guild_id = channel.guild_id;
|
|
value = pins.map(function(a0) {
|
|
return a0.message;
|
|
});
|
|
requestFromMessagesBinding(guild_id, value);
|
|
value = false;
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun49504({author, mentions}) { // fn#49504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1536, offset: 0x011fbd64, size: 73 bytes, params: 2, frame: 15
|
|
var environment;
|
|
var value;
|
|
if (author != null) {
|
|
value = environment.__proto__;
|
|
_requestMember(env0_0, author.id);
|
|
}
|
|
if (mentions != null) {
|
|
mentions.forEach(_fun49505);
|
|
}
|
|
}
|
|
|
|
function _fun49508({messages}) { // fn#49508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1892, offset: 0x011fbe5f, size: 30 bytes, params: 2, frame: 11
|
|
messages.forEach(function(a0) {
|
|
a0.forEach(_fun49510);
|
|
});
|
|
}
|
|
|
|
function value_49516(a0) { // fn#49516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2490, offset: 0x011fbf67, size: 25 bytes, params: 2, frame: 11
|
|
return env1_9.getDebugState(a0);
|
|
}
|
|
|
|
function GUILD_MEMBERS_CHUNK_BATCH_49518_loop(a0) { // fn#49519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2886, owner: GUILD_MEMBERS_CHUNK_BATCH_49518._loop, offset: 0x011fbfdc, size: 67 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
a0.members.forEach(_fun49520);
|
|
if (a0.notFound != null) {
|
|
a0.notFound.forEach(_fun49521);
|
|
}
|
|
}
|
|
|
|
function _fun49505({id}) { // fn#49505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1614, offset: 0x011fbdad, size: 34 bytes, params: 2, frame: 13
|
|
_requestMember(env1_0, id);
|
|
return false;
|
|
}
|
|
|
|
function _fun49509(a0) { // fn#49509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:1920, offset: 0x011fbe7d, size: 24 bytes, params: 2, frame: 11
|
|
a0.forEach(_fun49510);
|
|
}
|
|
|
|
function _fun49520({user}) { // fn#49520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2917, offset: 0x011fc01f, size: 48 bytes, params: 2, frame: 13
|
|
const binding = env2_9;
|
|
binding.acknowledge(env0_0.guildId, user.id);
|
|
}
|
|
|
|
function _fun49521(a0) { // fn#49521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6447:2997, offset: 0x011fc04f, size: 36 bytes, params: 2, frame: 13
|
|
const binding = env2_9;
|
|
return binding.acknowledge(env0_0.guildId, a0);
|
|
}
|
|
|