Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,25 @@
|
||||
/* Metro module 8270; source: modules/messages/ApplicationCommands.tsx; dependencies: [57, 2] */
|
||||
function _fun66117(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8455:6, offset: 0x01bec9df, size: 124 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_1 = RegExp('<\\/([^\\s]+):(\\d+)>(?:\\s?(.*))?', '');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/ApplicationCommands.tsx');
|
||||
exports.getApplicationCommand = getApplicationCommand;
|
||||
}
|
||||
|
||||
function getApplicationCommand(a0) { // fn#66118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8455:239, offset: 0x01beca5b, size: 190 bytes, params: 2, frame: 19
|
||||
const value2 = env0_1.exec(a0);
|
||||
const value3 = null;
|
||||
if (value3 == value2) {
|
||||
return value3;
|
||||
}
|
||||
const value = env0_0(value2, 4);
|
||||
value[0];
|
||||
const property = value[1];
|
||||
const property2 = value[2];
|
||||
const property3 = value[3];
|
||||
return value3 == property || value3 == property2 ? value3 : {content: '/' + property + (value3 != property3 ? ' ' + property3 : ''),
|
||||
name: property, id: property2, hasOptions: value3 != property3 && property3 !== ''};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/* Metro module 7144; source: modules/messages/BackgroundTaskManager.native.tsx; dependencies: [5, 27, 477, 7145, 7146, 2] */
|
||||
function _fun57141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:6, offset: 0x013ddbfb, size: 249 bytes, params: 8, frame: 20
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = backgroundify;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
const backgroundTaskIdentifierInvalid = value ? -1 : NativeModules.DCDBackgroundTaskManager.backgroundTaskIdentifierInvalid;
|
||||
const closure2 = startBackgroundTask;
|
||||
const closure3 = endBackgroundTask;
|
||||
object2 = {backgroundTaskIdentifierInvalid: backgroundTaskIdentifierInvalid, backgroundify: closure,
|
||||
startBackgroundTask: closure2, endBackgroundTask: closure3};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/BackgroundTaskManager.native.tsx');
|
||||
exports.default = object2;
|
||||
exports.backgroundTaskIdentifierInvalid = backgroundTaskIdentifierInvalid;
|
||||
exports.startBackgroundTask = closure2;
|
||||
exports.endBackgroundTask = closure3;
|
||||
exports.backgroundify = closure;
|
||||
}
|
||||
|
||||
function backgroundify(a0, a1) { // fn#57142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:688, offset: 0x013ddcf4, size: 37 bytes, params: 3, frame: 11
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return env0_3(_fun57144);
|
||||
}
|
||||
|
||||
function startBackgroundTask(a0) { // fn#57146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:234, offset: 0x013ddda0, size: 224 bytes, params: 2, frame: 16
|
||||
var title;
|
||||
var content;
|
||||
var defaultImport;
|
||||
var addServiceHandler;
|
||||
var object2;
|
||||
var Promise;
|
||||
var promise;
|
||||
var value;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
if (a0 == null) {
|
||||
Promise = global.Promise;
|
||||
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
||||
promise = new Promise(function(a0) {
|
||||
return a0(backgroundTaskIdentifierInvalid);
|
||||
});
|
||||
return promise instanceof Object ? promise : value;
|
||||
}
|
||||
title = a0.title;
|
||||
content = a0.content;
|
||||
defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */;
|
||||
addServiceHandler = defaultImport.addServiceHandler;
|
||||
object2 = {title: title, content: content};
|
||||
object2.priority = (require(7146) /* metro dependency 7146: ForegroundServiceManagerTypes */).ServiceNotificationPriority.MEDIUM;
|
||||
object2.type = (require(7146) /* metro dependency 7146: ForegroundServiceManagerTypes */).ServiceNotificationType.FILE_UPLOAD;
|
||||
object2.usesGateway = false;
|
||||
return Reflect.apply(addServiceHandler, defaultImport, [object2]);
|
||||
}
|
||||
const DCDBackgroundTaskManager = NativeModules.DCDBackgroundTaskManager;
|
||||
return DCDBackgroundTaskManager.startBackgroundTask();
|
||||
}
|
||||
|
||||
function endBackgroundTask(a0) { // fn#57148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:574, offset: 0x013dde93, size: 107 bytes, params: 2, frame: 13
|
||||
var moduleValue;
|
||||
if (a0 !== backgroundTaskIdentifierInvalid) {
|
||||
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue.isAndroid()) {
|
||||
(importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */).removeServiceHandler(a0);
|
||||
} else {
|
||||
NativeModules.DCDBackgroundTaskManager.endBackgroundTask(a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun57144() { // fn#57144, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:726, offset: 0x013ddd22, size: 103 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var binding;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var error;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
var env0_0;
|
||||
try {
|
||||
binding = env2_6;
|
||||
} catch (error) {
|
||||
value = environment.__proto__;
|
||||
return require();
|
||||
}
|
||||
value = environment.__proto__;
|
||||
try {
|
||||
} catch (error) {
|
||||
value = environment.__proto__;
|
||||
return require();
|
||||
}
|
||||
try {
|
||||
value3 = binding(importDefault);
|
||||
} catch (error) {
|
||||
value = environment.__proto__;
|
||||
return require();
|
||||
}
|
||||
yield value3;
|
||||
try {
|
||||
value4 = undefined;
|
||||
value5 = false;
|
||||
} catch (error) {
|
||||
value = environment.__proto__;
|
||||
return require();
|
||||
}
|
||||
if (value5) {
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
env0_0 = value4;
|
||||
} catch (error) {
|
||||
value = environment.__proto__;
|
||||
return require();
|
||||
}
|
||||
return require().finally(_fun57145);
|
||||
}
|
||||
|
||||
function _fun57145() { // fn#57145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7322:821, offset: 0x013ddd89, size: 23 bytes, params: 1, frame: 11
|
||||
env3_7(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 7210; source: modules/messages/BurstReactionEffectUtils.tsx; dependencies: [4000, 22, 2] */
|
||||
function _fun57692(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7388:6, offset: 0x016b33b6, size: 128 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(22) /* metro dependency 22 */;
|
||||
value = value.memoize(function(a0) {
|
||||
var r1;
|
||||
var r3;
|
||||
var r2;
|
||||
var value2;
|
||||
var value = 0;
|
||||
if (value < a0.length) {
|
||||
r1 = value;
|
||||
for (r3 = value; true; r3 = value) {
|
||||
value = a0.charCodeAt(r1);
|
||||
value = (r3 << 5) - r3 + value;
|
||||
value2 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
||||
if (!(value2 < a0.length)) {
|
||||
r2 = value;
|
||||
break;
|
||||
}
|
||||
r1 = value2;
|
||||
}
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
var Math = global.Math;
|
||||
return Math.abs(r2);
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/BurstReactionEffectUtils.tsx');
|
||||
exports.replaceAnimationColors = replaceAnimationColors;
|
||||
exports.getBurstAnimationHash = value;
|
||||
}
|
||||
|
||||
function replaceAnimationColors(a0, {r, g, b}) { // fn#57694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7388:304, offset: 0x016b3489, size: 265 bytes, params: 3, frame: 27
|
||||
let value = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
value = value.getComplimentaryPaletteForColor([r, g, b], 2);
|
||||
let replace = a0.replace;
|
||||
const value6 = Reflect.apply(replace, a0, [RegExp('(\\[1,0,0,)', 'g'),
|
||||
'[' + value[0][0] / 255 + ',' + value[0][1] / 255 + ',' + value[0][2] / 255 + ',']);
|
||||
replace = value6.replace;
|
||||
const value7 = value[1][0] / 255;
|
||||
const value8 = value[1][1] / 255;
|
||||
value = value[1][2] / 255;
|
||||
value = '[' + value7 + ',' + value8 + ',' + value + ',';
|
||||
return Reflect.apply(replace, value6, [RegExp('\\[0,0,1,', 'g'), value]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* Metro module 11318; source: modules/messages/ChatOverlayConstants.tsx; dependencies: [2] */
|
||||
function _fun86341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11504:6, offset: 0x01f91e2d, size: 112 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/ChatOverlayConstants.tsx');
|
||||
exports.ChatOverlays = {NEW_MESSAGES: 'new_messages', OPT_IN_CHANNEL: 'opt_in_channel', SUMMARIES: 'summaries'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Metro module 10609; source: modules/messages/CtaButtonUtils.tsx; dependencies: [10610, 4813, 2] */
|
||||
function _fun81754(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10795:6, offset: 0x01edd121, size: 147 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/CtaButtonUtils.tsx');
|
||||
exports.CtaButtonType = {MARK_AS_FALSE_POSITIVE: 'mark_as_false_positive',
|
||||
AGE_VERIFICATION_RETRY: 'age_verification_retry'};
|
||||
exports.getCtaButtonType = getCtaButtonType;
|
||||
exports.useCtaButtonType = useCtaButtonType;
|
||||
}
|
||||
|
||||
function getCtaButtonType(a0, a1) { // fn#81755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10795:330, offset: 0x01edd1b4, size: 105 bytes, params: 3, frame: 15
|
||||
var r0;
|
||||
var moduleValue2;
|
||||
const value2 = undefined;
|
||||
const useShouldRenderReportFalsePositiveButtonModule = require(10610) /* metro dependency 10610: useShouldRenderReportFalsePositiveButton */;
|
||||
if (useShouldRenderReportFalsePositiveButtonModule.shouldRenderReportFalsePositiveButton(a0)) {
|
||||
r0 = env0_2.MARK_AS_FALSE_POSITIVE;
|
||||
} else {
|
||||
moduleValue2 = require(4813) /* metro dependency 4813: AgeVerificationUtils */;
|
||||
r0 = moduleValue2.isAgeVerificationMessageWithRetryCta(a1, a0) ? env0_2.AGE_VERIFICATION_RETRY : value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useCtaButtonType(a0, a1) { // fn#81756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10795:544, offset: 0x01edd21d, size: 97 bytes, params: 3, frame: 16
|
||||
return (require(10610) /* metro dependency 10610: useShouldRenderReportFalsePositiveButton */).useShouldRenderReportFalsePositiveButton(a0) ? env0_2.MARK_AS_FALSE_POSITIVE : (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isAgeVerificationMessageWithRetryCta(a1,
|
||||
a0) ? env0_2.AGE_VERIFICATION_RETRY : undefined;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/* Metro module 4642; source: modules/messages/EmbedConstants.tsx; dependencies: [661, 2] */
|
||||
function _fun39921(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4820:6, offset: 0x010effa4, size: 340 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const MessageEmbedTypes = (require(661) /* metro dependency 661: Constants */).MessageEmbedTypes;
|
||||
let Set = global.Set;
|
||||
let AUTO_MODERATION_MESSAGE = MessageEmbedTypes.AUTO_MODERATION_MESSAGE;
|
||||
let AUTO_MODERATION_NOTIFICATION = MessageEmbedTypes.AUTO_MODERATION_NOTIFICATION;
|
||||
const RICH = MessageEmbedTypes.RICH;
|
||||
let SAFETY_POLICY_NOTICE = MessageEmbedTypes.SAFETY_POLICY_NOTICE;
|
||||
let SAFETY_SYSTEM_NOTIFICATION = MessageEmbedTypes.SAFETY_SYSTEM_NOTIFICATION;
|
||||
let AGE_VERIFICATION_SYSTEM_NOTIFICATION = MessageEmbedTypes.AGE_VERIFICATION_SYSTEM_NOTIFICATION;
|
||||
let VOICE_CHANNEL = MessageEmbedTypes.VOICE_CHANNEL;
|
||||
let POLL_RESULT = MessageEmbedTypes.POLL_RESULT;
|
||||
let set = new Set([AUTO_MODERATION_MESSAGE, AUTO_MODERATION_NOTIFICATION, RICH, SAFETY_POLICY_NOTICE,
|
||||
SAFETY_SYSTEM_NOTIFICATION, AGE_VERIFICATION_SYSTEM_NOTIFICATION, VOICE_CHANNEL, POLL_RESULT]);
|
||||
Set = global.Set;
|
||||
AUTO_MODERATION_MESSAGE = MessageEmbedTypes.AUTO_MODERATION_MESSAGE;
|
||||
AUTO_MODERATION_NOTIFICATION = MessageEmbedTypes.AUTO_MODERATION_NOTIFICATION;
|
||||
AGE_VERIFICATION_SYSTEM_NOTIFICATION = MessageEmbedTypes.AGE_VERIFICATION_SYSTEM_NOTIFICATION;
|
||||
const APPLICATION_NEWS = MessageEmbedTypes.APPLICATION_NEWS;
|
||||
const POST_PREVIEW = MessageEmbedTypes.POST_PREVIEW;
|
||||
SAFETY_POLICY_NOTICE = MessageEmbedTypes.SAFETY_POLICY_NOTICE;
|
||||
SAFETY_SYSTEM_NOTIFICATION = MessageEmbedTypes.SAFETY_SYSTEM_NOTIFICATION;
|
||||
VOICE_CHANNEL = MessageEmbedTypes.VOICE_CHANNEL;
|
||||
POLL_RESULT = MessageEmbedTypes.POLL_RESULT;
|
||||
set = new Set([AUTO_MODERATION_MESSAGE, AUTO_MODERATION_NOTIFICATION, AGE_VERIFICATION_SYSTEM_NOTIFICATION,
|
||||
APPLICATION_NEWS, POST_PREVIEW, SAFETY_POLICY_NOTICE, SAFETY_SYSTEM_NOTIFICATION, VOICE_CHANNEL, POLL_RESULT]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/EmbedConstants.tsx');
|
||||
exports.EMBED_TYPES_WITH_PARSEABLE_FIELDS = set;
|
||||
exports.EMBED_TYPES_WITH_SPECIAL_RENDERER = set;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
/* Metro module 10577; source: modules/messages/EmbeddedApplicationInstanceUtils.tsx; dependencies: [31, 1244, 8448, 8107, 2] */
|
||||
function _fun81589(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10763:6, offset: 0x01ed5dcd, size: 174 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = getJoinOrStartButtonState;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
object2 = {ACTIVE: 0};
|
||||
object2[0] = 'ACTIVE';
|
||||
object2.ENDED = 1;
|
||||
object2[1] = 'ENDED';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/EmbeddedApplicationInstanceUtils.tsx');
|
||||
exports.EmbedStates = object2;
|
||||
exports.useJoinOrStartButtonState = useJoinOrStartButtonState;
|
||||
exports.getJoinOrStartButtonState = closure;
|
||||
}
|
||||
|
||||
function getJoinOrStartButtonState({embeddedActivity, joinability, currentEmbeddedActivity, channel}) { // fn#81590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10763:178, offset: 0x01ed5e7b, size: 1209 bytes, params: 2, frame: 24
|
||||
var r7;
|
||||
const EmbeddedActivityJoinability = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).EmbeddedActivityJoinability;
|
||||
var object5;
|
||||
var object6;
|
||||
var object7;
|
||||
const value = embeddedActivity == null;
|
||||
const object8 = {disabled: false, isJoinAction: !value};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object8.text = value ? Reflect.apply(string, intl, [t.RscU7I]) : Reflect.apply(string, intl, [t.sqe0hj]);
|
||||
object8.tooltip = undefined;
|
||||
const isActivitiesInTextEnabled2 = (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivitiesInTextEnabled(channel);
|
||||
if (embeddedActivity == null) {
|
||||
if (value) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, undefined);
|
||||
object6['disabled'] = !isActivitiesInTextEnabled2;
|
||||
object6['tooltip'] = isActivitiesInTextEnabled2 ? undefined : intl.string(t.f41E1g);
|
||||
return object6;
|
||||
}
|
||||
if (joinability == null) {
|
||||
return object8;
|
||||
}
|
||||
if (joinability !== EmbeddedActivityJoinability.CAN_JOIN) {
|
||||
r7 = EmbeddedActivityJoinability.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === joinability ? intl.string(t.hHGrWz) : EmbeddedActivityJoinability.ACTIVITY_AGE_GATED === joinability ? intl.string(t['4WuFRE']) : EmbeddedActivityJoinability.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS === joinability ? intl.string(t.uGDCcw) : EmbeddedActivityJoinability.ACTIVITY_NOT_SUPPORTED_ON_OS === joinability ? intl.string(t.UXoQTp) : EmbeddedActivityJoinability.CHANNEL_FULL === joinability ? intl.string(t.rZfiNq) : EmbeddedActivityJoinability.NO_CHANNEL_CONNECT_PERMISSION === joinability ? intl.string(t.w5SAps) : EmbeddedActivityJoinability.NO_CHANNEL === joinability || EmbeddedActivityJoinability.NO_GUILD === joinability || EmbeddedActivityJoinability.NO_USER === joinability ? intl.string(t.Etp6uI) : EmbeddedActivityJoinability.IS_AFK_CHANNEL !== joinability ? undefined : intl.string(t.Etp6uI);
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, undefined);
|
||||
object5['disabled'] = true;
|
||||
object5['tooltip'] = r7;
|
||||
return object5;
|
||||
}
|
||||
} else {
|
||||
if (currentEmbeddedActivity == null) {
|
||||
if (value) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, undefined);
|
||||
object6['disabled'] = !isActivitiesInTextEnabled2;
|
||||
object6['tooltip'] = isActivitiesInTextEnabled2 ? undefined : intl.string(t.f41E1g);
|
||||
return object6;
|
||||
}
|
||||
if (joinability == null) {
|
||||
return object8;
|
||||
}
|
||||
if (joinability !== EmbeddedActivityJoinability.CAN_JOIN) {
|
||||
r7 = EmbeddedActivityJoinability.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === joinability ? intl.string(t.hHGrWz) : EmbeddedActivityJoinability.ACTIVITY_AGE_GATED === joinability ? intl.string(t['4WuFRE']) : EmbeddedActivityJoinability.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS === joinability ? intl.string(t.uGDCcw) : EmbeddedActivityJoinability.ACTIVITY_NOT_SUPPORTED_ON_OS === joinability ? intl.string(t.UXoQTp) : EmbeddedActivityJoinability.CHANNEL_FULL === joinability ? intl.string(t.rZfiNq) : EmbeddedActivityJoinability.NO_CHANNEL_CONNECT_PERMISSION === joinability ? intl.string(t.w5SAps) : EmbeddedActivityJoinability.NO_CHANNEL === joinability || EmbeddedActivityJoinability.NO_GUILD === joinability || EmbeddedActivityJoinability.NO_USER === joinability ? intl.string(t.Etp6uI) : EmbeddedActivityJoinability.IS_AFK_CHANNEL !== joinability ? undefined : intl.string(t.Etp6uI);
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, undefined);
|
||||
object5['disabled'] = true;
|
||||
object5['tooltip'] = r7;
|
||||
return object5;
|
||||
}
|
||||
return object8;
|
||||
}
|
||||
if (embeddedActivity.launchId === currentEmbeddedActivity.launchId) {
|
||||
object7 = {};
|
||||
copyDataProperties(object7, object8, undefined);
|
||||
object7['disabled'] = true;
|
||||
object7['text'] = intl.string(t.DPfdsq);
|
||||
object7['tooltip'] = undefined;
|
||||
return object7;
|
||||
}
|
||||
if (value) {
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object8, undefined);
|
||||
object6['disabled'] = !isActivitiesInTextEnabled2;
|
||||
object6['tooltip'] = isActivitiesInTextEnabled2 ? undefined : intl.string(t.f41E1g);
|
||||
return object6;
|
||||
}
|
||||
if (joinability == null) {
|
||||
return object8;
|
||||
}
|
||||
if (joinability !== EmbeddedActivityJoinability.CAN_JOIN) {
|
||||
r7 = EmbeddedActivityJoinability.NO_USE_EMBEDDED_ACTIVITIES_PERMISSION === joinability ? intl.string(t.hHGrWz) : EmbeddedActivityJoinability.ACTIVITY_AGE_GATED === joinability ? intl.string(t['4WuFRE']) : EmbeddedActivityJoinability.ACTIVITIES_FEATURE_NOT_ENABLED_FOR_OS === joinability ? intl.string(t.uGDCcw) : EmbeddedActivityJoinability.ACTIVITY_NOT_SUPPORTED_ON_OS === joinability ? intl.string(t.UXoQTp) : EmbeddedActivityJoinability.CHANNEL_FULL === joinability ? intl.string(t.rZfiNq) : EmbeddedActivityJoinability.NO_CHANNEL_CONNECT_PERMISSION === joinability ? intl.string(t.w5SAps) : EmbeddedActivityJoinability.NO_CHANNEL === joinability || EmbeddedActivityJoinability.NO_GUILD === joinability || EmbeddedActivityJoinability.NO_USER === joinability ? intl.string(t.Etp6uI) : EmbeddedActivityJoinability.IS_AFK_CHANNEL !== joinability ? undefined : intl.string(t.Etp6uI);
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object8, undefined);
|
||||
object5['disabled'] = true;
|
||||
object5['tooltip'] = r7;
|
||||
return object5;
|
||||
}
|
||||
}
|
||||
return object8;
|
||||
}
|
||||
|
||||
function useJoinOrStartButtonState({embeddedActivity, joinability, currentEmbeddedActivity, channel}) { // fn#81591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10763:1873, offset: 0x01ed6334, size: 91 bytes, params: 2, frame: 17
|
||||
return currentEmbeddedActivity.useMemo(function() {
|
||||
return getJoinOrStartButtonState({embeddedActivity: embeddedActivity, joinability: joinability,
|
||||
currentEmbeddedActivity: currentEmbeddedActivity, channel: channel});
|
||||
}, [embeddedActivity, joinability, currentEmbeddedActivity, channel]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,374 @@
|
||||
/* Metro module 4815; source: modules/messages/EphemeralMessageStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 661, 1391, 4625, 566, 694, 2] */
|
||||
function _fun41888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:6, offset: 0x0112ad78, size: 465 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_41894 = 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 = CACHE_LOADED_41896;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
|
||||
const env0_9 = [];
|
||||
const Map = global.Map;
|
||||
let map = new Map();
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun41897(Store).displayName = 'EphemeralMessageStore';
|
||||
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {MESSAGE_CREATE: MESSAGE_CREATE_41901,
|
||||
MESSAGE_UPDATE: MESSAGE_UPDATE_41902, MESSAGE_DELETE: MESSAGE_DELETE_41903,
|
||||
MESSAGE_DELETE_BULK: MESSAGE_DELETE_BULK_41904, CLEAR_MESSAGES: CLEAR_MESSAGES_41905,
|
||||
CHANNEL_DELETE: CHANNEL_DELETE_41906, THREAD_DELETE: THREAD_DELETE_41907, GUILD_DELETE: GUILD_DELETE_41908,
|
||||
CACHE_LOADED: closure, CONNECTION_OPEN: closure, OVERLAY_INITIALIZE: closure, LOGOUT: closure});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/EphemeralMessageStore.tsx');
|
||||
exports.default = map;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_41889() { // fn#41889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:184, offset: 0x0112af49, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_41889_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_41892(a0, a1) { // fn#41892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:377, offset: 0x0112afa7, size: 370 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 _fun41893;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_41894(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_41894(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_41894(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun41893;
|
||||
}
|
||||
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 dropChannelIfEmpty(a0, {size}) { // fn#41895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1306, offset: 0x0112b119, size: 38 bytes, params: 3, frame: 11
|
||||
if (size === 0) {
|
||||
env0_10.delete(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function CACHE_LOADED_41896() { // fn#41896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1363, offset: 0x0112b13f, size: 40 bytes, params: 1, frame: 10
|
||||
if (env0_10.size === 0) {
|
||||
return false;
|
||||
}
|
||||
env0_10.clear();
|
||||
}
|
||||
|
||||
function _fun41897(a0) { // fn#41897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1422, offset: 0x0112b167, size: 91 bytes, params: 2, frame: 16
|
||||
const closure = EphemeralMessageStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(ChannelStore);
|
||||
}}, {key: 'getMessages', value: value_41900}]);
|
||||
}
|
||||
|
||||
function MESSAGE_CREATE_41901({channelId, message}) { // fn#41901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1985, offset: 0x0112b20a, size: 264 bytes, params: 2, frame: 19
|
||||
var r2;
|
||||
var value3;
|
||||
var map;
|
||||
var set;
|
||||
var id;
|
||||
var size;
|
||||
var next;
|
||||
var done;
|
||||
var value;
|
||||
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
const hasFlag = flagUtilsModule.hasFlag;
|
||||
const r4 = message.flags ?? 0;
|
||||
const EPHEMERAL = MessageFlags.EPHEMERAL;
|
||||
if (Reflect.apply(hasFlag, flagUtilsModule, [r4, EPHEMERAL])) {
|
||||
value3 = env0_10.get(channelId);
|
||||
if (value3 != null) {
|
||||
r2 = value3;
|
||||
} else {
|
||||
map = new global.Map();
|
||||
env0_10.set(channelId, map);
|
||||
r2 = map;
|
||||
}
|
||||
set = r2.set;
|
||||
id = message.id;
|
||||
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
||||
Reflect.apply(set, r2, [id, value.createMessageRecord(message)]);
|
||||
size = r2.size;
|
||||
if (size > 50) {
|
||||
while (true) {
|
||||
value = r2.keys();
|
||||
next = value.next;
|
||||
value = Reflect.apply(next, value, []);
|
||||
done = value.done;
|
||||
if (done === true) {
|
||||
break;
|
||||
}
|
||||
value = value.value;
|
||||
r2.delete(value);
|
||||
size = r2.size;
|
||||
if (size > 50) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function MESSAGE_UPDATE_41902({message}) { // fn#41902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2344, offset: 0x0112b312, size: 122 bytes, params: 2, frame: 17
|
||||
const channel_id = message.channel_id;
|
||||
const id = message.id;
|
||||
if (channel_id == null) {
|
||||
return false;
|
||||
}
|
||||
if (id == null) {
|
||||
return false;
|
||||
}
|
||||
const value2 = env0_10.get(channel_id);
|
||||
if (value2 == null) {
|
||||
return false;
|
||||
}
|
||||
const value3 = value2.get(id);
|
||||
if (value3 == null) {
|
||||
return false;
|
||||
}
|
||||
const set = value2.set;
|
||||
const messageRecordUtilsModule = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
||||
Reflect.apply(set, value2, [id, messageRecordUtilsModule.updateMessageRecord(value3, message)]);
|
||||
}
|
||||
|
||||
function MESSAGE_DELETE_41903({channelId, id}) { // fn#41903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2570, offset: 0x0112b38c, size: 67 bytes, params: 2, frame: 14
|
||||
const value2 = env0_10.get(channelId);
|
||||
if (value2 != null) {
|
||||
if (value2.delete(id)) {
|
||||
dropChannelIfEmpty(channelId, value2);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function MESSAGE_DELETE_BULK_41904({channelId, ids}) { // fn#41904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2713, offset: 0x0112b3cf, size: 128 bytes, params: 2, frame: 22
|
||||
var r7;
|
||||
var r8;
|
||||
var r5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
const value2 = env0_10.get(channelId);
|
||||
if (value2 != null) {
|
||||
var value3 = _createForOfIteratorHelperLoose_41892(ids);
|
||||
var value4 = value3();
|
||||
var done = value4.done;
|
||||
if (done) {
|
||||
r5 = false;
|
||||
} else {
|
||||
r7 = false;
|
||||
r8 = value4;
|
||||
while (true) {
|
||||
value6 = r8.value;
|
||||
if (value2.delete(value6)) {
|
||||
value7 = true;
|
||||
r7 = value7;
|
||||
}
|
||||
value8 = value3();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
r5 = r7;
|
||||
break;
|
||||
}
|
||||
r8 = value8;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (r5) {
|
||||
dropChannelIfEmpty(channelId, value2);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function CLEAR_MESSAGES_41905({channelId}) { // fn#41905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:2959, offset: 0x0112b44f, size: 50 bytes, params: 2, frame: 12
|
||||
const binding = env0_10;
|
||||
if (binding.has(channelId)) {
|
||||
env0_10.delete(channelId);
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function CHANNEL_DELETE_41906({channel}) { // fn#41906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:3053, offset: 0x0112b481, size: 41 bytes, params: 2, frame: 11
|
||||
if (env0_10.delete(channel.id)) {
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function GUILD_DELETE_41908() { // fn#41908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:3221, offset: 0x0112b4aa, size: 137 bytes, params: 1, frame: 19
|
||||
var r3;
|
||||
var r4;
|
||||
var r2;
|
||||
var value7;
|
||||
var getChannel;
|
||||
var value8;
|
||||
var value9;
|
||||
if (env0_10.size === 0) {
|
||||
return false;
|
||||
}
|
||||
const _createForOfIteratorHelperLoose_41892Binding = _createForOfIteratorHelperLoose_41892;
|
||||
let binding = env0_10;
|
||||
const value2 = binding.keys();
|
||||
const value3 = undefined;
|
||||
const value4 = _createForOfIteratorHelperLoose_41892Binding(value2);
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
const value6 = false;
|
||||
if (done) {
|
||||
r2 = value6;
|
||||
} else {
|
||||
r3 = value6;
|
||||
r4 = value5;
|
||||
while (true) {
|
||||
value7 = r4.value;
|
||||
getChannel = ChannelStore.getChannel;
|
||||
if (Reflect.apply(getChannel, ChannelStore, [value7]) == null) {
|
||||
binding = env0_10;
|
||||
binding.delete(value7);
|
||||
value8 = true;
|
||||
r3 = value8;
|
||||
}
|
||||
value9 = value4();
|
||||
done = value9.done;
|
||||
if (done) {
|
||||
r2 = r3;
|
||||
break;
|
||||
}
|
||||
r4 = value9;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return r2 ? value3 : !!r2;
|
||||
}
|
||||
|
||||
function value_41900(a0) { // fn#41900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4993:1811, offset: 0x0112b1c2, size: 72 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_10.get(a0);
|
||||
return value2 == null || value2.size === 0 ? env1_9 : global.Array.from(value2.values());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
/* Metro module 6858; source: modules/messages/GuildOfficialMessageUtils.tsx; dependencies: [1867, 3784, 4503, 661, 673, 674, 4000, 4002, 6859, 566, 6860, 5216, 2] */
|
||||
function _fun54093(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:6, offset: 0x0135c805, size: 323 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const closure = isGuildOfficialMessagesEnabled;
|
||||
const closure2 = useIsGuildOfficialMessagesEnabled;
|
||||
const closure3 = canManageGuildOfficialMessages;
|
||||
const closure4 = useCanManageGuildOfficialMessages;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const env0_5 = (require(4503) /* metro dependency 4503: MessageConstants */).GUILD_OFFICIAL_HIGHLIGHT_ALPHA;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = constantsModule.ChannelTypes;
|
||||
const env0_7 = constantsModule.GuildFeatures;
|
||||
const env0_8 = constantsModule.MessageFlags;
|
||||
const env0_9 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/GuildOfficialMessageUtils.tsx');
|
||||
exports.getAccessibleGuildOfficialTextColor = getAccessibleGuildOfficialTextColor;
|
||||
exports.showGuildOfficialMessageGradient = function(a0) {
|
||||
return a0 !== 'no_gradient' && a0 !== 'hidden';
|
||||
};
|
||||
exports.showGuildOfficialMessageTextColor = function(a0) {
|
||||
return a0 !== 'no_text_color' && a0 !== 'hidden';
|
||||
};
|
||||
exports.isGuildOfficialMessagesEnabled = closure;
|
||||
exports.useIsGuildOfficialMessagesEnabled = closure2;
|
||||
exports.canManageGuildOfficialMessages = closure3;
|
||||
exports.useCanManageGuildOfficialMessages = closure4;
|
||||
exports.useCanToggleGuildOfficialMessages = useCanToggleGuildOfficialMessages;
|
||||
exports.canSendGuildOfficialMessages = canSendGuildOfficialMessages;
|
||||
}
|
||||
|
||||
function isGuildOfficialMessagesEnabled(a0, a1) { // fn#54094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:235, offset: 0x0135c948, size: 105 bytes, params: 3, frame: 13
|
||||
let value = a0 != null;
|
||||
let r0 = value && a0.features.has(GuildFeatures.VERIFIED);
|
||||
if (r0) {
|
||||
value = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
|
||||
r0 = value.getCurrentConfig({guildId: a0.id, location: a1}).enabled;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useIsGuildOfficialMessagesEnabled(a0, a1) { // fn#54095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:384, offset: 0x0135c9b1, size: 169 bytes, params: 3, frame: 20
|
||||
const value = a0;
|
||||
const value3 = undefined;
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun54096, [value]);
|
||||
const defaultImport = importDefault(6859) /* metro dependency 6859: GuildOfficialMessagesExperiment */;
|
||||
const useExperiment = defaultImport.useExperiment;
|
||||
return value4 != null && value4.features.has(GuildFeatures.VERIFIED) && Reflect.apply(useExperiment, defaultImport,
|
||||
[{guildId: value ?? value3, location: a1}]).enabled;
|
||||
}
|
||||
|
||||
function canManageGuildOfficialMessages(a0, a1, a2) { // fn#54097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:624, offset: 0x0135ca82, size: 55 bytes, params: 4, frame: 14
|
||||
return isGuildOfficialMessagesEnabled(a0, a2) && PermissionStore.can(Permissions.MANAGE_OFFICIAL_MESSAGES, a1);
|
||||
}
|
||||
|
||||
function useCanManageGuildOfficialMessages(a0, a1, a2) { // fn#54098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:751, offset: 0x0135cab9, size: 95 bytes, params: 4, frame: 18
|
||||
const env0_0 = a1;
|
||||
const value2 = useIsGuildOfficialMessagesEnabled(a0, a2);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
return value2 && Reflect.apply(useStateFromStores, fluxModule, [[PermissionStore], function() {
|
||||
var MANAGE_OFFICIAL_MESSAGES = Permissions.MANAGE_OFFICIAL_MESSAGES;
|
||||
return PermissionStore.can(MANAGE_OFFICIAL_MESSAGES, require);
|
||||
}, [a1]]);
|
||||
}
|
||||
|
||||
function isChannelOfficialMessageEligible(a0) { // fn#54100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:938, offset: 0x0135cb3e, size: 116 bytes, params: 2, frame: 13
|
||||
let value = a0 != null;
|
||||
let r0 = value && !a0.isPrivate();
|
||||
if (r0) {
|
||||
value = require(6860) /* metro dependency 6860: ThreadHooks */;
|
||||
value = value.getIsActiveChannelOrUnarchivableThread(a0);
|
||||
r0 = value;
|
||||
}
|
||||
r0 = r0 && a0.type !== ChannelTypes.GUILD_VOICE && a0.type !== ChannelTypes.GUILD_STAGE_VOICE;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getAccessibleGuildOfficialTextColor(a0, a1) { // fn#54101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:1239, offset: 0x0135cbb2, size: 263 bytes, params: 3, frame: 24
|
||||
let value = a2;
|
||||
const value2 = a3;
|
||||
const r3 = value !== undefined ? value : 1;
|
||||
const r12 = value2 !== undefined ? value2 : GUILD_OFFICIAL_HIGHLIGHT_ALPHA;
|
||||
const value3 = (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
|
||||
const value4 = (importDefault(674) /* metro dependency 674 */)(a1);
|
||||
const value5 = (importDefault(674) /* metro dependency 674 */)(value3);
|
||||
const value6 = (importDefault(674) /* metro dependency 674 */).mix(value4, value3, r12, 'rgb');
|
||||
const defaultImport3 = importDefault(674) /* metro dependency 674 */;
|
||||
const value7 = defaultImport3.contrast(value5, value6);
|
||||
const defaultImport4 = defaultImport3;
|
||||
const r4 = value7 < defaultImport4.contrast(value5, value4) ? value6 : value4;
|
||||
value = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const getAccessibleForegroundColor = value.getAccessibleForegroundColor;
|
||||
const object2 = {foreground: value5, background: r4};
|
||||
const WCAGContrastRatios = (require(4002) /* metro dependency 4002: shared */).WCAGContrastRatios;
|
||||
const Text = WCAGContrastRatios.Text;
|
||||
object2.ratio = Text;
|
||||
object2.saturationFactor = r3;
|
||||
return Reflect.apply(getAccessibleForegroundColor, value, [object2]);
|
||||
}
|
||||
|
||||
function useCanToggleGuildOfficialMessages(a0, a1, a2) { // fn#54104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:2102, offset: 0x0135cced, size: 152 bytes, params: 4, frame: 18
|
||||
var value;
|
||||
let r1 = a1.guild_id ?? undefined;
|
||||
const value3 = useCanManageGuildOfficialMessages(r1, a1, a2);
|
||||
let r0 = value3 ? (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a0) : !value3;
|
||||
if (r0) {
|
||||
r0 = !r0;
|
||||
} else {
|
||||
if (a0.hasFlag(MessageFlags.IS_GUILD_OFFICIAL)) {
|
||||
value = require(6860) /* metro dependency 6860: ThreadHooks */;
|
||||
value = value.getIsActiveChannelOrUnarchivableThread(a1);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = isChannelOfficialMessageEligible(a1);
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function canSendGuildOfficialMessages(a0, a1, a2) { // fn#54105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:2403, offset: 0x0135cd85, size: 39 bytes, params: 4, frame: 16
|
||||
return canManageGuildOfficialMessages(a0, a1, a2) && isChannelOfficialMessageEligible(a1);
|
||||
}
|
||||
|
||||
function _fun54096() { // fn#54096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7036:470, offset: 0x0135ca5a, size: 40 bytes, params: 1, frame: 12
|
||||
const value2 = null;
|
||||
return value2 != env0_0 ? GuildStore.getGuild(env0_0) : value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 6859; source: modules/messages/GuildOfficialMessagesExperiment.tsx; dependencies: [4620, 2] */
|
||||
function _fun54106(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#54106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7037:6, offset: 0x0135cdac, size: 166 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(4620) /* metro dependency 4620: experiments */;
|
||||
value = value.createExperiment({'kind': 'guild', 'id': '2026-03_guild_official_messages',
|
||||
'label': 'Guild Official Messages', defaultConfig: {enabled: false}, treatments: [{'id': 1,
|
||||
'label': 'Enable official messages', config: {enabled: true}}]});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/GuildOfficialMessagesExperiment.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,869 @@
|
||||
/* Metro module 12564; source: modules/messages/GuildOfficialMessagesStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1945, 1867, 3793, 1878, 661, 4625, 1391, 566, 694, 2] */
|
||||
function _fun96174(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:6, offset: 0x02157149, size: 636 bytes, params: 8, frame: 21
|
||||
let env0_0 = require;
|
||||
const _arrayLikeToArray_96180 = 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 prependRecord = function(a0, a1) {
|
||||
var env0_0 = a1;
|
||||
updateGuildState(a0, _fun96184);
|
||||
};
|
||||
const updateMessage_96185 = function(a0, a1) {
|
||||
var env0_0 = a1;
|
||||
updateGuildState(a0, _fun96186);
|
||||
};
|
||||
const closure = CHANNEL_DELETE_96187;
|
||||
const closure2 = RELATIONSHIP_ADD_96189;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_12 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
|
||||
let env0_13 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun96190(Store);
|
||||
value.displayName = 'GuildOfficialMessagesStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
|
||||
env0_13 = {};
|
||||
}, LOAD_OFFICIAL_MESSAGES: LOAD_OFFICIAL_MESSAGES, LOAD_OFFICIAL_MESSAGES_SUCCESS: LOAD_OFFICIAL_MESSAGES_SUCCESS,
|
||||
LOAD_OFFICIAL_MESSAGES_FAILURE: LOAD_OFFICIAL_MESSAGES_FAILURE, GUILD_DELETE: GUILD_DELETE_96208,
|
||||
CHANNEL_DELETE: closure, THREAD_DELETE: closure, MESSAGE_CREATE: MESSAGE_CREATE_96209,
|
||||
MESSAGE_UPDATE: MESSAGE_UPDATE_96210, MESSAGE_REACTION_ADD: MESSAGE_REACTION_ADD_96213,
|
||||
MESSAGE_REACTION_REMOVE: MESSAGE_REACTION_REMOVE, MESSAGE_REACTION_REMOVE_ALL: function({channelId,
|
||||
messageId}) {
|
||||
var message = findMessage(channelId, messageId);
|
||||
if (message == null) {
|
||||
return false;
|
||||
}
|
||||
updateMessage_96185(message.guildId, message.message.set('reactions', []));
|
||||
}, MESSAGE_REACTION_REMOVE_EMOJI: function({channelId, messageId, emoji}) {
|
||||
var message = findMessage(channelId, messageId);
|
||||
if (message == null) {
|
||||
return false;
|
||||
}
|
||||
updateMessage_96185(message.guildId, message.message.removeReactionsForEmoji(emoji));
|
||||
}, MESSAGE_DELETE: MESSAGE_DELETE_96217, MESSAGE_DELETE_BULK: MESSAGE_DELETE_BULK_96220, RELATIONSHIP_ADD: closure2,
|
||||
RELATIONSHIP_REMOVE: closure2, RELATIONSHIP_UPDATE: closure2});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/GuildOfficialMessagesStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_96175() { // fn#96175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:248, offset: 0x021573c5, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_96175_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_96178(a0, a1) { // fn#96178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:441, offset: 0x02157427, 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 _fun96179;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_96180(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_96180(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_96180(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun96179;
|
||||
}
|
||||
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 findMessage(a0, a1) { // fn#96181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:1360, offset: 0x0215759b, size: 98 bytes, params: 3, frame: 13
|
||||
const channel = ChannelStore.getChannel(a0);
|
||||
const value3 = null;
|
||||
const r4 = value3 == channel ? undefined : channel.getGuildId();
|
||||
if (value3 == r4) {
|
||||
return value3;
|
||||
}
|
||||
let property = env0_13[r4];
|
||||
if (value3 == property) {
|
||||
return value3;
|
||||
}
|
||||
property = property.messages[a1];
|
||||
return value3 == property ? value3 : {guildId: r4, message: property};
|
||||
}
|
||||
|
||||
function updateGuildState(a0, a1) { // fn#96182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:1561, offset: 0x021575fd, size: 75 bytes, params: 3, frame: 16
|
||||
var object3;
|
||||
var object4;
|
||||
const property = env0_13[a0];
|
||||
if (property != null) {
|
||||
object3 = {};
|
||||
copyDataProperties(object3, env0_13, property);
|
||||
object4 = {};
|
||||
copyDataProperties(object4, property, property);
|
||||
copyDataProperties(object4, a1(property), property);
|
||||
object3[a0] = object4;
|
||||
}
|
||||
}
|
||||
|
||||
function prependRecord(a0, a1) { // fn#96183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:1642, offset: 0x02157648, size: 36 bytes, params: 3, frame: 13
|
||||
const env0_0 = a1;
|
||||
updateGuildState(a0, function(a0) {
|
||||
var r5;
|
||||
var object = {};
|
||||
var items = [require.id];
|
||||
arraySpread(items, a0.ids, 1, r5);
|
||||
object.ids = items;
|
||||
var object2 = {};
|
||||
copyDataProperties(object2, a0.messages, 1);
|
||||
object2[require.id] = require;
|
||||
object.messages = object2;
|
||||
return object;
|
||||
});
|
||||
}
|
||||
|
||||
function updateMessage_96185(a0, a1) { // fn#96185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:1753, offset: 0x021576ba, size: 36 bytes, params: 3, frame: 13
|
||||
const env0_0 = a1;
|
||||
updateGuildState(a0, function(a0) {
|
||||
var r3;
|
||||
var object2 = {};
|
||||
copyDataProperties(object2, a0.messages, r3);
|
||||
object2[require.id] = require;
|
||||
return {messages: object2};
|
||||
});
|
||||
}
|
||||
|
||||
function CHANNEL_DELETE_96187({channel}) { // fn#96187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:1844, offset: 0x0215770a, size: 226 bytes, params: 2, frame: 24
|
||||
var r7;
|
||||
var channel_id;
|
||||
var value5;
|
||||
var property2;
|
||||
var id;
|
||||
var value6;
|
||||
const guild_id = channel.guild_id;
|
||||
if (guild_id == null) {
|
||||
return false;
|
||||
}
|
||||
const property = env0_13[guild_id];
|
||||
if (property == null) {
|
||||
return false;
|
||||
}
|
||||
const items2 = [];
|
||||
const object2 = {};
|
||||
let messages = property.messages;
|
||||
copyDataProperties(object2, messages, undefined);
|
||||
const value3 = _createForOfIteratorHelperLoose_96178(property.ids);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r7 = value4;
|
||||
while (true) {
|
||||
value5 = r7.value;
|
||||
messages = property.messages;
|
||||
property2 = messages[value5];
|
||||
channel_id = property2?.channel_id;
|
||||
id = channel.id;
|
||||
if (channel_id === id) {
|
||||
delete object2[value5];
|
||||
} else {
|
||||
items2.push(value5);
|
||||
}
|
||||
value6 = value3();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r7 = value6;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (items2.length === property.ids.length) {
|
||||
return false;
|
||||
}
|
||||
updateGuildState(guild_id, _fun96188);
|
||||
}
|
||||
|
||||
function RELATIONSHIP_ADD_96189() { // fn#96189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:2218, offset: 0x02157805, size: 382 bytes, params: 1, frame: 41
|
||||
var r10;
|
||||
var r14;
|
||||
var r21;
|
||||
var r22;
|
||||
var r25;
|
||||
var r28;
|
||||
var r18;
|
||||
var r16;
|
||||
var r4;
|
||||
var property;
|
||||
var property2;
|
||||
var _createForOfIteratorHelperLoose_96178Binding;
|
||||
var ids;
|
||||
var value6;
|
||||
var value7;
|
||||
var done;
|
||||
var value8;
|
||||
var messages;
|
||||
var property3;
|
||||
var isBlockedForMessage2;
|
||||
var isIgnoredForMessage2;
|
||||
var blocked;
|
||||
var value9;
|
||||
var ignored;
|
||||
var value10;
|
||||
var object3;
|
||||
var merge;
|
||||
var value11;
|
||||
var object5;
|
||||
var value12;
|
||||
var value13;
|
||||
const object6 = {};
|
||||
const Object = global.Object;
|
||||
const value2 = Object.keys(env0_13);
|
||||
let length = value2.length;
|
||||
const value3 = 0;
|
||||
const value4 = false;
|
||||
const value5 = null;
|
||||
if (value3 < length) {
|
||||
r10 = value4;
|
||||
r14 = value3;
|
||||
while (true) {
|
||||
property = value2[r14];
|
||||
property2 = env0_13[property];
|
||||
_createForOfIteratorHelperLoose_96178Binding = _createForOfIteratorHelperLoose_96178;
|
||||
ids = property2.ids;
|
||||
value6 = _createForOfIteratorHelperLoose_96178Binding(ids);
|
||||
value7 = value6();
|
||||
done = value7.done;
|
||||
if (done) {
|
||||
r18 = value5;
|
||||
} else {
|
||||
r21 = value5;
|
||||
r22 = value7;
|
||||
while (true) {
|
||||
value8 = r22.value;
|
||||
messages = property2.messages;
|
||||
property3 = messages[value8];
|
||||
if (value5 != property3) {
|
||||
isBlockedForMessage2 = RelationshipStore.isBlockedForMessage(property3);
|
||||
isIgnoredForMessage2 = RelationshipStore.isIgnoredForMessage(property3);
|
||||
blocked = property3.blocked;
|
||||
value9 = blocked === isBlockedForMessage2;
|
||||
if (!value9) {
|
||||
r25 = value9;
|
||||
continue;
|
||||
}
|
||||
ignored = property3.ignored;
|
||||
value10 = ignored === isIgnoredForMessage2;
|
||||
r25 = value10;
|
||||
if (r25) {
|
||||
r28 = r21;
|
||||
break;
|
||||
}
|
||||
if (value5 != r21) {
|
||||
r25 = r21;
|
||||
continue;
|
||||
}
|
||||
object3 = {};
|
||||
messages = property2.messages;
|
||||
copyDataProperties(object3, messages, undefined);
|
||||
r25 = object3;
|
||||
merge = property3.merge;
|
||||
r25[value8] = Reflect.apply(merge, property3, [{blocked: isBlockedForMessage2,
|
||||
ignored: isIgnoredForMessage2}]);
|
||||
r28 = r25;
|
||||
break;
|
||||
}
|
||||
r28 = r21;
|
||||
value11 = value6();
|
||||
done = value11.done;
|
||||
if (done) {
|
||||
r18 = r28;
|
||||
break;
|
||||
}
|
||||
r21 = r28;
|
||||
r22 = value11;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (value5 == r18) {
|
||||
object6[property] = property2;
|
||||
r16 = r10;
|
||||
} else {
|
||||
object5 = {};
|
||||
copyDataProperties(object5, property2, undefined);
|
||||
object5['messages'] = r18;
|
||||
object6[property] = object5;
|
||||
value12 = true;
|
||||
r16 = value12;
|
||||
}
|
||||
value13 = typeof r14 === 'bigint' ? r14 + 1n : +r14 + 1;
|
||||
length = value2.length;
|
||||
if (value13 < length) {
|
||||
r10 = r16;
|
||||
r14 = value13;
|
||||
continue;
|
||||
}
|
||||
r4 = r16;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r4 = value4;
|
||||
}
|
||||
if (r4) {
|
||||
return undefined;
|
||||
}
|
||||
return value4;
|
||||
}
|
||||
|
||||
function _fun96190(a0) { // fn#96190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:2665, offset: 0x02157983, size: 222 bytes, params: 2, frame: 16
|
||||
const closure = GuildOfficialMessagesStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(ChannelStore, GuildMemberStore, GuildStore, RelationshipStore, UserStore);
|
||||
}}, {key: 'getState', value: value_96193}, {key: 'getMessage', value: value_96194}, {key: 'getMessages',
|
||||
value: value_96195}, {key: 'isLoading', value: value_96198}, {key: 'isLoaded', value: value_96199},
|
||||
{key: 'hasMore', value: value_96200}]);
|
||||
}
|
||||
|
||||
function LOAD_OFFICIAL_MESSAGES({guildId, before}) { // fn#96202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:3770, offset: 0x02157b6a, size: 167 bytes, params: 2, frame: 18
|
||||
var object2;
|
||||
var object4;
|
||||
const property = env0_13[guildId];
|
||||
if (property?.loading === true) {
|
||||
return false;
|
||||
}
|
||||
if (before != null) {
|
||||
if (property == null) {
|
||||
return false;
|
||||
}
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_13, undefined);
|
||||
object4 = {};
|
||||
copyDataProperties(object4, property, undefined);
|
||||
object4['loading'] = true;
|
||||
object2[guildId] = object4;
|
||||
env0_13 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_13, undefined);
|
||||
object2[guildId] = {'ids': null, 'messages': null, 'hasMore': false, 'loading': true, 'loaded': false,
|
||||
'error': false, ids: [], messages: {}};
|
||||
}
|
||||
}
|
||||
|
||||
function LOAD_OFFICIAL_MESSAGES_SUCCESS({guildId, messages, hasMore, before}) { // fn#96203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:4058, offset: 0x02157c11, size: 82 bytes, params: 2, frame: 14
|
||||
if (env0_13[guildId] == null) {
|
||||
return false;
|
||||
}
|
||||
updateGuildState(guildId, _fun96204);
|
||||
}
|
||||
|
||||
function LOAD_OFFICIAL_MESSAGES_FAILURE({guildId, before}) { // fn#96205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:4494, offset: 0x02157d49, size: 71 bytes, params: 2, frame: 15
|
||||
if (env0_13[guildId] == null) {
|
||||
return false;
|
||||
}
|
||||
updateGuildState(guildId, before != null ? function() {
|
||||
return {loading: false};
|
||||
} : _fun96207);
|
||||
}
|
||||
|
||||
function GUILD_DELETE_96208({guild}) { // fn#96208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:4671, offset: 0x02157dab, size: 64 bytes, params: 2, frame: 13
|
||||
const property = env0_13[guild.id];
|
||||
if (property == null) {
|
||||
return false;
|
||||
}
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_13, property);
|
||||
delete object2[guild.id];
|
||||
}
|
||||
|
||||
function MESSAGE_CREATE_96209({message, guildId, optimistic, isPushNotification}) { // fn#96209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:4852, offset: 0x02157deb, size: 206 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var property;
|
||||
var value4;
|
||||
var value5;
|
||||
var prependRecordBinding;
|
||||
if (!optimistic) {
|
||||
if (isPushNotification) {
|
||||
return false;
|
||||
}
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
var value;
|
||||
var value2 = undefined;
|
||||
var moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
var hasFlag = moduleValue.hasFlag;
|
||||
var r1 = message.flags ?? 0;
|
||||
var IS_GUILD_OFFICIAL = MessageFlags.IS_GUILD_OFFICIAL;
|
||||
if (Reflect.apply(hasFlag, moduleValue, [r1, IS_GUILD_OFFICIAL])) {
|
||||
property = env0_13[guildId];
|
||||
value4 = property != null;
|
||||
if (value4) {
|
||||
value5 = property.messages[message.id] == null;
|
||||
if (value5) {
|
||||
prependRecordBinding = prependRecord;
|
||||
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
||||
prependRecordBinding(guildId, value.createMessageRecord(message));
|
||||
r1 = value2;
|
||||
} else {
|
||||
r1 = value5;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value4;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function MESSAGE_UPDATE_96210({message}) { // fn#96210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:5168, offset: 0x02157eb9, size: 385 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var updateMessage_96185Binding;
|
||||
var moduleValue2;
|
||||
var prependRecordBinding;
|
||||
var moduleValue3;
|
||||
var value6;
|
||||
var moduleValue4;
|
||||
let id = message.id;
|
||||
if (id == null) {
|
||||
return false;
|
||||
}
|
||||
const guildId = ChannelStore.getChannel(message.channel_id)?.getGuildId();
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
let property = env0_13[guildId];
|
||||
if (property == null) {
|
||||
return false;
|
||||
}
|
||||
property = property.messages[message.id];
|
||||
if (message.author == null) {
|
||||
value6 = property != null;
|
||||
if (value6) {
|
||||
updateMessage_96185Binding = updateMessage_96185;
|
||||
moduleValue4 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
||||
updateMessage_96185Binding(guildId, moduleValue4.updateMessageRecord(property, message));
|
||||
r0 = undefined;
|
||||
} else {
|
||||
r0 = value6;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
const hasFlag = flagUtilsModule.hasFlag;
|
||||
const r8 = message.flags ?? 0;
|
||||
const IS_GUILD_OFFICIAL = MessageFlags.IS_GUILD_OFFICIAL;
|
||||
const hasFlag2 = Reflect.apply(hasFlag, flagUtilsModule, [r8, IS_GUILD_OFFICIAL]);
|
||||
if (hasFlag2) {
|
||||
if (property == null) {
|
||||
prependRecordBinding = prependRecord;
|
||||
moduleValue3 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
||||
prependRecordBinding(guildId, moduleValue3.createMessageRecord(message));
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
if (hasFlag2) {
|
||||
if (hasFlag2) {
|
||||
if (property == null) {
|
||||
return false;
|
||||
}
|
||||
updateMessage_96185Binding = updateMessage_96185;
|
||||
moduleValue2 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
||||
updateMessage_96185Binding(guildId, moduleValue2.updateMessageRecord(property, message));
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (property == null) {
|
||||
if (hasFlag2) {
|
||||
if (property == null) {
|
||||
return false;
|
||||
}
|
||||
updateMessage_96185Binding = updateMessage_96185;
|
||||
moduleValue2 = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
||||
updateMessage_96185Binding(guildId, moduleValue2.updateMessageRecord(property, message));
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
id = message.id;
|
||||
updateGuildState(guildId, function(a0) {
|
||||
var r4;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0.messages, r4);
|
||||
delete object[id];
|
||||
var object2 = {};
|
||||
object2.ids = a0.ids.filter(_fun96212);
|
||||
object2.messages = object;
|
||||
return object2;
|
||||
});
|
||||
}
|
||||
|
||||
function MESSAGE_REACTION_ADD_96213({channelId, messageId, userId, emoji, optimistic, reactionType, colors}) { // fn#96213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:5845, offset: 0x0215807e, size: 154 bytes, params: 2, frame: 24
|
||||
var message;
|
||||
const value4 = UserStore.getCurrentUser()?.id === userId;
|
||||
if (optimistic) {
|
||||
if (value4) {
|
||||
message = findMessage(channelId, messageId);
|
||||
if (message == null) {
|
||||
return false;
|
||||
}
|
||||
updateMessage_96185(message.guildId, message.message.addReaction(emoji, value4, colors, reactionType));
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
message = findMessage(channelId, messageId);
|
||||
if (message == null) {
|
||||
return false;
|
||||
}
|
||||
updateMessage_96185(message.guildId, message.message.addReaction(emoji, value4, colors, reactionType));
|
||||
}
|
||||
|
||||
function MESSAGE_REACTION_REMOVE({channelId, messageId, userId, emoji, optimistic, reactionType}) { // fn#96214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:6165, offset: 0x02158118, size: 137 bytes, params: 2, frame: 22
|
||||
var message;
|
||||
const value4 = UserStore.getCurrentUser()?.id === userId;
|
||||
if (optimistic) {
|
||||
if (value4) {
|
||||
message = findMessage(channelId, messageId);
|
||||
if (message == null) {
|
||||
return false;
|
||||
}
|
||||
updateMessage_96185(message.guildId, message.message.removeReaction(emoji, value4, reactionType));
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
message = findMessage(channelId, messageId);
|
||||
if (message == null) {
|
||||
return false;
|
||||
}
|
||||
updateMessage_96185(message.guildId, message.message.removeReaction(emoji, value4, reactionType));
|
||||
}
|
||||
|
||||
function MESSAGE_DELETE_96217({id, guildId}) { // fn#96217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:6894, offset: 0x0215823d, size: 91 bytes, params: 2, frame: 19
|
||||
var r1;
|
||||
var r0;
|
||||
var property;
|
||||
var value2;
|
||||
var value3;
|
||||
const value = guildId != null;
|
||||
if (value) {
|
||||
property = env0_13[guildId];
|
||||
value2 = undefined;
|
||||
r1 = property == null ? value2 : property.messages[id];
|
||||
value3 = r1 != null;
|
||||
if (value3) {
|
||||
updateGuildState(guildId, function(a0) {
|
||||
var r4;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0.messages, r4);
|
||||
delete object[id];
|
||||
var object2 = {};
|
||||
object2.ids = a0.ids.filter(_fun96219);
|
||||
object2.messages = object;
|
||||
return object2;
|
||||
});
|
||||
r1 = value2;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function MESSAGE_DELETE_BULK_96220({ids, guildId}) { // fn#96220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:7146, offset: 0x021582dc, size: 253 bytes, params: 2, frame: 19
|
||||
var r5;
|
||||
var value7;
|
||||
var has;
|
||||
var value8;
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
const property = env0_13[guildId];
|
||||
if (property == null) {
|
||||
return false;
|
||||
}
|
||||
const Set = global.Set;
|
||||
const set = new Set(ids);
|
||||
if (property.ids.filter(_fun96221).length === property.ids.length) {
|
||||
return false;
|
||||
}
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, property.messages, undefined);
|
||||
const value5 = _createForOfIteratorHelperLoose_96178(property.ids);
|
||||
const value6 = value5();
|
||||
let done = value6.done;
|
||||
if (!done) {
|
||||
r5 = value6;
|
||||
while (true) {
|
||||
value7 = r5.value;
|
||||
has = set.has;
|
||||
if (Reflect.apply(has, set, [value7])) {
|
||||
delete object2[value7];
|
||||
}
|
||||
value8 = value5();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r5 = value8;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
updateGuildState(guildId, _fun96222);
|
||||
}
|
||||
|
||||
function _fun96188() { // fn#96188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:2191, offset: 0x021577ec, size: 25 bytes, params: 1, frame: 3
|
||||
return {ids: env0_0, messages: env0_1};
|
||||
}
|
||||
|
||||
function value_96194(a0, a1) { // fn#96194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:3134, offset: 0x02157a61, size: 40 bytes, params: 3, frame: 3
|
||||
const value = environment.__proto__;
|
||||
const property = env1_13[a0];
|
||||
return property == null ? undefined : property.messages[a1];
|
||||
}
|
||||
|
||||
function value_96195(a0) { // fn#96195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:3224, offset: 0x02157a89, size: 74 bytes, params: 2, frame: 12
|
||||
var environment;
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
const property = env1_13[a0];
|
||||
if (property == null) {
|
||||
r0 = [];
|
||||
} else {
|
||||
value = property.ids.map(_fun96196);
|
||||
value = value.filter(function(a0) {
|
||||
return a0 != null;
|
||||
});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_96198(a0) { // fn#96198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:3341, offset: 0x02157ae9, size: 43 bytes, params: 2, frame: 4
|
||||
const value = environment.__proto__;
|
||||
const loading = env1_13[a0]?.loading;
|
||||
return loading != null && loading;
|
||||
}
|
||||
|
||||
function value_96199(a0) { // fn#96199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:3437, offset: 0x02157b14, size: 43 bytes, params: 2, frame: 4
|
||||
const value = environment.__proto__;
|
||||
const loaded = env1_13[a0]?.loaded;
|
||||
return loaded != null && loaded;
|
||||
}
|
||||
|
||||
function value_96200(a0) { // fn#96200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:3531, offset: 0x02157b3f, size: 43 bytes, params: 2, frame: 4
|
||||
const value = environment.__proto__;
|
||||
const hasMore = env1_13[a0]?.hasMore;
|
||||
return hasMore != null && hasMore;
|
||||
}
|
||||
|
||||
function _fun96204(a0) { // fn#96204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:4187, offset: 0x02157c63, size: 230 bytes, params: 2, frame: 22
|
||||
var r12;
|
||||
var r3;
|
||||
var r2;
|
||||
var r4;
|
||||
var object;
|
||||
var ids;
|
||||
var value2;
|
||||
var value6;
|
||||
var moduleValue;
|
||||
var messageRecord;
|
||||
var id;
|
||||
var value7;
|
||||
if (before != null) {
|
||||
ids = a0.ids;
|
||||
object = [];
|
||||
value2 = 0;
|
||||
arraySpread(object, ids, value2, undefined);
|
||||
r3 = object;
|
||||
r12 = value2;
|
||||
} else {
|
||||
r3 = [];
|
||||
}
|
||||
if (before != null) {
|
||||
object = {};
|
||||
copyDataProperties(object, a0.messages, r12);
|
||||
r2 = object;
|
||||
} else {
|
||||
r2 = {};
|
||||
}
|
||||
const value4 = _createForOfIteratorHelperLoose_96178(messages);
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
if (!done) {
|
||||
r4 = value5;
|
||||
while (true) {
|
||||
value6 = r4.value;
|
||||
moduleValue = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
||||
messageRecord = moduleValue.createMessageRecord(value6);
|
||||
id = messageRecord.id;
|
||||
if (r2[id] == null) {
|
||||
r3.push(messageRecord.id);
|
||||
}
|
||||
id = messageRecord.id;
|
||||
r2[id] = messageRecord;
|
||||
value7 = value4();
|
||||
done = value7.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r4 = value7;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return {'ids': null, 'messages': null, 'hasMore': null, 'loading': false, 'loaded': true, 'error': false, ids: r3,
|
||||
messages: r2, hasMore: hasMore};
|
||||
}
|
||||
|
||||
function _fun96207() { // fn#96207, offset: 0x02157d9b, size: 16 bytes, params: 1, frame: 1
|
||||
return {'loading': false, 'error': true};
|
||||
}
|
||||
|
||||
function _fun96211({messages, ids}) { // fn#96211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:5732, offset: 0x0215803a, size: 68 bytes, params: 2, frame: 14
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, messages, undefined);
|
||||
delete object3[id];
|
||||
const object4 = {};
|
||||
object4.ids = ids.filter(function(a0) {
|
||||
return a0 !== id;
|
||||
});
|
||||
object4.messages = object3;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun96218({messages, ids}) { // fn#96218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:7034, offset: 0x02158298, size: 68 bytes, params: 2, frame: 14
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, messages, undefined);
|
||||
delete object3[id];
|
||||
const object4 = {};
|
||||
object4.ids = ids.filter(function(a0) {
|
||||
return a0 !== id;
|
||||
});
|
||||
object4.messages = object3;
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun96222() { // fn#96222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:7474, offset: 0x021583d9, size: 25 bytes, params: 1, frame: 3
|
||||
return {ids: env0_1, messages: env0_2};
|
||||
}
|
||||
|
||||
function _fun96196(a0) { // fn#96196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12754:3276, offset: 0x02157ad3, size: 22 bytes, params: 2, frame: 2
|
||||
return env0_0.messages[a0];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
/* Metro module 11542; source: modules/messages/LegacyCommands.tsx; dependencies: [57, 6540, 4814, 661, 3829, 7874, 3855, 7151, 3795, 7067, 4863, 2] */
|
||||
function _fun88444(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:6, offset: 0x01fe332a, size: 502 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const executeCommand_88445 = function(a0, a1, a2, a3) {
|
||||
var defaultImport = importDefault(dependencyMap[10]);
|
||||
var SLASH_COMMAND_USED = AnalyticEvents.SLASH_COMMAND_USED;
|
||||
defaultImport.trackWithMetadata(SLASH_COMMAND_USED, {command: a0});
|
||||
return a1.action(a2, a3);
|
||||
};
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = constantsModule.AnalyticEvents;
|
||||
const env0_7 = constantsModule.MARKDOWN_SPOILER_WRAPPER;
|
||||
const env0_8 = constantsModule.ME;
|
||||
const env0_9 = RegExp('\\\\([*?+/])', 'g');
|
||||
object2 = {};
|
||||
object2.tts = {action: function() {
|
||||
var object = {};
|
||||
var EnableTTSCommand = require(dependencyMap[4]).EnableTTSCommand;
|
||||
object.tts = EnableTTSCommand.getSetting();
|
||||
return object;
|
||||
}};
|
||||
object2.me = {action: function(a0) {
|
||||
return {content: '_' + a0 + '_'};
|
||||
}};
|
||||
object2.tableflip = {action: function(a0) {
|
||||
var object = {};
|
||||
object.content = ('' + a0 + ' (╯°□°)╯︵ ┻━┻').trim();
|
||||
return object;
|
||||
}};
|
||||
object2.unflip = {action: function(a0) {
|
||||
var object = {};
|
||||
object.content = ('' + a0 + ' ┬─┬ノ( º _ ºノ)').trim();
|
||||
return object;
|
||||
}};
|
||||
object2.shrug = {action: function(a0) {
|
||||
var object = {};
|
||||
object.content = ('' + a0 + ' ¯\\_(ツ)_/¯').trim();
|
||||
return object;
|
||||
}};
|
||||
object2.nick = {action: action_88451};
|
||||
const object3 = {};
|
||||
object3.match = (importDefault(3855) /* metro dependency 3855 */).anyScopeRegex(RegExp('^\\+:(.+?): *$', ''));
|
||||
object3.action = action_88452;
|
||||
object2.reaction = object3;
|
||||
const object4 = {};
|
||||
object4.match = (importDefault(3855) /* metro dependency 3855 */).anyScopeRegex(RegExp('^s\\/([^\\/\\\\]*(?:\\\\.[^\\/\\\\]*)*)\\/([^\\/\\\\]*(?:\\\\.[^\\/\\\\]*)*)(?:\\/([g]*))?$',
|
||||
''));
|
||||
object4.action = action_88453;
|
||||
object2.searchReplace = object4;
|
||||
object2.spoiler = {action: action_88456};
|
||||
Object = global.Object;
|
||||
Object.setPrototypeOf(object2, null);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/LegacyCommands.tsx');
|
||||
exports.COMMANDS = object2;
|
||||
exports.handleLegacyCommands = handleLegacyCommands;
|
||||
}
|
||||
|
||||
function action_88451(a0, {channel}) { // fn#88451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:522, offset: 0x01fe3659, size: 90 bytes, params: 3, frame: 17
|
||||
var defaultImport;
|
||||
if (channel.guild_id != null) {
|
||||
defaultImport = importDefault(7874) /* metro dependency 7874: ChangeNicknameActionCreators */;
|
||||
defaultImport.changeNickname(channel.guild_id, channel.id, ME, a0);
|
||||
return {content: ''};
|
||||
}
|
||||
}
|
||||
|
||||
function action_88452(a0, {isEdit, channel}) { // fn#88452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:685, offset: 0x01fe36b3, size: 252 bytes, params: 3, frame: 20
|
||||
var getMessages;
|
||||
var value3;
|
||||
var value4;
|
||||
var getByName;
|
||||
var value5;
|
||||
var value6;
|
||||
var addReaction;
|
||||
var id2;
|
||||
var moduleValue;
|
||||
if (!isEdit) {
|
||||
var value;
|
||||
var hasPresent = MessageStore.hasPresent;
|
||||
var id = channel.id;
|
||||
if (Reflect.apply(hasPresent, MessageStore, [id])) {
|
||||
getMessages = MessageStore.getMessages;
|
||||
id = channel.id;
|
||||
value3 = Reflect.apply(getMessages, MessageStore, [id]).last();
|
||||
if (value3 == null) {
|
||||
return undefined;
|
||||
}
|
||||
id = value3.id;
|
||||
if (id == null) {
|
||||
return undefined;
|
||||
}
|
||||
value4 = EmojiStore.getDisambiguatedEmojiContext(channel.guild_id);
|
||||
getByName = value4.getByName;
|
||||
value5 = a0.trim();
|
||||
value6 = Reflect.apply(getByName, value4, [value5.slice(2, -1)]);
|
||||
if (value6 == null) {
|
||||
return undefined;
|
||||
}
|
||||
value = require(7151) /* metro dependency 7151: ReactionActionCreators */;
|
||||
addReaction = value.addReaction;
|
||||
id = channel.id;
|
||||
id2 = value3.id;
|
||||
moduleValue = require(3795) /* metro dependency 3795: ReactionUtils */;
|
||||
Reflect.apply(addReaction, value, [id, id2, moduleValue.toReactionEmoji(value6)]);
|
||||
return {content: ''};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function action_88453(a0, {isEdit, channel}) { // fn#88453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:1093, offset: 0x01fe37af, size: 450 bytes, params: 3, frame: 23
|
||||
var r8;
|
||||
var r5;
|
||||
if (isEdit) {
|
||||
return undefined;
|
||||
}
|
||||
var value;
|
||||
const lastEditableMessage = MessageStore.getLastEditableMessage(channel.id);
|
||||
if (lastEditableMessage != null) {
|
||||
if (lastEditableMessage.id == null) {
|
||||
return {content: ''};
|
||||
}
|
||||
var Array = global.Array;
|
||||
var value6 = env0_3(Array.from(a0.match(this.match.regex) ?? []), 4);
|
||||
value6[0];
|
||||
var property = value6[1];
|
||||
var property2 = value6[2];
|
||||
r8 = value6[3]?.split('');
|
||||
r8 = r8 ?? [];
|
||||
var replace = property.replace;
|
||||
var binding = env0_9;
|
||||
var value8 = Reflect.apply(replace, property, [binding, function(a0, a1) {
|
||||
return a1;
|
||||
}]);
|
||||
var value9 = property2.replace(binding, function(a0, a1) {
|
||||
return a1;
|
||||
});
|
||||
var value10 = r8.includes('g');
|
||||
var content = lastEditableMessage.content;
|
||||
r5 = value10 ? content.replaceAll(value8, value9) : content.replace(value8, value9);
|
||||
if (r5 == null) {
|
||||
if (lastEditableMessage.attachments.length !== 0) {
|
||||
if (r5 !== lastEditableMessage.content) {
|
||||
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
value.editMessage(channel.id, lastEditableMessage.id, {content: r5});
|
||||
}
|
||||
} else {
|
||||
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
value.deleteMessage(channel.id, lastEditableMessage.id);
|
||||
}
|
||||
} else if (r5.trim() !== '') {
|
||||
if (r5 !== lastEditableMessage.content) {
|
||||
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
value.editMessage(channel.id, lastEditableMessage.id, {content: r5});
|
||||
}
|
||||
} else if (lastEditableMessage.attachments.length !== 0) {
|
||||
if (r5 !== lastEditableMessage.content) {
|
||||
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
value.editMessage(channel.id, lastEditableMessage.id, {content: r5});
|
||||
}
|
||||
} else {
|
||||
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
value.deleteMessage(channel.id, lastEditableMessage.id);
|
||||
}
|
||||
}
|
||||
return {content: ''};
|
||||
}
|
||||
|
||||
function action_88456(a0) { // fn#88456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:1660, offset: 0x01fe3971, size: 35 bytes, params: 2, frame: 12
|
||||
const object2 = {};
|
||||
object2.content = MARKDOWN_SPOILER_WRAPPER(a0).trim();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function handleLegacyCommands(a0, a1) { // fn#88457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11728:1940, offset: 0x01fe3994, size: 115 bytes, params: 3, frame: 25
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var property;
|
||||
var match;
|
||||
var regex;
|
||||
var test;
|
||||
const properties = Object.keys(env0_10);
|
||||
const properties2 = 0;
|
||||
const properties3 = properties.length;
|
||||
if (properties === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
let r10 = properties2;
|
||||
loopExit1: while (true) {
|
||||
propertyName = properties[r10];
|
||||
propertyName2 = r10 + 1;
|
||||
if (propertyName === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
property = env0_10[propertyName];
|
||||
match = property.match;
|
||||
if (match == null) {
|
||||
r10 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
match = property.match;
|
||||
regex = match.regex;
|
||||
if (regex == null) {
|
||||
r10 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
test = regex.test;
|
||||
if (Reflect.apply(test, regex, [a0])) {
|
||||
break loopExit1;
|
||||
}
|
||||
r10 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
return executeCommand_88445(propertyName, property, a0, a1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
/* Metro module 4631; source: modules/messages/MediaFormatTesters.tsx; dependencies: [57, 477, 4632, 2] */
|
||||
function _fun39850(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:6, offset: 0x010edc53, size: 500 bytes, params: 8, frame: 19
|
||||
var regexp;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const closure = urlMatchesFileExtension;
|
||||
const env0_5 = RegExp('\\.(png|jpe?g|jfif|webp|gif|heic|heif|dng|avif)$', 'i');
|
||||
const env0_6 = RegExp('\\.(webp|gif|avif)$', 'i');
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isIOS()) {
|
||||
regexp = RegExp('\\.(mp3|m4a|wav|aif|aiff|ogg|opus|flac)$', 'i');
|
||||
} else {
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isAndroid()) {
|
||||
regexp = RegExp('\\.(mp3|m4a|wav|ogg|opus|flac)$', 'i');
|
||||
} else {
|
||||
regexp = RegExp('\\.(mp3|m4a|wav|aif|aiff|ogg|opus|flac)$', 'i');
|
||||
}
|
||||
}
|
||||
const env0_8 = RegExp('\\.(webm)$', 'i');
|
||||
const env0_9 = RegExp('\\.(riv)$', 'i');
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isIOS()) {
|
||||
regexp = RegExp('\\.(mp4|mov|qt)$', 'i');
|
||||
} else {
|
||||
(require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
regexp = RegExp('\\.(mp4|webm|mov|qt)$', 'i');
|
||||
}
|
||||
const closure2 = isWebPlayerVideoUrl;
|
||||
const closure3 = isWebPlayerVideoFile;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MediaFormatTesters.tsx');
|
||||
exports.urlMatchesFileExtension = closure;
|
||||
exports.isImageUrl = isImageUrl;
|
||||
exports.isImageFile = isImageFile;
|
||||
exports.isImageContentType = function(a0) {
|
||||
return contentTypeMatches(a0, 'image');
|
||||
};
|
||||
exports.isAnimatedImageUrl = isAnimatedImageUrl;
|
||||
exports.isAudioFile = isAudioFile;
|
||||
exports.isWebPlayerVideoUrl = closure2;
|
||||
exports.isVideoUrl = isVideoUrl;
|
||||
exports.isWebPlayerVideoFile = closure3;
|
||||
exports.isVideoFile = isVideoFile;
|
||||
exports.isRiveFile = isRiveFile;
|
||||
exports.isVideoContentType = function(a0) {
|
||||
return contentTypeMatches(a0, 'video');
|
||||
};
|
||||
}
|
||||
|
||||
function urlMatchesFileExtension(a0, a1) { // fn#39851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:130, offset: 0x010ede47, size: 84 bytes, params: 3, frame: 15
|
||||
if (a0 == null) {
|
||||
return false;
|
||||
}
|
||||
let value = a0.split(RegExp('\\?', ''), 1);
|
||||
value = env0_2(value, 2);
|
||||
const property = value[0];
|
||||
value[1];
|
||||
return a1.test(property);
|
||||
}
|
||||
|
||||
function contentTypeMatches(a0, a1) { // fn#39852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:238, offset: 0x010ede9b, size: 67 bytes, params: 3, frame: 13
|
||||
if (a0 == null) {
|
||||
return false;
|
||||
}
|
||||
let value = a0.split('/');
|
||||
value = env0_2(value, 2);
|
||||
const property = value[0];
|
||||
value[1];
|
||||
return property === a1;
|
||||
}
|
||||
|
||||
function isWebPlayerVideoUrl(a0) { // fn#39853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:687, offset: 0x010edede, size: 57 bytes, params: 2, frame: 14
|
||||
return (require(4632) /* metro dependency 4632: WebViewWebmSupportTestNative */).isIOSWithWebM() && urlMatchesFileExtension(a0,
|
||||
env0_8);
|
||||
}
|
||||
|
||||
function isWebPlayerVideoFile(a0) { // fn#39854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:765, offset: 0x010edf17, size: 69 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
let value = a0 != null;
|
||||
if (value) {
|
||||
value = require(4632) /* metro dependency 4632: WebViewWebmSupportTestNative */;
|
||||
value = value.isIOSWithWebM();
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
r0 = r0 && env0_8.test(a0);
|
||||
return r0;
|
||||
}
|
||||
|
||||
function isImageUrl(a0) { // fn#39855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:948, offset: 0x010edf5c, size: 24 bytes, params: 2, frame: 13
|
||||
return urlMatchesFileExtension(a0, env0_5);
|
||||
}
|
||||
|
||||
function isImageFile(a0) { // fn#39856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:994, offset: 0x010edf74, size: 31 bytes, params: 2, frame: 12
|
||||
return a0 != null && env0_5.test(a0);
|
||||
}
|
||||
|
||||
function isAnimatedImageUrl(a0) { // fn#39858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1091, offset: 0x010edfab, size: 24 bytes, params: 2, frame: 13
|
||||
return urlMatchesFileExtension(a0, env0_6);
|
||||
}
|
||||
|
||||
function isVideoUrl(a0) { // fn#39860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1214, offset: 0x010edfc3, size: 36 bytes, params: 2, frame: 14
|
||||
return urlMatchesFileExtension(a0, env0_10) || isWebPlayerVideoUrl(a0);
|
||||
}
|
||||
|
||||
function isVideoFile(a0) { // fn#39861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1328, offset: 0x010edfe7, size: 48 bytes, params: 2, frame: 13
|
||||
return a0 != null && (env0_10.test(a0) || isWebPlayerVideoFile(a0));
|
||||
}
|
||||
|
||||
function isRiveFile(a0) { // fn#39862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4809:1390, offset: 0x010ee017, size: 31 bytes, params: 2, frame: 12
|
||||
return a0 != null && env0_9.test(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/* Metro module 11558; source: modules/messages/MessageAttachmentUtils.tsx; dependencies: [3784, 661, 4838, 4841, 4840, 1391, 9587, 632, 3829, 11334, 1244, 2] */
|
||||
function _fun88572(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:6, offset: 0x01fe90a5, size: 221 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = getForumPostShouldObscure;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.MessageAttachmentFlags;
|
||||
const env0_5 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageAttachmentUtils.tsx');
|
||||
exports.getObscureReasonForAttachment = getObscureReasonForAttachment;
|
||||
exports.getObscureReasonForEmbed = getObscureReasonForEmbed;
|
||||
exports.getObscureReasonForUnfurledMediaItem = getObscureReasonForUnfurledMediaItem;
|
||||
exports.getForumPostShouldObscure = closure;
|
||||
exports.useShouldObscure = useShouldObscure;
|
||||
exports.getObscuredAlt = getObscuredAlt;
|
||||
}
|
||||
|
||||
function getForumPostShouldObscure(a0, a1, a2) { // fn#88573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:159, offset: 0x01fe9182, size: 540 bytes, params: 4, frame: 19
|
||||
var r0;
|
||||
var items;
|
||||
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
|
||||
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
|
||||
let value = null;
|
||||
if (value == a0) {
|
||||
return [false, undefined];
|
||||
}
|
||||
const type = a0.type;
|
||||
const ForumPostMediaTypes = (require(9587) /* metro dependency 9587: ForumPostMediaUtils */).ForumPostMediaTypes;
|
||||
const EMBED = ForumPostMediaTypes.EMBED;
|
||||
const r6 = EMBED === type ? {type: ObscuredMediaTypes.Embed,
|
||||
media: a0} : ForumPostMediaTypes.ATTACHMENT === type ? {type: ObscuredMediaTypes.Attachment,
|
||||
media: a0} : ForumPostMediaTypes.COMPONENT !== type ? value : {type: ObscuredMediaTypes.GenericMedia,
|
||||
media: a0.srcUnfurledMediaItem};
|
||||
if (value == r6) {
|
||||
return [false, undefined];
|
||||
}
|
||||
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
||||
value = value.getMediaObscuredReasonFromBitmask(r6, a2);
|
||||
if (value.length > 0) {
|
||||
r0 = [true, value[0]];
|
||||
} else {
|
||||
items = [];
|
||||
if ((require(4838) /* metro dependency 4838: ObscuredMediaUtils */).isMediaScanPending(r6, a2)) {
|
||||
items[0] = true;
|
||||
items[1] = ObscureReason.POTENTIAL_EXPLICIT_CONTENT;
|
||||
r0 = items;
|
||||
} else if (a0.spoiler) {
|
||||
items[0] = a1;
|
||||
items[1] = ObscureReason.SPOILER;
|
||||
r0 = items;
|
||||
} else {
|
||||
items[0] = false;
|
||||
items[1] = undefined;
|
||||
r0 = items;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getObscureReasonForAttachment(a0, a1) { // fn#88574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:1000, offset: 0x01fe939e, size: 292 bytes, params: 3, frame: 24
|
||||
var object2;
|
||||
var SPOILER;
|
||||
var r0;
|
||||
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
|
||||
const spoiler = a0.spoiler;
|
||||
const flags = a0.flags;
|
||||
let value = 0;
|
||||
const r7 = flags === undefined ? value : flags;
|
||||
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
||||
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
|
||||
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
|
||||
let Attachment = ObscuredMediaTypes.Attachment;
|
||||
const value3 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: Attachment,
|
||||
media: a0}, a1]);
|
||||
const moduleValue2 = obscuredMediaUtilsModule;
|
||||
const isMediaScanPending = moduleValue2.isMediaScanPending;
|
||||
object2 = {};
|
||||
Attachment = ObscuredMediaTypes.Attachment;
|
||||
object2.type = Attachment;
|
||||
object2.media = a0;
|
||||
if (value3.length > value) {
|
||||
r0 = value3[value];
|
||||
} else if (Reflect.apply(isMediaScanPending, moduleValue2, [object2, a1])) {
|
||||
r0 = ObscureReason.POTENTIAL_EXPLICIT_CONTENT;
|
||||
} else {
|
||||
if (spoiler) {
|
||||
SPOILER = ObscureReason.SPOILER;
|
||||
} else {
|
||||
value = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
value = value.hasFlag(r7, MessageAttachmentFlags.IS_SPOILER);
|
||||
SPOILER = value ? ObscureReason.SPOILER : null;
|
||||
}
|
||||
r0 = SPOILER;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getObscureReasonForEmbed(a0, {author}, a2, a3) { // fn#88575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:1408, offset: 0x01fe94c2, size: 256 bytes, params: 5, frame: 21
|
||||
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
|
||||
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
||||
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
|
||||
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
|
||||
const Embed = ObscuredMediaTypes.Embed;
|
||||
const value2 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: Embed, media: a0},
|
||||
a3]);
|
||||
let r0 = !author.bot && obscuredMediaUtilsModule.isMediaScanPending({type: ObscuredMediaTypes.Embed, media: a0}, a3);
|
||||
r0 = value2.length > 0 ? value2[0] : r0 ? ObscureReason.POTENTIAL_EXPLICIT_CONTENT : a2 ? ObscureReason.SPOILER : null;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getObscureReasonForUnfurledMediaItem(a0, a1) { // fn#88576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:1765, offset: 0x01fe95c2, size: 461 bytes, params: 3, frame: 22
|
||||
const value = a2;
|
||||
const value2 = a3;
|
||||
const r2 = value !== undefined ? value : false;
|
||||
let r0 = value2 !== undefined ? value2 : false;
|
||||
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
||||
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
|
||||
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
|
||||
const GenericMedia = ObscuredMediaTypes.GenericMedia;
|
||||
const value3 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: GenericMedia,
|
||||
media: a0}, a1]);
|
||||
r0 = !r0 && obscuredMediaUtilsModule.isMediaScanPending({type: ObscuredMediaTypes.GenericMedia, media: a0}, a1);
|
||||
const includes = value3.includes;
|
||||
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
|
||||
const EXPLICIT_CONTENT = ObscureReason.EXPLICIT_CONTENT;
|
||||
r0 = Reflect.apply(includes, value3,
|
||||
[EXPLICIT_CONTENT]) ? ObscureReason.EXPLICIT_CONTENT : value3.includes(ObscureReason.GORE_CONTENT) ? ObscureReason.GORE_CONTENT : value3.includes(ObscureReason.SELF_HARM_CONTENT) ? ObscureReason.SELF_HARM_CONTENT : r0 ? ObscureReason.POTENTIAL_EXPLICIT_CONTENT : r2 ? ObscureReason.SPOILER : null;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useShouldObscure({channel, media}) { // fn#88577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:2413, offset: 0x01fe978f, size: 188 bytes, params: 2, frame: 20
|
||||
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([PermissionStore],
|
||||
_fun88578);
|
||||
const RenderSpoilers = (require(3829) /* metro dependency 3829: UserSettings */).RenderSpoilers;
|
||||
const value3 = RenderSpoilers.useSetting();
|
||||
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
||||
const getEnabledHarmTypesBitmaskForChannelType = obscuredMediaUtilsModule.getEnabledHarmTypesBitmaskForChannelType;
|
||||
const ContentHarmTypeChannel = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ContentHarmTypeChannel;
|
||||
const GUILD = ContentHarmTypeChannel.GUILD;
|
||||
return getForumPostShouldObscure(media,
|
||||
!(importDefault(11334) /* metro dependency 11334: computeGlobalSpoilerDisplay */)(value3, value2),
|
||||
Reflect.apply(getEnabledHarmTypesBitmaskForChannelType, obscuredMediaUtilsModule, [GUILD]));
|
||||
}
|
||||
|
||||
function getObscuredAlt(a0) { // fn#88579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:2737, offset: 0x01fe987e, size: 269 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
|
||||
const EXPLICIT_CONTENT = ObscureReason.EXPLICIT_CONTENT;
|
||||
if (EXPLICIT_CONTENT === a0) {
|
||||
return intl.string(t.SEgHFh);
|
||||
}
|
||||
const GORE_CONTENT = ObscureReason.GORE_CONTENT;
|
||||
if (GORE_CONTENT === a0) {
|
||||
return intl.string(t.SEgHFh);
|
||||
}
|
||||
const SELF_HARM_CONTENT = ObscureReason.SELF_HARM_CONTENT;
|
||||
if (SELF_HARM_CONTENT === a0) {
|
||||
return intl.string(t.SEgHFh);
|
||||
}
|
||||
const SPOILER = ObscureReason.SPOILER;
|
||||
if (SPOILER === a0) {
|
||||
return intl.string(t['XpfDH+']);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun88578() { // fn#88578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11744:2498, offset: 0x01fe984b, size: 51 bytes, params: 1, frame: 14
|
||||
return channel != null && PermissionStore.can(Permissions.MANAGE_MESSAGES, channel);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
/* Metro module 4503; source: modules/messages/MessageConstants.tsx; dependencies: [661, 672, 561, 2] */
|
||||
function _fun38545(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4681:6, offset: 0x010c28d0, size: 928 bytes, params: 8, frame: 25
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(661) /* metro dependency 661: Constants */).ChannelStreamTypes;
|
||||
Object = global.Object;
|
||||
const value = Object.freeze({'referencedAvatarProfile': false, 'referencedUsernameProfile': false,
|
||||
'interactionAvatarProfile': false, 'interactionUsernameProfile': false, 'interactionData': false,
|
||||
'avatarProfile': false, 'usernameProfile': false, 'emojiPicker': false, 'emojiBurstPicker': false,
|
||||
'moreUtilities': false, 'contextMenu': false});
|
||||
const object = {};
|
||||
const object2 = {};
|
||||
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
let SECOND = Millis.SECOND;
|
||||
object2.response = 10 * SECOND;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const MINUTE = Millis.MINUTE;
|
||||
object2.deadline = 1 * MINUTE;
|
||||
object.timeout = object2;
|
||||
const backoff = importDefault(561) /* metro dependency 561: Backoff */;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
SECOND = Millis.SECOND;
|
||||
const value3 = 0.5 * SECOND;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
SECOND = Millis.SECOND;
|
||||
const value4 = 60 * SECOND;
|
||||
const value5 = Object.create(backoff.prototype, {constructor: {value: backoff}});
|
||||
const backoff2 = new backoff(value3, value4);
|
||||
object.backoff = backoff2 instanceof Object ? backoff2 : value5;
|
||||
object.retries = 8;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageConstants.tsx');
|
||||
exports.MESSAGE_GROUP_SPACING = [0, 4, 8, 16, 24];
|
||||
exports.DEFAULT_COZY_SPACING = 16;
|
||||
exports.DEFAULT_COMPACT_SPACING = 0;
|
||||
exports.DEFAULT_POPOUTS = value;
|
||||
exports.MESSAGE_PADDING = 16;
|
||||
exports.PLACEHOLDER_BUFFER = 16;
|
||||
exports.NEW_MESSAGE_BAR_BUFFER = 32;
|
||||
exports.NEW_MESSAGE_BAR_BUFFER_LARGE = 64;
|
||||
exports.NEW_MESSAGE_BAR_ID = '---new-messages-bar';
|
||||
exports.SPOILER_ATTACHMENT_PREFIX = 'SPOILER_';
|
||||
exports.DEFAULT_GUILD_OFFICIAL_COLOR = 3447003;
|
||||
exports.GUILD_OFFICIAL_HIGHLIGHT_ALPHA_COLOR = 687865856;
|
||||
exports.GUILD_OFFICIAL_HIGHLIGHT_ALPHA = 0.16;
|
||||
exports.FileUploadErrorTypes = {ERROR_SOURCE_UNKNOWN: 'ERROR_SOURCE_UNKNOWN',
|
||||
PRECOMPRESSION_SUM_TOO_LARGE: 'PRECOMPRESSION_SUM_TOO_LARGE',
|
||||
PRECOMPRESSION_INDIVIDUAL_FILE_TOO_LARGE: 'PRECOMPRESSION_INDIVIDUAL_FILE_TOO_LARGE',
|
||||
POSTCOMPRESSION_SUM_TOO_LARGE: 'POSTCOMPRESSION_SUM_TOO_LARGE',
|
||||
POSTCOMPRESSION_INDIVIDUAL_FILE_TOO_LARGE: 'POSTCOMPRESSION_INDIVIDUAL_FILE_TOO_LARGE',
|
||||
UPLOAD_ATTACHMENT_MAX_SIZE_ERROR: 'UPLOAD_MESSAGE_ATTACHMENT_MAX_SIZE_ERROR',
|
||||
EXPLICIT_CONTENT: 'EXPLICIT_CONTENT'};
|
||||
exports.MessageTagTypes = {SYSTEM_DM_TAG_SYSTEM_TYPE: 'a', BOT_TAG_SERVER_TYPE: 'b', BOT_TAG_BOT_TYPE: 'd',
|
||||
POLL_TYPE: 'g'};
|
||||
exports.DEFAULT_MOBILE_PRE_COMPRESSION_MAX_ATTACHMENT_SIZE = 209715200;
|
||||
exports.isChannelStreamMessage = function({type}) {
|
||||
return type === ChannelStreamTypes.MESSAGE;
|
||||
};
|
||||
exports.MESSAGE_HTTP_TIMEOUT_RETRY_OPTIONS = object;
|
||||
exports.MessageSendLocation = {PUSH_NOTIFICATION: 'push_notification', CHAT_INPUT: 'chat_input',
|
||||
SHARE_MODAL: 'share_modal', VOICE_MESSAGE: 'voice_message', THREAD_CREATION: 'thread_creation',
|
||||
FORWARDING: 'forwarding', USER_PROFILE: 'user_profile', RETRY: 'explicit_retry', OVERLAY: 'overlay',
|
||||
ACTIVITY_SHARE: 'activity_share', ICYMI: 'icymi', INSTANT_UPLOAD: 'instant_upload', APP_COMMAND: 'app_command',
|
||||
PRIVATE_MESSAGE_COMMAND: 'private_message_command', POLL_CREATION: 'poll_creation',
|
||||
SHARE_CUSTOM_THEME: 'share_custom_theme', GIF_REPLY: 'gif_reply', STICKER_REPLY: 'sticker_reply',
|
||||
SEND_WAVE: 'send_wave', GIFTING: 'gifting', CONTENT_INVENTORY_MEMBERLIST: 'content_inventory_memberlist',
|
||||
GREET: 'greet', SOCIAL_LAYER_STOREFRONT: 'social_layer_storefront', MEDIA_MENTION: 'media_mention',
|
||||
OTHER: 'other'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,805 @@
|
||||
/* Metro module 9597; source: modules/messages/MessageManager.tsx; dependencies: [6, 7, 15, 17, 18, 4257, 1383, 4791, 1379, 1867, 4605, 1934, 3969, 661, 1386, 672, 3, 4816, 9598, 4044, 8876, 7067, 9599, 587, 3974, 1230, 4793, 4647, 1244, 694, 4860, 2] */
|
||||
function _fun75202(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:6, offset: 0x01da5e5a, size: 734 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const handleChannelSelect_75209 = function(a0) {
|
||||
var guildId = a0.guildId;
|
||||
var channelId = a0.channelId;
|
||||
var messageId = a0.messageId;
|
||||
var jumpType = a0.jumpType;
|
||||
if (a0.skipMessageFetch) {
|
||||
return false;
|
||||
}
|
||||
fetchMessages_75206({guildId: guildId, channelId: channelId, messageId: messageId, jumpType: jumpType});
|
||||
maybeLoadChannelSplitView(guildId, channelId);
|
||||
};
|
||||
const handleVoiceChannelSelect = function({guildId, channelId}) {
|
||||
fetchMessages_75206({guildId: guildId, channelId: channelId});
|
||||
};
|
||||
const handleJumpToVoiceChannelMessage = function({guildId, channelId, messageId, jumpType}) {
|
||||
fetchMessages_75206({guildId: guildId, channelId: channelId, messageId: messageId, jumpType: jumpType});
|
||||
};
|
||||
const maybeLoadChannelSplitView = function(a0, a1) {
|
||||
var fetchMessages_75206Binding;
|
||||
var object;
|
||||
var value2 = ChannelSectionStore.getCurrentSidebarChannelId(a1);
|
||||
if (value2 != null) {
|
||||
fetchMessages_75206Binding = fetchMessages_75206;
|
||||
object = {guildId: a0, channelId: value2};
|
||||
object.messageId = ChannelSectionStore.getCurrentSidebarMessageId(a1);
|
||||
fetchMessages_75206Binding(object);
|
||||
}
|
||||
};
|
||||
const handleChannelSectionStoreChange = function() {
|
||||
var value2 = SelectedChannelStore.getChannelId();
|
||||
var value3 = SelectedGuildStore.getGuildId();
|
||||
if (value3 != null) {
|
||||
if (value2 != null) {
|
||||
if (ChannelSectionStore.getSidebarState(value2)?.type !== require(dependencyMap[26]).SidebarType.VIEW_CHANNEL) {
|
||||
maybeLoadChannelSplitView(value3, value2);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleChannelPreload = function({guildId, channelId, context}) {
|
||||
if (context === CURRENT_APP_CONTEXT) {
|
||||
fetchMessages_75206({guildId: guildId, channelId: channelId});
|
||||
maybeLoadChannelSplitView(guildId, channelId);
|
||||
}
|
||||
};
|
||||
const handleAppWillBecomeActive = function() {
|
||||
var value2 = SelectedChannelStore.getChannelId();
|
||||
if (value2 == null) {
|
||||
return false;
|
||||
}
|
||||
importDefault(dependencyMap[21]).fetchNewLocalMessages(value2, MAX_MESSAGES_PER_CHANNEL);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
||||
const env0_9 = (require(1383) /* metro dependency 1383: ChannelRecord */).isTextChannel;
|
||||
const channelSectionStore = importDefault(4791) /* metro dependency 4791: ChannelSectionStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_16 = value.MAX_MESSAGES_PER_CHANNEL;
|
||||
const env0_17 = value.CURRENT_APP_CONTEXT;
|
||||
const env0_18 = value.ChannelTypes;
|
||||
const env0_19 = value.AbortCodes;
|
||||
const env0_20 = value.Routes;
|
||||
const env0_21 = value.ChannelTypesSets;
|
||||
const env0_22 = (require(1386) /* metro dependency 1386: ChannelConstants */).isStaticChannelRoute;
|
||||
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const SECOND = Millis.SECOND;
|
||||
const env0_23 = 10 * SECOND;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('MessageManager');
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const DAY = Millis.DAY;
|
||||
const env0_26 = 90 * DAY;
|
||||
const env0_28 = {};
|
||||
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun75220(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_75203() { // fn#75203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:405, offset: 0x01da6138, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_75203_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function fetchMessages_75206({guildId, channelId, messageId, forceFetch, isPreload, jumpType, skipLocalFetch, avoidInitialScroll, fetchKey}) { // fn#75206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:664, offset: 0x01da619a, size: 1598 bytes, params: 2, frame: 31
|
||||
var type;
|
||||
var r17;
|
||||
var r1;
|
||||
var r16;
|
||||
var r8;
|
||||
var r13;
|
||||
var r10;
|
||||
var r15;
|
||||
var value;
|
||||
var isStaticChannelRouteBinding;
|
||||
var value2;
|
||||
var getChannel;
|
||||
var value3;
|
||||
var GUILD_STORE;
|
||||
var GUILD_THREADS_ONLY;
|
||||
var has;
|
||||
var defaultImport;
|
||||
var getOrCreate;
|
||||
var value4;
|
||||
var some;
|
||||
var messageHasExpiredAttachmentUrl;
|
||||
var binding;
|
||||
var log;
|
||||
var defaultImport2;
|
||||
var clear;
|
||||
var defaultImport3;
|
||||
var value5;
|
||||
var jumpTargetId;
|
||||
var value6;
|
||||
var value7;
|
||||
var mutate;
|
||||
var object2;
|
||||
const JumpTypes = (require(4044) /* metro dependency 4044: Client */).JumpTypes;
|
||||
var ANIMATED;
|
||||
var value8;
|
||||
var defaultImport4;
|
||||
var commit;
|
||||
var focusTargetId;
|
||||
var value9;
|
||||
var value10;
|
||||
var value11;
|
||||
var defaultImport5;
|
||||
var isConnected;
|
||||
var loadingMore;
|
||||
var value12;
|
||||
var ready;
|
||||
var cached;
|
||||
var value13;
|
||||
var getGuild;
|
||||
var value14;
|
||||
var value15;
|
||||
var value16;
|
||||
var value17;
|
||||
var hasUnread;
|
||||
var hasUnread2;
|
||||
var value18;
|
||||
var defaultImport6;
|
||||
var value19;
|
||||
var jumpToMessage;
|
||||
var isThread;
|
||||
var hasOpenedThread;
|
||||
var hasOpenedThread2;
|
||||
var value20;
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
var get;
|
||||
var value21;
|
||||
var Date;
|
||||
var now;
|
||||
var value22;
|
||||
var value23;
|
||||
var properties;
|
||||
var properties2;
|
||||
var properties3;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var set;
|
||||
var hasTrackedUnread;
|
||||
var id;
|
||||
var getTrackedAckMessageId;
|
||||
var value24;
|
||||
var concat;
|
||||
var defaultImport7;
|
||||
var fetchMessages;
|
||||
var getMessageLimit;
|
||||
var defaultImport8;
|
||||
var defaultImport9;
|
||||
if (channelId != null) {
|
||||
value = environment;
|
||||
isStaticChannelRouteBinding = isStaticChannelRoute;
|
||||
value2 = undefined;
|
||||
reducibleJoin59: while (true) {
|
||||
if (isStaticChannelRouteBinding(channelId)) {
|
||||
break reducibleJoin59;
|
||||
}
|
||||
getChannel = ChannelStore.getChannel;
|
||||
value3 = Reflect.apply(getChannel, ChannelStore, [channelId]);
|
||||
reducibleJoin4: while (true) {
|
||||
if (value3 == null) {
|
||||
type = value2;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
type = value3.type;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
GUILD_STORE = ChannelTypes.GUILD_STORE;
|
||||
if (type === GUILD_STORE) {
|
||||
break reducibleJoin59;
|
||||
}
|
||||
reducibleJoin7: while (true) {
|
||||
if (value3 == null) {
|
||||
type = value2;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
type = value3.type;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
if (type != null) {
|
||||
GUILD_THREADS_ONLY = ChannelTypesSets.GUILD_THREADS_ONLY;
|
||||
has = GUILD_THREADS_ONLY.has;
|
||||
type = value3.type;
|
||||
reducibleJoin9: while (true) {
|
||||
if (Reflect.apply(has, GUILD_THREADS_ONLY, [type])) {
|
||||
break reducibleJoin59;
|
||||
}
|
||||
break reducibleJoin9;
|
||||
}
|
||||
}
|
||||
defaultImport = importDefault(4816) /* metro dependency 4816: ChannelMessages */;
|
||||
getOrCreate = defaultImport.getOrCreate;
|
||||
value4 = Reflect.apply(getOrCreate, defaultImport, [channelId]);
|
||||
some = value4.some;
|
||||
messageHasExpiredAttachmentUrl = (require(9598) /* metro dependency 9598: SignedAttachmentLinkUtils */).messageHasExpiredAttachmentUrl;
|
||||
reducibleJoin11: while (true) {
|
||||
if (Reflect.apply(some, value4, [messageHasExpiredAttachmentUrl])) {
|
||||
binding = env0_24;
|
||||
log = binding.log;
|
||||
Reflect.apply(log, binding, ['Found expired attachment link, clearing messages']);
|
||||
defaultImport2 = importDefault(4816) /* metro dependency 4816: ChannelMessages */;
|
||||
clear = defaultImport2.clear;
|
||||
Reflect.apply(clear, defaultImport2, [channelId]);
|
||||
defaultImport3 = importDefault(4816) /* metro dependency 4816: ChannelMessages */;
|
||||
getOrCreate = defaultImport3.getOrCreate;
|
||||
value5 = Reflect.apply(getOrCreate, defaultImport3, [channelId]);
|
||||
r17 = value5;
|
||||
break reducibleJoin11;
|
||||
}
|
||||
r17 = value4;
|
||||
break reducibleJoin11;
|
||||
}
|
||||
jumpTargetId = r17.jumpTargetId;
|
||||
value6 = jumpTargetId != null;
|
||||
reducibleJoin13: while (true) {
|
||||
if (value6) {
|
||||
value7 = messageId == null;
|
||||
r1 = value7;
|
||||
break reducibleJoin13;
|
||||
}
|
||||
r1 = value6;
|
||||
break reducibleJoin13;
|
||||
}
|
||||
reducibleJoin15: while (true) {
|
||||
if (r1) {
|
||||
mutate = r17.mutate;
|
||||
ANIMATED = JumpTypes.ANIMATED;
|
||||
value8 = Reflect.apply(mutate, r17, [{'jumpTargetId': null, 'jumped': false, jumpType: ANIMATED}]);
|
||||
defaultImport4 = importDefault(4816) /* metro dependency 4816: ChannelMessages */;
|
||||
commit = defaultImport4.commit;
|
||||
Reflect.apply(commit, defaultImport4, [value8]);
|
||||
r16 = value8;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
r16 = r17;
|
||||
break reducibleJoin15;
|
||||
}
|
||||
focusTargetId = r16.focusTargetId;
|
||||
value9 = focusTargetId != null;
|
||||
reducibleJoin17: while (true) {
|
||||
if (value9) {
|
||||
value10 = messageId == null;
|
||||
r8 = value10;
|
||||
break reducibleJoin17;
|
||||
}
|
||||
r8 = value9;
|
||||
break reducibleJoin17;
|
||||
}
|
||||
reducibleJoin19: while (true) {
|
||||
if (r8) {
|
||||
mutate = r16.mutate;
|
||||
value11 = Reflect.apply(mutate, r16, [{focusTargetId: null}]);
|
||||
defaultImport5 = importDefault(4816) /* metro dependency 4816: ChannelMessages */;
|
||||
commit = defaultImport5.commit;
|
||||
Reflect.apply(commit, defaultImport5, [value11]);
|
||||
r1 = value11;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
r1 = r16;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
reducibleJoin31: while (true) {
|
||||
reducibleJoin29: while (true) {
|
||||
if (isPreload) {
|
||||
isConnected = GatewayConnectionStore.isConnected;
|
||||
if (!Reflect.apply(isConnected, GatewayConnectionStore, [])) {
|
||||
loadingMore = r1.loadingMore;
|
||||
value12 = true;
|
||||
if (!loadingMore) {
|
||||
r8 = value12;
|
||||
break reducibleJoin31;
|
||||
}
|
||||
}
|
||||
loadingMore = r1.loadingMore;
|
||||
if (loadingMore) {
|
||||
break reducibleJoin29;
|
||||
}
|
||||
if (r1.ready) {
|
||||
cached = r1.cached;
|
||||
if (!cached) {
|
||||
break reducibleJoin29;
|
||||
}
|
||||
}
|
||||
value13 = guildId != null;
|
||||
reducibleJoin27: while (true) {
|
||||
if (value13) {
|
||||
getGuild = GuildStore.getGuild;
|
||||
value14 = Reflect.apply(getGuild, GuildStore, [guildId]) == null;
|
||||
r13 = value14;
|
||||
break reducibleJoin27;
|
||||
}
|
||||
r13 = value13;
|
||||
break reducibleJoin27;
|
||||
}
|
||||
if (r13) {
|
||||
r8 = forceFetch;
|
||||
break reducibleJoin31;
|
||||
}
|
||||
r8 = true;
|
||||
break reducibleJoin31;
|
||||
}
|
||||
loadingMore = r1.loadingMore;
|
||||
if (loadingMore) {
|
||||
break reducibleJoin29;
|
||||
}
|
||||
ready = r1.ready;
|
||||
if (ready) {
|
||||
cached = r1.cached;
|
||||
if (!cached) {
|
||||
break reducibleJoin29;
|
||||
}
|
||||
}
|
||||
value13 = guildId != null;
|
||||
reducibleJoin27: while (true) {
|
||||
if (value13) {
|
||||
getGuild = GuildStore.getGuild;
|
||||
value14 = Reflect.apply(getGuild, GuildStore, [guildId]) == null;
|
||||
r13 = value14;
|
||||
break reducibleJoin27;
|
||||
}
|
||||
r13 = value13;
|
||||
break reducibleJoin27;
|
||||
}
|
||||
if (r13) {
|
||||
r8 = forceFetch;
|
||||
break reducibleJoin31;
|
||||
}
|
||||
value15 = true;
|
||||
r8 = value15;
|
||||
break reducibleJoin31;
|
||||
}
|
||||
if (messageId == null) {
|
||||
r8 = forceFetch;
|
||||
break reducibleJoin31;
|
||||
}
|
||||
value16 = true;
|
||||
r8 = value16;
|
||||
break reducibleJoin31;
|
||||
}
|
||||
value17 = (importDefault(8876) /* metro dependency 8876: isChangelogChannel */)(channelId);
|
||||
reducibleJoin33: while (true) {
|
||||
if (value17) {
|
||||
hasUnread = ReadStateStore.hasUnread;
|
||||
hasUnread2 = Reflect.apply(hasUnread, ReadStateStore, [channelId]);
|
||||
r10 = hasUnread2;
|
||||
break reducibleJoin33;
|
||||
}
|
||||
r10 = value17;
|
||||
break reducibleJoin33;
|
||||
}
|
||||
reducibleJoin35: while (true) {
|
||||
if (r10) {
|
||||
value18 = true;
|
||||
r8 = value18;
|
||||
break reducibleJoin35;
|
||||
}
|
||||
break reducibleJoin35;
|
||||
}
|
||||
if (r8) {
|
||||
defaultImport6 = importDefault(4816) /* metro dependency 4816: ChannelMessages */;
|
||||
commit = defaultImport6.commit;
|
||||
mutate = r1.mutate;
|
||||
object2 = {};
|
||||
value19 = true;
|
||||
object2.loadingMore = value19;
|
||||
Reflect.apply(commit, defaultImport6, [Reflect.apply(mutate, r1, [object2])]);
|
||||
if (messageId == null) {
|
||||
if (value3 != null) {
|
||||
isThread = value3.isThread;
|
||||
reducibleJoin52: while (true) {
|
||||
if (Reflect.apply(isThread, value3, [])) {
|
||||
hasOpenedThread = ReadStateStore.hasOpenedThread;
|
||||
hasOpenedThread2 = Reflect.apply(hasOpenedThread, ReadStateStore, [channelId]);
|
||||
value20 = false;
|
||||
reducibleJoin51: while (true) {
|
||||
if (hasOpenedThread2) {
|
||||
r10 = value20;
|
||||
break reducibleJoin51;
|
||||
}
|
||||
reducibleJoin45: while (true) {
|
||||
if (env0_25 != null) {
|
||||
break reducibleJoin45;
|
||||
}
|
||||
get = Storage.get;
|
||||
binding = env0_27;
|
||||
value21 = Reflect.apply(get, Storage, [binding, {}]);
|
||||
reducibleJoin44: while (true) {
|
||||
if (value21 != null) {
|
||||
r13 = value21;
|
||||
break reducibleJoin44;
|
||||
}
|
||||
r13 = {};
|
||||
break reducibleJoin44;
|
||||
}
|
||||
env0_25 = r13;
|
||||
break reducibleJoin45;
|
||||
}
|
||||
if (channelId in env0_25) {
|
||||
r10 = value20;
|
||||
break reducibleJoin51;
|
||||
}
|
||||
binding = env0_25;
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
binding[channelId] = Reflect.apply(now, Date, []);
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
value22 = Reflect.apply(now, Date, []);
|
||||
value23 = value22 - env0_26;
|
||||
binding = env0_25;
|
||||
properties = Object.keys(binding);
|
||||
properties2 = 0;
|
||||
properties3 = properties.length;
|
||||
if (properties !== value2) {
|
||||
r15 = properties2;
|
||||
reducibleLoop47: while (true) {
|
||||
propertyName = properties[r15];
|
||||
propertyName2 = r15 + 1;
|
||||
if (propertyName === value2) {
|
||||
break reducibleLoop47;
|
||||
}
|
||||
if (env0_25[propertyName] < value23) {
|
||||
delete env0_25[propertyName];
|
||||
r15 = propertyName2;
|
||||
continue reducibleLoop47;
|
||||
}
|
||||
r15 = propertyName2;
|
||||
continue reducibleLoop47;
|
||||
}
|
||||
}
|
||||
set = Storage.set;
|
||||
binding = env0_27;
|
||||
Reflect.apply(set, Storage, [binding, env0_25]);
|
||||
r10 = value19;
|
||||
break reducibleJoin51;
|
||||
}
|
||||
if (r10) {
|
||||
binding = env0_24;
|
||||
log = binding.log;
|
||||
id = value3.id;
|
||||
concat = global.HermesInternal.concat;
|
||||
Reflect.apply(log, binding, ['Jumping to start of thread ' + id]);
|
||||
defaultImport9 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
fetchMessages = defaultImport9.fetchMessages;
|
||||
object2 = {channelId: channelId};
|
||||
value = require(9599) /* metro dependency 9599: getAdaptiveMessageLimitNative */;
|
||||
object2.limit = value.getMessageLimit('MessageManager.threadStart');
|
||||
object2.jump = {messageId: channelId, flash: value20};
|
||||
object2.isPreload = isPreload;
|
||||
object2.skipLocalFetch = skipLocalFetch;
|
||||
object2.avoidInitialScroll = avoidInitialScroll;
|
||||
object2.fetchKey = fetchKey;
|
||||
return Reflect.apply(fetchMessages, defaultImport9, [object2]);
|
||||
}
|
||||
break reducibleJoin52;
|
||||
}
|
||||
break reducibleJoin52;
|
||||
}
|
||||
}
|
||||
if (value3 != null) {
|
||||
isThread = value3.isThread;
|
||||
reducibleJoin57: while (true) {
|
||||
if (Reflect.apply(isThread, value3, [])) {
|
||||
hasTrackedUnread = ReadStateStore.hasTrackedUnread;
|
||||
id = value3.id;
|
||||
if (Reflect.apply(hasTrackedUnread, ReadStateStore, [id])) {
|
||||
ready = r1.ready;
|
||||
if (!ready) {
|
||||
getTrackedAckMessageId = ReadStateStore.getTrackedAckMessageId;
|
||||
id = value3.id;
|
||||
value24 = Reflect.apply(getTrackedAckMessageId, ReadStateStore, [id]);
|
||||
binding = env0_24;
|
||||
log = binding.log;
|
||||
id = value3.id;
|
||||
concat = global.HermesInternal.concat;
|
||||
Reflect.apply(log, binding,
|
||||
['Jumping to most recent message in thread ' + id + ' - ' + value24]);
|
||||
defaultImport7 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
fetchMessages = defaultImport7.fetchMessages;
|
||||
object2 = {channelId: channelId};
|
||||
value = require(9599) /* metro dependency 9599: getAdaptiveMessageLimitNative */;
|
||||
object2.limit = value.getMessageLimit('MessageManager.threadUnread');
|
||||
object2.jump = {'messageId': null, 'flash': false, 'offset': 1,
|
||||
messageId: value24};
|
||||
object2.isPreload = isPreload;
|
||||
object2.skipLocalFetch = skipLocalFetch;
|
||||
object2.avoidInitialScroll = avoidInitialScroll;
|
||||
object2.fetchKey = fetchKey;
|
||||
return Reflect.apply(fetchMessages, defaultImport7, [object2]);
|
||||
}
|
||||
break reducibleJoin57;
|
||||
}
|
||||
break reducibleJoin57;
|
||||
}
|
||||
break reducibleJoin57;
|
||||
}
|
||||
}
|
||||
defaultImport8 = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
fetchMessages = defaultImport8.fetchMessages;
|
||||
object2 = {channelId: channelId};
|
||||
value = require(9599) /* metro dependency 9599: getAdaptiveMessageLimitNative */;
|
||||
getMessageLimit = value.getMessageLimit;
|
||||
object2.limit = Reflect.apply(getMessageLimit, value, ['MessageManager.initialFetch']);
|
||||
object2.isPreload = isPreload;
|
||||
object2.skipLocalFetch = skipLocalFetch;
|
||||
ANIMATED = JumpTypes.ANIMATED;
|
||||
object2.jump = {jumpType: ANIMATED};
|
||||
object2.avoidInitialScroll = avoidInitialScroll;
|
||||
object2.fetchKey = fetchKey;
|
||||
return Reflect.apply(fetchMessages, defaultImport8, [object2]);
|
||||
}
|
||||
value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
jumpToMessage = value.jumpToMessage;
|
||||
Reflect.apply(jumpToMessage, value, [{channelId: channelId, messageId: messageId, flash: value19,
|
||||
isPreload: isPreload, skipLocalFetch: skipLocalFetch, jumpType: jumpType,
|
||||
avoidInitialScroll: avoidInitialScroll}]);
|
||||
break reducibleJoin59;
|
||||
}
|
||||
break reducibleJoin59;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleConnectionOpen_75207() { // fn#75207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:2873, offset: 0x01da67d8, size: 293 bytes, params: 1, frame: 24
|
||||
var channel;
|
||||
var id;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var matchPath;
|
||||
var moduleValue2;
|
||||
var pathname;
|
||||
var object3;
|
||||
var value5;
|
||||
var fetchMessages_75206Binding;
|
||||
var object4;
|
||||
var messageId;
|
||||
var maybeLoadChannelSplitViewBinding;
|
||||
var guildId;
|
||||
const channelId = SelectedChannelStore.getChannelId();
|
||||
if (channelId != null) {
|
||||
channel = ChannelStore.getChannel(channelId);
|
||||
if (channel != null) {
|
||||
id = channel.id;
|
||||
value4 = undefined;
|
||||
moduleValue = require(3974) /* metro dependency 3974: matchPathCompat */;
|
||||
matchPath = moduleValue.matchPath;
|
||||
moduleValue2 = require(1230) /* metro dependency 1230: router_utils */;
|
||||
pathname = moduleValue2.getHistory().location.pathname;
|
||||
object3 = {};
|
||||
object3.path = Routes.CHANNEL(':guild', ':channel', ':message');
|
||||
object3.exact = true;
|
||||
value5 = Reflect.apply(matchPath, moduleValue, [pathname, object3]);
|
||||
object3 = {channelId: id};
|
||||
object3.messageId = value5 == null || value5.params == null ? value4 : value5.params.message;
|
||||
fetchMessages_75206Binding = fetchMessages_75206;
|
||||
object4 = {};
|
||||
object4.guildId = channel.getGuildId();
|
||||
id = channel.id;
|
||||
object4.channelId = id;
|
||||
messageId = object3.messageId;
|
||||
object4.messageId = messageId;
|
||||
messageId = object3.messageId;
|
||||
object4.avoidInitialScroll = messageId != null;
|
||||
fetchMessages_75206Binding(object4);
|
||||
maybeLoadChannelSplitViewBinding = maybeLoadChannelSplitView;
|
||||
guildId = channel.getGuildId();
|
||||
id = channel.id;
|
||||
maybeLoadChannelSplitViewBinding(guildId, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function loadSelectedChannelIfNecessary() { // fn#75208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:3386, offset: 0x01da68fd, size: 205 bytes, params: 1, frame: 16
|
||||
var channel;
|
||||
var orCreate;
|
||||
var fetchMessages_75206Binding;
|
||||
var object2;
|
||||
const channelId = SelectedChannelStore.getChannelId();
|
||||
if (channelId != null) {
|
||||
channel = ChannelStore.getChannel(channelId);
|
||||
if (channel != null) {
|
||||
if (isTextChannel(channel.type)) {
|
||||
orCreate = (importDefault(4816) /* metro dependency 4816: ChannelMessages */).getOrCreate(channelId);
|
||||
if (!(orCreate.ready && orCreate.hasFetched)) {
|
||||
fetchMessages_75206Binding = fetchMessages_75206;
|
||||
object2 = {};
|
||||
object2.guildId = channel.getGuildId();
|
||||
object2.channelId = channel.id;
|
||||
fetchMessages_75206Binding(object2);
|
||||
}
|
||||
maybeLoadChannelSplitView(channel.getGuildId(), channel.id);
|
||||
} else {
|
||||
maybeLoadChannelSplitView(channel.getGuildId(), channel.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleChannelCreate_75215({channel, messageId}) { // fn#75215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:4706, offset: 0x01da6b86, size: 94 bytes, params: 2, frame: 14
|
||||
var r1;
|
||||
const guild_id = channel.guild_id;
|
||||
let value = guild_id != null;
|
||||
if (value) {
|
||||
value = SelectedChannelStore.getChannelId(guild_id);
|
||||
value = value === channel.id;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
if (r1) {
|
||||
fetchMessages_75206({guildId: guild_id, channelId: channel.id, messageId: messageId});
|
||||
}
|
||||
}
|
||||
|
||||
function handleMessageEditEnd({response}) { // fn#75216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:4866, offset: 0x01da6be4, size: 260 bytes, params: 2, frame: 21
|
||||
var retry_after;
|
||||
var defaultImport;
|
||||
var show;
|
||||
var object3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var formatToPlainString;
|
||||
var qoxdQB;
|
||||
var object4;
|
||||
if (response == null) {
|
||||
return null;
|
||||
}
|
||||
if (response.body == null) {
|
||||
return null;
|
||||
}
|
||||
const code = response.body.code;
|
||||
const CHANNEL_FOLLOWING_EDIT_RATE_LIMITED = AbortCodes.CHANNEL_FOLLOWING_EDIT_RATE_LIMITED;
|
||||
if (code === CHANNEL_FOLLOWING_EDIT_RATE_LIMITED) {
|
||||
retry_after = response.body.retry_after;
|
||||
if (retry_after != null) {
|
||||
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
show = defaultImport.show;
|
||||
object3 = {};
|
||||
object3.title = intl.string(t.Whhv4w);
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
qoxdQB = t.qoxdQB;
|
||||
object4 = {};
|
||||
object4.retryAfterMinutes = global.Math.ceil(retry_after / 60);
|
||||
object3.body = Reflect.apply(formatToPlainString, intl, [qoxdQB, object4]);
|
||||
Reflect.apply(show, defaultImport, [object3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleLoadMessagesSuccess({channelId, jump, isStale, isPreview}) { // fn#75217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:5204, offset: 0x01da6ce8, size: 267 bytes, params: 2, frame: 17
|
||||
var r7;
|
||||
var r1;
|
||||
var Date;
|
||||
var binding;
|
||||
var channelId2;
|
||||
var currentSidebarChannelId;
|
||||
var defaultImport;
|
||||
var fetchMessages;
|
||||
var object2;
|
||||
isPreview = !(isPreview === undefined) && isPreview;
|
||||
if (!isPreview) {
|
||||
r7 = env0_28[channelId] ?? 0;
|
||||
Date = global.Date;
|
||||
if (!(Date.now() - r7 < env0_23)) {
|
||||
binding = env0_28;
|
||||
Date = global.Date;
|
||||
binding[channelId] = Date.now();
|
||||
channelId2 = SelectedChannelStore.getChannelId();
|
||||
currentSidebarChannelId = ChannelSectionStore.getCurrentSidebarChannelId(channelId2);
|
||||
r1 = isStale && GatewayConnectionStore.isConnected();
|
||||
r1 = r1 && (channelId === channelId2 || channelId === currentSidebarChannelId);
|
||||
if (r1) {
|
||||
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
fetchMessages = defaultImport.fetchMessages;
|
||||
object2 = {channelId: channelId};
|
||||
object2.limit = (require(9599) /* metro dependency 9599: getAdaptiveMessageLimitNative */).getMessageLimit('MessageManager.staleFetch');
|
||||
object2.jump = jump;
|
||||
Reflect.apply(fetchMessages, defaultImport, [object2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleUploadFail({channelId, messageId, reason, noSendFailed, shouldSendNotification}) { // fn#75218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:5562, offset: 0x01da6df3, size: 134 bytes, params: 2, frame: 17
|
||||
if (messageId != null && noSendFailed !== true) {
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MESSAGE_SEND_FAILED',
|
||||
channelId: channelId, messageId: messageId, reason: reason ?? null,
|
||||
shouldNotify: shouldSendNotification !== false});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun75220(a0) { // fn#75220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:5921, offset: 0x01da6ebc, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = MessageManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: '_initialize', value: function() {
|
||||
importDefault(dependencyMap[29]).subscribe('CONNECTION_OPEN', handleConnectionOpen_75207);
|
||||
}}, {key: '_terminate', value: function() {
|
||||
importDefault(dependencyMap[29]).unsubscribe('CONNECTION_OPEN', handleConnectionOpen_75207);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function MessageManager(a0) { // fn#75221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9783:5933, offset: 0x01da6f1d, size: 358 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, MessageManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(MessageManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_75203()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.fetchMessages = fetchMessages_75206;
|
||||
value.loadSelectedChannelIfNecessary = loadSelectedChannelIfNecessary;
|
||||
const Map = global.Map;
|
||||
const map = new Map();
|
||||
value.stores = map.set(ChannelSectionStore, handleChannelSectionStoreChange);
|
||||
const handleChannelCreate_75215Binding = handleChannelCreate_75215;
|
||||
value.actions = {APP_STATE_UPDATE_WILL_BECOME_ACTIVE: handleAppWillBecomeActive,
|
||||
OVERLAY_INITIALIZE: handleConnectionOpen_75207, CHANNEL_SELECT: handleChannelSelect_75209,
|
||||
VOICE_CHANNEL_SELECT: handleVoiceChannelSelect, THREAD_CREATE: handleChannelCreate_75215Binding,
|
||||
THREAD_LIST_SYNC: function() {
|
||||
loadSelectedChannelIfNecessary();
|
||||
}, CHANNEL_CREATE: handleChannelCreate_75215Binding, CHANNEL_PRELOAD: handleChannelPreload,
|
||||
GUILD_CREATE: function() {
|
||||
loadSelectedChannelIfNecessary();
|
||||
}, MESSAGE_END_EDIT: handleMessageEditEnd, LOAD_MESSAGES_SUCCESS: handleLoadMessagesSuccess,
|
||||
UPLOAD_FAIL: handleUploadFail, CHANNEL_DELETE: function() {
|
||||
loadSelectedChannelIfNecessary();
|
||||
}, THREAD_DELETE: function() {
|
||||
loadSelectedChannelIfNecessary();
|
||||
}, CHANNEL_RTC_JUMP_TO_VOICE_CHANNEL_MESSAGE: handleJumpToVoiceChannelMessage};
|
||||
return value;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,80 @@
|
||||
/* Metro module 15768; source: modules/messages/MessageQueueManager.tsx; dependencies: [6, 7, 15, 17, 18, 4862, 4860, 2] */
|
||||
function _fun121156(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:6, offset: 0x0253fbce, size: 226 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun121160(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageQueueManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_121157() { // fn#121157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:148, offset: 0x0253fcb0, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_121157_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun121160(a0) { // fn#121160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:351, offset: 0x0253fd12, size: 72 bytes, params: 2, frame: 15
|
||||
const closure = MessageQueueManager;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'handleLogout', value: value_121162}]);
|
||||
}
|
||||
|
||||
function MessageQueueManager(a0) { // fn#121161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:363, offset: 0x0253fd5a, size: 145 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_2;
|
||||
binding(this, MessageQueueManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_5(MessageQueueManager);
|
||||
binding = env1_4;
|
||||
if (_isNativeReflectConstruct_121157()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_5(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {LOGOUT: value.handleLogout};
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_121162() { // fn#121162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15976:723, offset: 0x0253fdeb, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4862) /* metro dependency 4862: MessageQueue */).clear();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/* Metro module 7152; source: modules/messages/MessageReactionsTypes.tsx; dependencies: [2] */
|
||||
function _fun57267(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7330:6, offset: 0x013e1261, size: 189 bytes, params: 8, frame: 17
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {NORMAL: 0};
|
||||
object2[0] = 'NORMAL';
|
||||
object2.BURST = 1;
|
||||
object2[1] = 'BURST';
|
||||
object2.VOTE = 2;
|
||||
object2[2] = 'VOTE';
|
||||
const Set = global.Set;
|
||||
const NORMAL = object2.NORMAL;
|
||||
const BURST = object2.BURST;
|
||||
const set = new Set([NORMAL, BURST]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageReactionsTypes.tsx');
|
||||
exports.ReactionTypes = object2;
|
||||
exports.NOTIFICATION_REACTION_TYPES = set;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,553 @@
|
||||
/* Metro module 4625; source: modules/messages/MessageRecordUtils.tsx; dependencies: [4626, 3794, 1885, 1226, 3793, 1878, 4503, 661, 4627, 4096, 4634, 21, 4639, 4129, 4640, 3738, 4641, 4643, 2] */
|
||||
function _fun39774(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:6, offset: 0x010e9f9e, size: 429 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const closure = createMessageRecord;
|
||||
const transformAttachments = function(a0) {
|
||||
return a0.attachments == null ? [] : a0.attachments.map(_fun39779);
|
||||
};
|
||||
const transformEmbeds = function(a0) {
|
||||
var env0_0 = a0;
|
||||
if (a0.embeds == null) {
|
||||
return [];
|
||||
}
|
||||
return require(dependencyMap[16]).mergeEmbedsOnURL(a0.embeds.map(_fun39782));
|
||||
};
|
||||
const transformMessageSnapshots = function(a0) {
|
||||
return a0.message_snapshots == null ? [] : a0.message_snapshots.map(_fun39787);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const interactionRecord = importDefault(4626) /* metro dependency 4626: InteractionRecord */;
|
||||
let value = require(3794) /* metro dependency 3794: MessageRecord */;
|
||||
const env0_4 = value.MessageSnapshotRecord;
|
||||
const env0_5 = value.MinimalMessageRecord;
|
||||
const messageRecord = importDefault(3794) /* metro dependency 3794: MessageRecord */;
|
||||
value = importDefault(1885) /* metro dependency 1885: UserRecord */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_11 = (require(4503) /* metro dependency 4503: MessageConstants */).SPOILER_ATTACHMENT_PREFIX;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = constantsModule.MessageFlags;
|
||||
const env0_13 = constantsModule.MessageTypes;
|
||||
const env0_14 = constantsModule.MessageTypesSets;
|
||||
value = new value({'id': '???', 'username': '???'});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageRecordUtils.tsx');
|
||||
exports.createMessageRecord = closure;
|
||||
exports.updateServerMessage = function(a0, a1) {
|
||||
var r4;
|
||||
var r0;
|
||||
var object;
|
||||
if (a1.edited_timestamp != null) {
|
||||
object = {};
|
||||
copyDataProperties(object, a1, r4);
|
||||
object['reactions'] = a0.reactions;
|
||||
object['interaction_data'] = a0.interaction_data;
|
||||
r0 = object;
|
||||
} else {
|
||||
object = {};
|
||||
copyDataProperties(object, a0, r4);
|
||||
copyDataProperties(object, a1, r4);
|
||||
r0 = object;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
exports.updateMessageRecord = updateMessageRecord;
|
||||
exports.canEditMessageWithStickers = canEditMessageWithStickers;
|
||||
exports.hasEphemeralAppearance = hasEphemeralAppearance;
|
||||
}
|
||||
|
||||
function createMinimalMessageRecord(a0) { // fn#39775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:357, offset: 0x010ea14b, size: 313 bytes, params: 2, frame: 18
|
||||
var r5;
|
||||
var r3;
|
||||
var value;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
const Date = global.Date;
|
||||
const timestamp = a0.timestamp;
|
||||
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
let date = new Date(timestamp);
|
||||
object2['timestamp'] = date instanceof Object ? date : value2;
|
||||
const edited_timestamp = a0.edited_timestamp;
|
||||
const value4 = null;
|
||||
if (value4 != edited_timestamp) {
|
||||
date = new global.Date(a0.edited_timestamp);
|
||||
} else {
|
||||
r5 = value4;
|
||||
}
|
||||
object2['editedTimestamp'] = r5;
|
||||
object2['attachments'] = transformAttachments(a0);
|
||||
object2['embeds'] = transformEmbeds(a0);
|
||||
const interactionComponentUtilsModule = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
|
||||
const transformComponents = interactionComponentUtilsModule.transformComponents;
|
||||
const components = a0.components;
|
||||
object2['components'] = Reflect.apply(transformComponents, interactionComponentUtilsModule,
|
||||
[value4 != components ? components : []]);
|
||||
const NON_PARSED = MessageTypesSets.NON_PARSED;
|
||||
if (NON_PARSED.has(a0.type)) {
|
||||
r3 = [];
|
||||
} else {
|
||||
value = importDefault(4096) /* metro dependency 4096: findCodedLinks */;
|
||||
value = value(a0.content);
|
||||
r3 = value;
|
||||
}
|
||||
object2['codedLinks'] = r3;
|
||||
value = Object.create(MinimalMessageRecord.prototype, {constructor: {value: MinimalMessageRecord}});
|
||||
const minimalMessageRecord = new MinimalMessageRecord(object2);
|
||||
return minimalMessageRecord instanceof Object ? minimalMessageRecord : value;
|
||||
}
|
||||
|
||||
function createMessageRecord(a0) { // fn#39776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:719, offset: 0x010ea284, size: 1327 bytes, params: 2, frame: 34
|
||||
var r21;
|
||||
var r14;
|
||||
var r13;
|
||||
var r8;
|
||||
var value5;
|
||||
var userRecord;
|
||||
var defaultImport;
|
||||
var isProbablyAValidSnowflake;
|
||||
var value11;
|
||||
var defaultImport2;
|
||||
var value12;
|
||||
let value = a1;
|
||||
const value2 = undefined;
|
||||
const r0 = value !== value2 ? value : {};
|
||||
let reactions = r0.reactions;
|
||||
const interactionData = r0.interactionData;
|
||||
const minimalMessageRecord = createMinimalMessageRecord(a0);
|
||||
const mentions = a0.mentions;
|
||||
const value3 = null;
|
||||
let r19 = value3 == mentions ? value2 : mentions.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
r19 = value3 == r19 ? [] : r19;
|
||||
const mention_roles = a0.mention_roles;
|
||||
const r18 = value3 != mention_roles ? mention_roles : [];
|
||||
const mention_channels = a0.mention_channels;
|
||||
const r20 = value3 != mention_channels ? mention_channels : [];
|
||||
const mention_games = a0.mention_games;
|
||||
const r17 = value3 != mention_games ? mention_games : [];
|
||||
const message_reference = a0.message_reference;
|
||||
if (value3 == a0.author) {
|
||||
r21 = env0_15;
|
||||
} else if (value3 != a0.webhook_id) {
|
||||
userRecord = new UserRecord(a0.author);
|
||||
} else {
|
||||
value5 = UserStore.getUser(a0.author.id);
|
||||
if (value3 != value5) {
|
||||
r21 = value5;
|
||||
} else {
|
||||
userRecord = new UserRecord(a0.author);
|
||||
}
|
||||
}
|
||||
const messageAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getMessageAuthor({channel_id: a0.channel_id,
|
||||
author: r21});
|
||||
const gift_info = value3 == a0 ? value2 : a0.gift_info;
|
||||
const gifting_prompt = a0.gifting_prompt;
|
||||
const r10 = value3 != a0.interaction ? InteractionRecord.createFromServer(a0.interaction) : value3;
|
||||
let type = a0.type;
|
||||
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
|
||||
const r24 = type !== THREAD_STARTER_MESSAGE || value3 == a0.referenced_message || value3 == a0.referenced_message.author ? value2 : a0.referenced_message.author.id;
|
||||
let content = a0.content;
|
||||
type = a0.type;
|
||||
const PREMIUM_REFERRAL = MessageTypes.PREMIUM_REFERRAL;
|
||||
if (type !== PREMIUM_REFERRAL) {
|
||||
r14 = value2;
|
||||
} else {
|
||||
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
isProbablyAValidSnowflake = defaultImport.isProbablyAValidSnowflake;
|
||||
content = a0.content;
|
||||
content = Reflect.apply(isProbablyAValidSnowflake, defaultImport, [content]) ? a0.content : value2;
|
||||
value11 = '';
|
||||
r14 = content;
|
||||
content = value11;
|
||||
}
|
||||
type = a0.type;
|
||||
const PREMIUM_GROUP_INVITE = MessageTypes.PREMIUM_GROUP_INVITE;
|
||||
if (type !== PREMIUM_GROUP_INVITE) {
|
||||
r13 = value2;
|
||||
} else {
|
||||
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
isProbablyAValidSnowflake = defaultImport2.isProbablyAValidSnowflake;
|
||||
content = a0.content;
|
||||
content = Reflect.apply(isProbablyAValidSnowflake, defaultImport2, [content]) ? a0.content : value2;
|
||||
value12 = '';
|
||||
r13 = content;
|
||||
content = value12;
|
||||
}
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, a0, r24);
|
||||
copyDataProperties(object3, messageAuthor, r24);
|
||||
copyDataProperties(object3, minimalMessageRecord.toJS(), r24);
|
||||
object3['author'] = r21;
|
||||
object3['webhookId'] = a0.webhook_id;
|
||||
object3['blocked'] = RelationshipStore.isBlockedForMessage(a0) || value3 != r24 && RelationshipStore.isBlocked(r24);
|
||||
object3['ignored'] = RelationshipStore.isIgnoredForMessage(a0) || value3 != r24 && RelationshipStore.isIgnored(r24);
|
||||
let mention_everyone = a0.mention_everyone;
|
||||
object3['mentionEveryone'] = mention_everyone;
|
||||
object3['mentions'] = r19;
|
||||
object3['mentionRoles'] = r18;
|
||||
object3['mentionChannels'] = r20;
|
||||
object3['mentionGames'] = r17;
|
||||
object3['messageReference'] = message_reference;
|
||||
const isMessageMentionedModule = require(4639) /* metro dependency 4639: isMessageMentioned */;
|
||||
const isMentioned = isMessageMentionedModule.isMentioned;
|
||||
const object4 = {};
|
||||
object4.userId = AuthenticationStore.getId();
|
||||
object4.channelId = a0.channel_id;
|
||||
mention_everyone = a0.mention_everyone;
|
||||
object4.mentionEveryone = value3 != mention_everyone && mention_everyone;
|
||||
object4.mentionUsers = r19;
|
||||
object4.mentionRoles = r18;
|
||||
object3['mentioned'] = Reflect.apply(isMentioned, isMessageMentionedModule, [object4]);
|
||||
const isGiftCodeEmbed2 = (require(4129) /* metro dependency 4129: GiftCodeUtils */).isGiftCodeEmbed(a0);
|
||||
const giftCodeUtilsModule = require(4129) /* metro dependency 4129: GiftCodeUtils */;
|
||||
const findGiftCodes = giftCodeUtilsModule.findGiftCodes;
|
||||
object3['giftCodes'] = isGiftCodeEmbed2 ? Reflect.apply(findGiftCodes, giftCodeUtilsModule,
|
||||
[value3 == a0 ? value2 : a0.embeds[0].url]) : Reflect.apply(findGiftCodes, giftCodeUtilsModule, [a0.content]);
|
||||
object3['content'] = content;
|
||||
object3['referralTrialOfferId'] = r14;
|
||||
object3['premiumGroupInviteId'] = r13;
|
||||
object3['call'] = transformMessageCall(a0.call, minimalMessageRecord.timestamp);
|
||||
object3['messageSnapshots'] = transformMessageSnapshots(a0);
|
||||
const transformReactionsBinding = transformReactions;
|
||||
reactions = value3 == reactions ? a0.reactions : reactions;
|
||||
object3['reactions'] = transformReactionsBinding(reactions, a0.poll);
|
||||
object3['interaction'] = r10;
|
||||
object3['interactionData'] = value3 != interactionData ? interactionData : a0.interaction_data;
|
||||
object3['interactionMetadata'] = a0.interaction_metadata;
|
||||
object3['roleSubscriptionData'] = a0.role_subscription_data;
|
||||
object3['purchaseNotification'] = a0.purchase_notification;
|
||||
if (value3 == a0.poll) {
|
||||
r8 = value2;
|
||||
} else {
|
||||
value = importDefault(4640) /* metro dependency 4640: transformMessagPoll */;
|
||||
value = value(a0.poll);
|
||||
r8 = value;
|
||||
}
|
||||
object3['poll'] = r8;
|
||||
object3['sharedClientTheme'] = a0.shared_client_theme;
|
||||
object3['giftInfo'] = value3 == gift_info ? value2 : gift_info;
|
||||
object3['giftingPrompt'] = gifting_prompt;
|
||||
object3['boostingPrompt'] = a0.boosting_prompt;
|
||||
value = Object.create(MessageRecord.prototype, {constructor: {value: MessageRecord}});
|
||||
const messageRecord = new MessageRecord();
|
||||
return messageRecord instanceof Object ? messageRecord : value;
|
||||
}
|
||||
|
||||
function transformAttachments(a0) { // fn#39778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:2833, offset: 0x010ea7b3, size: 46 bytes, params: 2, frame: 11
|
||||
return a0.attachments == null ? [] : a0.attachments.map(_fun39779);
|
||||
}
|
||||
|
||||
function transformMessageCall(a0, a1) { // fn#39780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:2962, offset: 0x010ea813, size: 174 bytes, params: 3, frame: 16
|
||||
var r2;
|
||||
var r1;
|
||||
var ended_timestamp;
|
||||
var defaultImport;
|
||||
var Date;
|
||||
var value3;
|
||||
var date;
|
||||
let value = null;
|
||||
if (value != a0) {
|
||||
ended_timestamp = a0.ended_timestamp;
|
||||
if (value != ended_timestamp) {
|
||||
defaultImport = importDefault(3738) /* metro dependency 3738 */;
|
||||
Date = global.Date;
|
||||
ended_timestamp = a0.ended_timestamp;
|
||||
value3 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
r2 = defaultImport(date instanceof Object ? date : value3);
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
if (value != r2) {
|
||||
value = importDefault(3738) /* metro dependency 3738 */;
|
||||
value = value.duration(r2.diff(a1));
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
return {participants: a0.participants, endedTimestamp: r2, duration: r1};
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function transformEmbeds(a0) { // fn#39781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3202, offset: 0x010ea8c1, size: 86 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
if (a0.embeds == null) {
|
||||
return [];
|
||||
}
|
||||
return (require(4641) /* metro dependency 4641: EmbedUtils */).mergeEmbedsOnURL(a0.embeds.map(_fun39782));
|
||||
}
|
||||
|
||||
function transformReactions(a0, a1) { // fn#39783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3364, offset: 0x010ea953, size: 148 bytes, params: 3, frame: 17
|
||||
var r6;
|
||||
var results;
|
||||
var r3;
|
||||
var r5;
|
||||
var value3;
|
||||
var answer_counts;
|
||||
var items2;
|
||||
let value = a0;
|
||||
if (value != null) {
|
||||
value3 = undefined;
|
||||
if (a1 == null) {
|
||||
r3 = value3;
|
||||
} else {
|
||||
results = a1.results;
|
||||
if (results == null) {
|
||||
r3 = value3;
|
||||
} else {
|
||||
answer_counts = results.answer_counts;
|
||||
r3 = answer_counts.map(function(a0) {
|
||||
var object = {};
|
||||
object.count_details = {vote: a0.count};
|
||||
object.me_vote = a0.me_voted;
|
||||
var object3 = {'id': null, 'name': '', 'animated': false};
|
||||
object3.id = a0.id.toString();
|
||||
object.emoji = object3;
|
||||
object.me = false;
|
||||
object.me_burst = false;
|
||||
object.count = a0.count;
|
||||
object.burst_count = 0;
|
||||
return object;
|
||||
});
|
||||
r6 = answer_counts;
|
||||
}
|
||||
}
|
||||
r5 = value ?? [];
|
||||
items2 = [];
|
||||
value = arraySpread(items2, r5, 0, r6);
|
||||
r3 = r3 ?? [];
|
||||
arraySpread(items2, r3, value, r6);
|
||||
return items2.map(_fun39785);
|
||||
}
|
||||
if (a1?.results == null) {
|
||||
return [];
|
||||
}
|
||||
value3 = undefined;
|
||||
if (a1 == null) {
|
||||
r3 = value3;
|
||||
} else {
|
||||
results = a1.results;
|
||||
if (results == null) {
|
||||
r3 = value3;
|
||||
} else {
|
||||
answer_counts = results.answer_counts;
|
||||
r3 = answer_counts.map(function(a0) {
|
||||
var object = {};
|
||||
object.count_details = {vote: a0.count};
|
||||
object.me_vote = a0.me_voted;
|
||||
var object3 = {'id': null, 'name': '', 'animated': false};
|
||||
object3.id = a0.id.toString();
|
||||
object.emoji = object3;
|
||||
object.me = false;
|
||||
object.me_burst = false;
|
||||
object.count = a0.count;
|
||||
object.burst_count = 0;
|
||||
return object;
|
||||
});
|
||||
r6 = answer_counts;
|
||||
}
|
||||
}
|
||||
r5 = value ?? [];
|
||||
items2 = [];
|
||||
value = arraySpread(items2, r5, 0, r6);
|
||||
r3 = r3 ?? [];
|
||||
arraySpread(items2, r3, value, r6);
|
||||
return items2.map(function(a0) {
|
||||
var r5;
|
||||
var property;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r5);
|
||||
var value = undefined;
|
||||
if ((object == null ? value : object.count_details) != null) {
|
||||
property = object.count_details.burst;
|
||||
value = 0;
|
||||
object.burst_count = property ?? value;
|
||||
property = object.count_details.normal;
|
||||
object.count = property ?? value;
|
||||
}
|
||||
if (object.count < 0) {
|
||||
object.count = 0;
|
||||
}
|
||||
if (object.burst_count < 0) {
|
||||
object.burst_count = 0;
|
||||
}
|
||||
return object;
|
||||
});
|
||||
}
|
||||
|
||||
function transformMessageSnapshots(a0) { // fn#39786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3943, offset: 0x010eaacf, size: 46 bytes, params: 2, frame: 11
|
||||
return a0.message_snapshots == null ? [] : a0.message_snapshots.map(_fun39787);
|
||||
}
|
||||
|
||||
function updateMessageRecord(a0, a1) { // fn#39789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:4449, offset: 0x010eab9a, size: 960 bytes, params: 3, frame: 19
|
||||
var r1;
|
||||
var r2;
|
||||
var r8;
|
||||
var set;
|
||||
var author;
|
||||
var value23;
|
||||
var userRecord;
|
||||
var moduleValue;
|
||||
var transformReactionsBinding;
|
||||
var defaultImport;
|
||||
var object2;
|
||||
let value = a0;
|
||||
if (a1.edited_timestamp != null) {
|
||||
return createMessageRecord(a1, {reactions: value.reactions, interactionData: value.interactionData});
|
||||
}
|
||||
let r6 = a1.call == null ? value : value.set('call', transformMessageCall(a1.call, value.timestamp));
|
||||
let r7 = a1.attachments == null ? r6 : r6.set('attachments', transformAttachments(a1));
|
||||
r6 = a1.application == null ? r7 : r7.set('application', a1.application);
|
||||
r7 = a1.activity == null ? r6 : r6.set('activity', a1.activity);
|
||||
r6 = a1.content != null && a1.content !== '' ? r7.set('content', a1.content) : r7;
|
||||
r7 = a1.embeds == null ? r6 : r6.set('embeds', transformEmbeds(a1));
|
||||
r6 = a1.message_snapshots == null ? r7 : r7.set('messageSnapshots', transformMessageSnapshots(a1));
|
||||
r7 = a1.pinned === r6.pinned ? r6 : r6.set('pinned', a1.pinned);
|
||||
if (r7.webhookId != null && a1.author != null) {
|
||||
set = r7.set;
|
||||
author = a1.author;
|
||||
value23 = Object.create(UserRecord.prototype, {constructor: {value: UserRecord}});
|
||||
userRecord = new UserRecord();
|
||||
r6 = Reflect.apply(set, r7, ['author', userRecord instanceof Object ? userRecord : value23]);
|
||||
} else {
|
||||
r6 = r7;
|
||||
}
|
||||
r7 = a1.flags != null && a1.flags !== r6.flags ? r6.set('flags', a1.flags) : r6;
|
||||
if (a1.components == null) {
|
||||
r6 = r7;
|
||||
} else {
|
||||
set = r7.set;
|
||||
moduleValue = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
|
||||
r6 = Reflect.apply(set, r7, ['components', moduleValue.transformComponents(a1.components)]);
|
||||
}
|
||||
r7 = a1.role_subscription_data == null ? r6 : r6.set('roleSubscriptionData', a1.role_subscription_data);
|
||||
let reactions = a1.reactions;
|
||||
if (reactions == null) {
|
||||
r6 = r7;
|
||||
} else {
|
||||
set = r7.set;
|
||||
transformReactionsBinding = transformReactions;
|
||||
reactions = value.reactions;
|
||||
reactions = reactions ?? a1.reactions;
|
||||
value = transformReactionsBinding(reactions);
|
||||
value = Reflect.apply(set, r7, ['reactions', value]);
|
||||
r6 = value;
|
||||
}
|
||||
if (a1.poll == null) {
|
||||
r7 = r6;
|
||||
} else {
|
||||
set = r6.set;
|
||||
value = importDefault(4640) /* metro dependency 4640: transformMessagPoll */;
|
||||
value = value(a1.poll);
|
||||
value = Reflect.apply(set, r6, ['poll', value]);
|
||||
r7 = value;
|
||||
}
|
||||
const mentions = a1.mentions;
|
||||
value = false;
|
||||
if (mentions != null) {
|
||||
set = r7.set;
|
||||
value = a1.mentions.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
value = Reflect.apply(set, r7, ['mentions', value]);
|
||||
r2 = true;
|
||||
r8 = value;
|
||||
} else {
|
||||
r2 = value;
|
||||
r8 = r7;
|
||||
}
|
||||
if (a1.mention_everyone == null) {
|
||||
r7 = r8;
|
||||
} else {
|
||||
value = r8.set('mentionEveryone', a1.mention_everyone);
|
||||
r2 = true;
|
||||
r7 = value;
|
||||
}
|
||||
if (a1.mention_roles == null) {
|
||||
r6 = r7;
|
||||
} else {
|
||||
value = r7.set('mentionRoles', a1.mention_roles);
|
||||
r2 = true;
|
||||
r6 = value;
|
||||
}
|
||||
if (r2) {
|
||||
set = r6.set;
|
||||
defaultImport = importDefault(4639) /* metro dependency 4639: isMessageMentioned */;
|
||||
object2 = {message: r6};
|
||||
object2.userId = AuthenticationStore.getId();
|
||||
value = defaultImport(object2);
|
||||
value = Reflect.apply(set, r6, ['mentioned', value]);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = r6;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function canEditMessageWithStickers(a0) { // fn#39791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:5904, offset: 0x010eaf5a, size: 68 bytes, params: 2, frame: 12
|
||||
var value;
|
||||
const getMessageStickers = (require(4643) /* metro dependency 4643: StickersUtils */).getMessageStickers;
|
||||
value = Reflect.apply(getMessageStickers, value, [a0]).length === 0;
|
||||
return value || a0.content !== '';
|
||||
}
|
||||
|
||||
function hasEphemeralAppearance(a0) { // fn#39792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:5991, offset: 0x010eaf9e, size: 51 bytes, params: 2, frame: 12
|
||||
const hasFlag = a0.hasFlag;
|
||||
const EPHEMERAL = MessageFlags.EPHEMERAL;
|
||||
return Reflect.apply(hasFlag, a0, [EPHEMERAL]) && a0.type !== MessageTypes.IN_GAME_MESSAGE_NUX;
|
||||
}
|
||||
|
||||
function _fun39779(a0) { // fn#39779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:2915, offset: 0x010ea7e1, size: 50 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
const filename = a0.filename;
|
||||
const startsWith = filename.startsWith;
|
||||
const value = environment.__proto__;
|
||||
object2['spoiler'] = Reflect.apply(startsWith, filename, [SPOILER_ATTACHMENT_PREFIX]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun39782(a0) { // fn#39782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3277, offset: 0x010ea917, size: 60 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(4641) /* metro dependency 4641: EmbedUtils */;
|
||||
const sanitizeEmbed = value.sanitizeEmbed;
|
||||
const binding = env0_0;
|
||||
return Reflect.apply(sanitizeEmbed, value, [binding.channel_id, binding.id, a0]);
|
||||
}
|
||||
|
||||
function _fun39785(a0) { // fn#39785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:3715, offset: 0x010eaa4f, size: 128 bytes, params: 2, frame: 15
|
||||
var burst;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
let value = undefined;
|
||||
let count_details = object2 == null ? value : object2.count_details;
|
||||
if (count_details != null) {
|
||||
count_details = object2.count_details;
|
||||
burst = count_details.burst;
|
||||
value = 0;
|
||||
object2.burst_count = burst ?? value;
|
||||
count_details = object2.count_details;
|
||||
object2.count = count_details.normal ?? value;
|
||||
}
|
||||
if (object2.count < 0) {
|
||||
object2.count = 0;
|
||||
}
|
||||
if (object2.burst_count < 0) {
|
||||
object2.burst_count = 0;
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun39787({message, moderator_report}) { // fn#39787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4803:4042, offset: 0x010eaafd, size: 68 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__;
|
||||
const object2 = {};
|
||||
object2.message = createMinimalMessageRecord(message);
|
||||
object2.moderator_report = moderator_report;
|
||||
value = Object.create(MessageSnapshotRecord.prototype, {constructor: {value: MessageSnapshotRecord}});
|
||||
const messageSnapshotRecord = new MessageSnapshotRecord(object2);
|
||||
return messageSnapshotRecord instanceof Object ? messageSnapshotRecord : value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
/* Metro module 7070; source: modules/messages/MessageRoundtripTrackerStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 4111, 4401, 661, 3, 4873, 683, 7071, 566, 694, 2] */
|
||||
function _fun56334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:6, offset: 0x013c52ba, size: 393 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const isCompleted = function(a0) {
|
||||
return a0.apiResponseTimestamp != null && a0.gatewaySeenTimestamp != null;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
|
||||
const networkStore = importDefault(4401) /* metro dependency 4401: NetworkStore */;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('MessageRoundtripTrackerStore');
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
value = _fun56340(Store);
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {MESSAGE_CREATE: MESSAGE_CREATE_56347});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageRoundtripTrackerStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_56335() { // fn#56335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:203, offset: 0x013c5443, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_56335_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function trackRoundtrip(a0) { // fn#56339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:537, offset: 0x013c54bf, size: 440 bytes, params: 2, frame: 24
|
||||
var r11;
|
||||
var r10;
|
||||
var binding;
|
||||
var signalStrength;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var SEND_MESSAGE_ROUNDTRIP;
|
||||
var object2;
|
||||
var guild_id;
|
||||
var getMemberCount;
|
||||
var value;
|
||||
const basicChannel = ChannelStore.getBasicChannel(a0.channelId);
|
||||
const value3 = null;
|
||||
if (value3 != basicChannel) {
|
||||
if (!(global.Math.random() > 0.1)) {
|
||||
r11 = value3 == a0.apiResponseTimestamp ? value3 : a0.apiResponseTimestamp - a0.initialSendTimestamp;
|
||||
r10 = value3 == a0.gatewaySeenTimestamp ? value3 : a0.gatewaySeenTimestamp - a0.initialSendTimestamp;
|
||||
signalStrength = require(dependencyMap[10]).getSignalStrength();
|
||||
defaultImport = importDefault(dependencyMap[11]);
|
||||
track = defaultImport.track;
|
||||
SEND_MESSAGE_ROUNDTRIP = AnalyticEvents.SEND_MESSAGE_ROUNDTRIP;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, importDefault(dependencyMap[12])(), dependencyMap);
|
||||
object2['api_latency_ms'] = r11;
|
||||
object2['gateway_latency_ms'] = r10;
|
||||
object2['channel_id'] = basicChannel.id;
|
||||
object2['channel_type'] = basicChannel.type;
|
||||
guild_id = basicChannel.guild_id;
|
||||
object2['guild_id'] = guild_id;
|
||||
getMemberCount = GuildMemberCountStore.getMemberCount;
|
||||
guild_id = basicChannel.guild_id;
|
||||
object2['guild_size'] = Reflect.apply(getMemberCount, GuildMemberCountStore, [guild_id]);
|
||||
value = NetworkStore.getType();
|
||||
object2['mobile_network_type'] = value;
|
||||
object2['num_attachments'] = a0.attachmentCount;
|
||||
value = value3 != signalStrength;
|
||||
copyDataProperties(object2, value && ({mobile_signal_strength_level: signalStrength}), dependencyMap);
|
||||
Reflect.apply(track, defaultImport, [SEND_MESSAGE_ROUNDTRIP, object2]);
|
||||
}
|
||||
} else {
|
||||
binding = env0_12;
|
||||
binding.warn('Ignoring a messageData for channel ' + a0.channelId + " because we can't find that channel.");
|
||||
}
|
||||
}
|
||||
|
||||
function _fun56340(a0) { // fn#56340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:1250, offset: 0x013c5677, size: 143 bytes, params: 2, frame: 16
|
||||
const closure = MessageRoundtripTrackerStoreClass;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(ChannelStore, GuildMemberCountStore, NetworkStore);
|
||||
}}, {key: 'recordMessageSendAttempt', value: value_56343}, {key: 'recordMessageSendApiResponse',
|
||||
value: value_56345}, {key: 'recordGatewayResponse', value: value_56346}]);
|
||||
}
|
||||
|
||||
function MESSAGE_CREATE_56347({optimistic, message}) { // fn#56347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2700, offset: 0x013c59b3, size: 56 bytes, params: 2, frame: 11
|
||||
const nonce = message.nonce;
|
||||
if (!(optimistic || nonce == null)) {
|
||||
env0_13.recordGatewayResponse(nonce);
|
||||
}
|
||||
}
|
||||
|
||||
function MessageRoundtripTrackerStoreClass(a0) { // fn#56341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:1262, offset: 0x013c5706, size: 160 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, MessageRoundtripTrackerStoreClass);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, items2);
|
||||
value = env1_6(MessageRoundtripTrackerStoreClass);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_56335()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items2);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
const Map = global.Map;
|
||||
const value4 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
const map = new Map();
|
||||
value.pendingMessages = map instanceof Object ? map : value4;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_56343(a0, a1) { // fn#56343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:1753, offset: 0x013c57a6, size: 188 bytes, params: 3, frame: 19
|
||||
let value = a2;
|
||||
const env0_1 = a1;
|
||||
const value2 = undefined;
|
||||
const r5 = value !== value2 ? value : {};
|
||||
const attachments = r5.attachments;
|
||||
const r2 = (attachments == null ? value2 : attachments.length) ?? 0;
|
||||
const attachmentsToUpload = r5.attachmentsToUpload;
|
||||
value = r2 + ((attachmentsToUpload == null ? value2 : attachmentsToUpload.length) ?? value);
|
||||
const object2 = {'initialSendTimestamp': null, 'apiResponseTimestamp': null, 'gatewaySeenTimestamp': null};
|
||||
const Date = global.Date;
|
||||
object2.initialSendTimestamp = Date.now();
|
||||
object2.channelId = a0;
|
||||
object2.attachmentCount = value;
|
||||
this.pendingMessages.set(a1, object2);
|
||||
global.setTimeout(_fun56344, 30000);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function value_56345(a0) { // fn#56345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2216, offset: 0x013c58ad, size: 131 bytes, params: 2, frame: 16
|
||||
var object2;
|
||||
let value = this.pendingMessages.get(a0);
|
||||
if (value != null) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
value = global.Date.now();
|
||||
object2['apiResponseTimestamp'] = value;
|
||||
value = environment.__proto__;
|
||||
if (isCompleted(object2)) {
|
||||
trackRoundtrip(object2);
|
||||
this.pendingMessages.delete(a0);
|
||||
} else {
|
||||
this.pendingMessages.set(a0, object2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_56346(a0) { // fn#56346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2453, offset: 0x013c5930, size: 131 bytes, params: 2, frame: 16
|
||||
var object2;
|
||||
let value = this.pendingMessages.get(a0);
|
||||
if (value != null) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
value = global.Date.now();
|
||||
object2['gatewaySeenTimestamp'] = value;
|
||||
value = environment.__proto__;
|
||||
if (isCompleted(object2)) {
|
||||
trackRoundtrip(object2);
|
||||
this.pendingMessages.delete(a0);
|
||||
} else {
|
||||
this.pendingMessages.set(a0, object2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun56344() { // fn#56344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7248:2066, offset: 0x013c5862, size: 75 bytes, params: 1, frame: 12
|
||||
var value3;
|
||||
const value2 = env0_0.pendingMessages.get(require);
|
||||
if (value2 != null) {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
trackRoundtrip(value2);
|
||||
env0_0.pendingMessages.delete(require);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/* Metro module 10910; source: modules/messages/MessageUtils.tsx; dependencies: [1379, 1878, 5072, 2] */
|
||||
function _fun83608(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11096:6, offset: 0x01f200a3, size: 145 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageUtils.tsx');
|
||||
exports.canViewPotentiallyNSFWChannel = canViewPotentiallyNSFWChannel;
|
||||
exports.getGuildIdFromMessage = getGuildIdFromMessage;
|
||||
}
|
||||
|
||||
function canViewPotentiallyNSFWChannel(a0) { // fn#83609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11096:215, offset: 0x01f20134, size: 87 bytes, params: 2, frame: 13
|
||||
var value;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const channel = ChannelStore.getChannel(a0);
|
||||
let r0 = currentUser != null && channel != null;
|
||||
if (r0) {
|
||||
value = require(5072) /* metro dependency 5072: AgeGateUtils */;
|
||||
value = !value.isChannelContentGated(channel);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getGuildIdFromMessage({channel_id}) { // fn#83610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11096:384, offset: 0x01f2018b, size: 55 bytes, params: 2, frame: 13
|
||||
return ChannelStore.getChannel(channel_id)?.guild_id ?? undefined;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,496 @@
|
||||
/* Metro module 9855; source: modules/messages/MessageViewTrackingManager.tsx; dependencies: [6, 7, 15, 17, 18, 661, 480, 6789, 1360, 1393, 683, 4860, 2] */
|
||||
function _fun77250(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:6, offset: 0x01df6cb7, size: 354 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_77253 = 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 env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun77259(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MessageViewTrackingManager.tsx');
|
||||
exports.default = value;
|
||||
exports.MessageViewTrackingType = {ANNOUNCEMENT: 'announcement', APP_EMBED: 'app_embed',
|
||||
OFFICIAL_MESSAGE: 'official_message', VOICE_INVITE_EMBED: 'voice_invite_embed'};
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_77251(a0, a1) { // fn#77251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:176, offset: 0x01df6e19, 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 _fun77252;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_77253(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_77253(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_77253(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun77252;
|
||||
}
|
||||
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 _isNativeReflectConstruct_77254() { // fn#77254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:1086, offset: 0x01df6f8d, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_77254_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function getAnalyticsConfig(a0) { // fn#77257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:1445, offset: 0x01df6fef, size: 529 bytes, params: 2, frame: 19
|
||||
var r4;
|
||||
var object3;
|
||||
var object4;
|
||||
var treatmentRendered;
|
||||
var INVITE_EMBED;
|
||||
var items2;
|
||||
const type = a0.type;
|
||||
const ANNOUNCEMENT = env0_9.ANNOUNCEMENT;
|
||||
if (ANNOUNCEMENT === type) {
|
||||
return {event: AnalyticEvents.ANNOUNCEMENT_MESSAGE_VIEWED, properties: {message_id: a0.messageId,
|
||||
channel_id: a0.channelId, guild_id: a0.guildId, source_channel_id: a0.sourceChannelId,
|
||||
source_guild_id: a0.sourceGuildId}};
|
||||
}
|
||||
const APP_EMBED = env0_9.APP_EMBED;
|
||||
if (APP_EMBED === type) {
|
||||
return {event: AnalyticEvents.APP_EMBED_VIEWED, properties: {application_id: a0.applicationId,
|
||||
link_type: a0.linkType, message_id: a0.messageId, channel_id: a0.channelId, guild_id: a0.guildId}};
|
||||
}
|
||||
const OFFICIAL_MESSAGE = env0_9.OFFICIAL_MESSAGE;
|
||||
if (OFFICIAL_MESSAGE === type) {
|
||||
return {event: AnalyticEvents.OFFICIAL_MESSAGE_VIEWED, properties: {message_id: a0.messageId,
|
||||
channel_id: a0.channelId, guild_id: a0.guildId}};
|
||||
}
|
||||
const VOICE_INVITE_EMBED = env0_9.VOICE_INVITE_EMBED;
|
||||
if (VOICE_INVITE_EMBED === type) {
|
||||
object3 = {};
|
||||
object3.event = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames.VOICE_INVITE_EMBED;
|
||||
object4 = {};
|
||||
object4.impression_type = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes.VIEW;
|
||||
object4.invite_code = a0.inviteCode;
|
||||
object4.invite_guild_id = a0.inviteGuildId;
|
||||
object4.invite_channel_id = a0.inviteChannelId;
|
||||
object4.invite_instance_id = a0.inviteInstanceId;
|
||||
object4.has_active_stream = a0.hasActiveStream;
|
||||
treatmentRendered = a0.treatmentRendered;
|
||||
INVITE_EMBED = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).INVITE_EMBED;
|
||||
if (treatmentRendered) {
|
||||
items2 = [INVITE_EMBED];
|
||||
items2[1] = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).VOICE_CHANNEL_LIST_INVITE_EMBED;
|
||||
r4 = items2;
|
||||
} else {
|
||||
r4 = [INVITE_EMBED];
|
||||
}
|
||||
object4.location_stack = r4;
|
||||
object3.properties = object4;
|
||||
return object3;
|
||||
}
|
||||
return (require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(a0);
|
||||
}
|
||||
|
||||
function getMessageViewKey(a0) { // fn#77258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:2494, offset: 0x01df7200, size: 114 bytes, params: 2, frame: 19
|
||||
const type = a0.type;
|
||||
const VOICE_INVITE_EMBED = env0_9.VOICE_INVITE_EMBED;
|
||||
return type === VOICE_INVITE_EMBED ? '' + a0.messageId + '-' + a0.inviteCode + '-' + a0.type : '' + a0.messageId + '-' + a0.type;
|
||||
}
|
||||
|
||||
function _fun77259(a0) { // fn#77259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:2641, offset: 0x01df7272, size: 228 bytes, params: 2, frame: 16
|
||||
const closure = MessageViewTrackingManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'handleMessageBecameVisible', value: value_77262},
|
||||
{key: 'handleMessageLostVisibility', value: value_77264}, {key: 'handleMessageListVisibilityChange',
|
||||
value: value_77265}, {key: 'clearTimer', value: function(a0) {
|
||||
var property = this.currentlyVisibleMessageTimers[a0];
|
||||
if (property != null) {
|
||||
(0, global.clearTimeout)(property);
|
||||
delete this.currentlyVisibleMessageTimers[a0];
|
||||
}
|
||||
}}, {key: 'handleChannelSelect', value: function() {
|
||||
var r3;
|
||||
var value3;
|
||||
var property = global.Object;
|
||||
var value = property.values(this.currentlyVisibleMessageTimers);
|
||||
var value2 = 0;
|
||||
if (value2 < value.length) {
|
||||
for (r3 = value2; true; r3 = value3) {
|
||||
property = value[r3];
|
||||
(0, global.clearTimeout)(property);
|
||||
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
||||
if (!(value3 < value.length)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.currentlyVisibleMessageTimers = {};
|
||||
this.viewsInCurrentChannel.clear();
|
||||
this.drainBuffer();
|
||||
}}, {key: 'drainBuffer', value: value_77268}, {key: 'bufferViewTrack', value: function(a0) {
|
||||
var env0_0 = this;
|
||||
if (this.batchBuffer.length >= 10) {
|
||||
this.drainBuffer();
|
||||
}
|
||||
this.batchBuffer.push(a0);
|
||||
if (this.batchTimerId == null) {
|
||||
this.batchTimerId = global.setTimeout(_fun77270, 2000);
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function MessageViewTrackingManager(a0) { // fn#77260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:2653, offset: 0x01df7356, size: 272 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, MessageViewTrackingManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(MessageViewTrackingManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_77254()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.currentlyVisibleMessageTimers = {};
|
||||
const Set = global.Set;
|
||||
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set();
|
||||
value.viewsInCurrentChannel = set instanceof Object ? set : value4;
|
||||
const defaultImport = importDefault(1393) /* metro dependency 1393 */;
|
||||
const value6 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
|
||||
const defaultImport2 = new defaultImport({'max': 500, 'maxAge': 60000});
|
||||
value.recentViewTimes = defaultImport2 instanceof Object ? defaultImport2 : value6;
|
||||
value.batchBuffer = [];
|
||||
value.batchTimerId = null;
|
||||
value.actions = {CHANNEL_SELECT: CHANNEL_SELECT_77261};
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_77262(a0) { // fn#77262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3240, offset: 0x01df7479, size: 159 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
var viewsInCurrentChannel;
|
||||
var value2;
|
||||
var Date;
|
||||
const env0_1 = a0;
|
||||
let value = environment.__proto__;
|
||||
value = getMessageViewKey(a0);
|
||||
if (this.currentlyVisibleMessageTimers[value] == null) {
|
||||
viewsInCurrentChannel = this.viewsInCurrentChannel;
|
||||
if (!viewsInCurrentChannel.has(value)) {
|
||||
value2 = this.recentViewTimes.get(value);
|
||||
if (value2 == null) {
|
||||
this.currentlyVisibleMessageTimers[value] = global.setTimeout(_fun77263, 1000);
|
||||
} else {
|
||||
Date = global.Date;
|
||||
if (!(Date.now() - value2 < 60000)) {
|
||||
this.currentlyVisibleMessageTimers[value] = global.setTimeout(_fun77263, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_77264(a0, a1, a2) { // fn#77264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3687, offset: 0x01df7574, size: 131 bytes, params: 4, frame: 21
|
||||
const r1 = a2 != null ? '' + a0 + '-' + a2 + '-' + a1 : '' + a0 + '-' + a1;
|
||||
const property = this.currentlyVisibleMessageTimers[r1];
|
||||
if (property != null) {
|
||||
global.clearTimeout(property);
|
||||
delete this.currentlyVisibleMessageTimers[r1];
|
||||
}
|
||||
}
|
||||
|
||||
function value_77265(a0, a1) { // fn#77265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3907, offset: 0x01df75f7, size: 250 bytes, params: 3, frame: 19
|
||||
var r3;
|
||||
var r2;
|
||||
var r1;
|
||||
var value4;
|
||||
var handleMessageBecameVisible;
|
||||
var value5;
|
||||
var Set;
|
||||
var map;
|
||||
var value7;
|
||||
var prototype;
|
||||
var value8;
|
||||
var set;
|
||||
var value9;
|
||||
var value10;
|
||||
var value11;
|
||||
var endsWith;
|
||||
var HermesInternal;
|
||||
var concat;
|
||||
var value12;
|
||||
var has;
|
||||
var value13;
|
||||
var clearTimer;
|
||||
var value14;
|
||||
let value = environment.__proto__;
|
||||
const value2 = _createForOfIteratorHelperLoose_77251(a0);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
r3 = value3;
|
||||
reducibleLoop1: while (true) {
|
||||
value4 = r3.value;
|
||||
handleMessageBecameVisible = this.handleMessageBecameVisible;
|
||||
Reflect.apply(handleMessageBecameVisible, this, [value4]);
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break reducibleLoop1;
|
||||
}
|
||||
r3 = value5;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
const Object = global.Object;
|
||||
const value6 = Object.keys(this.currentlyVisibleMessageTimers);
|
||||
reducibleJoin9: while (true) {
|
||||
if (!(value6.length > 0)) {
|
||||
break reducibleJoin9;
|
||||
}
|
||||
Set = global.Set;
|
||||
map = a0.map;
|
||||
value7 = Reflect.apply(map, a0, [getMessageViewKey]);
|
||||
prototype = Set.prototype;
|
||||
value8 = Object.create(prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
value9 = set instanceof Object ? set : value8;
|
||||
value = _createForOfIteratorHelperLoose_77251(value6);
|
||||
value10 = value();
|
||||
done = value10.done;
|
||||
if (done) {
|
||||
break reducibleJoin9;
|
||||
}
|
||||
r2 = value10;
|
||||
reducibleLoop4: while (true) {
|
||||
value11 = r2.value;
|
||||
endsWith = value11.endsWith;
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
value12 = Reflect.apply(endsWith, value11, ['-' + a1]);
|
||||
reducibleJoin6: while (true) {
|
||||
if (value12) {
|
||||
has = value9.has;
|
||||
value13 = !Reflect.apply(has, value9, [value11]);
|
||||
r1 = value13;
|
||||
break reducibleJoin6;
|
||||
}
|
||||
r1 = value12;
|
||||
break reducibleJoin6;
|
||||
}
|
||||
reducibleJoin8: while (true) {
|
||||
if (r1) {
|
||||
clearTimer = this.clearTimer;
|
||||
Reflect.apply(clearTimer, this, [value11]);
|
||||
break reducibleJoin8;
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
value14 = value();
|
||||
done = value14.done;
|
||||
if (done) {
|
||||
break reducibleJoin9;
|
||||
}
|
||||
r2 = value14;
|
||||
continue reducibleLoop4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_77268() { // fn#77268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:4692, offset: 0x01df778e, size: 156 bytes, params: 1, frame: 19
|
||||
var r3;
|
||||
var getAnalyticsConfigBinding;
|
||||
var value4;
|
||||
var analyticsConfigBinding;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var event;
|
||||
var properties;
|
||||
var value6;
|
||||
var clearTimeout;
|
||||
const value2 = _createForOfIteratorHelperLoose_77251(this.batchBuffer);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
r3 = value3;
|
||||
reducibleLoop1: while (true) {
|
||||
getAnalyticsConfigBinding = getAnalyticsConfig;
|
||||
value4 = r3.value;
|
||||
analyticsConfigBinding = getAnalyticsConfigBinding(value4);
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
event = analyticsConfigBinding.event;
|
||||
properties = analyticsConfigBinding.properties;
|
||||
Reflect.apply(track, defaultImport, [event, properties]);
|
||||
value6 = value2();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
break reducibleLoop1;
|
||||
}
|
||||
r3 = value6;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
}
|
||||
this.batchBuffer = [];
|
||||
let batchTimerId = this.batchTimerId;
|
||||
reducibleJoin4: while (true) {
|
||||
if (batchTimerId == null) {
|
||||
break reducibleJoin4;
|
||||
}
|
||||
clearTimeout = global.clearTimeout;
|
||||
batchTimerId = this.batchTimerId;
|
||||
clearTimeout(batchTimerId);
|
||||
this.batchTimerId = null;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
}
|
||||
|
||||
function value_77269(a0) { // fn#77269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:4985, offset: 0x01df782a, size: 107 bytes, params: 2, frame: 14
|
||||
if (this.batchBuffer.length >= 10) {
|
||||
this.drainBuffer();
|
||||
}
|
||||
this.batchBuffer.push(a0);
|
||||
if (this.batchTimerId == null) {
|
||||
this.batchTimerId = global.setTimeout(_fun77270, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
function MessageViewTrackingManagerCHANNEL_SELECT() { // fn#77261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3100, owner: MessageViewTrackingManager.CHANNEL_SELECT, offset: 0x01df7466, size: 19 bytes, params: 1, frame: 9
|
||||
return env0_0.handleChannelSelect();
|
||||
}
|
||||
|
||||
function _fun77263() { // fn#77263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:3448, offset: 0x01df7518, size: 92 bytes, params: 1, frame: 16
|
||||
const binding = env0_0;
|
||||
const currentlyVisibleMessageTimers = binding.currentlyVisibleMessageTimers;
|
||||
const binding2 = env0_2;
|
||||
delete currentlyVisibleMessageTimers[binding2];
|
||||
binding.viewsInCurrentChannel.add(binding2);
|
||||
const recentViewTimes = binding.recentViewTimes;
|
||||
const set = recentViewTimes.set;
|
||||
const Date = global.Date;
|
||||
Reflect.apply(set, recentViewTimes, [binding2, Date.now()]);
|
||||
binding.bufferViewTrack(env0_1);
|
||||
}
|
||||
|
||||
function _fun77270() { // fn#77270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10041:5126, offset: 0x01df7895, size: 19 bytes, params: 1, frame: 9
|
||||
return env0_0.drainBuffer();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
/* Metro module 9779; source: modules/messages/MosaicMediaType.tsx; dependencies: [661, 4631, 1391, 9780, 2] */
|
||||
function _fun76714(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9965:6, offset: 0x01de2197, size: 165 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(661) /* metro dependency 661: Constants */).MessageAttachmentFlags;
|
||||
const env0_3 = RegExp('\\.(mp3|m4a|ogg|opus|wav|flac)$', 'i');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/MosaicMediaType.tsx');
|
||||
exports.isVisualMedia = function(a0) {
|
||||
var r0;
|
||||
r0 = a0 === 'IMAGE' || a0 === 'VIDEO';
|
||||
r0 = !r0 ? a0 === 'CLIP' : r0;
|
||||
r0 = !r0 ? a0 === 'VISUAL_PLACEHOLDER' : r0;
|
||||
return r0;
|
||||
};
|
||||
exports.getMosaicMediaTypeForAttachment = getMosaicMediaTypeForAttachment;
|
||||
exports.getMosaicMediaTypeForUnfurledMediaItem = getMosaicMediaTypeForUnfurledMediaItem;
|
||||
}
|
||||
|
||||
function getMosaicMediaTypeForAttachment(a0, a1) { // fn#76716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9965:351, offset: 0x01de226c, size: 345 bytes, params: 3, frame: 20
|
||||
var r1;
|
||||
var r0;
|
||||
var r2;
|
||||
var value;
|
||||
var binding;
|
||||
var url;
|
||||
var moduleValue;
|
||||
var isVideoFile2;
|
||||
var value5;
|
||||
var moduleValue4;
|
||||
const filename = a0.filename;
|
||||
const width = a0.width;
|
||||
const height = a0.height;
|
||||
if (a1) {
|
||||
if (width == null) {
|
||||
if (a1 == null) {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
binding = env0_3;
|
||||
if (binding.test(filename)) {
|
||||
url = a0.url;
|
||||
value = 'AUDIO';
|
||||
if (url != null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
value = 0;
|
||||
if (width > value) {
|
||||
if (height == null) {
|
||||
if (a1 == null) {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
binding = env0_3;
|
||||
if (binding.test(filename)) {
|
||||
url = a0.url;
|
||||
value = 'AUDIO';
|
||||
if (url != null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
}
|
||||
} else if (height > value) {
|
||||
if ((require(4631) /* metro dependency 4631: MediaFormatTesters */).isImageFile(filename)) {
|
||||
r1 = 'IMAGE';
|
||||
} else {
|
||||
isVideoFile2 = (require(4631) /* metro dependency 4631: MediaFormatTesters */).isVideoFile(filename);
|
||||
value5 = 'INVALID';
|
||||
if (isVideoFile2) {
|
||||
if (a0.proxy_url != null) {
|
||||
moduleValue4 = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
value = moduleValue4.hasFlag(a0.flags ?? value, MessageAttachmentFlags.IS_CLIP);
|
||||
r2 = value ? 'CLIP' : 'VIDEO';
|
||||
} else {
|
||||
r2 = value5;
|
||||
}
|
||||
} else {
|
||||
r2 = value5;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else if (a1 == null) {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
binding = env0_3;
|
||||
if (binding.test(filename)) {
|
||||
url = a0.url;
|
||||
value = 'AUDIO';
|
||||
if (url != null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
}
|
||||
} else if (a1 == null) {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
binding = env0_3;
|
||||
if (binding.test(filename)) {
|
||||
url = a0.url;
|
||||
value = 'AUDIO';
|
||||
if (url != null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (a1 == null) {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
binding = env0_3;
|
||||
if (binding.test(filename)) {
|
||||
url = a0.url;
|
||||
value = 'AUDIO';
|
||||
if (url != null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
} else {
|
||||
url = a0.url;
|
||||
value = 'OTHER';
|
||||
if (url != null) {
|
||||
moduleValue = require(9780) /* metro dependency 9780: PlaintextFilePreviewHelpers */;
|
||||
r1 = moduleValue.isPlaintextPreviewableFile(filename) ? 'PLAINTEXT_PREVIEW' : value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getMosaicMediaTypeForUnfurledMediaItem({contentType, width, height}) { // fn#76717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9965:782, offset: 0x01de23c5, size: 127 bytes, params: 2, frame: 14
|
||||
var value;
|
||||
var moduleValue;
|
||||
if (width != null) {
|
||||
if (width > 0) {
|
||||
if (height == null) {
|
||||
return 'VISUAL_PLACEHOLDER';
|
||||
}
|
||||
if (height > 0) {
|
||||
moduleValue = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
||||
if (moduleValue.isImageContentType(contentType)) {
|
||||
return 'IMAGE';
|
||||
}
|
||||
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
|
||||
if (value.isVideoContentType(contentType)) {
|
||||
return 'VIDEO';
|
||||
}
|
||||
return 'VISUAL_PLACEHOLDER';
|
||||
}
|
||||
return 'VISUAL_PLACEHOLDER';
|
||||
}
|
||||
}
|
||||
return 'VISUAL_PLACEHOLDER';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Metro module 9780; source: modules/messages/PlaintextFilePreviewHelpers.tsx; dependencies: [2] */
|
||||
function _fun76718(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9966:6, offset: 0x01de2444, size: 135 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const Set = global.Set;
|
||||
const set = new Set(['1c', '4d', 'abnf', 'accesslog', 'ada', 'arduino', 'ino', 'armasm', 'arm', 'avrasm',
|
||||
'actionscript', 'as', 'ass', 'ssa', 'alan', 'ansi', 'i', 'log', 'ln', 'angelscript', 'asc', 'apache',
|
||||
'apacheconf', 'applescript', 'osascript', 'arcade', 'asciidoc', 'adoc', 'aspectj', 'autohotkey', 'autoit',
|
||||
'awk', 'mawk', 'nawk', 'gawk', 'bash', 'sh', 'zsh', 'basic', 'bbcode', 'blade', 'bnf', 'brainfuck', 'bf',
|
||||
'csharp', 'cs', 'c', 'h', 'cpp', 'hpp', 'cc', 'hh', 'c++', 'h++', 'cxx', 'hxx', 'cal', 'cos', 'cls', 'cmake',
|
||||
'cmake.in', 'coq', 'csp', 'css', 'csv', 'capnproto', 'capnp', 'chaos', 'kaos', 'chapel', 'chpl', 'cisco',
|
||||
'clojure', 'clj', 'coffeescript', 'coffee', 'cson', 'iced', 'cpc', 'crmsh', 'crm', 'pcmk', 'crystal', 'cr',
|
||||
'cypher', 'd', 'dns', 'zone', 'bind', 'dos', 'bat', 'cmd', 'dart', 'delphi', 'dpr', 'dfm', 'pas', 'pascal',
|
||||
'freepascal', 'lazarus', 'lpr', 'lfm', 'diff', 'patch', 'django', 'jinja', 'dockerfile', 'docker', 'dsconfig',
|
||||
'dts', 'dust', 'dst', 'dylan', 'ebnf', 'elixir', 'ex', 'elm', 'erlang', 'erl', 'extempore', 'xtlang', 'xtm',
|
||||
'fsharp', 'fs', 'fix', 'fortran', 'f90', 'f95', 'gcode', 'nc', 'gams', 'gms', 'gauss', 'gss', 'godot',
|
||||
'gdscript', 'gherkin', 'gn', 'gni', 'go', 'golang', 'gf', 'golo', 'gololang', 'gradle', 'groovy', 'xml', 'html',
|
||||
'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist', 'svg', 'http', 'https', 'haml', 'handlebars', 'hbs',
|
||||
'html.hbs', 'html.handlebars', 'haskell', 'hs', 'haxe', 'hx', 'hy', 'hylang', 'ini', 'toml', 'inform7', 'i7',
|
||||
'irpf90', 'json', 'java', 'jsp', 'javascript', 'js', 'jsx', 'jolie', 'iol', 'ol', 'julia', 'julia-repl',
|
||||
'kotlin', 'kt', 'tex', 'leaf', 'lean', 'lasso', 'ls', 'lassoscript', 'less', 'ldif', 'lisp', 'livecodeserver',
|
||||
'livescript', 'lock', 'ls', 'lua', 'makefile', 'mk', 'mak', 'make', 'markdown', 'md', 'mkdown', 'mkd',
|
||||
'mathematica', 'mma', 'wl', 'matlab', 'maxima', 'mel', 'mercury', 'mirc', 'mrc', 'mizar', 'mojolicious',
|
||||
'monkey', 'moonscript', 'moon', 'n1ql', 'nsis', 'never', 'nginx', 'nginxconf', 'nim', 'nimrod', 'nix', 'ocl',
|
||||
'ocaml', 'ml', 'objectivec', 'mm', 'objc', 'obj-c', 'obj-c++', 'objective-c++', 'glsl', 'openscad', 'scad',
|
||||
'ruleslanguage', 'oxygene', 'pf', 'pf.conf', 'php', 'php3', 'php4', 'php5', 'php6', 'php7', 'parser3', 'perl',
|
||||
'pl', 'pm', 'plaintext', 'txt', 'text', 'pony', 'pgsql', 'postgres', 'postgresql', 'powershell', 'ps', 'ps1',
|
||||
'processing', 'prolog', 'properties', 'proto', 'protobuf', 'puppet', 'pp', 'python', 'py', 'gyp', 'profile',
|
||||
'python-repl', 'pycon', 'k', 'kdb', 'qml', 'r', 'cshtml', 'razor', 'razor-cshtml', 'reasonml', 're', 'redbol',
|
||||
'rebol', 'red', 'red-system', 'rib', 'rsl', 'graph', 'instances', 'robot', 'rf', 'rpm-specfile', 'rpm', 'spec',
|
||||
'rpm-spec', 'specfile', 'ruby', 'rb', 'gemspec', 'podspec', 'thor', 'irb', 'rust', 'rs', 'SAS', 'sas', 'scss',
|
||||
'sql', 'p21', 'step', 'stp', 'scala', 'scheme', 'scilab', 'sci', 'shexc', 'shell', 'console', 'smali',
|
||||
'smalltalk', 'st', 'sml', 'ml', 'solidity', 'sol', 'stan', 'stanfuncs', 'stata', 'iecst', 'scl',
|
||||
'structured-text', 'stylus', 'styl', 'subunit', 'supercollider', 'sc', 'srt', 'svelte', 'swift', 'tcl', 'tk',
|
||||
'terraform', 'tf', 'hcl', 'tap', 'thrift', 'tp', 'tsql', 'ttml', 'twig', 'craftcms', 'typescript', 'ts', 'tsx',
|
||||
'unicorn-rails-log', 'vbnet', 'vb', 'vba', 'vbscript', 'vbs', 'vhdl', 'vala', 'verilog', 'v', 'vim', 'vtt',
|
||||
'axapta', 'x++', 'x86asm', 'xl', 'tao', 'xquery', 'xpath', 'xq', 'yml', 'yaml', 'zephir', 'zep']);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/PlaintextFilePreviewHelpers.tsx');
|
||||
exports.PLAINTEXT_FILE_EXTENSIONS = set;
|
||||
exports.isPlaintextPreviewableFile = isPlaintextPreviewableFile;
|
||||
}
|
||||
|
||||
function isPlaintextPreviewableFile(a0) { // fn#76719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9966:3282, offset: 0x01de24cb, size: 58 bytes, params: 2, frame: 13
|
||||
const binding = env0_0;
|
||||
const has = binding.has;
|
||||
let value = a0.split('.');
|
||||
value = value.slice(-1);
|
||||
return Reflect.apply(has, binding, [value[0]]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 11006; source: modules/messages/SendMessageOptionsStore.tsx; dependencies: [6, 7, 15, 17, 18, 4503, 566, 694, 2] */
|
||||
function _fun84263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:6, offset: 0x01f42dc4, size: 293 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_5 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
|
||||
const env0_6 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun84267(Store);
|
||||
value.displayName = 'SendMessageOptionsStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {MESSAGE_CREATE: MESSAGE_CREATE_84270});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/SendMessageOptionsStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_84264() { // fn#84264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:178, offset: 0x01f42ee9, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_84264_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun84267(a0) { // fn#84267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:386, offset: 0x01f42f4b, size: 72 bytes, params: 2, frame: 15
|
||||
const closure = SendMessageOptionsStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'getOptions', value: value_84269}]);
|
||||
}
|
||||
|
||||
function MESSAGE_CREATE_84270({message, sendMessageOptions}) { // fn#84270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11192:851, offset: 0x01f42f93, size: 130 bytes, params: 2, frame: 17
|
||||
var binding;
|
||||
var id;
|
||||
var object2;
|
||||
if (sendMessageOptions != null) {
|
||||
binding = env0_6;
|
||||
id = message.id;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, sendMessageOptions, undefined);
|
||||
object2['location'] = sendMessageOptions.location ?? MessageSendLocation.OTHER;
|
||||
binding[id] = object2;
|
||||
}
|
||||
if (message.nonce != null && message.nonce in env0_6) {
|
||||
delete env0_6[message.nonce];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 7148; source: modules/messages/SentMessageIntentsHandler.android.tsx; dependencies: [2] */
|
||||
function _fun57175(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7326:6, offset: 0x013de74f, size: 112 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/SentMessageIntentsHandler.android.tsx');
|
||||
exports.default = {init: function() {
|
||||
}, donateSentMessage: function() {
|
||||
}, deleteAllInteractions: function() {
|
||||
}};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
/* Metro module 9598; source: modules/messages/SignedAttachmentLinkUtils.tsx; dependencies: [5, 661, 672, 1471, 507, 2] */
|
||||
function _fun75228(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:6, offset: 0x01da70f0, size: 648 bytes, params: 8, frame: 26
|
||||
const env0_0 = require;
|
||||
const closure = isAttachmentUrl;
|
||||
const closure2 = function({searchParams}) {
|
||||
var value = searchParams.get('ex');
|
||||
searchParams = global.parseInt;
|
||||
var r2 = value ?? '';
|
||||
value = undefined;
|
||||
var int = searchParams(r2, 16);
|
||||
return (0, global.isNaN)(int) ? value : int * importDefault(dependencyMap[2]).Millis.SECOND;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = undefined;
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
const closure3 = function(a0) {
|
||||
return a0 == null ? undefined : a0.split(':')[0];
|
||||
};
|
||||
let Set = global.Set;
|
||||
let set = new Set(['/attachments/', '/ephemeral-attachments/']);
|
||||
Set = global.Set;
|
||||
set = new Set(['/external/']);
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const HOUR = Millis.HOUR;
|
||||
const env0_7 = 1 * HOUR;
|
||||
Set = global.Set;
|
||||
let GLOBAL_ENV = global.window.GLOBAL_ENV;
|
||||
const CDN_HOST = GLOBAL_ENV.CDN_HOST;
|
||||
items = [CDN_HOST];
|
||||
GLOBAL_ENV = global.window.GLOBAL_ENV;
|
||||
const MEDIA_PROXY_ENDPOINT = GLOBAL_ENV.MEDIA_PROXY_ENDPOINT;
|
||||
items[1] = MEDIA_PROXY_ENDPOINT == null ? value : MEDIA_PROXY_ENDPOINT.substring(2);
|
||||
const value7 = items.map(closure3);
|
||||
let filter = value7.filter;
|
||||
let Boolean = global.Boolean;
|
||||
set = new Set(Reflect.apply(filter, value7, [Boolean]));
|
||||
Set = global.Set;
|
||||
GLOBAL_ENV = global.window.GLOBAL_ENV;
|
||||
const IMAGE_PROXY_ENDPOINTS = GLOBAL_ENV.IMAGE_PROXY_ENDPOINTS;
|
||||
let r12 = IMAGE_PROXY_ENDPOINTS == null ? value : IMAGE_PROXY_ENDPOINTS.split(',');
|
||||
r12 = r12 ?? [];
|
||||
const value13 = r12.map(function(a0) {
|
||||
return a0.substring(2);
|
||||
}).map(closure3);
|
||||
filter = value13.filter;
|
||||
Boolean = global.Boolean;
|
||||
set = new Set(Reflect.apply(filter, value13, [Boolean]));
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/SignedAttachmentLinkUtils.tsx');
|
||||
exports.isAttachmentUrl = closure;
|
||||
exports.isExternalProxiedAttachmentUrl = isExternalProxiedAttachmentUrl;
|
||||
exports.removeSignedUrlParameters = removeSignedUrlParameters;
|
||||
exports.getSignedAttachmentExpiration = closure2;
|
||||
exports.messageHasExpiredAttachmentUrl = messageHasExpiredAttachmentUrl;
|
||||
exports.maybeRefreshAttachmentUrl = function() {
|
||||
return _maybeRefreshAttachmentUrl.apply(this, arguments);
|
||||
};
|
||||
return value;
|
||||
}
|
||||
|
||||
function isAttachmentUrl(a0) { // fn#75229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:612, offset: 0x01da7378, size: 86 bytes, params: 2, frame: 13
|
||||
const env0_0 = a0;
|
||||
const binding = env0_8;
|
||||
const value2 = binding.has(a0.hostname);
|
||||
const Array = global.Array;
|
||||
let value = Array.from(env0_5);
|
||||
value = value.some(_fun75230);
|
||||
return value2 ? value : !!value2;
|
||||
}
|
||||
|
||||
function shouldRefreshAttachmentUrl(a0) { // fn#75232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:877, offset: 0x01da7460, size: 57 bytes, params: 2, frame: 13
|
||||
const signedAttachmentExpiration = getSignedAttachmentExpiration(a0);
|
||||
return signedAttachmentExpiration == null || signedAttachmentExpiration <= global.Date.now() + env0_7;
|
||||
}
|
||||
|
||||
function isAttachmentExpired({url}) { // fn#75233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:987, offset: 0x01da7499, size: 64 bytes, params: 2, frame: 13
|
||||
const value2 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(url);
|
||||
return value2 != null && shouldRefreshAttachmentUrl(value2);
|
||||
}
|
||||
|
||||
function isEmbedMediaExpiredAttachment(a0) { // fn#75234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1096, offset: 0x01da74d9, size: 93 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var isAttachmentUrl2;
|
||||
if (a0 == null) {
|
||||
return false;
|
||||
}
|
||||
const defaultImport = importDefault(1471) /* metro dependency 1471: URLUtils */;
|
||||
const value2 = defaultImport.toURLSafe(a0.url);
|
||||
const value3 = value2 != null;
|
||||
if (value3) {
|
||||
isAttachmentUrl2 = isAttachmentUrl(value2);
|
||||
r0 = isAttachmentUrl2 ? shouldRefreshAttachmentUrl(value2) : !!isAttachmentUrl2;
|
||||
} else {
|
||||
r0 = value3;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function embedHasExpiredAttachmentUrl(a0) { // fn#75235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1259, offset: 0x01da7536, size: 81 bytes, params: 2, frame: 16
|
||||
let r0 = isEmbedMediaExpiredAttachment(a0.image) || a0.images?.some(isEmbedMediaExpiredAttachment);
|
||||
r0 = !r0 ? isEmbedMediaExpiredAttachment(a0.video) : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _refreshAttachmentUrl() { // fn#75236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1459, offset: 0x01da7587, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun75238).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _maybeRefreshAttachmentUrl() { // fn#75239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1727, offset: 0x01da765e, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun75241).apply(this, arguments);
|
||||
}
|
||||
|
||||
function isExternalProxiedAttachmentUrl(a0) { // fn#75245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:2222, offset: 0x01da7743, size: 86 bytes, params: 2, frame: 13
|
||||
const env0_0 = a0;
|
||||
const binding = env0_9;
|
||||
const value2 = binding.has(a0.hostname);
|
||||
const Array = global.Array;
|
||||
let value = Array.from(env0_6);
|
||||
value = value.some(_fun75246);
|
||||
return value2 ? value : !!value2;
|
||||
}
|
||||
|
||||
function removeSignedUrlParameters(a0) { // fn#75247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:2383, offset: 0x01da7799, size: 105 bytes, params: 2, frame: 15
|
||||
var r3;
|
||||
var property;
|
||||
var searchParams;
|
||||
var value3;
|
||||
let value = importDefault(1471) /* metro dependency 1471: URLUtils */;
|
||||
value = value.toURLSafe(a0);
|
||||
if (value == null) {
|
||||
return a0;
|
||||
}
|
||||
const items2 = ['ex', 'is', 'hm'];
|
||||
let length = items2.length;
|
||||
const value2 = 0;
|
||||
if (value2 < length) {
|
||||
r3 = value2;
|
||||
reducibleLoop2: while (true) {
|
||||
property = items2[r3];
|
||||
searchParams = value.searchParams;
|
||||
searchParams.delete(property);
|
||||
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
||||
length = items2.length;
|
||||
if (value3 < length) {
|
||||
r3 = value3;
|
||||
continue reducibleLoop2;
|
||||
}
|
||||
break reducibleLoop2;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function messageHasExpiredAttachmentUrl(a0) { // fn#75248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:2656, offset: 0x01da7802, size: 53 bytes, params: 2, frame: 13
|
||||
const attachments = a0.attachments;
|
||||
return attachments.some(isAttachmentExpired) || a0.embeds.some(embedHasExpiredAttachmentUrl);
|
||||
}
|
||||
|
||||
function _fun75230(a0) { // fn#75230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:686, offset: 0x01da73ce, size: 29 bytes, params: 2, frame: 11
|
||||
return env0_0.pathname.startsWith(a0);
|
||||
}
|
||||
|
||||
function* _fun75238(a0) { // fn#75238, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1524, offset: 0x01da75c4, size: 154 bytes, params: 2, frame: 16
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const binding = env2_0;
|
||||
const value3 = undefined;
|
||||
const HTTP = binding(env2_2[4]).HTTP;
|
||||
const post = HTTP.post;
|
||||
const ATTACHMENTS_REFRESH_URLS = env2_4.ATTACHMENTS_REFRESH_URLS;
|
||||
yield Reflect.apply(post, HTTP, [{url: ATTACHMENTS_REFRESH_URLS, body: {attachment_urls: [a0]},
|
||||
rejectWithError: false}]);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
return value.ok ? value.body.refreshed_urls[0].refreshed : value3;
|
||||
}
|
||||
|
||||
function* _fun75241(a0) { // fn#75241, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9784:1802, offset: 0x01da769b, size: 113 bytes, params: 2, frame: 15
|
||||
var value7;
|
||||
const value = a0;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const value6 = env2_1(env2_2[3]).toURLSafe(value);
|
||||
if (value6 != null) {
|
||||
if (env2_12(value6)) {
|
||||
yield refreshAttachmentUrl(value);
|
||||
value7 = undefined;
|
||||
if (false) {
|
||||
return value7;
|
||||
}
|
||||
return value7 ?? value;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* Metro module 9856; source: modules/messages/VoiceChannelListInviteExperiment.tsx; dependencies: [4620, 2] */
|
||||
function _fun77271(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10042:6, offset: 0x01df78a8, size: 194 bytes, params: 8, frame: 22
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(4620) /* metro dependency 4620: experiments */).createExperiment({'kind': 'guild',
|
||||
'id': '2026-05_voice_channel_list_invite_embed', 'label': 'Voice Channel List Invite Embed',
|
||||
defaultConfig: {enabled: false}, treatments: [{'id': 1, 'label': 'Enable channel-list-style voice invite embed',
|
||||
config: {enabled: true}}]});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/VoiceChannelListInviteExperiment.tsx');
|
||||
exports.getVoiceChannelListInviteExperiment = getVoiceChannelListInviteExperiment;
|
||||
exports.useVoiceChannelListInviteExperiment = useVoiceChannelListInviteExperiment;
|
||||
}
|
||||
|
||||
function getVoiceChannelListInviteExperiment({guildId, location}) { // fn#77272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10042:469, offset: 0x01df796a, size: 43 bytes, params: 2, frame: 13
|
||||
return env0_0.getCurrentConfig({guildId: guildId, location: location});
|
||||
}
|
||||
|
||||
function useVoiceChannelListInviteExperiment({guildId, location}) { // fn#77273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10042:627, offset: 0x01df7995, size: 43 bytes, params: 2, frame: 13
|
||||
return env0_0.useExperiment({guildId: guildId, location: location});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
/* Metro module 8319; source: modules/messages/VoiceSessionUtils.tsx; dependencies: [31, 5221, 1379, 1878, 8320, 566, 8213, 4634, 1244, 22, 2] */
|
||||
function _fun66244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:6, offset: 0x01bf4d30, size: 201 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = function(a0) {
|
||||
return require(dependencyMap[4]).maybeSortByProbability(_fun66246(a0),
|
||||
UserAffinitiesV2Store.getUserAffinitiesMap(),
|
||||
'VoiceSessionUtils - participants');
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/VoiceSessionUtils.tsx');
|
||||
exports.getSortedVoiceSessionParticipants = closure;
|
||||
exports.useSortedVoiceSessionParticipants = useSortedVoiceSessionParticipants;
|
||||
exports.getVoiceSessionMessageContent = getVoiceSessionMessageContent;
|
||||
}
|
||||
|
||||
function getSortedVoiceSessionParticipants(a0) { // fn#66245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:136, offset: 0x01bf4df9, size: 77 bytes, params: 2, frame: 16
|
||||
return (require(8320) /* metro dependency 8320: maybeSortByProbability */).maybeSortByProbability(((a0) => {
|
||||
var r0;
|
||||
var env0_0 = a0;
|
||||
var property = a0.call;
|
||||
r0 = property == null ? undefined : property.participants.reduce(_fun66247, []);
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
})(a0), UserAffinitiesV2Store.getUserAffinitiesMap(), 'VoiceSessionUtils - participants');
|
||||
}
|
||||
|
||||
function useSortedVoiceSessionParticipants(a0) { // fn#66248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:638, offset: 0x01bf4ee6, size: 121 bytes, params: 2, frame: 18
|
||||
return env0_3.useMemo(_fun66255, [((a0) => {
|
||||
var env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun66250,
|
||||
[a0.author.id, a0.call]);
|
||||
})(a0), (require(566) /* metro dependency 566: flux */).useStateFromStores([UserAffinitiesV2Store], function() {
|
||||
return UserAffinitiesV2Store.getUserAffinitiesMap();
|
||||
}, [])]);
|
||||
}
|
||||
|
||||
function getVoiceSessionMessageContent(a0) { // fn#66256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:1125, offset: 0x01bf50af, size: 461 bytes, params: 2, frame: 24
|
||||
var nick;
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var atbXuX;
|
||||
var object2;
|
||||
var length;
|
||||
const identity = (require(22) /* metro dependency 22 */).identity;
|
||||
var property;
|
||||
const env0_0 = ChannelStore.getChannel(a0.channel_id);
|
||||
const value2 = undefined;
|
||||
const value3 = (importDefault(8213) /* metro dependency 8213: getHumanizedCallDuration */)(a0);
|
||||
const messageAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getMessageAuthor(a0);
|
||||
const value6 = getSortedVoiceSessionParticipants(a0).map(_fun66257);
|
||||
if (value3 == null) {
|
||||
r0 = intl.formatToPlainString(t.HzBfIN, {username: messageAuthor.nick, usernameOnClick: identity});
|
||||
} else {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
atbXuX = t.atbXuX;
|
||||
object2 = {};
|
||||
length = value6.length;
|
||||
object2.userCount = length + 1;
|
||||
nick = messageAuthor.nick;
|
||||
object2.username = nick;
|
||||
object2.usernameOnClick = identity;
|
||||
property = value6[0];
|
||||
nick = property == null ? value2 : property.messageAuthor.nick;
|
||||
object2.username2 = nick;
|
||||
object2.username2OnClick = identity;
|
||||
property = value6[1];
|
||||
nick = property == null ? value2 : property.messageAuthor.nick;
|
||||
object2.username3 = nick;
|
||||
object2.username3OnClick = identity;
|
||||
length = value6.length;
|
||||
object2.otherCount = length - 1;
|
||||
object2.duration = value3;
|
||||
r0 = Reflect.apply(formatToPlainString, intl, [atbXuX, object2]);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun66246(a0) { // fn#66246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:189, offset: 0x01bf4e46, size: 64 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
const call = a0.call;
|
||||
let r0 = call == null ? undefined : call.participants.reduce(_fun66247, []);
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun66249(a0) { // fn#66249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:691, offset: 0x01bf4f5f, size: 96 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun66250,
|
||||
[a0.author.id, a0.call]);
|
||||
}
|
||||
|
||||
function _fun66255() { // fn#66255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:1009, offset: 0x01bf5076, size: 57 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(8320) /* metro dependency 8320: maybeSortByProbability */;
|
||||
return value.maybeSortByProbability(env0_0, env0_1, 'VoiceSessionUtils - participants');
|
||||
}
|
||||
|
||||
function _fun66257(a0) { // fn#66257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:1291, offset: 0x01bf527c, size: 60 bytes, params: 2, frame: 14
|
||||
const object2 = {user: a0};
|
||||
const value = environment.__proto__;
|
||||
object2.messageAuthor = (require(4634) /* metro dependency 4634: useMessageAuthor */).getUserAuthor(a0, env0_0);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun66247(a0, a1) { // fn#66247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:264, offset: 0x01bf4e86, size: 96 bytes, params: 3, frame: 15
|
||||
var r0;
|
||||
var items2;
|
||||
let value = a0;
|
||||
const user = UserStore.getUser(a1);
|
||||
if (user == null) {
|
||||
r0 = value;
|
||||
} else if (user.id === env0_0.author.id) {
|
||||
r0 = value;
|
||||
} else {
|
||||
items2 = [];
|
||||
value = arraySpread(items2, value, 0, value);
|
||||
items2[value] = user;
|
||||
value + 1;
|
||||
r0 = items2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun66250() { // fn#66250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:731, offset: 0x01bf4fbf, size: 109 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var value;
|
||||
if (env0_0.call?.participants != null) {
|
||||
value = env0_0.call.participants.map(function(a0) {
|
||||
return UserStore.getUser(a0);
|
||||
});
|
||||
value = value.filter(_fun66252);
|
||||
value = value.filter(_fun66253);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = [];
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun66253({id}) { // fn#66253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8504:868, offset: 0x01bf5043, size: 32 bytes, params: 2, frame: 2
|
||||
return id !== env1_0.author.id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Metro module 4632; source: modules/messages/WebViewWebmSupportTest.native.tsx; dependencies: [477, 4092, 2] */
|
||||
function _fun39864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4810:6, offset: 0x010ee04e, size: 94 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/WebViewWebmSupportTest.native.tsx');
|
||||
exports.isIOSWithWebM = isIOSWithWebM;
|
||||
}
|
||||
|
||||
function isIOSWithWebM() { // fn#39865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4810:207, offset: 0x010ee0ac, size: 233 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var r1;
|
||||
var r3;
|
||||
var r2;
|
||||
var value6;
|
||||
var value7;
|
||||
var value;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
value = require(4092) /* metro dependency 4092: DeviceUtils */;
|
||||
value = value.getSocName();
|
||||
r0 = value == null || !value.startsWith('ARM64_');
|
||||
if (!r0) {
|
||||
value = value.substring(6);
|
||||
r1 = value[0] !== 'T' && value[0] !== 'S';
|
||||
if (!r1) {
|
||||
value = value.substring(1);
|
||||
value6 = value[0] !== '7';
|
||||
if (value6) {
|
||||
value7 = value[0] !== '8';
|
||||
if (value7) {
|
||||
r3 = value7;
|
||||
} else {
|
||||
value = global.parseInt(value, 10);
|
||||
value = value >= 8101;
|
||||
r3 = value;
|
||||
}
|
||||
r2 = r3;
|
||||
} else {
|
||||
r2 = value6;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 16156; source: modules/messages/YYTextReplacementExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun124895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16364:6, offset: 0x025c6a9c, size: 158 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-01-yytext-replacement-ios',
|
||||
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/YYTextReplacementExperiment.tsx');
|
||||
exports.shouldEnableYYTextReplacement = shouldEnableYYTextReplacement;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 5260; source: modules/messages/canEditMessage.tsx; dependencies: [661, 5216, 4625, 4845, 2] */
|
||||
function _fun46780(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5438:6, offset: 0x011aea56, size: 142 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_3 = constantsModule.MessageFlags;
|
||||
const env0_4 = constantsModule.MessageStates;
|
||||
const env0_5 = constantsModule.MessageTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/canEditMessage.tsx');
|
||||
exports.default = canEditMessage;
|
||||
}
|
||||
|
||||
function canEditMessage(a0, a1) { // fn#46781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5438:237, offset: 0x011aeae4, size: 275 bytes, params: 3, frame: 22
|
||||
var r3;
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
var value2;
|
||||
var value3;
|
||||
var canEditMessageWithStickers2;
|
||||
let value = a1 != null;
|
||||
if (value) {
|
||||
value = a0.author.id === a1;
|
||||
if (value) {
|
||||
value2 = a0.state === MessageStates.SENT;
|
||||
if (value2) {
|
||||
value3 = (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a0);
|
||||
if (value3) {
|
||||
r3 = !value3;
|
||||
} else {
|
||||
canEditMessageWithStickers2 = (require(4625) /* metro dependency 4625: MessageRecordUtils */).canEditMessageWithStickers(a0);
|
||||
r3 = canEditMessageWithStickers2 ? !a0.hasFlag(MessageFlags.IS_VOICE_MESSAGE) && (a0.referralTrialOfferId == null && (!a0.isPoll() && (!(importDefault(4845) /* metro dependency 4845: isForwardMessage */)(a0) && a0.type !== MessageTypes.MEDIA_MENTION_MESSAGE))) : !!canEditMessageWithStickers2;
|
||||
}
|
||||
r2 = r3;
|
||||
} else {
|
||||
r2 = value2;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Metro module 11334; source: modules/messages/computeGlobalSpoilerDisplay.tsx; dependencies: [3784, 661, 632, 3829, 2] */
|
||||
function _fun86558(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11520:6, offset: 0x01f97b00, size: 163 bytes, params: 8, frame: 19
|
||||
let env0_0 = require;
|
||||
const closure = function(a0, a1) {
|
||||
if (SpoilerRenderSetting.ALWAYS === a0) {
|
||||
return true;
|
||||
}
|
||||
if (SpoilerRenderSetting.IF_MODERATOR === a0) {
|
||||
return a1;
|
||||
}
|
||||
SpoilerRenderSetting.ON_CLICK;
|
||||
return false;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_3 = constantsModule.Permissions;
|
||||
const env0_4 = constantsModule.SpoilerRenderSetting;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/computeGlobalSpoilerDisplay.tsx');
|
||||
exports.default = closure;
|
||||
exports.useShouldDisplaySpoilerObscurity = function(a0) {
|
||||
var env0_0 = a0;
|
||||
var value2 = require(dependencyMap[2]).useStateFromStores([PermissionStore], _fun86561);
|
||||
var computeGlobalSpoilerDisplayBinding = computeGlobalSpoilerDisplay;
|
||||
var RenderSpoilers = require(dependencyMap[3]).RenderSpoilers;
|
||||
return !computeGlobalSpoilerDisplayBinding(RenderSpoilers.useSetting(), value2);
|
||||
};
|
||||
}
|
||||
|
||||
function useShouldDisplaySpoilerObscurity(a0) { // fn#86560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11520:450, offset: 0x01f97bdc, size: 107 bytes, params: 2, frame: 18
|
||||
const env0_0 = a0;
|
||||
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([PermissionStore],
|
||||
_fun86561);
|
||||
const computeGlobalSpoilerDisplayBinding = computeGlobalSpoilerDisplay;
|
||||
const RenderSpoilers = (require(3829) /* metro dependency 3829: UserSettings */).RenderSpoilers;
|
||||
const useSetting = RenderSpoilers.useSetting;
|
||||
return !computeGlobalSpoilerDisplayBinding(Reflect.apply(useSetting, RenderSpoilers, []), value2);
|
||||
}
|
||||
|
||||
function _fun86561() { // fn#86561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11520:533, offset: 0x01f97c47, size: 38 bytes, params: 1, frame: 13
|
||||
const can = PermissionStore.can;
|
||||
const MANAGE_MESSAGES = Permissions.MANAGE_MESSAGES;
|
||||
return Reflect.apply(can, PermissionStore, [MANAGE_MESSAGES, env0_0]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/* Metro module 11406; source: modules/messages/countContentTypes.tsx; dependencies: [2] */
|
||||
function _fun87390(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11592:6, offset: 0x01fbd0d3, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/countContentTypes.tsx');
|
||||
exports.default = countContentTypes;
|
||||
}
|
||||
|
||||
function countContentTypes(a0) { // fn#87391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11592:174, offset: 0x01fbd12a, size: 143 bytes, params: 2, frame: 6
|
||||
const content = a0.content;
|
||||
const value = 0;
|
||||
let r1 = content === '' ? value : 1;
|
||||
let r2 = a0.activity == null ? r1 : typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
||||
r1 = a0.stickers.length > value || a0.stickerItems.length > value ? typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1 : r2;
|
||||
r2 = a0.components.length > value ? typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1 : r1;
|
||||
r1 = a0.messageSnapshots.length > value ? typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1 : r2;
|
||||
return a0.poll == null ? r1 : typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
/* Metro module 7141; source: modules/messages/createMessage.tsx; dependencies: [4833, 1885, 1878, 661, 44, 7142, 2] */
|
||||
function _fun57133(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7319:6, offset: 0x013dd58b, size: 255 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = function({id, username, avatar, discriminator, bot, globalName, primaryGuild}) {
|
||||
return {id: id, username: username, avatar: avatar, discriminator: discriminator, bot: bot,
|
||||
global_name: globalName,
|
||||
primary_guild: primaryGuild};
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
|
||||
const env0_4 = (require(4833) /* metro dependency 4833: ReferencedMessageStore */).ReferencedMessageState;
|
||||
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = constantsModule.MessageStates;
|
||||
const env0_8 = constantsModule.MessageTypes;
|
||||
const env0_9 = constantsModule.LOCAL_BOT_ID;
|
||||
const env0_10 = constantsModule.NON_USER_BOT_DISCRIMINATOR;
|
||||
const env0_11 = constantsModule.MessageFlags;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/createMessage.tsx');
|
||||
exports.default = createMessage;
|
||||
exports.userRecordToServer = closure;
|
||||
exports.createBotMessage = createBotMessage;
|
||||
}
|
||||
|
||||
function createMessage({channelId, content, tts, type, messageReference, allowedMentions, author, flags, nonce, poll, sharedCustomTheme, changelogId, giftingPrompt, boostingPrompt, state, mediaMention}) { // fn#57135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7319:538, offset: 0x013dd6dc, size: 579 bytes, params: 2, frame: 33
|
||||
var messageByReference;
|
||||
let value = undefined;
|
||||
tts = !(tts === value) && tts;
|
||||
const r18 = type !== value ? type : MessageTypes.DEFAULT;
|
||||
const items2 = [];
|
||||
const REPLY = MessageTypes.REPLY;
|
||||
if (r18 === REPLY) {
|
||||
(importDefault(44) /* metro dependency 44 */)(messageReference != null,
|
||||
'Replies must have a message reference');
|
||||
if (allowedMentions == null) {
|
||||
messageByReference = ReferencedMessageStore.getMessageByReference(messageReference);
|
||||
state = messageByReference == null ? value : messageByReference.state;
|
||||
if (state === ReferencedMessageState.LOADED) {
|
||||
items2.push(userRecordToServer(messageByReference.message.author));
|
||||
}
|
||||
} else if (allowedMentions.replied_user) {
|
||||
messageByReference = ReferencedMessageStore.getMessageByReference(messageReference);
|
||||
state = messageByReference == null ? value : messageByReference.state;
|
||||
if (state === ReferencedMessageState.LOADED) {
|
||||
items2.push(userRecordToServer(messageByReference.message.author));
|
||||
}
|
||||
}
|
||||
}
|
||||
let r19 = author ?? UserStore.getCurrentUser();
|
||||
const r14 = r19 instanceof UserRecord ? userRecordToServer(r19) : r19;
|
||||
(importDefault(44) /* metro dependency 44 */)(r14 != null, 'createMessage: author cannot be undefined');
|
||||
const object2 = {};
|
||||
if (nonce != null) {
|
||||
r19 = nonce;
|
||||
} else {
|
||||
value = require(7142) /* metro dependency 7142: createNonce */;
|
||||
value = value.createNonce();
|
||||
r19 = value;
|
||||
}
|
||||
object2.id = r19;
|
||||
object2.type = r18;
|
||||
object2.content = content;
|
||||
object2.channel_id = channelId;
|
||||
object2.author = r14;
|
||||
object2.attachments = [];
|
||||
object2.embeds = [];
|
||||
object2.pinned = false;
|
||||
object2.mentions = items2;
|
||||
object2.mention_channels = [];
|
||||
object2.mention_roles = [];
|
||||
object2.mention_everyone = false;
|
||||
const Date = global.Date;
|
||||
object2.timestamp = new Date().toISOString();
|
||||
object2.state = state ?? MessageStates.SENDING;
|
||||
object2.tts = tts;
|
||||
object2.message_reference = messageReference;
|
||||
object2.message_snapshots = [];
|
||||
object2.flags = flags;
|
||||
object2.nonce = nonce;
|
||||
object2.poll = poll;
|
||||
object2.shared_client_theme = sharedCustomTheme;
|
||||
object2.changelog_id = changelogId;
|
||||
object2.gifting_prompt = giftingPrompt;
|
||||
object2.boosting_prompt = boostingPrompt;
|
||||
object2.media_mention = mediaMention;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function createBotMessage({messageId, channelId, content, embeds, loggingName}) { // fn#57136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7319:1595, offset: 0x013dd91f, size: 285 bytes, params: 2, frame: 18
|
||||
var r3;
|
||||
var value;
|
||||
const object2 = {};
|
||||
if (messageId != null) {
|
||||
r3 = messageId;
|
||||
} else {
|
||||
value = require(7142) /* metro dependency 7142: createNonce */;
|
||||
value = value.createNonce();
|
||||
r3 = value;
|
||||
}
|
||||
object2.id = r3;
|
||||
const DEFAULT = MessageTypes.DEFAULT;
|
||||
object2.type = DEFAULT;
|
||||
const EPHEMERAL = MessageFlags.EPHEMERAL;
|
||||
object2.flags = EPHEMERAL;
|
||||
object2.content = content;
|
||||
object2.channel_id = channelId;
|
||||
object2.author = {'id': null, 'username': 'Clyde', 'discriminator': null, 'avatar': 'clyde', 'bot': true,
|
||||
id: LOCAL_BOT_ID, discriminator: NON_USER_BOT_DISCRIMINATOR};
|
||||
object2.attachments = [];
|
||||
object2.embeds = embeds ?? [];
|
||||
object2.pinned = false;
|
||||
object2.mentions = [];
|
||||
object2.mention_channels = [];
|
||||
object2.mention_roles = [];
|
||||
object2.mention_everyone = false;
|
||||
const Date = global.Date;
|
||||
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
const date = new Date();
|
||||
object2.timestamp = (date instanceof Object ? date : value2).toISOString();
|
||||
const SENT = MessageStates.SENT;
|
||||
object2.state = SENT;
|
||||
object2.tts = false;
|
||||
object2.loggingName = loggingName;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/* Metro module 7142; source: modules/messages/createNonce.tsx; dependencies: [21, 2] */
|
||||
function _fun57137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7320:6, offset: 0x013dda3c, size: 142 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const SnowflakeSequence = (require(21) /* metro dependency 21: SnowflakeUtils */).SnowflakeSequence;
|
||||
const snowflakeSequence = new SnowflakeSequence();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/createNonce.tsx');
|
||||
exports.createNonce = createNonce;
|
||||
}
|
||||
|
||||
function createNonce() { // fn#57138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7320:213, offset: 0x013ddaca, size: 85 bytes, params: 1, frame: 14
|
||||
const Date = global.Date;
|
||||
const value = Date.now();
|
||||
if (env0_2 !== value) {
|
||||
env0_3.reset();
|
||||
}
|
||||
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).fromTimestampWithSequence(value, env0_3);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Metro module 9599; source: modules/messages/getAdaptiveMessageLimit.native.tsx; dependencies: [661, 2] */
|
||||
function _fun75250(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9785:6, offset: 0x01da7837, size: 124 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(661) /* metro dependency 661: Constants */).MAX_MESSAGES_PER_CHANNEL;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getAdaptiveMessageLimit.native.tsx');
|
||||
exports.getMessageLimit = function() {
|
||||
return MAX_MESSAGES_PER_CHANNEL;
|
||||
};
|
||||
exports.useMessageLimit = function() {
|
||||
return MAX_MESSAGES_PER_CHANNEL;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
/* Metro module 7173; source: modules/messages/getBurstAnimation.native.tsx; dependencies: [5, 7174, 7175, 7176, 7177, 7178, 7179, 7180, 7181, 7182, 7183, 7184, 7185, 7186, 7187, 7188, 7189, 7190, 7191, 7192, 7193, 7194, 7195, 7196, 7197, 7198, 7199, 7200, 7201, 7202, 7203, 7204, 7205, 7206, 7207, 7208, 7209, 7210, 2] */
|
||||
function _fun57615(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7351:6, offset: 0x013ea78e, size: 708 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
const items3 = [{load: function() {
|
||||
return require(dependencyMap[1]);
|
||||
}}];
|
||||
items3[1] = {load: function() {
|
||||
return require(dependencyMap[2]);
|
||||
}};
|
||||
items3[2] = {load: function() {
|
||||
return require(dependencyMap[3]);
|
||||
}};
|
||||
items3[3] = {load: function() {
|
||||
return require(dependencyMap[4]);
|
||||
}};
|
||||
items3[4] = {load: function() {
|
||||
return require(dependencyMap[5]);
|
||||
}};
|
||||
items3[5] = {load: function() {
|
||||
return require(dependencyMap[6]);
|
||||
}};
|
||||
items3[6] = {load: function() {
|
||||
return require(dependencyMap[7]);
|
||||
}};
|
||||
items3[7] = {load: function() {
|
||||
return require(dependencyMap[8]);
|
||||
}};
|
||||
items3[8] = {load: function() {
|
||||
return require(dependencyMap[9]);
|
||||
}};
|
||||
items3[9] = {load: function() {
|
||||
return require(dependencyMap[10]);
|
||||
}};
|
||||
items3[10] = {load: function() {
|
||||
return require(dependencyMap[11]);
|
||||
}};
|
||||
items3[11] = {load: function() {
|
||||
return require(dependencyMap[12]);
|
||||
}};
|
||||
items3[12] = {load: function() {
|
||||
return require(dependencyMap[13]);
|
||||
}};
|
||||
items3[13] = {load: function() {
|
||||
return require(dependencyMap[14]);
|
||||
}};
|
||||
items3[14] = {load: function() {
|
||||
return require(dependencyMap[15]);
|
||||
}};
|
||||
items3[15] = {load: function() {
|
||||
return require(dependencyMap[16]);
|
||||
}};
|
||||
items3[16] = {load: function() {
|
||||
return require(dependencyMap[17]);
|
||||
}};
|
||||
items3[17] = {load: function() {
|
||||
return require(dependencyMap[18]);
|
||||
}};
|
||||
const items2 = [{load: function() {
|
||||
return require(dependencyMap[19]);
|
||||
}}];
|
||||
items2[1] = {load: function() {
|
||||
return require(dependencyMap[20]);
|
||||
}};
|
||||
items2[2] = {load: function() {
|
||||
return require(dependencyMap[21]);
|
||||
}};
|
||||
items2[3] = {load: function() {
|
||||
return require(dependencyMap[22]);
|
||||
}};
|
||||
items2[4] = {load: function() {
|
||||
return require(dependencyMap[23]);
|
||||
}};
|
||||
items2[5] = {load: function() {
|
||||
return require(dependencyMap[24]);
|
||||
}};
|
||||
items2[6] = {load: function() {
|
||||
return require(dependencyMap[25]);
|
||||
}};
|
||||
items2[7] = {load: function() {
|
||||
return require(dependencyMap[26]);
|
||||
}};
|
||||
items2[8] = {load: function() {
|
||||
return require(dependencyMap[27]);
|
||||
}};
|
||||
items2[9] = {load: function() {
|
||||
return require(dependencyMap[28]);
|
||||
}};
|
||||
items2[10] = {load: function() {
|
||||
return require(dependencyMap[29]);
|
||||
}};
|
||||
items2[11] = {load: function() {
|
||||
return require(dependencyMap[30]);
|
||||
}};
|
||||
items2[12] = {load: function() {
|
||||
return require(dependencyMap[31]);
|
||||
}};
|
||||
items2[13] = {load: function() {
|
||||
return require(dependencyMap[32]);
|
||||
}};
|
||||
items2[14] = {load: function() {
|
||||
return require(dependencyMap[33]);
|
||||
}};
|
||||
items2[15] = {load: function() {
|
||||
return require(dependencyMap[34]);
|
||||
}};
|
||||
items2[16] = {load: function() {
|
||||
return require(dependencyMap[35]);
|
||||
}};
|
||||
items2[17] = {load: function() {
|
||||
return require(dependencyMap[36]);
|
||||
}};
|
||||
const value = _fun57652();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getBurstAnimation.native.tsx');
|
||||
exports.getBurstAnimation = value;
|
||||
}
|
||||
|
||||
function _fun57652() { // fn#57652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7351:827, offset: 0x013eac53, size: 32 bytes, params: 1, frame: 12
|
||||
const env0_0 = env0_2(_fun57654);
|
||||
return _fun57655;
|
||||
}
|
||||
|
||||
async function _fun57654(a0, a1, a2) { // fn#57654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7351:847, offset: 0x013eac85, size: 147 bytes, params: 4, frame: 21
|
||||
let value = a3;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
let r3 = value !== undefined ? value : false;
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const burstAnimationHash = env2_0(env2_1[37]).getBurstAnimationHash('' + a0 + a1 + a2);
|
||||
r3 = r3 ? env2_3 : env2_4;
|
||||
return r3[burstAnimationHash % env2_4.length].load();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/* Metro module 8430; source: modules/messages/getDisplayFilename.tsx; dependencies: [2] */
|
||||
function _fun66915(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8615:6, offset: 0x01c0f84d, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getDisplayFilename.tsx');
|
||||
exports.default = function(a0) {
|
||||
var r1;
|
||||
var value;
|
||||
if (a0.title != null) {
|
||||
if (a0.filename != null) {
|
||||
value = a0.filename.lastIndexOf('.');
|
||||
if (value > 0) {
|
||||
value = a0.filename.substr(value);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = '';
|
||||
}
|
||||
return a0.title + r1;
|
||||
}
|
||||
}
|
||||
return a0.filename;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
/* Metro module 8632; source: modules/messages/getEmojiPopoutMessage.tsx; dependencies: [6820, 1244, 2] */
|
||||
function _fun68124(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8817:6, offset: 0x01c3ffed, size: 237 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(6820) /* metro dependency 6820: ExpressionSourceRecord */).EmojiSourceDataTypes;
|
||||
object = {DEFAULT: 'Custom Emoji Popout', CROSS_SERVER: 'Custom Emoji Popout (Cross-Server)',
|
||||
UPSELL_CURRENT_SERVER_JOINED: 'Custom Emoji Popout (Upsell Joined Current-Server)',
|
||||
UPSELL_CROSS_SERVER_JOINED: 'Custom Emoji Popout (Upsell Joined Cross-Server)',
|
||||
UPSELL_CROSS_SERVER_JOINABLE: 'Custom Emoji Popout (Upsell Not-Joined Cross-Server)',
|
||||
UPSELL_CROSS_SERVER_UNJOINABLE: 'Custom Emoji Popout (Soft Upsell)'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getEmojiPopoutMessage.tsx');
|
||||
exports.EmojiPopoutType = {GET_PREMIUM: 'GET_PREMIUM', JOIN_GUILD: 'JOIN_GUILD', UNAVAILABLE: 'UNAVAILABLE'};
|
||||
exports.getEmojiPopoutData = getEmojiPopoutData;
|
||||
}
|
||||
|
||||
function getEmojiPopoutData(a0) { // fn#68125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8817:788, offset: 0x01c400da, size: 1236 bytes, params: 2, frame: 28
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object4;
|
||||
const sourceType = a0.sourceType;
|
||||
const expressionSourceApplication = a0.expressionSourceApplication;
|
||||
let isPremium = a0.isPremium;
|
||||
let hasJoinedEmojiSourceGuild = a0.hasJoinedEmojiSourceGuild;
|
||||
let isUnusableRoleSubscriptionEmoji = a0.isUnusableRoleSubscriptionEmoji;
|
||||
let isDiscoverable = a0.isDiscoverable;
|
||||
let emojiComesFromCurrentGuild = a0.emojiComesFromCurrentGuild;
|
||||
const userIsRoleSubscriber = a0.userIsRoleSubscriber;
|
||||
const isRoleSubscriptionEmoji = a0.isRoleSubscriptionEmoji;
|
||||
const shouldHideRoleSubscriptionCTA = a0.shouldHideRoleSubscriptionCTA;
|
||||
const onOpenPremiumSettings = a0.onOpenPremiumSettings;
|
||||
const APPLICATION = EmojiSourceDataTypes.APPLICATION;
|
||||
const r3 = sourceType !== APPLICATION ? isPremium ? hasJoinedEmojiSourceGuild ? isRoleSubscriptionEmoji ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : intl.string(t.Eoynp0) : emojiComesFromCurrentGuild ? intl.string(t.hU4kIe) : intl.string(t.GM0xaX) : isDiscoverable ? intl.string(t.xE9WGt) : intl.string(t['0LMpW+']) : hasJoinedEmojiSourceGuild ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : emojiComesFromCurrentGuild ? intl.string(t.ICPhqa) : intl.string(t.jQy3aM) : isDiscoverable ? intl.string(t.FJ6Z01) : intl.format(t.U6vLcA,
|
||||
{openPremiumSettings: onOpenPremiumSettings}) : expressionSourceApplication != null ? intl.formatToPlainString(t.uERlTd,
|
||||
{appName: expressionSourceApplication.name}) : isPremium ? hasJoinedEmojiSourceGuild ? isRoleSubscriptionEmoji ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : intl.string(t.Eoynp0) : emojiComesFromCurrentGuild ? intl.string(t.hU4kIe) : intl.string(t.GM0xaX) : isDiscoverable ? intl.string(t.xE9WGt) : intl.string(t['0LMpW+']) : hasJoinedEmojiSourceGuild ? shouldHideRoleSubscriptionCTA && isUnusableRoleSubscriptionEmoji ? intl.string(t.xFb68j) : isUnusableRoleSubscriptionEmoji ? userIsRoleSubscriber ? intl.string(t.vLklfF) : intl.string(t['g8i/bf']) : emojiComesFromCurrentGuild ? intl.string(t.ICPhqa) : intl.string(t.jQy3aM) : isDiscoverable ? intl.string(t.FJ6Z01) : intl.format(t.U6vLcA,
|
||||
{openPremiumSettings: onOpenPremiumSettings});
|
||||
isPremium = a0.isPremium;
|
||||
hasJoinedEmojiSourceGuild = a0.hasJoinedEmojiSourceGuild;
|
||||
isUnusableRoleSubscriptionEmoji = a0.isUnusableRoleSubscriptionEmoji;
|
||||
emojiComesFromCurrentGuild = a0.emojiComesFromCurrentGuild;
|
||||
isDiscoverable = a0.isDiscoverable;
|
||||
const DEFAULT = env0_3.DEFAULT;
|
||||
const r2 = isPremium ? hasJoinedEmojiSourceGuild ? isPremium ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : hasJoinedEmojiSourceGuild ? isUnusableRoleSubscriptionEmoji ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : emojiComesFromCurrentGuild ? env0_3.UPSELL_CURRENT_SERVER_JOINED : env0_3.UPSELL_CROSS_SERVER_JOINED : isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : isDiscoverable ? env0_3.CROSS_SERVER : isPremium ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : hasJoinedEmojiSourceGuild ? isUnusableRoleSubscriptionEmoji ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : emojiComesFromCurrentGuild ? env0_3.UPSELL_CURRENT_SERVER_JOINED : env0_3.UPSELL_CROSS_SERVER_JOINED : isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : isPremium ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : hasJoinedEmojiSourceGuild ? isUnusableRoleSubscriptionEmoji ? isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE : emojiComesFromCurrentGuild ? env0_3.UPSELL_CURRENT_SERVER_JOINED : env0_3.UPSELL_CROSS_SERVER_JOINED : isPremium || hasJoinedEmojiSourceGuild ? DEFAULT : isDiscoverable ? env0_3.UPSELL_CROSS_SERVER_JOINABLE : env0_3.UPSELL_CROSS_SERVER_UNJOINABLE;
|
||||
const object3 = {};
|
||||
isPremium = a0.isPremium;
|
||||
hasJoinedEmojiSourceGuild = a0.hasJoinedEmojiSourceGuild;
|
||||
isUnusableRoleSubscriptionEmoji = a0.isUnusableRoleSubscriptionEmoji;
|
||||
let r1 = !hasJoinedEmojiSourceGuild && a0.isDiscoverable;
|
||||
if (isPremium) {
|
||||
if (r1) {
|
||||
r1 = {type: env0_4.JOIN_GUILD, text: intl.string(t.riu2R5), description: null};
|
||||
} else if (isPremium) {
|
||||
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
|
||||
} else if (hasJoinedEmojiSourceGuild) {
|
||||
if (isUnusableRoleSubscriptionEmoji) {
|
||||
if (r1) {
|
||||
object4 = {};
|
||||
object4.type = env0_4.GET_PREMIUM;
|
||||
object4.text = intl.string(t['gl/XHJ']);
|
||||
object4.description = null;
|
||||
r1 = object4;
|
||||
} else {
|
||||
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
|
||||
}
|
||||
} else {
|
||||
object4 = {};
|
||||
object4.type = env0_4.GET_PREMIUM;
|
||||
object4.text = intl.string(t['gl/XHJ']);
|
||||
object4.description = null;
|
||||
r1 = object4;
|
||||
}
|
||||
} else if (r1) {
|
||||
object4 = {};
|
||||
object4.type = env0_4.GET_PREMIUM;
|
||||
object4.text = intl.string(t['gl/XHJ']);
|
||||
object4.description = null;
|
||||
r1 = object4;
|
||||
} else {
|
||||
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
|
||||
}
|
||||
} else if (isPremium) {
|
||||
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
|
||||
} else if (hasJoinedEmojiSourceGuild) {
|
||||
if (isUnusableRoleSubscriptionEmoji) {
|
||||
if (r1) {
|
||||
object4 = {};
|
||||
object4.type = env0_4.GET_PREMIUM;
|
||||
object4.text = intl.string(t['gl/XHJ']);
|
||||
object4.description = null;
|
||||
r1 = object4;
|
||||
} else {
|
||||
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
|
||||
}
|
||||
} else {
|
||||
object4 = {};
|
||||
object4.type = env0_4.GET_PREMIUM;
|
||||
object4.text = intl.string(t['gl/XHJ']);
|
||||
object4.description = null;
|
||||
r1 = object4;
|
||||
}
|
||||
} else if (r1) {
|
||||
object4 = {};
|
||||
object4.type = env0_4.GET_PREMIUM;
|
||||
object4.text = intl.string(t['gl/XHJ']);
|
||||
object4.description = null;
|
||||
r1 = object4;
|
||||
} else {
|
||||
r1 = {'type': null, 'text': null, 'description': null, type: env0_4.UNAVAILABLE};
|
||||
}
|
||||
copyDataProperties(object3, r1, onOpenPremiumSettings);
|
||||
object3['emojiDescription'] = r3;
|
||||
object3['analyticsType'] = r2;
|
||||
return object3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* Metro module 10546; source: modules/messages/getHeaderTextForInvite.tsx; dependencies: [1244, 2] */
|
||||
function _fun81321(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10732:6, offset: 0x01eca6e8, size: 96 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getHeaderTextForInvite.tsx');
|
||||
exports.getHeaderTextForInvite = getHeaderTextForInvite;
|
||||
}
|
||||
|
||||
function getHeaderTextForInvite({isVoiceChannel, isHubGuild, isOwnInvite, isGuest, isStage, isStream}) { // fn#81322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10732:194, offset: 0x01eca748, size: 312 bytes, params: 2, frame: 20
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return isVoiceChannel ? isOwnInvite ? isStream ? Reflect.apply(string, intl,
|
||||
[t.N85DCl]) : isStage ? Reflect.apply(string, intl, [t.TJQcNv]) : isGuest ? Reflect.apply(string, intl,
|
||||
[t.mJyBir]) : Reflect.apply(string, intl, [t.lxTgP9]) : isStream ? Reflect.apply(string, intl,
|
||||
[t.Mnvc3C]) : isStage ? Reflect.apply(string, intl, [t.FdPNr5]) : isGuest ? Reflect.apply(string, intl,
|
||||
[t.f4gmrf]) : Reflect.apply(string, intl, [t.H39rEY]) : isHubGuild ? isOwnInvite ? Reflect.apply(string, intl,
|
||||
[t.UxmnHx]) : Reflect.apply(string, intl, [t.sigPEf]) : isOwnInvite ? Reflect.apply(string, intl,
|
||||
[t['oU/lsl']]) : Reflect.apply(string, intl, [t.BoQUFf]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 8213; source: modules/messages/getHumanizedCallDuration.tsx; dependencies: [2] */
|
||||
function _fun65767(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8398:6, offset: 0x01bddd5b, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getHumanizedCallDuration.tsx');
|
||||
exports.default = function(a0) {
|
||||
var r2;
|
||||
var value = null;
|
||||
r2 = value != a0.call ? a0.call.duration : value;
|
||||
return value != r2 ? r2.humanize() : value;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Metro module 11068; source: modules/messages/getStickerDiscoverableGuild.tsx; dependencies: [661, 507, 6946, 2] */
|
||||
function _fun84748(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11254:6, offset: 0x01f56137, size: 117 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/getStickerDiscoverableGuild.tsx');
|
||||
exports.default = _default_84749;
|
||||
}
|
||||
|
||||
function _default_84749(a0) { // fn#84749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11254:125, offset: 0x01f561ac, size: 113 bytes, params: 2, frame: 15
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
const get = HTTP.get;
|
||||
const object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': true};
|
||||
object2.url = Endpoints.STICKER_GUILD_DATA(a0);
|
||||
let value = Reflect.apply(get, HTTP, [object2]);
|
||||
value = value.then(_fun84750);
|
||||
return value.catch(function() {
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun84750(a0) { // fn#84750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11254:218, offset: 0x01f5621d, size: 71 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
let value = null;
|
||||
if (value != (value == a0 ? undefined : a0.body)) {
|
||||
value = environment.__proto__;
|
||||
value = require(6946) /* metro dependency 6946: GuildDiscoveryUtils */;
|
||||
value = value.makeDiscoverableGuild(a0.body);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/* Metro module 8296; source: modules/messages/isCrosspost.tsx; dependencies: [661, 1391, 2] */
|
||||
function _fun66178(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8481:6, offset: 0x01bf0b04, size: 137 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_2 = constantsModule.MessageFlags;
|
||||
const env0_3 = constantsModule.MessageReferenceTypes;
|
||||
const env0_4 = constantsModule.MessageTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isCrosspost.tsx');
|
||||
exports.default = isCrosspost;
|
||||
}
|
||||
|
||||
function isCrosspost(a0) { // fn#66179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8481:242, offset: 0x01bf0b8d, size: 122 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var moduleValue;
|
||||
const type = a0.type;
|
||||
const DEFAULT = MessageTypes.DEFAULT;
|
||||
const value2 = type === DEFAULT;
|
||||
if (value2) {
|
||||
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
r0 = moduleValue.hasFlag(a0.flags, MessageFlags.IS_CROSSPOST);
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
r0 = r0 && a0.messageReference != null && a0.messageReference.type !== MessageReferenceTypes.FORWARD;
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 4639; source: modules/messages/isMessageMentioned.tsx; dependencies: [1379, 1945, 1867, 2] */
|
||||
function _fun39895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:6, offset: 0x010ef071, size: 162 bytes, params: 8, frame: 19
|
||||
const closure = isMentioned;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isMessageMentioned.tsx');
|
||||
exports.default = isMessageMentioned;
|
||||
exports.isRawMessageMentioned = isRawMessageMentioned;
|
||||
exports.isMentioned = closure;
|
||||
}
|
||||
|
||||
function isMentioned({userId, channelId, mentionEveryone, mentionUsers, mentionRoles, suppressEveryone, suppressRoles}) { // fn#39896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:126, offset: 0x010ef113, size: 234 bytes, params: 2, frame: 19
|
||||
var value;
|
||||
var channel;
|
||||
var guildId;
|
||||
suppressEveryone = !(suppressEveryone === undefined) && suppressEveryone;
|
||||
suppressRoles = !(suppressRoles === undefined) && suppressRoles;
|
||||
if (mentionEveryone) {
|
||||
if (suppressEveryone) {
|
||||
if (mentionUsers.includes(userId)) {
|
||||
return true;
|
||||
}
|
||||
if (suppressRoles) {
|
||||
return false;
|
||||
}
|
||||
if (mentionRoles == null) {
|
||||
return false;
|
||||
}
|
||||
if (mentionRoles.length === 0) {
|
||||
return false;
|
||||
}
|
||||
channel = ChannelStore.getChannel(channelId);
|
||||
if (channel == null) {
|
||||
return false;
|
||||
}
|
||||
guildId = channel.getGuildId();
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
if (GuildStore.getGuild(guildId) == null) {
|
||||
return false;
|
||||
}
|
||||
value = GuildMemberStore.getMember(guildId, userId);
|
||||
value = value != null;
|
||||
return value && mentionRoles.some(_fun39897);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (mentionUsers.includes(userId)) {
|
||||
return true;
|
||||
}
|
||||
if (suppressRoles) {
|
||||
return false;
|
||||
}
|
||||
if (mentionRoles == null) {
|
||||
return false;
|
||||
}
|
||||
if (mentionRoles.length === 0) {
|
||||
return false;
|
||||
}
|
||||
channel = ChannelStore.getChannel(channelId);
|
||||
if (channel == null) {
|
||||
return false;
|
||||
}
|
||||
guildId = channel.getGuildId();
|
||||
if (guildId == null) {
|
||||
return false;
|
||||
}
|
||||
const getGuild = GuildStore.getGuild;
|
||||
if (Reflect.apply(getGuild, GuildStore, [guildId]) == null) {
|
||||
return false;
|
||||
}
|
||||
value = GuildMemberStore.getMember(guildId, userId);
|
||||
value = value != null;
|
||||
return value && mentionRoles.some(_fun39897);
|
||||
}
|
||||
|
||||
function isMessageMentioned({message, userId, suppressEveryone, suppressRoles}) { // fn#39898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:611, offset: 0x010ef219, size: 111 bytes, params: 2, frame: 15
|
||||
suppressEveryone = !(suppressEveryone === undefined) && suppressEveryone;
|
||||
suppressRoles = !(suppressRoles === undefined) && suppressRoles;
|
||||
return isMentioned({userId: userId, channelId: message.channel_id, mentionEveryone: message.mentionEveryone,
|
||||
mentionUsers: message.mentions, mentionRoles: message.mentionRoles, suppressEveryone: suppressEveryone,
|
||||
suppressRoles: suppressRoles});
|
||||
}
|
||||
|
||||
function isRawMessageMentioned({rawMessage, userId, suppressEveryone, suppressRoles}) { // fn#39899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4817:902, offset: 0x010ef288, size: 166 bytes, params: 2, frame: 19
|
||||
suppressEveryone = !(suppressEveryone === undefined) && suppressEveryone;
|
||||
suppressRoles = !(suppressRoles === undefined) && suppressRoles;
|
||||
const isMentionedBinding = isMentioned;
|
||||
const object2 = {userId: userId};
|
||||
object2.channelId = rawMessage.channel_id;
|
||||
const mention_everyone = rawMessage.mention_everyone;
|
||||
let r7 = mention_everyone != null && mention_everyone;
|
||||
object2.mentionEveryone = r7;
|
||||
r7 = rawMessage.mentions?.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
r7 = r7 ?? [];
|
||||
object2.mentionUsers = r7;
|
||||
object2.mentionRoles = rawMessage.mention_roles ?? [];
|
||||
object2.suppressEveryone = suppressEveryone;
|
||||
object2.suppressRoles = suppressRoles;
|
||||
return isMentionedBinding(object2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Metro module 11405; source: modules/messages/isMessagePinnable.tsx; dependencies: [3784, 661, 5216, 6860, 2] */
|
||||
function _fun87388(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11591:6, offset: 0x01fbcf51, size: 150 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.ChannelTypes;
|
||||
const env0_5 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isMessagePinnable.tsx');
|
||||
exports.default = isMessagePinnable;
|
||||
}
|
||||
|
||||
function isMessagePinnable(a0, a1) { // fn#87389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11591:231, offset: 0x01fbcfe7, size: 236 bytes, params: 3, frame: 16
|
||||
var r0;
|
||||
let value = a1.isSystemDM();
|
||||
if (value) {
|
||||
r0 = !value;
|
||||
} else {
|
||||
value = importDefault(5216) /* metro dependency 5216: isSystemMessage */;
|
||||
value = !value(a0);
|
||||
r0 = value;
|
||||
}
|
||||
const can = PermissionStore.can;
|
||||
const PIN_MESSAGES = Permissions.PIN_MESSAGES;
|
||||
let r3 = Reflect.apply(can, PermissionStore, [PIN_MESSAGES,
|
||||
a1]) && PermissionStore.can(Permissions.READ_MESSAGE_HISTORY, a1);
|
||||
if (r0) {
|
||||
r3 = !r3 ? a1.isPrivate() : r3;
|
||||
r0 = r3;
|
||||
}
|
||||
r0 = r0 && (require(6860) /* metro dependency 6860: ThreadHooks */).getIsActiveChannelOrUnarchivableThread(a1) && a1.type !== ChannelTypes.GUILD_VOICE;
|
||||
r0 = r0 && a1.type !== ChannelTypes.GUILD_STAGE_VOICE && a1.type !== ChannelTypes.MEDIA_THREAD;
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
/* Metro module 11519; source: modules/messages/isNewMessageGroup.tsx; dependencies: [661, 672, 5216, 21, 3826, 2] */
|
||||
function _fun88197(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11705:6, offset: 0x01fd94bf, size: 198 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = isNewMessageGroup;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_3 = constantsModule.MessageTypes;
|
||||
const env0_4 = constantsModule.ChannelStreamTypes;
|
||||
const env0_5 = constantsModule.MessageFlags;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const MINUTE = Millis.MINUTE;
|
||||
const env0_6 = 7 * MINUTE;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isNewMessageGroup.tsx');
|
||||
exports.default = closure;
|
||||
exports.isNewGroupItem = isNewGroupItem;
|
||||
}
|
||||
|
||||
function isNewMessageGroup(a0, a1, a2) { // fn#88198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11705:189, offset: 0x01fd9585, size: 742 bytes, params: 4, frame: 27
|
||||
var r8;
|
||||
var r10;
|
||||
var r12;
|
||||
var r13;
|
||||
var r14;
|
||||
var r11;
|
||||
var r9;
|
||||
var r6;
|
||||
var r3;
|
||||
var r2;
|
||||
var r0;
|
||||
var value7;
|
||||
var author;
|
||||
var id;
|
||||
var value9;
|
||||
var EPHEMERAL;
|
||||
var hasFlag3;
|
||||
var value10;
|
||||
var value11;
|
||||
var username;
|
||||
var defaultImport;
|
||||
var moduleValue;
|
||||
var isSameDay2;
|
||||
var moduleValue2;
|
||||
var isWithinInterval2;
|
||||
var hasFlag4;
|
||||
var hasFlag6;
|
||||
var value22;
|
||||
let hasFlag = a2.hasFlag;
|
||||
var value;
|
||||
const HAS_THREAD = MessageFlags.HAS_THREAD;
|
||||
let r1 = !Reflect.apply(hasFlag, a2, [HAS_THREAD]) && !a2.isCommandType();
|
||||
if (r1) {
|
||||
r1 = a1.blocked !== a2.blocked || a1.ignored !== a2.ignored;
|
||||
if (!r1) {
|
||||
if (a2.type > MessageTypes.DEFAULT) {
|
||||
value22 = (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a1);
|
||||
r2 = value22 ? a2.type === MessageTypes.REPLY : !value22;
|
||||
} else {
|
||||
value7 = (importDefault(5216) /* metro dependency 5216: isSystemMessage */)(a1);
|
||||
if (value7) {
|
||||
r2 = !!value7;
|
||||
} else {
|
||||
author = a1.author;
|
||||
id = author.id;
|
||||
author = a2.author;
|
||||
value9 = id !== author.id;
|
||||
if (value9) {
|
||||
r3 = value9;
|
||||
} else {
|
||||
hasFlag = a1.hasFlag;
|
||||
EPHEMERAL = MessageFlags.EPHEMERAL;
|
||||
hasFlag3 = Reflect.apply(hasFlag, a1, [EPHEMERAL]);
|
||||
hasFlag = a2.hasFlag;
|
||||
EPHEMERAL = MessageFlags.EPHEMERAL;
|
||||
value10 = hasFlag3 !== Reflect.apply(hasFlag, a2, [EPHEMERAL]);
|
||||
if (value10) {
|
||||
r6 = value10;
|
||||
} else {
|
||||
value11 = a2.webhookId != null;
|
||||
if (value11) {
|
||||
author = a1.author;
|
||||
username = author.username;
|
||||
author = a2.author;
|
||||
r8 = username !== author.username;
|
||||
} else {
|
||||
r8 = value11;
|
||||
}
|
||||
if (!r8) {
|
||||
r10 = a0 == null || !a0.isForumPost();
|
||||
if (!r10) {
|
||||
id = a1.id;
|
||||
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
r10 = id !== defaultImport.castChannelIdAsMessageId(a0.id);
|
||||
}
|
||||
if (r10) {
|
||||
moduleValue = require(3826) /* metro dependency 3826: DateUtils */;
|
||||
isSameDay2 = moduleValue.isSameDay(a1.timestamp, a2.timestamp);
|
||||
if (isSameDay2) {
|
||||
moduleValue2 = require(3826) /* metro dependency 3826: DateUtils */;
|
||||
isWithinInterval2 = moduleValue2.isWithinInterval(a1.timestamp, a2.timestamp,
|
||||
env0_6);
|
||||
if (isWithinInterval2) {
|
||||
hasFlag4 = a2.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS);
|
||||
r12 = hasFlag4 ? a1.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS) : !hasFlag4;
|
||||
if (r12) {
|
||||
hasFlag6 = a1.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS);
|
||||
r13 = hasFlag6 ? a2.hasFlag(MessageFlags.SUPPRESS_NOTIFICATIONS) : !hasFlag6;
|
||||
if (!r13) {
|
||||
value = a2.mentions.length > 0;
|
||||
r14 = value || a2.mentionRoles.length > 0;
|
||||
r14 = !r14 ? a2.mentionEveryone : r14;
|
||||
value = !r14;
|
||||
r13 = value;
|
||||
}
|
||||
value = !r13;
|
||||
r13 = r13 ? a2.applicationId !== a1.applicationId : value;
|
||||
r12 = r13;
|
||||
} else {
|
||||
r12 = !r12;
|
||||
}
|
||||
r11 = r12;
|
||||
} else {
|
||||
r11 = !isWithinInterval2;
|
||||
}
|
||||
r10 = r11;
|
||||
} else {
|
||||
r10 = !isSameDay2;
|
||||
}
|
||||
r9 = r10;
|
||||
} else {
|
||||
r9 = !r10;
|
||||
}
|
||||
r8 = r9;
|
||||
}
|
||||
r6 = r8;
|
||||
}
|
||||
r3 = r6;
|
||||
}
|
||||
r2 = r3;
|
||||
}
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = !r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function isNewGroupItem(a0, a1, a2) { // fn#88199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11705:1090, offset: 0x01fd986b, size: 143 bytes, params: 4, frame: 18
|
||||
var r1;
|
||||
var r2;
|
||||
var r0;
|
||||
var value2;
|
||||
var content;
|
||||
var id;
|
||||
const value = a1 == null;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = a1.type === ChannelStreamTypes.MESSAGE;
|
||||
if (value2) {
|
||||
content = a1.content;
|
||||
id = content.id;
|
||||
content = a1.content;
|
||||
r1 = id === content.channel_id;
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
if (!r1) {
|
||||
r2 = a1.type !== ChannelStreamTypes.MESSAGE && a1.type !== ChannelStreamTypes.THREAD_STARTER_MESSAGE;
|
||||
r2 = !r2 ? isNewMessageGroup(a0, a1.content, a2) : r2;
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* Metro module 5050; source: modules/messages/isSpam.tsx; dependencies: [1878, 661, 5051, 2] */
|
||||
function _fun43727(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:6, offset: 0x0115bdae, size: 172 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = isSpammer;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_3 = constantsModule.UserFlags;
|
||||
const env0_4 = constantsModule.ChannelTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isSpam.tsx');
|
||||
exports.isSpamSupported = isSpamSupported;
|
||||
exports.isSpammer = closure;
|
||||
exports.isSpam = isSpam_43730;
|
||||
}
|
||||
|
||||
function isSpammer(a0) { // fn#43728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:147, offset: 0x0115be5a, size: 65 bytes, params: 2, frame: 13
|
||||
const hasFlag = UserStore.getUser(a0)?.hasFlag(UserFlags.SPAMMER);
|
||||
return hasFlag != null && hasFlag;
|
||||
}
|
||||
|
||||
function isSpamSupported(a0) { // fn#43729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:327, offset: 0x0115be9b, size: 36 bytes, params: 2, frame: 3
|
||||
return a0 !== undefined && a0.type !== ChannelTypes.DM;
|
||||
}
|
||||
|
||||
function isSpam_43730(a0) { // fn#43730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5228:420, offset: 0x0115bebf, size: 67 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var value;
|
||||
const isSpammer2 = isSpammer(a0.author.id);
|
||||
if (isSpammer2) {
|
||||
value = require(5051) /* metro dependency 5051: AutomodMessageUtils */;
|
||||
value = !value.isAutomodMessageRecord(a0);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = isSpammer2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 5216; source: modules/messages/isSystemMessage.tsx; dependencies: [671, 2] */
|
||||
function _fun46132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5394:6, offset: 0x011a0bf2, size: 94 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/isSystemMessage.tsx');
|
||||
exports.default = function(a0) {
|
||||
var USER_MESSAGE = require(dependencyMap[0]).MessageTypesSets.USER_MESSAGE;
|
||||
return !USER_MESSAGE.has(a0.type);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* Metro module 7228; source: modules/messages/logMessageSendFailure.tsx; dependencies: [661, 4863, 2] */
|
||||
function _fun57896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7406:6, offset: 0x016b8e32, size: 130 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = function(a0) {
|
||||
return a0.map(_fun57898);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/logMessageSendFailure.tsx');
|
||||
exports.logMessageSendFailure = logMessageSendFailure;
|
||||
exports.getAttachmentMimeTypes = closure;
|
||||
}
|
||||
|
||||
function getAttachmentMimeTypes(a0) { // fn#57897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7406:121, offset: 0x016b8eb4, size: 22 bytes, params: 2, frame: 11
|
||||
return a0.map(function({mimeType}) {
|
||||
return mimeType ?? 'unknown';
|
||||
});
|
||||
}
|
||||
|
||||
function logMessageSendFailure(a0) { // fn#57899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7406:323, offset: 0x016b8ee5, size: 143 bytes, params: 2, frame: 17
|
||||
const r5 = a0.fileItems != null ? getAttachmentMimeTypes(a0.fileItems) : [];
|
||||
const errorMessage = a0.errorMessage;
|
||||
const value = undefined;
|
||||
const r6 = errorMessage ?? value;
|
||||
const r7 = a0.failureCode ?? value;
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = appAnalyticsUtilsModule.trackWithMetadata;
|
||||
const SEND_MESSAGE_FAILURE = AnalyticEvents.SEND_MESSAGE_FAILURE;
|
||||
Reflect.apply(trackWithMetadata, appAnalyticsUtilsModule, [SEND_MESSAGE_FAILURE, {failure_code: r7,
|
||||
error_message: r6, attachment_mimetypes: r5}]);
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
/* Metro module 11171; source: modules/messages/markUnread.tsx; dependencies: [5, 3786, 1379, 4814, 4605, 1878, 661, 3, 21, 7153, 507, 2] */
|
||||
function _fun85310(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:6, offset: 0x01f6ac4b, size: 279 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
const env0_7 = (require(4605) /* metro dependency 4605: ReadStateStore */).shouldBadgeMessage;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('markUnread');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/markUnread.tsx');
|
||||
exports.default = function() {
|
||||
return _markUnread.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _markUnread() { // fn#85311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:225, offset: 0x01f6ad62, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun85313).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun85313(a0, a1) { // fn#85313, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:270, offset: 0x01f6ad9f, size: 505 bytes, params: 3, frame: 22
|
||||
var environment;
|
||||
var r9;
|
||||
var value13;
|
||||
var value16;
|
||||
var object2;
|
||||
var HTTP;
|
||||
var post;
|
||||
if (true) {
|
||||
var env0_0 = a1;
|
||||
var env0_3;
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_8;
|
||||
if (binding.getCurrentUser() != null) {
|
||||
binding = env2_6;
|
||||
var messages = binding.getMessages(a0);
|
||||
var property = messages.toArray().filter(_fun85314).sort(_fun85315).reverse()[0];
|
||||
r9 = property == null ? env2_1(env2_2[8]).atPreviousMillisecond(a1) : property.id;
|
||||
env0_3 = 0;
|
||||
messages.forAll(_fun85316);
|
||||
binding = env2_5;
|
||||
var channel = binding.getChannel(a0);
|
||||
if (channel != null && channel.isThread()) {
|
||||
if (channel.isArchivedThread()) {
|
||||
binding = env2_1;
|
||||
value13 = binding(env2_2[9]);
|
||||
yield value13.unarchiveThread(channel, false);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_4;
|
||||
if (binding.hasJoined(a0)) {
|
||||
binding = env2_10;
|
||||
binding.log('Marking unread', {channelId: a0, messageId: a1});
|
||||
binding = env2_0;
|
||||
HTTP = binding(env2_2[10]).HTTP;
|
||||
post = HTTP.post;
|
||||
object2 = {};
|
||||
binding = env2_9;
|
||||
object2.url = binding.MESSAGE_ACK(a0, r9);
|
||||
object2.body = {manual: true, mention_count: env0_3};
|
||||
object2.oldFormErrors = true;
|
||||
object2.rejectWithError = true;
|
||||
Reflect.apply(post, HTTP, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_1;
|
||||
value16 = binding(env2_2[9]);
|
||||
yield value16.joinThread(channel, 'Mark Unread');
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_10;
|
||||
binding.log('Marking unread', {channelId: a0, messageId: a1});
|
||||
binding = env2_0;
|
||||
HTTP = binding(env2_2[10]).HTTP;
|
||||
post = HTTP.post;
|
||||
object2 = {};
|
||||
binding = env2_9;
|
||||
object2.url = binding.MESSAGE_ACK(a0, r9);
|
||||
object2.body = {manual: true, mention_count: env0_3};
|
||||
object2.oldFormErrors = true;
|
||||
object2.rejectWithError = true;
|
||||
Reflect.apply(post, HTTP, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_4;
|
||||
if (binding.hasJoined(a0)) {
|
||||
binding = env2_10;
|
||||
binding.log('Marking unread', {channelId: a0, messageId: a1});
|
||||
binding = env2_0;
|
||||
HTTP = binding(env2_2[10]).HTTP;
|
||||
post = HTTP.post;
|
||||
object2 = {};
|
||||
binding = env2_9;
|
||||
object2.url = binding.MESSAGE_ACK(a0, r9);
|
||||
object2.body = {manual: true, mention_count: env0_3};
|
||||
object2.oldFormErrors = true;
|
||||
object2.rejectWithError = true;
|
||||
Reflect.apply(post, HTTP, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_1;
|
||||
value16 = binding(env2_2[9]);
|
||||
yield value16.joinThread(channel, 'Mark Unread');
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_10;
|
||||
binding.log('Marking unread', {channelId: a0, messageId: a1});
|
||||
binding = env2_0;
|
||||
HTTP = binding(env2_2[10]).HTTP;
|
||||
post = HTTP.post;
|
||||
object2 = {};
|
||||
binding = env2_9;
|
||||
object2.url = binding.MESSAGE_ACK(a0, r9);
|
||||
object2.body = {manual: true, mention_count: env0_3};
|
||||
object2.oldFormErrors = true;
|
||||
object2.rejectWithError = true;
|
||||
Reflect.apply(post, HTTP, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_10;
|
||||
binding.log('Marking unread', {channelId: a0, messageId: a1});
|
||||
binding = env2_0;
|
||||
HTTP = binding(env2_2[10]).HTTP;
|
||||
post = HTTP.post;
|
||||
object2 = {};
|
||||
binding = env2_9;
|
||||
object2.url = binding.MESSAGE_ACK(a0, r9);
|
||||
object2.body = {manual: true, mention_count: env0_3};
|
||||
object2.oldFormErrors = true;
|
||||
object2.rejectWithError = true;
|
||||
Reflect.apply(post, HTTP, [object2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun85314({id}) { // fn#85314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:367, offset: 0x01f6af98, size: 60 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = env3_1(env3_2[8]);
|
||||
value = value.compare(id, require);
|
||||
return value < 0;
|
||||
}
|
||||
|
||||
function _fun85315({id}, {id}) { // fn#85315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:404, offset: 0x01f6afd4, size: 55 bytes, params: 3, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return env3_1(env3_2[8]).compare(id, id);
|
||||
}
|
||||
|
||||
function _fun85316(a0) { // fn#85316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11357:515, offset: 0x01f6b00b, size: 91 bytes, params: 2, frame: 17
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
let binding = env3_1;
|
||||
const value2 = binding(env3_2[8]);
|
||||
if (value2.compare(a0.id, env0_2) > 0 && env3_7(a0, env0_1)) {
|
||||
binding = env0_3;
|
||||
env0_3 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/* Metro module 11345; source: modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx; dependencies: [6, 7, 661, 4878, 2] */
|
||||
function _fun86743(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:6, offset: 0x01f9e4a5, size: 188 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const value = _fun86744();
|
||||
const Set = global.Set;
|
||||
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set();
|
||||
value.seenChannelIds = set instanceof Object ? set : value2;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/ChannelLatestMessageLoadingStatsManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun86744() { // fn#86744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:143, offset: 0x01f9e561, size: 109 bytes, params: 1, frame: 15
|
||||
return env0_3(ChannelLatestMessageLoadingStatsManager, [{key: 'start', value: function(a0) {
|
||||
var object = {channelId: a0.channelId};
|
||||
var Date = global.Date;
|
||||
object.startMs = Date.now();
|
||||
this.latestChannelMessagesLoad = object;
|
||||
}}, {key: 'cancel', value: function() {
|
||||
this.latestChannelMessagesLoad = undefined;
|
||||
}}, {key: 'finish', value: value_86748}]);
|
||||
}
|
||||
|
||||
function ChannelLatestMessageLoadingStatsManager(a0) { // fn#86745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:154, offset: 0x01f9e5ce, size: 36 bytes, params: 2, frame: 13
|
||||
env1_2(this, ChannelLatestMessageLoadingStatsManager);
|
||||
this.label = a0;
|
||||
}
|
||||
|
||||
function value_86748(a0) { // fn#86748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11531:515, offset: 0x01f9e630, size: 204 bytes, params: 2, frame: 18
|
||||
var value;
|
||||
var seenChannelIds;
|
||||
var value3;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
const latestChannelMessagesLoad = this.latestChannelMessagesLoad;
|
||||
if (latestChannelMessagesLoad != null) {
|
||||
if (latestChannelMessagesLoad.channelId === a0.channelId) {
|
||||
value = global.Date.now();
|
||||
value -= latestChannelMessagesLoad.startMs;
|
||||
seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds;
|
||||
value3 = seenChannelIds.has(a0.channelId);
|
||||
if (!value3) {
|
||||
seenChannelIds = ChannelLatestMessageLoadingStatsManager.seenChannelIds;
|
||||
seenChannelIds.add(a0.channelId);
|
||||
}
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = require(4878) /* metro dependency 4878: Clickstream */;
|
||||
moduleValue.trackClickstream(AnalyticEvents.CHANNEL_LATEST_MESSAGES_LOADED_CLICKSTREAM,
|
||||
{load_duration_ms: value,
|
||||
were_messages_cached: a0.areMessagesCached, is_first_load: !value3});
|
||||
this.latestChannelMessagesLoad = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,299 @@
|
||||
/* Metro module 11317; source: modules/messages/native/ChatBanner.tsx; dependencies: [31, 27, 4257, 4605, 11318, 661, 33, 4501, 697, 11319, 11320, 566, 21, 1357, 683, 4863, 6609, 4573, 1244, 4578, 6860, 7153, 5278, 5097, 8222, 2] */
|
||||
function _fun86326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:6, offset: 0x01f90ec2, size: 713 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = OptInChannelBanner;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
||||
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
||||
const env0_7 = (require(11318) /* metro dependency 11318: ChatOverlayConstants */).ChatOverlays;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = value.AnalyticsObjectTypes;
|
||||
const env0_9 = value.AnalyticsObjects;
|
||||
const env0_10 = value.AnalyticEvents;
|
||||
const env0_11 = value.AnalyticsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object2.threadBannerContainer = {'alignSelf': 'stretch', 'minHeight': 60, 'flexDirection': 'row',
|
||||
'paddingHorizontal': 16, 'paddingVertical': 12, 'alignItems': 'center', 'flexGrow': 0, 'zIndex': 100,
|
||||
backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
object2.threadBannerTitle = {'flex': 1, 'lineHeight': 18};
|
||||
object2.threadBannerButton = {'flexGrow': 0, 'paddingVertical': 7, 'paddingHorizontal': 16, 'marginLeft': 16};
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object2.newMessageBar = {'backgroundColor': null, 'flexDirection': 'row', 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'overflow': 'hidden', 'zIndex': 100, 'minHeight': 45, backgroundColor: BACKGROUND_BRAND};
|
||||
object2.newMessageBarTextContainer = {'flex': 1, 'paddingLeft': 16, 'paddingVertical': 10};
|
||||
object2.newMessageBarCloseButton = {paddingHorizontal: 12};
|
||||
const object3 = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
|
||||
'overflow': 'hidden', 'padding': 8, 'paddingLeft': 16, 'paddingRight': 16, 'zIndex': 100};
|
||||
const CHAT_BANNER_BG = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BANNER_BG;
|
||||
object3.backgroundColor = CHAT_BANNER_BG;
|
||||
object3.borderBottomWidth = StyleSheet.hairlineWidth;
|
||||
let CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER;
|
||||
object3.borderBottomColor = CHAT_BORDER;
|
||||
object2.optInChannelBannerContainer = object3;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.optInChannelBannerLegacyBorder = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE};
|
||||
const object4 = {};
|
||||
object4.borderTopWidth = StyleSheet.hairlineWidth;
|
||||
CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER;
|
||||
object4.borderTopColor = CHAT_BORDER;
|
||||
object2.topBorder = object4;
|
||||
object2.optInChannelBannerText = {flex: 1};
|
||||
object2.optInChannelBannerButtonContainer = {'flexShrink': 0, 'marginLeft': 8};
|
||||
const env0_14 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/ChatBanner.tsx');
|
||||
exports.default = ChatBanner;
|
||||
exports.OptInChannelBanner = closure;
|
||||
}
|
||||
|
||||
function OptInChannelBanner({channel, topBorder}) { // fn#86327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1536, offset: 0x01f9118b, size: 439 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('OptInChannelBanner');
|
||||
env0_3.useEffect(_fun86328, [channel]);
|
||||
const value3 = env0_3.useCallback(_fun86329, [channel]);
|
||||
const items2 = [styles.optInChannelBannerContainer];
|
||||
items2[1] = value2 ? null : styles.optInChannelBannerLegacyBorder;
|
||||
topBorder = topBorder ? styles.topBorder : null;
|
||||
items2[2] = topBorder;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const text = <Text lineClamp={2} style={styles.optInChannelBannerText} variant="text-sm/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iOWmmB)}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{text}
|
||||
<View style={styles.optInChannelBannerButtonContainer}>
|
||||
<Button
|
||||
onPress={value3}
|
||||
size="sm"
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['TD/+zP'])}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ArchivedLockedThreadChatBanner({channel}) { // fn#86330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:2542, offset: 0x01f914a8, size: 420 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
env0_3.useEffect(_fun86331, [channel]);
|
||||
const value2 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanUnarchiveThread(channel);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const isForumPost2 = channel.isForumPost();
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<View style={styles.threadBannerContainer}>
|
||||
<Text
|
||||
lineClamp={4}
|
||||
style={styles.threadBannerTitle}
|
||||
variant="text-sm/medium"
|
||||
color="text-default"
|
||||
>
|
||||
{isForumPost2 ? Reflect.apply(string, intl, [t['833FDn']]) : Reflect.apply(string, intl, [t.rEeodK])}
|
||||
</Text>
|
||||
{value2 && <View style={styles.threadBannerButton}>{((Button) => <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0dvvEi'])} onPress={onPress_86332} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function LockedThreadChatBanner({channel}) { // fn#86333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3488, offset: 0x01f9178f, size: 420 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
env0_3.useEffect(_fun86334, [channel]);
|
||||
const value2 = (require(6860) /* metro dependency 6860: ThreadHooks */).useIsThreadModerator(channel);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const isForumPost2 = channel.isForumPost();
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<View style={styles.threadBannerContainer}>
|
||||
<Text
|
||||
lineClamp={4}
|
||||
style={styles.threadBannerTitle}
|
||||
variant="text-sm/medium"
|
||||
color="text-default"
|
||||
>
|
||||
{isForumPost2 ? Reflect.apply(string, intl, [t.E7oO8u]) : Reflect.apply(string, intl, [t['V/JF2N']])}
|
||||
</Text>
|
||||
{value2 && <View style={styles.threadBannerButton}>{((Button) => <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zA9d1J)} onPress={onPress_86335} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function NewMessagesChatBar({channel, unreadCount, oldestUnreadTimestamp, handleScrollToNewMessages}) { // fn#86336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:4413, offset: 0x01f919e4, size: 555 bytes, params: 2, frame: 36
|
||||
var r23;
|
||||
var r1;
|
||||
var r0;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
if (Reflect.apply(useStateFromStores, fluxModule, [[GatewayConnectionStore], function() {
|
||||
return GatewayConnectionStore.isConnected();
|
||||
}, []])) {
|
||||
if (unreadCount <= 0) {
|
||||
r1 = null;
|
||||
} else {
|
||||
r23 = ReadStateStore.isEstimated(channel.id) ? t.wvtbbG : t['BctFH/'];
|
||||
var viewBindingProps = {style: styles.newMessageBar};
|
||||
items2 = [<PressableOpacity accessibilityRole="button" style={styles.newMessageBarTextContainer} onPress={handleScrollToNewMessages}>{((Text) => <Text variant="text-sm/semibold" color="always-white">{intl.format(r23,
|
||||
|
||||
|
||||
{count: unreadCount,
|
||||
timestamp: oldestUnreadTimestamp})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>];
|
||||
items2[1] = <PressableOpacity style={styles.newMessageBarCloseButton} accessibilityRole="button" accessibilityLabel={intl.string(t.e6RscS)} onPress={function() {
|
||||
return require(dependencyMap[23]).ack(channel.id, {section: AnalyticsSections.NEW_MESSAGES_BANNER,
|
||||
object: AnalyticsObjects.MARK_CHANNEL_AS_READ_BUTTON, objectType: AnalyticsObjectTypes.ACK_MANUAL});
|
||||
}}>{((XSmallBoldIcon) => <XSmallBoldIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(8222) /* metro dependency 8222: XSmallBoldIcon */).XSmallBoldIcon)}</PressableOpacity>;
|
||||
r1 = <View {...viewBindingProps}>{items2}</View>;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ChatBanner({channel, handleScrollToNewMessages}) { // fn#86339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:5381, offset: 0x01f91c71, size: 330 bytes, params: 2, frame: 22
|
||||
const value2 = (importDefault(11319) /* metro dependency 11319: useShowChannelOptInNotice */)(channel);
|
||||
const value3 = (importDefault(11320) /* metro dependency 11320: useAllowedChatOverlays */)();
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ReadStateStore], _fun86340,
|
||||
[channel.id]);
|
||||
const unreadCount = value4.unreadCount;
|
||||
return channel.isArchivedLockedThread() ? <ArchivedLockedThreadChatBanner channel={channel} /> : channel.isLockedThread() ? <LockedThreadChatBanner channel={channel} /> : unreadCount > 0 && value3.includes(ChatOverlays.NEW_MESSAGES) ? <NewMessagesChatBar unreadCount={unreadCount} oldestUnreadTimestamp={value4.oldestUnreadTimestamp} channel={channel} handleScrollToNewMessages={handleScrollToNewMessages} /> : value2 && value3.includes(ChatOverlays.OPT_IN_CHANNEL) ? <OptInChannelBanner channel={channel} /> : null;
|
||||
}
|
||||
|
||||
function _fun86328() { // fn#86328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1645, offset: 0x01f91342, size: 143 bytes, params: 1, frame: 21
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
|
||||
channelBinding, [])]), value);
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
|
||||
object2['banner_type'] = 'channel_opt_in';
|
||||
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object2]);
|
||||
}
|
||||
|
||||
function _fun86329() { // fn#86329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1854, offset: 0x01f913d1, size: 215 bytes, params: 1, frame: 24
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
|
||||
const object2 = {};
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = appAnalyticsUtilsModule.collectGuildAnalyticsMetadata;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, appAnalyticsUtilsModule,
|
||||
[Reflect.apply(getGuildId, channelBinding, [])]), undefined);
|
||||
const moduleValue2 = appAnalyticsUtilsModule;
|
||||
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadata(channelBinding), undefined);
|
||||
object2['banner_type'] = 'channel_opt_in';
|
||||
object2['cta_type'] = 'add channel';
|
||||
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
|
||||
const optInChannelsActionCreatorsModule = require(6609) /* metro dependency 6609: OptInChannelsActionCreators */;
|
||||
const setOptInChannel = optInChannelsActionCreatorsModule.setOptInChannel;
|
||||
const guild_id = channelBinding.guild_id;
|
||||
const id = channelBinding.id;
|
||||
const CHANNEL = AnalyticsSections.CHANNEL;
|
||||
Reflect.apply(setOptInChannel, optInChannelsActionCreatorsModule, [guild_id, id, true, {section: CHANNEL}]);
|
||||
}
|
||||
|
||||
function _fun86331() { // fn#86331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:2618, offset: 0x01f9164c, size: 141 bytes, params: 1, frame: 21
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
|
||||
channelBinding, [])]), value);
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
|
||||
object2['banner_type'] = 'thread';
|
||||
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object2]);
|
||||
}
|
||||
|
||||
function ArchivedLockedThreadChatBannerOnPress() { // fn#86332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3250, owner: ArchivedLockedThreadChatBanner.onPress, offset: 0x01f916d9, size: 182 bytes, params: 1, frame: 22
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
|
||||
channelBinding, [])]), value);
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
|
||||
object2['banner_type'] = 'thread';
|
||||
object2['cta_type'] = 'unarchive';
|
||||
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
|
||||
(importDefault(7153) /* metro dependency 7153: ThreadActionCreators */).unarchiveThread(channelBinding, false);
|
||||
}
|
||||
|
||||
function LockedThreadChatBannerOnPress() { // fn#86335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:4184, owner: LockedThreadChatBanner.onPress, offset: 0x01f91933, size: 177 bytes, params: 1, frame: 22
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
|
||||
channelBinding, [])]), value);
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
|
||||
object2['banner_type'] = 'thread';
|
||||
object2['cta_type'] = 'unlock';
|
||||
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
|
||||
(importDefault(7153) /* metro dependency 7153: ThreadActionCreators */).unlockThread(channelBinding);
|
||||
}
|
||||
|
||||
function _fun86340() { // fn#86340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:5513, offset: 0x01f91dbb, size: 114 bytes, params: 1, frame: 15
|
||||
var r1;
|
||||
let value = environment.__proto__;
|
||||
const getOldestUnreadTimestamp = ReadStateStore.getOldestUnreadTimestamp;
|
||||
const channelBinding = channel;
|
||||
const value3 = Reflect.apply(getOldestUnreadTimestamp, ReadStateStore, [channelBinding.id]);
|
||||
const object2 = {};
|
||||
object2.unreadCount = ReadStateStore.getUnreadCount(channelBinding.id);
|
||||
if (value3 !== 0) {
|
||||
r1 = value3;
|
||||
} else {
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value = value.extractTimestamp(channel.id);
|
||||
r1 = value;
|
||||
}
|
||||
object2.oldestUnreadTimestamp = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,667 @@
|
||||
/* Metro module 11784; source: modules/messages/native/DMMessageStickerGreeting.tsx; dependencies: [5, 57, 31, 27, 6583, 4814, 1878, 33, 4501, 697, 3963, 3860, 4000, 3857, 11785, 11786, 7067, 1244, 566, 671, 3995, 11787, 11050, 4017, 4504, 1305, 11049, 4589, 5278, 10970, 4573, 4578, 2] */
|
||||
function _fun90262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:6, offset: 0x020320b3, size: 339 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const env0_12 = value.Fragment;
|
||||
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun90263);
|
||||
const GradientPercentage = (require(3963) /* metro dependency 3963: ClientThemesUtils */).GradientPercentage;
|
||||
const env0_14 = GradientPercentage.END;
|
||||
object = {code: "function DMMessageStickerGreetingTsx1(){const{styles,isRendered,hasInputText,hasMessages,HEIGHT_COMPACT,HEIGHT_FULL,withDelay,withTiming,STANDARD_EASING}=this.__closure;const gradientOverlayOffset=styles.gradient.height;const hasHeight=isRendered&&!hasInputText;const heightExpanded=(hasMessages?HEIGHT_COMPACT:HEIGHT_FULL)-1;const targetHeight=hasHeight?heightExpanded+gradientOverlayOffset:0;const targetMargin=hasHeight?-gradientOverlayOffset:0;const generateAnimationConfig=function(value){return withDelay(300,withTiming(value,{easing:STANDARD_EASING,duration:250}));};return{justifyContent:'flex-end',overflow:'hidden',marginTop:generateAnimationConfig(targetMargin),height:generateAnimationConfig(targetHeight)};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/DMMessageStickerGreeting.tsx');
|
||||
exports.default = DMMessageStickerGreeting;
|
||||
}
|
||||
|
||||
function _fun90263(a0) { // fn#90263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:235, offset: 0x02032206, size: 207 bytes, params: 2, frame: 15
|
||||
const value = a0;
|
||||
const object2 = {};
|
||||
object2.container = {'backgroundColor': null, 'alignItems': 'center', 'paddingHorizontal': 16, 'paddingBottom': 16,
|
||||
'paddingTop': 8,
|
||||
backgroundColor: value ?? (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER};
|
||||
object2.stickerContainer = {paddingBottom: 16};
|
||||
const object3 = {'flexDirection': 'row', 'backgroundColor': null, 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'gap': 8, 'height': 48, 'paddingHorizontal': 16};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
|
||||
object2.toastContainer = object3;
|
||||
object2.toastContent = {lineHeight: 20};
|
||||
object2.gradient = {'position': 'absolute', 'right': 0, 'left': 0, 'top': 0, 'height': 30};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function DMMessageStickerGreeting({channel, hasInputText}) { // fn#90264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:1610, offset: 0x020322d5, size: 1339 bytes, params: 2, frame: 38
|
||||
var r0;
|
||||
var r9;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var View2;
|
||||
var object3;
|
||||
var PressableOpacity;
|
||||
var items3;
|
||||
const clientThemesUtilsModule = require(3963) /* metro dependency 3963: ClientThemesUtils */;
|
||||
const useGradientValue = clientThemesUtilsModule.useGradientValue;
|
||||
const styles = useStyles(Reflect.apply(useGradientValue, clientThemesUtilsModule, [END]));
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], _fun90265);
|
||||
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getUser(channel.getRecipientId());
|
||||
});
|
||||
const value7 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.m0zYbV,
|
||||
{username: (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y1Wu2f)});
|
||||
const value8 = (require(11787) /* metro dependency 11787: useShowConvoStarterInDM */).useShowConvoStarterInDM(channel);
|
||||
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StickersStore], _fun90268,
|
||||
[value8]);
|
||||
undefined.useEffect(_fun90269, [value8]);
|
||||
const value10 = useHandleWavePress(channel);
|
||||
const {isRendered, setIsRendered} = useIsRendered();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = DMMessageStickerGreetingX;
|
||||
object = {styles: styles, isRendered: isRendered, hasInputText: hasInputText, hasMessages: value3,
|
||||
HEIGHT_COMPACT: 72, HEIGHT_FULL: 180};
|
||||
object.withDelay = reanimatedRexportModule.withDelay;
|
||||
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object.STANDARD_EASING = STANDARD_EASING;
|
||||
closure.__closure = object;
|
||||
closure.__workletHash = 14002474476449;
|
||||
closure.__initData = env0_15;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value14 = (require(3860) /* metro dependency 3860: useToken */).useToken(clientThemesUtilsModule.useGradientValue(END) ?? (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER);
|
||||
object = [(require(4000) /* metro dependency 4000: ColorUtils */).hexWithOpacity(value14, 0), value14];
|
||||
const value16 = (require(11049) /* metro dependency 11049: StickersHooks */).useShouldAnimateSticker(false);
|
||||
if (value8) {
|
||||
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
object3 = {style: value12, onLayout: setIsRendered};
|
||||
object = [((Component) => <Component style={styles.gradient} colors={object} />)(importDefault(4589) /* metro dependency 4589 */)];
|
||||
var viewBindingProps = {style: styles.container};
|
||||
if (value3) {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps2 = {style: styles.toastContainer, accessibilityRole: 'button',
|
||||
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pJObYI),
|
||||
onPress: value10};
|
||||
items3 = [value9 != null ? ((Component) => <Component sticker={value9} size={24} animated={value16} />)(importDefault(10970) /* metro dependency 10970: Sticker */) : null];
|
||||
items3[1] = ((Text) => <Text style={styles.toastContent} variant="text-md/bold">{value7}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
r9 = <PressableOpacity {...pressableOpacityProps2}>{items3}</PressableOpacity>;
|
||||
} else {
|
||||
r9 = <>{value9 != null ? <View style={styles.stickerContainer}>{((Component) => <Component sticker={value9} size={100} animated={value16} />)(importDefault(10970) /* metro dependency 10970: Sticker */)}</View> : null}{((Button) => <Button text={value7} onPress={value10} shrink />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</>;
|
||||
}
|
||||
object[1] = <View {...viewBindingProps}>{r9}</View>;
|
||||
r0 = <View2 {...object3}>{object}</View2>;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun90265() { // fn#90265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:1751, offset: 0x02032810, size: 62 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = MessageStore.getMessages(channel.id);
|
||||
return value.filter(function({type}) {
|
||||
return type !== require(dependencyMap[19]).MessageTypes.FRIEND_REQUEST_ACCEPTED;
|
||||
}).length > 0;
|
||||
}
|
||||
|
||||
function _fun90268() { // fn#90268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2140, offset: 0x020328a6, size: 38 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
let value = null;
|
||||
if (env0_4) {
|
||||
value = environment.__proto__;
|
||||
value = StickersStore.getStickerById('749054660769218631');
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun90269() { // fn#90269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2190, offset: 0x020328cc, size: 59 bytes, params: 1, frame: 13
|
||||
var value;
|
||||
if (env0_4) {
|
||||
value = environment.__proto__;
|
||||
value = require(11050) /* metro dependency 11050: StickersActionCreators */;
|
||||
value.fetchStickerPack('847199849233514549', true);
|
||||
}
|
||||
}
|
||||
|
||||
function useHandleWavePress(a0) { // fn#90270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2264, owner: DMMessageStickerGreeting.useHandleWavePress, offset: 0x02032907, size: 179 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_5;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [null]);
|
||||
const binding2 = env1_4;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const env0_2 = value3[1];
|
||||
useState = binding.useState;
|
||||
const value4 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property2 = value4[0];
|
||||
const env0_4 = value4[1];
|
||||
binding.useEffect(_fun90271, [a0.id]);
|
||||
return binding.useCallback(env1_3(_fun90273), [property2, property, a0.id]);
|
||||
}
|
||||
|
||||
function useIsRendered() { // fn#90275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2848, owner: DMMessageStickerGreeting.useIsRendered, offset: 0x02032b60, size: 93 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_5;
|
||||
value = env1_4(binding.useState(false), 2);
|
||||
const property = value[0];
|
||||
const property2 = value[1];
|
||||
const useCallback = binding.useCallback;
|
||||
return {isRendered: property, setIsRendered: Reflect.apply(useCallback, binding, [_fun90276, [property2]])};
|
||||
}
|
||||
|
||||
function DMMessageStickerGreetingX() { // fn#90277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:3053, owner: DMMessageStickerGreeting.x, offset: 0x02032bbd, size: 114 bytes, params: 1, frame: 14
|
||||
var r3;
|
||||
var value;
|
||||
const height = styles.gradient.height;
|
||||
const r5 = isRendered && !hasInputText;
|
||||
const value3 = 0;
|
||||
if (r5) {
|
||||
value = 180;
|
||||
value = (env0_3 ? 72 : value) - 1 + height;
|
||||
r3 = value;
|
||||
} else {
|
||||
r3 = value3;
|
||||
}
|
||||
const closure = generateAnimationConfig;
|
||||
const object2 = {'justifyContent': 'flex-end', 'overflow': 'hidden'};
|
||||
object2.marginTop = closure(r5 ? -height : value3);
|
||||
object2.height = closure(r3);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function* _fun90273() { // fn#90273, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2441, offset: 0x020329c5, size: 316 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
var r4;
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value4;
|
||||
var trackWaveCtaClicked;
|
||||
var object2;
|
||||
var channelBinding;
|
||||
var id;
|
||||
var value5;
|
||||
var sendGreetMessage;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var error;
|
||||
var ok;
|
||||
var status;
|
||||
var value9;
|
||||
var binding3;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var Whhv4w;
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
if (!env1_3) {
|
||||
env1_4(true);
|
||||
var closure = showErrorToast;
|
||||
if (hasInputText !== null) {
|
||||
env1_4(false);
|
||||
return closure(hasInputText);
|
||||
}
|
||||
try {
|
||||
binding = env3_0;
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env3_2;
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[15];
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
trackWaveCtaClicked = value4.trackWaveCtaClicked;
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
channelBinding = channel;
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
id = channelBinding.id;
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2.channelId = id;
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
object2.source = 'In-channel greet';
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(trackWaveCtaClicked, value4, [object2]);
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env3_1;
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[16];
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value5 = binding(property);
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
sendGreetMessage = value5.sendGreetMessage;
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
id = channelBinding.id;
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value6 = Reflect.apply(sendGreetMessage, value5, [id, '749054660769218631']);
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
yield value6;
|
||||
try {
|
||||
value7 = undefined;
|
||||
value8 = false;
|
||||
} catch (error) {
|
||||
ok = error.ok;
|
||||
if (ok) {
|
||||
r4 = ok;
|
||||
} else {
|
||||
status = error.status;
|
||||
value9 = status !== 429;
|
||||
r4 = value9;
|
||||
}
|
||||
if (!r4) {
|
||||
binding = env3_0;
|
||||
binding3 = env3_2;
|
||||
intl = binding(binding3[17]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding3[17]).t;
|
||||
Whhv4w = t.Whhv4w;
|
||||
closure(Reflect.apply(string, intl, [Whhv4w]));
|
||||
}
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
if (value8) {
|
||||
return value7;
|
||||
}
|
||||
env1_4(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function generateAnimationConfig(a0) { // fn#90278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:3141, owner: DMMessageStickerGreeting.x.generateAnimationConfig, offset: 0x02032c2f, size: 103 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = value.withDelay;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
return Reflect.apply(withDelay, value, [300, Reflect.apply(withTiming, timingModule, [a0, {easing: STANDARD_EASING,
|
||||
duration: 250}])]);
|
||||
}
|
||||
|
||||
function showErrorToast(a0) { // fn#90274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11970:2485, offset: 0x02032b01, size: 95 bytes, params: 2, frame: 16
|
||||
let value = environment.__proto__.__proto__;
|
||||
if (hasInputText !== a0) {
|
||||
styles(a0);
|
||||
}
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
const binding = env4_1;
|
||||
const binding2 = env4_2;
|
||||
value = binding(binding2[13]);
|
||||
value.open({key: 'HANDLE_WAVE_PRESS_TOAST', content: a0, icon: binding(binding2[14])});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
/* Metro module 8216; source: modules/messages/native/MessageAccessibilityActions.tsx; dependencies: [4798, 3784, 661, 3829, 8217, 1244, 8220, 8228, 2] */
|
||||
function _fun65778(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:6, offset: 0x01bde2c0, size: 258 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageAccessibilityActions.tsx');
|
||||
exports.MessageAccessibilityAction = {VIEW_PROFILE: 'view_profile', ADD_REACTION: 'add_reaction',
|
||||
ADD_QUICK_REACTION: 'add_quick_reaction', REPLY: 'reply', MESSAGE_ACTIONS_MENU: 'message_actions_menu',
|
||||
EDIT_GDM: 'edit_gdm'};
|
||||
exports.getMessageAccessibilityActionFromLabel = getMessageAccessibilityActionFromLabel;
|
||||
exports.createMessageAccessibilityActions = createMessageAccessibilityActions;
|
||||
}
|
||||
|
||||
function getQuickReactionLabel() { // fn#65779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:352, offset: 0x01bde3c2, size: 307 bytes, params: 1, frame: 19
|
||||
var r2;
|
||||
const DoubleTapExpandExperiment = (require(8220) /* metro dependency 8220: DoubleTapExpandExperiment */).DoubleTapExpandExperiment;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const value2 = undefined;
|
||||
const DoubleTapReactionEmoji = (require(3829) /* metro dependency 3829: UserSettings */).DoubleTapReactionEmoji;
|
||||
const setting = DoubleTapReactionEmoji.getSetting();
|
||||
const value4 = null;
|
||||
if ((value4 == setting ? value2 : setting.disableDoubleTap) === true) {
|
||||
return value4;
|
||||
}
|
||||
if (value4 == setting) {
|
||||
r2 = DoubleTapExpandExperiment.getConfig({location: 'createMessageAccessibilityActions'}).enabled ? intl.formatToPlainString(t.eQIttH,
|
||||
|
||||
{emojiName: 'heart'}) : value4;
|
||||
} else {
|
||||
var value5 = (require(8217) /* metro dependency 8217: DoubleTapToReactUtils */).disambiguatedEmojiFromSettingsValue(setting);
|
||||
if (value4 != value5) {
|
||||
return intl.formatToPlainString(t.eQIttH, {emojiName: value5.name});
|
||||
}
|
||||
r2 = DoubleTapExpandExperiment.getConfig({location: 'createMessageAccessibilityActions'}).enabled ? intl.formatToPlainString(t.eQIttH,
|
||||
|
||||
{emojiName: 'heart'}) : value4;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
|
||||
function getMessageAccessibilityActionFromLabel(a0) { // fn#65780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:988, offset: 0x01bde4f5, size: 334 bytes, params: 2, frame: 18
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const value2 = Reflect.apply(string, intl, [t.iXAna6]);
|
||||
const binding = env0_5;
|
||||
const VIEW_PROFILE = binding.VIEW_PROFILE;
|
||||
object2[value2] = VIEW_PROFILE;
|
||||
const value3 = intl.string(t.lfIHs4);
|
||||
const ADD_REACTION = binding.ADD_REACTION;
|
||||
object2[value3] = ADD_REACTION;
|
||||
const value4 = intl.string(t['5IEsGx']);
|
||||
const REPLY = binding.REPLY;
|
||||
object2[value4] = REPLY;
|
||||
string = intl.string;
|
||||
const ChPNkN = t.ChPNkN;
|
||||
const value5 = Reflect.apply(string, intl, [ChPNkN]);
|
||||
const MESSAGE_ACTIONS_MENU = binding.MESSAGE_ACTIONS_MENU;
|
||||
object2[value5] = MESSAGE_ACTIONS_MENU;
|
||||
const value6 = intl.string(t['5Q9+/L']);
|
||||
const EDIT_GDM = binding.EDIT_GDM;
|
||||
object2[value6] = EDIT_GDM;
|
||||
const quickReactionLabel = getQuickReactionLabel();
|
||||
if (quickReactionLabel != null) {
|
||||
object2[quickReactionLabel] = env0_5.ADD_QUICK_REACTION;
|
||||
}
|
||||
return object2[a0];
|
||||
}
|
||||
|
||||
function createMessageAccessibilityActions(a0, a1) { // fn#65781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8401:1437, offset: 0x01bde643, size: 520 bytes, params: 3, frame: 21
|
||||
var r2;
|
||||
var push;
|
||||
var quickReactionLabel;
|
||||
if (a1 == null) {
|
||||
return [];
|
||||
}
|
||||
let value = a1.getGuildId();
|
||||
const value2 = value != null;
|
||||
if (value2) {
|
||||
value = GuildVerificationStore.canChatInGuild(value);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value2;
|
||||
}
|
||||
r2 = r2 && PermissionStore.can(Permissions.ADD_REACTIONS, a1);
|
||||
r2 = !r2 ? a1.isPrivate() : r2;
|
||||
let object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.label = Reflect.apply(string, intl, [t.iXAna6]);
|
||||
const VIEW_PROFILE = env0_5.VIEW_PROFILE;
|
||||
object2.name = VIEW_PROFILE;
|
||||
const items2 = [object2];
|
||||
if (r2) {
|
||||
items2.push({label: intl.string(t.lfIHs4), name: env0_5.ADD_REACTION});
|
||||
quickReactionLabel = getQuickReactionLabel();
|
||||
if (quickReactionLabel != null) {
|
||||
items2.push({label: quickReactionLabel, name: env0_5.ADD_QUICK_REACTION});
|
||||
}
|
||||
}
|
||||
const canReplyToMessageModule = require(8228) /* metro dependency 8228: canReplyToMessage */;
|
||||
if (canReplyToMessageModule.canReplyToMessage(a1, a0)) {
|
||||
push = items2.push;
|
||||
object2 = {};
|
||||
object2.label = intl.string(t['5IEsGx']);
|
||||
object2.name = env0_5.REPLY;
|
||||
Reflect.apply(push, items2, [object2]);
|
||||
}
|
||||
push = items2.push;
|
||||
string = intl.string;
|
||||
const ChPNkN = t.ChPNkN;
|
||||
const MESSAGE_ACTIONS_MENU = env0_5.MESSAGE_ACTIONS_MENU;
|
||||
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [ChPNkN]), name: MESSAGE_ACTIONS_MENU}]);
|
||||
return items2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Metro module 11434; source: modules/messages/native/MessageGameIconActionSheet.tsx; dependencies: [31, 27, 4234, 661, 33, 4501, 477, 697, 566, 6275, 1305, 4573, 6766, 1244, 1948, 2] */
|
||||
function _fun87512(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11620:6, offset: 0x01fc114c, size: 377 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = 0;
|
||||
importAll(dependencyMap[value]);
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value2.jsx;
|
||||
const env0_7 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object2.contentWrapper = {'paddingHorizontal': 24, 'paddingTop': 8,
|
||||
paddingBottom: platformUtilsModule.isAndroid() ? 16 : value};
|
||||
object2.gameDescriptionWrapper = {'flexDirection': 'column', 'justifyContent': 'flex-start', 'flex': 1};
|
||||
const object4 = {'width': 56, 'height': 56, 'marginRight': 8};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.gameIcon = object4;
|
||||
object2.gameDescriptionWrapperOuter = {flexDirection: 'row'};
|
||||
object2.timestamp = {marginBottom: 4};
|
||||
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageGameIconActionSheet.tsx');
|
||||
exports.default = _default_87513;
|
||||
}
|
||||
|
||||
function _default_87513({applicationId, messageTimestamp}) { // fn#87513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11620:542, offset: 0x01fc12c5, size: 627 bytes, params: 2, frame: 34
|
||||
var r0;
|
||||
var BottomSheet;
|
||||
var Icon;
|
||||
var object;
|
||||
var items4;
|
||||
var items2;
|
||||
var TextWithIOSLinkWorkaround;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items3;
|
||||
var BPDKoA;
|
||||
var defaultImport;
|
||||
const styles = useStyles();
|
||||
const application = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore],
|
||||
function() {
|
||||
return ApplicationStore.getApplication(applicationId);
|
||||
});
|
||||
if (application == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
var viewBindingProps = {style: styles.contentWrapper};
|
||||
var viewBindingProps2 = {style: styles.gameDescriptionWrapperOuter};
|
||||
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
var iconProps = {style: styles.gameIcon, resizeMode: 'contain'};
|
||||
object = {};
|
||||
object.uri = application?.getIconURL(56) ?? '';
|
||||
iconProps.source = object;
|
||||
iconProps.disableColor = true;
|
||||
items4 = [<Icon {...iconProps} />];
|
||||
var viewBinding2Props = {style: styles.gameDescriptionWrapper};
|
||||
items2 = [((Text) => <Text style={styles.timestamp} variant="text-xs/medium" color="text-muted">{messageTimestamp}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
format = intl.format;
|
||||
items3 = [Reflect.apply(format, intl, [t.J3s8JP, {applicationName: application.name}]), ' '];
|
||||
format = intl.format;
|
||||
BPDKoA = t.BPDKoA;
|
||||
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
items3[2] = Reflect.apply(format, intl, [BPDKoA,
|
||||
{helpdeskArticle: defaultImport.getArticleURL(HelpdeskArticles.SOCIAL_LAYER_CONNECTIONS)}]);
|
||||
items2[1] = <TextWithIOSLinkWorkaround variant="text-sm/medium">{items3}</TextWithIOSLinkWorkaround>;
|
||||
items4[1] = <View {...viewBinding2Props}>{items2}</View>;
|
||||
r0 = <BottomSheet startExpanded><View {...viewBindingProps}><View {...viewBindingProps2}>{items4}</View></View></BottomSheet>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,535 @@
|
||||
/* Metro module 9854; source: modules/messages/native/MessageImpressionAnalyticsHelpers.tsx; dependencies: [31, 4097, 4300, 661, 7082, 4118, 9855, 6858, 4101, 4116, 9856, 9857, 4098, 2] */
|
||||
function _fun77223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:6, offset: 0x01df5df5, size: 373 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_77226 = 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 env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
|
||||
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = constantsModule.ChannelTypes;
|
||||
const env0_7 = constantsModule.GuildFeatures;
|
||||
const env0_8 = constantsModule.InviteStates;
|
||||
const env0_9 = constantsModule.MessageFlags;
|
||||
const env0_10 = (require(7082) /* metro dependency 7082: MessageEmbedConstants */).LinkType;
|
||||
const env0_11 = (require(4118) /* metro dependency 4118: Constants */).InviteTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageImpressionAnalyticsHelpers.tsx');
|
||||
exports.useShouldTrackAnnouncementMessageViews = useShouldTrackAnnouncementMessageViews;
|
||||
exports.useShouldTrackRichPresenceInviteEmbedViews = useShouldTrackRichPresenceInviteEmbedViews;
|
||||
exports.handleAnnouncementMessageViewTracking = handleAnnouncementMessageViewTracking;
|
||||
exports.handleRichPresenceInviteEmbedViewTracking = handleRichPresenceInviteEmbedViewTracking;
|
||||
exports.useShouldTrackOfficialMessageViews = useShouldTrackOfficialMessageViews;
|
||||
exports.handleOfficialMessageViewTracking = handleOfficialMessageViewTracking;
|
||||
exports.useShouldTrackVoiceInviteEmbedViews = useShouldTrackVoiceInviteEmbedViews;
|
||||
exports.handleVoiceInviteEmbedViewTracking = handleVoiceInviteEmbedViewTracking;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_77224(a0, a1) { // fn#77224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:254, offset: 0x01df5f6a, 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 _fun77225;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_77226(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_77226(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_77226(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun77225;
|
||||
}
|
||||
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 getVoiceInviteEmbedRenderInfo(a0) { // fn#77227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:1164, offset: 0x01df60de, size: 340 bytes, params: 2, frame: 17
|
||||
var r2;
|
||||
var r0;
|
||||
var moduleValue3;
|
||||
var enabled;
|
||||
let state = a0.state;
|
||||
var value;
|
||||
const RESOLVING = InviteStates.RESOLVING;
|
||||
if (state === RESOLVING) {
|
||||
return null;
|
||||
}
|
||||
state = a0.state;
|
||||
const EXPIRED = InviteStates.EXPIRED;
|
||||
if (state === EXPIRED) {
|
||||
return null;
|
||||
}
|
||||
state = a0.state;
|
||||
const BANNED = InviteStates.BANNED;
|
||||
if (state === BANNED) {
|
||||
return null;
|
||||
}
|
||||
state = a0.state;
|
||||
const ERROR = InviteStates.ERROR;
|
||||
if (state === ERROR) {
|
||||
return null;
|
||||
}
|
||||
const value2 = undefined;
|
||||
const inviteType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).getInviteType(a0);
|
||||
const GUILD = InviteTypes.GUILD;
|
||||
if (inviteType !== GUILD) {
|
||||
return null;
|
||||
}
|
||||
const guildInviteExtendedType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).getGuildInviteExtendedType(a0);
|
||||
const GuildInviteExtendedType = (require(4116) /* metro dependency 4116: InviteTypeUtils */).GuildInviteExtendedType;
|
||||
const VOICE_CHANNEL = GuildInviteExtendedType.VOICE_CHANNEL;
|
||||
if (guildInviteExtendedType !== VOICE_CHANNEL) {
|
||||
return null;
|
||||
}
|
||||
const guild = a0.guild;
|
||||
const value5 = null;
|
||||
const id = value5 == guild ? value2 : guild.id;
|
||||
if (value5 == id) {
|
||||
r0 = value5;
|
||||
} else {
|
||||
moduleValue3 = require(9856) /* metro dependency 9856: VoiceChannelListInviteExperiment */;
|
||||
enabled = moduleValue3.getVoiceChannelListInviteExperiment({guildId: id,
|
||||
location: 'mobile_invite_embed_impression'}).enabled;
|
||||
if (enabled) {
|
||||
value = require(9857) /* metro dependency 9857: VoiceChannelListInviteEmbed */;
|
||||
value = value.canShowVoiceChannelListInviteEmbed(a0);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = enabled;
|
||||
}
|
||||
r0 = {treatmentRendered: r2};
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useShouldTrackAnnouncementMessageViews({guild, channel, messages, isMessagesReady}) { // fn#77228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:1836, offset: 0x01df6232, size: 169 bytes, params: 2, frame: 18
|
||||
const r1 = guild == null || guild.features == null ? undefined : guild.features.has(GuildFeatures.COMMUNITY);
|
||||
const r6 = r1 != null && r1;
|
||||
return r6.useMemo(_fun77229, [channel.type, channel.guild_id, r6, isMessagesReady, messages]);
|
||||
}
|
||||
|
||||
function useShouldTrackRichPresenceInviteEmbedViews({messages, isMessagesReady}) { // fn#77231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2270, offset: 0x01df6372, size: 64 bytes, params: 2, frame: 15
|
||||
return env0_3.useMemo(_fun77232, [messages, isMessagesReady]);
|
||||
}
|
||||
|
||||
function handleAnnouncementMessageViewTracking(a0, a1, a2, a3) { // fn#77234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2507, offset: 0x01df6406, size: 122 bytes, params: 5, frame: 16
|
||||
var defaultImport;
|
||||
const env0_0 = a2;
|
||||
const env0_1 = a3;
|
||||
if (a1) {
|
||||
if (a2 != null) {
|
||||
a0.forEach(_fun77235);
|
||||
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
|
||||
defaultImport.handleMessageListVisibilityChange([],
|
||||
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.ANNOUNCEMENT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleRichPresenceInviteEmbedViewTracking(a0, a1, a2, a3) { // fn#77236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3287, offset: 0x01df65d2, size: 116 bytes, params: 5, frame: 16
|
||||
var defaultImport;
|
||||
const env0_0 = a2;
|
||||
const env0_1 = a3;
|
||||
if (a1) {
|
||||
a0.forEach(_fun77237);
|
||||
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
|
||||
defaultImport.handleMessageListVisibilityChange([],
|
||||
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.APP_EMBED);
|
||||
}
|
||||
}
|
||||
|
||||
function useShouldTrackOfficialMessageViews({guild, messages, isMessagesReady}) { // fn#77238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3771, offset: 0x01df6713, size: 145 bytes, params: 2, frame: 19
|
||||
let value = undefined;
|
||||
value = (require(6858) /* metro dependency 6858: GuildOfficialMessageUtils */).useIsGuildOfficialMessagesEnabled((guild == null ? value : guild.id) ?? null,
|
||||
'useShouldTrackOfficialMessageViews');
|
||||
return env0_3.useMemo(_fun77239, [value, isMessagesReady, messages]);
|
||||
}
|
||||
|
||||
function handleOfficialMessageViewTracking(a0, a1, a2, a3) { // fn#77241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4101, offset: 0x01df67ec, size: 122 bytes, params: 5, frame: 16
|
||||
var defaultImport;
|
||||
const env0_0 = a2;
|
||||
const env0_1 = a3;
|
||||
if (a1) {
|
||||
if (a2 != null) {
|
||||
a0.forEach(_fun77242);
|
||||
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
|
||||
defaultImport.handleMessageListVisibilityChange([],
|
||||
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.OFFICIAL_MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function useShouldTrackVoiceInviteEmbedViews({messages, isMessagesReady}) { // fn#77243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4505, offset: 0x01df68ff, size: 64 bytes, params: 2, frame: 15
|
||||
return env0_3.useMemo(_fun77244, [messages, isMessagesReady]);
|
||||
}
|
||||
|
||||
function handleVoiceInviteEmbedViewTracking(a0, a1, a2, a3) { // fn#77247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4730, offset: 0x01df69b5, size: 116 bytes, params: 5, frame: 16
|
||||
var defaultImport;
|
||||
const env0_0 = a2;
|
||||
const env0_1 = a3;
|
||||
if (a1) {
|
||||
a0.forEach(_fun77248);
|
||||
defaultImport = importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */;
|
||||
defaultImport.handleMessageListVisibilityChange([],
|
||||
(require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.VOICE_INVITE_EMBED);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun77229() { // fn#77229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2031, offset: 0x01df62db, size: 75 bytes, params: 1, frame: 13
|
||||
const type = channel.type;
|
||||
const GUILD_ANNOUNCEMENT = ChannelTypes.GUILD_ANNOUNCEMENT;
|
||||
let r0 = type === GUILD_ANNOUNCEMENT && env0_3;
|
||||
r0 = !r0 ? isMessagesReady && messages.some(_fun77230) : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun77232() { // fn#77232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2372, offset: 0x01df63b2, size: 36 bytes, params: 1, frame: 12
|
||||
return isMessagesReady && messages.some(function(a0) {
|
||||
return a0.activity != null && a0.activity.party_id != null && a0.application != null;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun77235({message}) { // fn#77235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2598, offset: 0x01df6480, size: 338 bytes, params: 2, frame: 19
|
||||
const MessageViewTrackingType = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType;
|
||||
const r2 = message.messageReference?.guild_id != null && message.webhookId != null && message.hasFlag(MessageFlags.IS_CROSSPOST);
|
||||
const hasFlag = message.hasFlag;
|
||||
const EPHEMERAL = MessageFlags.EPHEMERAL;
|
||||
if (!Reflect.apply(hasFlag, message, [EPHEMERAL])) {
|
||||
if (importAll.type === ChannelTypes.GUILD_ANNOUNCEMENT) {
|
||||
env0_2.push({type: MessageViewTrackingType.ANNOUNCEMENT,
|
||||
messageId: r2 && message.messageReference != null ? message.messageReference.message_id : message.id,
|
||||
channelId: importAll.id, guildId: importDefault,
|
||||
sourceChannelId: r2 && message.messageReference != null ? message.messageReference.channel_id : importAll.id,
|
||||
|
||||
|
||||
sourceGuildId: r2 && message.messageReference?.guild_id != null ? message.messageReference.guild_id : importDefault});
|
||||
} else if (r2) {
|
||||
env0_2.push({type: MessageViewTrackingType.ANNOUNCEMENT,
|
||||
messageId: r2 && message.messageReference != null ? message.messageReference.message_id : message.id,
|
||||
channelId: importAll.id, guildId: importDefault,
|
||||
sourceChannelId: r2 && message.messageReference != null ? message.messageReference.channel_id : importAll.id,
|
||||
|
||||
|
||||
sourceGuildId: r2 && message.messageReference?.guild_id != null ? message.messageReference.guild_id : importDefault});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun77237({message}) { // fn#77237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3373, offset: 0x01df6646, size: 205 bytes, params: 2, frame: 17
|
||||
var binding;
|
||||
var push;
|
||||
var object2;
|
||||
var id;
|
||||
const hasFlag = message.hasFlag;
|
||||
const EPHEMERAL = MessageFlags.EPHEMERAL;
|
||||
let r0 = Reflect.apply(hasFlag, message, [EPHEMERAL]) || message.activity == null;
|
||||
r0 = !r0 ? message.activity.party_id == null : r0;
|
||||
r0 = !r0 ? message.application == null : r0;
|
||||
if (!r0) {
|
||||
binding = env0_2;
|
||||
push = binding.push;
|
||||
object2 = {};
|
||||
object2.type = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.APP_EMBED;
|
||||
id = message.id;
|
||||
object2.messageId = id;
|
||||
id = importAll.id;
|
||||
object2.channelId = id;
|
||||
object2.guildId = importDefault;
|
||||
id = message.application.id;
|
||||
object2.applicationId = id;
|
||||
object2.linkType = LinkType.RICH_PRESENCE_INVITE;
|
||||
Reflect.apply(push, binding, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun77239() { // fn#77239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:3999, offset: 0x01df67a4, size: 43 bytes, params: 1, frame: 12
|
||||
return env0_2 && isMessagesReady && messages.some(function(a0) {
|
||||
return a0.hasFlag(MessageFlags.IS_GUILD_OFFICIAL);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun77242({message}) { // fn#77242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4188, offset: 0x01df6866, size: 153 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var push;
|
||||
var object2;
|
||||
var id;
|
||||
const hasFlag = message.hasFlag;
|
||||
const EPHEMERAL = MessageFlags.EPHEMERAL;
|
||||
if (!Reflect.apply(hasFlag, message, [EPHEMERAL]) && message.hasFlag(MessageFlags.IS_GUILD_OFFICIAL)) {
|
||||
binding = env0_2;
|
||||
push = binding.push;
|
||||
object2 = {};
|
||||
object2.type = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType.OFFICIAL_MESSAGE;
|
||||
id = message.id;
|
||||
object2.messageId = id;
|
||||
id = importAll.id;
|
||||
object2.channelId = id;
|
||||
object2.guildId = importDefault;
|
||||
Reflect.apply(push, binding, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun77244() { // fn#77244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4600, offset: 0x01df693f, size: 36 bytes, params: 1, frame: 12
|
||||
return isMessagesReady && messages.some(function({codedLinks}) {
|
||||
return codedLinks.some(_fun77246);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun77248({message}) { // fn#77248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4809, offset: 0x01df6a29, size: 637 bytes, params: 2, frame: 55
|
||||
var r11;
|
||||
var id;
|
||||
var r32;
|
||||
var r31;
|
||||
var r0;
|
||||
var r43;
|
||||
var _createForOfIteratorHelperLoose_77224Binding;
|
||||
var codedLinks;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
var done;
|
||||
var value6;
|
||||
var value7;
|
||||
var type;
|
||||
var CodedLinkType;
|
||||
var INVITE;
|
||||
var getInvite;
|
||||
var code;
|
||||
var value8;
|
||||
var voiceInviteEmbedRenderInfo;
|
||||
var channel;
|
||||
var guild;
|
||||
var value10;
|
||||
var value11;
|
||||
var voiceStatesForChannelAlt;
|
||||
var value13;
|
||||
var binding;
|
||||
var push;
|
||||
var object2;
|
||||
var MessageViewTrackingType;
|
||||
var VOICE_INVITE_EMBED;
|
||||
var moduleValue;
|
||||
var getInviteInstanceId;
|
||||
var value14;
|
||||
var treatmentRendered;
|
||||
var value15;
|
||||
const hasFlag = message.hasFlag;
|
||||
const EPHEMERAL = MessageFlags.EPHEMERAL;
|
||||
if (!Reflect.apply(hasFlag, message, [EPHEMERAL])) {
|
||||
_createForOfIteratorHelperLoose_77224Binding = _createForOfIteratorHelperLoose_77224;
|
||||
codedLinks = message.codedLinks;
|
||||
value2 = undefined;
|
||||
value3 = _createForOfIteratorHelperLoose_77224Binding(codedLinks);
|
||||
value4 = value3();
|
||||
done = value4.done;
|
||||
value6 = null;
|
||||
if (!done) {
|
||||
r11 = value4;
|
||||
while (true) {
|
||||
value7 = r11.value;
|
||||
type = value7.type;
|
||||
CodedLinkType = (require(4101) /* metro dependency 4101: CodedLink */).CodedLinkType;
|
||||
INVITE = CodedLinkType.INVITE;
|
||||
if (type === INVITE) {
|
||||
getInvite = InviteStore.getInvite;
|
||||
code = value7.code;
|
||||
value8 = Reflect.apply(getInvite, InviteStore, [code]);
|
||||
if (value6 == value8) {
|
||||
break;
|
||||
}
|
||||
voiceInviteEmbedRenderInfo = getVoiceInviteEmbedRenderInfo(value8);
|
||||
if (value6 == voiceInviteEmbedRenderInfo) {
|
||||
break;
|
||||
}
|
||||
channel = value8.channel;
|
||||
if (value6 == channel) {
|
||||
id = value2;
|
||||
continue;
|
||||
}
|
||||
id = channel.id;
|
||||
if (value6 != id) {
|
||||
r32 = id;
|
||||
continue;
|
||||
}
|
||||
r32 = value6;
|
||||
continue;
|
||||
guild = value8.guild;
|
||||
if (value6 == guild) {
|
||||
id = value2;
|
||||
continue;
|
||||
}
|
||||
id = guild.id;
|
||||
if (value6 != id) {
|
||||
r31 = id;
|
||||
continue;
|
||||
}
|
||||
r31 = value6;
|
||||
continue;
|
||||
value10 = value6 != r32;
|
||||
if (!value10) {
|
||||
r0 = value10;
|
||||
continue;
|
||||
}
|
||||
value11 = value6 != r31;
|
||||
r0 = value11;
|
||||
if (!r0) {
|
||||
continue;
|
||||
}
|
||||
voiceStatesForChannelAlt = SortedVoiceStateStore.getVoiceStatesForChannelAlt(r32, r31);
|
||||
value13 = voiceStatesForChannelAlt.some(function(a0) {
|
||||
return a0.voiceState.selfStream;
|
||||
});
|
||||
r0 = value13;
|
||||
binding = env0_2;
|
||||
push = binding.push;
|
||||
object2 = {};
|
||||
MessageViewTrackingType = (require(9855) /* metro dependency 9855: MessageViewTrackingManager */).MessageViewTrackingType;
|
||||
VOICE_INVITE_EMBED = MessageViewTrackingType.VOICE_INVITE_EMBED;
|
||||
object2.type = VOICE_INVITE_EMBED;
|
||||
id = message.id;
|
||||
object2.messageId = id;
|
||||
id = importAll.id;
|
||||
object2.channelId = id;
|
||||
object2.guildId = importDefault;
|
||||
code = value7.code;
|
||||
object2.inviteCode = code;
|
||||
object2.inviteGuildId = r31;
|
||||
object2.inviteChannelId = r32;
|
||||
moduleValue = require(4098) /* metro dependency 4098: InviteCodeUtils */;
|
||||
getInviteInstanceId = moduleValue.getInviteInstanceId;
|
||||
code = value7.code;
|
||||
id = message.id;
|
||||
value14 = Reflect.apply(getInviteInstanceId, moduleValue, [code, id]);
|
||||
if (value6 != value14) {
|
||||
r43 = value14;
|
||||
continue;
|
||||
}
|
||||
r43 = value6;
|
||||
continue;
|
||||
object2.inviteInstanceId = r43;
|
||||
treatmentRendered = voiceInviteEmbedRenderInfo.treatmentRendered;
|
||||
object2.treatmentRendered = treatmentRendered;
|
||||
object2.hasActiveStream = r0;
|
||||
Reflect.apply(push, binding, [object2]);
|
||||
break;
|
||||
}
|
||||
value15 = value3();
|
||||
done = value15.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r11 = value15;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun77230(a0) { // fn#77230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:2088, offset: 0x01df6326, size: 76 bytes, params: 2, frame: 13
|
||||
var hasFlag;
|
||||
let value = a0.messageReference != null;
|
||||
let r0 = value && a0.webhookId != null;
|
||||
if (r0) {
|
||||
hasFlag = a0.hasFlag;
|
||||
value = environment.__proto__.__proto__;
|
||||
value = Reflect.apply(hasFlag, a0, [MessageFlags.IS_CROSSPOST]);
|
||||
r0 = value;
|
||||
}
|
||||
if (r0) {
|
||||
value = environment.__proto__;
|
||||
value = channel.guild_id != null;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun77245({codedLinks}) { // fn#77245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10040:4615, offset: 0x01df6963, size: 31 bytes, params: 2, frame: 11
|
||||
return codedLinks.some(function({type}) {
|
||||
return type === require(dependencyMap[8]).CodedLinkType.INVITE;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
/* Metro module 16154; source: modules/messages/native/MessageSendFailureNotificationManager.tsx; dependencies: [7, 6, 15, 17, 18, 1934, 3969, 1878, 7030, 661, 12560, 10920, 10921, 10741, 1244, 4860, 2] */
|
||||
function _fun124876(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:6, offset: 0x025c6084, size: 370 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = value.InAppNotificationTypes;
|
||||
const env0_13 = value.MessageStates;
|
||||
const env0_14 = (require(12560) /* metro dependency 12560: Constants */).LocalNotificationTypes;
|
||||
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun124884(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessageSendFailureNotificationManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_124877() { // fn#124877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:277, offset: 0x025c61f6, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_124877_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function handleMessageSendFailure(a0) { // fn#124880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:470, offset: 0x025c6258, size: 407 bytes, params: 2, frame: 21
|
||||
var defaultImport;
|
||||
var enqueueNotification;
|
||||
var object2;
|
||||
var defaultImport2;
|
||||
var presentLocalNotification;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const channelId = a0.channelId;
|
||||
const messageId = a0.messageId;
|
||||
if (a0.shouldNotify) {
|
||||
if (AppStateStore.getState() !== 'active') {
|
||||
defaultImport2 = importDefault(10741) /* metro dependency 10741: PushNotification */;
|
||||
presentLocalNotification = defaultImport2.presentLocalNotification;
|
||||
object2 = {category: 'local'};
|
||||
object2.alertTitle = intl.string(t.LdlH2M);
|
||||
object2.alertBody = intl.string(t.xxRPOT);
|
||||
object2.userInfo = {channelId: channelId, messageId: messageId,
|
||||
type: LocalNotificationTypes.MESSAGE_SEND_FAILED};
|
||||
Reflect.apply(presentLocalNotification, defaultImport2, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
if (channelId === SelectedChannelStore.getChannelId(SelectedGuildStore.getGuildId())) {
|
||||
return undefined;
|
||||
}
|
||||
defaultImport = importDefault(10920) /* metro dependency 10920: InAppNotificationActionCreators */;
|
||||
enqueueNotification = defaultImport.enqueueNotification;
|
||||
object2 = {};
|
||||
object2.type = InAppNotificationTypes.MESSAGE_FAILED_TO_SEND;
|
||||
object2.channelId = channelId;
|
||||
object2.messageId = messageId;
|
||||
object2.key = channelId + '-' + messageId;
|
||||
object2.duration = 5000;
|
||||
object2.onDismiss = onDismiss_124881;
|
||||
object2.inAppNotificationId = (require(10921) /* metro dependency 10921: InAppNotificationUtils */).generateInAppNotificationId();
|
||||
Reflect.apply(enqueueNotification, defaultImport, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function handleMessageCreate_124882({message, sendMessageOptions}) { // fn#124882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1069, offset: 0x025c6414, size: 153 bytes, params: 2, frame: 17
|
||||
var id;
|
||||
var value2;
|
||||
var author;
|
||||
let value = sendMessageOptions != null;
|
||||
let r1 = value && sendMessageOptions.isHydratingExpiredPendingMessage && message.state === MessageStates.SEND_FAILED;
|
||||
if (r1) {
|
||||
value = UserStore.getCurrentUser();
|
||||
value2 = undefined;
|
||||
id = value == null ? value2 : value.id;
|
||||
author = message.author;
|
||||
value = id === (author == null ? value2 : author.id);
|
||||
r1 = value;
|
||||
}
|
||||
if (r1) {
|
||||
global.setTimeout(function() {
|
||||
var handleMessageSendFailureBinding = handleMessageSendFailure;
|
||||
var messageBinding = message;
|
||||
handleMessageSendFailureBinding({channelId: messageBinding.channel_id, messageId: messageBinding.id,
|
||||
shouldNotify: true});
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun124884(a0) { // fn#124884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1405, offset: 0x025c64df, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = MessageSendFailureNotificationManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_3(closure);
|
||||
}
|
||||
|
||||
function handleMessageSendFailureOnDismiss() { // fn#124881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:972, owner: handleMessageSendFailure.onDismiss, offset: 0x025c63ef, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(10920) /* metro dependency 10920: InAppNotificationActionCreators */).clearNotification();
|
||||
}
|
||||
|
||||
function MessageSendFailureNotificationManager(a0) { // fn#124885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16362:1417, offset: 0x025c6509, size: 152 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_4;
|
||||
binding(this, MessageSendFailureNotificationManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(MessageSendFailureNotificationManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_124877()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {MESSAGE_CREATE: handleMessageCreate_124882, MESSAGE_SEND_FAILED: handleMessageSendFailure};
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,893 @@
|
||||
/* Metro module 11321; source: modules/messages/native/Messages.tsx; dependencies: [57, 31, 4502, 1378, 6874, 4234, 10557, 4885, 4606, 9858, 6540, 4107, 4822, 6773, 8200, 8183, 4117, 7069, 8358, 8057, 10604, 8185, 8432, 7065, 11322, 7074, 4833, 9865, 3786, 6898, 1949, 1310, 1226, 5109, 1379, 7075, 8450, 1945, 1867, 4798, 4097, 4814, 3784, 4396, 4294, 4605, 4296, 7223, 1878, 4297, 4279, 10581, 4300, 661, 1880, 33, 566, 22, 628, 6772, 1360, 3829, 11323, 11326, 11330, 10563, 9483, 7063, 3802, 8214, 6274, 11291, 11292, 8229, 7035, 11333, 4022, 9867, 9764, 9854, 11334, 4813, 9855, 8357, 11335, 11338, 8372, 9835, 4116, 10572, 11340, 7704, 11341, 2] */
|
||||
function _fun86349(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:6, offset: 0x01f922d7, size: 1138 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_86352 = 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 env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const applicationAssetsStore = importDefault(6874) /* metro dependency 6874: ApplicationAssetsStore */;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const buildOverrideStore = importDefault(10557) /* metro dependency 10557: BuildOverrideStore */;
|
||||
const cacheStore = importDefault(4885) /* metro dependency 4885: CacheStore */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const voiceChannelStartTimeStore = importDefault(9858) /* metro dependency 9858: VoiceChannelStartTimeStore */;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
|
||||
const explicitMediaStore = importDefault(4822) /* metro dependency 4822: ExplicitMediaStore */;
|
||||
const applicationDirectoryApplicationsStore = importDefault(6773) /* metro dependency 6773: ApplicationDirectoryApplicationsStore */;
|
||||
const basicGuildStore = importDefault(8200) /* metro dependency 8200: BasicGuildStore */;
|
||||
const guildAutomodMessageStore = importDefault(8183) /* metro dependency 8183: GuildAutomodMessageStore */;
|
||||
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
|
||||
const guildTemplateStore = importDefault(7069) /* metro dependency 7069: GuildTemplateStore */;
|
||||
const localInteractionComponentStateStore = importDefault(8358) /* metro dependency 8358: LocalInteractionComponentStateStore */;
|
||||
const interactionStore = importDefault(8057) /* metro dependency 8057: InteractionStore */;
|
||||
const mediaPostEmbedStore = importDefault(10604) /* metro dependency 10604: MediaPostEmbedStore */;
|
||||
const mediaPostSharePromptStore = importDefault(8185) /* metro dependency 8185: MediaPostSharePromptStore */;
|
||||
const pollsInteractionStoreModule = require(8432) /* metro dependency 8432: PollsInteractionStore */;
|
||||
const env0_25 = pollsInteractionStoreModule.useChannelPollInteractions;
|
||||
const env0_26 = pollsInteractionStoreModule.useMessagePollInteractions;
|
||||
const referralTrialStore = importDefault(7065) /* metro dependency 7065: ReferralTrialStore */;
|
||||
const pushFeedbackStore = importDefault(11322) /* metro dependency 11322: PushFeedbackStore */;
|
||||
const pendingReplyStore = importDefault(7074) /* metro dependency 7074: PendingReplyStore */;
|
||||
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
|
||||
const summaryStore = importDefault(9865) /* metro dependency 9865: SummaryStore */;
|
||||
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
|
||||
const threadMessageStore = importDefault(6898) /* metro dependency 6898: ThreadMessageStore */;
|
||||
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const editMessageStore = importDefault(7075) /* metro dependency 7075: EditMessageStore */;
|
||||
const giftCodeStore = importDefault(8450) /* metro dependency 8450: GiftCodeStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
|
||||
const inviteStore = importDefault(4097) /* metro dependency 4097: InviteStore */;
|
||||
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
||||
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
||||
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
||||
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
|
||||
const uploadStore = importDefault(7223) /* metro dependency 7223: UploadStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
||||
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
|
||||
const activityLauncherStore = importDefault(10581) /* metro dependency 10581: ActivityLauncherStore */;
|
||||
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_57 = constantsModule.ActivityActionTypes;
|
||||
const env0_58 = constantsModule.ChannelTypesSets;
|
||||
const env0_59 = constantsModule.ME;
|
||||
const env0_60 = constantsModule.MessageTypes;
|
||||
const env0_61 = constantsModule.Permissions;
|
||||
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
|
||||
const env0_62 = premiumConstantsModule.PREMIUM_TIER_2_REFERRAL_TRIAL_ID;
|
||||
const env0_63 = premiumConstantsModule.PremiumTypes;
|
||||
let value5 = require(33) /* metro dependency 33 */;
|
||||
const env0_64 = value5.jsx;
|
||||
const env0_65 = value5.jsxs;
|
||||
value = value.forwardRef(_fun86353);
|
||||
value.displayName = 'MessagesConnected';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/Messages.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_86350(a0, a1) { // fn#86350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:955, offset: 0x01f92749, 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 _fun86351;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_86352(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_86352(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_86352(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun86351;
|
||||
}
|
||||
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 _fun86353(a0, a1) { // fn#86353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:1886, offset: 0x01f928bd, size: 4658 bytes, params: 3, frame: 132
|
||||
const channel = a0.channel;
|
||||
let value2 = undefined;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
let value3 = Reflect.apply(useStateFromStores, fluxModule, [[MessageStore], function() {
|
||||
return MessageStore.getMessages(channel.id);
|
||||
}, [channel.id]]);
|
||||
const id2 = channel.id;
|
||||
const guildId = channel.getGuildId();
|
||||
const env0_3 = guildId;
|
||||
const guild = fluxModule.useStateFromStores([GuildStore], _fun86355);
|
||||
const env0_4 = guild;
|
||||
const systemChannelFlags = guild == null ? value2 : guild.systemChannelFlags;
|
||||
const value5 = fluxModule.useStateFromStores([AuthenticationStore], function() {
|
||||
return AuthenticationStore.getId();
|
||||
}, []);
|
||||
const InlineAttachmentMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineAttachmentMedia;
|
||||
const value6 = InlineAttachmentMedia.useSetting();
|
||||
const InlineEmbedMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineEmbedMedia;
|
||||
const value7 = InlineEmbedMedia.useSetting();
|
||||
const RenderEmbeds = (require(3829) /* metro dependency 3829: UserSettings */).RenderEmbeds;
|
||||
const value8 = RenderEmbeds.useSetting();
|
||||
const RenderReactions = (require(3829) /* metro dependency 3829: UserSettings */).RenderReactions;
|
||||
const value9 = RenderReactions.useSetting();
|
||||
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
|
||||
const value10 = DeveloperMode.useSetting();
|
||||
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
|
||||
const value11 = AnimateEmoji.useSetting();
|
||||
const AnimateStickers = (require(3829) /* metro dependency 3829: UserSettings */).AnimateStickers;
|
||||
const value12 = AnimateStickers.useSetting();
|
||||
const GifAutoPlay = (require(3829) /* metro dependency 3829: UserSettings */).GifAutoPlay;
|
||||
const value13 = GifAutoPlay.useSetting();
|
||||
const TimestampHourCycle = (require(3829) /* metro dependency 3829: UserSettings */).TimestampHourCycle;
|
||||
const value14 = TimestampHourCycle.useSetting();
|
||||
const value15 = fluxModule.useStateFromStores([ThemeStore], function() {
|
||||
return ThemeStore.theme;
|
||||
}, []);
|
||||
const value16 = (require(11323) /* metro dependency 11323: SwipeToReplyExperiment */).useIsMessageSwipeActionsEnabled();
|
||||
const value17 = useMessageAuthorActivities_86358(value3);
|
||||
useFetchMessageApplications_86363(value3);
|
||||
const value18 = (importDefault(11326) /* metro dependency 11326: useSubscribeMissingActivities */)(value3, channel);
|
||||
let binding = env0_3;
|
||||
const value19 = binding(value18, 2);
|
||||
const property = value19[0];
|
||||
value19[1];
|
||||
const value20 = fluxModule.useStateFromStores([InviteStore], function() {
|
||||
return InviteStore.getInvites();
|
||||
}, []);
|
||||
(require(11330) /* metro dependency 11330: MessagesHooks */).useFetchVoiceChannelInviteStartTimes(value20);
|
||||
const {appDirectoryEmbedApplications, invalidAppDirectoryEmbedApplicationIds,
|
||||
appDirectoryEmbedApplicationFetchStates} = fluxModule.useStateFromStoresObject([ApplicationDirectoryApplicationsStore],
|
||||
function() {
|
||||
var object = {};
|
||||
object.appDirectoryEmbedApplications = ApplicationDirectoryApplicationsStore.getApplications();
|
||||
object.invalidAppDirectoryEmbedApplicationIds = ApplicationDirectoryApplicationsStore.getInvalidApplicationIds();
|
||||
object.appDirectoryEmbedApplicationFetchStates = ApplicationDirectoryApplicationsStore.getApplicationFetchStates();
|
||||
return object;
|
||||
}, []);
|
||||
const value22 = fluxModule.useStateFromStoresArray([ApplicationStore], function() {
|
||||
return ApplicationStore.getFetchingOrFailedFetchingIds();
|
||||
});
|
||||
const value23 = fluxModule.useStateFromStoresArray([ApplicationAssetsStore], function() {
|
||||
return ApplicationAssetsStore.getFetchingIds();
|
||||
});
|
||||
const value24 = fluxModule.useStateFromStoresArray([SKUStore], function() {
|
||||
return SKUStore.getFetchingSkuIds();
|
||||
});
|
||||
const value25 = fluxModule.useStateFromStoresArray([EmbeddedActivitiesStore], function() {
|
||||
return EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(id).map(_fun86373).filter(require(dependencyMap[60]).isNotNullish);
|
||||
}, [id2]);
|
||||
const value26 = fluxModule.useStateFromStoresArray([EmbeddedActivitiesStore, PresenceStore], _fun86374);
|
||||
const value27 = fluxModule.useStateFromStoresArray([EmbeddedActivitiesStore], function() {
|
||||
var value2 = new global.Set();
|
||||
var env0_0 = value2;
|
||||
EmbeddedActivitiesStore.getEmbeddedActivitiesByChannel().forEach(_fun86378);
|
||||
return global.Array.from(value2);
|
||||
});
|
||||
const value28 = fluxModule.useStateFromStoresArray([EmbeddedActivitiesStore], _fun86381);
|
||||
const mediaPostEmbeds = fluxModule.useStateFromStores([MediaPostEmbedStore], function() {
|
||||
return MediaPostEmbedStore.getMediaPostEmbeds();
|
||||
});
|
||||
const value29 = fluxModule.useStateFromStores([GuildTemplateStore], function() {
|
||||
return GuildTemplateStore.getGuildTemplates();
|
||||
}, []);
|
||||
const value30 = fluxModule.useStateFromStores([BuildOverrideStore], function() {
|
||||
return BuildOverrideStore.getBuildOverrides();
|
||||
}, []);
|
||||
const value31 = (require(10563) /* metro dependency 10563: useCodedLinksExperimentEmbeds */).useCodedLinksExperimentEmbeds();
|
||||
const {quests,
|
||||
isFetchingCurrentQuests} = (require(9483) /* metro dependency 9483: QuestHooks */).useQuests({'fetchPolicy': 'cache-or-network',
|
||||
'callerSource': 'messages_native'});
|
||||
const value34 = value3.filter(function({type}) {
|
||||
return type === MessageTypes.PREMIUM_REFERRAL;
|
||||
}).map(function(a0) {
|
||||
return a0.referralTrialOfferId;
|
||||
});
|
||||
const env0_6 = value34.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
const value35 = fluxModule.useStateFromStoresArray([ReferralTrialStore], _fun86387);
|
||||
const value36 = (require(7063) /* metro dependency 7063: useTrialOffer */).useTrialOffer(PREMIUM_TIER_2_REFERRAL_TRIAL_ID);
|
||||
const value37 = fluxModule.useStateFromStores([UserStore], function() {
|
||||
return importDefault(dependencyMap[68]).isPremiumExactly(UserStore.getCurrentUser(), PremiumTypes.TIER_2);
|
||||
});
|
||||
const value38 = fluxModule.useStateFromStores([EditMessageStore], function() {
|
||||
return EditMessageStore.getEditingMessageId(id);
|
||||
}, [id2]);
|
||||
const value39 = fluxModule.useStateFromStores([PendingReplyStore], _fun86391, [id2]);
|
||||
const value40 = fluxModule.useStateFromStores([ReadStateStore], function() {
|
||||
return ReadStateStore.getOldestUnreadMessageId(id);
|
||||
}, [id2]);
|
||||
const value41 = fluxModule.useStateFromStores([GuildVerificationStore], _fun86393, [guildId]);
|
||||
const value42 = fluxModule.useStateFromStores([PermissionStore], function() {
|
||||
var SEND_MESSAGES = Permissions.SEND_MESSAGES;
|
||||
return PermissionStore.can(SEND_MESSAGES, channel);
|
||||
}, [channel]);
|
||||
const value43 = (importDefault(8214) /* metro dependency 8214: useIsCallActive */)(id2);
|
||||
const value44 = fluxModule.useStateFromStores([VoiceStateStore], _fun86395, [value5]);
|
||||
const value45 = fluxModule.useStateFromStores([RTCConnectionStore], function() {
|
||||
return RTCConnectionStore.getChannelId();
|
||||
}, []);
|
||||
const value46 = fluxModule.useStateFromStores([ReferencedMessageStore], function() {
|
||||
var value3 = ChannelTypesSets.THREADS.has(channel.type);
|
||||
var value4 = null;
|
||||
return value3 && value4 != channel.parent_id ? ReferencedMessageStore.getMessageByReference({channel_id: channel.parent_id,
|
||||
|
||||
message_id: channel.id, guild_id: channel.guild_id}).message : value4;
|
||||
}, [channel]);
|
||||
const {resolvingGiftCodes, resolvedGiftCodes,
|
||||
acceptingGiftCodes} = fluxModule.useStateFromStoresObject([GiftCodeStore], function() {
|
||||
var object = {};
|
||||
object.resolvingGiftCodes = GiftCodeStore.getResolvingCodes();
|
||||
object.resolvedGiftCodes = GiftCodeStore.getResolvedCodes();
|
||||
object.acceptingGiftCodes = GiftCodeStore.getAcceptingCodes();
|
||||
return object;
|
||||
}, []);
|
||||
const value48 = fluxModule.useStateFromStores([ChannelRTCStore], function() {
|
||||
return ChannelRTCStore.getParticipants(id).length;
|
||||
}, [id2]);
|
||||
const value49 = fluxModule.useStateFromStores([UploadStore], function() {
|
||||
return UploadStore.getFiles(id);
|
||||
}, [id2]);
|
||||
const value50 = fluxModule.useStateFromStores([ReferencedMessageStore], function() {
|
||||
return ReferencedMessageStore.getReplyIdsForChannel(id);
|
||||
}, [id2]);
|
||||
const {useReducedMotion, roleStyle, officialMessageStyle, saturation,
|
||||
displayNameStylesEnabled} = fluxModule.useStateFromStoresObject([AccessibilityStore], function() {
|
||||
return {useReducedMotion: AccessibilityStore.useReducedMotion, roleStyle: AccessibilityStore.roleStyle,
|
||||
officialMessageStyle: AccessibilityStore.officialMessageStyle, saturation: AccessibilityStore.saturation,
|
||||
displayNameStylesEnabled: AccessibilityStore.displayNameStylesEnabled};
|
||||
}, []);
|
||||
const value52 = fluxModule.useStateFromStores([ThreadMessageStore], function() {
|
||||
return ThreadMessageStore.getChannelThreadsVersion(id);
|
||||
}, [id2]);
|
||||
const value53 = fluxModule.useStateFromStoresObject([InteractionStore], function() {
|
||||
return InteractionStore.getMessageInteractionStates();
|
||||
});
|
||||
const moduleValue39 = fluxModule;
|
||||
useStateFromStores = moduleValue39.useStateFromStores;
|
||||
const value54 = binding(Reflect.apply(useStateFromStores, moduleValue39, [[LocalInteractionComponentStateStore],
|
||||
_fun86405, [], (require(6274) /* metro dependency 6274: SecondaryIndexMapUtils */).isVersionEqual]), 2);
|
||||
const property2 = value54[0];
|
||||
const property3 = value54[1];
|
||||
const hasLoadedExperiments = fluxModule.useStateFromStores([ExperimentStore], function() {
|
||||
return ExperimentStore.hasLoadedExperiments;
|
||||
});
|
||||
const value55 = (require(11291) /* metro dependency 11291: useIsSpamMessageRequest */).useIsSpamMessageRequest(channel.id);
|
||||
const value56 = (require(11292) /* metro dependency 11292: useIsMessageRequest */).useIsMessageRequest(channel.id);
|
||||
const r49 = value3 != null && (value3.ready || value3.cached);
|
||||
const r98 = value3 != null && value3.cached;
|
||||
const r97 = value3 != null && value3.ready && !value3.loadingMore;
|
||||
const rsvpVersion = fluxModule.useStateFromStores([GuildScheduledEventStore], function() {
|
||||
return GuildScheduledEventStore.getRsvpVersion();
|
||||
});
|
||||
const messagesVersion = fluxModule.useStateFromStores([GuildAutomodMessageStore], function() {
|
||||
return GuildAutomodMessageStore.getMessagesVersion();
|
||||
});
|
||||
const communicationDisabledVersion = fluxModule.useStateFromStores([GuildMemberStore], function() {
|
||||
return GuildMemberStore.getCommunicationDisabledVersion();
|
||||
});
|
||||
const value61 = fluxModule.useStateFromStoresObject([GuildMemberStore], _fun86410, [guildId, value3]);
|
||||
const value62 = fluxModule.useStateFromStores([PermissionStore], function() {
|
||||
var MODERATE_MEMBERS = Permissions.MODERATE_MEMBERS;
|
||||
return PermissionStore.can(MODERATE_MEMBERS, guild);
|
||||
});
|
||||
const useUserCommunicationDisabledModule = require(8229) /* metro dependency 8229: useUserCommunicationDisabled */;
|
||||
const useCurrentUserCommunicationDisabled = useUserCommunicationDisabledModule.useCurrentUserCommunicationDisabled;
|
||||
const property4 = env0_3(Reflect.apply(useCurrentUserCommunicationDisabled, useUserCommunicationDisabledModule,
|
||||
[guild == null ? value2 : guild.id]), 2)[1];
|
||||
const locale = fluxModule.useStateFromStores([LocaleStore], function() {
|
||||
return LocaleStore.locale;
|
||||
});
|
||||
const value64 = (require(7035) /* metro dependency 7035: BlockedPaymentsCountryExperiment */).useIsPaymentsBlocked();
|
||||
const value65 = fluxModule.useStateFromStores([JoinedThreadsStore], _fun86414);
|
||||
const value66 = fluxModule.useStateFromStores([MediaPostSharePromptStore], function() {
|
||||
return MediaPostSharePromptStore.shouldDisplayPrompt(id);
|
||||
});
|
||||
const value67 = fluxModule.useStateFromStores([PushFeedbackStore], function() {
|
||||
return PushFeedbackStore.isEligible();
|
||||
});
|
||||
const lazyCacheStatus = fluxModule.useStateFromStores([CacheStore], function() {
|
||||
return CacheStore.getLazyCacheStatus();
|
||||
});
|
||||
const value68 = (require(11333) /* metro dependency 11333: getMessageJumpData */).useMessageJumpAndroidKeyboardHeight();
|
||||
const value69 = (importDefault(4022) /* metro dependency 4022: useKeyboardType */)();
|
||||
const value71 = fluxModule.useStateFromStores([SummaryStore], _fun86418,
|
||||
[(require(9867) /* metro dependency 9867: ChannelSummariesExperiment */).useChannelSummariesExperiment(channel),
|
||||
channel.id]);
|
||||
binding = env0_4;
|
||||
binding.useEffect(_fun86419, [channel.id, value3.hasMoreAfter, value3.hasMoreBefore, value3.length, value3.ready]);
|
||||
const value72 = (require(9854) /* metro dependency 9854: MessageImpressionAnalyticsHelpers */).useShouldTrackAnnouncementMessageViews({guild: guild,
|
||||
channel: channel, messages: value3, isMessagesReady: r49});
|
||||
const value73 = (require(9854) /* metro dependency 9854: MessageImpressionAnalyticsHelpers */).useShouldTrackRichPresenceInviteEmbedViews({messages: value3,
|
||||
isMessagesReady: r49});
|
||||
const value74 = (require(9854) /* metro dependency 9854: MessageImpressionAnalyticsHelpers */).useShouldTrackOfficialMessageViews({guild: guild,
|
||||
messages: value3, isMessagesReady: r49});
|
||||
const value75 = (require(9854) /* metro dependency 9854: MessageImpressionAnalyticsHelpers */).useShouldTrackVoiceInviteEmbedViews({messages: value3,
|
||||
isMessagesReady: r49});
|
||||
const value76 = (require(11334) /* metro dependency 11334: computeGlobalSpoilerDisplay */).useShouldDisplaySpoilerObscurity(channel);
|
||||
const value77 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useIsAgeVerified();
|
||||
binding.useEffect(_fun86420, [id2, guildId]);
|
||||
const value78 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useShouldDisableInteractiveComponents(channel.id);
|
||||
const value79 = useChannelPollInteractions(channel.id);
|
||||
value3.forEach(_fun86422);
|
||||
const value80 = useMessagePollInteractions([]);
|
||||
const value81 = fluxModule.useStateFromStores([ExplicitMediaStore], function() {
|
||||
return ExplicitMediaStore.getChannelFpInfo(id);
|
||||
}, [id2]);
|
||||
const value82 = (importDefault(11335) /* metro dependency 11335: useChatWidth */)();
|
||||
const {unloadedContentEntryMessageIds,
|
||||
unloadableContentEntryMessageIds} = (importDefault(11338) /* metro dependency 11338: useLoadMessageContentEntries */)(value3);
|
||||
const value84 = fluxModule.useStateFromStores([UserStore], _fun86424);
|
||||
const version = fluxModule.useStateFromStores([BasicGuildStore], function() {
|
||||
return BasicGuildStore.getVersion();
|
||||
});
|
||||
const value85 = (require(8372) /* metro dependency 8372: useAvatarColor */).useColorStore(function(a0) {
|
||||
var Object = global.Object;
|
||||
return Object.keys(a0.palette).length;
|
||||
});
|
||||
const guildEmoji = fluxModule.useStateFromStores([EmojiStore], _fun86427);
|
||||
const value86 = fluxModule.useStateFromStores([VoiceStateStore], _fun86428, [guildId]);
|
||||
const value87 = fluxModule.useStateFromStoresObject([SortedVoiceStateStore, VoiceChannelStartTimeStore, InviteStore,
|
||||
ChannelStore], _fun86429);
|
||||
const value88 = fluxModule.useStateFromStoresArray([SessionsStore], function() {
|
||||
var value2 = SessionsStore.getRemoteActivities();
|
||||
var items = [];
|
||||
arraySpread(items, SessionsStore.getHiddenActivities(), arraySpread(items, value2, 0, SessionsStore),
|
||||
SessionsStore);
|
||||
return items.filter(require(dependencyMap[60]).isNotNullish);
|
||||
});
|
||||
const value89 = fluxModule.useStateFromStoresObject([ActivityLauncherStore], _fun86432);
|
||||
const value90 = fluxModule.useStateFromStoresArray([AuthorizedAppsStore], _fun86434, []);
|
||||
const value91 = fluxModule.useStateFromStores([UserStore], _fun86435);
|
||||
(require(10572) /* metro dependency 10572: createSocialLayerStorefrontProductDetailsEmbed */).useFetchSocialLayerStorefrontProductDetailsEmbedData(value3);
|
||||
const StartupProfiler = importDefault(11340) /* metro dependency 11340: StartupProfiler */;
|
||||
const Profiles = (require(11340) /* metro dependency 11340: StartupProfiler */).Profiles;
|
||||
const Messages = Profiles.Messages;
|
||||
return (
|
||||
<StartupProfiler profile={Messages}>
|
||||
{channel.isThread() && ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}
|
||||
{((Component) => <Component ref={a1} theme={value15} saturation={saturation} isStaff={value84} animateEmoji={value11} animateStickers={value12} containerWidth={value82} gifAutoPlay={value13} timestampHourCycle={value14} inlineAttachmentMedia={value6} inlineEmbedMedia={value7} renderEmbeds={value8} renderReactions={value9} developerMode={value10} roleStyle={roleStyle} officialMessageStyle={officialMessageStyle} guildId={guildId} currentUserId={value5} channelId={id2} isMessagesReady={r49} isMessagesCached={r98} isMessagesAckable={r97} isMessageRequest={value56} isSpamMessageRequest={value55} messageAuthorActivities={value17} invites={value20} appDirectoryEmbedApplications={appDirectoryEmbedApplications} invalidAppDirectoryEmbedApplicationIds={invalidAppDirectoryEmbedApplicationIds} invalidApplicationIds={value22} applicationAssetFetchingIds={value23} messages={value3} messagesWithActivitiesLaunching={value28} activityInstanceIds={value25} activityParticipants={value27} activityInstancePresenceDetails={value26} appDirectoryEmbedApplicationFetchStates={appDirectoryEmbedApplicationFetchStates} mediaPostPreviewEmbeds={mediaPostEmbeds} guildTemplates={value29} buildOverrides={value30} fetchingSkuIds={value24} experimentEmbeds={value31} quests={quests} isFetchingCurrentQuests={isFetchingCurrentQuests} editingMessageId={value38} replyingMessageId={value39} oldestUnreadMessageId={value40} canChat={value41} canSendMessages={value42} isCallActive={value43} voiceStatePrivateChannelId={value44} currentClientVoiceChannelId={value45} voiceStateChannelIdSummaryForGuild={value86} resolvingGiftCodes={resolvingGiftCodes} resolvedGiftCodes={resolvedGiftCodes} acceptingGiftCodes={acceptingGiftCodes} participantsLength={value48} uploads={value49} repliedIds={value50} useReducedMotion={useReducedMotion} displayNameStylesEnabled={displayNameStylesEnabled} channelThreadsVersion={value52} rsvpVersion={rsvpVersion} failedMessagesVersion={messagesVersion} communicationDisabledVersion={communicationDisabledVersion} messageAuthorMembers={value61} forwardGuildsVersion={version} interactionStates={value53} interactionComponentStates={property2} interactionComponentStatesVersion={property3} hasLoadedExperiments={hasLoadedExperiments && r49} guildSystemChannelFlags={systemChannelFlags} currentUserCommunicationDisabled={property4} renderCommunicationDisabled={value62} userSettingsLocale={locale} paymentsBlocked={value64} isFollowingForumPost={value65} showMediaPostSharePrompt={value66} showPushFeedback={value67} cacheStoreLoaded={lazyCacheStatus !== 'initializing'} androidKeyboardHeight={value68} selectedSummary={value71} keyboardType={value69} shouldTrackAnnouncementMessageViews={value72} shouldTrackRichPresenceInviteEmbedViews={value73} shouldTrackOfficialMessageViews={value74} shouldTrackVoiceInviteEmbedViews={value75} shouldObscureSpoiler={value76} shouldDisableInteractiveComponents={value78} channelPolls={value79} messageReferencePolls={value80} explicitMediaFalsePositiveInfo={value81} threadStartingReferenceMessage={value46} unloadedContentEntryMessageIds={unloadedContentEntryMessageIds} unloadableContentEntryMessageIds={unloadableContentEntryMessageIds} resolvedReferralTrialOfferIds={value35} referralTrialOfferId={value36 == null ? value2 : value36.id} isPremiumTier2User={value37} activityInviteMessageIds={property} guildInviteColorsFetched={value85} isAgeVerified={value77} guildEmojis={guildEmoji} enableSwipeActions={value16} selfActivities={value88} activityLaunchJoinStates={value89} authorizedAppsTokens={value90} currentUserDisplayNameStyles={value91} voiceInviteDataByChannelId={value87} officialMessageColor={(guild == null ? value2 : guild.officialMessageColor) ?? value2} {...a0} />)(importDefault(11341) /* metro dependency 11341: MessagesRenderer */)}
|
||||
</StartupProfiler>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun86355() { // fn#86355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2052, offset: 0x01f93b0f, size: 27 bytes, params: 1, frame: 11
|
||||
return GuildStore.getGuild(env0_3);
|
||||
}
|
||||
|
||||
function useMessageAuthorActivities_86358(a0) { // fn#86358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2650, offset: 0x01f93b4c, size: 110 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], _fun86361,
|
||||
[env1_4.useMemo(function() {
|
||||
var object = {};
|
||||
object.forEach(_fun86360);
|
||||
return object;
|
||||
}, [a0])]);
|
||||
}
|
||||
|
||||
function useFetchMessageApplications_86363(a0) { // fn#86363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2928, offset: 0x01f93c63, size: 94 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_4;
|
||||
value = binding.useMemo(function() {
|
||||
var value2 = new global.Set();
|
||||
value2.forEach(_fun86365);
|
||||
return global.Array.from(value2);
|
||||
}, [a0]);
|
||||
const env0_2 = binding.useRef([]);
|
||||
binding.useEffect(_fun86366, [value]);
|
||||
}
|
||||
|
||||
function _fun86372() { // fn#86372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4113, offset: 0x01f93e82, size: 84 bytes, params: 1, frame: 13
|
||||
const getEmbeddedActivitiesForChannel = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel;
|
||||
const value4 = Reflect.apply(getEmbeddedActivitiesForChannel, EmbeddedActivitiesStore, [id]).map(function(a0) {
|
||||
return a0.launchId;
|
||||
});
|
||||
return value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
}
|
||||
|
||||
function _fun86374() { // fn#86374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4258, offset: 0x01f93ee1, size: 92 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
var r2;
|
||||
var value3;
|
||||
var value4;
|
||||
const closure = _loop_86375;
|
||||
let value = environment.__proto__;
|
||||
const _createForOfIteratorHelperLoose_86350Binding = _createForOfIteratorHelperLoose_86350;
|
||||
value = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(id);
|
||||
value = _createForOfIteratorHelperLoose_86350Binding(value);
|
||||
const value2 = value();
|
||||
let done = value2.done;
|
||||
if (!done) {
|
||||
for (r2 = value2; true; r2 = value4) {
|
||||
value3 = r2.value;
|
||||
closure(value3);
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function _fun86377() { // fn#86377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4620, offset: 0x01f93fea, size: 88 bytes, params: 1, frame: 13
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
EmbeddedActivitiesStore.getEmbeddedActivitiesByChannel().forEach(function(a0, a1) {
|
||||
var env0_0 = a1;
|
||||
a0.forEach(_fun86379);
|
||||
});
|
||||
const Array = global.Array;
|
||||
return Array.from(set);
|
||||
}
|
||||
|
||||
function _fun86381() { // fn#86381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4823, offset: 0x01f940be, size: 152 bytes, params: 1, frame: 21
|
||||
var r2;
|
||||
var r10;
|
||||
var value5;
|
||||
var value6;
|
||||
var property;
|
||||
var isLaunching;
|
||||
var componentId;
|
||||
var value7;
|
||||
var length;
|
||||
var value8;
|
||||
var push;
|
||||
var value9;
|
||||
const items2 = [];
|
||||
const value3 = _createForOfIteratorHelperLoose_86350(EmbeddedActivitiesStore.getLaunchStates());
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r2 = value4;
|
||||
while (true) {
|
||||
value5 = r2.value;
|
||||
value6 = env1_3(value5, 2);
|
||||
value6[0];
|
||||
property = value6[1];
|
||||
isLaunching = property.isLaunching;
|
||||
if (isLaunching) {
|
||||
value7 = property.componentId != null;
|
||||
r10 = value7;
|
||||
} else {
|
||||
r10 = isLaunching;
|
||||
}
|
||||
if (!r10) {
|
||||
continue;
|
||||
}
|
||||
componentId = property.componentId;
|
||||
length = componentId.length;
|
||||
value8 = length > 0;
|
||||
r10 = value8;
|
||||
if (!r10) {
|
||||
continue;
|
||||
}
|
||||
push = items2.push;
|
||||
componentId = property.componentId;
|
||||
Reflect.apply(push, items2, [componentId]);
|
||||
value9 = value3();
|
||||
done = value9.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r2 = value9;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun86387() { // fn#86387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:5577, offset: 0x01f941bb, size: 69 bytes, params: 1, frame: 13
|
||||
const value = env0_6.map(_fun86388);
|
||||
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
}
|
||||
|
||||
function _fun86391() { // fn#86391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:5938, offset: 0x01f94282, size: 48 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = PendingReplyStore.getPendingReply(id);
|
||||
return value == null ? undefined : value.message.id;
|
||||
}
|
||||
|
||||
function _fun86393() { // fn#86393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:6132, offset: 0x01f942cf, size: 40 bytes, params: 1, frame: 12
|
||||
return env0_3 != null && GuildVerificationStore.canChatInGuild(env0_3);
|
||||
}
|
||||
|
||||
function _fun86395() { // fn#86395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:6303, offset: 0x01f9431d, size: 32 bytes, params: 1, frame: 13
|
||||
return VoiceStateStore.getUserVoiceChannelId(ME, env0_5);
|
||||
}
|
||||
|
||||
function _fun86405() { // fn#86405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:7615, offset: 0x01f944d0, size: 45 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
const items2 = [LocalInteractionComponentStateStore.getInteractionComponentStates()];
|
||||
const getInteractionComponentStateVersion = LocalInteractionComponentStateStore.getInteractionComponentStateVersion;
|
||||
items2[1] = Reflect.apply(getInteractionComponentStateVersion, LocalInteractionComponentStateStore, []);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun86410() { // fn#86410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:8251, offset: 0x01f9454b, size: 56 bytes, params: 1, frame: 12
|
||||
if (env0_3 != null) {
|
||||
if (env0_1 == null) {
|
||||
return {};
|
||||
}
|
||||
env0_1.forEach(_fun86411);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
function _fun86414() { // fn#86414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:8731, offset: 0x01f94618, size: 50 bytes, params: 1, frame: 12
|
||||
const isForumPost2 = channel.isForumPost();
|
||||
return isForumPost2 ? JoinedThreadsStore.hasJoined(id) : !!isForumPost2;
|
||||
}
|
||||
|
||||
function _fun86418() { // fn#86418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:9115, offset: 0x01f9468b, size: 41 bytes, params: 1, frame: 12
|
||||
return env0_7 ? SummaryStore.selectedSummary(channel.id) : null;
|
||||
}
|
||||
|
||||
function _fun86419() { // fn#86419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:9178, offset: 0x01f946b4, size: 142 bytes, params: 1, frame: 18
|
||||
var value4;
|
||||
var defaultImport;
|
||||
const ready = env0_1.ready;
|
||||
let r1 = ready ? env0_1.length !== 0 : !ready;
|
||||
r1 = !r1 ? env0_1.hasMoreBefore : r1;
|
||||
r1 = !r1 ? env0_1.hasMoreAfter : r1;
|
||||
if (!r1) {
|
||||
value4 = environment.__proto__;
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, global.Date.now(), 1, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86420() { // fn#86420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:9833, offset: 0x01f94742, size: 46 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */).handleChannelSelect();
|
||||
return _fun86421;
|
||||
}
|
||||
|
||||
function _fun86422({messageReference}) { // fn#86422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:10009, offset: 0x01f94795, size: 51 bytes, params: 2, frame: 13
|
||||
const message_id = messageReference?.message_id;
|
||||
if (message_id != null) {
|
||||
env0_8.push(message_id);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86424() { // fn#86424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:10321, offset: 0x01f947e5, size: 49 bytes, params: 1, frame: 11
|
||||
var r1;
|
||||
let value = environment.__proto__;
|
||||
value = UserStore.getCurrentUser();
|
||||
if (value == null) {
|
||||
r1 = undefined;
|
||||
} else {
|
||||
value = value.isStaff();
|
||||
r1 = value;
|
||||
}
|
||||
return r1 != null && r1;
|
||||
}
|
||||
|
||||
function _fun86427() { // fn#86427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:10564, offset: 0x01f9484b, size: 27 bytes, params: 1, frame: 11
|
||||
return EmojiStore.getGuildEmoji(env0_3);
|
||||
}
|
||||
|
||||
function _fun86428() { // fn#86428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:10628, offset: 0x01f94866, size: 72 bytes, params: 1, frame: 13
|
||||
if (env0_3 == null) {
|
||||
return null;
|
||||
}
|
||||
return (require(9835) /* metro dependency 9835: MessagesUtils */).getVoiceStateChannelSummaryFromVoiceStates(VoiceStateStore.getVoiceStates(env0_3));
|
||||
}
|
||||
|
||||
function _fun86429() { // fn#86429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:10806, offset: 0x01f948ae, size: 341 bytes, params: 1, frame: 35
|
||||
var environment;
|
||||
var r5;
|
||||
var id;
|
||||
var r22;
|
||||
var value8;
|
||||
var channel;
|
||||
var moduleValue;
|
||||
var isVoiceChannelInvite;
|
||||
var id2;
|
||||
var guild;
|
||||
var voiceStatesForChannelAlt;
|
||||
var value10;
|
||||
var value11;
|
||||
var getStartTime;
|
||||
var getChannel;
|
||||
var value12;
|
||||
var value13;
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
const _createForOfIteratorHelperLoose_86350Binding = _createForOfIteratorHelperLoose_86350;
|
||||
const value3 = InviteStore.getInvites().values();
|
||||
const value4 = undefined;
|
||||
const value5 = _createForOfIteratorHelperLoose_86350Binding(value3);
|
||||
const value6 = value5();
|
||||
let done = value6.done;
|
||||
const value7 = '';
|
||||
if (!done) {
|
||||
r5 = value6;
|
||||
while (true) {
|
||||
value8 = r5.value;
|
||||
channel = value8.channel;
|
||||
id = channel == null ? value4 : channel.id;
|
||||
if (id == null) {
|
||||
continue;
|
||||
}
|
||||
moduleValue = require(4116) /* metro dependency 4116: InviteTypeUtils */;
|
||||
isVoiceChannelInvite = moduleValue.isVoiceChannelInvite;
|
||||
if (!Reflect.apply(isVoiceChannelInvite, moduleValue, [value8])) {
|
||||
continue;
|
||||
}
|
||||
channel = value8.channel;
|
||||
id2 = channel.id;
|
||||
guild = value8.guild;
|
||||
if (guild == null) {
|
||||
id = value4;
|
||||
continue;
|
||||
}
|
||||
id = guild.id;
|
||||
voiceStatesForChannelAlt = SortedVoiceStateStore.getVoiceStatesForChannelAlt(id2, id);
|
||||
value10 = voiceStatesForChannelAlt.map(function(a0) {
|
||||
var value = '';
|
||||
return value + (a0.voiceState.selfStream ? '*' : value) + a0.user.id;
|
||||
});
|
||||
value11 = value10.join(',');
|
||||
getStartTime = VoiceChannelStartTimeStore.getStartTime;
|
||||
getChannel = ChannelStore.getChannel;
|
||||
value12 = Reflect.apply(getStartTime, VoiceChannelStartTimeStore, [Reflect.apply(getChannel, ChannelStore,
|
||||
[id2])]);
|
||||
if (value12 != null) {
|
||||
r22 = value12;
|
||||
continue;
|
||||
}
|
||||
r22 = value7;
|
||||
continue;
|
||||
object2[id2] = value7 + value11 + ':' + r22;
|
||||
value13 = value5();
|
||||
done = value13.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r5 = value13;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun86432() { // fn#86432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:11409, offset: 0x01f94a96, size: 32 bytes, params: 1, frame: 13
|
||||
return env0_9.reduce(_fun86433, {});
|
||||
}
|
||||
|
||||
function _fun86434() { // fn#86434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:11603, offset: 0x01f94afd, size: 43 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
const items2 = [AuthorizedAppsStore.getNewestTokens()];
|
||||
const getApplicationFetchStateVersion = AuthorizedAppsStore.getApplicationFetchStateVersion;
|
||||
items2[1] = Reflect.apply(getApplicationFetchStateVersion, AuthorizedAppsStore, []);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun86435() { // fn#86435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:11708, offset: 0x01f94b28, size: 35 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
return UserStore.getCurrentUser()?.displayNameStyles;
|
||||
}
|
||||
|
||||
function _fun86359() { // fn#86359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2706, offset: 0x01f93bba, size: 34 bytes, params: 1, frame: 12
|
||||
const object2 = {};
|
||||
object2.forEach(_fun86360);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun86361() { // fn#86361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2857, offset: 0x01f93c15, size: 55 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
return value.mapValues(env0_1, function(a0, a1) {
|
||||
return PresenceStore.getPrimaryActivity(a1);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun86364() { // fn#86364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:2985, offset: 0x01f93cc1, size: 76 bytes, params: 1, frame: 13
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
set.forEach(_fun86365);
|
||||
const Array = global.Array;
|
||||
return Array.from(set);
|
||||
}
|
||||
|
||||
function _fun86366() { // fn#86366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:3145, offset: 0x01f93d44, size: 174 bytes, params: 1, frame: 19
|
||||
var defaultImport;
|
||||
var fetchApplications;
|
||||
var defaultImport2;
|
||||
var value3;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const shallowEqualModule = require(628) /* metro dependency 628: shallowEqual */;
|
||||
const areArraysShallowEqual = shallowEqualModule.areArraysShallowEqual;
|
||||
let binding = env0_1;
|
||||
if (!Reflect.apply(areArraysShallowEqual, shallowEqualModule, [binding, env0_2.current])) {
|
||||
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
|
||||
fetchApplications = defaultImport.fetchApplications;
|
||||
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
binding = env0_1;
|
||||
value3 = defaultImport2(binding);
|
||||
value = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
value = value.uniq();
|
||||
value = value.value();
|
||||
Reflect.apply(fetchApplications, defaultImport, [value, false]);
|
||||
env0_2.current = binding;
|
||||
}
|
||||
}
|
||||
|
||||
function _loop_86375(a0) { // fn#86375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4284, offset: 0x01f93f3d, size: 146 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
var binding;
|
||||
const env0_0 = a0;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const findActivity = PresenceStore.findActivity;
|
||||
const userIds = a0.userIds;
|
||||
value = Reflect.apply(userIds.values().next, value, []).value;
|
||||
value = Reflect.apply(findActivity, PresenceStore, [value, _fun86376]);
|
||||
const value2 = undefined;
|
||||
if ((value == null ? value2 : value.details) != null) {
|
||||
binding = env0_0;
|
||||
binding.push('' + a0.launchId + ':' + value.details);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun86378(a0, a1) { // fn#86378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4690, offset: 0x01f94042, size: 33 bytes, params: 3, frame: 11
|
||||
const env0_0 = a1;
|
||||
a0.forEach(function({userIds}) {
|
||||
userIds.forEach(_fun86380);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun86388(a0) { // fn#86388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:5589, offset: 0x01f94200, size: 39 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return ReferralTrialStore.getRelevantUserTrialOffer(a0)?.id;
|
||||
}
|
||||
|
||||
function _fun86411(a0) { // fn#86411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:8315, offset: 0x01f94583, size: 96 bytes, params: 2, frame: 16
|
||||
var value2;
|
||||
var getMember;
|
||||
var value3;
|
||||
var value4;
|
||||
const author = a0.author;
|
||||
const value = undefined;
|
||||
if ((author == null ? value : author.id) != null) {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
getMember = GuildMemberStore.getMember;
|
||||
value3 = environment.__proto__;
|
||||
value4 = Reflect.apply(getMember, GuildMemberStore, [env1_3, a0.author.id]);
|
||||
if (value4 != null) {
|
||||
env0_0[a0.author.id] = value4;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun86421() { // fn#86421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:9869, offset: 0x01f94770, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(9855) /* metro dependency 9855: MessageViewTrackingManager */).handleChannelSelect();
|
||||
}
|
||||
|
||||
function _fun86433(a0, a1) { // fn#86433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:11424, offset: 0x01f94ab6, size: 71 bytes, params: 3, frame: 16
|
||||
let application_id = a1.application_id;
|
||||
if (application_id != null) {
|
||||
var value = environment.__proto__.__proto__;
|
||||
var getState = ActivityLauncherStore.getState;
|
||||
application_id = a1.application_id;
|
||||
var JOIN = ActivityActionTypes.JOIN;
|
||||
value = Reflect.apply(getState, ActivityLauncherStore, [application_id, JOIN]);
|
||||
if (value != null) {
|
||||
a0[a1.application_id] = value;
|
||||
}
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun86376({application_id}) { // fn#86376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4350, offset: 0x01f93fcf, size: 27 bytes, params: 2, frame: 2
|
||||
return application_id === env0_0.applicationId;
|
||||
}
|
||||
|
||||
function _fun86379({userIds}) { // fn#86379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4709, offset: 0x01f94063, size: 32 bytes, params: 2, frame: 11
|
||||
userIds.forEach(_fun86380);
|
||||
}
|
||||
|
||||
function _fun86380(a0) { // fn#86380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11507:4732, offset: 0x01f94083, size: 59 bytes, params: 2, frame: 17
|
||||
env2_0.add('' + require + ':' + a0);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,402 @@
|
||||
/* Metro module 11330; source: modules/messages/native/MessagesHooks.tsx; dependencies: [57, 31, 27, 9858, 7729, 4646, 1867, 4396, 566, 22, 628, 6772, 1360, 4116, 11331, 9835, 11332, 2] */
|
||||
function _fun86505(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:6, offset: 0x01f966dc, size: 355 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_86508 = 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 env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).findNodeHandle;
|
||||
const voiceChannelStartTimeStore = importDefault(9858) /* metro dependency 9858: VoiceChannelStartTimeStore */;
|
||||
const env0_7 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).updateShouldShowJumpToPresentButton;
|
||||
const guildAvailabilityStore = importDefault(4646) /* metro dependency 4646: GuildAvailabilityStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/MessagesHooks.tsx');
|
||||
exports.useMessageAuthorActivities = useMessageAuthorActivities;
|
||||
exports.useFetchMessageApplications = useFetchMessageApplications;
|
||||
exports.useFetchVoiceChannelInviteStartTimes = useFetchVoiceChannelInviteStartTimes;
|
||||
exports.useMessagesLifecycle = useMessagesLifecycle;
|
||||
exports.useScrollState = useScrollState_86525;
|
||||
exports.useChatUpdatesQueue = useChatUpdatesQueue;
|
||||
exports.useMessagesState = useMessagesState;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_86506(a0, a1) { // fn#86506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:234, offset: 0x01f9683f, 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 _fun86507;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_86508(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_86508(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_86508(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun86507;
|
||||
}
|
||||
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 useMessageAuthorActivities(a0) { // fn#86509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1251, offset: 0x01f969b3, size: 110 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], _fun86512,
|
||||
[env0_4.useMemo(function() {
|
||||
var object = {};
|
||||
object.forEach(_fun86511);
|
||||
return object;
|
||||
}, [a0])]);
|
||||
}
|
||||
|
||||
function useFetchMessageApplications(a0) { // fn#86514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1553, offset: 0x01f96a91, size: 94 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
const binding = env0_4;
|
||||
const value = binding.useMemo(function() {
|
||||
var value2 = new global.Set();
|
||||
value2.forEach(_fun86516);
|
||||
return global.Array.from(value2);
|
||||
}, [a0]);
|
||||
const env0_2 = binding.useRef([]);
|
||||
binding.useEffect(_fun86517, [value]);
|
||||
}
|
||||
|
||||
function useFetchVoiceChannelInviteStartTimes(a0) { // fn#86518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1971, offset: 0x01f96be9, size: 122 bytes, params: 2, frame: 19
|
||||
const env0_0 = a0;
|
||||
env0_4.useEffect(_fun86520, [a0,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore, GuildAvailabilityStore],
|
||||
_fun86519, [a0])]);
|
||||
}
|
||||
|
||||
function useMessagesLifecycle({messages, isMessagesReady, oldestUnreadMessageId, channelId, screenIndex, updateRows, scrollToMessageId}) { // fn#86521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2576, offset: 0x01f96def, size: 137 bytes, params: 2, frame: 16
|
||||
const binding = screenIndex;
|
||||
binding.useEffect(_fun86522, []);
|
||||
binding.useEffect(function() {
|
||||
return _fun86524;
|
||||
}, [channelId, screenIndex]);
|
||||
}
|
||||
|
||||
function useScrollState_86525() { // fn#86525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2978, offset: 0x01f96f20, size: 101 bytes, params: 1, frame: 15
|
||||
const binding = env0_4;
|
||||
const value = env0_3(binding.useState({'animated': false, 'hasHandledScroll': false, 'isAtBottom': false,
|
||||
'isNearBottom': false, 'isNearTop': false, 'decelerating': false, 'dragging': false,
|
||||
'hasMoreMessagesAfterForLastUpdate': false, '_loaded': false}), 2);
|
||||
const property = value[0];
|
||||
const env0_0 = value[1];
|
||||
const useCallback = binding.useCallback;
|
||||
return [property, Reflect.apply(useCallback, binding, [function(a0) {
|
||||
a0(_fun86527);
|
||||
}, []])];
|
||||
}
|
||||
|
||||
function useChatUpdatesQueue(a0, a1) { // fn#86528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3279, offset: 0x01f96fa5, size: 85 bytes, params: 3, frame: 15
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const binding = env0_4;
|
||||
const value = binding.useMemo(_fun86529, [a0, a1]);
|
||||
binding.useEffect(function() {
|
||||
return _fun86533;
|
||||
}, [value]);
|
||||
return value;
|
||||
}
|
||||
|
||||
function useMessagesState() { // fn#86534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3481, offset: 0x01f97097, size: 97 bytes, params: 1, frame: 19
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [false]);
|
||||
const binding2 = env0_3;
|
||||
let value = binding2(value2, 2);
|
||||
const property = value[0];
|
||||
const property2 = value[1];
|
||||
useState = binding.useState;
|
||||
value = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
return {shouldForceRender: property, hasJumpedToOriginalPost: value[0], setHasJumpedToOriginalPost: value[1],
|
||||
setShouldForceRender: property2};
|
||||
}
|
||||
|
||||
function _fun86510() { // fn#86510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1307, offset: 0x01f96a21, size: 34 bytes, params: 1, frame: 12
|
||||
const object2 = {};
|
||||
object2.forEach(_fun86511);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun86512() { // fn#86512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1457, offset: 0x01f96a43, size: 55 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
return value.mapValues(env0_1, function(a0, a1) {
|
||||
return PresenceStore.getPrimaryActivity(a1);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun86515() { // fn#86515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1610, offset: 0x01f96aef, size: 76 bytes, params: 1, frame: 13
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
set.forEach(_fun86516);
|
||||
const Array = global.Array;
|
||||
return Array.from(set);
|
||||
}
|
||||
|
||||
function _fun86517() { // fn#86517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:1770, offset: 0x01f96b3b, size: 174 bytes, params: 1, frame: 19
|
||||
var defaultImport;
|
||||
var fetchApplications;
|
||||
var defaultImport2;
|
||||
var value3;
|
||||
let value = environment.__proto__;
|
||||
const shallowEqualModule = require(628) /* metro dependency 628: shallowEqual */;
|
||||
const areArraysShallowEqual = shallowEqualModule.areArraysShallowEqual;
|
||||
let binding = env0_1;
|
||||
if (!Reflect.apply(areArraysShallowEqual, shallowEqualModule, [binding, env0_2.current])) {
|
||||
defaultImport = importDefault(6772) /* metro dependency 6772: ApplicationActionCreators */;
|
||||
fetchApplications = defaultImport.fetchApplications;
|
||||
defaultImport2 = importDefault(22) /* metro dependency 22 */;
|
||||
binding = env0_1;
|
||||
value3 = defaultImport2(binding);
|
||||
value = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
value = value.uniq();
|
||||
value = value.value();
|
||||
Reflect.apply(fetchApplications, defaultImport, [value, false]);
|
||||
env0_2.current = binding;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86519() { // fn#86519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2067, offset: 0x01f96c63, size: 185 bytes, params: 1, frame: 21
|
||||
var r3;
|
||||
var r10;
|
||||
var value6;
|
||||
var guild;
|
||||
var moduleValue;
|
||||
var isVoiceChannelInvite;
|
||||
var id;
|
||||
var getGuild;
|
||||
var value7;
|
||||
var isUnavailable;
|
||||
var value8;
|
||||
var value9;
|
||||
const object2 = {};
|
||||
const value4 = _createForOfIteratorHelperLoose_86506(env0_0.values());
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
if (!done) {
|
||||
r3 = value5;
|
||||
while (true) {
|
||||
value6 = r3.value;
|
||||
guild = value6.guild;
|
||||
if (guild != null) {
|
||||
moduleValue = require(4116) /* metro dependency 4116: InviteTypeUtils */;
|
||||
isVoiceChannelInvite = moduleValue.isVoiceChannelInvite;
|
||||
if (Reflect.apply(isVoiceChannelInvite, moduleValue, [value6])) {
|
||||
guild = value6.guild;
|
||||
id = guild.id;
|
||||
getGuild = GuildStore.getGuild;
|
||||
value7 = Reflect.apply(getGuild, GuildStore, [id]) != null;
|
||||
if (!value7) {
|
||||
r10 = value7;
|
||||
continue;
|
||||
}
|
||||
isUnavailable = GuildAvailabilityStore.isUnavailable;
|
||||
value8 = !Reflect.apply(isUnavailable, GuildAvailabilityStore, [id]);
|
||||
r10 = value8;
|
||||
object2[id] = r10;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
value9 = value4();
|
||||
done = value9.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r3 = value9;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun86520() { // fn#86520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2309, offset: 0x01f96d1c, size: 211 bytes, params: 1, frame: 23
|
||||
var r3;
|
||||
var r12;
|
||||
var value6;
|
||||
var guild;
|
||||
var moduleValue;
|
||||
var isVoiceChannelInvite;
|
||||
var id;
|
||||
var value7;
|
||||
var hasRequestedStartTimes2;
|
||||
var moduleValue2;
|
||||
var value8;
|
||||
const value4 = _createForOfIteratorHelperLoose_86506(env0_0.values());
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
if (!done) {
|
||||
r3 = value5;
|
||||
while (true) {
|
||||
value6 = r3.value;
|
||||
guild = value6.guild;
|
||||
if (guild != null) {
|
||||
moduleValue = require(4116) /* metro dependency 4116: InviteTypeUtils */;
|
||||
isVoiceChannelInvite = moduleValue.isVoiceChannelInvite;
|
||||
if (Reflect.apply(isVoiceChannelInvite, moduleValue, [value6])) {
|
||||
guild = value6.guild;
|
||||
id = guild.id;
|
||||
value7 = env0_1[id] !== true;
|
||||
if (value7) {
|
||||
r12 = value7;
|
||||
continue;
|
||||
}
|
||||
hasRequestedStartTimes2 = VoiceChannelStartTimeStore.hasRequestedStartTimes(id);
|
||||
r12 = hasRequestedStartTimes2;
|
||||
if (r12) {
|
||||
break;
|
||||
}
|
||||
moduleValue2 = require(11331) /* metro dependency 11331: ChannelInfoActionCreators */;
|
||||
moduleValue2.fetchChannelInfo(id);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
value8 = value4();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r3 = value8;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86522() { // fn#86522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:2734, offset: 0x01f96e78, size: 126 bytes, params: 1, frame: 20
|
||||
let value = environment.__proto__;
|
||||
value = require(9835) /* metro dependency 9835: MessagesUtils */;
|
||||
const syncMessageDisplay = value.syncMessageDisplay;
|
||||
const messagesBinding = messages;
|
||||
const channelIdBinding = channelId;
|
||||
Reflect.apply(syncMessageDisplay, value, [{messages: messagesBinding, isMessagesReady: isMessagesReady,
|
||||
oldestUnreadMessageId: oldestUnreadMessageId, channelId: channelIdBinding, screenIndex: screenIndex,
|
||||
updateRows: updateRows, scrollToMessageId: scrollToMessageId}]);
|
||||
(require(9835) /* metro dependency 9835: MessagesUtils */).recordTimings(channelIdBinding, messagesBinding);
|
||||
}
|
||||
|
||||
function _fun86523() { // fn#86523, offset: 0x01f96ef6, size: 11 bytes, params: 1, frame: 1
|
||||
return function() {
|
||||
updateShouldShowJumpToPresentButton(channelId, screenIndex, false);
|
||||
};
|
||||
}
|
||||
|
||||
function _fun86526(a0) { // fn#86526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3222, offset: 0x01f96f85, size: 32 bytes, params: 2, frame: 11
|
||||
a0(_fun86527);
|
||||
}
|
||||
|
||||
function _fun86529() { // fn#86529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3330, offset: 0x01f96ffa, size: 63 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(11332) /* metro dependency 11332: ChatUpdatesQueue */;
|
||||
const value2 = Object.create(value.prototype, {constructor: {value: value}});
|
||||
value = new value(_fun86530, function(a0) {
|
||||
require(a0);
|
||||
});
|
||||
return value instanceof Object ? value : value2;
|
||||
}
|
||||
|
||||
function _fun86532() { // fn#86532, offset: 0x01f97077, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun86533;
|
||||
}
|
||||
|
||||
function _fun86530() { // fn#86530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3349, offset: 0x01f97039, size: 43 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const current = env1_0.current;
|
||||
const value2 = null;
|
||||
return value2 === current ? value2 : findNodeHandle(env1_0.current);
|
||||
}
|
||||
|
||||
function _fun86533() { // fn#86533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11516:3434, offset: 0x01f97082, size: 21 bytes, params: 1, frame: 9
|
||||
env1_2.cleanup();
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,94 @@
|
||||
/* Metro module 11381; source: modules/messages/native/RoleMembersActionSheet.tsx; dependencies: [31, 27, 4502, 6875, 1938, 33, 4501, 697, 21, 6738, 566, 6736, 1305, 4573, 6275, 11382, 2] */
|
||||
function _fun87242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:6, offset: 0x01fb4f6e, size: 426 bytes, params: 8, frame: 24
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_6 = (require(6875) /* metro dependency 6875: ChannelMemberStore */).EVERYONE_CHANNEL_ID;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object4.gap = PX_4;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.paddingTop = PX_12;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object4.paddingBottom = PX_4;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
object3.header = object4;
|
||||
object3.headerText = {flex: 1};
|
||||
object3.roleDot = {paddingTop: 0};
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
object3.memberCount = {color: TEXT_MUTED};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/RoleMembersActionSheet.tsx');
|
||||
exports.default = _default_87243;
|
||||
}
|
||||
|
||||
function _default_87243({guildId, roleId, channelId}) { // fn#87243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:496, offset: 0x01fb5118, size: 486 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
let binding = env0_3;
|
||||
binding.useEffect(function() {
|
||||
if (roleId !== importDefault(dependencyMap[8]).castGuildIdAsEveryoneGuildRoleId(guildId)) {
|
||||
require(dependencyMap[9]).requestMembersForRole(guildId, roleId);
|
||||
}
|
||||
}, [guildId, roleId]);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
const value3 = Reflect.apply(useStateFromStores, fluxModule, [[GuildRoleStore], function() {
|
||||
return GuildRoleStore.getRole(guildId, roleId);
|
||||
}, [guildId, roleId]]);
|
||||
var env0_3 = value3;
|
||||
const moduleValue2 = fluxModule;
|
||||
useStateFromStores = moduleValue2.useStateFromStores;
|
||||
const r13 = Reflect.apply(useStateFromStores, moduleValue2, [[AccessibilityStore], function() {
|
||||
return AccessibilityStore.roleStyle;
|
||||
}]) === 'dot' && value3?.colorString != null;
|
||||
const r12 = roleId === (importDefault(21) /* metro dependency 21: SnowflakeUtils */).castGuildIdAsEveryoneGuildRoleId(guildId) ? null : (importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */)(guildId)?.[roleId] ?? null;
|
||||
binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
if (value3 == null) {
|
||||
return null;
|
||||
} else {
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
return (
|
||||
<BottomSheet scrollable header={Reflect.apply(useMemo, binding, [_fun87247, [r13, value3, r12, styles]])}>
|
||||
{((Component) => <Component guildId={guildId} channelId={channelId ?? EVERYONE_CHANNEL_ID} roleId={roleId} headerShown={false} inActionSheet disableStickySections disableThemedGradient />)(importDefault(11382) /* metro dependency 11382: GuildChannelUserList */)}
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun87247() { // fn#87247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11567:944, offset: 0x01fb537b, size: 323 bytes, params: 1, frame: 23
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var r0;
|
||||
var RoleDot;
|
||||
var binding;
|
||||
const value = environment.__proto__;
|
||||
const value3 = null;
|
||||
if (env0_4) {
|
||||
RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
|
||||
binding = env0_3;
|
||||
r0 = <RoleDot color={binding.colorString} colors={binding.colorStrings} size="small" containerStyles={styles.roleDot} />;
|
||||
} else {
|
||||
r0 = value3;
|
||||
}
|
||||
const items2 = [r0];
|
||||
items2[1] = <Text variant="text-sm/semibold" style={styles.headerText}>{value3 == env0_3 ? undefined : env0_3.name}</Text>;
|
||||
items2[2] = value3 != env0_5 ? <Text variant="text-sm/medium" style={styles.memberCount}>{env0_5}</Text> : value3;
|
||||
return (
|
||||
<View style={styles.header}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
/* Metro module 11274; source: modules/messages/native/VisibleMessagesWindowHandler.tsx; dependencies: [7, 6, 8178, 2] */
|
||||
function _fun86106(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:6, offset: 0x01f87f4a, size: 160 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_1 = (require(8178) /* metro dependency 8178: RowGeneratorConstants */).RowType;
|
||||
value = value(function() {
|
||||
this(this, VisibleMessagesWindowHandler);
|
||||
this.data = null;
|
||||
this.callback = null;
|
||||
this.setCallback = _fun86109;
|
||||
this.clearCallback = _fun86110;
|
||||
this.handleScrollPosition = _fun86111;
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/VisibleMessagesWindowHandler.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function getRowMessageId(a0) { // fn#86107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:134, offset: 0x01f87fea, size: 102 bytes, params: 2, frame: 4
|
||||
if (a0 == null) {
|
||||
return undefined;
|
||||
}
|
||||
if ('rowType' in a0) {
|
||||
if (a0.rowType === RowType.MESSAGE) {
|
||||
return a0.message.id;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
const type = a0.type;
|
||||
const MESSAGE = RowType.MESSAGE;
|
||||
if (type !== MESSAGE) {
|
||||
return undefined;
|
||||
}
|
||||
return a0.message?.id;
|
||||
}
|
||||
|
||||
function VisibleMessagesWindowHandler() { // fn#86108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:317, offset: 0x01f88050, size: 87 bytes, params: 1, frame: 14
|
||||
this(this, VisibleMessagesWindowHandler);
|
||||
this.data = null;
|
||||
this.callback = null;
|
||||
this.setCallback = setCallback;
|
||||
this.clearCallback = clearCallback;
|
||||
this.handleScrollPosition = handleScrollPosition;
|
||||
}
|
||||
|
||||
function setCallback(a0) { // fn#86109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:445, owner: VisibleMessagesWindowHandler.setCallback, offset: 0x01f880a7, size: 51 bytes, params: 2, frame: 11
|
||||
let binding = env0_0;
|
||||
binding.callback = a0;
|
||||
if (binding.data != null) {
|
||||
binding = env0_0;
|
||||
binding.callback(binding.data);
|
||||
}
|
||||
}
|
||||
|
||||
function clearCallback() { // fn#86110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:527, owner: VisibleMessagesWindowHandler.clearCallback, offset: 0x01f880da, size: 25 bytes, params: 1, frame: 3
|
||||
const binding = env0_0;
|
||||
binding.callback = null;
|
||||
binding.data = null;
|
||||
}
|
||||
|
||||
function VisibleMessagesWindowHandlerHandleScrollPosition({rows, firstVisibleMessageRowIndex, lastVisibleMessageRowIndex}) { // fn#86111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11460:593, owner: VisibleMessagesWindowHandler.handleScrollPosition, offset: 0x01f880f3, size: 316 bytes, params: 2, frame: 20
|
||||
var r1;
|
||||
var r4;
|
||||
var r6;
|
||||
var r7;
|
||||
var r3;
|
||||
var value3;
|
||||
var rowMessageId;
|
||||
var value5;
|
||||
var length;
|
||||
var value6;
|
||||
var rowMessageId2;
|
||||
var value8;
|
||||
var Math;
|
||||
var value9;
|
||||
var value10;
|
||||
var rowMessageId3;
|
||||
var value12;
|
||||
var binding;
|
||||
if (env0_0.callback != null) {
|
||||
if (firstVisibleMessageRowIndex != null) {
|
||||
value3 = environment.__proto__;
|
||||
if (firstVisibleMessageRowIndex >= 0) {
|
||||
r1 = firstVisibleMessageRowIndex;
|
||||
while (true) {
|
||||
rowMessageId = getRowMessageId(rows[r1]);
|
||||
if (rowMessageId != null) {
|
||||
r4 = rowMessageId;
|
||||
break;
|
||||
}
|
||||
value5 = typeof r1 === 'bigint' ? r1 - 1n : +r1 - 1;
|
||||
if (value5 >= 0) {
|
||||
r1 = value5;
|
||||
continue;
|
||||
}
|
||||
r4 = null;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r4 = null;
|
||||
}
|
||||
} else {
|
||||
r4 = null;
|
||||
}
|
||||
if (lastVisibleMessageRowIndex != null) {
|
||||
length = rows.length;
|
||||
value6 = environment.__proto__;
|
||||
if (lastVisibleMessageRowIndex < length) {
|
||||
r6 = lastVisibleMessageRowIndex;
|
||||
while (true) {
|
||||
rowMessageId2 = getRowMessageId(rows[r6]);
|
||||
if (rowMessageId2 != null) {
|
||||
r1 = rowMessageId2;
|
||||
break;
|
||||
}
|
||||
value8 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
|
||||
length = rows.length;
|
||||
if (value8 < length) {
|
||||
r6 = value8;
|
||||
continue;
|
||||
}
|
||||
r1 = null;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r1 = null;
|
||||
}
|
||||
} else {
|
||||
r1 = null;
|
||||
}
|
||||
if (firstVisibleMessageRowIndex != null) {
|
||||
if (lastVisibleMessageRowIndex != null) {
|
||||
Math = global.Math;
|
||||
value9 = firstVisibleMessageRowIndex + Math.floor((lastVisibleMessageRowIndex - firstVisibleMessageRowIndex) / 2);
|
||||
length = rows.length;
|
||||
value10 = environment.__proto__;
|
||||
if (value9 < length) {
|
||||
r7 = value9;
|
||||
while (true) {
|
||||
rowMessageId3 = getRowMessageId(rows[r7]);
|
||||
if (rowMessageId3 != null) {
|
||||
r3 = rowMessageId3;
|
||||
break;
|
||||
}
|
||||
value12 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
|
||||
length = rows.length;
|
||||
if (value12 < length) {
|
||||
r7 = value12;
|
||||
continue;
|
||||
}
|
||||
r3 = null;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r3 = null;
|
||||
}
|
||||
} else {
|
||||
r3 = null;
|
||||
}
|
||||
} else {
|
||||
r3 = null;
|
||||
}
|
||||
binding = env0_0;
|
||||
binding.data = {topVisibleMessage: r4, middleVisibleMessage: r3, bottomVisibleMessage: r1};
|
||||
binding.callback(binding.data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Metro module 7214; source: modules/messages/native/burst_reactions/BurstReactionAnimation.tsx; dependencies: [31, 4502, 33, 4501, 7172, 566, 7215, 6760, 2] */
|
||||
function _fun57703(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7392:6, offset: 0x016b3cb3, size: 196 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({content: {width: '100%'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimation.tsx');
|
||||
exports.default = BurstReactionAnimation;
|
||||
}
|
||||
|
||||
function BurstReactionAnimation(a0) { // fn#57704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7392:287, offset: 0x016b3d77, size: 337 bytes, params: 2, frame: 26
|
||||
const channelId = a0.channelId;
|
||||
const messageId = a0.messageId;
|
||||
const emoji = a0.emoji;
|
||||
const isFullscreen = a0.isFullscreen;
|
||||
const onComplete = a0.onComplete;
|
||||
let withFadeOut = a0.withFadeOut;
|
||||
withFadeOut = withFadeOut === undefined || withFadeOut;
|
||||
const object2 = {'channelId': 0, 'messageId': 0, 'emoji': 0, 'isFullscreen': 0, 'onComplete': 0, 'withFadeOut': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object2, emoji);
|
||||
const styles = useStyles();
|
||||
const value3 = require(dependencyMap[4]).useBurstReactionAnimationSource({emoji: emoji, messageId: messageId,
|
||||
channelId: channelId, isFullscreen: isFullscreen});
|
||||
const useReducedMotion = require(dependencyMap[5]).useStateFromStores([AccessibilityStore], function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
if (value3 == null) {
|
||||
return null;
|
||||
}
|
||||
const defaultImport = importDefault(withFadeOut ? dependencyMap[6] : dependencyMap[7]);
|
||||
const object4 = {};
|
||||
if (withFadeOut) {
|
||||
object4.onComplete = onComplete;
|
||||
} else {
|
||||
object4.onAnimationFinish = onComplete;
|
||||
}
|
||||
return ((Component) => <Component style={styles.content} loop={false} speed={useReducedMotion ? 0.5 : 1.2} {...value} {...object4} {...{['source']: value3}} />)(defaultImport);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,239 @@
|
||||
/* Metro module 15265; source: modules/messages/native/burst_reactions/BurstReactionAnimationContainer.tsx; dependencies: [57, 31, 27, 1376, 33, 4501, 697, 7172, 4081, 4082, 694, 4017, 4504, 10357, 1365, 1305, 7214, 4573, 1244, 3868, 2] */
|
||||
function _fun116710(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:6, offset: 0x024945dc, size: 526 bytes, params: 8, frame: 25
|
||||
var object5;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.TouchableOpacity;
|
||||
const env0_6 = value.View;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.Fragment;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object5 = {};
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object6['backgroundColor'] = BLACK;
|
||||
const BACKDROP_OPACITY = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
|
||||
object6['opacity'] = BACKDROP_OPACITY;
|
||||
object5.background = object6;
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['flex'] = 1;
|
||||
object7['alignItems'] = 'center';
|
||||
object7['justifyContent'] = 'center';
|
||||
object5.fill = object7;
|
||||
object5.dismissTextContainer = {'position': 'absolute', 'bottom': 48, 'zIndex': 1};
|
||||
const object8 = {'backgroundColor': null, 'borderRadius': null, 'position': 'absolute', 'bottom': -600,
|
||||
'height': 700, 'width': 700};
|
||||
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
|
||||
object8.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object5.dismissTextBackground = object8;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object5]);
|
||||
object5 = {code: "function BurstReactionAnimationContainerTsx1(){const{animationData,showAnimation,withTiming,runOnJS,handleComponentFinish}=this.__closure;if(animationData==null){return{opacity:0};}if(!showAnimation){return{opacity:withTiming(0,{duration:300},'respect-motion-settings',function(finished){if(finished)runOnJS(handleComponentFinish)();})};}return{opacity:withTiming(1,{duration:300})};}"};
|
||||
object5 = {code: 'function BurstReactionAnimationContainerTsx2(finished){const{runOnJS,handleComponentFinish}=this.__closure;if(finished)runOnJS(handleComponentFinish)();}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimationContainer.tsx');
|
||||
exports.default = BurstReactionAnimationContainer;
|
||||
}
|
||||
|
||||
function BurstReactionAnimationContainerInner() { // fn#116711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1252, offset: 0x024947ea, size: 404 bytes, params: 1, frame: 24
|
||||
const closure = handleComponentFinish;
|
||||
const env0_0 = useStyles();
|
||||
const binding = env0_4Binding;
|
||||
const value2 = null;
|
||||
const [property, env0_2] = env0_3(binding.useState(value2), 2);
|
||||
var [property2, env0_4] = env0_3(env0_4Binding.useState(false), 2);
|
||||
const env0_5 = env0_4Binding.useRef(false);
|
||||
env0_4Binding.useEffect(_fun116714, []);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure3 = BurstReactionAnimationContainerInnerY;
|
||||
const object2 = {animationData: property, showAnimation: property2};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.handleComponentFinish = closure;
|
||||
closure3.__closure = object2;
|
||||
closure3.__workletHash = 12044515783370;
|
||||
closure3.__initData = env0_12;
|
||||
const env0_6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure3]);
|
||||
return value2 == property ? value2 : ((Component) => <Component contentTypes={[(require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS]}>{children_116719}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
|
||||
}
|
||||
|
||||
function BurstReactionAnimationContainer() { // fn#116723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:3458, offset: 0x02494e5f, size: 98 bytes, params: 1, frame: 17
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const DARKER = (importDefault(697) /* metro dependency 697: native */).themes.DARKER;
|
||||
return (
|
||||
<ThemeContextProvider theme={DARKER}>
|
||||
<BurstReactionAnimationContainerInner />
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function handleComponentFinish() { // fn#116712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1407, owner: BurstReactionAnimationContainerInner.handleComponentFinish, offset: 0x0249497e, size: 35 bytes, params: 1, frame: 11
|
||||
if (env0_5.current === false) {
|
||||
env0_2(null);
|
||||
}
|
||||
}
|
||||
|
||||
function handleAnimationFinish(a0) { // fn#116713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1464, owner: BurstReactionAnimationContainerInner.handleAnimationFinish, offset: 0x024949a1, size: 41 bytes, params: 2, frame: 13
|
||||
env0_4(false);
|
||||
env0_5.current = false;
|
||||
if (a0 != null) {
|
||||
a0();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun116714() { // fn#116714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1543, offset: 0x024949ca, size: 65 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const closure = handleEffectReceived;
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('BURST_REACTION_EFFECT_SEND', closure);
|
||||
return _fun116716;
|
||||
}
|
||||
|
||||
function BurstReactionAnimationContainerInnerY() { // fn#116717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1920, owner: BurstReactionAnimationContainerInner.y, offset: 0x02494abe, size: 201 bytes, params: 1, frame: 23
|
||||
var environment;
|
||||
var r0;
|
||||
var binding;
|
||||
var object4;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var withTiming;
|
||||
var object5;
|
||||
var closure;
|
||||
var object6;
|
||||
if (env0_1 == null) {
|
||||
r0 = {opacity: 0};
|
||||
} else {
|
||||
binding = env0_3;
|
||||
object4 = {};
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue.withTiming;
|
||||
object5 = {duration: 300};
|
||||
if (binding) {
|
||||
object4.opacity = Reflect.apply(withTiming, moduleValue, [1, object5]);
|
||||
r0 = object4;
|
||||
} else {
|
||||
closure = yN;
|
||||
object6 = {};
|
||||
object6.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object6.handleComponentFinish = handleComponentFinish;
|
||||
closure.__closure = object6;
|
||||
closure.__workletHash = 9326347209552;
|
||||
closure.__initData = env1_13;
|
||||
object4.opacity = Reflect.apply(withTiming, moduleValue, [0, object5, 'respect-motion-settings', closure]);
|
||||
r0 = object4;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function BurstReactionAnimationContainerInnerChildren({visibleContent, markAsDismissed}) { // fn#116719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2608, owner: BurstReactionAnimationContainerInner.children, offset: 0x02494bbf, size: 603 bytes, params: 2, frame: 34
|
||||
var environment;
|
||||
var r15;
|
||||
var r11;
|
||||
var BurstReactionAnimation;
|
||||
var binding;
|
||||
var jsxRuntimeEnv1_9Binding;
|
||||
var Text;
|
||||
var object2;
|
||||
var intl;
|
||||
const value = environment.__proto__;
|
||||
const OverlayView = (require(1305) /* metro dependency 1305: native */).OverlayView;
|
||||
const object4 = {};
|
||||
let stylesBinding = styles;
|
||||
let fill = stylesBinding.fill;
|
||||
object4.style = fill;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [stylesBinding.fill, env0_6];
|
||||
const object5 = {};
|
||||
const BACKDROP_OPACITY = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
|
||||
object5.activeOpacity = BACKDROP_OPACITY;
|
||||
object5.onPress = function() {
|
||||
handleAnimationFinish(_fun116721);
|
||||
};
|
||||
object5.style = stylesBinding.fill;
|
||||
const items2 = [<View style={stylesBinding.background} />];
|
||||
fill = stylesBinding.fill;
|
||||
if (env0_3) {
|
||||
BurstReactionAnimation = importDefault(7214) /* metro dependency 7214: BurstReactionAnimation */;
|
||||
binding = env0_1;
|
||||
r15 = <BurstReactionAnimation isFullscreen channelId={binding.channelId} messageId={binding.messageId} emoji={binding.emoji} loop={false} withFadeOut={false} onComplete={function() {
|
||||
handleAnimationFinish();
|
||||
}} />;
|
||||
} else {
|
||||
r15 = null;
|
||||
}
|
||||
items2[1] = <View style={fill}>{r15}</View>;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS = DismissibleContent.SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS;
|
||||
const value6 = visibleContent === SUPER_REACTIONS_MOBILE_FULLSCREEN_TAP_TO_DISMISS;
|
||||
if (value6) {
|
||||
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
object2 = {};
|
||||
stylesBinding = styles;
|
||||
object2.style = stylesBinding.dismissTextContainer;
|
||||
object2.variant = 'text-sm/medium';
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r11 = <><Text {...object2}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QpPMih)}</Text><View style={stylesBinding.dismissTextBackground} /></>;
|
||||
} else {
|
||||
r11 = value6;
|
||||
}
|
||||
items2[2] = r11;
|
||||
return (
|
||||
<OverlayView {...object4}>
|
||||
<View2 style={items3}>
|
||||
<TouchableOpacity {...object5}>
|
||||
{items2}
|
||||
</TouchableOpacity>
|
||||
</View2>
|
||||
</OverlayView>
|
||||
);
|
||||
}
|
||||
|
||||
function handleEffectReceived({channelId, emoji, messageId}) { // fn#116715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1548, offset: 0x02494a0b, size: 127 bytes, params: 2, frame: 14
|
||||
env1_2({channelId: channelId, emoji: emoji, messageId: messageId});
|
||||
env1_4(true);
|
||||
env1_5.current = true;
|
||||
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
||||
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
|
||||
const IMPACT_HEAVY = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_HEAVY;
|
||||
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_HEAVY]);
|
||||
}
|
||||
|
||||
function _fun116716() { // fn#116716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:1798, offset: 0x02494a8a, size: 52 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.unsubscribe('BURST_REACTION_EFFECT_SEND', handleEffectReceived);
|
||||
}
|
||||
|
||||
function yN(a0) { // fn#116718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2083, owner: BurstReactionAnimationContainerInner.y.n, offset: 0x02494b87, size: 56 bytes, params: 2, frame: 12
|
||||
var value;
|
||||
var runOnJS;
|
||||
var value2;
|
||||
if (a0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = value.runOnJS;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(runOnJS, value, [handleComponentFinish])();
|
||||
}
|
||||
}
|
||||
|
||||
function childrenOnPress_116720() { // fn#116720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15462:2789, owner: BurstReactionAnimationContainerInner.children.onPress, offset: 0x02494e1a, size: 25 bytes, params: 1, frame: 11
|
||||
handleAnimationFinish(function() {
|
||||
return markAsDismissed(ContentDismissActionType.UNKNOWN);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Metro module 7213; source: modules/messages/native/burst_reactions/BurstReactionAnimationPreview.tsx; dependencies: [31, 33, 7152, 7214, 2] */
|
||||
function _fun57701(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7391:6, offset: 0x016b3bb1, size: 136 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/BurstReactionAnimationPreview.tsx');
|
||||
exports.default = BurstReactionAnimationPreview;
|
||||
}
|
||||
|
||||
function BurstReactionAnimationPreview({channelId, emoji, messageId, reactionType}) { // fn#57702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7391:235, offset: 0x016b3c39, size: 122 bytes, params: 2, frame: 18
|
||||
var r0;
|
||||
var value;
|
||||
const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes;
|
||||
const BURST = ReactionTypes.BURST;
|
||||
if (reactionType !== BURST) {
|
||||
r0 = null;
|
||||
} else {
|
||||
value = importDefault(7214) /* metro dependency 7214: BurstReactionAnimation */;
|
||||
value = ((Component) => <Component isFullscreen channelId={channelId} messageId={messageId} emoji={emoji} />)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,128 @@
|
||||
/* Metro module 7215; source: modules/messages/native/burst_reactions/FadeOutLottieAnimation.tsx; dependencies: [57, 31, 4502, 33, 4501, 566, 4017, 4504, 6760, 2] */
|
||||
function _fun57706(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:6, offset: 0x016b3ed7, size: 248 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({content: {width: '100%'}});
|
||||
object = {code: "function FadeOutLottieAnimationTsx1(){const{isAnimationComplete,isFadeOut,withTiming,runOnJS,setIsFadeOut}=this.__closure;if(!isAnimationComplete){return{opacity:1};}if(isFadeOut){return{opacity:withTiming(0,{duration:300},'respect-motion-settings',function(finished){if(finished)runOnJS(setIsFadeOut)(false);})};}return{opacity:0};}"};
|
||||
object = {code: 'function FadeOutLottieAnimationTsx2(finished){const{runOnJS,setIsFadeOut}=this.__closure;if(finished)runOnJS(setIsFadeOut)(false);}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/FadeOutLottieAnimation.tsx');
|
||||
exports.default = FadeOutLottieAnimation;
|
||||
}
|
||||
|
||||
function FadeOutLottieAnimation(a0) { // fn#57707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:787, offset: 0x016b3fcf, size: 441 bytes, params: 2, frame: 29
|
||||
var object2;
|
||||
var r0;
|
||||
var View;
|
||||
const env0_0 = a0.onComplete;
|
||||
let value = null;
|
||||
const value2 = Object.create(value);
|
||||
value2.onComplete = 0;
|
||||
const value3 = copyDataProperties({}, a0, value2, undefined);
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value5 = Reflect.apply(useState, binding, [false]);
|
||||
const binding2 = env0_3;
|
||||
const value6 = binding2(value5, 2);
|
||||
const property = value6[0];
|
||||
const value7 = 1;
|
||||
const env0_2 = value6[value7];
|
||||
useState = binding.useState;
|
||||
const value8 = binding2(Reflect.apply(useState, binding, [true]), 2);
|
||||
const property2 = value8[0];
|
||||
const property3 = value8[value7];
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
let closure = _fun57709;
|
||||
binding.useEffect(closure, []);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
closure = FadeOutLottieAnimationT;
|
||||
object2 = {isAnimationComplete: property, isFadeOut: property2};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.setIsFadeOut = property3;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 1137618554665;
|
||||
closure.__initData = env0_8;
|
||||
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
if (property) {
|
||||
if (property2) {
|
||||
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
object2 = {style: value9};
|
||||
value = importDefault(6760) /* metro dependency 6760: LottieAnimationView */;
|
||||
value = <View {...object2}>{((Component) => <Component style={styles.content} speed={useReducedMotion ? 0.5 : value7} onAnimationFinish={onAnimationFinish} {...value3} />)(value)}</View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
object2 = {style: value9};
|
||||
value = importDefault(6760) /* metro dependency 6760: LottieAnimationView */;
|
||||
value = <View {...object2}>{((Component) => <Component style={styles.content} speed={useReducedMotion ? 0.5 : value7} onAnimationFinish={onAnimationFinish} {...value3} />)(value)}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function FadeOutLottieAnimationT() { // fn#57710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1056, owner: FadeOutLottieAnimation.T, offset: 0x016b419a, size: 194 bytes, params: 1, frame: 25
|
||||
var environment;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var withTiming;
|
||||
var closure;
|
||||
var object2;
|
||||
const binding = env0_1;
|
||||
const object4 = {};
|
||||
if (binding) {
|
||||
if (env0_3) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue.withTiming;
|
||||
closure = TT_57711;
|
||||
object2 = {};
|
||||
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.setIsFadeOut = env0_4;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 14133863353798;
|
||||
closure.__initData = env1_9;
|
||||
object4.opacity = Reflect.apply(withTiming, moduleValue, [0, {duration: 300}, 'respect-motion-settings',
|
||||
closure]);
|
||||
} else {
|
||||
object4.opacity = 0;
|
||||
}
|
||||
} else {
|
||||
object4.opacity = 1;
|
||||
}
|
||||
return object4;
|
||||
}
|
||||
|
||||
function onAnimationFinish(a0) { // fn#57712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1599, owner: FadeOutLottieAnimation.onAnimationFinish, offset: 0x016b4297, size: 42 bytes, params: 2, frame: 12
|
||||
if (onComplete != null) {
|
||||
onComplete(a0);
|
||||
}
|
||||
env0_2(true);
|
||||
}
|
||||
|
||||
function TT_57711(a0) { // fn#57711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7393:1152, owner: FadeOutLottieAnimation.T.t, offset: 0x016b425c, size: 59 bytes, params: 2, frame: 12
|
||||
var value;
|
||||
var runOnJS;
|
||||
var value2;
|
||||
if (a0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = value.runOnJS;
|
||||
value2 = environment.__proto__;
|
||||
value = Reflect.apply(runOnJS, value, [env1_4]);
|
||||
value(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 8573; source: modules/messages/native/burst_reactions/SuperReactionLocalImageAnimation.tsx; dependencies: [31, 33, 7172, 7215, 2] */
|
||||
function _fun67838(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8758:6, offset: 0x01c33ca0, size: 138 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/SuperReactionLocalImageAnimation.tsx');
|
||||
exports.default = SuperReactionLocalImageAnimation;
|
||||
}
|
||||
|
||||
function SuperReactionLocalImageAnimation(a0) { // fn#67839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8758:238, offset: 0x01c33d2a, size: 154 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
const localImageSource = a0.localImageSource;
|
||||
const animationSource = a0.animationSource;
|
||||
let value = null;
|
||||
const value2 = Object.create(value);
|
||||
value2.localImageSource = 0;
|
||||
value2.animationSource = 0;
|
||||
const value3 = copyDataProperties({}, a0, value2, animationSource);
|
||||
const value5 = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).useSuperReactionAnimationSourceFromLocalImage({animationSource: animationSource,
|
||||
localImageSource: localImageSource});
|
||||
if (value == value5) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = importDefault(7215) /* metro dependency 7215: FadeOutLottieAnimation */;
|
||||
value = ((Component) => <Component loop source={value5} {...value3} />)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 8565; source: modules/messages/native/burst_reactions/SuperReactionUpsellActionSheet.tsx; dependencies: [31, 27, 1878, 661, 33, 1365, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 4501, 697, 6771, 566, 3802, 5080, 7028, 1962, 7940, 22, 8573, 7183, 8574, 1244, 7172, 1305, 4080, 2] */
|
||||
function _fun67825(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:6, offset: 0x01c3354a, size: 523 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticsPages;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const env0_8 = DismissibleContent.SUPER_REACTIONS_COACHMARK_MOBILE;
|
||||
object = [require(8566) /* metro dependency 8566 */, require(8567) /* metro dependency 8567 */,
|
||||
require(8568) /* metro dependency 8568 */, require(8569) /* metro dependency 8569 */,
|
||||
require(8567) /* metro dependency 8567 */, require(8570) /* metro dependency 8570 */,
|
||||
require(8571) /* metro dependency 8571 */, require(8572) /* metro dependency 8572 */];
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object = {};
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
||||
object3['flex'] = 1;
|
||||
object3['alignItems'] = 'center';
|
||||
object3['justifyContent'] = 'center';
|
||||
object3['top'] = -150;
|
||||
object.fill = object3;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object.nitroIcon = {'tintColor': null, 'width': 32, 'height': 32, 'marginVertical': -8, 'marginRight': -4,
|
||||
tintColor: WHITE};
|
||||
object.description = {paddingHorizontal: 16};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/burst_reactions/SuperReactionUpsellActionSheet.tsx');
|
||||
exports.default = SuperReactionCoachmarkActionSheet;
|
||||
}
|
||||
|
||||
function SuperReactionCoachmarkActionSheet({onDismiss}) { // fn#67826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:690, offset: 0x01c33755, size: 512 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var PremiumUpsellTooltipActionSheet;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object3;
|
||||
const styles = useStyles();
|
||||
const env0_1 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const object4 = {};
|
||||
const PREMIUM_UPSELL_BURST_REACTIONS = AnalyticsPages.PREMIUM_UPSELL_BURST_REACTIONS;
|
||||
object4.page = PREMIUM_UPSELL_BURST_REACTIONS;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const isPremium2 = (require(3802) /* metro dependency 3802: PremiumUtils */).isPremium(currentUser);
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
if (isPremium2) {
|
||||
r0 = null;
|
||||
} else {
|
||||
PremiumUpsellTooltipActionSheet = importDefault(8574) /* metro dependency 8574: PremiumUpsellTooltipActionSheet */;
|
||||
var premiumUpsellTooltipActionSheetProps = {title: intl.string(t.Wfl5zp)};
|
||||
object3 = {};
|
||||
object3.backdropOpacity = (require(7172) /* metro dependency 7172: BurstReactionEffectUtils */).BACKDROP_OPACITY;
|
||||
object3.backdropChildren = Reflect.apply(useMemo, binding, [_fun67828, [styles]]);
|
||||
premiumUpsellTooltipActionSheetProps.backdropProps = object3;
|
||||
premiumUpsellTooltipActionSheetProps.description = intl.string(t.eikz43);
|
||||
premiumUpsellTooltipActionSheetProps.descriptionStyle = styles.description;
|
||||
premiumUpsellTooltipActionSheetProps.dismissibleContent = SUPER_REACTIONS_COACHMARK_MOBILE;
|
||||
premiumUpsellTooltipActionSheetProps.primaryButtonText = intl.string(t.sEAnVH);
|
||||
premiumUpsellTooltipActionSheetProps.primaryButtonIcon = primaryButtonIcon;
|
||||
premiumUpsellTooltipActionSheetProps.onPrimaryButtonPress = onPrimaryButtonPress;
|
||||
premiumUpsellTooltipActionSheetProps.secondaryButtonText = intl.string(t.TulDPl);
|
||||
premiumUpsellTooltipActionSheetProps.onDismiss = onDismiss;
|
||||
r0 = <PremiumUpsellTooltipActionSheet {...premiumUpsellTooltipActionSheetProps} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun67828() { // fn#67828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:929, offset: 0x01c33955, size: 144 bytes, params: 1, frame: 18
|
||||
const binding = env1_9;
|
||||
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
||||
return (
|
||||
<View style={styles.fill}>
|
||||
{((Component) => <Component localImageSource={binding[defaultImport.random(0,
|
||||
binding.length - 1)]} animationSource={require(7183) /* metro dependency 7183 */} />)(importDefault(8573) /* metro dependency 8573: SuperReactionLocalImageAnimation */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function primaryButtonIcon() { // fn#67829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:1403, owner: SuperReactionCoachmarkActionSheet.primaryButtonIcon, offset: 0x01c339e5, size: 62 bytes, params: 1, frame: 14
|
||||
const NitroWheel = (require(1305) /* metro dependency 1305: native */).NitroWheel;
|
||||
return <NitroWheel style={styles.nitroIcon} />;
|
||||
}
|
||||
|
||||
function onPrimaryButtonPress() { // fn#67830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8750:1471, owner: SuperReactionCoachmarkActionSheet.onPrimaryButtonPress, offset: 0x01c33a23, size: 147 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
importDefault(dependencyMap[29]).hideActionSheet();
|
||||
const defaultImport2 = importDefault(dependencyMap[18]);
|
||||
const pushLazy = defaultImport2.pushLazy;
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[19], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
object2.analyticsLocation = env0_2;
|
||||
object2.analyticsLocations = analyticsLocations;
|
||||
const PremiumFeatureCardOrder = require(dependencyMap[21]).PremiumFeatureCardOrder;
|
||||
const TIER_2_LEADING = PremiumFeatureCardOrder.TIER_2_LEADING;
|
||||
object2.premiumFeatureCardOrder = TIER_2_LEADING;
|
||||
Reflect.apply(pushLazy, defaultImport2, [value, object2]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,756 @@
|
||||
/* Metro module 11518; source: modules/messages/native/createChannelStream.tsx; dependencies: [11322, 7075, 7223, 8178, 661, 21, 11519, 11520, 1244, 3826, 8228, 5260, 6860, 2] */
|
||||
function _fun88186(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:6, offset: 0x01fd836d, size: 246 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_88189 = 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 pushFeedbackStore = importDefault(11322) /* metro dependency 11322: PushFeedbackStore */;
|
||||
const editMessageStore = importDefault(7075) /* metro dependency 7075: EditMessageStore */;
|
||||
const uploadStore = importDefault(7223) /* metro dependency 7223: UploadStore */;
|
||||
const rowGeneratorConstantsModule = require(8178) /* metro dependency 8178: RowGeneratorConstants */;
|
||||
const env0_6 = rowGeneratorConstantsModule.Changeset;
|
||||
const env0_7 = rowGeneratorConstantsModule.LoadingType;
|
||||
const env0_8 = rowGeneratorConstantsModule.RowType;
|
||||
const env0_9 = rowGeneratorConstantsModule.SeparatorType;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).MessageFlags;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/createChannelStream.tsx');
|
||||
exports.default = createChannelStream;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_88187(a0, a1) { // fn#88187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:229, offset: 0x01fd8463, 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 _fun88188;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_88189(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_88189(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_88189(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun88188;
|
||||
}
|
||||
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 createChannelStream({channel, messages, uploads, oldestUnreadMessageId, replyingMessageId, currentUserId, canAddNewReactions, selectedSummary, chatManager, roleStyle, forceRender, updateMessageIds, isResourceChannel, unloadableContentEntryMessageIds}) { // fn#88190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:1233, offset: 0x01fd85d7, size: 558 bytes, params: 2, frame: 23
|
||||
var r8;
|
||||
var nonce;
|
||||
var value6;
|
||||
var getMessageForFile;
|
||||
var id;
|
||||
var value7;
|
||||
var value8;
|
||||
var push;
|
||||
var object3;
|
||||
var intl;
|
||||
const items3 = [];
|
||||
const object4 = {};
|
||||
const _createForOfIteratorHelperLoose_88187Binding = _createForOfIteratorHelperLoose_88187;
|
||||
const value3 = uploads.slice();
|
||||
const value4 = _createForOfIteratorHelperLoose_88187Binding(value3.reverse());
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
if (!done) {
|
||||
r8 = value5;
|
||||
while (true) {
|
||||
value6 = r8.value;
|
||||
getMessageForFile = UploadStore.getMessageForFile;
|
||||
id = value6.id;
|
||||
value7 = Reflect.apply(getMessageForFile, UploadStore, [id]);
|
||||
nonce = value7?.nonce;
|
||||
if (nonce == null) {
|
||||
continue;
|
||||
}
|
||||
nonce = value7.nonce;
|
||||
object4[nonce] = value6;
|
||||
value8 = value4();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r8 = value8;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
const items2 = [];
|
||||
messages.forEach(_fun88193);
|
||||
items2.forEach(_fun88195);
|
||||
if (items2.length === 0 && !messages.loadingMore && (messages.hasMoreAfter || messages.hasMoreBefore)) {
|
||||
push = items3.push;
|
||||
object3 = {};
|
||||
object3.rowType = messages.hasMoreBefore ? LoadingType.LOAD_BEFORE : LoadingType.LOAD_AFTER;
|
||||
object3.changeType = forceRender ? Changeset.UPDATE : Changeset.NOOP;
|
||||
object3.roleStyle = roleStyle;
|
||||
object3.isLoading = messages.loadingMore;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object3.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XBlaiC);
|
||||
Reflect.apply(push, items3, [object3]);
|
||||
}
|
||||
return items3;
|
||||
}
|
||||
|
||||
function unreadFilter(a0) { // fn#88191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:1706, owner: createChannelStream.unreadFilter, offset: 0x01fd8805, size: 106 bytes, params: 2, frame: 15
|
||||
var r1;
|
||||
var r0;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
const isForumPost2 = channel.isForumPost();
|
||||
let id = a0.id;
|
||||
const value2 = id === oldestUnreadMessageId;
|
||||
if (isForumPost2) {
|
||||
if (value2) {
|
||||
id = a0.id;
|
||||
value3 = environment.__proto__;
|
||||
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
r1 = id !== defaultImport.castChannelIdAsMessageId(channel.id);
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function insertMessage(a0) { // fn#88192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:1810, owner: createChannelStream.insertMessage, offset: 0x01fd886f, size: 154 bytes, params: 2, frame: 18
|
||||
var property2;
|
||||
var value2;
|
||||
const property = env0_16[0];
|
||||
if (property == null) {
|
||||
env0_16.unshift([a0]);
|
||||
} else if (unreadFilter(a0)) {
|
||||
env0_16.unshift([a0]);
|
||||
} else {
|
||||
property2 = property[property.length - 1];
|
||||
value2 = environment.__proto__;
|
||||
if ((importDefault(11519) /* metro dependency 11519: isNewMessageGroup */)(channel, property2, a0)) {
|
||||
env0_16.unshift([a0]);
|
||||
} else {
|
||||
property.unshift(a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun88193(a0) { // fn#88193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:1950, offset: 0x01fd8909, size: 161 bytes, params: 2, frame: 17
|
||||
var oldestUnreadMessageIdBinding;
|
||||
var id;
|
||||
let value = environment.__proto__;
|
||||
value = Reflect.apply((require(11520) /* metro dependency 11520: tryInjectMessage */).tryCreateInjectedMessage,
|
||||
value, [a0, channel]);
|
||||
if (value != null && value.position === 'before') {
|
||||
insertMessage(value.message);
|
||||
oldestUnreadMessageIdBinding = oldestUnreadMessageId;
|
||||
id = a0.id;
|
||||
if (oldestUnreadMessageIdBinding === id) {
|
||||
id = value.message.id;
|
||||
}
|
||||
}
|
||||
insertMessage(a0);
|
||||
if (value != null && value.position === 'after') {
|
||||
insertMessage(value.message);
|
||||
}
|
||||
}
|
||||
|
||||
function createChannelStreamDetermineChangeType(a0) { // fn#88194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:2185, owner: createChannelStream.determineChangeType, offset: 0x01fd89aa, size: 59 bytes, params: 2, frame: 15
|
||||
const value = a1;
|
||||
return chatManager.determineChangeType({message: a0, updateMessageIds: updateMessageIds, forceRender: forceRender},
|
||||
value !== undefined ? value : false);
|
||||
}
|
||||
|
||||
function _fun88195(a0, a1) { // fn#88195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:2283, offset: 0x01fd89e5, size: 2491 bytes, params: 3, frame: 42
|
||||
var environment;
|
||||
var r6;
|
||||
var r7;
|
||||
var r3;
|
||||
var r13;
|
||||
var r25;
|
||||
var r26;
|
||||
var r23;
|
||||
var r12;
|
||||
var r30;
|
||||
var r29;
|
||||
var pushType;
|
||||
var r15;
|
||||
var r10;
|
||||
var binding;
|
||||
var push;
|
||||
var value4;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value8;
|
||||
var moduleValue;
|
||||
var value16;
|
||||
var value17;
|
||||
var done;
|
||||
var value18;
|
||||
var value19;
|
||||
var isEditing;
|
||||
var id;
|
||||
var id2;
|
||||
var isEditing2;
|
||||
var value20;
|
||||
var getPushFeedback;
|
||||
var channel_id;
|
||||
var value21;
|
||||
var moduleValue2;
|
||||
var canReplyToMessage2;
|
||||
var defaultImport;
|
||||
var value22;
|
||||
var moduleValue3;
|
||||
var isNonModInLockedThread;
|
||||
var value23;
|
||||
var hasOwnProperty;
|
||||
var channelStreamDetermineChangeType;
|
||||
var property3;
|
||||
var value24;
|
||||
var value25;
|
||||
var endId;
|
||||
var value26;
|
||||
var count;
|
||||
var value27;
|
||||
var SUMMARY;
|
||||
var isSystemDM2;
|
||||
var isSystemDM3;
|
||||
var value28;
|
||||
var isResourceChannelBinding;
|
||||
var value29;
|
||||
var isForumPost2;
|
||||
var defaultImport2;
|
||||
var castChannelIdAsMessageId;
|
||||
var id3;
|
||||
var value30;
|
||||
var value31;
|
||||
var value32;
|
||||
var MESSAGE;
|
||||
var unloadableContentEntryMessageIdsBinding;
|
||||
var has;
|
||||
var value33;
|
||||
var value34;
|
||||
var startId;
|
||||
var value35;
|
||||
var value36;
|
||||
var value37;
|
||||
var channelStreamDetermineChangeType2;
|
||||
var object6;
|
||||
var channelStreamDetermineChangeType3;
|
||||
var object7;
|
||||
var channelStreamDetermineChangeType4;
|
||||
var object8;
|
||||
var channelStreamDetermineChangeType5;
|
||||
var moduleValue4;
|
||||
const env0_0 = a0;
|
||||
const property = a0[a0.length - 1];
|
||||
const value2 = a1 === env0_16.length - 1;
|
||||
if (a1 === 0 && messages.hasMoreAfter) {
|
||||
binding = env0_13;
|
||||
push = binding.push;
|
||||
value4 = environment.__proto__;
|
||||
Reflect.apply(push, binding, [{rowType: LoadingType.LOAD_AFTER,
|
||||
changeType: forceRender ? Changeset.UPDATE : Changeset.NOOP, roleStyle: roleStyle,
|
||||
isLoading: messages.loadingMore, text: intl.string(t.XBlaiC)}]);
|
||||
}
|
||||
let r1 = messages.hasMoreBefore && value2;
|
||||
const unreadFilterBinding = unreadFilter;
|
||||
const value5 = undefined;
|
||||
const value6 = unreadFilterBinding(property);
|
||||
const value7 = null;
|
||||
if (value2) {
|
||||
r6 = channel.isDM() && !messages.hasMoreBefore;
|
||||
r6 = r6 && value2;
|
||||
if (!r6) {
|
||||
r7 = channel.isThread() && !channel.isForumPost();
|
||||
r7 = r7 && !messages.hasMoreBefore;
|
||||
r7 = r7 && value2;
|
||||
r6 = r7;
|
||||
}
|
||||
r3 = r6 && true;
|
||||
} else {
|
||||
value8 = environment.__proto__;
|
||||
moduleValue = require(3826) /* metro dependency 3826: DateUtils */;
|
||||
if (moduleValue.isSameDay(property.timestamp, value2 ? value7 : env0_16[a1 + 1][0].timestamp)) {
|
||||
r6 = channel.isDM() && !messages.hasMoreBefore;
|
||||
r6 = r6 && value2;
|
||||
if (!r6) {
|
||||
r7 = channel.isThread() && !channel.isForumPost();
|
||||
r7 = r7 && !messages.hasMoreBefore;
|
||||
r7 = r7 && value2;
|
||||
r6 = r7;
|
||||
}
|
||||
r3 = r6 && true;
|
||||
} else {
|
||||
r3 = true;
|
||||
}
|
||||
}
|
||||
const closure = processHiddenMessageRow;
|
||||
let object5 = {'roleStyle': null, 'message': null, 'isFirst': true, 'content': null, 'text': '', 'revealed': false};
|
||||
object5.roleStyle = roleStyle;
|
||||
object5.message = property;
|
||||
object5.content = [];
|
||||
binding = env0_13;
|
||||
const property2 = binding[binding.length - 1];
|
||||
const hasFlag = property.hasFlag;
|
||||
const HIDDEN_SUSPENDED_USER = MessageFlags.HIDDEN_SUSPENDED_USER;
|
||||
if (Reflect.apply(hasFlag, property, [HIDDEN_SUSPENDED_USER])) {
|
||||
if (value7 == property2) {
|
||||
channelStreamDetermineChangeType4 = createChannelStreamDetermineChangeType(property);
|
||||
object8 = {};
|
||||
copyDataProperties(object8, object5, undefined);
|
||||
object8['rowType'] = RowType.SUSPENDED_USER_GROUP;
|
||||
object8['changeType'] = channelStreamDetermineChangeType4;
|
||||
object8['canUncollapse'] = false;
|
||||
env0_13.push(object8);
|
||||
r7 = object8;
|
||||
} else if (property2.rowType === RowType.SUSPENDED_USER_GROUP) {
|
||||
r7 = property2;
|
||||
} else {
|
||||
channelStreamDetermineChangeType4 = createChannelStreamDetermineChangeType(property);
|
||||
object8 = {};
|
||||
copyDataProperties(object8, object5, undefined);
|
||||
object8['rowType'] = RowType.SUSPENDED_USER_GROUP;
|
||||
object8['changeType'] = channelStreamDetermineChangeType4;
|
||||
object8['canUncollapse'] = false;
|
||||
env0_13.push(object8);
|
||||
r7 = object8;
|
||||
}
|
||||
closure(r7);
|
||||
r7.text = intl.formatToPlainString(t.rHRovo, {count: r7.content.length});
|
||||
} else if (property.blocked) {
|
||||
if (value7 == property2) {
|
||||
channelStreamDetermineChangeType3 = createChannelStreamDetermineChangeType(property);
|
||||
r15 = channelStreamDetermineChangeType3 === Changeset.NOOP && chatManager.getBlocked(property) ? Changeset.INSERT : channelStreamDetermineChangeType3;
|
||||
object7 = {};
|
||||
copyDataProperties(object7, object5, undefined);
|
||||
object7['rowType'] = RowType.BLOCKED_GROUP;
|
||||
object7['changeType'] = r15;
|
||||
env0_13.push(object7);
|
||||
r13 = object7;
|
||||
} else if (property2.rowType === RowType.BLOCKED_GROUP) {
|
||||
r13 = property2;
|
||||
} else {
|
||||
channelStreamDetermineChangeType3 = createChannelStreamDetermineChangeType(property);
|
||||
r15 = channelStreamDetermineChangeType3 === Changeset.NOOP && chatManager.getBlocked(property) ? Changeset.INSERT : channelStreamDetermineChangeType3;
|
||||
object7 = {};
|
||||
copyDataProperties(object7, object5, undefined);
|
||||
object7['rowType'] = RowType.BLOCKED_GROUP;
|
||||
object7['changeType'] = r15;
|
||||
env0_13.push(object7);
|
||||
r13 = object7;
|
||||
}
|
||||
closure(r13);
|
||||
r13.text = intl.formatToPlainString(t['+FcYM/'], {count: r13.content.length});
|
||||
} else if (property.ignored) {
|
||||
if (value7 == property2) {
|
||||
channelStreamDetermineChangeType2 = createChannelStreamDetermineChangeType(property);
|
||||
r15 = channelStreamDetermineChangeType2 === Changeset.NOOP && chatManager.getIgnored(property) ? Changeset.INSERT : channelStreamDetermineChangeType2;
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object5, undefined);
|
||||
object6['rowType'] = RowType.IGNORED_GROUP;
|
||||
object6['changeType'] = r15;
|
||||
env0_13.push(object6);
|
||||
r13 = object6;
|
||||
} else if (property2.rowType === RowType.IGNORED_GROUP) {
|
||||
r13 = property2;
|
||||
} else {
|
||||
channelStreamDetermineChangeType2 = createChannelStreamDetermineChangeType(property);
|
||||
r15 = channelStreamDetermineChangeType2 === Changeset.NOOP && chatManager.getIgnored(property) ? Changeset.INSERT : channelStreamDetermineChangeType2;
|
||||
object6 = {};
|
||||
copyDataProperties(object6, object5, undefined);
|
||||
object6['rowType'] = RowType.IGNORED_GROUP;
|
||||
object6['changeType'] = r15;
|
||||
env0_13.push(object6);
|
||||
r13 = object6;
|
||||
}
|
||||
closure(r13);
|
||||
r13.text = intl.formatToPlainString(t['VFWjc+'], {count: r13.content.length});
|
||||
} else {
|
||||
value16 = _createForOfIteratorHelperLoose_88187(a0);
|
||||
value17 = value16();
|
||||
done = value17.done;
|
||||
if (!done) {
|
||||
r13 = value17;
|
||||
while (true) {
|
||||
value18 = r13.value;
|
||||
value19 = value18 !== property;
|
||||
isEditing = EditMessageStore.isEditing;
|
||||
id = channel.id;
|
||||
id2 = value18.id;
|
||||
isEditing2 = Reflect.apply(isEditing, EditMessageStore, [id, id2]);
|
||||
if (isEditing2) {
|
||||
r25 = isEditing2;
|
||||
} else {
|
||||
value20 = replyingMessageId === value18.id;
|
||||
r25 = value20;
|
||||
}
|
||||
getPushFeedback = PushFeedbackStore.getPushFeedback;
|
||||
channel_id = value18.channel_id;
|
||||
id = value18.id;
|
||||
value21 = Reflect.apply(getPushFeedback, PushFeedbackStore, [channel_id, id]);
|
||||
moduleValue2 = require(8228) /* metro dependency 8228: canReplyToMessage */;
|
||||
canReplyToMessage2 = moduleValue2.canReplyToMessage(channel, value18);
|
||||
defaultImport = importDefault(5260) /* metro dependency 5260: canEditMessage */;
|
||||
value22 = defaultImport(value18, currentUserId);
|
||||
if (!value22) {
|
||||
r26 = value22;
|
||||
continue;
|
||||
}
|
||||
moduleValue3 = require(6860) /* metro dependency 6860: ThreadHooks */;
|
||||
isNonModInLockedThread = moduleValue3.isNonModInLockedThread;
|
||||
value23 = !Reflect.apply(isNonModInLockedThread, moduleValue3, [channel]);
|
||||
r26 = value23;
|
||||
binding = env0_14;
|
||||
hasOwnProperty = binding.hasOwnProperty;
|
||||
id = value18.id;
|
||||
if (Reflect.apply(hasOwnProperty, binding, [id])) {
|
||||
property3 = env0_14[value18.id];
|
||||
value24 = chatManager.determineChangeTypeForUploadProgress(property3);
|
||||
r23 = value24;
|
||||
} else {
|
||||
channelStreamDetermineChangeType = createChannelStreamDetermineChangeType(value18, true);
|
||||
r23 = channelStreamDetermineChangeType;
|
||||
}
|
||||
value25 = value7 != selectedSummary;
|
||||
if (!value25) {
|
||||
r12 = value25;
|
||||
continue;
|
||||
}
|
||||
endId = selectedSummary.endId;
|
||||
id = value18.id;
|
||||
value26 = endId === id;
|
||||
r12 = value26;
|
||||
if (!r12) {
|
||||
continue;
|
||||
}
|
||||
count = selectedSummary.count;
|
||||
value27 = count > 1;
|
||||
r12 = value27;
|
||||
if (!r12) {
|
||||
continue;
|
||||
}
|
||||
binding = env0_13;
|
||||
push = binding.push;
|
||||
object5 = {};
|
||||
SUMMARY = SeparatorType.SUMMARY;
|
||||
object5.rowType = SUMMARY;
|
||||
object5.changeType = createChannelStreamDetermineChangeType(value18);
|
||||
object5.roleStyle = roleStyle;
|
||||
object5.summary = selectedSummary;
|
||||
object5.isBeforeContent = false;
|
||||
Reflect.apply(push, binding, [object5]);
|
||||
binding = env0_13;
|
||||
push = binding.push;
|
||||
object5 = {};
|
||||
object5.roleStyle = roleStyle;
|
||||
object5.message = value18;
|
||||
isSystemDM2 = channel.isSystemDM();
|
||||
if (!isSystemDM2) {
|
||||
r30 = isSystemDM2;
|
||||
continue;
|
||||
}
|
||||
isSystemDM3 = value18.isSystemDM();
|
||||
r30 = isSystemDM3;
|
||||
object5.isSystemDM = r30;
|
||||
object5.isFirst = value18 === property;
|
||||
object5.isEditing = r25;
|
||||
value28 = !value19;
|
||||
if (value19) {
|
||||
r25 = value28;
|
||||
continue;
|
||||
}
|
||||
value29 = !isResourceChannel;
|
||||
r25 = value29;
|
||||
if (!r25) {
|
||||
continue;
|
||||
}
|
||||
if (r3) {
|
||||
r29 = r3;
|
||||
continue;
|
||||
}
|
||||
r29 = value6;
|
||||
continue;
|
||||
if (r29) {
|
||||
continue;
|
||||
}
|
||||
r29 = r1;
|
||||
continue;
|
||||
r25 = r29;
|
||||
object5.separatorBefore = r25;
|
||||
object5.canAddNewReactions = canAddNewReactions;
|
||||
isForumPost2 = channel.isForumPost();
|
||||
if (!isForumPost2) {
|
||||
r25 = isForumPost2;
|
||||
continue;
|
||||
}
|
||||
id = value18.id;
|
||||
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
castChannelIdAsMessageId = defaultImport2.castChannelIdAsMessageId;
|
||||
id3 = channel.id;
|
||||
value30 = id === Reflect.apply(castChannelIdAsMessageId, defaultImport2, [id3]);
|
||||
r25 = value30;
|
||||
object5.alwaysShowAddReaction = r25;
|
||||
object5.renderContentOnly = isResourceChannel;
|
||||
if (value7 == value21) {
|
||||
pushType = value5;
|
||||
continue;
|
||||
}
|
||||
pushType = value21.pushType;
|
||||
object5.pushFeedbackType = pushType;
|
||||
isResourceChannelBinding = isResourceChannel;
|
||||
value31 = !isResourceChannelBinding;
|
||||
if (isResourceChannelBinding) {
|
||||
r25 = value31;
|
||||
continue;
|
||||
}
|
||||
r25 = canReplyToMessage2;
|
||||
continue;
|
||||
object5.canReply = r25;
|
||||
isResourceChannelBinding = isResourceChannel;
|
||||
value32 = !isResourceChannelBinding;
|
||||
if (isResourceChannelBinding) {
|
||||
r25 = value32;
|
||||
continue;
|
||||
}
|
||||
r25 = r26;
|
||||
continue;
|
||||
object5.canEdit = r25;
|
||||
MESSAGE = RowType.MESSAGE;
|
||||
object5.rowType = MESSAGE;
|
||||
object5.changeType = r23;
|
||||
if (value7 == unloadableContentEntryMessageIds) {
|
||||
r23 = value5;
|
||||
continue;
|
||||
}
|
||||
unloadableContentEntryMessageIdsBinding = unloadableContentEntryMessageIds;
|
||||
has = unloadableContentEntryMessageIdsBinding.has;
|
||||
id = value18.id;
|
||||
value33 = Reflect.apply(has, unloadableContentEntryMessageIdsBinding, [id]);
|
||||
r23 = value33;
|
||||
object5.showContentInventoryEntryFallbackEmbed = r23;
|
||||
Reflect.apply(push, binding, [object5]);
|
||||
value34 = value7 != selectedSummary;
|
||||
if (!value34) {
|
||||
r12 = value34;
|
||||
continue;
|
||||
}
|
||||
startId = selectedSummary.startId;
|
||||
id = value18.id;
|
||||
value35 = startId === id;
|
||||
r12 = value35;
|
||||
if (!r12) {
|
||||
continue;
|
||||
}
|
||||
count = selectedSummary.count;
|
||||
value36 = count > 1;
|
||||
r12 = value36;
|
||||
if (!r12) {
|
||||
continue;
|
||||
}
|
||||
binding = env0_13;
|
||||
push = binding.push;
|
||||
object5 = {};
|
||||
SUMMARY = SeparatorType.SUMMARY;
|
||||
object5.rowType = SUMMARY;
|
||||
object5.changeType = createChannelStreamDetermineChangeType(value18);
|
||||
object5.roleStyle = roleStyle;
|
||||
object5.summary = selectedSummary;
|
||||
object5.isBeforeContent = true;
|
||||
Reflect.apply(push, binding, [object5]);
|
||||
value37 = value16();
|
||||
done = value37.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r13 = value37;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (r3) {
|
||||
if (!isResourceChannel) {
|
||||
channelStreamDetermineChangeType5 = createChannelStreamDetermineChangeType(property);
|
||||
r10 = channelStreamDetermineChangeType5 !== Changeset.UPDATE ? channelStreamDetermineChangeType5 : Changeset.NOOP;
|
||||
moduleValue4 = require(3826) /* metro dependency 3826: DateUtils */;
|
||||
env0_13.push({rowType: SeparatorType.DAY, changeType: r10, roleStyle: roleStyle,
|
||||
text: moduleValue4.dateFormat(property.timestamp, 'LL')});
|
||||
}
|
||||
}
|
||||
if (value6 && !isResourceChannel) {
|
||||
binding = env0_13;
|
||||
push = binding.push;
|
||||
object5 = {};
|
||||
object5.rowType = SeparatorType.UNREAD;
|
||||
object5.changeType = createChannelStreamDetermineChangeType(property);
|
||||
object5.roleStyle = roleStyle;
|
||||
object5.text = intl.string(t.q7hm3m).toUpperCase();
|
||||
Reflect.apply(push, binding, [object5]);
|
||||
}
|
||||
r1 = r1 && !isResourceChannel;
|
||||
if (r1) {
|
||||
env0_13.push({rowType: LoadingType.LOAD_BEFORE, changeType: forceRender ? Changeset.UPDATE : Changeset.NOOP,
|
||||
roleStyle: roleStyle, isLoading: messages.loadingMore, text: intl.string(t.XBlaiC)});
|
||||
}
|
||||
return value5;
|
||||
}
|
||||
|
||||
function processHiddenMessageRow(a0) { // fn#88196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11704:2732, offset: 0x01fd93a0, size: 287 bytes, params: 2, frame: 21
|
||||
var r4;
|
||||
var r3;
|
||||
var r10;
|
||||
var value6;
|
||||
var channelStreamDetermineChangeType;
|
||||
var NOOP;
|
||||
var value7;
|
||||
var changeType;
|
||||
var value8;
|
||||
var UPDATE;
|
||||
var content;
|
||||
var unshift;
|
||||
var object2;
|
||||
var MESSAGE;
|
||||
var isSystemDM2;
|
||||
var isSystemDM3;
|
||||
var value9;
|
||||
const value3 = _createForOfIteratorHelperLoose_88187(env0_0);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r4 = value4;
|
||||
while (true) {
|
||||
value6 = r4.value;
|
||||
channelStreamDetermineChangeType = createChannelStreamDetermineChangeType(value6);
|
||||
NOOP = Changeset.NOOP;
|
||||
value7 = channelStreamDetermineChangeType !== NOOP;
|
||||
if (value7) {
|
||||
changeType = a0.changeType;
|
||||
value8 = changeType === Changeset.NOOP;
|
||||
r3 = value8;
|
||||
} else {
|
||||
r3 = value7;
|
||||
}
|
||||
if (!r3) {
|
||||
continue;
|
||||
}
|
||||
UPDATE = Changeset.UPDATE;
|
||||
a0.changeType = UPDATE;
|
||||
content = a0.content;
|
||||
unshift = content.unshift;
|
||||
object2 = {};
|
||||
MESSAGE = RowType.MESSAGE;
|
||||
object2.rowType = MESSAGE;
|
||||
NOOP = Changeset.NOOP;
|
||||
object2.changeType = NOOP;
|
||||
object2.roleStyle = roleStyle;
|
||||
object2.message = value6;
|
||||
isSystemDM2 = channel.isSystemDM();
|
||||
if (!isSystemDM2) {
|
||||
r10 = isSystemDM2;
|
||||
continue;
|
||||
}
|
||||
isSystemDM3 = value6.isSystemDM();
|
||||
r10 = isSystemDM3;
|
||||
object2.isSystemDM = r10;
|
||||
object2.isFirst = value6 === env0_1;
|
||||
object2.canAddNewReactions = canAddNewReactions;
|
||||
Reflect.apply(unshift, content, [object2]);
|
||||
value9 = value3();
|
||||
done = value9.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r4 = value9;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
const binding = env0_1;
|
||||
a0.revealed = binding.id === messages.revealedMessageId;
|
||||
a0.context = binding.id;
|
||||
return a0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,419 @@
|
||||
/* Metro module 8631; source: modules/messages/native/emoji/CustomEmojiContent.tsx; dependencies: [31, 27, 6541, 3969, 1878, 661, 33, 4501, 697, 3802, 683, 5080, 7028, 1962, 4080, 8625, 566, 6771, 3800, 6545, 3777, 8533, 6796, 3829, 8632, 7007, 8626, 8633, 8635, 4573, 1244, 8629, 3857, 8637, 8638, 1305, 4578, 5475, 8640, 7972, 8641, 8645, 2] */
|
||||
function _fun68107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:6, offset: 0x01c3ec6f, size: 687 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.Pressable;
|
||||
const env0_6 = value.View;
|
||||
const subscriptionRoleStore = importDefault(6541) /* metro dependency 6541: SubscriptionRoleStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = value.UserSettingsSections;
|
||||
const env0_11 = value.AnalyticEvents;
|
||||
const env0_12 = value.AnalyticsPages;
|
||||
const env0_13 = value.AnalyticsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value.jsx;
|
||||
const env0_15 = value.jsxs;
|
||||
const env0_16 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {nitroWheel: {'height': 32, 'width': 32}};
|
||||
const CONTROL_BRAND_FOREGROUND_NEW = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND_NEW;
|
||||
object2.nitroWheelPurple = {tintColor: CONTROL_BRAND_FOREGROUND_NEW};
|
||||
object2.emojiDescriptionWrapperOuter = {'flexDirection': 'row', 'flex': 1, 'alignItems': 'center', 'gap': 8};
|
||||
object2.starIcon = {'height': 32, 'width': 32, 'margin': 0, 'padding': 0, 'flex': 0};
|
||||
const ICON_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING;
|
||||
object2.starIconSelected = {tintColor: ICON_FEEDBACK_WARNING};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object2.starIconUnselected = {tintColor: INTERACTIVE_TEXT_DEFAULT};
|
||||
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
|
||||
object2.moreMenuIcon = {'height': 32, 'width': 32, 'justifyContent': 'center', 'alignItems': 'center',
|
||||
color: INTERACTIVE_ICON_DEFAULT};
|
||||
object2.bottomCtaButton = {marginTop: 24};
|
||||
object2.ctaDescriptionWrapper = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
|
||||
'justifyContent': 'flex-start', 'marginTop': 8};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.betaTag = {backgroundColor: WHITE};
|
||||
const BRAND_530 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_530;
|
||||
object2.betaTagTextAddPack = {color: BRAND_530};
|
||||
const PRIMARY_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_500;
|
||||
object2.betaTagTextRemovePack = {color: PRIMARY_500};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.favoriteButtonContainer = {paddingTop: PX_4};
|
||||
const env0_17 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/CustomEmojiContent.tsx');
|
||||
exports.default = _default_68108;
|
||||
}
|
||||
|
||||
function _default_68108({emojiNode, sourceType, expressionSourceApplication, expressionSourceGuild, customEmojiFromJoinedGuild, hasJoinedEmojiSourceGuild, nonce}) { // fn#68108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:1227, offset: 0x01c3ef1e, size: 2595 bytes, params: 2, frame: 49
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
var r19;
|
||||
var r32;
|
||||
var r27;
|
||||
var r5;
|
||||
var r16;
|
||||
var moduleValue4;
|
||||
var object2;
|
||||
var StarOutlineIcon;
|
||||
var object3;
|
||||
var StarIcon;
|
||||
var object5;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
var jsxRuntimeEnv0_16Binding2;
|
||||
var items9;
|
||||
var jsxRuntimeEnv0_16Binding3;
|
||||
var items11;
|
||||
const _default_68108CloseActionSheet = function() {
|
||||
importDefault(dependencyMap[14]).hideActionSheet();
|
||||
var defaultImport2 = importDefault(dependencyMap[10]);
|
||||
var CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
|
||||
defaultImport2.track(CLOSE_POPOUT, {nonce: nonce});
|
||||
};
|
||||
let object6 = {};
|
||||
const styles = useStyles();
|
||||
copyDataProperties(object6, styles, undefined);
|
||||
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
|
||||
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
|
||||
copyDataProperties(object6, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
|
||||
undefined);
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const isPremium2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).isPremium(currentUser);
|
||||
const guildId2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore],
|
||||
function() {
|
||||
return SelectedGuildStore.getGuildId();
|
||||
});
|
||||
const r15 = guildId2 != null && guildId2 === expressionSourceGuild?.id;
|
||||
const env0_8 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const {isRoleSubscriptionEmoji, isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber} = env0_4.useMemo(_fun68112,
|
||||
[customEmojiFromJoinedGuild, guildId2]);
|
||||
const value7 = !isUnusableRoleSubscriptionEmoji;
|
||||
let r1 = isUnusableRoleSubscriptionEmoji ? customEmojiFromJoinedGuild?.type !== (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.GUILD : value7;
|
||||
if (r1) {
|
||||
r19 = !r1;
|
||||
} else {
|
||||
moduleValue4 = require(3777) /* metro dependency 3777: CreatorMonetizationRestrictionsUtils */;
|
||||
r19 = moduleValue4.shouldHideGuildPurchaseEntryPoints(customEmojiFromJoinedGuild?.guildId);
|
||||
}
|
||||
const value10 = (require(8533) /* metro dependency 8533: EmojiPickerUtils */).useIsFavoriteEmoji(guildId2,
|
||||
customEmojiFromJoinedGuild);
|
||||
let defaultImport2 = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
|
||||
const useExperiment = defaultImport2.useExperiment;
|
||||
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport2, [{location: 'CustomEmojiContent'},
|
||||
{autoTrackExposure: false}]).tidaWebformEnabled;
|
||||
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
|
||||
const value11 = DeveloperMode.useSetting();
|
||||
r1 = expressionSourceGuild?.isDiscoverable();
|
||||
const r9 = r1 != null && r1;
|
||||
const object8 = {};
|
||||
object8.page = guildId2 != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL;
|
||||
const EMOJI_UPSELL_POPOUT = AnalyticsSections.EMOJI_UPSELL_POPOUT;
|
||||
object8.section = EMOJI_UPSELL_POPOUT;
|
||||
const emojiPopoutData = (require(8632) /* metro dependency 8632: getEmojiPopoutMessage */).getEmojiPopoutData({sourceType: sourceType,
|
||||
expressionSourceApplication: expressionSourceApplication, isPremium: isPremium2,
|
||||
hasJoinedEmojiSourceGuild: hasJoinedEmojiSourceGuild, isRoleSubscriptionEmoji: isRoleSubscriptionEmoji,
|
||||
isUnusableRoleSubscriptionEmoji: isUnusableRoleSubscriptionEmoji, userIsRoleSubscriber: userIsRoleSubscriber,
|
||||
shouldHideRoleSubscriptionCTA: r19, emojiComesFromCurrentGuild: r15, isDiscoverable: r9,
|
||||
onOpenPremiumSettings: onOpenPremiumSettings});
|
||||
(require(8626) /* metro dependency 8626: useTrackOpenPopout */).useTrackOpenPopout({emojiId: emojiNode.id,
|
||||
currentGuildId: guildId2, popoutData: emojiPopoutData, emojiSourceGuildId: expressionSourceGuild?.id,
|
||||
nonce: nonce});
|
||||
const emojiDescription = emojiPopoutData.emojiDescription;
|
||||
const type = emojiPopoutData.type;
|
||||
const closure = onPress_68115;
|
||||
const r8 = isUnusableRoleSubscriptionEmoji ? value7 : hasJoinedEmojiSourceGuild;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r25 = hasJoinedEmojiSourceGuild ? Reflect.apply(string, intl, [t.ohTzZH]) : Reflect.apply(string, intl,
|
||||
[t['eLfh+a']]);
|
||||
const EmojiPopoutType = (require(8632) /* metro dependency 8632: getEmojiPopoutMessage */).EmojiPopoutType;
|
||||
let JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
|
||||
const value16 = type === JOIN_GUILD;
|
||||
const object9 = {};
|
||||
let GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
|
||||
const items4 = [GET_PREMIUM];
|
||||
JOIN_GUILD = EmojiPopoutType.JOIN_GUILD;
|
||||
items4[1] = JOIN_GUILD;
|
||||
copyDataProperties(object9, items4.includes(type) ? object6.ctaButton : object6.bottomCtaButton, undefined);
|
||||
object9['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
const jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
|
||||
const object11 = {};
|
||||
copyDataProperties(object11, object6.emojiContainer, undefined);
|
||||
object11['marginTop'] = 8;
|
||||
const value17 = ((Component) => <Component style={object6.emojiIcon} source={{uri: emojiNode.src}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const emojiDescriptionWrapperOuter = object6.emojiDescriptionWrapperOuter;
|
||||
const items7 = [<View style={object6.emojiDescriptionWrapper}><Text variant="text-md/bold" color="mobile-text-heading-primary">{':' + emojiNode.alt + ':'}</Text>{emojiDescription != null && <Text variant="text-sm/medium">{emojiDescription}</Text>}</View>];
|
||||
if (r8) {
|
||||
if (tidaWebformEnabled) {
|
||||
r27 = null;
|
||||
} else {
|
||||
object2 = {};
|
||||
string = intl.string;
|
||||
r32 = value10 ? Reflect.apply(string, intl, [t.aBUcp3]) : Reflect.apply(string, intl, [t.yZFibY]);
|
||||
object2.accessibilityLabel = r32;
|
||||
object2.style = object6.moreMenuIcon;
|
||||
object2.onPress = closure;
|
||||
if (value10) {
|
||||
StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
|
||||
object5 = {};
|
||||
copyDataProperties(object5, object6.starIcon, undefined);
|
||||
copyDataProperties(object5, object6.starIconSelected, undefined);
|
||||
r32 = <StarIcon style={object5} />;
|
||||
} else {
|
||||
StarOutlineIcon = (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon;
|
||||
object3 = {};
|
||||
copyDataProperties(object3, object6.starIconUnselected, copyDataProperties(object3, object6.starIcon,
|
||||
undefined));
|
||||
r32 = <StarOutlineIcon style={object3} />;
|
||||
}
|
||||
r27 = <Pressable {...object2}>{r32}</Pressable>;
|
||||
}
|
||||
} else {
|
||||
r27 = null;
|
||||
}
|
||||
items7[1] = r27;
|
||||
items7[2] = tidaWebformEnabled && value11 ? <Pressable accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg)} style={object6.moreMenuIcon} onPress={onPress_68119}>{((MoreHorizontalIcon) => <MoreHorizontalIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon)}</Pressable> : null;
|
||||
const items8 = [<View style={object11}>{value17}<View style={emojiDescriptionWrapperOuter}>{items7}</View></View>];
|
||||
GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
|
||||
items8[1] = type === GET_PREMIUM ? renderPremiumUpsellButton() : value16 ? <View style={object9}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)} size="md" grow onPress={onPress_68123} /></View> : null;
|
||||
if (hasJoinedEmojiSourceGuild) {
|
||||
if (expressionSourceGuild == null) {
|
||||
r5 = null;
|
||||
} else {
|
||||
jsxRuntimeEnv0_16Binding2 = jsxRuntimeEnv0_16;
|
||||
items9 = [((FormDivider) => <FormDivider style={object6.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider)];
|
||||
items9[1] = ((Component) => <Component guild={expressionSourceGuild} hasJoinedGuild={hasJoinedEmojiSourceGuild} title={r25} showingJoinGuildCta={value16} />)(importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */);
|
||||
items9[2] = !hasJoinedEmojiSourceGuild && ((EmojiGrid) => <EmojiGrid expressionSourceGuild={expressionSourceGuild} doNotDisplayEmojiIds={[emojiNode.id]} />)((require(8645) /* metro dependency 8645: EmojiGrid */).EmojiGrid);
|
||||
r5 = <>{items9}</>;
|
||||
}
|
||||
} else if (r9) {
|
||||
if (expressionSourceGuild == null) {
|
||||
r5 = null;
|
||||
} else {
|
||||
jsxRuntimeEnv0_16Binding2 = jsxRuntimeEnv0_16;
|
||||
items9 = [((FormDivider) => <FormDivider style={object6.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider)];
|
||||
items9[1] = ((Component) => <Component guild={expressionSourceGuild} hasJoinedGuild={hasJoinedEmojiSourceGuild} title={r25} showingJoinGuildCta={value16} />)(importDefault(8641) /* metro dependency 8641: ExpressionGuildDetails */);
|
||||
items9[2] = !hasJoinedEmojiSourceGuild && ((EmojiGrid) => <EmojiGrid expressionSourceGuild={expressionSourceGuild} doNotDisplayEmojiIds={[emojiNode.id]} />)((require(8645) /* metro dependency 8645: EmojiGrid */).EmojiGrid);
|
||||
r5 = <>{items9}</>;
|
||||
}
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
items8[2] = r5;
|
||||
if (r8) {
|
||||
if (tidaWebformEnabled) {
|
||||
jsxRuntimeEnv0_16Binding3 = jsxRuntimeEnv0_16;
|
||||
items11 = [((FormDivider) => <FormDivider style={object6.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider)];
|
||||
var viewBindingProps = {style: object6.favoriteButtonContainer};
|
||||
object6 = {};
|
||||
string = intl.string;
|
||||
r16 = value10 ? Reflect.apply(string, intl, [t.Ay49KA]) : Reflect.apply(string, intl, [t.nNsr67]);
|
||||
object6.text = r16;
|
||||
r16 = value10 ? 'tertiary' : 'primary';
|
||||
object6.variant = r16;
|
||||
object6.size = 'md';
|
||||
object6.onPress = closure;
|
||||
items11[1] = <View {...viewBindingProps}><Button {...object6} /></View>;
|
||||
r5 = <>{items11}</>;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
items8[3] = r5;
|
||||
return (
|
||||
<>
|
||||
{items8}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun68112() { // fn#68112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:1748, offset: 0x01c3f9a8, size: 212 bytes, params: 1, frame: 20
|
||||
var r0;
|
||||
var type;
|
||||
var value2;
|
||||
var object2;
|
||||
var moduleValue;
|
||||
var isPurchasableRoleSubscriptionEmoji;
|
||||
var moduleValue2;
|
||||
let customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
|
||||
if (customEmojiFromJoinedGuildBinding == null) {
|
||||
r0 = {'isRoleSubscriptionEmoji': false, 'isUnusableRoleSubscriptionEmoji': false,
|
||||
'userIsRoleSubscriber': false};
|
||||
} else {
|
||||
type = customEmojiFromJoinedGuild.type;
|
||||
value2 = environment.__proto__;
|
||||
if (type !== (require(3800) /* metro dependency 3800: EmojiTypes */).EmojiTypes.GUILD) {
|
||||
r0 = {'isRoleSubscriptionEmoji': false, 'isUnusableRoleSubscriptionEmoji': false,
|
||||
'userIsRoleSubscriber': false};
|
||||
} else {
|
||||
object2 = {};
|
||||
moduleValue = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
|
||||
isPurchasableRoleSubscriptionEmoji = moduleValue.isPurchasableRoleSubscriptionEmoji;
|
||||
customEmojiFromJoinedGuildBinding = customEmojiFromJoinedGuild;
|
||||
object2.isRoleSubscriptionEmoji = Reflect.apply(isPurchasableRoleSubscriptionEmoji, moduleValue,
|
||||
[customEmojiFromJoinedGuildBinding]);
|
||||
moduleValue2 = importAll(6545) /* metro dependency 6545: RoleSubscriptionEmojiUtils */;
|
||||
object2.isUnusableRoleSubscriptionEmoji = moduleValue2.isUnusableRoleSubscriptionEmoji(customEmojiFromJoinedGuildBinding,
|
||||
|
||||
|
||||
guildId ?? undefined);
|
||||
object2.userIsRoleSubscriber = SubscriptionRoleStore.getUserSubscriptionRoles(customEmojiFromJoinedGuild.guildId).size > 0;
|
||||
r0 = object2;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function onOpenPremiumSettings() { // fn#68113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:2940, owner: _default_68108.onOpenPremiumSettings, offset: 0x01c3fa7c, size: 151 bytes, params: 1, frame: 18
|
||||
_default_68108CloseActionSheet();
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const PREMIUM_PROMOTION_OPENED = AnalyticEvents.PREMIUM_PROMOTION_OPENED;
|
||||
Reflect.apply(track, defaultImport, [PREMIUM_PROMOTION_OPENED, {location_page: env0_10.page,
|
||||
location_section: env0_10.section}]);
|
||||
const openUserSettingsModule = require(7007) /* metro dependency 7007: openUserSettings */;
|
||||
const openUserSettings = openUserSettingsModule.openUserSettings;
|
||||
const PREMIUM = UserSettingsSections.PREMIUM;
|
||||
Reflect.apply(openUserSettings, openUserSettingsModule, [{screen: PREMIUM, params: {analyticsLocation: env0_10}}]);
|
||||
}
|
||||
|
||||
function renderStarIcon({isSelected}) { // fn#68114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3305, owner: _default_68108.renderStarIcon, offset: 0x01c3fb13, size: 158 bytes, params: 2, frame: 16
|
||||
const object2 = {};
|
||||
const binding = env0_5;
|
||||
copyDataProperties(object2, binding.starIcon, undefined);
|
||||
if (isSelected) {
|
||||
copyDataProperties(object2, binding.starIconSelected, undefined);
|
||||
value = environment.__proto__;
|
||||
const StarIcon = (require(8633) /* metro dependency 8633: StarIcon */).StarIcon;
|
||||
return <StarIcon style={object2} />;
|
||||
}
|
||||
copyDataProperties(object2, binding.starIconUnselected, undefined);
|
||||
const StarOutlineIcon = (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon;
|
||||
return <StarOutlineIcon style={object2} />;
|
||||
}
|
||||
|
||||
function _default_68108OnPress() { // fn#68115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3528, owner: _default_68108.onPress, offset: 0x01c3fbb1, size: 194 bytes, params: 1, frame: 19
|
||||
var value;
|
||||
_default_68108CloseActionSheet();
|
||||
const closure = content_68116;
|
||||
const binding = env0_9;
|
||||
const emojiActionCreatorsModule = require(8629) /* metro dependency 8629: EmojiActionCreators */;
|
||||
if (binding) {
|
||||
emojiActionCreatorsModule.unfavoriteEmoji(customEmojiFromJoinedGuild);
|
||||
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
value.open({key: 'EMOJI_UNFAVORITED', icon: function() {
|
||||
return renderStarIcon({isSelected: false});
|
||||
}, content: closure});
|
||||
} else {
|
||||
emojiActionCreatorsModule.favoriteEmoji(customEmojiFromJoinedGuild);
|
||||
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
value.open({key: 'EMOJI_FAVORITED', icon: icon_68118, content: closure});
|
||||
}
|
||||
}
|
||||
|
||||
function _default_68108OnPress_68119() { // fn#68119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4016, owner: _default_68108.onPress, offset: 0x01c3fd3f, size: 107 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[14]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[13]);
|
||||
value = value(dependencyMap[33], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'EmojiOptionsActionSheet', {emojiSrc: emojiNode.src}, 'stack']);
|
||||
}
|
||||
|
||||
function renderNitroWheel() { // fn#68120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4270, owner: _default_68108.renderNitroWheel, offset: 0x01c3fdaa, size: 129 bytes, params: 1, frame: 15
|
||||
var r4;
|
||||
var object2;
|
||||
let value = a0;
|
||||
let shouldTintPurple = (value !== undefined ? value : {shouldTintPurple: false}).shouldTintPurple;
|
||||
shouldTintPurple = !(shouldTintPurple === undefined) && shouldTintPurple;
|
||||
const binding = env0_5;
|
||||
const nitroWheel = binding.nitroWheel;
|
||||
if (shouldTintPurple) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, nitroWheel, undefined);
|
||||
copyDataProperties(object2, binding.nitroWheelPurple, undefined);
|
||||
r4 = object2;
|
||||
} else {
|
||||
r4 = nitroWheel;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
const NitroWheel = (require(1305) /* metro dependency 1305: native */).NitroWheel;
|
||||
return <NitroWheel style={r4} />;
|
||||
}
|
||||
|
||||
function renderPremiumUpsellButton() { // fn#68121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4602, owner: _default_68108.renderPremiumUpsellButton, offset: 0x01c3fe2b, size: 167 bytes, params: 1, frame: 18
|
||||
const typeBinding = type;
|
||||
const EmojiPopoutType = (require(8632) /* metro dependency 8632: getEmojiPopoutMessage */).EmojiPopoutType;
|
||||
const GET_PREMIUM = EmojiPopoutType.GET_PREMIUM;
|
||||
return typeBinding !== GET_PREMIUM ? null : <View style={env0_15}>{((Button) => <Button icon={renderNitroWheel()} text={env0_11.text} variant="active" size="md" grow onPress={onPress_68122} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
|
||||
}
|
||||
|
||||
function _default_68108OnPress_68123() { // fn#68123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:6179, owner: _default_68108.onPress, offset: 0x01c3ffac, size: 65 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const guildUtilsModule = require(8640) /* metro dependency 8640: GuildUtils */;
|
||||
guildUtilsModule.handleJoinGuild(expressionSourceGuild == null ? value : expressionSourceGuild.id);
|
||||
return value;
|
||||
}
|
||||
|
||||
function onPressContent() { // fn#68116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3564, owner: _default_68108.onPress.content, offset: 0x01c3fc73, size: 154 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__.__proto__;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const binding = env1_9;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<Text style={{'marginLeft': 8, 'marginTop': 2}} variant="text-md/bold">
|
||||
{binding ? Reflect.apply(string, intl, [t.in1rga]) : Reflect.apply(string, intl, [t.mE2e8A])}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function onPressIcon_68118() { // fn#68118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:3933, owner: _default_68108.onPress.icon, offset: 0x01c3fd26, size: 25 bytes, params: 1, frame: 11
|
||||
return renderStarIcon({isSelected: true});
|
||||
}
|
||||
|
||||
function renderPremiumUpsellButtonOnPress() { // fn#68122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8816:4772, owner: _default_68108.renderPremiumUpsellButton.onPress, offset: 0x01c3fed2, size: 218 bytes, params: 1, frame: 20
|
||||
var r1;
|
||||
var defaultImport;
|
||||
var defaultImport2;
|
||||
var pushLazy;
|
||||
let value = environment.__proto__;
|
||||
const currentUserBinding = currentUser;
|
||||
const binding = env1_10;
|
||||
const analyticsLocationsBinding = analyticsLocations;
|
||||
const _default_68108CloseActionSheetBinding = _default_68108CloseActionSheet;
|
||||
value = currentUserBinding == null;
|
||||
if (value) {
|
||||
r1 = value;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = importDefault(dependencyMap[9]);
|
||||
value = value.canUseEmojisEverywhere(currentUserBinding);
|
||||
r1 = value;
|
||||
}
|
||||
if (!r1) {
|
||||
_default_68108CloseActionSheetBinding();
|
||||
value = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(dependencyMap[10]);
|
||||
defaultImport.track(AnalyticEvents.PREMIUM_PROMOTION_OPENED, {location_page: binding.page,
|
||||
location_section: binding.section});
|
||||
defaultImport2 = importDefault(dependencyMap[11]);
|
||||
pushLazy = defaultImport2.pushLazy;
|
||||
value = require(dependencyMap[13]);
|
||||
value = value(dependencyMap[12], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport2, [value, {analyticsLocation: binding,
|
||||
analyticsLocations: analyticsLocationsBinding}]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* Metro module 8645; source: modules/messages/native/emoji/EmojiGrid.tsx; dependencies: [31, 27, 33, 4501, 697, 3801, 1423, 6739, 8625, 8646, 8649, 2] */
|
||||
function _fun68150(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:6, offset: 0x01c41574, size: 301 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {'height': 40, 'width': 40};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{gridEmojiFastImage: object,
|
||||
gridEmojiText: {'fontSize': 18, 'lineHeight': 44}, emojiGridRowContainer: {'marginTop': 16,
|
||||
'flexDirection': 'row'}, emojiGridContainer: {'marginTop': 8, 'alignItems': 'center'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/EmojiGrid.tsx');
|
||||
exports.EmojiGrid = EmojiGrid;
|
||||
}
|
||||
|
||||
function Emoji_68151({guildEmoji}) { // fn#68151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:389, offset: 0x01c416a1, size: 207 bytes, params: 2, frame: 21
|
||||
var r6;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const Emoji = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
if (guildEmoji.id == null) {
|
||||
value = importDefault(3801) /* metro dependency 3801: EmojiUtils */;
|
||||
value = value.getURL(guildEmoji.name);
|
||||
r6 = value;
|
||||
} else {
|
||||
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
value = value.getEmojiURL({id: guildEmoji.id, animated: guildEmoji.animated, size: 48});
|
||||
r6 = value;
|
||||
}
|
||||
return (
|
||||
<Emoji
|
||||
src={r6}
|
||||
fastImageStyle={styles.gridEmojiFastImage}
|
||||
textEmojiStyle={styles.gridEmojiText}
|
||||
name={guildEmoji.name}
|
||||
key={guildEmoji.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function EmojiGrid({expressionSourceGuild, doNotDisplayEmojiIds = [], numberToShow, maxPerRow}) { // fn#68152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:721, offset: 0x01c41770, size: 310 bytes, params: 2, frame: 20
|
||||
numberToShow = numberToShow === undefined ? 10 : numberToShow;
|
||||
maxPerRow = maxPerRow === undefined ? 5 : maxPerRow;
|
||||
const object2 = {};
|
||||
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
|
||||
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
|
||||
copyDataProperties(object2, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
|
||||
undefined);
|
||||
const styles = useStyles();
|
||||
copyDataProperties(object2, styles, undefined);
|
||||
const value8 = (importDefault(8646) /* metro dependency 8646 */)((expressionSourceGuild?.emojis ?? []).slice(0,
|
||||
numberToShow + 1).filter(_fun68153).slice(0, numberToShow), maxPerRow);
|
||||
const emojiGridContainer = object2.emojiGridContainer;
|
||||
const GappedList = (require(8649) /* metro dependency 8649: LayoutUtils */).GappedList;
|
||||
return (
|
||||
<View style={emojiGridContainer}>
|
||||
<GappedList gap={8}>
|
||||
{value8.map(_fun68154)}
|
||||
</GappedList>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun68153({id}) { // fn#68153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:931, offset: 0x01c418a6, size: 30 bytes, params: 2, frame: 11
|
||||
const binding = env0_0;
|
||||
return !binding.includes(id);
|
||||
}
|
||||
|
||||
function _fun68154(a0, a1) { // fn#68154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:1074, offset: 0x01c418c4, size: 115 bytes, params: 3, frame: 19
|
||||
const emojiGridRowContainer = env0_1.emojiGridRowContainer;
|
||||
const GappedList = (require(8649) /* metro dependency 8649: LayoutUtils */).GappedList;
|
||||
return (
|
||||
<View style={emojiGridRowContainer} key={a1}>
|
||||
<GappedList gap={32}>
|
||||
{a0.map(_fun68155)}
|
||||
</GappedList>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun68155(a0) { // fn#68155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8830:1171, offset: 0x01c41937, size: 37 bytes, params: 2, frame: 15
|
||||
return <Emoji_68151 guildEmoji={a0} key={a0.id} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/* Metro module 8637; source: modules/messages/native/emoji/EmojiOptionsActionSheet.tsx; dependencies: [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244, 2] */
|
||||
function _fun68132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8822:6, offset: 0x01c4074e, size: 142 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/EmojiOptionsActionSheet.tsx');
|
||||
exports.default = EmojiOptionsActionSheet;
|
||||
}
|
||||
|
||||
function EmojiOptionsActionSheet({emojiSrc}) { // fn#68133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8822:222, offset: 0x01c407dc, size: 242 bytes, params: 2, frame: 23
|
||||
const value2 = env0_3.useCallback(_fun68134, [emojiSrc]);
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object = {};
|
||||
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
|
||||
object.icon = <LinkIcon />;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cIoudn);
|
||||
object.onPress = value2;
|
||||
return (
|
||||
<ActionSheet>
|
||||
<TableRowGroup hasIcons>
|
||||
<TableRow {...object} />
|
||||
</TableRowGroup>
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 8641; source: modules/messages/native/emoji/ExpressionGuildDetails.tsx; dependencies: [31, 27, 6820, 33, 4501, 697, 6819, 1423, 5475, 4573, 1244, 5278, 8640, 8642, 1305, 2] */
|
||||
function _fun68141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:6, offset: 0x01c40ad1, size: 518 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(6820) /* metro dependency 6820: ExpressionSourceRecord */).ExpressionSourceGuildRecord;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.guildDetailsContainer = {flexDirection: 'column'};
|
||||
object2.guildDetailsContent = {'flexDirection': 'row', 'marginTop': 8, 'alignItems': 'center'};
|
||||
const object4 = {'width': 40, 'height': 40, 'borderRadius': null, 'marginRight': 12};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.guildIcon = object4;
|
||||
object2.guildNameAndOnlineMembers = {flexDirection: 'column'};
|
||||
object2.guildNameWrapper = {'flexDirection': 'row', 'alignItems': 'center', 'marginRight': 32};
|
||||
object2.guildPartnerIcon = {marginRight: 8};
|
||||
object2.guildDescriptionSection = {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 4};
|
||||
const object5 = {'width': 4, 'height': 4, 'borderRadius': null, 'marginRight': 8, 'marginLeft': 8};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object5.backgroundColor = BACKGROUND_MOD_MUTED;
|
||||
object2.dotSeparator = object5;
|
||||
const object8 = {'borderRadius': null, 'borderColor': null, 'borderWidth': 1, 'paddingHorizontal': 4,
|
||||
'paddingBottom': 2};
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object8.borderColor = BORDER_STRONG;
|
||||
object2.joinGuildButton = object8;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
const closure = ExpressionGuildDetails;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/ExpressionGuildDetails.tsx');
|
||||
exports.default = closure;
|
||||
exports.ExpressionGuildDetails = closure;
|
||||
}
|
||||
|
||||
function ExpressionGuildDetails({guild, title, hasJoinedGuild, showingJoinGuildCta}) { // fn#68142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:959, offset: 0x01c40cd7, size: 1149 bytes, params: 2, frame: 39
|
||||
var r7;
|
||||
var r11;
|
||||
var defaultImport;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var jsxRuntimeEnv0_6Binding;
|
||||
var items5;
|
||||
const styles = useStyles();
|
||||
const fromGuildType = ExpressionSourceGuildRecord.createFromGuildType(guild);
|
||||
const isDiscoverable2 = fromGuildType.isDiscoverable();
|
||||
if (isDiscoverable2) {
|
||||
r7 = ((Component) => <Component style={styles.guildIcon} guild={fromGuildType} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
||||
} else if (hasJoinedGuild) {
|
||||
r7 = ((Component) => <Component style={styles.guildIcon} guild={fromGuildType} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XLARGE} animate />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
||||
} else {
|
||||
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
r7 = ((Component) => <Component style={styles.guildIcon} source={defaultImport.getGuildIconSource({id: guild.id,
|
||||
icon: guild.icon, canAnimate: true,
|
||||
size: 32})} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
}
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text variant="eyebrow" color="text-default">{title}</Text>;
|
||||
const GuildBadge = importDefault(8642) /* metro dependency 8642: GuildBadge */;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon.Sizes;
|
||||
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
|
||||
const view = <View style={styles.guildNameWrapper}><GuildBadge guild={guild} style={styles.guildPartnerIcon} size={REFRESH_SMALL_16} disableColor /><Text variant="text-md/bold" color="mobile-text-heading-primary">{guild.name}</Text></View>;
|
||||
if (isDiscoverable2) {
|
||||
if (fromGuildType.presenceCount != null) {
|
||||
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
||||
items5 = [<Text variant="text-xs/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['LC+S+m'],
|
||||
|
||||
|
||||
{membersOnline: fromGuildType.presenceCount})}</Text>];
|
||||
items5[1] = <View style={styles.dotSeparator} />;
|
||||
items5[2] = hasJoinedGuild || showingJoinGuildCta ? <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.inyJqO)}</Text> : ((PressableOpacity) => <PressableOpacity style={styles.joinGuildButton} onPress={onPress_68143}><Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riu2R5)}</Text></PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity);
|
||||
r11 = <>{items5}</>;
|
||||
} else {
|
||||
r11 = <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}</Text>;
|
||||
}
|
||||
} else {
|
||||
r11 = <Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.H29mx4)}</Text>;
|
||||
}
|
||||
return (
|
||||
<View style={styles.guildDetailsContainer}>
|
||||
{text}
|
||||
<View style={styles.guildDetailsContent}>
|
||||
{r7}
|
||||
<View style={styles.guildNameAndOnlineMembers}>
|
||||
{view}
|
||||
<View style={styles.guildDescriptionSection}>
|
||||
{r11}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ExpressionGuildDetailsOnPress() { // fn#68143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8826:2196, owner: ExpressionGuildDetails.onPress, offset: 0x01c41154, size: 50 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(8640) /* metro dependency 8640: GuildUtils */;
|
||||
return value.handleJoinGuild(guild.id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/* Metro module 8623; source: modules/messages/native/emoji/MessageEmojiActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 477, 491, 6275, 683, 8624, 8630, 8631, 2] */
|
||||
function _fun68055(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:6, offset: 0x01c3cfde, size: 278 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = 0;
|
||||
importAll(dependencyMap[value]);
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {};
|
||||
const value3 = 16;
|
||||
object.paddingHorizontal = value3;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object.paddingBottom = platformUtilsModule.isAndroid() ? value3 : value;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{contentWrapper: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/MessageEmojiActionSheet.tsx');
|
||||
exports.default = _default_68060;
|
||||
}
|
||||
|
||||
function MessageStandardEmojiActionSheet({emojiNode}) { // fn#68056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:293, offset: 0x01c3d0f4, size: 173 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const value2 = (require(491) /* metro dependency 491 */).v4();
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
return (
|
||||
<BottomSheet startExpanded onDismiss={onDismiss_68057}>
|
||||
<View style={styles.contentWrapper}>
|
||||
{((Component) => <Component emojiNode={emojiNode} nonce={value2} />)(importDefault(8624) /* metro dependency 8624: StandardEmojiContent */)}
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function MessageCustomEmojiActionSheet({emojiNode}) { // fn#68058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:553, offset: 0x01c3d1df, size: 291 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const value2 = (require(8630) /* metro dependency 8630: useEmojiAndSource */).useEmojiAndSource({emojiId: emojiNode.id});
|
||||
const sourceType = value2.sourceType;
|
||||
const expressionSourceGuild = value2.expressionSourceGuild;
|
||||
const expressionSourceApplication = value2.expressionSourceApplication;
|
||||
const hasJoinedEmojiSourceGuild = value2.hasJoinedEmojiSourceGuild;
|
||||
const emoji = value2.emoji;
|
||||
if (value2.isFetching) {
|
||||
return null;
|
||||
}
|
||||
const value3 = (require(491) /* metro dependency 491 */).v4();
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
return (
|
||||
<BottomSheet startExpanded onDismiss={onDismiss_68059}>
|
||||
<View style={styles.contentWrapper}>
|
||||
{((Component) => <Component emojiNode={emojiNode} sourceType={sourceType} expressionSourceApplication={expressionSourceApplication} expressionSourceGuild={expressionSourceGuild} customEmojiFromJoinedGuild={emoji} hasJoinedEmojiSourceGuild={hasJoinedEmojiSourceGuild} nonce={value3} />)(importDefault(8631) /* metro dependency 8631: CustomEmojiContent */)}
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_68060({emojiNode}) { // fn#68060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:1107, offset: 0x01c3d302, size: 69 bytes, params: 2, frame: 15
|
||||
return 'surrogate' in emojiNode ? <MessageStandardEmojiActionSheet emojiNode={emojiNode} /> : <MessageCustomEmojiActionSheet emojiNode={emojiNode} />;
|
||||
}
|
||||
|
||||
function MessageStandardEmojiActionSheetOnDismiss() { // fn#68057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8808:393, owner: MessageStandardEmojiActionSheet.onDismiss, offset: 0x01c3d1a1, size: 62 bytes, params: 1, frame: 15
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CLOSE_POPOUT = AnalyticEvents.CLOSE_POPOUT;
|
||||
Reflect.apply(track, defaultImport, [CLOSE_POPOUT, {nonce: env0_0}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/* Metro module 8624; source: modules/messages/native/emoji/StandardEmojiContent.tsx; dependencies: [31, 27, 3969, 33, 4501, 697, 8625, 3801, 5475, 4573, 8626, 3797, 8533, 8627, 1244, 7972, 4578, 8629, 2] */
|
||||
function _fun68061(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:6, offset: 0x01c3d347, size: 291 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{emojiSurrogate: {'lineHeight': 48, 'fontSize': 40, 'margin': 8},
|
||||
ctaContainer: {paddingTop: PX_4}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/StandardEmojiContent.tsx');
|
||||
exports.default = _default_68063;
|
||||
}
|
||||
|
||||
function Emoji({surrogate}) { // fn#68062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:294, offset: 0x01c3d46a, size: 256 bytes, params: 2, frame: 21
|
||||
var r4;
|
||||
const object2 = {};
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
copyDataProperties(object2, styles, undefined);
|
||||
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
|
||||
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
|
||||
copyDataProperties(object2, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
|
||||
undefined);
|
||||
const uRL = (importDefault(3801) /* metro dependency 3801: EmojiUtils */).getURL(surrogate);
|
||||
const emojiWrapper = object2.emojiWrapper;
|
||||
if (uRL !== '') {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component style={object2.emojiIcon} resizeMode="contain" source={{uri: uRL}} />)(value);
|
||||
r4 = value;
|
||||
} else {
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
r4 = <Text style={object2.emojiSurrogate} variant="text-md/medium">{surrogate}</Text>;
|
||||
}
|
||||
return (
|
||||
<View style={emojiWrapper}>
|
||||
{r4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_68063({emojiNode, nonce}) { // fn#68063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:608, offset: 0x01c3d56a, size: 695 bytes, params: 2, frame: 32
|
||||
const object2 = {};
|
||||
const styles = useStyles();
|
||||
copyDataProperties(object2, styles, undefined);
|
||||
const useSharedMessageEmojiStylesModule = require(8625) /* metro dependency 8625: useSharedMessageEmojiStyles */;
|
||||
const useSharedMessageEmojiStyles = useSharedMessageEmojiStylesModule.useSharedMessageEmojiStyles;
|
||||
copyDataProperties(object2, Reflect.apply(useSharedMessageEmojiStyles, useSharedMessageEmojiStylesModule, []),
|
||||
undefined);
|
||||
const guildId = SelectedGuildStore.getGuildId();
|
||||
(require(8626) /* metro dependency 8626: useTrackOpenPopout */).useTrackOpenPopout({currentGuildId: guildId,
|
||||
nonce: nonce});
|
||||
const value4 = (require(8533) /* metro dependency 8533: EmojiPickerUtils */).useIsFavoriteEmoji(guildId,
|
||||
env0_3.useMemo(_fun68064, [emojiNode.surrogate]));
|
||||
const value5 = (importDefault(8627) /* metro dependency 8627: useMaybeAddReactionMarketingEasterEggNote */)(emojiNode.content);
|
||||
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
const emojiContainer = object2.emojiContainer;
|
||||
const emoji = <Emoji surrogate={emojiNode.surrogate} />;
|
||||
const emojiDescriptionWrapper = object2.emojiDescriptionWrapper;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text variant="text-md/bold" color="mobile-text-heading-primary">{value5}</Text>;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const items4 = [<View style={emojiContainer}>{emoji}<View style={emojiDescriptionWrapper}>{text}<Text variant="text-sm/medium">{Reflect.apply(string,
|
||||
intl, [t.sXdH8c])}</Text></View></View>];
|
||||
const FormDivider = (require(7972) /* metro dependency 7972: native */).FormDivider;
|
||||
items4[1] = <FormDivider style={object2.divider} />;
|
||||
const ctaContainer = object2.ctaContainer;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
items4[2] = <View style={ctaContainer}><Button text={value4 ? Reflect.apply(string, intl,
|
||||
[t.Ay49KA]) : Reflect.apply(string, intl,
|
||||
[t.nNsr67])} variant={value4 ? 'tertiary' : 'primary'} onPress={onPress_68065} /></View>;
|
||||
return (
|
||||
<>
|
||||
{items4}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun68064() { // fn#68064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:780, offset: 0x01c3d821, size: 51 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(3797) /* metro dependency 3797: UnicodeEmojis */;
|
||||
return value.convertSurrogateToBase(emojiNode.surrogate);
|
||||
}
|
||||
|
||||
function _default_68063OnPress() { // fn#68065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8809:1450, owner: _default_68063.onPress, offset: 0x01c3d854, size: 69 bytes, params: 1, frame: 13
|
||||
const binding = env0_2;
|
||||
const emojiActionCreatorsModule = require(8629) /* metro dependency 8629: EmojiActionCreators */;
|
||||
if (binding) {
|
||||
emojiActionCreatorsModule.unfavoriteEmoji(env0_1);
|
||||
} else {
|
||||
emojiActionCreatorsModule.favoriteEmoji(env0_1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/* Metro module 8625; source: modules/messages/native/emoji/useSharedMessageEmojiStyles.tsx; dependencies: [4501, 697, 2] */
|
||||
function _fun68066(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8810:6, offset: 0x01c3d899, size: 320 bytes, params: 8, frame: 22
|
||||
var object4;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {emojiContainer: {'flexDirection': 'row', 'alignItems': 'center'},
|
||||
emojiDescriptionWrapper: {'flexDirection': 'column', 'flex': 1}, emojiWrapper: {'marginLeft': -8,
|
||||
'marginRight': 8}};
|
||||
const object5 = {'width': 40, 'height': 40, 'marginRight': 12, 'borderRadius': null, 'resizeMode': 'contain'};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object4.emojiIcon = object5;
|
||||
const object6 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginBottom = PX_16;
|
||||
object6.marginLeft = 0;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object6.backgroundColor = BORDER_SUBTLE;
|
||||
object6.height = 0.5;
|
||||
object4.divider = object6;
|
||||
object4.ctaButton = {marginTop: 16};
|
||||
value = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/emoji/useSharedMessageEmojiStyles.tsx');
|
||||
exports.useSharedMessageEmojiStyles = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* Metro module 11343; source: modules/messages/native/getEmbeddedActivityKey.tsx; dependencies: [2] */
|
||||
function _fun86734(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11529:6, offset: 0x01f9e1db, size: 102 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/getEmbeddedActivityKey.tsx');
|
||||
exports.default = function(a0) {
|
||||
return '' + a0.location.id + ':' + a0.applicationId + ':' + a0.launchId;
|
||||
};
|
||||
exports.parseEmbeddedActivityKey = function(a0) {
|
||||
var value = a0.split(':');
|
||||
return value.length < 3 ? null : {channelId: value[0], applicationId: value[1], instanceId: value[2]};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 11379; source: modules/messages/native/handlers/handleMessagesLongPressChannel.tsx; dependencies: [4800, 9862, 2] */
|
||||
function _fun87227(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11565:6, offset: 0x01fb47cd, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesLongPressChannel.tsx');
|
||||
exports.handleMessagesLongPressChannel = handleMessagesLongPressChannel;
|
||||
}
|
||||
|
||||
function handleMessagesLongPressChannel({data}) { // fn#87228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11565:226, offset: 0x01fb4834, size: 137 bytes, params: 2, frame: 18
|
||||
var r6;
|
||||
var value;
|
||||
const guildId = data.guildId;
|
||||
const channelId = data.channelId;
|
||||
const messageId = data.messageId;
|
||||
const originalLink = data.originalLink;
|
||||
if (channelId != null) {
|
||||
if (originalLink != null) {
|
||||
r6 = originalLink;
|
||||
} else {
|
||||
value = require(4800) /* metro dependency 4800: ChannelUtils */;
|
||||
value = value.getChannelPermalink(guildId, channelId, messageId);
|
||||
r6 = value;
|
||||
}
|
||||
if (r6 != null) {
|
||||
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: r6,
|
||||
guildId: guildId,
|
||||
channelId: channelId, messageId: messageId});
|
||||
}
|
||||
} else if (originalLink != null) {
|
||||
if (originalLink != null) {
|
||||
r6 = originalLink;
|
||||
} else {
|
||||
value = require(4800) /* metro dependency 4800: ChannelUtils */;
|
||||
value = value.getChannelPermalink(guildId, channelId, messageId);
|
||||
r6 = value;
|
||||
}
|
||||
if (r6 != null) {
|
||||
(importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */)({urlString: r6,
|
||||
guildId: guildId,
|
||||
channelId: channelId, messageId: messageId});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,15 @@
|
||||
/* Metro module 11395; source: modules/messages/native/handlers/handleMessagesTapGameMention.tsx; dependencies: [9959, 9963, 2] */
|
||||
function _fun87325(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11581:6, offset: 0x01fb8956, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapGameMention.tsx');
|
||||
exports.handleMessagesTapGameMention = function({gameId}) {
|
||||
var defaultImport = importDefault(dependencyMap[0]);
|
||||
var object = {gameId: gameId};
|
||||
object.gameProfileModalChecks = {shouldOpenGameProfile: true, gameId: gameId};
|
||||
object.source = require(dependencyMap[1]).GameProfileSources.GameMention;
|
||||
defaultImport.openGameProfileModal(object);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,468 @@
|
||||
/* Metro module 11348; source: modules/messages/native/handlers/handleMessagesTapImage.tsx; dependencies: [4833, 3793, 1878, 661, 9548, 9877, 679, 9546, 3853, 4633, 9544, 4805, 6647, 2] */
|
||||
function _fun86899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:6, offset: 0x01fa6531, size: 172 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const referencedMessageStore = importDefault(4833) /* metro dependency 4833: ReferencedMessageStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapImage.tsx');
|
||||
exports.handleMessagesTapImage = handleMessagesTapImage;
|
||||
}
|
||||
|
||||
function handleMessagesTapImage({tapImageData, allowWithinModal, message, messageChannel, selectedChannelId, showContextName}) { // fn#86900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:275, offset: 0x01fa65dd, size: 1476 bytes, params: 2, frame: 42
|
||||
var environment;
|
||||
var r17;
|
||||
var r16;
|
||||
var r26;
|
||||
var r23;
|
||||
var components;
|
||||
var r6;
|
||||
var r7;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var markPortalAlive;
|
||||
var moduleValue2;
|
||||
var messageReference;
|
||||
var getMessageByReference;
|
||||
var message2;
|
||||
var property;
|
||||
var length;
|
||||
var moduleValue3;
|
||||
var extractMediaFromAttachment;
|
||||
var guild_id;
|
||||
var url;
|
||||
var moduleValue4;
|
||||
var value6;
|
||||
var value7;
|
||||
var moduleValue5;
|
||||
var flattenSource;
|
||||
var value8;
|
||||
var accessoryType;
|
||||
var mediaViewIndex;
|
||||
var mediaIndex;
|
||||
var value9;
|
||||
var noCarousel;
|
||||
var moduleValue6;
|
||||
var setMediaSourcePortal;
|
||||
var value10;
|
||||
var object;
|
||||
var moduleValue7;
|
||||
var embeds;
|
||||
var find;
|
||||
var value11;
|
||||
var moduleValue8;
|
||||
var extractMediaSourcesFromComponent;
|
||||
var moduleValue9;
|
||||
var asComponentId;
|
||||
var value12;
|
||||
var sources;
|
||||
var initialIndex;
|
||||
var moduleValue10;
|
||||
var moduleValue11;
|
||||
var extractMediaSourcesFromEmbed;
|
||||
var value13;
|
||||
var binding;
|
||||
var moduleValue12;
|
||||
var some;
|
||||
var value14;
|
||||
var moduleValue13;
|
||||
var openMediaModal;
|
||||
var id;
|
||||
var moduleValue14;
|
||||
var computeChannelName;
|
||||
var channelName;
|
||||
var moduleValue15;
|
||||
var getChannelIcon;
|
||||
var value15;
|
||||
var defaultImport;
|
||||
var Error;
|
||||
var concat;
|
||||
const index = tapImageData.index;
|
||||
const type2 = tapImageData.type;
|
||||
const layout = tapImageData.layout;
|
||||
const portal = tapImageData.portal;
|
||||
const embedIndex = tapImageData.embedIndex;
|
||||
const componentId = tapImageData.componentId;
|
||||
const componentMediaIndex = tapImageData.componentMediaIndex;
|
||||
const embedId = tapImageData.embedId;
|
||||
const value = undefined;
|
||||
reducibleJoin2: while (true) {
|
||||
if (portal == null) {
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value2 = environment;
|
||||
moduleValue = require(9548) /* metro dependency 9548: NativePortalView */;
|
||||
markPortalAlive = moduleValue.markPortalAlive;
|
||||
Reflect.apply(markPortalAlive, moduleValue, [portal]);
|
||||
break reducibleJoin2;
|
||||
}
|
||||
if (allowWithinModal !== true) {
|
||||
moduleValue2 = require(9877) /* metro dependency 9877: isAlertOrActionSheetOpen */;
|
||||
reducibleJoin4: while (true) {
|
||||
if (moduleValue2.isAlertOrActionSheetOpen(selectedChannelId)) {
|
||||
return value;
|
||||
}
|
||||
break reducibleJoin4;
|
||||
}
|
||||
}
|
||||
if (type2 !== 'attachment') {
|
||||
reducibleJoin8: while (true) {
|
||||
if (type2 === 'embed') {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
if (type2 === 'sticker') {
|
||||
break reducibleJoin8;
|
||||
}
|
||||
if (type2 !== 'component') {
|
||||
Error = global.Error;
|
||||
concat = global.HermesInternal.concat;
|
||||
throw new Error('Unsupported thumbnail type: ' + type2);
|
||||
}
|
||||
break reducibleJoin8;
|
||||
}
|
||||
}
|
||||
let type = message.type;
|
||||
const THREAD_STARTER_MESSAGE = MessageTypes.THREAD_STARTER_MESSAGE;
|
||||
reducibleJoin11: while (true) {
|
||||
if (type !== THREAD_STARTER_MESSAGE) {
|
||||
r17 = message;
|
||||
break reducibleJoin11;
|
||||
}
|
||||
messageReference = message.messageReference;
|
||||
if (messageReference == null) {
|
||||
r17 = message;
|
||||
break reducibleJoin11;
|
||||
}
|
||||
getMessageByReference = ReferencedMessageStore.getMessageByReference;
|
||||
messageReference = message.messageReference;
|
||||
message2 = Reflect.apply(getMessageByReference, ReferencedMessageStore, [messageReference]).message;
|
||||
if (message2 == null) {
|
||||
r17 = message;
|
||||
break reducibleJoin11;
|
||||
}
|
||||
r17 = message2;
|
||||
break reducibleJoin11;
|
||||
}
|
||||
messageReference = r17.messageReference;
|
||||
reducibleJoin13: while (true) {
|
||||
if (messageReference == null) {
|
||||
type = value;
|
||||
break reducibleJoin13;
|
||||
}
|
||||
type = messageReference.type;
|
||||
break reducibleJoin13;
|
||||
}
|
||||
const MessageReferenceTypes = (require(679) /* metro dependency 679: MessageReferenceTypes */).MessageReferenceTypes;
|
||||
const FORWARD = MessageReferenceTypes.FORWARD;
|
||||
if (type !== FORWARD) {
|
||||
r16 = r17;
|
||||
} else {
|
||||
property = r17.messageSnapshots[0];
|
||||
reducibleJoin16: while (true) {
|
||||
if (property == null) {
|
||||
message = value;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
message = property.message;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
reducibleJoin17: while (true) {
|
||||
if (message == null) {
|
||||
return value;
|
||||
}
|
||||
r16 = message;
|
||||
break reducibleJoin17;
|
||||
}
|
||||
}
|
||||
const value5 = r17.attachments.filter(_fun86901);
|
||||
if (type2 === 'attachment') {
|
||||
length = value5.length;
|
||||
reducibleJoin22: while (true) {
|
||||
if (index < length) {
|
||||
property = value5[index];
|
||||
moduleValue3 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
extractMediaFromAttachment = moduleValue3.extractMediaFromAttachment;
|
||||
guild_id = messageChannel.guild_id;
|
||||
if (Reflect.apply(extractMediaFromAttachment, moduleValue3, [property, r17, index, guild_id]) != null) {
|
||||
break reducibleJoin22;
|
||||
}
|
||||
url = property.url;
|
||||
if (url == null) {
|
||||
break reducibleJoin22;
|
||||
}
|
||||
url = property.url;
|
||||
if (url !== '') {
|
||||
defaultImport = importDefault(3853) /* metro dependency 3853: Linking */;
|
||||
defaultImport.openURL(property.url);
|
||||
return value;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
}
|
||||
let env0_1 = -1;
|
||||
if (type2 === 'embed') {
|
||||
reducibleJoin24: while (true) {
|
||||
if (embedIndex != null) {
|
||||
embeds = r16.embeds;
|
||||
property = embeds[index];
|
||||
env0_1 = embedIndex;
|
||||
moduleValue11 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
extractMediaSourcesFromEmbed = moduleValue11.extractMediaSourcesFromEmbed;
|
||||
guild_id = messageChannel.guild_id;
|
||||
value13 = Reflect.apply(extractMediaSourcesFromEmbed, moduleValue11, [r17, r16, property, index,
|
||||
guild_id]);
|
||||
binding = env0_1;
|
||||
length = value13.length;
|
||||
reducibleJoin51: while (true) {
|
||||
if (binding < length) {
|
||||
moduleValue12 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
setMediaSourcePortal = moduleValue12.setMediaSourcePortal;
|
||||
Reflect.apply(setMediaSourcePortal, moduleValue12, [value13[env0_1], portal]);
|
||||
r6 = value13;
|
||||
break reducibleJoin51;
|
||||
}
|
||||
r6 = value13;
|
||||
break reducibleJoin51;
|
||||
}
|
||||
some = r6.some;
|
||||
value14 = Reflect.apply(some, r6, [_fun86904]);
|
||||
reducibleJoin60: while (true) {
|
||||
if (env0_1 === -1) {
|
||||
break reducibleJoin60;
|
||||
}
|
||||
moduleValue13 = require(9544) /* metro dependency 9544: openMediaModal */;
|
||||
openMediaModal = moduleValue13.openMediaModal;
|
||||
object = {disableDownload: value14, initialSources: r6, initialIndex: env0_1,
|
||||
originViewOrOriginLayout: layout,
|
||||
analyticsSource: 'Channel'};
|
||||
id = messageChannel.id;
|
||||
object.channelId = id;
|
||||
reducibleJoin54: while (true) {
|
||||
if (showContextName) {
|
||||
moduleValue14 = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
computeChannelName = moduleValue14.computeChannelName;
|
||||
channelName = Reflect.apply(computeChannelName, moduleValue14, [messageChannel, UserStore,
|
||||
RelationshipStore,
|
||||
false]);
|
||||
r7 = channelName;
|
||||
break reducibleJoin54;
|
||||
}
|
||||
r7 = value;
|
||||
break reducibleJoin54;
|
||||
}
|
||||
object.contextName = r7;
|
||||
reducibleJoin56: while (true) {
|
||||
if (showContextName) {
|
||||
moduleValue15 = require(6647) /* metro dependency 6647: ChannelUtils */;
|
||||
getChannelIcon = moduleValue15.getChannelIcon;
|
||||
value15 = Reflect.apply(getChannelIcon, moduleValue15, [messageChannel]);
|
||||
r7 = value15;
|
||||
break reducibleJoin56;
|
||||
}
|
||||
r7 = value;
|
||||
break reducibleJoin56;
|
||||
}
|
||||
object.contextIcon = r7;
|
||||
Reflect.apply(openMediaModal, moduleValue13, [object]);
|
||||
break reducibleJoin60;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
break reducibleJoin24;
|
||||
}
|
||||
}
|
||||
if (type2 === 'component') {
|
||||
if (componentId == null) {
|
||||
return null;
|
||||
}
|
||||
reducibleJoin42: while (true) {
|
||||
reducibleJoin41: while (true) {
|
||||
if (embedId == null) {
|
||||
break reducibleJoin41;
|
||||
}
|
||||
if (embedId === '') {
|
||||
break reducibleJoin41;
|
||||
}
|
||||
embeds = r16.embeds;
|
||||
find = embeds.find;
|
||||
value11 = Reflect.apply(find, embeds, [function({id}) {
|
||||
return id === embedId;
|
||||
}]);
|
||||
reducibleJoin40: while (true) {
|
||||
if (value11 == null) {
|
||||
components = value;
|
||||
break reducibleJoin40;
|
||||
}
|
||||
components = value11.components;
|
||||
break reducibleJoin40;
|
||||
}
|
||||
break reducibleJoin42;
|
||||
}
|
||||
components = r16.components;
|
||||
break reducibleJoin42;
|
||||
}
|
||||
reducibleJoin51: while (true) {
|
||||
reducibleJoin47: while (true) {
|
||||
if (components == null) {
|
||||
break reducibleJoin47;
|
||||
}
|
||||
length = components.length;
|
||||
if (length === 0) {
|
||||
break reducibleJoin47;
|
||||
}
|
||||
moduleValue8 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
extractMediaSourcesFromComponent = moduleValue8.extractMediaSourcesFromComponent;
|
||||
guild_id = messageChannel.guild_id;
|
||||
moduleValue9 = require(4633) /* metro dependency 4633: InteractionComponentTypes */;
|
||||
asComponentId = moduleValue9.asComponentId;
|
||||
value12 = Reflect.apply(extractMediaSourcesFromComponent, moduleValue8, [r17, components, guild_id,
|
||||
Reflect.apply(asComponentId, moduleValue9, [componentId]), componentMediaIndex]);
|
||||
if (value12 == null) {
|
||||
return value;
|
||||
}
|
||||
sources = value12.sources;
|
||||
initialIndex = value12.initialIndex;
|
||||
env0_1 = initialIndex;
|
||||
moduleValue10 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
setMediaSourcePortal = moduleValue10.setMediaSourcePortal;
|
||||
Reflect.apply(setMediaSourcePortal, moduleValue10, [sources[env0_1], portal]);
|
||||
r6 = sources;
|
||||
break reducibleJoin51;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
} else {
|
||||
moduleValue4 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
value6 = moduleValue4.extractMediaSourcesFromMessage(r17, r16, messageChannel.guild_id);
|
||||
length = value6.length;
|
||||
value7 = 0;
|
||||
if (value7 < length) {
|
||||
r26 = value7;
|
||||
reducibleLoop26: while (true) {
|
||||
moduleValue5 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
flattenSource = moduleValue5.flattenSource;
|
||||
value8 = Reflect.apply(flattenSource, moduleValue5, [value6[r26]]);
|
||||
if (value8 != null) {
|
||||
accessoryType = value8.accessoryType;
|
||||
reducibleJoin31: while (true) {
|
||||
if (accessoryType !== type2) {
|
||||
break reducibleJoin31;
|
||||
}
|
||||
mediaViewIndex = value8.mediaViewIndex;
|
||||
reducibleJoin30: while (true) {
|
||||
if (mediaViewIndex != null) {
|
||||
r23 = mediaViewIndex;
|
||||
break reducibleJoin30;
|
||||
}
|
||||
mediaIndex = value8.mediaIndex;
|
||||
r23 = mediaIndex;
|
||||
break reducibleJoin30;
|
||||
}
|
||||
if (r23 === index) {
|
||||
noCarousel = value8.noCarousel;
|
||||
if (noCarousel) {
|
||||
property = value6[r26];
|
||||
object = [property];
|
||||
env0_1 = value7;
|
||||
moduleValue7 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
setMediaSourcePortal = moduleValue7.setMediaSourcePortal;
|
||||
Reflect.apply(setMediaSourcePortal, moduleValue7, [object[value7], portal]);
|
||||
r6 = object;
|
||||
} else {
|
||||
env0_1 = r26;
|
||||
moduleValue6 = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
setMediaSourcePortal = moduleValue6.setMediaSourcePortal;
|
||||
Reflect.apply(setMediaSourcePortal, moduleValue6, [value6[r26], portal]);
|
||||
value10 = value6.filter(_fun86903);
|
||||
r6 = value10;
|
||||
}
|
||||
break reducibleLoop26;
|
||||
}
|
||||
break reducibleJoin31;
|
||||
}
|
||||
}
|
||||
value9 = typeof r26 === 'bigint' ? r26 + 1n : +r26 + 1;
|
||||
length = value6.length;
|
||||
if (value9 < length) {
|
||||
r26 = value9;
|
||||
continue reducibleLoop26;
|
||||
}
|
||||
r6 = value6;
|
||||
break reducibleLoop26;
|
||||
}
|
||||
} else {
|
||||
r6 = value6;
|
||||
}
|
||||
}
|
||||
reducibleJoin60: while (true) {
|
||||
if (env0_1 === -1) {
|
||||
break reducibleJoin60;
|
||||
}
|
||||
moduleValue13 = require(9544) /* metro dependency 9544: openMediaModal */;
|
||||
openMediaModal = moduleValue13.openMediaModal;
|
||||
object = {disableDownload: r6.some(_fun86904), initialSources: r6, initialIndex: env0_1,
|
||||
originViewOrOriginLayout: layout, analyticsSource: 'Channel'};
|
||||
id = messageChannel.id;
|
||||
object.channelId = id;
|
||||
reducibleJoin54: while (true) {
|
||||
if (showContextName) {
|
||||
moduleValue14 = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
computeChannelName = moduleValue14.computeChannelName;
|
||||
channelName = Reflect.apply(computeChannelName, moduleValue14, [messageChannel, UserStore,
|
||||
RelationshipStore,
|
||||
false]);
|
||||
r7 = channelName;
|
||||
break reducibleJoin54;
|
||||
}
|
||||
r7 = value;
|
||||
break reducibleJoin54;
|
||||
}
|
||||
object.contextName = r7;
|
||||
reducibleJoin56: while (true) {
|
||||
if (showContextName) {
|
||||
moduleValue15 = require(6647) /* metro dependency 6647: ChannelUtils */;
|
||||
getChannelIcon = moduleValue15.getChannelIcon;
|
||||
value15 = Reflect.apply(getChannelIcon, moduleValue15, [messageChannel]);
|
||||
r7 = value15;
|
||||
break reducibleJoin56;
|
||||
}
|
||||
r7 = value;
|
||||
break reducibleJoin56;
|
||||
}
|
||||
object.contextIcon = r7;
|
||||
Reflect.apply(openMediaModal, moduleValue13, [object]);
|
||||
break reducibleJoin60;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun86901(a0) { // fn#86901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:1051, offset: 0x01fa6ba1, size: 44 bytes, params: 2, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
return !value.isThumbnailAttachment(a0);
|
||||
}
|
||||
|
||||
function _fun86903(a0, a1) { // fn#86903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:2104, offset: 0x01fa6bcd, size: 96 bytes, params: 3, frame: 12
|
||||
var binding;
|
||||
let value = environment.__proto__;
|
||||
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
value = value.flattenSource(a0);
|
||||
const r0 = value != null && !value.noCarousel;
|
||||
if (!r0 && env0_1 >= a1) {
|
||||
binding = env0_1;
|
||||
env0_1 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun86904(a0) { // fn#86904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11534:2216, offset: 0x01fa6c2d, size: 59 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = require(9546) /* metro dependency 9546: MediaSourceUtil */;
|
||||
value = value.flattenSource(a0, true);
|
||||
return value != null && value.disableDownload;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,716 @@
|
||||
/* Metro module 9874; source: modules/messages/native/handlers/handleMessagesTapLink.tsx; dependencies: [7861, 4234, 8183, 9865, 1885, 1379, 4097, 1878, 661, 1483, 1386, 9696, 5079, 1243, 9875, 4093, 4116, 9876, 8872, 9877, 8743, 4080, 9300, 1962, 4796, 8913, 4008, 9879, 9899, 7067, 6789, 8447, 1583, 9900, 4634, 1230, 8235, 9903, 9926, 2] */
|
||||
function _fun77455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10060:6, offset: 0x01dfc94b, size: 405 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = handleMessagesTapURLLink;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(7861) /* metro dependency 7861: ApplicationCommandIndexStore */).getSection;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const guildAutomodMessageStore = importDefault(8183) /* metro dependency 8183: GuildAutomodMessageStore */;
|
||||
const summaryStore = importDefault(9865) /* metro dependency 9865: SummaryStore */;
|
||||
const userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
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_11 = constantsModule.AnalyticsLocations;
|
||||
const env0_12 = constantsModule.LinkingTypes;
|
||||
const env0_13 = constantsModule.Routes;
|
||||
const env0_14 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).AppLauncherRouteName;
|
||||
const env0_15 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
|
||||
const env0_16 = (require(9696) /* metro dependency 9696: ChannelDetailsConstants */).ChannelDetailsNavigatorScreens;
|
||||
const env0_17 = (require(5079) /* metro dependency 5079: PushNotificationConstants */).NotificationTypes;
|
||||
const env0_18 = (require(1243) /* metro dependency 1243: ThreadConstants */).OpenThreadAnalyticsLocations;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/handlers/handleMessagesTapLink.tsx');
|
||||
exports.handleMessagesTapURLLink = closure;
|
||||
exports.handleMessagesTapLink = handleMessagesTapLink;
|
||||
}
|
||||
|
||||
function handleMessagesTapURLLink(a0, a1) { // fn#77456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10060:420, offset: 0x01dfcae0, size: 393 bytes, params: 3, frame: 19
|
||||
var r1;
|
||||
var r2;
|
||||
var r6;
|
||||
var node;
|
||||
var moduleValue;
|
||||
var payload;
|
||||
var value3;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
var handleClick;
|
||||
var object2;
|
||||
var value6;
|
||||
var moduleValue4;
|
||||
let url = a0.url;
|
||||
let value = url != null;
|
||||
let r0 = value && a0.url !== '';
|
||||
if (r0) {
|
||||
url = a0.url;
|
||||
node = a0.node;
|
||||
value = false;
|
||||
if (node == null) {
|
||||
r2 = value;
|
||||
} else {
|
||||
moduleValue = require(9875) /* metro dependency 9875: MarkupReactLinkUtils */;
|
||||
if (moduleValue.isLinkTrusted(node)) {
|
||||
payload = (importDefault(4093) /* metro dependency 4093: parseURL */)(url).payload;
|
||||
if (payload.type !== LinkingTypes.INVITE) {
|
||||
r2 = value;
|
||||
} else if (payload.inviteCode == null) {
|
||||
r2 = value;
|
||||
} else {
|
||||
value = InviteStore.getInvite(payload.inviteCode);
|
||||
value3 = value == null;
|
||||
if (value3) {
|
||||
r1 = value3;
|
||||
} else {
|
||||
moduleValue2 = require(4116) /* metro dependency 4116: InviteTypeUtils */;
|
||||
r1 = !moduleValue2.isGuildScheduledEventInviteEmbed(value);
|
||||
}
|
||||
if (!r1) {
|
||||
(importDefault(9876) /* metro dependency 9876: handleAcceptEventInstantInvite */)(value);
|
||||
value = 0;
|
||||
r1 = value;
|
||||
}
|
||||
value = !r1;
|
||||
r2 = value;
|
||||
}
|
||||
} else {
|
||||
r2 = value;
|
||||
}
|
||||
}
|
||||
value = true;
|
||||
if (r2) {
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue3 = require(8872) /* metro dependency 8872: MaskedLinkUtils */;
|
||||
handleClick = moduleValue3.handleClick;
|
||||
object2 = {};
|
||||
object2.href = a0.url;
|
||||
value6 = a0.node != null;
|
||||
if (value6) {
|
||||
moduleValue4 = require(9875) /* metro dependency 9875: MarkupReactLinkUtils */;
|
||||
r6 = moduleValue4.isLinkTrusted(a0.node);
|
||||
} else {
|
||||
r6 = value6;
|
||||
}
|
||||
object2.trusted = r6;
|
||||
object2.messageId = a0.messageId;
|
||||
object2.channelId = a1;
|
||||
Reflect.apply(handleClick, moduleValue3, [object2]);
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function handleMessagesTapLink({allowWithinModal, chatInputRef, handleTransitionToThread, message, messageChannel, selectedChannelId, tapLinkData}) { // fn#77457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10060:1089, offset: 0x01dfcc69, size: 2644 bytes, params: 2, frame: 31
|
||||
var id;
|
||||
var r4;
|
||||
var r12;
|
||||
var guild_id;
|
||||
var r7;
|
||||
var author;
|
||||
var r6;
|
||||
var value;
|
||||
var handleMessagesTapURLLinkBinding;
|
||||
var value2;
|
||||
var action;
|
||||
var current;
|
||||
var insertText;
|
||||
var text;
|
||||
var addSpace;
|
||||
var getChannel;
|
||||
var value3;
|
||||
var notificationType;
|
||||
var value4;
|
||||
var defaultImport;
|
||||
var openLazy;
|
||||
var object2;
|
||||
var MESSAGE_EMBED;
|
||||
var moduleValue2;
|
||||
var openGuildHighlightNotificationForPush;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
var transitionTo;
|
||||
var CHANNEL;
|
||||
var guildId;
|
||||
var trackRoleSubscriptionPurchaseMessageTierClick;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
const KeyboardTypes = require(dependencyMap[32]).KeyboardTypes;
|
||||
var value9;
|
||||
var value11;
|
||||
var moduleValue5;
|
||||
var defaultImport2;
|
||||
var moduleValue6;
|
||||
var userRecord;
|
||||
var applicationId;
|
||||
var value12;
|
||||
var getSectionBinding;
|
||||
var sectionBinding;
|
||||
var descriptor;
|
||||
var value14;
|
||||
var value16;
|
||||
var getMessage;
|
||||
var value18;
|
||||
var removeAutomodMessageNotice;
|
||||
var rootNavigationRef;
|
||||
var stream;
|
||||
var defaultImport3;
|
||||
var messageReference;
|
||||
var defaultImport4;
|
||||
const data = tapLinkData.data;
|
||||
if (allowWithinModal === true) {
|
||||
handleMessagesTapURLLinkBinding = handleMessagesTapURLLink;
|
||||
value2 = undefined;
|
||||
id = messageChannel == null ? value2 : messageChannel.id;
|
||||
if (handleMessagesTapURLLinkBinding(data, id)) {
|
||||
return undefined;
|
||||
}
|
||||
action = data.action;
|
||||
if (action == null) {
|
||||
return undefined;
|
||||
}
|
||||
action = data.action;
|
||||
if (action === 'bindUserMenu') {
|
||||
importDefault(dependencyMap[20])({userId: data.userId, channelId: data.messageChannelId,
|
||||
messageId: data.messageId});
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindGuildMenu') {
|
||||
messageReference = data.messageReference;
|
||||
if (messageReference == null) {
|
||||
return value2;
|
||||
}
|
||||
messageReference = data.messageReference;
|
||||
guild_id = messageReference.guild_id;
|
||||
if (guild_id == null) {
|
||||
return value2;
|
||||
}
|
||||
defaultImport4 = importDefault(dependencyMap[21]);
|
||||
openLazy = defaultImport4.openLazy;
|
||||
value = require(dependencyMap[23]);
|
||||
value = value(dependencyMap[22], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport4, [value, 'GuildProfileActionSheet:' + guild_id,
|
||||
{guildId: guild_id}]);
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindJoinStream') {
|
||||
stream = data.stream;
|
||||
if (stream == null) {
|
||||
return value2;
|
||||
}
|
||||
defaultImport3 = importDefault(dependencyMap[24]);
|
||||
defaultImport3.selectVoiceChannel(stream.channelId);
|
||||
require(dependencyMap[25]).watchStreamAndTransitionToStream(stream);
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindOpenPins') {
|
||||
rootNavigationRef = require(dependencyMap[26]).getRootNavigationRef();
|
||||
if (rootNavigationRef == null) {
|
||||
return value2;
|
||||
}
|
||||
if (rootNavigationRef.isReady()) {
|
||||
rootNavigationRef.navigate('sidebar', {initialRouteName: ChannelDetailsNavigatorScreens.PINNED_MESSAGES,
|
||||
channelId: data.messageChannelId, source: 'pinned-message-system-message'});
|
||||
return undefined;
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
if (action === 'bindOpenGdmCustomizeActionSheet') {
|
||||
importDefault(dependencyMap[27])({channelId: data.messageChannelId});
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindDismissMessage') {
|
||||
getMessage = GuildAutomodMessageStore.getMessage;
|
||||
message = data.message;
|
||||
value18 = Reflect.apply(getMessage, GuildAutomodMessageStore, [message == null ? value2 : message.id]);
|
||||
if (value18 == null) {
|
||||
value = importDefault(dependencyMap[29]);
|
||||
value.dismissAutomatedMessage(data.message);
|
||||
} else if (value18.isBlockedEdit) {
|
||||
value = require(dependencyMap[28]);
|
||||
removeAutomodMessageNotice = value.removeAutomodMessageNotice;
|
||||
message = data.message;
|
||||
Reflect.apply(removeAutomodMessageNotice, value, [message == null ? value2 : message.id]);
|
||||
} else {
|
||||
value = importDefault(dependencyMap[29]);
|
||||
value.dismissAutomatedMessage(data.message);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindTapUsername') {
|
||||
value = importDefault(dependencyMap[20]);
|
||||
object2 = {};
|
||||
object2.userId = data.userId;
|
||||
object2.channelId = data.messageChannelId;
|
||||
object2.messageId = data.messageId;
|
||||
object2.sourceAnalyticsLocations = [importDefault(dependencyMap[30]).USERNAME];
|
||||
value(object2);
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindTapCommandName') {
|
||||
if ((message == null ? value2 : message.interaction) == null) {
|
||||
return value2;
|
||||
}
|
||||
if (messageChannel == null) {
|
||||
return value2;
|
||||
}
|
||||
value11 = UserStore.getUser(data.userId);
|
||||
if (value11 == null) {
|
||||
return value2;
|
||||
}
|
||||
moduleValue5 = require(dependencyMap[31]);
|
||||
if (moduleValue5.isPrimaryEntryPointCommandMessage(message)) {
|
||||
applicationId = message.applicationId;
|
||||
if (applicationId == null) {
|
||||
return value2;
|
||||
}
|
||||
value12 = ChannelStore.getChannel(data.messageChannelId);
|
||||
if (value12 == null) {
|
||||
return value2;
|
||||
}
|
||||
getSectionBinding = getSection;
|
||||
applicationId = message.applicationId;
|
||||
sectionBinding = getSectionBinding({channel: value12, type: 'channel'}, applicationId);
|
||||
descriptor = sectionBinding.descriptor;
|
||||
if ((descriptor == null ? value2 : descriptor.application) != null) {
|
||||
value16 = chatInputRef == null;
|
||||
if (value16) {
|
||||
r4 = value16;
|
||||
r6 = value2;
|
||||
} else {
|
||||
current = chatInputRef.current;
|
||||
r4 = current == null;
|
||||
r6 = current;
|
||||
}
|
||||
if (!r4) {
|
||||
r6.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
|
||||
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
|
||||
application: sectionBinding.descriptor.application,
|
||||
installOnDemand: !sectionBinding.isGuildInstalled && !sectionBinding.isUserInstalled}});
|
||||
}
|
||||
} else {
|
||||
value14 = chatInputRef == null;
|
||||
if (value14) {
|
||||
r4 = value14;
|
||||
r7 = value2;
|
||||
} else {
|
||||
current = chatInputRef.current;
|
||||
r4 = current == null;
|
||||
r7 = current;
|
||||
}
|
||||
if (!r4) {
|
||||
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
|
||||
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
|
||||
applicationId: message.applicationId, installOnDemand: true}});
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
author = message == null ? value2 : message.author;
|
||||
if (author != null) {
|
||||
defaultImport2 = importDefault(dependencyMap[33]);
|
||||
object2 = {};
|
||||
moduleValue6 = require(dependencyMap[34]);
|
||||
object2.author = moduleValue6.getUserAuthor(message.interaction.user, messageChannel);
|
||||
object2.channelId = data.messageChannelId;
|
||||
object2.chatInputRef = chatInputRef;
|
||||
object2.messageId = data.messageId;
|
||||
object2.user = value11;
|
||||
author = message == null ? value2 : message.author;
|
||||
userRecord = new UserRecord();
|
||||
object2.applicationUser = userRecord;
|
||||
userRecord = messageChannel.getGuildId();
|
||||
object2.guildId = userRecord ?? value2;
|
||||
object2.messageType = data.messageType;
|
||||
defaultImport2(object2);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindTapActivityText') {
|
||||
value6 = ApplicationStore.getApplication(data.applicationUserId);
|
||||
if (value6 == null) {
|
||||
value9 = chatInputRef == null;
|
||||
if (value9) {
|
||||
r4 = value9;
|
||||
r7 = value2;
|
||||
} else {
|
||||
current = chatInputRef.current;
|
||||
r4 = current == null;
|
||||
r7 = current;
|
||||
}
|
||||
if (!r4) {
|
||||
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
|
||||
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW,
|
||||
applicationId: data.applicationUserId,
|
||||
initiallyExpanded: true}});
|
||||
}
|
||||
} else {
|
||||
value7 = chatInputRef == null;
|
||||
if (value7) {
|
||||
r4 = value7;
|
||||
r7 = value2;
|
||||
} else {
|
||||
current = chatInputRef.current;
|
||||
r4 = current == null;
|
||||
r7 = current;
|
||||
}
|
||||
if (!r4) {
|
||||
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
|
||||
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, application: value6,
|
||||
initiallyExpanded: true}});
|
||||
}
|
||||
}
|
||||
} else if (action === 'bindOpenThreadChannel') {
|
||||
value5 = ChannelStore.getChannel(data.threadId);
|
||||
if (value5 != null) {
|
||||
handleTransitionToThread(value5 == null ? value2 : value5.guild_id, value5.id,
|
||||
OpenThreadAnalyticsLocations.EMBED);
|
||||
}
|
||||
} else if (action === 'bindJumpToMessage') {
|
||||
importDefault(dependencyMap[29]).jumpToMessage({channelId: data.targetChannelId,
|
||||
messageId: data.targetMessageId,
|
||||
flash: true, returnMessageId: data.messageId});
|
||||
} else if (action === 'bindOpenRoleSubscriptionOverview') {
|
||||
moduleValue4 = require(dependencyMap[35]);
|
||||
transitionTo = moduleValue4.transitionTo;
|
||||
CHANNEL = Routes.CHANNEL;
|
||||
guildId = data.guildId;
|
||||
Reflect.apply(transitionTo, moduleValue4, [Reflect.apply(CHANNEL, Routes, [guildId,
|
||||
StaticChannelRoute.ROLE_SUBSCRIPTIONS])]);
|
||||
value = require(dependencyMap[36]);
|
||||
trackRoleSubscriptionPurchaseMessageTierClick = value.trackRoleSubscriptionPurchaseMessageTierClick;
|
||||
guildId = data.guildId;
|
||||
Reflect.apply(trackRoleSubscriptionPurchaseMessageTierClick, value, [guildId, data.channelId,
|
||||
data.messageId,
|
||||
data.roleSubscriptionListingId]);
|
||||
} else if (action === 'bindUserSurvey') {
|
||||
getChannel = ChannelStore.getChannel;
|
||||
message = data.message;
|
||||
value3 = Reflect.apply(getChannel, ChannelStore, [message.channel_id]);
|
||||
guild_id = value3 == null ? value2 : value3.guild_id;
|
||||
if (guild_id != null) {
|
||||
notificationType = data.notificationType;
|
||||
if (NotificationTypes.TRENDING_CONTENT_PUSH === notificationType) {
|
||||
moduleValue3 = require(dependencyMap[37]);
|
||||
openGuildHighlightNotificationForPush = moduleValue3.openGuildHighlightNotificationForPush;
|
||||
message = data.message;
|
||||
notificationType = data.notificationType;
|
||||
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
|
||||
value = SummaryStore.selectedSummary(data.message.channel_id);
|
||||
id = value == null ? value2 : value.id;
|
||||
value = 'unknown';
|
||||
Reflect.apply(openGuildHighlightNotificationForPush, moduleValue3, [guild_id, message,
|
||||
notificationType,
|
||||
MESSAGE_EMBED, {summary_id: id ?? value}]);
|
||||
} else if (NotificationTypes.TOP_MESSAGE_PUSH === notificationType) {
|
||||
moduleValue2 = require(dependencyMap[37]);
|
||||
moduleValue2.openGuildHighlightNotificationForPush(guild_id, data.message, data.notificationType,
|
||||
AnalyticsLocations.MESSAGE_EMBED);
|
||||
} else {
|
||||
value4 = require(dependencyMap[23])(dependencyMap[38], dependencyMap.paths);
|
||||
defaultImport = importDefault(dependencyMap[21]);
|
||||
defaultImport.openLazy(value4, 'NotificationSurvey', {location: AnalyticsLocations.MESSAGE_EMBED,
|
||||
messageId: data.message.id,
|
||||
notificationType: data.notificationType ?? NotificationTypes.TOP_MESSAGE_PUSH});
|
||||
}
|
||||
}
|
||||
} else if (action === 'bindInsertText') {
|
||||
value = chatInputRef == null;
|
||||
if (value) {
|
||||
r4 = value;
|
||||
r12 = value2;
|
||||
} else {
|
||||
current = chatInputRef.current;
|
||||
r4 = current == null;
|
||||
r12 = current;
|
||||
}
|
||||
if (!r4) {
|
||||
insertText = r12.insertText;
|
||||
text = data.text;
|
||||
addSpace = data.addSpace;
|
||||
Reflect.apply(insertText, r12, [text, null, addSpace == null || addSpace]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
value = require(dependencyMap[19]);
|
||||
if (value.isAlertOrActionSheetOpen(selectedChannelId)) {
|
||||
return undefined;
|
||||
}
|
||||
handleMessagesTapURLLinkBinding = handleMessagesTapURLLink;
|
||||
value2 = undefined;
|
||||
id = messageChannel == null ? value2 : messageChannel.id;
|
||||
if (handleMessagesTapURLLinkBinding(data, id)) {
|
||||
return undefined;
|
||||
}
|
||||
action = data.action;
|
||||
if (action == null) {
|
||||
return undefined;
|
||||
}
|
||||
action = data.action;
|
||||
if (action === 'bindUserMenu') {
|
||||
importDefault(dependencyMap[20])({userId: data.userId, channelId: data.messageChannelId,
|
||||
messageId: data.messageId});
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindGuildMenu') {
|
||||
messageReference = data.messageReference;
|
||||
if (messageReference == null) {
|
||||
return value2;
|
||||
}
|
||||
messageReference = data.messageReference;
|
||||
guild_id = messageReference.guild_id;
|
||||
if (guild_id == null) {
|
||||
return value2;
|
||||
}
|
||||
defaultImport4 = importDefault(dependencyMap[21]);
|
||||
openLazy = defaultImport4.openLazy;
|
||||
value = require(dependencyMap[23]);
|
||||
value = value(dependencyMap[22], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport4, [value, 'GuildProfileActionSheet:' + guild_id,
|
||||
{guildId: guild_id}]);
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindJoinStream') {
|
||||
stream = data.stream;
|
||||
if (stream == null) {
|
||||
return value2;
|
||||
}
|
||||
defaultImport3 = importDefault(dependencyMap[24]);
|
||||
defaultImport3.selectVoiceChannel(stream.channelId);
|
||||
require(dependencyMap[25]).watchStreamAndTransitionToStream(stream);
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindOpenPins') {
|
||||
rootNavigationRef = require(dependencyMap[26]).getRootNavigationRef();
|
||||
if (rootNavigationRef == null) {
|
||||
return value2;
|
||||
}
|
||||
if (rootNavigationRef.isReady()) {
|
||||
rootNavigationRef.navigate('sidebar', {initialRouteName: ChannelDetailsNavigatorScreens.PINNED_MESSAGES,
|
||||
channelId: data.messageChannelId, source: 'pinned-message-system-message'});
|
||||
return undefined;
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
if (action === 'bindOpenGdmCustomizeActionSheet') {
|
||||
importDefault(dependencyMap[27])({channelId: data.messageChannelId});
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindDismissMessage') {
|
||||
getMessage = GuildAutomodMessageStore.getMessage;
|
||||
message = data.message;
|
||||
value18 = Reflect.apply(getMessage, GuildAutomodMessageStore, [message == null ? value2 : message.id]);
|
||||
if (value18 == null) {
|
||||
value = importDefault(dependencyMap[29]);
|
||||
value.dismissAutomatedMessage(data.message);
|
||||
} else if (value18.isBlockedEdit) {
|
||||
value = require(dependencyMap[28]);
|
||||
removeAutomodMessageNotice = value.removeAutomodMessageNotice;
|
||||
message = data.message;
|
||||
Reflect.apply(removeAutomodMessageNotice, value, [message == null ? value2 : message.id]);
|
||||
} else {
|
||||
value = importDefault(dependencyMap[29]);
|
||||
value.dismissAutomatedMessage(data.message);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindTapUsername') {
|
||||
value = importDefault(dependencyMap[20]);
|
||||
object2 = {};
|
||||
object2.userId = data.userId;
|
||||
object2.channelId = data.messageChannelId;
|
||||
object2.messageId = data.messageId;
|
||||
object2.sourceAnalyticsLocations = [importDefault(dependencyMap[30]).USERNAME];
|
||||
value(object2);
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindTapCommandName') {
|
||||
if ((message == null ? value2 : message.interaction) == null) {
|
||||
return value2;
|
||||
}
|
||||
if (messageChannel == null) {
|
||||
return value2;
|
||||
}
|
||||
value11 = UserStore.getUser(data.userId);
|
||||
if (value11 == null) {
|
||||
return value2;
|
||||
}
|
||||
moduleValue5 = require(dependencyMap[31]);
|
||||
if (moduleValue5.isPrimaryEntryPointCommandMessage(message)) {
|
||||
applicationId = message.applicationId;
|
||||
if (applicationId == null) {
|
||||
return value2;
|
||||
}
|
||||
value12 = ChannelStore.getChannel(data.messageChannelId);
|
||||
if (value12 == null) {
|
||||
return value2;
|
||||
}
|
||||
getSectionBinding = getSection;
|
||||
applicationId = message.applicationId;
|
||||
sectionBinding = getSectionBinding({channel: value12, type: 'channel'}, applicationId);
|
||||
descriptor = sectionBinding.descriptor;
|
||||
if ((descriptor == null ? value2 : descriptor.application) != null) {
|
||||
value16 = chatInputRef == null;
|
||||
if (value16) {
|
||||
r4 = value16;
|
||||
r6 = value2;
|
||||
} else {
|
||||
current = chatInputRef.current;
|
||||
r4 = current == null;
|
||||
r6 = current;
|
||||
}
|
||||
if (!r4) {
|
||||
r6.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
|
||||
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
|
||||
application: sectionBinding.descriptor.application,
|
||||
installOnDemand: !sectionBinding.isGuildInstalled && !sectionBinding.isUserInstalled}});
|
||||
}
|
||||
} else {
|
||||
value14 = chatInputRef == null;
|
||||
if (value14) {
|
||||
r4 = value14;
|
||||
r7 = value2;
|
||||
} else {
|
||||
current = chatInputRef.current;
|
||||
r4 = current == null;
|
||||
r7 = current;
|
||||
}
|
||||
if (!r4) {
|
||||
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
|
||||
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, initiallyExpanded: true,
|
||||
applicationId: message.applicationId, installOnDemand: true}});
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
author = message == null ? value2 : message.author;
|
||||
if (author != null) {
|
||||
defaultImport2 = importDefault(dependencyMap[33]);
|
||||
object2 = {};
|
||||
moduleValue6 = require(dependencyMap[34]);
|
||||
object2.author = moduleValue6.getUserAuthor(message.interaction.user, messageChannel);
|
||||
object2.channelId = data.messageChannelId;
|
||||
object2.chatInputRef = chatInputRef;
|
||||
object2.messageId = data.messageId;
|
||||
object2.user = value11;
|
||||
author = message == null ? value2 : message.author;
|
||||
userRecord = new UserRecord();
|
||||
object2.applicationUser = userRecord;
|
||||
userRecord = messageChannel.getGuildId();
|
||||
object2.guildId = userRecord ?? value2;
|
||||
object2.messageType = data.messageType;
|
||||
defaultImport2(object2);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
if (action === 'bindTapActivityText') {
|
||||
value6 = ApplicationStore.getApplication(data.applicationUserId);
|
||||
if (value6 == null) {
|
||||
value9 = chatInputRef == null;
|
||||
if (value9) {
|
||||
r4 = value9;
|
||||
r7 = value2;
|
||||
} else {
|
||||
current = chatInputRef.current;
|
||||
r4 = current == null;
|
||||
r7 = current;
|
||||
}
|
||||
if (!r4) {
|
||||
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
|
||||
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW,
|
||||
applicationId: data.applicationUserId,
|
||||
initiallyExpanded: true}});
|
||||
}
|
||||
} else {
|
||||
value7 = chatInputRef == null;
|
||||
if (value7) {
|
||||
r4 = value7;
|
||||
r7 = value2;
|
||||
} else {
|
||||
current = chatInputRef.current;
|
||||
r4 = current == null;
|
||||
r7 = current;
|
||||
}
|
||||
if (!r4) {
|
||||
r7.openCustomKeyboard({type: KeyboardTypes.APP_LAUNCHER,
|
||||
context: {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, application: value6,
|
||||
initiallyExpanded: true}});
|
||||
}
|
||||
}
|
||||
} else if (action === 'bindOpenThreadChannel') {
|
||||
value5 = ChannelStore.getChannel(data.threadId);
|
||||
if (value5 != null) {
|
||||
handleTransitionToThread(value5 == null ? value2 : value5.guild_id, value5.id,
|
||||
OpenThreadAnalyticsLocations.EMBED);
|
||||
}
|
||||
} else if (action === 'bindJumpToMessage') {
|
||||
importDefault(dependencyMap[29]).jumpToMessage({channelId: data.targetChannelId,
|
||||
messageId: data.targetMessageId,
|
||||
flash: true, returnMessageId: data.messageId});
|
||||
} else if (action === 'bindOpenRoleSubscriptionOverview') {
|
||||
moduleValue4 = require(dependencyMap[35]);
|
||||
transitionTo = moduleValue4.transitionTo;
|
||||
CHANNEL = Routes.CHANNEL;
|
||||
guildId = data.guildId;
|
||||
Reflect.apply(transitionTo, moduleValue4, [Reflect.apply(CHANNEL, Routes, [guildId,
|
||||
StaticChannelRoute.ROLE_SUBSCRIPTIONS])]);
|
||||
value = require(dependencyMap[36]);
|
||||
trackRoleSubscriptionPurchaseMessageTierClick = value.trackRoleSubscriptionPurchaseMessageTierClick;
|
||||
guildId = data.guildId;
|
||||
Reflect.apply(trackRoleSubscriptionPurchaseMessageTierClick, value, [guildId, data.channelId,
|
||||
data.messageId,
|
||||
data.roleSubscriptionListingId]);
|
||||
} else if (action === 'bindUserSurvey') {
|
||||
getChannel = ChannelStore.getChannel;
|
||||
message = data.message;
|
||||
value3 = Reflect.apply(getChannel, ChannelStore, [message.channel_id]);
|
||||
guild_id = value3 == null ? value2 : value3.guild_id;
|
||||
if (guild_id != null) {
|
||||
notificationType = data.notificationType;
|
||||
if (NotificationTypes.TRENDING_CONTENT_PUSH === notificationType) {
|
||||
moduleValue3 = require(dependencyMap[37]);
|
||||
openGuildHighlightNotificationForPush = moduleValue3.openGuildHighlightNotificationForPush;
|
||||
message = data.message;
|
||||
notificationType = data.notificationType;
|
||||
MESSAGE_EMBED = AnalyticsLocations.MESSAGE_EMBED;
|
||||
value = SummaryStore.selectedSummary(data.message.channel_id);
|
||||
id = value == null ? value2 : value.id;
|
||||
value = 'unknown';
|
||||
Reflect.apply(openGuildHighlightNotificationForPush, moduleValue3, [guild_id, message,
|
||||
notificationType,
|
||||
MESSAGE_EMBED, {summary_id: id ?? value}]);
|
||||
} else if (NotificationTypes.TOP_MESSAGE_PUSH === notificationType) {
|
||||
moduleValue2 = require(dependencyMap[37]);
|
||||
moduleValue2.openGuildHighlightNotificationForPush(guild_id, data.message, data.notificationType,
|
||||
AnalyticsLocations.MESSAGE_EMBED);
|
||||
} else {
|
||||
value4 = require(dependencyMap[23])(dependencyMap[38], dependencyMap.paths);
|
||||
defaultImport = importDefault(dependencyMap[21]);
|
||||
defaultImport.openLazy(value4, 'NotificationSurvey', {location: AnalyticsLocations.MESSAGE_EMBED,
|
||||
messageId: data.message.id,
|
||||
notificationType: data.notificationType ?? NotificationTypes.TOP_MESSAGE_PUSH});
|
||||
}
|
||||
}
|
||||
} else if (action === 'bindInsertText') {
|
||||
value = chatInputRef == null;
|
||||
if (value) {
|
||||
r4 = value;
|
||||
r12 = value2;
|
||||
} else {
|
||||
current = chatInputRef.current;
|
||||
r4 = current == null;
|
||||
r12 = current;
|
||||
}
|
||||
if (!r4) {
|
||||
insertText = r12.insertText;
|
||||
text = data.text;
|
||||
addSpace = data.addSpace;
|
||||
Reflect.apply(insertText, r12, [text, null, addSpace == null || addSpace]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/* Metro module 11344; source: modules/messages/native/hooks/useChannelLoading.tsx; dependencies: [57, 31, 11345, 9835, 4595, 2] */
|
||||
function _fun86737(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:6, offset: 0x01f9e2c4, size: 137 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/hooks/useChannelLoading.tsx');
|
||||
exports.default = useChannelLoading;
|
||||
}
|
||||
|
||||
function useChannelLoading({channelId, jumpTargetId, oldestUnreadMessageId, shouldJumpToOriginalPost}) { // fn#86738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:211, offset: 0x01f9e34d, size: 150 bytes, params: 2, frame: 16
|
||||
const property = shouldJumpToOriginalPost(env0_4.useState(_fun86739), 1)[0];
|
||||
const closure = startOrCancelLatestMessagesLoad;
|
||||
(importDefault(4595) /* metro dependency 4595: useMountEffect */)(function() {
|
||||
startOrCancelLatestMessagesLoad(false);
|
||||
return _fun86742;
|
||||
});
|
||||
return {channelLatestMessageLoadingStatsManager: property, startOrCancelLatestMessagesLoad: closure};
|
||||
}
|
||||
|
||||
function _fun86739() { // fn#86739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:337, offset: 0x01f9e3e3, size: 51 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(11345) /* metro dependency 11345: ChannelLatestMessageLoadingStatsManager */;
|
||||
const value2 = Object.create(value.prototype, {constructor: {value: value}});
|
||||
value = new value('Messages');
|
||||
return value instanceof Object ? value : value2;
|
||||
}
|
||||
|
||||
function startOrCancelLatestMessagesLoad(a0) { // fn#86740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:412, owner: useChannelLoading.startOrCancelLatestMessagesLoad, offset: 0x01f9e416, size: 95 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(9835) /* metro dependency 9835: MessagesUtils */;
|
||||
const startOrCancelChannelLatestMessagesLoad = value.startOrCancelChannelLatestMessagesLoad;
|
||||
const object2 = {};
|
||||
object2.jumpTargetId = jumpTargetId;
|
||||
object2.oldestUnreadMessageId = oldestUnreadMessageId;
|
||||
object2.shouldJumpToOriginalPost = shouldJumpToOriginalPost(a0);
|
||||
object2.channelId = channelId;
|
||||
object2.tracker = env0_4;
|
||||
Reflect.apply(startOrCancelChannelLatestMessagesLoad, value, [object2]);
|
||||
}
|
||||
|
||||
function _fun86741() { // fn#86741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:574, offset: 0x01f9e475, size: 27 bytes, params: 1, frame: 11
|
||||
startOrCancelLatestMessagesLoad(false);
|
||||
return _fun86742;
|
||||
}
|
||||
|
||||
function _fun86742() { // fn#86742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11530:615, offset: 0x01f9e490, size: 21 bytes, params: 1, frame: 9
|
||||
env1_4.cancel();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,721 @@
|
||||
/* Metro module 11517; source: modules/messages/native/hooks/useRowManager.tsx; dependencies: [14, 11518, 4044, 9850, 477, 9849, 2] */
|
||||
function _fun88173(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:6, offset: 0x01fd7640, size: 125 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_88176 = 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});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/hooks/useRowManager.tsx');
|
||||
exports.default = useRowManager;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_88174(a0, a1) { // fn#88174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:46, offset: 0x01fd76bd, 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 _fun88175;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_88176(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_88176(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_88176(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun88175;
|
||||
}
|
||||
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 useRowManager({chatManager, rowGenerator, animatingStickerMessageIdRef, canAddNewReactions, channel, messages, isMessagesReady, uploads, roleStyle, oldestUnreadMessageId, replyingMessageId, inlineAttachmentMedia, inlineEmbedMedia, renderEmbeds, renderReactions, animateEmoji, gifAutoPlay, timestampHourCycle, currentUserId, renderCommunicationDisabled, selectedSummary, enableSwipeActions, isResourceChannel, shouldObscureSpoiler, shouldDisableInteractiveComponents, unloadableContentEntryMessageIds, containerWidth, chatRef, loadedRef, animatedRef, hasMoreMessagesAfterForLastUpdateRef, updateNativeRows, isLoadingAtTop, channelLatestMessageLoadingStatsManager, channelId, isMessagesCached, chatUpdatesQueue, shouldJumpToOriginalPost, findMessageIndex, scrollToTopMessage, useReducedMotion}) { // fn#88177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:1099, offset: 0x01fd7831, size: 483 bytes, params: 2, frame: 5
|
||||
return {createRows: createRows, updateRows: updateRows_88184, scrollToMessageId: scrollToMessageId,
|
||||
maybeRescrollToMessageId: function(a0) {
|
||||
var value = a1;
|
||||
var value2 = a2;
|
||||
var value3 = a3;
|
||||
var env0_0 = a0;
|
||||
var env0_1 = value !== undefined ? value : false;
|
||||
var env0_2 = value2 !== undefined ? value2 : require(dependencyMap[2]).JumpTypes.INSTANT;
|
||||
var env0_3 = value3 !== undefined ? value3 : false;
|
||||
if (a0 != null) {
|
||||
global.setTimeout(_fun88181, 50);
|
||||
}
|
||||
}};
|
||||
}
|
||||
|
||||
function createRows({forceRender, updateMessageIds, ignoreEmbedDescriptionCache}) { // fn#88178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:1958, owner: useRowManager.createRows, offset: 0x01fd7a14, size: 125 bytes, params: 2, frame: 13
|
||||
var environment;
|
||||
var r0;
|
||||
var value;
|
||||
if (channel != null) {
|
||||
if (messages != null) {
|
||||
if (isMessagesReady) {
|
||||
value = environment.__proto__;
|
||||
value = (importDefault(14) /* metro dependency 14: TTITracker */).firstRowGenerator.measure(_fun88179);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useRowManagerMaybeRescrollToMessageId(a0) { // fn#88180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:2858, owner: useRowManager.maybeRescrollToMessageId, offset: 0x01fd7c2e, size: 115 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
var INSTANT;
|
||||
let value = a1;
|
||||
const value2 = a2;
|
||||
const value3 = a3;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = value !== undefined ? value : false;
|
||||
if (value2 === undefined) {
|
||||
value = environment.__proto__;
|
||||
INSTANT = (require(4044) /* metro dependency 4044: Client */).JumpTypes.INSTANT;
|
||||
}
|
||||
const env0_3 = value3 !== undefined ? value3 : false;
|
||||
if (a0 != null) {
|
||||
global.setTimeout(_fun88181, 50);
|
||||
}
|
||||
}
|
||||
|
||||
function scrollToMessageId({scrollToMessageId, jumpTargetId, jumpType, scrollPosition, minimizeScrolling, isRescrolling, hasJumpedToOriginalPost}) { // fn#88182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:3259, owner: useRowManager.scrollToMessageId, offset: 0x01fd7d96, size: 440 bytes, params: 2, frame: 25
|
||||
const JumpTypes = (require(4044) /* metro dependency 4044: Client */).JumpTypes;
|
||||
var messageIndex;
|
||||
var defaultImport;
|
||||
jumpTargetId = jumpTargetId === undefined ? null : jumpTargetId;
|
||||
const r10 = jumpType !== undefined ? jumpType : JumpTypes.ANIMATED;
|
||||
const r7 = scrollPosition !== undefined ? scrollPosition : (require(9850) /* metro dependency 9850: NativeChatUtils */).ChatScrollPosition.TOP;
|
||||
minimizeScrolling = !(minimizeScrolling === undefined) && minimizeScrolling;
|
||||
isRescrolling = !(isRescrolling === undefined) && isRescrolling;
|
||||
hasJumpedToOriginalPost = !(hasJumpedToOriginalPost === undefined) && hasJumpedToOriginalPost;
|
||||
const r3 = useReducedMotion || r10 === JumpTypes.INSTANT;
|
||||
const value4 = !r3;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
if (isRescrolling) {
|
||||
messageIndex = findMessageIndex(scrollToMessageId);
|
||||
if (messageIndex != null) {
|
||||
if (minimizeScrolling) {
|
||||
global.setTimeout(_fun88183, 5);
|
||||
} else {
|
||||
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport.scrollTo(chatRef.current, messageIndex, {animated: value4,
|
||||
highlight: jumpTargetId === scrollToMessageId, position: r7});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
maybeRescrollToMessageId_88180(scrollToMessageId, true, r3 ? JumpTypes.INSTANT : JumpTypes.ANIMATED,
|
||||
hasJumpedToOriginalPost);
|
||||
}
|
||||
} else {
|
||||
messageIndex = findMessageIndex(scrollToMessageId);
|
||||
if (messageIndex != null) {
|
||||
if (minimizeScrolling) {
|
||||
global.setTimeout(_fun88183, 5);
|
||||
} else {
|
||||
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport.scrollTo(chatRef.current, messageIndex, {animated: value4,
|
||||
highlight: jumpTargetId === scrollToMessageId, position: r7});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function useRowManagerUpdateRows() { // fn#88184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:3820, owner: useRowManager.updateRows, offset: 0x01fd7fa5, size: 953 bytes, params: 1, frame: 30
|
||||
var environment;
|
||||
var MIDDLE;
|
||||
var r10;
|
||||
var object2;
|
||||
var createRowsBinding;
|
||||
var rows;
|
||||
var chatUpdatesQueueBinding;
|
||||
var value4;
|
||||
var defaultImport;
|
||||
var messageIndex;
|
||||
var value5;
|
||||
var defaultImport2;
|
||||
var value6;
|
||||
var defaultImport3;
|
||||
var current6;
|
||||
var value8;
|
||||
var updateNativeRowsBinding;
|
||||
const value = a0;
|
||||
const value2 = undefined;
|
||||
let r1 = value !== value2 ? value : {};
|
||||
let forceRender = r1.forceRender;
|
||||
forceRender = !(forceRender === value2) && forceRender;
|
||||
const forceReload = r1.forceReload;
|
||||
const updateMessageIds = r1.updateMessageIds;
|
||||
const r9 = updateMessageIds !== value2 ? updateMessageIds : new global.Set();
|
||||
const scrollToMessageId3 = r1.scrollToMessageId;
|
||||
const scrollToMessageId2 = scrollToMessageId3 !== value2 ? scrollToMessageId3 : null;
|
||||
let jumpTargetId = r1.jumpTargetId;
|
||||
jumpTargetId = jumpTargetId === value2 ? null : jumpTargetId;
|
||||
const jumpType = r1.jumpType;
|
||||
const r19 = jumpType !== value2 ? jumpType : (require(4044) /* metro dependency 4044: Client */).JumpTypes.ANIMATED;
|
||||
let focusTargetId = r1.focusTargetId;
|
||||
focusTargetId = focusTargetId === value2 ? null : focusTargetId;
|
||||
let ignoreEmbedDescriptionCache = r1.ignoreEmbedDescriptionCache;
|
||||
ignoreEmbedDescriptionCache = !(ignoreEmbedDescriptionCache === value2) && ignoreEmbedDescriptionCache;
|
||||
let messagesNewlyLoaded = r1.messagesNewlyLoaded;
|
||||
messagesNewlyLoaded = !(messagesNewlyLoaded === value2) && messagesNewlyLoaded;
|
||||
let shouldInitialScroll = r1.shouldInitialScroll;
|
||||
shouldInitialScroll = !(shouldInitialScroll === value2) && shouldInitialScroll;
|
||||
let minimizeScrolling = r1.minimizeScrolling;
|
||||
minimizeScrolling = !(minimizeScrolling === value2) && minimizeScrolling;
|
||||
let isRescrolling = r1.isRescrolling;
|
||||
isRescrolling = !(isRescrolling === value2) && isRescrolling;
|
||||
const overrideScrollJumpType = r1.overrideScrollJumpType;
|
||||
let isAnimated = r1.isAnimated;
|
||||
isAnimated = isAnimated === value2 || isAnimated;
|
||||
let hasJumpedToOriginalPost = r1.hasJumpedToOriginalPost;
|
||||
hasJumpedToOriginalPost = !(hasJumpedToOriginalPost === value2) && hasJumpedToOriginalPost;
|
||||
let current = chatRef.current;
|
||||
if (current != null) {
|
||||
createRowsBinding = createRows;
|
||||
object2 = {forceRender: forceRender, updateMessageIds: r9,
|
||||
ignoreEmbedDescriptionCache: ignoreEmbedDescriptionCache};
|
||||
rows = createRowsBinding(object2);
|
||||
current = loadedRef.current;
|
||||
MIDDLE = selectedSummary != null ? selectedSummary.startId !== scrollToMessageId2 ? value2 : (require(9850) /* metro dependency 9850: NativeChatUtils */).ChatScrollPosition.MIDDLE : value2;
|
||||
if (rows == null) {
|
||||
if (loadedRef.current) {
|
||||
chatUpdatesQueueBinding = chatUpdatesQueue;
|
||||
if (chatUpdatesQueueBinding.hasUpdates()) {
|
||||
chatUpdatesQueue.tryFlush();
|
||||
} else if (loadedRef.current) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId,
|
||||
jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else if (rows == null) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId,
|
||||
jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else if (rows.length !== 0) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId,
|
||||
jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else {
|
||||
value4 = environment.__proto__;
|
||||
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport.fadeIn(chatRef.current);
|
||||
}
|
||||
} else if (loadedRef.current) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else if (rows == null) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else if (rows.length !== 0) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else {
|
||||
value4 = environment.__proto__;
|
||||
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport.fadeIn(chatRef.current);
|
||||
}
|
||||
} else if (rows.length > 0) {
|
||||
value6 = environment.__proto__;
|
||||
defaultImport3 = importDefault(9849) /* metro dependency 9849: computeScrollData */;
|
||||
object2 = {};
|
||||
object2.rows = chatManager.getPreviousRows();
|
||||
object2.scrollToMessageId = scrollToMessageId2;
|
||||
object2.jumpTargetId = jumpTargetId;
|
||||
r10 = overrideScrollJumpType ?? messages.jumpType;
|
||||
object2.jumpType = r10;
|
||||
current6 = loadedRef.current;
|
||||
r10 = current6 ? shouldInitialScroll : !current6;
|
||||
object2.shouldInitialScroll = r10;
|
||||
object2.animated = animatedRef.current;
|
||||
object2.scrollPosition = MIDDLE;
|
||||
object2.focusTargetId = focusTargetId;
|
||||
value8 = defaultImport3(object2);
|
||||
loadedRef.current = true;
|
||||
updateNativeRowsBinding = updateNativeRows;
|
||||
object2 = {rows: rows};
|
||||
object2.hasMoreMessagesAfter = messages.hasMoreAfter;
|
||||
object2.isLoadingAtTop = isLoadingAtTop(rows, hasMoreMessagesAfterForLastUpdateRef.current);
|
||||
object2.scrollData = value8;
|
||||
object2.HACK_iOSForceAnimations = messagesNewlyLoaded;
|
||||
object2.forceReload = forceReload;
|
||||
object2.isAnimated = isAnimated;
|
||||
updateNativeRowsBinding(object2);
|
||||
if (!current) {
|
||||
channelLatestMessageLoadingStatsManager.finish({channelId: channelId,
|
||||
areMessagesCached: isMessagesCached});
|
||||
}
|
||||
} else if (loadedRef.current) {
|
||||
chatUpdatesQueueBinding = chatUpdatesQueue;
|
||||
if (chatUpdatesQueueBinding.hasUpdates()) {
|
||||
chatUpdatesQueue.tryFlush();
|
||||
} else if (loadedRef.current) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else if (rows == null) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else if (rows.length !== 0) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else {
|
||||
value4 = environment.__proto__;
|
||||
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport.fadeIn(chatRef.current);
|
||||
}
|
||||
} else if (loadedRef.current) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else if (rows == null) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else if (rows.length !== 0) {
|
||||
if (scrollToMessageId2 == null) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else if (shouldJumpToOriginalPost(hasJumpedToOriginalPost)) {
|
||||
if (focusTargetId != null) {
|
||||
messageIndex = findMessageIndex(focusTargetId);
|
||||
if (messageIndex != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport2 = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport2.focus(chatRef.current, messageIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
scrollToMessageId({scrollToMessageId: scrollToMessageId2, jumpTargetId: jumpTargetId, jumpType: r19,
|
||||
scrollPosition: MIDDLE, minimizeScrolling: minimizeScrolling, isRescrolling: isRescrolling,
|
||||
hasJumpedToOriginalPost: hasJumpedToOriginalPost});
|
||||
}
|
||||
} else {
|
||||
value4 = environment.__proto__;
|
||||
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport.fadeIn(chatRef.current);
|
||||
}
|
||||
r1 = loadedRef.current && loadedRef.current !== current;
|
||||
r1 = r1 && isResourceChannel;
|
||||
if (r1) {
|
||||
global.setTimeout(function() {
|
||||
return scrollToTopMessage();
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun88179() { // fn#88179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:2081, offset: 0x01fd7a91, size: 413 bytes, params: 1, frame: 17
|
||||
var object2;
|
||||
var r2;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
const chatManagerBinding = chatManager;
|
||||
const setup = chatManagerBinding.setup;
|
||||
const messagesBinding = messages;
|
||||
Reflect.apply(setup, chatManagerBinding, [messagesBinding]);
|
||||
rowGenerator.setOptions({inlineAttachmentMedia: inlineAttachmentMedia, inlineEmbedMedia: inlineEmbedMedia,
|
||||
renderEmbeds: renderEmbeds, renderReactions: renderReactions, animateEmoji: animateEmoji,
|
||||
animatingStickerMessageId: animatingStickerMessageIdRef.current, constrainedWidth: containerWidth,
|
||||
gifAutoPlay: gifAutoPlay, timestampHourCycle: timestampHourCycle,
|
||||
renderCommunicationDisabled: renderCommunicationDisabled,
|
||||
ignoreEmbedDescriptionCache: ignoreEmbedDescriptionCache, enableSwipeActions: enableSwipeActions,
|
||||
shouldObscureSpoiler: shouldObscureSpoiler,
|
||||
shouldDisableInteractiveComponents: shouldDisableInteractiveComponents});
|
||||
const _createForOfIteratorHelperLoose_88174Binding = _createForOfIteratorHelperLoose_88174;
|
||||
const defaultImport = importDefault(11518) /* metro dependency 11518: createChannelStream */;
|
||||
object2 = {};
|
||||
object2.channel = channel;
|
||||
object2.messages = messagesBinding;
|
||||
object2.uploads = uploads;
|
||||
object2.oldestUnreadMessageId = oldestUnreadMessageId;
|
||||
object2.replyingMessageId = replyingMessageId;
|
||||
object2.currentUserId = currentUserId;
|
||||
object2.canAddNewReactions = canAddNewReactions();
|
||||
object2.selectedSummary = selectedSummary;
|
||||
object2.chatManager = chatManagerBinding;
|
||||
object2.roleStyle = roleStyle;
|
||||
object2.forceRender = forceRender;
|
||||
object2.updateMessageIds = updateMessageIds;
|
||||
object2.isResourceChannel = isResourceChannel;
|
||||
object2.unloadableContentEntryMessageIds = unloadableContentEntryMessageIds;
|
||||
const value4 = _createForOfIteratorHelperLoose_88174Binding(defaultImport(object2));
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
if (!done) {
|
||||
for (r2 = value5; true; r2 = value8) {
|
||||
value6 = r2.value;
|
||||
value7 = rowGenerator.generate(value6);
|
||||
chatManager.createRow(value7);
|
||||
value8 = value4();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return chatManager.createChangeset();
|
||||
}
|
||||
|
||||
function _fun88181() { // fn#88181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:2924, offset: 0x01fd7ca1, size: 245 bytes, params: 1, frame: 20
|
||||
var r2;
|
||||
var updateRows_88184Binding;
|
||||
var binding;
|
||||
var value4;
|
||||
const JumpTypes = (require(4044) /* metro dependency 4044: Client */).JumpTypes;
|
||||
var value5;
|
||||
var value6;
|
||||
var defaultImport;
|
||||
const messageIndex = findMessageIndex(env0_0);
|
||||
if (messageIndex != null) {
|
||||
if (chatRef.current != null) {
|
||||
if (env0_1) {
|
||||
updateRows_88184Binding = updateRows_88184;
|
||||
binding = env0_0;
|
||||
value4 = environment.__proto__.__proto__;
|
||||
value5 = true;
|
||||
updateRows_88184Binding({scrollToMessageId: binding, jumpTargetId: binding, jumpType: env0_2,
|
||||
focusTargetId: binding, overrideScrollJumpType: JumpTypes.INSTANT, isRescrolling: value5,
|
||||
hasJumpedToOriginalPost: env0_3});
|
||||
r2 = value5;
|
||||
} else {
|
||||
r2 = false;
|
||||
}
|
||||
if (!r2) {
|
||||
value6 = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport.scrollTo(chatRef.current, messageIndex, {animated: env0_2 === JumpTypes.ANIMATED});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun88183() { // fn#88183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11703:3567, offset: 0x01fd7f4e, size: 87 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
value.scrollIntoView(chatRef.current, env0_3, {animated: env0_2, highlight: jumpTargetId === scrollToMessageId});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,414 @@
|
||||
/* Metro module 11346; source: modules/messages/native/hooks/useScrollHandlers.tsx; dependencies: [31, 7729, 3, 4559, 9764, 690, 9850, 9852, 6531, 2] */
|
||||
function _fun86749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:6, offset: 0x01f9e6fc, size: 195 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */;
|
||||
const env0_4 = value.updateIsAtBottom;
|
||||
const env0_5 = value.updateShouldShowJumpToPresentButton;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('useScrollHandlers');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/hooks/useScrollHandlers.tsx');
|
||||
exports.default = useScrollHandlers;
|
||||
}
|
||||
|
||||
function useScrollHandlers({chatRef, chatManager, chatUpdatesQueue, pendingUpdatesQueueRef, animatedRef, fetchMoreBefore, fetchMoreAfter, handleVisibleMessagesChange, applyNativeRowsUpdate, messages, channel, channelId, screenIndex, onScroll, useReducedMotion, isStaff, visibleMessagesWindowHandler}) { // fn#86750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:308, offset: 0x01f9e7bf, size: 445 bytes, params: 2, frame: 21
|
||||
const binding = pendingUpdatesQueueRef;
|
||||
return {hasHandledScrollRef: binding.useRef(false), isAtBottomRef: binding.useRef(false),
|
||||
isNearBottomRef: binding.useRef(false), isNearTopRef: binding.useRef(false),
|
||||
deceleratingRef: binding.useRef(false), draggingRef: binding.useRef(false),
|
||||
firstIgnoredScrollEventTimestampRef: binding.useRef(undefined), loadMoreBefore: function() {
|
||||
animatedRef.current = true;
|
||||
fetchMoreBefore();
|
||||
}, loadMoreAfter: function() {
|
||||
animatedRef.current = true;
|
||||
fetchMoreAfter();
|
||||
}, scrollToTop: scrollToTop_86756, scrollToRelativeOffset: scrollToRelativeOffset_86757,
|
||||
scrollToTopMessage: scrollToTopMessage_86758, updateNativeRows: updateNativeRows,
|
||||
handleScrollCallbacks: handleScrollCallbacks, handleScroll: handleScroll,
|
||||
handleScrollPosition: handleScrollPosition};
|
||||
}
|
||||
|
||||
function handleScrollCallbacks({eventTimestamp, isAtBottom, isNearBottom, isNearTop, dragging, decelerating, isFirstMessageVisible}) { // fn#86753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:837, owner: useScrollHandlers.handleScrollCallbacks, offset: 0x01f9e9b2, size: 436 bytes, params: 2, frame: 26
|
||||
var r10;
|
||||
var r5;
|
||||
var loadingMore;
|
||||
var value3;
|
||||
var isScreenReaderEnabled;
|
||||
var defaultImport;
|
||||
isNearBottom = !(isNearBottom === undefined) && isNearBottom;
|
||||
isNearTop = !(isNearTop === undefined) && isNearTop;
|
||||
dragging = !(dragging === undefined) && dragging;
|
||||
decelerating = !(decelerating === undefined) && decelerating;
|
||||
isFirstMessageVisible = !(isFirstMessageVisible === undefined) && isFirstMessageVisible;
|
||||
if (channel == null) {
|
||||
return false;
|
||||
}
|
||||
if (messages.length !== 0) {
|
||||
value3 = environment.__proto__;
|
||||
isScreenReaderEnabled = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).getIsScreenReaderEnabled();
|
||||
loadingMore = messages.loadingMore;
|
||||
if (loadingMore) {
|
||||
r5 = !loadingMore;
|
||||
} else {
|
||||
r10 = dragging || decelerating;
|
||||
r10 = !r10 ? isScreenReaderEnabled : r10;
|
||||
r5 = r10;
|
||||
}
|
||||
r5 = r5 && pendingUpdatesQueueRef.current.length === 0;
|
||||
if (env0_21.current) {
|
||||
if (env0_20.current) {
|
||||
if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (isNearBottom) {
|
||||
if (messages.hasMoreAfter) {
|
||||
if (r5) {
|
||||
loadMoreAfter_86752();
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (isNearTop) {
|
||||
if (messages.hasMoreBefore) {
|
||||
if (r5) {
|
||||
loadMoreBefore_86751();
|
||||
} else if (env0_20.current) {
|
||||
if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (isNearBottom) {
|
||||
if (messages.hasMoreAfter) {
|
||||
if (r5) {
|
||||
loadMoreAfter_86752();
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (env0_20.current) {
|
||||
if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (isNearBottom) {
|
||||
if (messages.hasMoreAfter) {
|
||||
if (r5) {
|
||||
loadMoreAfter_86752();
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (env0_20.current) {
|
||||
if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (isNearBottom) {
|
||||
if (messages.hasMoreAfter) {
|
||||
if (r5) {
|
||||
loadMoreAfter_86752();
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
onScroll({isFirstMessageVisible: isFirstMessageVisible});
|
||||
chatUpdatesQueue.tryFlush();
|
||||
} else {
|
||||
loadingMore = messages.loadingMore;
|
||||
if (loadingMore) {
|
||||
return false;
|
||||
}
|
||||
isScreenReaderEnabled = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).getIsScreenReaderEnabled();
|
||||
loadingMore = messages.loadingMore;
|
||||
if (loadingMore) {
|
||||
r5 = !loadingMore;
|
||||
} else {
|
||||
r10 = dragging || decelerating;
|
||||
r10 = !r10 ? isScreenReaderEnabled : r10;
|
||||
r5 = r10;
|
||||
}
|
||||
r5 = r5 && pendingUpdatesQueueRef.current.length === 0;
|
||||
if (env0_21.current) {
|
||||
if (env0_20.current) {
|
||||
if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (isNearBottom) {
|
||||
if (messages.hasMoreAfter) {
|
||||
if (r5) {
|
||||
loadMoreAfter_86752();
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (isNearTop) {
|
||||
if (messages.hasMoreBefore) {
|
||||
if (r5) {
|
||||
loadMoreBefore_86751();
|
||||
} else if (env0_20.current) {
|
||||
if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (isNearBottom) {
|
||||
if (messages.hasMoreAfter) {
|
||||
if (r5) {
|
||||
loadMoreAfter_86752();
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (env0_20.current) {
|
||||
if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (isNearBottom) {
|
||||
if (messages.hasMoreAfter) {
|
||||
if (r5) {
|
||||
loadMoreAfter_86752();
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (env0_20.current) {
|
||||
if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (isNearBottom) {
|
||||
if (messages.hasMoreAfter) {
|
||||
if (r5) {
|
||||
loadMoreAfter_86752();
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
} else if (!(env0_19.current === isAtBottom && env0_18.current)) {
|
||||
defaultImport = importDefault(9764) /* metro dependency 9764: DimensionActionCreators */;
|
||||
defaultImport.updateChannelDimensions(channel.id, eventTimestamp, isAtBottom ? 1 : 0, 1, 0);
|
||||
env0_18.current = true;
|
||||
}
|
||||
onScroll({isFirstMessageVisible: isFirstMessageVisible});
|
||||
chatUpdatesQueue.tryFlush();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function handleScroll({eventTimestamp, isAtBottom, isNearBottom, isNearTop, dragging, decelerating, shouldShowJumpToPresent, isFirstMessageVisible}) { // fn#86754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:1361, owner: useScrollHandlers.handleScroll, offset: 0x01f9eb66, size: 249 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
var value;
|
||||
isNearBottom = !(isNearBottom === undefined) && isNearBottom;
|
||||
isNearTop = !(isNearTop === undefined) && isNearTop;
|
||||
dragging = !(dragging === undefined) && dragging;
|
||||
decelerating = !(decelerating === undefined) && decelerating;
|
||||
shouldShowJumpToPresent = !(shouldShowJumpToPresent === undefined) && shouldShowJumpToPresent;
|
||||
isFirstMessageVisible = !(isFirstMessageVisible === undefined) && isFirstMessageVisible;
|
||||
if (handleScrollCallbacks({eventTimestamp: eventTimestamp, isAtBottom: isAtBottom, isNearBottom: isNearBottom,
|
||||
isNearTop: isNearTop, dragging: dragging, decelerating: decelerating,
|
||||
shouldShowJumpToPresent: shouldShowJumpToPresent, isFirstMessageVisible: isFirstMessageVisible})) {
|
||||
env0_19.current = isAtBottom;
|
||||
env0_20.current = isNearBottom;
|
||||
env0_21.current = isNearTop;
|
||||
env0_23.current = dragging;
|
||||
env0_22.current = decelerating;
|
||||
value = environment.__proto__;
|
||||
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
|
||||
value.batchUpdates(function() {
|
||||
updateShouldShowJumpToPresentButton(channelId, screenIndex,
|
||||
shouldShowJumpToPresent || messages.hasMoreAfter);
|
||||
updateIsAtBottom(screenIndex, isAtBottom);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function useScrollHandlersScrollToTop() { // fn#86756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2020, owner: useScrollHandlers.scrollToTop, offset: 0x01f9eca2, size: 70 bytes, params: 1, frame: 16
|
||||
let value = a0;
|
||||
let r4 = !(value !== undefined) || value;
|
||||
value = environment.__proto__;
|
||||
value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
const scrollToTop = value.scrollToTop;
|
||||
const current = chatRef.current;
|
||||
r4 = r4 && !useReducedMotion;
|
||||
Reflect.apply(scrollToTop, value, [current, r4]);
|
||||
}
|
||||
|
||||
function useScrollHandlersScrollToRelativeOffset(a0) { // fn#86757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2090, owner: useScrollHandlers.scrollToRelativeOffset, offset: 0x01f9ece8, size: 74 bytes, params: 2, frame: 17
|
||||
let value = a1;
|
||||
let r5 = !(value !== undefined) || value;
|
||||
value = environment.__proto__;
|
||||
value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
const scrollToRelativeOffset = value.scrollToRelativeOffset;
|
||||
const current = chatRef.current;
|
||||
r5 = r5 && !useReducedMotion;
|
||||
Reflect.apply(scrollToRelativeOffset, value, [current, a0, r5]);
|
||||
}
|
||||
|
||||
function useScrollHandlersScrollToTopMessage() { // fn#86758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2171, owner: useScrollHandlers.scrollToTopMessage, offset: 0x01f9ed32, size: 90 bytes, params: 1, frame: 14
|
||||
var value3;
|
||||
var defaultImport;
|
||||
const previousRows = chatManager.getPreviousRows();
|
||||
if (previousRows.length > 0) {
|
||||
value3 = environment.__proto__;
|
||||
defaultImport = importDefault(9850) /* metro dependency 9850: NativeChatUtils */;
|
||||
defaultImport.scrollTo(chatRef.current, previousRows.length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
function updateNativeRows(a0) { // fn#86759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2271, owner: useScrollHandlers.updateNativeRows, offset: 0x01f9ed8c, size: 101 bytes, params: 2, frame: 12
|
||||
if (chatUpdatesQueue.isBlocking) {
|
||||
chatUpdatesQueue.add(a0);
|
||||
} else if (a0.isLoadingAtTop) {
|
||||
if (env0_22.current) {
|
||||
chatUpdatesQueue.add(a0);
|
||||
} else if (env0_23.current) {
|
||||
chatUpdatesQueue.add(a0);
|
||||
} else {
|
||||
applyNativeRowsUpdate(a0);
|
||||
}
|
||||
} else {
|
||||
applyNativeRowsUpdate(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function useScrollHandlersHandleScrollPosition({timeStamp, nativeEvent}) { // fn#86760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11532:2444, owner: useScrollHandlers.handleScrollPosition, offset: 0x01f9edf1, size: 407 bytes, params: 2, frame: 32
|
||||
var binding;
|
||||
const isAtBottom = nativeEvent.isAtBottom;
|
||||
const isNearBottom = nativeEvent.isNearBottom;
|
||||
const isNearTop = nativeEvent.isNearTop;
|
||||
const dragging = nativeEvent.dragging;
|
||||
const decelerating = nativeEvent.decelerating;
|
||||
const shouldShowJumpToPresent = nativeEvent.shouldShowJumpToPresent;
|
||||
const isFirstMessageVisible = nativeEvent.isFirstMessageVisible;
|
||||
const firstVisibleMessageIndex = nativeEvent.firstVisibleMessageIndex;
|
||||
const firstVisibleMessagePercentVisible = nativeEvent.firstVisibleMessagePercentVisible;
|
||||
const lastVisibleMessageIndex = nativeEvent.lastVisibleMessageIndex;
|
||||
const changesetUpdateId = nativeEvent.changesetUpdateId;
|
||||
const lastVisibleMessagePercentVisible = nativeEvent.lastVisibleMessagePercentVisible;
|
||||
const changesetIdForChat = (require(9852) /* metro dependency 9852: ChatChangesetUpdateTracker */).getChangesetIdForChat(chatRef.current);
|
||||
if (changesetUpdateId !== changesetIdForChat) {
|
||||
if (env0_17.current == null) {
|
||||
env0_17.current = timeStamp;
|
||||
}
|
||||
if (isStaff) {
|
||||
binding = env1_6;
|
||||
binding.log('STAFF-ACK-LOG: Ignoring outdated scroll event.', channelId, changesetUpdateId,
|
||||
changesetIdForChat,
|
||||
timeStamp);
|
||||
}
|
||||
} else {
|
||||
var handleVisibleMessagesChangeBinding = handleVisibleMessagesChange;
|
||||
var object2 = {firstVisibleMessageRowIndex: firstVisibleMessageIndex,
|
||||
lastVisibleMessageRowIndex: lastVisibleMessageIndex,
|
||||
firstVisibleMessagePercentVisible: firstVisibleMessagePercentVisible,
|
||||
lastVisibleMessagePercentVisible: lastVisibleMessagePercentVisible};
|
||||
var QuestsVisibleMessagesChangedSource = (require(6531) /* metro dependency 6531: QuestTypes */).QuestsVisibleMessagesChangedSource;
|
||||
var SCROLL = QuestsVisibleMessagesChangedSource.SCROLL;
|
||||
object2.source = SCROLL;
|
||||
handleVisibleMessagesChangeBinding(object2);
|
||||
var r17 = env0_17.current ?? timeStamp;
|
||||
env0_17.current = undefined;
|
||||
handleScroll({eventTimestamp: r17, isAtBottom: isAtBottom, isNearBottom: isNearBottom, isNearTop: isNearTop,
|
||||
dragging: dragging, decelerating: decelerating, shouldShowJumpToPresent: shouldShowJumpToPresent,
|
||||
isFirstMessageVisible: isFirstMessageVisible});
|
||||
visibleMessagesWindowHandler.handleScrollPosition({rows: chatManager._rows,
|
||||
firstVisibleMessageRowIndex: firstVisibleMessageIndex,
|
||||
lastVisibleMessageRowIndex: lastVisibleMessageIndex});
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,24 @@
|
||||
/* Metro module 11167; source: modules/messages/native/long_press/LongPressMessageChatItemPreview.tsx; dependencies: [33, 4501, 697, 8177, 9773, 2] */
|
||||
function _fun85262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11353:6, offset: 0x01f692d0, size: 222 bytes, params: 8, frame: 22
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
|
||||
let value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_80 = (importDefault(697) /* metro dependency 697: native */).space.PX_80;
|
||||
const env0_3 = Reflect.apply(createStyles, value, [{chatItem: {maxHeight: 2 * PX_80}}]);
|
||||
value = importDefault(8177) /* metro dependency 8177: RowGenerator */;
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/long_press/LongPressMessageChatItemPreview.tsx');
|
||||
exports.default = LongPressMessageChatItemPreview;
|
||||
}
|
||||
|
||||
function LongPressMessageChatItemPreview({message}) { // fn#85263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11353:308, offset: 0x01f693ae, size: 112 bytes, params: 2, frame: 18
|
||||
const styles = useStyles();
|
||||
const ChatItem = importDefault(9773) /* metro dependency 9773: ChatItem */;
|
||||
const defaultImportProps = {rowGenerator: env0_4, message: message, maxHeight: styles.chatItem.maxHeight};
|
||||
const MOBILE_ALERT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ALERT_BACKGROUND_DEFAULT;
|
||||
defaultImportProps.backgroundColor = MOBILE_ALERT_BACKGROUND_DEFAULT;
|
||||
return <ChatItem {...defaultImportProps} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* Metro module 11401; source: modules/messages/native/long_press/showLongPressMessageActionSheet.tsx; dependencies: [4080, 11402, 1962, 2] */
|
||||
function _fun87341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11587:6, offset: 0x01fb9d0f, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/long_press/showLongPressMessageActionSheet.tsx');
|
||||
exports.showLongPressMessageActionSheet = showLongPressMessageActionSheet;
|
||||
}
|
||||
|
||||
function showLongPressMessageActionSheet(a0) { // fn#87342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11587:230, offset: 0x01fb9d76, size: 82 bytes, params: 2, frame: 16
|
||||
const defaultImport = importDefault(dependencyMap[0]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
let value = require(dependencyMap[2]);
|
||||
value = value(dependencyMap[1], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'MessageLongPressActionSheet', a0]);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,24 @@
|
||||
/* Metro module 8191; source: modules/messages/native/renderer/EmbedUtils.tsx; dependencies: [27, 2] */
|
||||
function _fun65695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8376:6, offset: 0x01bda508, size: 187 bytes, params: 8, frame: 20
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(27) /* metro dependency 27 */).Image;
|
||||
Object = global.Object;
|
||||
const freeze = Object.freeze;
|
||||
const Set = global.Set;
|
||||
let set = new Set(['YouTube', 'TikTok']);
|
||||
set = Reflect.apply(freeze, Object, [set]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/EmbedUtils.tsx');
|
||||
exports.getAssetUriForEmbed = function(a0) {
|
||||
return Image.resolveAssetSource(a0).uri;
|
||||
};
|
||||
exports.SUPPORTED_VIDEO_PARTNERS = set;
|
||||
exports.shouldPlayVideoInline = shouldPlayVideoInline;
|
||||
}
|
||||
|
||||
function shouldPlayVideoInline(a0) { // fn#65697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8376:387, offset: 0x01bda5df, size: 38 bytes, params: 2, frame: 13
|
||||
const value = a0;
|
||||
const binding = env0_1;
|
||||
return binding.has(value ?? '');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 8367; source: modules/messages/native/renderer/ExplicitMediaUtils.tsx; dependencies: [661, 1391, 4838, 4841, 4813, 1244, 2] */
|
||||
function _fun66607(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:6, offset: 0x01c0295e, size: 165 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(661) /* metro dependency 661: Constants */).MessageAttachmentFlags;
|
||||
const getContentScanVersionFromMedia = function(a0) {
|
||||
var value = undefined;
|
||||
if (value !== a0.content_scan_version) {
|
||||
return a0.content_scan_version;
|
||||
}
|
||||
return value === a0.contentScanVersion ? value : a0.contentScanVersion;
|
||||
};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/ExplicitMediaUtils.tsx');
|
||||
exports.getAttachmentObscurityProps = getAttachmentObscurityProps;
|
||||
exports.getUnfurledMediaItemObscurityProps = getUnfurledMediaItemObscurityProps;
|
||||
exports.getAttachmentObscurityDefaults = function() {
|
||||
return {'isSpoiler': false, 'spoiler': ''};
|
||||
};
|
||||
}
|
||||
|
||||
function getSpoilerDescriptionForType(a0) { // fn#66608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:311, offset: 0x01c02a03, size: 301 bytes, params: 2, frame: 14
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
if (a0 === 'image') {
|
||||
return intl.string(t.sb2W2J);
|
||||
}
|
||||
if (a0 === 'video') {
|
||||
return intl.string(t.ehBaMc);
|
||||
}
|
||||
if (a0 === 'file') {
|
||||
return intl.string(t['3Gc2XP']);
|
||||
}
|
||||
if (a0 === 'generic') {
|
||||
return intl.string(t.G71b77);
|
||||
}
|
||||
}
|
||||
|
||||
function getAttachmentObscurityProps({attachment, shouldObscureSpoiler, enabledContentHarmTypeFlags, shouldAgeVerify}) { // fn#66610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:714, offset: 0x01c02b5b, size: 528 bytes, params: 2, frame: 26
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const spoiler = attachment.spoiler;
|
||||
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
const hasFlag = flagUtilsModule.hasFlag;
|
||||
const r5 = attachment.flags ?? 0;
|
||||
const IS_SPOILER = MessageAttachmentFlags.IS_SPOILER;
|
||||
const hasFlag2 = Reflect.apply(hasFlag, flagUtilsModule, [r5, IS_SPOILER]);
|
||||
let object2 = {};
|
||||
object2.contentScanVersion = getContentScanVersionFromMedia(attachment) ?? 0;
|
||||
object2.flags = attachment.flags ?? 0;
|
||||
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
||||
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
|
||||
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
|
||||
let Attachment = ObscuredMediaTypes.Attachment;
|
||||
const value4 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: Attachment,
|
||||
media: object2}, enabledContentHarmTypeFlags]);
|
||||
const moduleValue3 = obscuredMediaUtilsModule;
|
||||
const isMediaScanPending = moduleValue3.isMediaScanPending;
|
||||
Attachment = ObscuredMediaTypes.Attachment;
|
||||
const isMediaScanPending2 = Reflect.apply(isMediaScanPending, moduleValue3, [{type: Attachment, media: object2},
|
||||
enabledContentHarmTypeFlags]);
|
||||
const value5 = value4.length > 0;
|
||||
const r2 = value5 && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isVerifiedTeen();
|
||||
object2 = {};
|
||||
object2.isSpoiler = shouldObscureSpoiler && (spoiler || hasFlag2);
|
||||
const value6 = '';
|
||||
object2.spoiler = shouldObscureSpoiler && (spoiler || hasFlag2) ? intl.string(t['F+x38C']).toUpperCase() : value6;
|
||||
object2.obscure = value5;
|
||||
object2.obscureDescription = value5 ? intl.string(t.SpxcUR) : value6;
|
||||
object2.obscureAwaitingScan = isMediaScanPending2;
|
||||
object2.verifyAge = value5 && shouldAgeVerify;
|
||||
object2.obscureHideControls = r2;
|
||||
object2.obscureIsOpaque = value5;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getUnfurledMediaItemObscurityProps({type, mediaItem, isSpoilered, isAuthorBot, shouldObscureSpoiler, enabledContentHarmTypeFlags, shouldAgeVerify}) { // fn#66611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8552:1532, offset: 0x01c02d6b, size: 363 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
var r5;
|
||||
var intl;
|
||||
const obscuredMediaUtilsModule = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
|
||||
const getMediaObscuredReasonFromBitmask = obscuredMediaUtilsModule.getMediaObscuredReasonFromBitmask;
|
||||
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
|
||||
const GenericMedia = ObscuredMediaTypes.GenericMedia;
|
||||
const value2 = Reflect.apply(getMediaObscuredReasonFromBitmask, obscuredMediaUtilsModule, [{type: GenericMedia,
|
||||
media: mediaItem}, enabledContentHarmTypeFlags]);
|
||||
const r3 = !isAuthorBot && obscuredMediaUtilsModule.isMediaScanPending({type: ObscuredMediaTypes.GenericMedia,
|
||||
media: mediaItem}, enabledContentHarmTypeFlags);
|
||||
const r8 = isSpoilered && shouldObscureSpoiler;
|
||||
const value4 = value2.length > 0;
|
||||
const r2 = value4 && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).isVerifiedTeen();
|
||||
object2 = {isSpoiler: r8};
|
||||
object2.spoilerDescription = r8 ? getSpoilerDescriptionForType(type) : null;
|
||||
object2.isObscured = value4;
|
||||
if (value4) {
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SpxcUR);
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
object2.obscureDescription = r5;
|
||||
object2.obscureAwaitingScan = r3;
|
||||
object2.verifyAge = value4 && shouldAgeVerify;
|
||||
object2.obscureHideControls = r2;
|
||||
object2.obscureIsOpaque = value4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,240 @@
|
||||
/* Metro module 8335; source: modules/messages/native/renderer/MarkupParsers.tsx; dependencies: [661, 672, 1393, 6622, 8336, 8349, 2] */
|
||||
function _fun66357(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:6, offset: 0x01bf854f, size: 384 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).MessageTypes;
|
||||
object3 = {'max': Infinity, 'maxAge': null, 'updateAgeOnGet': true};
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const MINUTE = Millis.MINUTE;
|
||||
object3.maxAge = 15 * MINUTE;
|
||||
let value = importDefault(1393) /* metro dependency 1393 */;
|
||||
value = new value(object3);
|
||||
value = importDefault(1393) /* metro dependency 1393 */;
|
||||
value = new value(object3);
|
||||
value = importDefault(1393) /* metro dependency 1393 */;
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, object3, undefined);
|
||||
object4['updateAgeOnGet'] = false;
|
||||
value = new value(object4);
|
||||
value = importDefault(1393) /* metro dependency 1393 */;
|
||||
value = new value(object3);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/MarkupParsers.tsx');
|
||||
exports.parseEmbedTitleMarkup = parseEmbedTitleMarkup;
|
||||
exports.parseEmbedTitleMarkupWithoutLinks = parseEmbedTitleMarkupWithoutLinks;
|
||||
exports.parseEmbedDescriptionMarkup = parseEmbedDescriptionMarkup;
|
||||
exports.parseMessageMarkup = parseMessageMarkup;
|
||||
}
|
||||
|
||||
function parseEmbedTitleMarkup(a0, a1) { // fn#66358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:396, offset: 0x01bf86cf, size: 120 bytes, params: 3, frame: 18
|
||||
var r0;
|
||||
var embedTitleToAST;
|
||||
const value = '' + a0 + '-' + a1;
|
||||
const value3 = env0_4.get(value);
|
||||
if (value3 != null) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
embedTitleToAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseEmbedTitleToAST(a0, true,
|
||||
{channelId: a1});
|
||||
env0_4.set(value, embedTitleToAST);
|
||||
r0 = embedTitleToAST;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function parseEmbedTitleMarkupWithoutLinks(a0, a1) { // fn#66359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:580, offset: 0x01bf8747, size: 129 bytes, params: 3, frame: 19
|
||||
var r0;
|
||||
var embedTitleWithoutLinksToAST;
|
||||
const value = '' + a0 + '-' + a1 + '-nolinks';
|
||||
const value3 = env0_5.get(value);
|
||||
if (value3 != null) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
embedTitleWithoutLinksToAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseEmbedTitleWithoutLinksToAST(a0,
|
||||
|
||||
true, {channelId: a1});
|
||||
env0_5.set(value, embedTitleWithoutLinksToAST);
|
||||
r0 = embedTitleWithoutLinksToAST;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function parseEmbedDescriptionMarkup({description, channelId, isField, ignoreCache, replaceMap, showListsAndHeaders, showMaskedLinks}) { // fn#66360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:790, offset: 0x01bf87c8, size: 247 bytes, params: 2, frame: 27
|
||||
var r2;
|
||||
var r10;
|
||||
var r6;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var replaceAll;
|
||||
var value4;
|
||||
const value = '' + description + '-' + channelId;
|
||||
const value3 = env0_6.get(value);
|
||||
if (value3 != null) {
|
||||
reducibleJoin3: while (true) {
|
||||
if (!ignoreCache) {
|
||||
return value3;
|
||||
}
|
||||
break reducibleJoin3;
|
||||
}
|
||||
}
|
||||
const properties = Object.keys(replaceMap);
|
||||
const properties3 = properties.length;
|
||||
if (properties === undefined) {
|
||||
r6 = description;
|
||||
} else {
|
||||
r2 = description;
|
||||
r10 = 0;
|
||||
reducibleLoop4: while (true) {
|
||||
propertyName = properties[r10];
|
||||
propertyName2 = r10 + 1;
|
||||
if (propertyName === undefined) {
|
||||
r6 = r2;
|
||||
break reducibleLoop4;
|
||||
}
|
||||
replaceAll = r2.replaceAll;
|
||||
value4 = Reflect.apply(replaceAll, r2, [propertyName, replaceMap[propertyName]]);
|
||||
r2 = value4;
|
||||
r10 = propertyName2;
|
||||
continue reducibleLoop4;
|
||||
}
|
||||
}
|
||||
const toAST = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseToAST(r6, true,
|
||||
{'channelId': null, 'allowLinks': true, 'allowEmojiLinks': true, channelId: channelId,
|
||||
allowHeading: !isField && showListsAndHeaders, allowList: showListsAndHeaders,
|
||||
previewLinkTarget: showMaskedLinks});
|
||||
env0_6.set(value, toAST);
|
||||
return toAST;
|
||||
}
|
||||
|
||||
function parseMessageMarkup(a0, a1, a2) { // fn#66361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8520:1199, offset: 0x01bf88bf, size: 418 bytes, params: 4, frame: 27
|
||||
var r8;
|
||||
var r1;
|
||||
var r0;
|
||||
var object4;
|
||||
var moduleValue;
|
||||
var renderMessageMarkupToAST;
|
||||
var object5;
|
||||
var defaultImport;
|
||||
var astParserFor;
|
||||
var moduleValue2;
|
||||
var value6;
|
||||
var content;
|
||||
var object6;
|
||||
const value = a3;
|
||||
const value2 = a4;
|
||||
const value3 = a5;
|
||||
const value4 = a6;
|
||||
let r12 = value !== undefined ? value : false;
|
||||
let r10 = value2 !== undefined ? value2 : false;
|
||||
const r11 = value3 !== undefined ? value3 : false;
|
||||
const r4 = value4 !== undefined ? value4 : false;
|
||||
const value5 = env0_7.get(a0);
|
||||
if (value5 == null) {
|
||||
if (a0.type !== MessageTypes.CHANGELOG) {
|
||||
object4 = {};
|
||||
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
|
||||
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
|
||||
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
|
||||
r8 = r10 || r11;
|
||||
object5.allowHeading = r8;
|
||||
r8 = r10 || r11;
|
||||
object5.allowList = r8;
|
||||
object5.allowLinks = r4;
|
||||
object5.previewLinkTarget = r4;
|
||||
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
|
||||
object4['isInlineReplyPreview'] = r12;
|
||||
env0_7.set(a0, object4);
|
||||
r1 = object4;
|
||||
} else if (a0.changelogId != null) {
|
||||
object4 = {'content': null, 'isInlineReplyPreview': false, 'hasSpoilerEmbeds': false,
|
||||
'hasBailedAst': false};
|
||||
defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
|
||||
astParserFor = defaultImport.astParserFor;
|
||||
moduleValue2 = require(8336) /* metro dependency 8336: ChangeLogStandardTemplate */;
|
||||
value6 = Reflect.apply(astParserFor, defaultImport, [moduleValue2.changelogRules(a0.changelogId, true)]);
|
||||
content = a0.content;
|
||||
object6 = {hideSimpleEmbedContent: a2, formatInline: r12};
|
||||
r12 = r10 || r11;
|
||||
object6.allowHeading = r12;
|
||||
r10 = !r10 ? r11 : r10;
|
||||
object6.allowList = r10;
|
||||
object6.allowLinks = r4;
|
||||
object6.previewLinkTarget = r4;
|
||||
object4.content = value6(content, false, object6);
|
||||
env0_7.set(a0, object4);
|
||||
r1 = object4;
|
||||
} else {
|
||||
object4 = {};
|
||||
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
|
||||
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
|
||||
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
|
||||
r8 = r10 || r11;
|
||||
object5.allowHeading = r8;
|
||||
r8 = r10 || r11;
|
||||
object5.allowList = r8;
|
||||
object5.allowLinks = r4;
|
||||
object5.previewLinkTarget = r4;
|
||||
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
|
||||
object4['isInlineReplyPreview'] = r12;
|
||||
env0_7.set(a0, object4);
|
||||
r1 = object4;
|
||||
}
|
||||
r0 = r1;
|
||||
} else if (value5.isInlineReplyPreview === r12) {
|
||||
r0 = value5;
|
||||
} else {
|
||||
if (a0.type !== MessageTypes.CHANGELOG) {
|
||||
object4 = {};
|
||||
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
|
||||
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
|
||||
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
|
||||
r8 = r10 || r11;
|
||||
object5.allowHeading = r8;
|
||||
r8 = r10 || r11;
|
||||
object5.allowList = r8;
|
||||
object5.allowLinks = r4;
|
||||
object5.previewLinkTarget = r4;
|
||||
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
|
||||
object4['isInlineReplyPreview'] = r12;
|
||||
env0_7.set(a0, object4);
|
||||
r1 = object4;
|
||||
} else if (a0.changelogId != null) {
|
||||
object4 = {'content': null, 'isInlineReplyPreview': false, 'hasSpoilerEmbeds': false,
|
||||
'hasBailedAst': false};
|
||||
defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
|
||||
astParserFor = defaultImport.astParserFor;
|
||||
moduleValue2 = require(8336) /* metro dependency 8336: ChangeLogStandardTemplate */;
|
||||
value6 = Reflect.apply(astParserFor, defaultImport, [moduleValue2.changelogRules(a0.changelogId, true)]);
|
||||
content = a0.content;
|
||||
object6 = {hideSimpleEmbedContent: a2, formatInline: r12};
|
||||
r12 = r10 || r11;
|
||||
object6.allowHeading = r12;
|
||||
r10 = !r10 ? r11 : r10;
|
||||
object6.allowList = r10;
|
||||
object6.allowLinks = r4;
|
||||
object6.previewLinkTarget = r4;
|
||||
object4.content = value6(content, false, object6);
|
||||
env0_7.set(a0, object4);
|
||||
r1 = object4;
|
||||
} else {
|
||||
object4 = {};
|
||||
moduleValue = require(8349) /* metro dependency 8349: renderMessageMarkup */;
|
||||
renderMessageMarkupToAST = moduleValue.renderMessageMarkupToAST;
|
||||
object5 = {contentMessage: a1, hideSimpleEmbedContent: a2, formatInline: r12, allowGameMentions: true};
|
||||
r8 = r10 || r11;
|
||||
object5.allowHeading = r8;
|
||||
r8 = r10 || r11;
|
||||
object5.allowList = r8;
|
||||
object5.allowLinks = r4;
|
||||
object5.previewLinkTarget = r4;
|
||||
copyDataProperties(object4, Reflect.apply(renderMessageMarkupToAST, moduleValue, [a0, object5]), undefined);
|
||||
object4['isInlineReplyPreview'] = r12;
|
||||
env0_7.set(a0, object4);
|
||||
r1 = object4;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* Metro module 8182; source: modules/messages/native/renderer/MessageWithContent.tsx; dependencies: [8183, 8178, 8184, 1244, 8352, 2] */
|
||||
function _fun65624(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8367:6, offset: 0x01bd5821, size: 140 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildAutomodMessageStore = importDefault(8183) /* metro dependency 8183: GuildAutomodMessageStore */;
|
||||
const env0_4 = (require(8178) /* metro dependency 8178: RowGeneratorConstants */).RowType;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/MessageWithContent.tsx');
|
||||
exports.generateMessageRowData = generateMessageRowData;
|
||||
}
|
||||
|
||||
function generateMessageRowData(a0, a1, a2) { // fn#65625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8367:238, offset: 0x01bd58ad, size: 710 bytes, params: 4, frame: 34
|
||||
const changeType = a0.changeType;
|
||||
const message = a0.message;
|
||||
const roleStyle = a0.roleStyle;
|
||||
const isFirst = a0.isFirst;
|
||||
const isEditing = a0.isEditing;
|
||||
const separatorBefore = a0.separatorBefore;
|
||||
const canAddNewReactions = a0.canAddNewReactions;
|
||||
const reactionsTheme = a0.reactionsTheme;
|
||||
const isSystemDM = a0.isSystemDM;
|
||||
const r20 = isSystemDM !== undefined && isSystemDM;
|
||||
const canShowImages = a0.canShowImages;
|
||||
const r21 = canShowImages === undefined || canShowImages;
|
||||
const truncation = a0.truncation;
|
||||
const renderContentOnly = a0.renderContentOnly;
|
||||
const pushFeedbackType = a0.pushFeedbackType;
|
||||
const alwaysShowAddReaction = a0.alwaysShowAddReaction;
|
||||
const r4 = alwaysShowAddReaction !== undefined && alwaysShowAddReaction;
|
||||
const overrideBackgroundHighlight = a0.overrideBackgroundHighlight;
|
||||
const showContentInventoryEntryFallbackEmbed = a0.showContentInventoryEntryFallbackEmbed;
|
||||
const object2 = {};
|
||||
const MESSAGE = RowType.MESSAGE;
|
||||
object2.type = MESSAGE;
|
||||
object2.message = (importDefault(8184) /* metro dependency 8184: createMessageContent */)({options: a1,
|
||||
message: message, roleStyle: roleStyle, isFirst: isFirst, isEditing: isEditing, canShowImages: r21,
|
||||
isSystemDM: r20, isInlineReplyPreview: false, pushFeedbackType: pushFeedbackType,
|
||||
renderContentOnly: renderContentOnly,
|
||||
showContentInventoryEntryFallbackEmbed: showContentInventoryEntryFallbackEmbed});
|
||||
object2.canAddNewReactions = canAddNewReactions;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2.addNewReactionAccessibilityLabel = Reflect.apply(string, intl, [t.lfIHs4]);
|
||||
object2.reactionsTheme = reactionsTheme;
|
||||
object2.highlightLabel = intl.string(t['IOS/dU']);
|
||||
object2.renderContentOnly = renderContentOnly;
|
||||
object2.separatorBefore = separatorBefore;
|
||||
object2.changeType = changeType;
|
||||
object2.truncation = truncation;
|
||||
object2.alwaysShowAddReaction = r4;
|
||||
object2.backgroundHighlight = overrideBackgroundHighlight ?? (importDefault(8352) /* metro dependency 8352: RowGeneratorUtils */).createBackgroundHighlight({message: message,
|
||||
theme: a2, isEditing: isEditing,
|
||||
isAutomodBlockedMessage: GuildAutomodMessageStore.getMessage(message.id) != null});
|
||||
const defaultImport3 = importDefault(8352) /* metro dependency 8352: RowGeneratorUtils */;
|
||||
object2.swipeActions = defaultImport3.createSwipeActions(a1.enableSwipeActions && a0.canReply,
|
||||
a1.enableSwipeActions && a0.canEdit);
|
||||
object2.replyAccessibilityLabel = intl.string(t['5IEsGx']);
|
||||
string = intl.string;
|
||||
const I3ltXO = t.I3ltXO;
|
||||
object2.forwardAccessibilityLabel = Reflect.apply(string, intl, [I3ltXO]);
|
||||
object2.threadAccessibilityLabel = intl.string(t.rBIGBL);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/* Metro module 8179; source: modules/messages/native/renderer/RenderMessageOptionsContext.tsx; dependencies: [2] */
|
||||
function _fun65617(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8364:6, offset: 0x01bd53c7, size: 158 bytes, params: 8, frame: 16
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {USER_SETTING: 0};
|
||||
object2[0] = 'USER_SETTING';
|
||||
object2.FORCE_ENABLE = 1;
|
||||
object2[1] = 'FORCE_ENABLE';
|
||||
object2.FORCE_DISABLE = 2;
|
||||
object2[2] = 'FORCE_DISABLE';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/renderer/RenderMessageOptionsContext.tsx');
|
||||
exports.UserOption = object2;
|
||||
exports.DEFAULT_OPTIONS = {'renderEmbeds': true, 'renderReactions': true, 'inlineEmbedMedia': true,
|
||||
'inlineAttachmentMedia': true, 'animateEmoji': true, 'gifAutoPlay': false, 'timestampHourCycle': 0,
|
||||
'renderCodedLinks': true, 'renderGiftCode': true, 'renderActivityInstanceEmbed': true,
|
||||
'renderActivityInviteEmbed': true, 'renderComponents': true, 'renderThreadEmbeds': true, 'renderReplies': true,
|
||||
'renderCommunicationDisabled': false, 'renderAttachments': true, 'renderExecutedCommands': true,
|
||||
'renderPolls': true, 'renderSharedClientTheme': true, 'renderForumPostActions': true, 'ignoreMentioned': false,
|
||||
'ignoreEmbedDescriptionCache': false, 'forceHideSimpleEmbedContent': false, 'enableSwipeActions': false,
|
||||
'useAlternateEmbedColors': false, 'restrictedPreview': false};
|
||||
}
|
||||
|
||||
Loaded 100 of 16065 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user