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

795 lines
49 KiB
TypeScript

/* Metro module 7231; source: modules/forwarding/ForwardDestinationUtils.tsx; dependencies: [31, 6583, 1383, 1379, 3784, 3793, 1878, 661, 7232, 1360, 566, 677, 4643, 1909, 5072, 1244, 4641, 3995, 4805, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import StickersStore from '../stickers/StickersStore.tsx'; /* Metro dependency 6583 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GlobalUtilsModule from '../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as ChannelRecordModule from '../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as StickersUtilsModule from '../stickers/StickersUtils.tsx'; /* Metro dependency 4643 */
import * as FormatResultsModule from '../share/formatResults.tsx'; /* Metro dependency 7232 */
function _fun57908(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:6, offset: 0x016b9637, size: 332 bytes, params: 8, frame: 20
let env0_0 = require;
const isRatelimitedInChannel2 = isRatelimitedInChannel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ChannelRecordModule;
const env0_5 = value.ChannelRecordBase;
const env0_6 = value.isGuildChannelType;
const env0_7 = value.createChannelRecord;
value = require(661) /* metro dependency 661: Constants */;
const env0_12 = value.MessageFlags;
const env0_13 = value.Permissions;
(FileImportTrackerModule).fileFinishedImporting('modules/forwarding/ForwardDestinationUtils.tsx');
exports.useSelectedDestinationChannel = useSelectedDestinationChannel;
exports.getDestinationIsUnavailable = getDestinationIsUnavailable;
exports.isRatelimitedInChannel = isRatelimitedInChannel2;
exports.useSelectedDestinationNames = function(a0) {
var env0_0 = a0;
return require(dependencyMap[10]).useStateFromStoresArray([UserStore, ChannelStore, RelationshipStore],
_fun57921,
[a0]);
};
exports.useDestinationNamesWithSlowmode = useDestinationNamesWithSlowmode;
function messageHasCheckpoint(a0) { // fn#57909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:278, offset: 0x016b9783, size: 81 bytes, params: 2, frame: 13
return a0.components.length > 0 && a0.components[0].type === (require(1909) /* metro dependency 1909: Server */).ComponentType.CHECKPOINT_CARD;
}
function isRatelimitedInChannel(a0, a1) { // fn#57910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:403, offset: 0x016b97d4, size: 91 bytes, params: 3, frame: 15
return a0.rateLimitPerUser != null && a0.rateLimitPerUser > 0 && !(a1.can(Permissions.MANAGE_CHANNELS,
a0) || a1.can(Permissions.MANAGE_MESSAGES, a0));
}
function useSelectedDestinationChannel(a0) { // fn#57911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:666, offset: 0x016b982f, size: 162 bytes, params: 2, frame: 18
const map = a0.map;
const getChannelIdFromDestinationId = (FormatResultsModule).getChannelIdFromDestinationId;
const value2 = Reflect.apply(map, a0, [getChannelIdFromDestinationId]);
return ReactModule.useMemo(_fun57913, [(FluxModule).useStateFromStores([ChannelStore],
_fun57912, [value2.find((GlobalUtilsModule).isNotNullish)])]);
function _fun57912() { // fn#57912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:821, offset: 0x016b98d1, size: 26 bytes, params: 1, frame: 11
return ChannelStore.getChannel(env0_0);
}
function _fun57913() { // fn#57913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:865, offset: 0x016b98eb, size: 83 bytes, params: 1, frame: 14
var r0;
var createChannelRecordBinding;
var object;
var value;
if (env0_1 != null) {
r0 = env0_1;
} else {
value = environment.__proto__;
createChannelRecordBinding = createChannelRecord;
object = {id: '1'};
object.type = (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.DM;
value = createChannelRecordBinding(object);
r0 = value;
}
return r0;
}
}
function getDestinationIsUnavailable(a0, a1, a2, a3) { // fn#57914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:958, offset: 0x016b993e, size: 1040 bytes, params: 5, frame: 26
var r4;
var value3;
var messageHasCheckpointBinding;
var value4;
var messageSnapshots;
var length;
var value5;
var message;
var value6;
var moduleValue;
var isChannelOrGuildNSFW;
var moduleValue2;
var items2;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var KgPx1D;
var isGuildChannelTypeBinding;
var type;
var attachments;
var some;
var permissionStoreBinding;
var can;
var ATTACH_FILES;
var embeds;
var moduleValue3;
var canEmbedLinks;
var moduleValue4;
var shouldStripEmbeds;
var moduleValue5;
var moduleValue6;
var getMessageStickers;
var value7;
var value8;
var flatMap;
var USE_EXTERNAL_STICKERS;
var hasFlag;
var IS_VOICE_MESSAGE;
var SEND_VOICE_MESSAGES;
const env0_0 = a2;
const value2 = a2 instanceof ChannelRecordBase;
if (a3 != null) {
value3 = a3(a2);
reducibleJoin2: while (true) {
if (value3 != null) {
return value3;
}
break reducibleJoin2;
}
}
if (a0 != null) {
value4 = messageHasCheckpoint(a0);
messageSnapshots = a0.messageSnapshots;
length = messageSnapshots.length;
value5 = length > 0;
reducibleJoin5: while (true) {
if (value5) {
messageHasCheckpointBinding = messageHasCheckpoint;
messageSnapshots = a0.messageSnapshots;
message = messageSnapshots[0].message;
value6 = messageHasCheckpointBinding(message);
r4 = value6;
break reducibleJoin5;
}
r4 = value5;
break reducibleJoin5;
}
reducibleJoin34: while (true) {
reducibleJoin11: while (true) {
if (a1 != null) {
moduleValue = require(5072) /* metro dependency 5072: AgeGateUtils */;
isChannelOrGuildNSFW = moduleValue.isChannelOrGuildNSFW;
if (Reflect.apply(isChannelOrGuildNSFW, moduleValue, [a1])) {
if (value2) {
moduleValue2 = require(5072) /* metro dependency 5072: AgeGateUtils */;
isChannelOrGuildNSFW = moduleValue2.isChannelOrGuildNSFW;
reducibleJoin10: while (true) {
if (Reflect.apply(isChannelOrGuildNSFW, moduleValue2, [a2])) {
break reducibleJoin11;
}
break reducibleJoin10;
}
}
string = intl.string;
KgPx1D = t.KgPx1D;
return {label: Reflect.apply(string, intl, [KgPx1D])};
}
break reducibleJoin11;
}
if (value4) {
moduleValue = require(5072) /* metro dependency 5072: AgeGateUtils */;
isChannelOrGuildNSFW = moduleValue.isChannelOrGuildNSFW;
if (Reflect.apply(isChannelOrGuildNSFW, moduleValue, [a1])) {
if (value2) {
moduleValue2 = require(5072) /* metro dependency 5072: AgeGateUtils */;
isChannelOrGuildNSFW = moduleValue2.isChannelOrGuildNSFW;
reducibleJoin10: while (true) {
if (Reflect.apply(isChannelOrGuildNSFW, moduleValue2, [a2])) {
break reducibleJoin11;
}
break reducibleJoin10;
}
}
string = intl.string;
KgPx1D = t.KgPx1D;
return {label: Reflect.apply(string, intl, [KgPx1D])};
}
break reducibleJoin11;
}
break reducibleJoin34;
}
if (value2) {
isGuildChannelTypeBinding = isGuildChannelType;
type = a2.type;
if (isGuildChannelTypeBinding(type)) {
attachments = a0.attachments;
length = attachments.length;
if (!(length > 0)) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin15: while (true) {
if (Reflect.apply(some, messageSnapshots, [function(a0) {
return a0.message.attachments.length > 0;
}])) {
break reducibleJoin15;
}
embeds = a0.embeds;
length = embeds.length;
if (!(length > 0)) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin19: while (true) {
if (Reflect.apply(some, messageSnapshots, [_fun57916])) {
break reducibleJoin19;
}
if (!value4) {
reducibleJoin24: while (true) {
if (r4) {
break reducibleJoin24;
}
moduleValue6 = require(4643) /* metro dependency 4643: StickersUtils */;
getMessageStickers = moduleValue6.getMessageStickers;
value7 = Reflect.apply(getMessageStickers, moduleValue6, [a0]);
items2 = [];
value8 = arraySpread(items2, value7, 0, undefined);
messageSnapshots = a0.messageSnapshots;
flatMap = messageSnapshots.flatMap;
arraySpread(items2, Reflect.apply(flatMap, messageSnapshots, [_fun57917]),
value8,
undefined);
length = items2.length;
if (length > 0) {
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
reducibleJoin30: while (true) {
if (Reflect.apply(can, permissionStoreBinding,
[USE_EXTERNAL_STICKERS,
a2])) {
break reducibleJoin30;
}
some = items2.some;
if (Reflect.apply(some, items2, [_fun57918])) {
return {label: intl.string(t['0Yyrua'])};
}
break reducibleJoin30;
}
}
hasFlag = a0.hasFlag;
IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
if (!Reflect.apply(hasFlag, a0, [IS_VOICE_MESSAGE])) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin32: while (true) {
if (Reflect.apply(some, messageSnapshots, [_fun57919])) {
break reducibleJoin32;
}
break reducibleJoin34;
}
}
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
if (!Reflect.apply(can, permissionStoreBinding, [SEND_VOICE_MESSAGES,
a2])) {
return {label: intl.string(t.quj4DY)};
}
break reducibleJoin34;
}
}
moduleValue5 = require(4641) /* metro dependency 4641: EmbedUtils */;
canEmbedLinks = moduleValue5.canEmbedLinks;
if (!Reflect.apply(canEmbedLinks, moduleValue5, [a2, PermissionStore])) {
return {label: intl.string(t.Wr4RIX)};
}
moduleValue6 = require(4643) /* metro dependency 4643: StickersUtils */;
getMessageStickers = moduleValue6.getMessageStickers;
value7 = Reflect.apply(getMessageStickers, moduleValue6, [a0]);
items2 = [];
value8 = arraySpread(items2, value7, 0, undefined);
messageSnapshots = a0.messageSnapshots;
flatMap = messageSnapshots.flatMap;
arraySpread(items2, Reflect.apply(flatMap, messageSnapshots, [_fun57917]), value8,
undefined);
length = items2.length;
if (length > 0) {
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
reducibleJoin30: while (true) {
if (Reflect.apply(can, permissionStoreBinding, [USE_EXTERNAL_STICKERS,
a2])) {
break reducibleJoin30;
}
some = items2.some;
if (Reflect.apply(some, items2, [_fun57918])) {
return {label: intl.string(t['0Yyrua'])};
}
break reducibleJoin30;
}
}
hasFlag = a0.hasFlag;
IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
if (!Reflect.apply(hasFlag, a0, [IS_VOICE_MESSAGE])) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin32: while (true) {
if (Reflect.apply(some, messageSnapshots, [_fun57919])) {
break reducibleJoin32;
}
break reducibleJoin34;
}
}
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
if (!Reflect.apply(can, permissionStoreBinding, [SEND_VOICE_MESSAGES, a2])) {
return {label: intl.string(t.quj4DY)};
}
break reducibleJoin34;
}
}
moduleValue3 = require(4641) /* metro dependency 4641: EmbedUtils */;
canEmbedLinks = moduleValue3.canEmbedLinks;
if (!Reflect.apply(canEmbedLinks, moduleValue3, [a2, PermissionStore])) {
moduleValue4 = require(4641) /* metro dependency 4641: EmbedUtils */;
shouldStripEmbeds = moduleValue4.shouldStripEmbeds;
reducibleJoin22: while (true) {
if (!Reflect.apply(shouldStripEmbeds, moduleValue4, [a0])) {
return {label: intl.string(t.Wr4RIX)};
}
break reducibleJoin22;
}
}
if (!value4) {
reducibleJoin24: while (true) {
if (r4) {
break reducibleJoin24;
}
moduleValue6 = require(4643) /* metro dependency 4643: StickersUtils */;
getMessageStickers = moduleValue6.getMessageStickers;
value7 = Reflect.apply(getMessageStickers, moduleValue6, [a0]);
items2 = [];
value8 = arraySpread(items2, value7, 0, undefined);
messageSnapshots = a0.messageSnapshots;
flatMap = messageSnapshots.flatMap;
arraySpread(items2, Reflect.apply(flatMap, messageSnapshots, [_fun57917]), value8,
undefined);
length = items2.length;
if (length > 0) {
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
reducibleJoin30: while (true) {
if (Reflect.apply(can, permissionStoreBinding, [USE_EXTERNAL_STICKERS,
a2])) {
break reducibleJoin30;
}
some = items2.some;
if (Reflect.apply(some, items2, [_fun57918])) {
return {label: intl.string(t['0Yyrua'])};
}
break reducibleJoin30;
}
}
hasFlag = a0.hasFlag;
IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
if (!Reflect.apply(hasFlag, a0, [IS_VOICE_MESSAGE])) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin32: while (true) {
if (Reflect.apply(some, messageSnapshots, [_fun57919])) {
break reducibleJoin32;
}
break reducibleJoin34;
}
}
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
if (!Reflect.apply(can, permissionStoreBinding, [SEND_VOICE_MESSAGES, a2])) {
return {label: intl.string(t.quj4DY)};
}
break reducibleJoin34;
}
}
moduleValue5 = require(4641) /* metro dependency 4641: EmbedUtils */;
canEmbedLinks = moduleValue5.canEmbedLinks;
if (!Reflect.apply(canEmbedLinks, moduleValue5, [a2, PermissionStore])) {
return {label: intl.string(t.Wr4RIX)};
}
moduleValue6 = require(4643) /* metro dependency 4643: StickersUtils */;
getMessageStickers = moduleValue6.getMessageStickers;
value7 = Reflect.apply(getMessageStickers, moduleValue6, [a0]);
items2 = [];
value8 = arraySpread(items2, value7, 0, undefined);
messageSnapshots = a0.messageSnapshots;
flatMap = messageSnapshots.flatMap;
arraySpread(items2, Reflect.apply(flatMap, messageSnapshots, [_fun57917]), value8,
undefined);
length = items2.length;
if (length > 0) {
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
reducibleJoin30: while (true) {
if (Reflect.apply(can, permissionStoreBinding, [USE_EXTERNAL_STICKERS, a2])) {
break reducibleJoin30;
}
some = items2.some;
if (Reflect.apply(some, items2, [_fun57918])) {
return {label: intl.string(t['0Yyrua'])};
}
break reducibleJoin30;
}
}
hasFlag = a0.hasFlag;
IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
if (!Reflect.apply(hasFlag, a0, [IS_VOICE_MESSAGE])) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin32: while (true) {
if (Reflect.apply(some, messageSnapshots, [_fun57919])) {
break reducibleJoin32;
}
break reducibleJoin34;
}
}
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
if (!Reflect.apply(can, permissionStoreBinding, [SEND_VOICE_MESSAGES, a2])) {
return {label: intl.string(t.quj4DY)};
}
break reducibleJoin34;
}
}
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
ATTACH_FILES = Permissions.ATTACH_FILES;
if (!Reflect.apply(can, permissionStoreBinding, [ATTACH_FILES, a2])) {
return {label: intl.string(t.P7yvbm)};
}
embeds = a0.embeds;
length = embeds.length;
if (!(length > 0)) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin19: while (true) {
if (Reflect.apply(some, messageSnapshots, [_fun57916])) {
break reducibleJoin19;
}
if (!value4) {
reducibleJoin24: while (true) {
if (r4) {
break reducibleJoin24;
}
moduleValue6 = require(4643) /* metro dependency 4643: StickersUtils */;
getMessageStickers = moduleValue6.getMessageStickers;
value7 = Reflect.apply(getMessageStickers, moduleValue6, [a0]);
items2 = [];
value8 = arraySpread(items2, value7, 0, undefined);
messageSnapshots = a0.messageSnapshots;
flatMap = messageSnapshots.flatMap;
arraySpread(items2, Reflect.apply(flatMap, messageSnapshots, [_fun57917]), value8,
undefined);
length = items2.length;
if (length > 0) {
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
reducibleJoin30: while (true) {
if (Reflect.apply(can, permissionStoreBinding, [USE_EXTERNAL_STICKERS,
a2])) {
break reducibleJoin30;
}
some = items2.some;
if (Reflect.apply(some, items2, [_fun57918])) {
return {label: intl.string(t['0Yyrua'])};
}
break reducibleJoin30;
}
}
hasFlag = a0.hasFlag;
IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
if (!Reflect.apply(hasFlag, a0, [IS_VOICE_MESSAGE])) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin32: while (true) {
if (Reflect.apply(some, messageSnapshots, [_fun57919])) {
break reducibleJoin32;
}
break reducibleJoin34;
}
}
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
if (!Reflect.apply(can, permissionStoreBinding, [SEND_VOICE_MESSAGES, a2])) {
return {label: intl.string(t.quj4DY)};
}
break reducibleJoin34;
}
}
moduleValue5 = require(4641) /* metro dependency 4641: EmbedUtils */;
canEmbedLinks = moduleValue5.canEmbedLinks;
if (!Reflect.apply(canEmbedLinks, moduleValue5, [a2, PermissionStore])) {
return {label: intl.string(t.Wr4RIX)};
}
moduleValue6 = require(4643) /* metro dependency 4643: StickersUtils */;
getMessageStickers = moduleValue6.getMessageStickers;
value7 = Reflect.apply(getMessageStickers, moduleValue6, [a0]);
items2 = [];
value8 = arraySpread(items2, value7, 0, undefined);
messageSnapshots = a0.messageSnapshots;
flatMap = messageSnapshots.flatMap;
arraySpread(items2, Reflect.apply(flatMap, messageSnapshots, [_fun57917]), value8,
undefined);
length = items2.length;
if (length > 0) {
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
reducibleJoin30: while (true) {
if (Reflect.apply(can, permissionStoreBinding, [USE_EXTERNAL_STICKERS, a2])) {
break reducibleJoin30;
}
some = items2.some;
if (Reflect.apply(some, items2, [_fun57918])) {
return {label: intl.string(t['0Yyrua'])};
}
break reducibleJoin30;
}
}
hasFlag = a0.hasFlag;
IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
if (!Reflect.apply(hasFlag, a0, [IS_VOICE_MESSAGE])) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin32: while (true) {
if (Reflect.apply(some, messageSnapshots, [_fun57919])) {
break reducibleJoin32;
}
break reducibleJoin34;
}
}
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
if (!Reflect.apply(can, permissionStoreBinding, [SEND_VOICE_MESSAGES, a2])) {
return {label: intl.string(t.quj4DY)};
}
break reducibleJoin34;
}
}
moduleValue3 = require(4641) /* metro dependency 4641: EmbedUtils */;
canEmbedLinks = moduleValue3.canEmbedLinks;
if (!Reflect.apply(canEmbedLinks, moduleValue3, [a2, PermissionStore])) {
moduleValue4 = require(4641) /* metro dependency 4641: EmbedUtils */;
shouldStripEmbeds = moduleValue4.shouldStripEmbeds;
reducibleJoin22: while (true) {
if (!Reflect.apply(shouldStripEmbeds, moduleValue4, [a0])) {
return {label: intl.string(t.Wr4RIX)};
}
break reducibleJoin22;
}
}
if (!value4) {
reducibleJoin24: while (true) {
if (r4) {
break reducibleJoin24;
}
moduleValue6 = require(4643) /* metro dependency 4643: StickersUtils */;
getMessageStickers = moduleValue6.getMessageStickers;
value7 = Reflect.apply(getMessageStickers, moduleValue6, [a0]);
items2 = [];
value8 = arraySpread(items2, value7, 0, undefined);
messageSnapshots = a0.messageSnapshots;
flatMap = messageSnapshots.flatMap;
arraySpread(items2, Reflect.apply(flatMap, messageSnapshots, [_fun57917]), value8,
undefined);
length = items2.length;
if (length > 0) {
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
reducibleJoin30: while (true) {
if (Reflect.apply(can, permissionStoreBinding, [USE_EXTERNAL_STICKERS, a2])) {
break reducibleJoin30;
}
some = items2.some;
if (Reflect.apply(some, items2, [_fun57918])) {
return {label: intl.string(t['0Yyrua'])};
}
break reducibleJoin30;
}
}
hasFlag = a0.hasFlag;
IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
if (!Reflect.apply(hasFlag, a0, [IS_VOICE_MESSAGE])) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin32: while (true) {
if (Reflect.apply(some, messageSnapshots, [_fun57919])) {
break reducibleJoin32;
}
break reducibleJoin34;
}
}
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
if (!Reflect.apply(can, permissionStoreBinding, [SEND_VOICE_MESSAGES, a2])) {
return {label: intl.string(t.quj4DY)};
}
break reducibleJoin34;
}
}
moduleValue5 = require(4641) /* metro dependency 4641: EmbedUtils */;
canEmbedLinks = moduleValue5.canEmbedLinks;
if (!Reflect.apply(canEmbedLinks, moduleValue5, [a2, PermissionStore])) {
return {label: intl.string(t.Wr4RIX)};
}
moduleValue6 = require(4643) /* metro dependency 4643: StickersUtils */;
getMessageStickers = moduleValue6.getMessageStickers;
value7 = Reflect.apply(getMessageStickers, moduleValue6, [a0]);
items2 = [];
value8 = arraySpread(items2, value7, 0, undefined);
messageSnapshots = a0.messageSnapshots;
flatMap = messageSnapshots.flatMap;
arraySpread(items2, Reflect.apply(flatMap, messageSnapshots, [_fun57917]), value8, undefined);
length = items2.length;
if (length > 0) {
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
USE_EXTERNAL_STICKERS = Permissions.USE_EXTERNAL_STICKERS;
reducibleJoin30: while (true) {
if (Reflect.apply(can, permissionStoreBinding, [USE_EXTERNAL_STICKERS, a2])) {
break reducibleJoin30;
}
some = items2.some;
if (Reflect.apply(some, items2, [_fun57918])) {
return {label: intl.string(t['0Yyrua'])};
}
break reducibleJoin30;
}
}
hasFlag = a0.hasFlag;
IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
if (!Reflect.apply(hasFlag, a0, [IS_VOICE_MESSAGE])) {
messageSnapshots = a0.messageSnapshots;
some = messageSnapshots.some;
reducibleJoin32: while (true) {
if (Reflect.apply(some, messageSnapshots, [_fun57919])) {
break reducibleJoin32;
}
break reducibleJoin34;
}
}
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
SEND_VOICE_MESSAGES = Permissions.SEND_VOICE_MESSAGES;
if (!Reflect.apply(can, permissionStoreBinding, [SEND_VOICE_MESSAGES, a2])) {
return {label: intl.string(t.quj4DY)};
}
break reducibleJoin34;
}
break reducibleJoin34;
}
break reducibleJoin34;
}
}
function _fun57917({message}) { // fn#57917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:1888, offset: 0x016b9d84, size: 46 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (StickersUtilsModule).getMessageStickers(message);
}
function _fun57918({id}) { // fn#57918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:1997, offset: 0x016b9db2, size: 108 bytes, params: 2, frame: 14
var r0;
let value = environment.__proto__;
const stickerById = StickersStore.getStickerById(id);
const value3 = stickerById != null;
if (value3) {
value = require(4643) /* metro dependency 4643: StickersUtils */;
value = !!value.isGuildSticker(stickerById);
r0 = value;
} else {
r0 = value3;
}
r0 = r0 && (stickerById.guild_id !== importDefault.guild_id || undefined);
return r0;
}
function _fun57919({message}) { // fn#57919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:2266, offset: 0x016b9e1e, size: 34 bytes, params: 2, frame: 11
const hasFlag = message.hasFlag;
const IS_VOICE_MESSAGE = MessageFlags.IS_VOICE_MESSAGE;
return Reflect.apply(hasFlag, message, [IS_VOICE_MESSAGE]);
}
}
function useSelectedDestinationNames(a0) { // fn#57920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:2479, offset: 0x016b9e40, size: 90 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStoresArray([UserStore, ChannelStore,
RelationshipStore], _fun57921, [a0]);
function _fun57921() { // fn#57921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:2568, offset: 0x016b9e9a, size: 67 bytes, params: 1, frame: 13
const value = env0_0.map(_fun57922);
return value.filter((GlobalUtilsModule).isNotNullish);
function _fun57922({type, id}) { // fn#57922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:2579, offset: 0x016b9edd, size: 188 bytes, params: 2, frame: 19
var r0;
var r1;
var value;
var moduleValue;
var relationshipStoreBinding;
var user;
var value5;
var value6;
if (type === 'user') {
value = environment.__proto__.__proto__;
user = UserStore.getUser(id);
value5 = null;
if (value5 != user) {
relationshipStoreBinding = RelationshipStore;
value6 = relationshipStoreBinding.getNickname(user.id);
if (value5 != value6) {
r1 = value6;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(user);
r1 = value;
}
r0 = r1;
} else {
r0 = value5;
}
} else {
value = environment.__proto__.__proto__;
var channel = ChannelStore.getChannel(id);
if (channel != null) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
r0 = moduleValue.computeChannelName(channel, UserStore, RelationshipStore, true);
} else {
r0 = null;
}
}
return r0;
}
}
}
function useDestinationNamesWithSlowmode(a0) { // fn#57923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:2858, offset: 0x016b9f99, size: 141 bytes, params: 2, frame: 21
const env0_0 = a0;
return (FluxModule).useStateFromStoresArray([UserStore, RelationshipStore],
_fun57927, [(FluxModule).useStateFromStoresArray([ChannelStore,
PermissionStore], _fun57924, [a0])]);
function _fun57924() { // fn#57924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:2948, offset: 0x016ba026, size: 82 bytes, params: 1, frame: 14
var value;
value = Reflect.apply(env0_0.map(_fun57925).filter, value,
[(require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish]);
return value.filter(function(a0) {
return isRatelimitedInChannel(a0, PermissionStore);
});
function _fun57925({type, id}) { // fn#57925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:2959, offset: 0x016ba078, size: 42 bytes, params: 2, frame: 12
var r0;
let value = null;
if (type !== 'channel') {
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = ChannelStore.getChannel(id);
r0 = value;
}
return r0;
}
}
function _fun57927() { // fn#57927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:3136, offset: 0x016ba0ba, size: 26 bytes, params: 1, frame: 11
return env0_1.map(function(a0) {
return require(dependencyMap[18]).computeChannelName(a0, UserStore, RelationshipStore, true);
});
}
}
}
function _fun57916({message}) { // fn#57916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7409:1574, offset: 0x016b9d69, size: 27 bytes, params: 2, frame: 2
return message.embeds.length > 0;
}
global.__d(_fun57908, 7231, [31, 6583, 1383, 1379, 3784, 3793, 1878, 661, 7232, 1360, 566, 677, 4643, 1909, 5072,
1244, 4641, 3995, 4805,
2]) /* metro module 7231, dependencies: [31, 6583, 1383, 1379, 3784, 3793, 1878, 661, 7232, 1360, 566, 677, 4643, 1909, 5072, 1244, 4641, 3995, 4805, 2] */;