Files
2026-07-28 01:06:53 +03:00

181 lines
8.7 KiB
TypeScript

/* Metro module 6737; source: modules/guild_settings/GuildRoleMemberCountStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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_5 = {};
const env0_6 = {};
const Store = (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});
(FileImportTrackerModule).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 GuildRoleMemberCountStore2 = GuildRoleMemberCountStore;
Inherits(GuildRoleMemberCountStore2, a0);
return CreateClass(GuildRoleMemberCountStore2, [{key: 'getRoleMemberCount', value: value_53179}, {key: 'shouldFetch',
value: value_53180}]);
function GuildRoleMemberCountStore() { // fn#53178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:373, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, GuildRoleMemberCountStore);
const value3 = env1_3(GuildRoleMemberCountStore);
return env1_2(this, _isNativeReflectConstruct_53174() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_53179(a0) { // fn#53179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6915:724, offset: 0x0103ae4f, size: 25 bytes, params: 2, frame: 3
const value = null;
return value != a0 ? env1_5[a0] : value;
}
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;
}
}
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];
}
}
global.__d(_fun53173, 6737, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 6737, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;