162 lines
6.7 KiB
TypeScript
162 lines
6.7 KiB
TypeScript
/* Metro module 6737; source: modules/guild_settings/GuildRoleMemberCountStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
|
|
function _fun53173(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:6, offset: 0x013406f5, size: 337 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_5 = {};
|
|
const env0_6 = {};
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
let value = _fun53177(Store);
|
|
value.displayName = 'GuildRoleMemberCountStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{GUILD_ROLE_MEMBER_COUNT_FETCH_SUCCESS: GUILD_ROLE_MEMBER_COUNT_FETCH_SUCCESS,
|
|
GUILD_ROLE_MEMBER_COUNT_UPDATE: GUILD_ROLE_MEMBER_COUNT_UPDATE,
|
|
GUILD_ROLE_MEMBER_BULK_ADD: GUILD_ROLE_MEMBER_BULK_ADD, GUILD_ROLE_MEMBER_ADD: GUILD_ROLE_MEMBER_ADD_53184,
|
|
GUILD_ROLE_MEMBER_REMOVE: GUILD_ROLE_MEMBER_REMOVE_53185, GUILD_ROLE_CREATE: GUILD_ROLE_CREATE_53186,
|
|
GUILD_DELETE: GUILD_DELETE_53187});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildRoleMemberCountStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_53174() { // fn#53174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:148, offset: 0x01340846, 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_53174_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun53177(a0) { // fn#53177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:361, offset: 0x013408a4, size: 91 bytes, params: 2, frame: 16
|
|
const closure = GuildRoleMemberCountStore;
|
|
env0_4(closure, a0);
|
|
return env0_1(closure, [{key: 'getRoleMemberCount', value: value_53179}, {key: 'shouldFetch', value: value_53180}]);
|
|
}
|
|
|
|
function GUILD_ROLE_MEMBER_COUNT_FETCH_SUCCESS({guildId, roleMemberCount}) { // fn#53181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:986, offset: 0x0134093f, size: 54 bytes, params: 2, frame: 11
|
|
env0_5[guildId] = roleMemberCount;
|
|
const binding = env0_6;
|
|
const Date = global.Date;
|
|
binding[guildId] = Date.now();
|
|
}
|
|
|
|
function GUILD_ROLE_MEMBER_COUNT_UPDATE({guildId, roleId, count}) { // fn#53182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1120, offset: 0x01340975, size: 48 bytes, params: 2, frame: 4
|
|
const property = env0_5[guildId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
property[roleId] = count;
|
|
}
|
|
|
|
function GUILD_ROLE_MEMBER_BULK_ADD({guildId, roleId, added}) { // fn#53183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1258, offset: 0x013409a5, size: 92 bytes, params: 2, frame: 13
|
|
const property = env0_5[guildId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
if (property[roleId] == null) {
|
|
return false;
|
|
}
|
|
const Object = global.Object;
|
|
property[roleId] += Object.keys(added).length;
|
|
}
|
|
|
|
function GUILD_ROLE_MEMBER_ADD_53184({guildId, roleId}) { // fn#53184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1439, offset: 0x01340a01, size: 67 bytes, params: 2, frame: 6
|
|
var r1;
|
|
var r0;
|
|
const property = env0_5[guildId];
|
|
let value = property != null;
|
|
if (value) {
|
|
value = property[roleId] != null;
|
|
if (value) {
|
|
property[roleId] += 1;
|
|
r1 = undefined;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function GUILD_ROLE_MEMBER_REMOVE_53185({guildId, roleId}) { // fn#53185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1580, offset: 0x01340a44, size: 88 bytes, params: 2, frame: 17
|
|
var r1;
|
|
var r0;
|
|
var Math;
|
|
const property = env0_5[guildId];
|
|
let value = property != null;
|
|
if (value) {
|
|
value = property[roleId] != null;
|
|
if (value) {
|
|
Math = global.Math;
|
|
property[roleId] = Math.max(property[roleId] - 1, 0);
|
|
r1 = undefined;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function GUILD_ROLE_CREATE_53186({guildId, role}) { // fn#53186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1729, offset: 0x01340a9c, size: 64 bytes, params: 2, frame: 5
|
|
if (env0_5[guildId] == null) {
|
|
env0_5[guildId] = {};
|
|
}
|
|
env0_5[guildId][role.id] = 0;
|
|
}
|
|
|
|
function GUILD_DELETE_53187({guild}) { // fn#53187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:1829, offset: 0x01340adc, size: 41 bytes, params: 2, frame: 4
|
|
delete env0_5[guild.id];
|
|
delete env0_6[guild.id];
|
|
}
|
|
|
|
function value_53180(a0) { // fn#53180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:788, offset: 0x013408ff, size: 64 bytes, params: 2, frame: 11
|
|
var r0;
|
|
var Date;
|
|
if (a0 == null) {
|
|
return false;
|
|
}
|
|
let value = environment.__proto__;
|
|
const property = env1_6[a0];
|
|
value = property == null;
|
|
if (value) {
|
|
r0 = value;
|
|
} else {
|
|
Date = global.Date;
|
|
value = Date.now() - property;
|
|
value = value > 120000;
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|