1146 lines
53 KiB
TypeScript
1146 lines
53 KiB
TypeScript
/* Metro module 9153; source: utils/InstantInviteUtils.tsx; dependencies: [1378, 1379, 1945, 4605, 3793, 1878, 5219, 661, 4118, 6526, 9154, 1244, 2] */
|
|
import EmbeddedActivitiesStore from '../modules/activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
|
|
import ChannelStore from '../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import UserStore from '../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import GuildMemberStore from '../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
|
|
import RelationshipStore from '../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
|
|
import ReadStateStore from '../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
|
|
import PrivateChannelSortStore from '../stores/views/PrivateChannelSortStore.tsx'; /* Metro dependency 5219 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as ConstantsModule2 from '../modules/instant_invite/Constants.tsx'; /* Metro dependency 4118 */
|
|
import * as InstantInviteUtilsModule from './native/InstantInviteUtils.tsx'; /* Metro dependency 9154 */
|
|
|
|
function _fun71723(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:6, offset: 0x01d2ab81, size: 1307 bytes, params: 8, frame: 21
|
|
let env0_0 = require;
|
|
const _arrayLikeToArray_71726 = 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 Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const object2 = {};
|
|
const INVITE_OPTIONS_30_MINUTES = (InstantInviteUtilsModule).INVITE_OPTIONS_30_MINUTES;
|
|
object2[INVITE_OPTIONS_30_MINUTES.value] = {'value': 30, 'type': 'minutes'};
|
|
const INVITE_OPTIONS_1_HOUR = (InstantInviteUtilsModule).INVITE_OPTIONS_1_HOUR;
|
|
object2[INVITE_OPTIONS_1_HOUR.value] = {'value': 1, 'type': 'hours'};
|
|
const INVITE_OPTIONS_6_HOURS = (InstantInviteUtilsModule).INVITE_OPTIONS_6_HOURS;
|
|
object2[INVITE_OPTIONS_6_HOURS.value] = {'value': 6, 'type': 'hours'};
|
|
const INVITE_OPTIONS_12_HOURS = (InstantInviteUtilsModule).INVITE_OPTIONS_12_HOURS;
|
|
object2[INVITE_OPTIONS_12_HOURS.value] = {'value': 12, 'type': 'hours'};
|
|
const INVITE_OPTIONS_1_DAY = (InstantInviteUtilsModule).INVITE_OPTIONS_1_DAY;
|
|
object2[INVITE_OPTIONS_1_DAY.value] = {'value': 1, 'type': 'days'};
|
|
const INVITE_OPTIONS_7_DAYS = (InstantInviteUtilsModule).INVITE_OPTIONS_7_DAYS;
|
|
object2[INVITE_OPTIONS_7_DAYS.value] = {'value': 7, 'type': 'days'};
|
|
const INVITE_OPTIONS_14_DAYS = (InstantInviteUtilsModule).INVITE_OPTIONS_14_DAYS;
|
|
object2[INVITE_OPTIONS_14_DAYS.value] = {'value': 14, 'type': 'days'};
|
|
const INVITE_OPTIONS_30_DAYS = (InstantInviteUtilsModule).INVITE_OPTIONS_30_DAYS;
|
|
object2[INVITE_OPTIONS_30_DAYS.value] = {'value': 30, 'type': 'days'};
|
|
const INVITE_OPTIONS_60_DAYS = (InstantInviteUtilsModule).INVITE_OPTIONS_60_DAYS;
|
|
object2[INVITE_OPTIONS_60_DAYS.value] = {'value': 60, 'type': 'days'};
|
|
const INVITE_OPTIONS_FOREVER = (InstantInviteUtilsModule).INVITE_OPTIONS_FOREVER;
|
|
object2[INVITE_OPTIONS_FOREVER.value] = {'value': 0, 'type': 'never'};
|
|
const items2 = [INVITE_OPTIONS_14_DAYS];
|
|
items2[1] = INVITE_OPTIONS_30_DAYS;
|
|
items2[2] = INVITE_OPTIONS_60_DAYS;
|
|
const object3 = {getMaxAgeOptionByValue: getMaxAgeOptionByValue, getMaxAgeOptions: function(a0) {
|
|
var env0_0 = a0;
|
|
var MAX_AGE_OPTIONS = require(dependencyMap[10]).MAX_AGE_OPTIONS;
|
|
return MAX_AGE_OPTIONS.filter(_fun71732);
|
|
}};
|
|
const MAX_USES_OPTIONS = (InstantInviteUtilsModule).MAX_USES_OPTIONS;
|
|
object3.getMaxUsesOptions = MAX_USES_OPTIONS;
|
|
object3.INVITE_OPTIONS_FOREVER = INVITE_OPTIONS_FOREVER;
|
|
object3.INVITE_OPTIONS_1_DAY = INVITE_OPTIONS_1_DAY;
|
|
object3.INVITE_OPTIONS_7_DAYS = INVITE_OPTIONS_7_DAYS;
|
|
object3.INVITE_OPTIONS_14_DAYS = INVITE_OPTIONS_14_DAYS;
|
|
object3.INVITE_OPTIONS_30_DAYS = INVITE_OPTIONS_30_DAYS;
|
|
object3.INVITE_OPTIONS_60_DAYS = INVITE_OPTIONS_60_DAYS;
|
|
object3.INVITE_OPTIONS_12_HOURS = INVITE_OPTIONS_12_HOURS;
|
|
object3.INVITE_OPTIONS_6_HOURS = INVITE_OPTIONS_6_HOURS;
|
|
const INVITE_OPTIONS_8_HOURS = (InstantInviteUtilsModule).INVITE_OPTIONS_8_HOURS;
|
|
object3.INVITE_OPTIONS_8_HOURS = INVITE_OPTIONS_8_HOURS;
|
|
object3.INVITE_OPTIONS_1_HOUR = INVITE_OPTIONS_1_HOUR;
|
|
object3.INVITE_OPTIONS_30_MINUTES = INVITE_OPTIONS_30_MINUTES;
|
|
const INVITE_OPTIONS_UNLIMITED = (InstantInviteUtilsModule).INVITE_OPTIONS_UNLIMITED;
|
|
object3.INVITE_OPTIONS_UNLIMITED = INVITE_OPTIONS_UNLIMITED;
|
|
const INVITE_OPTIONS_ONCE = (InstantInviteUtilsModule).INVITE_OPTIONS_ONCE;
|
|
object3.INVITE_OPTIONS_ONCE = INVITE_OPTIONS_ONCE;
|
|
const INVITE_OPTIONS_5_TIMES = (InstantInviteUtilsModule).INVITE_OPTIONS_5_TIMES;
|
|
object3.INVITE_OPTIONS_5_TIMES = INVITE_OPTIONS_5_TIMES;
|
|
const INVITE_OPTIONS_10_TIMES = (InstantInviteUtilsModule).INVITE_OPTIONS_10_TIMES;
|
|
object3.INVITE_OPTIONS_10_TIMES = INVITE_OPTIONS_10_TIMES;
|
|
const INVITE_OPTIONS_25_TIMES = (InstantInviteUtilsModule).INVITE_OPTIONS_25_TIMES;
|
|
object3.INVITE_OPTIONS_25_TIMES = INVITE_OPTIONS_25_TIMES;
|
|
const INVITE_OPTIONS_50_TIMES = (InstantInviteUtilsModule).INVITE_OPTIONS_50_TIMES;
|
|
object3.INVITE_OPTIONS_50_TIMES = INVITE_OPTIONS_50_TIMES;
|
|
const INVITE_OPTIONS_100_TIMES = (InstantInviteUtilsModule).INVITE_OPTIONS_100_TIMES;
|
|
object3.INVITE_OPTIONS_100_TIMES = INVITE_OPTIONS_100_TIMES;
|
|
(FileImportTrackerModule).fileFinishedImporting('utils/InstantInviteUtils.tsx');
|
|
exports.default = object3;
|
|
exports.RowTypes = {GROUP_DM: 'GROUP_DM', DM: 'DM', FRIEND: 'FRIEND', CHANNEL: 'CHANNEL'};
|
|
exports.generateRowsForQuery = generateRowsForQuery;
|
|
exports.groupInviteSuggestions = groupInviteSuggestions;
|
|
exports.getMostRecentDMedUser = getMostRecentDMedUser;
|
|
exports.getUsersAlreadyJoined = getUsersAlreadyJoined;
|
|
exports.maxAgeString = maxAgeString;
|
|
exports.urgentShareMessageString = urgentShareMessageString;
|
|
exports.EXPERIMENTAL_MAX_AGE_OPTIONS = items2;
|
|
function _createForOfIteratorHelperLoose_71724(a0, a1) { // fn#71724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:223, offset: 0x01d2b09c, 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 _fun71725;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_71726(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_71726(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_71726(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun71725;
|
|
}
|
|
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 _fun71725() { // fn#71725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:794, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function isGuildMember(a0, a1) { // fn#71727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:1235, offset: 0x01d2b210, size: 36 bytes, params: 3, frame: 14
|
|
return a0 != null && GuildMemberStore.isMember(a0, a1);
|
|
}
|
|
|
|
function addDmUsers({omitUserIds, maxRowsWithoutQuery, omitGuildId, shownUserIds, rows, counts, includeGroupDms, limit}) { // fn#71728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:1295, offset: 0x01d2b234, size: 584 bytes, params: 2, frame: 36
|
|
var r4;
|
|
var r5;
|
|
var r21;
|
|
var value6;
|
|
var length;
|
|
var channelStoreBinding;
|
|
var getChannel;
|
|
var value7;
|
|
var isPrivate;
|
|
var type;
|
|
var GROUP_DM;
|
|
var readStateStoreBinding;
|
|
var lastMessageId;
|
|
var id;
|
|
var getRecipientId;
|
|
var value8;
|
|
var has;
|
|
var userStoreBinding;
|
|
var getUser;
|
|
var value9;
|
|
var bot;
|
|
var isGuildMemberBinding;
|
|
var add;
|
|
var push;
|
|
var DM;
|
|
var numDms;
|
|
var value10;
|
|
var numGroupDms;
|
|
var value11;
|
|
var value12;
|
|
const value3 = _createForOfIteratorHelperLoose_71724(PrivateChannelSortStore.getPrivateChannelIds());
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
if (!done) {
|
|
r4 = 0;
|
|
r5 = value4;
|
|
reducibleLoop1: while (true) {
|
|
value6 = r5.value;
|
|
if (maxRowsWithoutQuery != null) {
|
|
reducibleJoin4: while (true) {
|
|
if (maxRowsWithoutQuery > 0) {
|
|
length = rows.length;
|
|
if (length >= maxRowsWithoutQuery) {
|
|
break reducibleLoop1;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
}
|
|
if (limit != null) {
|
|
reducibleJoin6: while (true) {
|
|
if (r4 >= limit) {
|
|
break reducibleLoop1;
|
|
}
|
|
break reducibleJoin6;
|
|
}
|
|
}
|
|
channelStoreBinding = ChannelStore;
|
|
getChannel = channelStoreBinding.getChannel;
|
|
value7 = Reflect.apply(getChannel, channelStoreBinding, [value6]);
|
|
reducibleJoin19: while (true) {
|
|
if (value7 == null) {
|
|
r21 = r4;
|
|
break reducibleJoin19;
|
|
}
|
|
isPrivate = value7.isPrivate;
|
|
if (Reflect.apply(isPrivate, value7, [])) {
|
|
if (includeGroupDms) {
|
|
type = value7.type;
|
|
GROUP_DM = ChannelTypes.GROUP_DM;
|
|
if (type === GROUP_DM) {
|
|
push = rows.push;
|
|
GROUP_DM = env0_12.GROUP_DM;
|
|
Reflect.apply(push, rows, [{type: GROUP_DM, item: value7, isSuggested: false}]);
|
|
numGroupDms = counts.numGroupDms;
|
|
counts.numGroupDms = typeof numGroupDms === 'bigint' ? numGroupDms + 1n : +numGroupDms + 1;
|
|
value11 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
|
r21 = value11;
|
|
break reducibleJoin19;
|
|
}
|
|
}
|
|
readStateStoreBinding = ReadStateStore;
|
|
lastMessageId = readStateStoreBinding.lastMessageId;
|
|
id = value7.id;
|
|
if (Reflect.apply(lastMessageId, readStateStoreBinding, [id]) == null) {
|
|
r21 = r4;
|
|
break reducibleJoin19;
|
|
}
|
|
getRecipientId = value7.getRecipientId;
|
|
value8 = Reflect.apply(getRecipientId, value7, []);
|
|
if (value8 == null) {
|
|
r21 = r4;
|
|
break reducibleJoin19;
|
|
}
|
|
has = omitUserIds.has;
|
|
if (Reflect.apply(has, omitUserIds, [value8])) {
|
|
r21 = r4;
|
|
break reducibleJoin19;
|
|
}
|
|
has = shownUserIds.has;
|
|
if (Reflect.apply(has, shownUserIds, [value8])) {
|
|
r21 = r4;
|
|
break reducibleJoin19;
|
|
}
|
|
userStoreBinding = UserStore;
|
|
getUser = userStoreBinding.getUser;
|
|
value9 = Reflect.apply(getUser, userStoreBinding, [value8]);
|
|
if (value9 == null) {
|
|
r21 = r4;
|
|
break reducibleJoin19;
|
|
}
|
|
bot = value9.bot;
|
|
if (bot) {
|
|
r21 = r4;
|
|
break reducibleJoin19;
|
|
}
|
|
isGuildMemberBinding = isGuildMember;
|
|
id = value9.id;
|
|
if (isGuildMemberBinding(omitGuildId, id)) {
|
|
r21 = r4;
|
|
break reducibleJoin19;
|
|
}
|
|
add = shownUserIds.add;
|
|
id = value9.id;
|
|
Reflect.apply(add, shownUserIds, [id]);
|
|
push = rows.push;
|
|
DM = env0_12.DM;
|
|
Reflect.apply(push, rows, [{type: DM, item: value9, isSuggested: false}]);
|
|
numDms = counts.numDms;
|
|
counts.numDms = typeof numDms === 'bigint' ? numDms + 1n : +numDms + 1;
|
|
value10 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
|
r21 = value10;
|
|
break reducibleJoin19;
|
|
}
|
|
r21 = r4;
|
|
break reducibleJoin19;
|
|
}
|
|
value12 = value3();
|
|
done = value12.done;
|
|
if (done) {
|
|
break reducibleLoop1;
|
|
}
|
|
r4 = r21;
|
|
r5 = value12;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
}
|
|
|
|
function getMaxAgeOptionByValue(a0) { // fn#71729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:2737, offset: 0x01d2b47c, size: 89 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
const MAX_AGE_OPTIONS = (InstantInviteUtilsModule).MAX_AGE_OPTIONS;
|
|
const items2 = [];
|
|
arraySpread(items2, env0_14, arraySpread(items2, MAX_AGE_OPTIONS, 0, require), require);
|
|
return items2.find(_fun71730) || null;
|
|
function _fun71730({value}) { // fn#71730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:2820, offset: 0x01b733f1, size: 21 bytes, params: 2, frame: 2
|
|
return value === env0_0;
|
|
}
|
|
|
|
}
|
|
|
|
function getMaxAgeOptions(a0) { // fn#71731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:2861, offset: 0x01d2b4d5, size: 59 bytes, params: 2, frame: 12
|
|
const env0_0 = a0;
|
|
const MAX_AGE_OPTIONS = (InstantInviteUtilsModule).MAX_AGE_OPTIONS;
|
|
return MAX_AGE_OPTIONS.filter(_fun71732);
|
|
function _fun71732(a0) { // fn#71732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:2931, offset: 0x01d2b510, size: 97 bytes, params: 2, frame: 15
|
|
var r1;
|
|
var r0;
|
|
var value3;
|
|
var includeExperimentalValues;
|
|
let value = environment.__proto__;
|
|
if (value) {
|
|
value3 = undefined;
|
|
if (env0_0 == null) {
|
|
r1 = value3;
|
|
} else {
|
|
includeExperimentalValues = env0_0.includeExperimentalValues;
|
|
if (includeExperimentalValues == null) {
|
|
r1 = value3;
|
|
} else {
|
|
includes = includeExperimentalValues.includes;
|
|
if (includes == null) {
|
|
r1 = value3;
|
|
} else {
|
|
includes = includeExperimentalValues.includes;
|
|
value = a0.value;
|
|
value = Reflect.apply(includes, includeExperimentalValues, [value]);
|
|
r1 = value;
|
|
}
|
|
}
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = !env1_14.includes(a0);
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
function generateRowsForQuery({query, inviteTargetType, omitUserIds, suggestedUserIds, suggestedChannelIds, maxRowsWithoutQuery, omitGuildId}) { // fn#71733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:4238, offset: 0x01d2b571, size: 1197 bytes, params: 2, frame: 31
|
|
var r21;
|
|
var r4;
|
|
var r5;
|
|
var r19;
|
|
var r18;
|
|
var object;
|
|
var object2;
|
|
var object3;
|
|
var object4;
|
|
var object5;
|
|
var object6;
|
|
var addDmUsersBinding;
|
|
var object7;
|
|
var object8;
|
|
var rows;
|
|
var counts;
|
|
var _createForOfIteratorHelperLoose_71724Binding;
|
|
var value3;
|
|
var value4;
|
|
var done;
|
|
var value5;
|
|
var length;
|
|
var channelStoreBinding;
|
|
var getChannel;
|
|
var value6;
|
|
var push;
|
|
var CHANNEL;
|
|
var numChannels;
|
|
var value7;
|
|
var object9;
|
|
var shownUserIds;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var has;
|
|
var userStoreBinding;
|
|
var getUser;
|
|
var value11;
|
|
var value12;
|
|
var isGuildMemberBinding;
|
|
var id;
|
|
var isGuildMember2;
|
|
var add;
|
|
var FRIEND;
|
|
var numFriends;
|
|
var value13;
|
|
var object11;
|
|
var relationshipStoreBinding;
|
|
var value14;
|
|
var value15;
|
|
var value16;
|
|
var value17;
|
|
var value18;
|
|
var isGuildMember3;
|
|
var value19;
|
|
const Set = global.Set;
|
|
const set = new Set();
|
|
const items2 = [];
|
|
const object13 = {'numFriends': 0, 'numDms': 0, 'numGroupDms': 0, 'numGuildMembers': 0, 'numChannels': 0};
|
|
if (query === '') {
|
|
object6 = {omitUserIds: omitUserIds, maxRowsWithoutQuery: maxRowsWithoutQuery, omitGuildId: omitGuildId,
|
|
shownUserIds: set, rows: items2, counts: object13};
|
|
reducibleJoin13: while (true) {
|
|
if (inviteTargetType !== InviteTargetTypes.EMBEDDED_APPLICATION) {
|
|
break reducibleJoin13;
|
|
}
|
|
addDmUsersBinding = addDmUsers;
|
|
object7 = {};
|
|
copyDataProperties(object7, object6, r21);
|
|
object7['includeGroupDms'] = false;
|
|
object7['limit'] = 1;
|
|
addDmUsersBinding(object7);
|
|
object8 = {};
|
|
copyDataProperties(object8, object6, r21);
|
|
object8['suggestedChannelIds'] = suggestedChannelIds;
|
|
suggestedChannelIds = object8.suggestedChannelIds;
|
|
maxRowsWithoutQuery = object8.maxRowsWithoutQuery;
|
|
rows = object8.rows;
|
|
counts = object8.counts;
|
|
if (suggestedChannelIds == null) {
|
|
break reducibleJoin13;
|
|
}
|
|
value3 = _createForOfIteratorHelperLoose_71724(suggestedChannelIds);
|
|
value4 = value3();
|
|
done = value4.done;
|
|
if (done) {
|
|
break reducibleJoin13;
|
|
}
|
|
r4 = value4;
|
|
reducibleLoop7: while (true) {
|
|
value5 = r4.value;
|
|
if (maxRowsWithoutQuery != null) {
|
|
reducibleJoin10: while (true) {
|
|
if (maxRowsWithoutQuery > 0) {
|
|
length = rows.length;
|
|
if (length >= maxRowsWithoutQuery) {
|
|
break reducibleJoin13;
|
|
}
|
|
break reducibleJoin10;
|
|
}
|
|
break reducibleJoin10;
|
|
}
|
|
}
|
|
channelStoreBinding = ChannelStore;
|
|
getChannel = channelStoreBinding.getChannel;
|
|
value6 = Reflect.apply(getChannel, channelStoreBinding, [value5]);
|
|
reducibleJoin12: while (true) {
|
|
if (value6 == null) {
|
|
break reducibleJoin12;
|
|
}
|
|
push = rows.push;
|
|
CHANNEL = env0_12.CHANNEL;
|
|
Reflect.apply(push, rows, [{type: CHANNEL, item: value6, isSuggested: true}]);
|
|
numChannels = counts.numChannels;
|
|
counts.numChannels = typeof numChannels === 'bigint' ? numChannels + 1n : +numChannels + 1;
|
|
break reducibleJoin12;
|
|
}
|
|
value7 = value3();
|
|
done = value7.done;
|
|
if (done) {
|
|
break reducibleJoin13;
|
|
}
|
|
r4 = value7;
|
|
continue reducibleLoop7;
|
|
}
|
|
}
|
|
object9 = {};
|
|
copyDataProperties(object9, object6, r21);
|
|
object9['suggestedUserIds'] = suggestedUserIds;
|
|
omitUserIds = object9.omitUserIds;
|
|
suggestedUserIds = object9.suggestedUserIds;
|
|
maxRowsWithoutQuery = object9.maxRowsWithoutQuery;
|
|
omitGuildId = object9.omitGuildId;
|
|
shownUserIds = object9.shownUserIds;
|
|
rows = object9.rows;
|
|
counts = object9.counts;
|
|
reducibleJoin25: while (true) {
|
|
if (suggestedUserIds == null) {
|
|
break reducibleJoin25;
|
|
}
|
|
value8 = _createForOfIteratorHelperLoose_71724(suggestedUserIds);
|
|
value9 = value8();
|
|
done = value9.done;
|
|
if (done) {
|
|
break reducibleJoin25;
|
|
}
|
|
r5 = value9;
|
|
reducibleLoop15: while (true) {
|
|
value10 = r5.value;
|
|
if (maxRowsWithoutQuery != null) {
|
|
reducibleJoin18: while (true) {
|
|
if (maxRowsWithoutQuery > 0) {
|
|
length = rows.length;
|
|
if (length >= maxRowsWithoutQuery) {
|
|
break reducibleJoin25;
|
|
}
|
|
break reducibleJoin18;
|
|
}
|
|
break reducibleJoin18;
|
|
}
|
|
}
|
|
has = omitUserIds.has;
|
|
reducibleJoin24: while (true) {
|
|
if (Reflect.apply(has, omitUserIds, [value10])) {
|
|
break reducibleJoin24;
|
|
}
|
|
has = shownUserIds.has;
|
|
if (Reflect.apply(has, shownUserIds, [value10])) {
|
|
break reducibleJoin24;
|
|
}
|
|
userStoreBinding = UserStore;
|
|
getUser = userStoreBinding.getUser;
|
|
value11 = Reflect.apply(getUser, userStoreBinding, [value10]);
|
|
value12 = value11 == null;
|
|
reducibleJoin22: while (true) {
|
|
if (value12) {
|
|
r19 = value12;
|
|
break reducibleJoin22;
|
|
}
|
|
isGuildMemberBinding = isGuildMember;
|
|
id = value11.id;
|
|
isGuildMember2 = isGuildMemberBinding(omitGuildId, id);
|
|
r19 = isGuildMember2;
|
|
r21 = isGuildMemberBinding;
|
|
break reducibleJoin22;
|
|
}
|
|
if (r19) {
|
|
break reducibleJoin24;
|
|
}
|
|
add = shownUserIds.add;
|
|
id = value11.id;
|
|
Reflect.apply(add, shownUserIds, [id]);
|
|
push = rows.push;
|
|
FRIEND = env0_12.FRIEND;
|
|
Reflect.apply(push, rows, [{type: FRIEND, item: value11, isSuggested: true}]);
|
|
numFriends = counts.numFriends;
|
|
counts.numFriends = typeof numFriends === 'bigint' ? numFriends + 1n : +numFriends + 1;
|
|
r21 = FRIEND;
|
|
break reducibleJoin24;
|
|
}
|
|
value13 = value8();
|
|
done = value13.done;
|
|
if (done) {
|
|
break reducibleJoin25;
|
|
}
|
|
r5 = value13;
|
|
continue reducibleLoop15;
|
|
}
|
|
}
|
|
addDmUsersBinding = addDmUsers;
|
|
object11 = {};
|
|
copyDataProperties(object11, object6, r21);
|
|
object11['includeGroupDms'] = true;
|
|
addDmUsersBinding(object11);
|
|
omitUserIds = object6.omitUserIds;
|
|
maxRowsWithoutQuery = object6.maxRowsWithoutQuery;
|
|
omitGuildId = object6.omitGuildId;
|
|
shownUserIds = object6.shownUserIds;
|
|
rows = object6.rows;
|
|
counts = object6.counts;
|
|
_createForOfIteratorHelperLoose_71724Binding = _createForOfIteratorHelperLoose_71724;
|
|
relationshipStoreBinding = RelationshipStore;
|
|
value14 = _createForOfIteratorHelperLoose_71724Binding(relationshipStoreBinding.getFriendIDs());
|
|
value15 = value14();
|
|
done = value15.done;
|
|
if (!done) {
|
|
r4 = value15;
|
|
reducibleLoop26: while (true) {
|
|
value16 = r4.value;
|
|
if (maxRowsWithoutQuery != null) {
|
|
reducibleJoin29: while (true) {
|
|
if (maxRowsWithoutQuery > 0) {
|
|
length = rows.length;
|
|
if (length >= maxRowsWithoutQuery) {
|
|
break reducibleLoop26;
|
|
}
|
|
break reducibleJoin29;
|
|
}
|
|
break reducibleJoin29;
|
|
}
|
|
}
|
|
has = omitUserIds.has;
|
|
reducibleJoin35: while (true) {
|
|
if (Reflect.apply(has, omitUserIds, [value16])) {
|
|
break reducibleJoin35;
|
|
}
|
|
has = shownUserIds.has;
|
|
if (Reflect.apply(has, shownUserIds, [value16])) {
|
|
break reducibleJoin35;
|
|
}
|
|
userStoreBinding = UserStore;
|
|
getUser = userStoreBinding.getUser;
|
|
value17 = Reflect.apply(getUser, userStoreBinding, [value16]);
|
|
value18 = value17 == null;
|
|
reducibleJoin33: while (true) {
|
|
if (value18) {
|
|
r18 = value18;
|
|
break reducibleJoin33;
|
|
}
|
|
isGuildMemberBinding = isGuildMember;
|
|
id = value17.id;
|
|
isGuildMember3 = isGuildMemberBinding(omitGuildId, id);
|
|
r18 = isGuildMember3;
|
|
break reducibleJoin33;
|
|
}
|
|
if (r18) {
|
|
break reducibleJoin35;
|
|
}
|
|
push = rows.push;
|
|
FRIEND = env0_12.FRIEND;
|
|
Reflect.apply(push, rows, [{type: FRIEND, item: value17, isSuggested: false}]);
|
|
numFriends = counts.numFriends;
|
|
counts.numFriends = typeof numFriends === 'bigint' ? numFriends + 1n : +numFriends + 1;
|
|
break reducibleJoin35;
|
|
}
|
|
value19 = value14();
|
|
done = value19.done;
|
|
if (done) {
|
|
break reducibleLoop26;
|
|
}
|
|
r4 = value19;
|
|
continue reducibleLoop26;
|
|
}
|
|
}
|
|
} else {
|
|
object = {query: query, rows: items2, counts: object13};
|
|
reducibleJoin3: while (true) {
|
|
if (inviteTargetType !== InviteTargetTypes.EMBEDDED_APPLICATION) {
|
|
break reducibleJoin3;
|
|
}
|
|
object2 = {};
|
|
copyDataProperties(object2, object, r21);
|
|
object2['inviteTargetType'] = inviteTargetType;
|
|
addQueriedChannels(object2);
|
|
break reducibleJoin3;
|
|
}
|
|
object3 = {};
|
|
copyDataProperties(object3, object, r21);
|
|
object3['omitUserIds'] = omitUserIds;
|
|
object3['shownUserIds'] = set;
|
|
object3['suggestedUserIds'] = suggestedUserIds;
|
|
addQueriedSuggestedUsers(object3);
|
|
object4 = {};
|
|
copyDataProperties(object4, object, r21);
|
|
object4['omitUserIds'] = omitUserIds;
|
|
object4['shownUserIds'] = set;
|
|
addQueriedDmUsers(object4);
|
|
addQueriedGroupDms(object);
|
|
object5 = {};
|
|
copyDataProperties(object5, object, r21);
|
|
object5['omitUserIds'] = omitUserIds;
|
|
object5['shownUserIds'] = set;
|
|
addQueriedFriends(object5);
|
|
}
|
|
return {rows: items2, counts: object13};
|
|
function addQueriedChannels({query, rows, counts, inviteTargetType}) { // fn#71734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:5904, owner: generateRowsForQuery.addQueriedChannels, offset: 0x01d2ba1e, size: 126 bytes, params: 2, frame: 14
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
|
|
if (inviteTargetType === EMBEDDED_APPLICATION) {
|
|
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
value = value.queryChannels({query: query, limit: 3, guildId: undefined});
|
|
value.forEach(_fun71735);
|
|
}
|
|
function _fun71735({record, score}) { // fn#71735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:6071, offset: 0x01d2ba9c, size: 90 bytes, params: 2, frame: 15
|
|
const rowsBinding = rows;
|
|
const push = rowsBinding.push;
|
|
const CHANNEL = env2_12.CHANNEL;
|
|
Reflect.apply(push, rowsBinding, [{type: CHANNEL, item: record, isSuggested: false, score: score}]);
|
|
const countsBinding = counts;
|
|
const numChannels = countsBinding.numChannels;
|
|
countsBinding.numChannels = typeof numChannels === 'bigint' ? numChannels + 1n : +numChannels + 1;
|
|
}
|
|
|
|
}
|
|
|
|
function addQueriedSuggestedUsers({query, rows, counts, omitUserIds, shownUserIds, suggestedUserIds}) { // fn#71736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:6196, owner: generateRowsForQuery.addQueriedSuggestedUsers, offset: 0x01d2baf6, size: 258 bytes, params: 2, frame: 23
|
|
var environment;
|
|
var r7;
|
|
var items2;
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var done;
|
|
var value4;
|
|
var has;
|
|
var user;
|
|
var value6;
|
|
if (suggestedUserIds != null) {
|
|
items2 = [];
|
|
value = environment.__proto__;
|
|
value2 = _createForOfIteratorHelperLoose_71724(suggestedUserIds);
|
|
value3 = value2();
|
|
done = value3.done;
|
|
if (!done) {
|
|
r7 = value3;
|
|
while (true) {
|
|
value4 = r7.value;
|
|
has = omitUserIds.has;
|
|
if (!Reflect.apply(has, omitUserIds, [value4])) {
|
|
has = shownUserIds.has;
|
|
if (Reflect.apply(has, shownUserIds, [value4])) {
|
|
break;
|
|
}
|
|
user = UserStore.getUser(value4);
|
|
if (user == null) {
|
|
break;
|
|
}
|
|
items2.push(user);
|
|
break;
|
|
}
|
|
value6 = value2();
|
|
done = value6.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r7 = value6;
|
|
continue;
|
|
}
|
|
}
|
|
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
|
value = value.queryMemberList({query: query, members: items2, limit: 10});
|
|
value.forEach(_fun71737);
|
|
}
|
|
function _fun71737({record, score}) { // fn#71737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:6526, offset: 0x01d2bbf8, size: 109 bytes, params: 2, frame: 15
|
|
const shownUserIdsBinding = shownUserIds;
|
|
shownUserIdsBinding.add(record.id);
|
|
const rowsBinding = rows;
|
|
const push = rowsBinding.push;
|
|
const FRIEND = env2_12.FRIEND;
|
|
Reflect.apply(push, rowsBinding, [{type: FRIEND, item: record, isSuggested: true, score: score}]);
|
|
const countsBinding = counts;
|
|
const numFriends = countsBinding.numFriends;
|
|
countsBinding.numFriends = typeof numFriends === 'bigint' ? numFriends + 1n : +numFriends + 1;
|
|
}
|
|
|
|
}
|
|
|
|
function addQueriedDmUsers({query, omitUserIds, shownUserIds, rows, counts}) { // fn#71738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:6691, owner: generateRowsForQuery.addQueriedDmUsers, offset: 0x01d2bc65, size: 120 bytes, params: 2, frame: 14
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
value = Reflect.apply((importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).queryDMUsers, value,
|
|
[{query: query, limit: 50}]);
|
|
value.forEach(_fun71739);
|
|
function _fun71739({record, score}) { // fn#71739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:6824, offset: 0x01d2bcdd, size: 210 bytes, params: 2, frame: 17
|
|
var shownUserIdsBinding;
|
|
var value2;
|
|
var channelStoreBinding;
|
|
var value3;
|
|
var countsBinding;
|
|
var numDms;
|
|
const omitUserIdsBinding = omitUserIds;
|
|
if (!omitUserIdsBinding.has(record.id)) {
|
|
if (!Reflect.apply(shownUserIds.has, shownUserIdsBinding, [record.id])) {
|
|
value2 = environment.__proto__.__proto__;
|
|
channelStoreBinding = ChannelStore;
|
|
value3 = channelStoreBinding.getDMFromUserId(record.id);
|
|
if (value3 != null && ReadStateStore.lastMessageId(value3) != null) {
|
|
shownUserIdsBinding = shownUserIds;
|
|
shownUserIdsBinding.add(record.id);
|
|
rows.push({type: env2_12.DM, item: record, isSuggested: false, score: score});
|
|
countsBinding = counts;
|
|
numDms = countsBinding.numDms;
|
|
countsBinding.numDms = typeof numDms === 'bigint' ? numDms + 1n : +numDms + 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function addQueriedGroupDms({query, rows, counts}) { // fn#71740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:7060, owner: generateRowsForQuery.addQueriedGroupDms, offset: 0x01d2bdaf, size: 106 bytes, params: 2, frame: 14
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
value = Reflect.apply((importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).queryGroupDMs, value,
|
|
[{'query': null, 'limit': 50, 'fuzzy': false, query: query}]);
|
|
value.forEach(_fun71741);
|
|
function _fun71741({record, score}) { // fn#71741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:7175, offset: 0x01d2be19, size: 90 bytes, params: 2, frame: 15
|
|
const rowsBinding = rows;
|
|
const push = rowsBinding.push;
|
|
const GROUP_DM = env2_12.GROUP_DM;
|
|
Reflect.apply(push, rowsBinding, [{type: GROUP_DM, item: record, isSuggested: false, score: score}]);
|
|
const countsBinding = counts;
|
|
const numGroupDms = countsBinding.numGroupDms;
|
|
countsBinding.numGroupDms = typeof numGroupDms === 'bigint' ? numGroupDms + 1n : +numGroupDms + 1;
|
|
}
|
|
|
|
}
|
|
|
|
function addQueriedFriends({query, rows, counts, omitUserIds, shownUserIds}) { // fn#71742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:7277, owner: generateRowsForQuery.addQueriedFriends, offset: 0x01d2be73, size: 126 bytes, params: 2, frame: 14
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
value = Reflect.apply((importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).queryFriends, value,
|
|
[{'query': null, 'limit': 500, '_fuzzy': false, query: query}]);
|
|
value.forEach(_fun71743);
|
|
function _fun71743({record, score}) { // fn#71743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:7421, offset: 0x01d2bef1, size: 153 bytes, params: 2, frame: 15
|
|
var r1;
|
|
var shownUserIdsBinding;
|
|
var rowsBinding;
|
|
var push;
|
|
var value4;
|
|
var countsBinding;
|
|
var numFriends;
|
|
const omitUserIdsBinding = omitUserIds;
|
|
const value2 = omitUserIdsBinding.has(record.id);
|
|
if (value2) {
|
|
r1 = value2;
|
|
} else {
|
|
shownUserIdsBinding = shownUserIds;
|
|
r1 = shownUserIdsBinding.has(record.id);
|
|
}
|
|
if (!r1) {
|
|
shownUserIdsBinding = shownUserIds;
|
|
shownUserIdsBinding.add(record.id);
|
|
rowsBinding = rows;
|
|
push = rowsBinding.push;
|
|
value4 = environment.__proto__.__proto__;
|
|
Reflect.apply(push, rowsBinding, [{type: env2_12.FRIEND, item: record, isSuggested: false, score: score}]);
|
|
countsBinding = counts;
|
|
numFriends = countsBinding.numFriends;
|
|
countsBinding.numFriends = typeof numFriends === 'bigint' ? numFriends + 1n : +numFriends + 1;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function groupInviteSuggestions(a0, a1) { // fn#71744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:7645, offset: 0x01d2bf8a, size: 198 bytes, params: 3, frame: 19
|
|
var r3;
|
|
var value4;
|
|
var type;
|
|
var FRIEND;
|
|
var DM;
|
|
var CHANNEL;
|
|
var GROUP_DM;
|
|
var push;
|
|
var isGuildMemberBinding;
|
|
var item;
|
|
var id;
|
|
var value5;
|
|
const items3 = [];
|
|
const items2 = [];
|
|
const value2 = _createForOfIteratorHelperLoose_71724(a0);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r3 = value3;
|
|
reducibleLoop1: while (true) {
|
|
value4 = r3.value;
|
|
type = value4.type;
|
|
FRIEND = env0_12.FRIEND;
|
|
reducibleJoin9: while (true) {
|
|
reducibleJoin6: while (true) {
|
|
if (FRIEND === type) {
|
|
break reducibleJoin6;
|
|
}
|
|
DM = env0_12.DM;
|
|
if (DM === type) {
|
|
break reducibleJoin6;
|
|
}
|
|
CHANNEL = env0_12.CHANNEL;
|
|
if (CHANNEL !== type) {
|
|
GROUP_DM = env0_12.GROUP_DM;
|
|
if (GROUP_DM !== type) {
|
|
break reducibleJoin9;
|
|
}
|
|
}
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [value4]);
|
|
break reducibleJoin9;
|
|
}
|
|
isGuildMemberBinding = isGuildMember;
|
|
item = value4.item;
|
|
id = item.id;
|
|
if (isGuildMemberBinding(a1, id)) {
|
|
items3.push(value4);
|
|
break reducibleJoin9;
|
|
}
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [value4]);
|
|
break reducibleJoin9;
|
|
}
|
|
value5 = value2();
|
|
done = value5.done;
|
|
if (done) {
|
|
break reducibleLoop1;
|
|
}
|
|
r3 = value5;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
return [items3, items2];
|
|
}
|
|
|
|
function getMostRecentDMedUser(a0, a1) { // fn#71745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:7941, offset: 0x01d2c050, size: 273 bytes, params: 3, frame: 24
|
|
var r4;
|
|
var value5;
|
|
var channelStoreBinding;
|
|
var getChannel;
|
|
var value6;
|
|
var isDM;
|
|
var readStateStoreBinding;
|
|
var lastMessageId;
|
|
var id;
|
|
var getRecipientId;
|
|
var value7;
|
|
var has;
|
|
var userStoreBinding;
|
|
var getUser;
|
|
var value8;
|
|
var bot;
|
|
var isGuildMemberBinding;
|
|
var value9;
|
|
const value3 = _createForOfIteratorHelperLoose_71724(PrivateChannelSortStore.getPrivateChannelIds());
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
if (!done) {
|
|
r4 = value4;
|
|
reducibleLoop1: while (true) {
|
|
value5 = r4.value;
|
|
channelStoreBinding = ChannelStore;
|
|
getChannel = channelStoreBinding.getChannel;
|
|
value6 = Reflect.apply(getChannel, channelStoreBinding, [value5]);
|
|
if (value6 != null) {
|
|
isDM = value6.isDM;
|
|
reducibleJoin10: while (true) {
|
|
if (Reflect.apply(isDM, value6, [])) {
|
|
readStateStoreBinding = ReadStateStore;
|
|
lastMessageId = readStateStoreBinding.lastMessageId;
|
|
id = value6.id;
|
|
if (Reflect.apply(lastMessageId, readStateStoreBinding, [id]) == null) {
|
|
break reducibleJoin10;
|
|
}
|
|
getRecipientId = value6.getRecipientId;
|
|
value7 = Reflect.apply(getRecipientId, value6, []);
|
|
if (value7 == null) {
|
|
break reducibleJoin10;
|
|
}
|
|
has = a0.has;
|
|
if (Reflect.apply(has, a0, [value7])) {
|
|
break reducibleJoin10;
|
|
}
|
|
userStoreBinding = UserStore;
|
|
getUser = userStoreBinding.getUser;
|
|
value8 = Reflect.apply(getUser, userStoreBinding, [value7]);
|
|
if (value8 == null) {
|
|
break reducibleJoin10;
|
|
}
|
|
bot = value8.bot;
|
|
if (bot) {
|
|
break reducibleJoin10;
|
|
}
|
|
isGuildMemberBinding = isGuildMember;
|
|
id = value8.id;
|
|
if (!isGuildMemberBinding(a1, id)) {
|
|
return value8;
|
|
}
|
|
break reducibleJoin10;
|
|
}
|
|
break reducibleJoin10;
|
|
}
|
|
}
|
|
value9 = value3();
|
|
done = value9.done;
|
|
if (done) {
|
|
return null;
|
|
}
|
|
r4 = value9;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function getUsersAlreadyJoined({channel, inviteTargetType, applicationId}) { // fn#71746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:8312, offset: 0x01d2c161, size: 185 bytes, params: 2, frame: 15
|
|
var value3;
|
|
var applicationId2;
|
|
var value4;
|
|
var Set;
|
|
var set;
|
|
var value;
|
|
const EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
|
|
if (inviteTargetType !== EMBEDDED_APPLICATION) {
|
|
set = new global.Set();
|
|
} else {
|
|
if (channel == null) {
|
|
Set = global.Set;
|
|
value = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
return set instanceof Object ? set : value;
|
|
}
|
|
var _createForOfIteratorHelperLoose_71724Binding = _createForOfIteratorHelperLoose_71724;
|
|
value = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(channel.id);
|
|
value = _createForOfIteratorHelperLoose_71724Binding(value);
|
|
var value2 = value();
|
|
var done = value2.done;
|
|
if (done) {
|
|
Set = global.Set;
|
|
value = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
return set instanceof Object ? set : value;
|
|
}
|
|
var r2 = value2;
|
|
loopExit3: while (true) {
|
|
value3 = r2.value;
|
|
applicationId2 = value3.applicationId;
|
|
if (applicationId2 === applicationId) {
|
|
break loopExit3;
|
|
}
|
|
value4 = value();
|
|
done = value4.done;
|
|
if (done) {
|
|
Set = global.Set;
|
|
value = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
return set instanceof Object ? set : value;
|
|
}
|
|
r2 = value4;
|
|
continue;
|
|
}
|
|
Set = global.Set;
|
|
var userIds = value3.userIds;
|
|
value = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
set = new Set(userIds);
|
|
}
|
|
return set instanceof Object ? set : value;
|
|
}
|
|
|
|
function maxAgeString(a0, a1) { // fn#71747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:8628, offset: 0x01d2c21a, size: 506 bytes, params: 3, frame: 22
|
|
const intl = (IndexNativeModule).intl;
|
|
var formatToPlainString;
|
|
const t = (IndexNativeModule).t;
|
|
const int = global.parseInt(a1, 10);
|
|
const value2 = int === 0;
|
|
const binding = env0_13;
|
|
const value4 = binding[a0].value;
|
|
const type = binding[a0].type;
|
|
if (type === 'minutes') {
|
|
return value2 ? intl.string(t['/WbTXD']) : intl.formatToPlainString(t.eDRWJK, {numUses: int});
|
|
}
|
|
if (type === 'hours') {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
return value2 ? Reflect.apply(formatToPlainString, intl, [t.ZVdJMy,
|
|
{numHours: value4}]) : Reflect.apply(formatToPlainString, intl, [t.NgZgAB, {numHours: value4,
|
|
numUses: int}]);
|
|
}
|
|
if (type === 'days') {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
return value2 ? Reflect.apply(formatToPlainString, intl, [t.T96qss,
|
|
{numDays: value4}]) : Reflect.apply(formatToPlainString, intl, [t.TfuB9B, {numDays: value4, numUses: int}]);
|
|
}
|
|
if (type === 'never') {
|
|
return value2 ? intl.string(t.QrHBnC) : intl.formatToPlainString(t.yJnTxI, {numUses: int});
|
|
}
|
|
return '';
|
|
}
|
|
|
|
function urgentShareMessageString(a0, a1) { // fn#71748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9338:9337, offset: 0x01d2c414, size: 429 bytes, params: 3, frame: 18
|
|
const intl = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).t;
|
|
if (a0 == null) {
|
|
return intl.formatToPlainString(t.RHbY6K, {link: a1});
|
|
}
|
|
const binding = env0_13;
|
|
const value2 = binding[a0].value;
|
|
const type = binding[a0].type;
|
|
if (type === 'minutes') {
|
|
return intl.formatToPlainString(t.N3VHkw, {numMinutes: value2, link: a1});
|
|
}
|
|
if (type === 'hours') {
|
|
return intl.formatToPlainString(t['3d9BlG'], {numHours: value2, link: a1});
|
|
}
|
|
if (type === 'days') {
|
|
return intl.formatToPlainString(t.gLIlkb, {numDays: value2, link: a1});
|
|
}
|
|
const formatToPlainString = intl.formatToPlainString;
|
|
const RHbY6K = t.RHbY6K;
|
|
return Reflect.apply(formatToPlainString, intl, [RHbY6K, {link: a1}]);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun71723, 9153, [1378, 1379, 1945, 4605, 3793, 1878, 5219, 661, 4118, 6526, 9154, 1244,
|
|
2]) /* metro module 9153, dependencies: [1378, 1379, 1945, 4605, 3793, 1878, 5219, 661, 4118, 6526, 9154, 1244, 2] */;
|