Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,47 @@
|
||||
/* Metro module 9093; source: modules/guild_profile/hooks/useGuildProfile.tsx; dependencies: [5, 31, 9092, 566, 9094, 2] */
|
||||
function _fun71120(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9278:6, offset: 0x01d155fb, size: 149 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const guildProfileStore = importDefault(9092) /* metro dependency 9092: GuildProfileStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/hooks/useGuildProfile.tsx');
|
||||
exports.useGuildProfile = useGuildProfile;
|
||||
}
|
||||
|
||||
function useGuildProfile(a0) { // fn#71121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9278:225, offset: 0x01d15690, size: 157 bytes, params: 2, frame: 21
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
const profile = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildProfileStore], _fun71122);
|
||||
const fetchStatus = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildProfileStore],
|
||||
_fun71123);
|
||||
object2 = {guildProfile: profile};
|
||||
object2.fetchGuildProfile = env0_3.useCallback(env0_2(_fun71125), [a0]);
|
||||
object2.fetchStatus = fetchStatus;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun71122() { // fn#71122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9278:291, offset: 0x01d1572d, size: 27 bytes, params: 1, frame: 11
|
||||
return GuildProfileStore.getProfile(env0_0);
|
||||
}
|
||||
|
||||
function _fun71123() { // fn#71123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9278:347, offset: 0x01d15748, size: 27 bytes, params: 1, frame: 11
|
||||
return GuildProfileStore.getFetchStatus(env0_0);
|
||||
}
|
||||
|
||||
async function _fun71125() { // fn#71125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9278:430, offset: 0x01d15777, size: 92 bytes, params: 1, frame: 16
|
||||
let value = a0;
|
||||
if (true) {
|
||||
var r5 = value !== undefined ? value : false;
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_0(env2_1[4]);
|
||||
var getGuildProfile = value.getGuildProfile;
|
||||
await Reflect.apply(getGuildProfile, value, [require, r5]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,303 @@
|
||||
/* Metro module 9318; source: modules/guild_profile/hooks/useGuildProfileCTA.tsx; dependencies: [31, 1226, 1945, 1867, 4097, 1878, 661, 566, 1391, 8898, 9319, 8401, 6720, 2] */
|
||||
function _fun72794(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9504:6, offset: 0x01d53dcf, size: 378 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = constantsModule.InviteStates;
|
||||
const env0_10 = constantsModule.GuildFeatures;
|
||||
object2 = {IS_MEMBER: 0};
|
||||
object2[0] = 'IS_MEMBER';
|
||||
object2.ADOPT_TAG = 1;
|
||||
object2[1] = 'ADOPT_TAG';
|
||||
object2.HAS_APPLICATION = 2;
|
||||
object2[2] = 'HAS_APPLICATION';
|
||||
object2.APPLY_TO_JOIN = 3;
|
||||
object2[3] = 'APPLY_TO_JOIN';
|
||||
object2.LURK_DISCOVERABLE = 4;
|
||||
object2[4] = 'LURK_DISCOVERABLE';
|
||||
object2.JOIN_VIA_INVITE = 5;
|
||||
object2[5] = 'JOIN_VIA_INVITE';
|
||||
object2.ACCEPT_ROLES = 6;
|
||||
object2[6] = 'ACCEPT_ROLES';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/hooks/useGuildProfileCTA.tsx');
|
||||
exports.default = useGuildProfileCTA;
|
||||
exports.CTATypes = object2;
|
||||
exports.GuildProfileCTAContext = {INVITE: 'INVITE'};
|
||||
exports.getGuildProfileCTAType = getGuildProfileCTAType;
|
||||
}
|
||||
|
||||
function useGuildProfileCTA(a0, a1, a2) { // fn#72795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9504:627, offset: 0x01d53f49, size: 462 bytes, params: 4, frame: 29
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const id = a0.id;
|
||||
const env0_3 = id;
|
||||
const features = a0.features;
|
||||
const id2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
|
||||
return AuthenticationStore.getId();
|
||||
});
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(id);
|
||||
});
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getUser(id);
|
||||
}, [id2]);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun72799,
|
||||
[id, id2]);
|
||||
const {validInviteKey, isBypassInvite,
|
||||
inviteRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([InviteStore],
|
||||
_fun72800, [id, a2]);
|
||||
const value5 = (importDefault(9319) /* metro dependency 9319: usePendingFolderGuildIds */)();
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
object = [value3, value5, id, features, validInviteKey];
|
||||
object[5] = a0.visibility;
|
||||
object[6] = a0.tag;
|
||||
object[7] = isBypassInvite;
|
||||
object[8] = a1;
|
||||
object[9] = guild;
|
||||
object[10] = inviteRoles;
|
||||
object[11] = value2;
|
||||
object = {guildId: id, ctaType: Reflect.apply(useMemo, binding, [_fun72801, object]),
|
||||
validInviteKey: validInviteKey};
|
||||
return object;
|
||||
}
|
||||
|
||||
function getGuildProfileCTAType(a0, a1) { // fn#72803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9504:2341, offset: 0x01d5450c, size: 703 bytes, params: 3, frame: 28
|
||||
var r7;
|
||||
var roles;
|
||||
var r3;
|
||||
var hasFlag;
|
||||
var flags;
|
||||
var Set;
|
||||
var set;
|
||||
let value = a1;
|
||||
const id = a0.id;
|
||||
const features = a0.features;
|
||||
const id2 = AuthenticationStore.getId();
|
||||
const user = UserStore.getUser(id2);
|
||||
const value5 = null;
|
||||
let r6 = value5 != id ? GuildMemberStore.getMember(id, id2) : value5;
|
||||
const value7 = undefined;
|
||||
const value8 = value5 != (value5 == r6 ? value7 : r6.joinedAt);
|
||||
const r13 = value5 != value ? value : InviteStore.getInviteKeyForGuildId(id);
|
||||
const r2 = value5 != r13 ? InviteStore.getInvite(r13) : value5;
|
||||
value = false;
|
||||
if (value5 == r2) {
|
||||
r6 = value;
|
||||
r7 = value5;
|
||||
} else if (r2.state === InviteStates.BANNED) {
|
||||
r6 = value;
|
||||
r7 = value5;
|
||||
} else if (r2.state === InviteStates.EXPIRED) {
|
||||
r6 = value;
|
||||
r7 = value5;
|
||||
} else {
|
||||
value = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
hasFlag = value.hasFlag;
|
||||
flags = r2.flags;
|
||||
value = Reflect.apply(hasFlag, value, [value5 != flags ? flags : 0,
|
||||
(require(8898) /* metro dependency 8898: GuildInviteFlags */).GuildInviteFlags.IS_APPLICATION_BYPASS]);
|
||||
r6 = value;
|
||||
r7 = r13;
|
||||
}
|
||||
value = require(9319) /* metro dependency 9319: usePendingFolderGuildIds */;
|
||||
value = value.getPendingFolderGuildIds();
|
||||
if (value8) {
|
||||
roles = value5 == r2 ? value7 : r2.roles;
|
||||
if (value5 == roles) {
|
||||
return env0_11.IS_MEMBER;
|
||||
}
|
||||
roles = r2.roles;
|
||||
if (roles.length > 0) {
|
||||
if (value5 == user) {
|
||||
return env0_11.IS_MEMBER;
|
||||
}
|
||||
value = GuildMemberStore.getMember(id, user.id);
|
||||
Set = global.Set;
|
||||
roles = value5 == value ? value7 : value.roles;
|
||||
r3 = value5 != roles ? roles : [];
|
||||
set = new Set();
|
||||
roles = r2.roles;
|
||||
if (roles.some(_fun72804)) {
|
||||
return env0_11.ACCEPT_ROLES;
|
||||
}
|
||||
return env0_11.IS_MEMBER;
|
||||
}
|
||||
return env0_11.IS_MEMBER;
|
||||
}
|
||||
r6 = value.includes(id) ? env0_11.HAS_APPLICATION : value5 == features ? value5 != r7 ? env0_11.JOIN_VIA_INVITE : value5 != features && features.includes(GuildFeatures.DISCOVERABLE) ? env0_11.LURK_DISCOVERABLE : value5 : features.includes(GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED) ? value5 == features ? value5 != r7 ? env0_11.JOIN_VIA_INVITE : value5 != features && features.includes(GuildFeatures.DISCOVERABLE) ? env0_11.LURK_DISCOVERABLE : value5 : features.includes(GuildFeatures.MEMBER_VERIFICATION_MANUAL_APPROVAL) ? value5 != r7 ? r6 ? value5 != r7 ? env0_11.JOIN_VIA_INVITE : value5 != features && features.includes(GuildFeatures.DISCOVERABLE) ? env0_11.LURK_DISCOVERABLE : value5 : env0_11.APPLY_TO_JOIN : a0.visibility !== (require(6720) /* metro dependency 6720: GuildProfileTypes */).GuildProfileVisibility.PUBLIC_WITH_RECRUITMENT || r6 ? value5 != r7 ? env0_11.JOIN_VIA_INVITE : value5 != features && features.includes(GuildFeatures.DISCOVERABLE) ? env0_11.LURK_DISCOVERABLE : value5 : env0_11.APPLY_TO_JOIN : value5 != r7 ? env0_11.JOIN_VIA_INVITE : value5 != features && features.includes(GuildFeatures.DISCOVERABLE) ? env0_11.LURK_DISCOVERABLE : value5 : value5 != r7 ? env0_11.JOIN_VIA_INVITE : value5 != features && features.includes(GuildFeatures.DISCOVERABLE) ? env0_11.LURK_DISCOVERABLE : value5;
|
||||
return r6;
|
||||
}
|
||||
|
||||
function _fun72799() { // fn#72799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9504:881, offset: 0x01d54145, size: 66 bytes, params: 1, frame: 15
|
||||
const idBinding = id;
|
||||
const value2 = null;
|
||||
const r2 = value2 != idBinding ? GuildMemberStore.getMember(id, id) : value2;
|
||||
return value2 != (value2 == r2 ? undefined : r2.joinedAt);
|
||||
}
|
||||
|
||||
function _fun72800() { // fn#72800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9504:1014, offset: 0x01d54187, size: 243 bytes, params: 1, frame: 18
|
||||
var r1;
|
||||
var r0;
|
||||
var state;
|
||||
var object2;
|
||||
var moduleValue;
|
||||
var hasFlag;
|
||||
var flags;
|
||||
var value;
|
||||
const value2 = null;
|
||||
const r4 = value2 != importDefault ? importDefault : InviteStore.getInviteKeyForGuildId(id);
|
||||
if (value2 != r4) {
|
||||
value = environment.__proto__;
|
||||
value = InviteStore.getInvite(r4);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
if (value2 == r1) {
|
||||
r0 = {'validInviteKey': null, 'isBypassInvite': false, 'inviteRoles': null};
|
||||
} else {
|
||||
state = r1.state;
|
||||
value = environment.__proto__;
|
||||
if (state === InviteStates.BANNED) {
|
||||
r0 = {'validInviteKey': null, 'isBypassInvite': false, 'inviteRoles': null};
|
||||
} else if (r1.state === InviteStates.EXPIRED) {
|
||||
r0 = {'validInviteKey': null, 'isBypassInvite': false, 'inviteRoles': null};
|
||||
} else {
|
||||
object2 = {validInviteKey: r4};
|
||||
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
hasFlag = moduleValue.hasFlag;
|
||||
flags = r1.flags;
|
||||
object2.isBypassInvite = Reflect.apply(hasFlag, moduleValue, [value2 != flags ? flags : 0,
|
||||
(require(8898) /* metro dependency 8898: GuildInviteFlags */).GuildInviteFlags.IS_APPLICATION_BYPASS]);
|
||||
object2.inviteRoles = r1.roles;
|
||||
r0 = object2;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun72801() { // fn#72801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9504:1437, offset: 0x01d5427a, size: 658 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var r3;
|
||||
var primaryGuild;
|
||||
var r2;
|
||||
var r1;
|
||||
var value4;
|
||||
var INVITE;
|
||||
var inviteRolesBinding;
|
||||
var value5;
|
||||
var Set;
|
||||
var set;
|
||||
var value9;
|
||||
var moduleValue;
|
||||
if (env0_8) {
|
||||
value4 = environment.__proto__;
|
||||
INVITE = env1_12.INVITE;
|
||||
if (require !== INVITE) {
|
||||
value9 = undefined;
|
||||
primaryGuild = env0_7 == null ? value9 : env0_7.primaryGuild;
|
||||
if (require === env1_12.INVITE) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (env0_0.tag == null) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if ((primaryGuild == null ? value9 : primaryGuild.identityGuildId) === id && (primaryGuild == null ? value9 : primaryGuild.identityEnabled) === true) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (guild == null) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else {
|
||||
moduleValue = require(8401) /* metro dependency 8401: GuildTagUtils */;
|
||||
r1 = moduleValue.guildSupportsTags(guild) ? env1_11.ADOPT_TAG : env1_11.IS_MEMBER;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
if (inviteRoles == null) {
|
||||
value9 = undefined;
|
||||
primaryGuild = env0_7 == null ? value9 : env0_7.primaryGuild;
|
||||
if (require === env1_12.INVITE) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (env0_0.tag == null) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if ((primaryGuild == null ? value9 : primaryGuild.identityGuildId) === id && (primaryGuild == null ? value9 : primaryGuild.identityEnabled) === true) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (guild == null) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else {
|
||||
moduleValue = require(8401) /* metro dependency 8401: GuildTagUtils */;
|
||||
r1 = moduleValue.guildSupportsTags(guild) ? env1_11.ADOPT_TAG : env1_11.IS_MEMBER;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
if (inviteRoles.length > 0) {
|
||||
if (env0_7 == null) {
|
||||
value9 = undefined;
|
||||
primaryGuild = env0_7 == null ? value9 : env0_7.primaryGuild;
|
||||
if (require === env1_12.INVITE) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (env0_0.tag == null) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if ((primaryGuild == null ? value9 : primaryGuild.identityGuildId) === id && (primaryGuild == null ? value9 : primaryGuild.identityEnabled) === true) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (guild == null) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else {
|
||||
moduleValue = require(8401) /* metro dependency 8401: GuildTagUtils */;
|
||||
r1 = moduleValue.guildSupportsTags(guild) ? env1_11.ADOPT_TAG : env1_11.IS_MEMBER;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
value5 = GuildMemberStore.getMember(id, env0_7.id);
|
||||
Set = global.Set;
|
||||
r3 = value5?.roles ?? [];
|
||||
set = new Set();
|
||||
inviteRolesBinding = inviteRoles;
|
||||
if (inviteRolesBinding.some(_fun72802)) {
|
||||
return env1_11.ACCEPT_ROLES;
|
||||
}
|
||||
value9 = undefined;
|
||||
primaryGuild = env0_7 == null ? value9 : env0_7.primaryGuild;
|
||||
if (require === env1_12.INVITE) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (set.tag == null) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if ((primaryGuild == null ? value9 : primaryGuild.identityGuildId) === id && (primaryGuild == null ? value9 : primaryGuild.identityEnabled) === true) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (guild == null) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else {
|
||||
moduleValue = require(8401) /* metro dependency 8401: GuildTagUtils */;
|
||||
r1 = moduleValue.guildSupportsTags(guild) ? env1_11.ADOPT_TAG : env1_11.IS_MEMBER;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
value9 = undefined;
|
||||
primaryGuild = env0_7 == null ? value9 : env0_7.primaryGuild;
|
||||
r2 = (primaryGuild == null ? value9 : primaryGuild.identityGuildId) === id && (primaryGuild == null ? value9 : primaryGuild.identityEnabled) === true;
|
||||
INVITE = env1_12.INVITE;
|
||||
if (require === INVITE) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (env0_0.tag == null) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (r2) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else if (guild == null) {
|
||||
r1 = env1_11.IS_MEMBER;
|
||||
} else {
|
||||
moduleValue = require(8401) /* metro dependency 8401: GuildTagUtils */;
|
||||
r1 = moduleValue.guildSupportsTags(guild) ? env1_11.ADOPT_TAG : env1_11.IS_MEMBER;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
const binding = env0_12;
|
||||
return binding.includes(id) ? env1_11.HAS_APPLICATION : features == null ? validInviteKey != null ? env1_11.JOIN_VIA_INVITE : features != null && features.includes(GuildFeatures.DISCOVERABLE) ? env1_11.LURK_DISCOVERABLE : null : features.includes(GuildFeatures.MEMBER_VERIFICATION_GATE_ENABLED) ? features == null ? validInviteKey != null ? env1_11.JOIN_VIA_INVITE : features != null && features.includes(GuildFeatures.DISCOVERABLE) ? env1_11.LURK_DISCOVERABLE : null : features.includes(GuildFeatures.MEMBER_VERIFICATION_MANUAL_APPROVAL) ? validInviteKey != null ? isBypassInvite ? validInviteKey != null ? env1_11.JOIN_VIA_INVITE : features != null && features.includes(GuildFeatures.DISCOVERABLE) ? env1_11.LURK_DISCOVERABLE : null : env1_11.APPLY_TO_JOIN : env0_0.visibility !== (require(6720) /* metro dependency 6720: GuildProfileTypes */).GuildProfileVisibility.PUBLIC_WITH_RECRUITMENT || isBypassInvite ? validInviteKey != null ? env1_11.JOIN_VIA_INVITE : features != null && features.includes(GuildFeatures.DISCOVERABLE) ? env1_11.LURK_DISCOVERABLE : null : env1_11.APPLY_TO_JOIN : validInviteKey != null ? env1_11.JOIN_VIA_INVITE : features != null && features.includes(GuildFeatures.DISCOVERABLE) ? env1_11.LURK_DISCOVERABLE : null : validInviteKey != null ? env1_11.JOIN_VIA_INVITE : features != null && features.includes(GuildFeatures.DISCOVERABLE) ? env1_11.LURK_DISCOVERABLE : null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,243 @@
|
||||
/* Metro module 9313; source: modules/guild_profile/hooks/useGuildProfileGames.tsx; dependencies: [31, 5200, 5199, 1226, 566, 5198, 1360, 2] */
|
||||
function _fun72754(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:6, offset: 0x01d5235d, size: 204 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_72757 = 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 = useAllGuildProfileGames;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const gameRecord = importDefault(5200) /* metro dependency 5200: GameRecord */;
|
||||
const gameStore = importDefault(5199) /* metro dependency 5199: GameStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_profile/hooks/useGuildProfileGames.tsx');
|
||||
exports.default = useGuildProfileGames;
|
||||
exports.useAllGuildProfileGames = closure;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_72755(a0, a1) { // fn#72755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:141, offset: 0x01d52429, size: 372 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 _fun72756;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_72757(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_72757(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_72757(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun72756;
|
||||
}
|
||||
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 useAllGuildProfileGames(a0) { // fn#72758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:1051, offset: 0x01d5259d, size: 180 bytes, params: 2, frame: 21
|
||||
const env0_0 = a0;
|
||||
const games = a0.games;
|
||||
(require(5198) /* metro dependency 5198: useGame */).useGames(games == null || (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
|
||||
function() {
|
||||
return AuthenticationStore.isAuthenticated();
|
||||
}) ? a0.gameApplicationIds : []);
|
||||
const env0_1 = useFallbackGameRecords(games);
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GameStore], _fun72762);
|
||||
}
|
||||
|
||||
function useGuildProfileGames(a0) { // fn#72764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:1691, offset: 0x01d52793, size: 180 bytes, params: 2, frame: 17
|
||||
var object2;
|
||||
const value3 = env0_2.useMemo(_fun72765, [useAllGuildProfileGames(a0), a0.gameActivity]);
|
||||
var env0_2 = value3;
|
||||
object2 = {};
|
||||
object2.gamesToDisplay = env0_2.useMemo(_fun72768, [value3]);
|
||||
object2.lastGameToDisplay = env0_2.useMemo(_fun72769, [value3]);
|
||||
object2.remainingGames = env0_2.useMemo(_fun72770, [value3]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useFallbackGameRecords(a0) { // fn#72760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:1222, owner: useAllGuildProfileGames.useFallbackGameRecords, offset: 0x01d52664, size: 44 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return env1_2.useMemo(_fun72761, [a0]);
|
||||
}
|
||||
|
||||
function _fun72762() { // fn#72762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:1477, offset: 0x01d5271a, size: 75 bytes, params: 1, frame: 13
|
||||
const value = env0_0.gameApplicationIds.map(_fun72763);
|
||||
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
}
|
||||
|
||||
function _fun72765() { // fn#72765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:1787, offset: 0x01d52847, size: 53 bytes, params: 1, frame: 14
|
||||
const gameActivityBinding = gameActivity;
|
||||
const value2 = ((a0) => {
|
||||
var env0_0 = a0;
|
||||
return _fun72767;
|
||||
})(gameActivityBinding);
|
||||
const binding = env0_1;
|
||||
const items2 = [];
|
||||
arraySpread(items2, binding, 0, gameActivityBinding);
|
||||
return items2.sort(value2);
|
||||
}
|
||||
|
||||
function _fun72768() { // fn#72768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:2040, offset: 0x01d528f5, size: 25 bytes, params: 1, frame: 13
|
||||
return env0_2.slice(0, 5);
|
||||
}
|
||||
|
||||
function _fun72769() { // fn#72769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:2092, offset: 0x01d5290e, size: 28 bytes, params: 1, frame: 3
|
||||
const property = env0_2[5];
|
||||
const value = null;
|
||||
return value != property ? property : value;
|
||||
}
|
||||
|
||||
function _fun72770() { // fn#72770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:2165, offset: 0x01d5292a, size: 22 bytes, params: 1, frame: 11
|
||||
return env0_2.slice(5);
|
||||
}
|
||||
|
||||
function _fun72761() { // fn#72761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:1275, offset: 0x01d52690, size: 138 bytes, params: 1, frame: 19
|
||||
var r2;
|
||||
var value6;
|
||||
var set;
|
||||
var id;
|
||||
var value7;
|
||||
var gameRecord;
|
||||
var value8;
|
||||
var value9;
|
||||
const Map = global.Map;
|
||||
let prototype = Map.prototype;
|
||||
let value = Object.create(prototype, {constructor: {value: Map}});
|
||||
const map = new Map();
|
||||
value = map instanceof Object ? map : value;
|
||||
if (env0_0 != null) {
|
||||
var value4 = _createForOfIteratorHelperLoose_72755(env0_0);
|
||||
var value5 = value4();
|
||||
var done = value5.done;
|
||||
if (!done) {
|
||||
r2 = value5;
|
||||
reducibleLoop2: while (true) {
|
||||
value6 = r2.value;
|
||||
set = value.set;
|
||||
id = value6.id;
|
||||
prototype = GameRecord.prototype;
|
||||
value7 = Object.create(prototype, {constructor: {value: GameRecord}});
|
||||
gameRecord = new GameRecord();
|
||||
value8 = gameRecord instanceof Object ? gameRecord : value7;
|
||||
Reflect.apply(set, value, [id, value8]);
|
||||
value9 = value4();
|
||||
done = value9.done;
|
||||
if (done) {
|
||||
break reducibleLoop2;
|
||||
}
|
||||
r2 = value9;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun72763(a0) { // fn#72763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:1507, offset: 0x01d52765, size: 46 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = GameStore.getGame(a0);
|
||||
if (value != null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = env1_1.get(a0);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function gameActivitySorter(a0) { // fn#72766, offset: 0x01d5287c, size: 18 bytes, params: 2, frame: 2
|
||||
const env0_0 = a0;
|
||||
return _fun72767;
|
||||
}
|
||||
|
||||
function _fun72767({id}, {id}) { // fn#72767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9499:1835, offset: 0x01d5288e, size: 103 bytes, params: 3, frame: 7
|
||||
const r2 = env0_0[id]?.score ?? 0;
|
||||
const r1 = env0_0[id]?.score ?? 0;
|
||||
return r2 === r1 ? 0 : r1 - r2;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user