55 lines
2.6 KiB
TypeScript
55 lines
2.6 KiB
TypeScript
/* Metro module 14492; source: modules/activities/utils/findActivityWithMostParticipants.tsx; dependencies: [3793, 2] */
|
|
function _fun109680(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:6, offset: 0x023568cc, size: 119 bytes, params: 8, frame: 17
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/findActivityWithMostParticipants.tsx');
|
|
exports.default = function(a0) {
|
|
var property = a0.length;
|
|
return property === 0 ? null : property === 1 ? a0[0] : a0.reduce(_fun109682, a0[0]);
|
|
};
|
|
exports.findActivityWithMostNonBlockedOrIgnoredParticipants = findActivityWithMostNonBlockedOrIgnoredParticipants;
|
|
}
|
|
|
|
function findActivityWithMostParticipants(a0) { // fn#109681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:211, offset: 0x02356943, size: 59 bytes, params: 2, frame: 15
|
|
const length = a0.length;
|
|
return length === 0 ? null : length === 1 ? a0[0] : a0.reduce(function(a0, a1) {
|
|
var value = a0;
|
|
var value2 = a1;
|
|
return value.userIds.size < value2.userIds.size ? value2 : value;
|
|
}, a0[0]);
|
|
}
|
|
|
|
function findActivityWithMostNonBlockedOrIgnoredParticipants(a0) { // fn#109683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:413, offset: 0x023569a3, size: 133 bytes, params: 2, frame: 18
|
|
const length = a0.length;
|
|
if (length === 0) {
|
|
return null;
|
|
}
|
|
if (length === 1) {
|
|
return a0[0];
|
|
}
|
|
const items3 = [a0[0]];
|
|
const userIds = a0[0].userIds;
|
|
const items2 = [];
|
|
arraySpread(items2, userIds, 0, items2);
|
|
items3[1] = items2.map(function(a0) {
|
|
return !RelationshipStore.isBlockedOrIgnored(a0);
|
|
}).length;
|
|
const env0_0 = items3[0];
|
|
const env0_1 = items3[1];
|
|
a0.forEach(_fun109685);
|
|
return env0_0;
|
|
}
|
|
|
|
function _fun109685(a0) { // fn#109685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14689:639, offset: 0x02356a42, size: 69 bytes, params: 2, frame: 14
|
|
const userIds = a0.userIds;
|
|
const items2 = [];
|
|
arraySpread(items2, userIds, 0, items2);
|
|
if (items2.filter(function(a0) {
|
|
return !RelationshipStore.isBlockedOrIgnored(a0);
|
|
}).length > env0_1) {
|
|
env0_0 = a0;
|
|
}
|
|
}
|
|
|