Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,49 @@
/* Metro module 8006; source: modules/explicit_media_redaction/ExplicitMediaActionCreators.native.tsx; dependencies: [4822, 4824, 4821, 4496, 1244, 8007, 4080, 8008, 1962, 2] */
function _fun63597(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8184:6, offset: 0x01b871c2, size: 138 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const explicitMediaStore = importDefault(4822) /* metro dependency 4822: ExplicitMediaStore */;
const env0_4 = (require(4824) /* metro dependency 4824: ExplicitMediaRedactionConstants */).EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_ACTION_SHEET_KEY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/ExplicitMediaActionCreators.native.tsx');
exports.handleSenderFalsePositiveFlow = handleSenderFalsePositiveFlow;
}
function handleSenderFalsePositiveFlow(a0, a1) { // fn#63598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8184:307, offset: 0x01b8724c, size: 390 bytes, params: 3, frame: 24
var defaultImport2;
const moduleValue = require(dependencyMap[2]);
const trackMediaRedactionAction = moduleValue.trackMediaRedactionAction;
let object2 = {};
const TrackMediaRedactionActionType = require(dependencyMap[2]).TrackMediaRedactionActionType;
const EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_BUTTON_CLICKED = TrackMediaRedactionActionType.EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_BUTTON_CLICKED;
object2.action = EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_BUTTON_CLICKED;
object2.messageId = a1;
object2.channelId = a0;
Reflect.apply(trackMediaRedactionAction, moduleValue, [object2]);
if (ExplicitMediaStore.canSubmitFpReport(a1)) {
defaultImport2 = importDefault(dependencyMap[6]);
defaultImport2.openLazy(require(dependencyMap[8])(dependencyMap[7], dependencyMap.paths),
EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_ACTION_SHEET_KEY, {channelId: a0, messageId: a1});
} else {
var defaultImport = importDefault(dependencyMap[3]);
var show = defaultImport.show;
object2 = {};
var intl = require(dependencyMap[4]).intl;
var string = intl.string;
var t = require(dependencyMap[4]).t;
object2.title = Reflect.apply(string, intl, [t['iS/eFN']]);
intl = require(dependencyMap[4]).intl;
string = intl.string;
t = require(dependencyMap[4]).t;
var YrjcgR = t.YrjcgR;
object2.body = Reflect.apply(string, intl, [YrjcgR]);
intl = require(dependencyMap[4]).intl;
string = intl.string;
t = require(dependencyMap[4]).t;
var BddRzS = t.BddRzS;
object2.confirmText = Reflect.apply(string, intl, [BddRzS]);
Reflect.apply(show, defaultImport, [object2]);
importDefault(dependencyMap[5]).disableFalsePositiveButton(a0, a1);
}
}
@@ -0,0 +1,17 @@
/* Metro module 8007; source: modules/explicit_media_redaction/ExplicitMediaFalsePositiveActionCreators.tsx; dependencies: [694, 2] */
function _fun63599(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8185:6, offset: 0x01b873d2, size: 110 bytes, params: 8, frame: 17
var object2;
const closure = disableFalsePositiveButton;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {disableFalsePositiveButton: closure};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/ExplicitMediaFalsePositiveActionCreators.tsx');
exports.default = object2;
exports.disableFalsePositiveButton = closure;
}
function disableFalsePositiveButton(a0, a1) { // fn#63600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8185:43, offset: 0x01b87440, size: 62 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MESSAGE_EXPLICIT_CONTENT_FP_SUBMIT',
messageId: a1, channelId: a0});
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,25 @@
/* Metro module 4847; source: modules/explicit_media_redaction/ExplicitMediaManagerUtils.tsx; dependencies: [2] */
function _fun42417(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5025:6, offset: 0x011393ce, size: 94 bytes, params: 8, frame: 16
const hasAttachmentsEmbedsOrComponents = function(a0) {
var r0;
r0 = a0.attachments != null && a0.attachments.length > 0;
r0 = !r0 ? a0.embeds != null && a0.embeds.length > 0 : r0;
r0 = !r0 ? a0.components != null && a0.components.length > 0 : r0;
return r0;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/ExplicitMediaManagerUtils.tsx');
exports.hasAttachmentsEmbedsComponentsOrSnapshots = hasAttachmentsEmbedsComponentsOrSnapshots;
}
function hasAttachmentsEmbedsComponentsOrSnapshots(a0) { // fn#42419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5025:406, offset: 0x01139499, size: 97 bytes, params: 2, frame: 14
if (a0 == null) {
return false;
}
const r5 = 'messageSnapshots' in a0 ? a0.messageSnapshots : a0.message_snapshots;
return hasAttachmentsEmbedsOrComponents(a0) || r5 != null && r5?.some(function(a0) {
return hasAttachmentsEmbedsOrComponents(a0.message);
});
}
@@ -0,0 +1,45 @@
/* Metro module 4846; source: modules/explicit_media_redaction/ExplicitMediaRedactionActionCreators.tsx; dependencies: [661, 507, 2] */
function _fun42411(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5024:6, offset: 0x01139199, size: 148 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/explicit_media_redaction/ExplicitMediaRedactionActionCreators.tsx');
exports.reportFalsePositive = function(a0, a1, a2, a3) {
var HTTP = require(dependencyMap[1]).HTTP;
return HTTP.post({url: Endpoints.EXPLICIT_MEDIA_REPORT_FALSE_POSITIVE, body: {channel_id: a0, message_id: a1,
attachment_ids: a2, embed_ids: a3}, rejectWithError: false});
};
exports.reportFailedSendFalsePositive = function(a0, a1, a2, a3) {
var HTTP = require(dependencyMap[1]).HTTP;
return HTTP.post({url: Endpoints.EXPLICIT_MEDIA_SENDER_REPORT_FALSE_POSITIVE, body: {channel_id: a0,
message_id: a1,
attachment_ids: a2, filenames: a3}, rejectWithError: false});
};
exports.sendMessagesForScanning = function(a0, a1) {
var HTTP = require(dependencyMap[1]).HTTP;
var object = {};
object.url = Endpoints.EXPLICIT_MEDIA_SCAN_MESSAGES(a0);
object.body = {message_ids: a1};
object.rejectWithError = false;
return HTTP.patch(object);
};
exports.sendMultiChannelMessagesForScanning = function(a0) {
var value = a0.map(_fun42416);
var HTTP = require(dependencyMap[1]).HTTP;
return HTTP.patch({url: Endpoints.EXPLICIT_MEDIA_SCAN_MULTI_CHANNEL_MESSAGES, body: {messages: value},
rejectWithError: false});
};
}
function sendMultiChannelMessagesForScanning(a0) { // fn#42415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5024:886, offset: 0x01139354, size: 96 bytes, params: 2, frame: 13
const value = a0.map(function(a0) {
return {channel_id: a0.channel_id, message_id: a0.id};
});
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const patch = HTTP.patch;
const EXPLICIT_MEDIA_SCAN_MULTI_CHANNEL_MESSAGES = Endpoints.EXPLICIT_MEDIA_SCAN_MULTI_CHANNEL_MESSAGES;
return Reflect.apply(patch, HTTP, [{url: EXPLICIT_MEDIA_SCAN_MULTI_CHANNEL_MESSAGES, body: {messages: value},
rejectWithError: false}]);
}
@@ -0,0 +1,18 @@
/* Metro module 4824; source: modules/explicit_media_redaction/ExplicitMediaRedactionConstants.tsx; dependencies: [678, 2] */
function _fun42082(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5002:6, offset: 0x0112fb44, size: 271 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Set = global.Set;
const {IMAGE, VIDEO, GIFV} = (require(678) /* metro dependency 678: MessageEmbedTypes */).MessageEmbedTypes;
const set = new Set([IMAGE, VIDEO, GIFV]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/ExplicitMediaRedactionConstants.tsx');
exports.USER_SETTING_ACTION_SHEET_KEY = 'SensitiveMediaFilterSetting';
exports.EXPLICIT_MEDIA_FALSE_POSITIVE_ACTION_SHEET_KEY = 'ExplicitMediaFalsePositiveActionSheet';
exports.EXPLICIT_MEDIA_LEARN_MORE_ACTION_SHEET_KEY = 'ExplicitMediaLearnMoreActionSheet';
exports.EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_ACTION_SHEET_KEY = 'ExplicitMediaSenderFalsePositiveActionSheet';
exports.EXPLICIT_MEDIA_SETTINGS_ACTION_SHEET_KEY = 'ExplicitMediaSettingsActionSheet';
exports.SUPPORTED_EMBED_TYPES = set;
exports.EXPLICIT_MEDIA_MIN_WIDTH = 146;
exports.EXPLICIT_MEDIA_MIN_HEIGHT = 212;
}
@@ -0,0 +1,15 @@
/* Metro module 4841; source: modules/explicit_media_redaction/ExplicitMediaRedactionModels.tsx; dependencies: [2] */
function _fun42387(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5019:6, offset: 0x0113844b, size: 170 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const object = {Attachment: 0};
object[0] = 'Attachment';
object.Embed = 1;
object[1] = 'Embed';
object.GenericMedia = 2;
object[2] = 'GenericMedia';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/ExplicitMediaRedactionModels.tsx');
exports.ContentHarmTypeChannel = {GUILD: 'guild', FRIEND_DM: 'friend_dm', NON_FRIEND_DM: 'non_friend_dm'};
exports.ObscuredMediaTypes = object;
}
@@ -0,0 +1,427 @@
/* Metro module 4821; source: modules/explicit_media_redaction/ExplicitMediaRedactionUtils.tsx; dependencies: [4649, 1379, 4822, 4824, 661, 1314, 1244, 683, 4825, 4826, 4831, 4832, 3835, 4861, 4813, 4840, 2] */
function _fun42038(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:6, offset: 0x0112e8b9, size: 609 bytes, params: 8, frame: 20
const env0_0 = require;
const timeoutAttachmentsAndEmbedsForMessage = function(a0) {
var object = {};
object.attachments = a0.attachments.map(_fun42040);
object.embeds = a0.embeds.map(_fun42041);
return object;
};
const closure = useShouldAgeVerifyForExplicitMedia;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const explicitMediaStore = importDefault(4822) /* metro dependency 4822: ExplicitMediaStore */;
const explicitMediaRedactionConstantsModule = require(4824) /* metro dependency 4824: ExplicitMediaRedactionConstants */;
const env0_6 = explicitMediaRedactionConstantsModule.EXPLICIT_MEDIA_MIN_HEIGHT;
const env0_7 = explicitMediaRedactionConstantsModule.EXPLICIT_MEDIA_MIN_WIDTH;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/ExplicitMediaRedactionUtils.tsx');
exports.redactionSettingToRenderedString = redactionSettingToRenderedString;
exports.isPendingScanVersion = isPendingScanVersion;
exports.TrackMediaRedactionActionType = {EXPLICIT_MEDIA_LEARN_MORE_VIEWED: 'explicit_media_learn_more_viewed',
EXPLICIT_MEDIA_LEARN_MORE_CLICK_SETTINGS: 'explicit_media_learn_more_click_settings',
EXPLICIT_MEDIA_LEARN_MORE_CLICK_LEARN_MORE: 'explicit_media_learn_more_click_learn_more',
EXPLICIT_MEDIA_LEARN_MORE_CLICK_DISMISS: 'explicit_media_learn_more_click_dismiss',
EXPLICIT_MEDIA_LEARN_MORE_CLICK_FALSE_POSITIVE: 'explicit_media_learn_more_click_false_positive',
EXPLICIT_MEDIA_LEARN_MORE_CLICK_AGE_VERIFY_REVERIFY: 'explicit_media_learn_more_click_age_verify_reverify',
EXPLICIT_MEDIA_LEARN_MORE_CLICK_AGE_VERIFY_LEARN_MORE: 'explicit_media_learn_more_click_age_verify_learn_more',
EXPLICIT_MEDIA_FALSE_POSITIVE_VIEWED: 'explicit_media_false_positive_viewed',
EXPLICIT_MEDIA_FALSE_POSITIVE_CLICK_CONFIRM: 'explicit_media_false_positive_click_confirm',
EXPLICIT_MEDIA_FALSE_POSITIVE_CLICK_CANCEL: 'explicit_media_false_positive_click_cancel',
EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_BUTTON_CLICKED: 'explicit_media_sender_false_positive_button_clicked',
EXPLICIT_MEDIA_FALSE_POSITIVE_CLYDE_MESSAGE_SENT: 'explicit_media_false_positive_clyde_message_sent'};
exports.TrackMediaRedactionContext = {EXPLICIT_MEDIA_OBSCURED_FALSE_POSITIVE_FLOW: 'explicit_media_obscured_false_positive_flow',
EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_FLOW: 'explicit_media_sender_false_positive_flow',
EXPLICIT_MEDIA_MESSAGE_SEND_BLOCKED: 'explicit_media_message_send_blocked',
EXPLICIT_MEDIA_ADD_MEDIA_TO_FORUM_POST_BLOCKED: 'explicit_media_add_media_to_forum_post_blocked'};
exports.trackMediaRedactionAction = trackMediaRedactionAction;
exports.TimeoutCancelSource = {UPDATE: 'update', TIMEOUT: 'timeout'};
exports.trackScanTiming = trackScanTiming;
exports.trackScanningTimedOut = trackScanningTimedOut;
exports.trackExplicitMediaRedactableMessagedLoaded = trackExplicitMediaRedactableMessagedLoaded;
exports.trackRedactableMessageLoaded = trackRedactableMessageLoaded;
exports.trackExplicitMediaScanComplete = trackExplicitMediaScanComplete;
exports.handleExplicitMediaScanTimeoutForMessage = handleExplicitMediaScanTimeoutForMessage;
exports.isObscuredMediaBelowConstraints = function(a0, a1) {
return a0 != null && a1 != null && (a0 <= EXPLICIT_MEDIA_MIN_WIDTH || a1 <= EXPLICIT_MEDIA_MIN_HEIGHT);
};
exports.shouldAgeVerifyForExplicitMedia = shouldAgeVerifyForExplicitMedia;
exports.useShouldAgeVerifyForExplicitMedia = closure;
exports.useShouldAgeVerifyForReason = useShouldAgeVerifyForReason;
exports.trackToggleMediaObscurityV2 = trackToggleMediaObscurityV2;
exports.hasMessageSnapshotsWithAttachmentsOrEmbeds = function({message_snapshots}) {
return message_snapshots?.some(_fun42062);
};
}
function timeoutAttachmentsAndEmbedsForMessage({attachments, embeds}) { // fn#42039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:1822, offset: 0x0112eb1a, size: 61 bytes, params: 2, frame: 14
const object2 = {};
object2.attachments = attachments.map(function(a0) {
a0.content_scan_version = -1;
return a0;
});
object2.embeds = embeds.map(function(a0) {
a0.contentScanVersion = -1;
return a0;
});
return object2;
}
function useShouldAgeVerifyForExplicitMedia() { // fn#42042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:2000, offset: 0x0112eb79, size: 90 bytes, params: 1, frame: 14
var value;
const useIsFeatureAgeGated = (require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */).useIsFeatureAgeGated;
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
const SENSITIVE_CONTENT_SHOW_SETTING = AgeGatedFeature.SENSITIVE_CONTENT_SHOW_SETTING;
value = Reflect.apply(useIsFeatureAgeGated, value, [SENSITIVE_CONTENT_SHOW_SETTING]);
return value && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useShouldShowTiggerPawtect();
}
function redactionSettingToRenderedString(a0) { // fn#42043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:2325, offset: 0x0112ebd3, size: 135 bytes, params: 2, frame: 15
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
const SHOW = ExplicitContentRedaction.SHOW;
if (SHOW === a0) {
return function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['5k5OFp']);
};
}
const BLUR = ExplicitContentRedaction.BLUR;
if (BLUR === a0) {
return function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t.S49Uad);
};
}
const BLOCK = ExplicitContentRedaction.BLOCK;
if (BLOCK === a0) {
return function() {
return require(dependencyMap[6]).intl.string(require(dependencyMap[6]).t['D/157Y']);
};
}
}
function isPendingScanVersion(a0) { // fn#42047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:2685, offset: 0x0112ed14, size: 85 bytes, params: 2, frame: 14
var r1;
var r0;
const value2 = DevSettingsStore.get('explicit_media_redaction_ignore_pending_scan');
if (value2) {
r0 = !value2;
} else {
r1 = a0 !== 0 && a0 !== -1;
r1 = r1 && (a0 == null || a0 !== ExplicitMediaStore.validContentScanVersion);
r0 = r1;
}
return r0;
}
function trackMediaRedactionAction({action, channelId, messageId, context}) { // fn#42048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:2932, offset: 0x0112ed69, size: 175 bytes, params: 2, frame: 21
var channel;
var value3;
var defaultImport;
var track;
var EXPLICIT_MEDIA_ACTION;
var object2;
if (channelId != null) {
if (messageId != null) {
channel = ChannelStore.getChannel(channelId);
value3 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
EXPLICIT_MEDIA_ACTION = AnalyticEvents.EXPLICIT_MEDIA_ACTION;
object2 = {action: action};
object2.guild_id = channel == null ? value3 : channel.guild_id;
object2.channel_id = channelId;
object2.message_id = messageId;
object2.user_is_underage = (require(4825) /* metro dependency 4825: SelfModUtils */).isCurrentUserTeen();
object2.context = context;
Reflect.apply(track, defaultImport, [EXPLICIT_MEDIA_ACTION, object2]);
}
}
}
function trackScanTiming(a0, a1) { // fn#42049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:3266, offset: 0x0112ee18, size: 217 bytes, params: 3, frame: 18
const Date = global.Date;
let value = Date.now();
value -= a0;
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
value = Math2.floor(value / 1000);
value = Reflect.apply(min, Math, [value, 3]);
const defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
const increment = defaultImport.increment;
const MetricEvents = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents;
const EXPLICIT_MEDIA_SCAN_CLIENT_TIMING = MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMING;
value = 'timingBucket:' + value;
Reflect.apply(increment, defaultImport, [{name: EXPLICIT_MEDIA_SCAN_CLIENT_TIMING, tags: [value, 'source:' + a1,
'metricVersion:1']}]);
}
function trackScanningTimedOut({channelId, messageId, attachmentIds, embedIds}) { // fn#42050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:3513, offset: 0x0112eef1, size: 447 bytes, params: 2, frame: 23
var length;
var r0;
var value;
var value2;
var channel;
var defaultImport;
var track;
var EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT;
var object2;
const MESSAGE_SCAN_TIMEOUT = (require(4832) /* metro dependency 4832: ExplicitMediaManager */).MESSAGE_SCAN_TIMEOUT;
var defaultImport2;
var increment;
const MetricEvents = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents;
var defaultImport3;
var distribution;
if (channelId != null) {
if (messageId != null) {
value = undefined;
length = attachmentIds == null ? value : attachmentIds.length;
value2 = 0;
if (value2 !== (length ?? value2)) {
channel = ChannelStore.getChannel(channelId);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT = AnalyticEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT;
object2 = {channel_id: channelId};
object2.guild_id = channel == null ? value : channel.guild_id;
object2.message_id = messageId;
object2.embed_ids = embedIds;
object2.user_is_underage = (require(4825) /* metro dependency 4825: SelfModUtils */).isCurrentUserTeen();
object2.scan_timeout_duration = MESSAGE_SCAN_TIMEOUT;
object2.attachment_ids_v2 = attachmentIds;
Reflect.apply(track, defaultImport, [EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT, object2]);
defaultImport2 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
increment = defaultImport2.increment;
EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT = MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT;
Reflect.apply(increment, defaultImport2, [{name: EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT,
tags: ['metricVersion:1']}]);
defaultImport3 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
distribution = defaultImport3.distribution;
length = attachmentIds == null ? value : attachmentIds.length;
r0 = length ?? value2;
length = embedIds == null ? value : embedIds.length;
Reflect.apply(distribution, defaultImport3,
[{name: MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT_DISTRIBUTION},
r0 + (length ?? value2)]);
} else {
length = embedIds == null ? value : embedIds.length;
if (value2 !== (length ?? value2)) {
channel = ChannelStore.getChannel(channelId);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT = AnalyticEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT;
object2 = {channel_id: channelId};
object2.guild_id = channel == null ? value : channel.guild_id;
object2.message_id = messageId;
object2.embed_ids = embedIds;
object2.user_is_underage = (require(4825) /* metro dependency 4825: SelfModUtils */).isCurrentUserTeen();
object2.scan_timeout_duration = MESSAGE_SCAN_TIMEOUT;
object2.attachment_ids_v2 = attachmentIds;
Reflect.apply(track, defaultImport, [EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT, object2]);
defaultImport2 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
increment = defaultImport2.increment;
EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT = MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT;
Reflect.apply(increment, defaultImport2, [{name: EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT,
tags: ['metricVersion:1']}]);
defaultImport3 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
distribution = defaultImport3.distribution;
length = attachmentIds == null ? value : attachmentIds.length;
r0 = length ?? value2;
length = embedIds == null ? value : embedIds.length;
Reflect.apply(distribution, defaultImport3,
[{name: MetricEvents.EXPLICIT_MEDIA_SCAN_CLIENT_TIMED_OUT_DISTRIBUTION},
r0 + (length ?? value2)]);
}
}
}
}
}
function trackExplicitMediaRedactableMessagedLoaded({channelId, numOfAttachments, numOfAttachmentsPendingScan, numOfEmbeds, numOfEmbedsPendingScan}) { // fn#42051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:4329, offset: 0x0112f0b0, size: 229 bytes, params: 2, frame: 22
var channel;
var value3;
var defaultImport;
var track;
var EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED;
var object2;
var value4;
var defaultImport2;
var distribution;
if (channelId != null) {
channel = ChannelStore.getChannel(channelId);
value3 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED = AnalyticEvents.EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED;
object2 = {channel_id: channelId};
object2.guild_id = channel == null ? value3 : channel.guild_id;
object2.num_of_attachments = numOfAttachments;
object2.num_of_attachments_pending_scan = numOfAttachmentsPendingScan;
object2.num_of_embeds = numOfEmbeds;
object2.num_of_embeds_pending_scan = numOfEmbedsPendingScan;
Reflect.apply(track, defaultImport, [EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED, object2]);
value4 = numOfAttachmentsPendingScan + numOfEmbedsPendingScan;
if (value4 > 0) {
defaultImport2 = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
distribution = defaultImport2.distribution;
object2 = {};
object2.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.EXPLICIT_MEDIA_PENDING_MESSAGE_LOADED_V2;
Reflect.apply(distribution, defaultImport2, [object2, value4]);
}
}
}
function trackRedactableMessageLoaded({messageId, channelId, numOfAttachments, numOfSelfHarmAttachments, numOfEmbeds, numOfGoreAttachments, numOfExplicitAttachments, numOfSelfHarmEmbeds, numOfGoreEmbeds, numOfExplicitEmbeds}) { // fn#42052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:4869, offset: 0x0112f195, size: 305 bytes, params: 2, frame: 29
var channel;
var value3;
var defaultImport;
const r6 = numOfExplicitAttachments > 0 || numOfExplicitEmbeds > 0;
const r5 = numOfGoreAttachments > 0 || numOfGoreEmbeds > 0;
const r4 = numOfSelfHarmAttachments > 0 || numOfSelfHarmEmbeds > 0;
if (channelId != null) {
if (messageId != null) {
if (r6) {
channel = ChannelStore.getChannel(channelId);
value3 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.REDACTABLE_MESSAGE_LOADED, {message_id: messageId,
channel_id: channelId,
channel_type: channel == null ? value3 : channel.type,
guild_id: channel == null ? value3 : channel.guild_id,
num_of_attachments: numOfAttachments, num_of_gore_attachments: numOfGoreAttachments,
num_of_explicit_attachments: numOfExplicitAttachments,
num_of_self_harm_attachments: numOfSelfHarmAttachments,
num_of_embeds: numOfEmbeds, num_of_gore_embeds: numOfGoreEmbeds,
num_of_explicit_embeds: numOfExplicitEmbeds,
num_of_self_harm_embeds: numOfSelfHarmEmbeds, has_redactable_explicit: r6, has_redactable_gore: r5,
has_redactable_self_harm: r4});
} else if (r5) {
channel = ChannelStore.getChannel(channelId);
value3 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.REDACTABLE_MESSAGE_LOADED, {message_id: messageId,
channel_id: channelId,
channel_type: channel == null ? value3 : channel.type,
guild_id: channel == null ? value3 : channel.guild_id,
num_of_attachments: numOfAttachments, num_of_gore_attachments: numOfGoreAttachments,
num_of_explicit_attachments: numOfExplicitAttachments,
num_of_self_harm_attachments: numOfSelfHarmAttachments,
num_of_embeds: numOfEmbeds, num_of_gore_embeds: numOfGoreEmbeds,
num_of_explicit_embeds: numOfExplicitEmbeds,
num_of_self_harm_embeds: numOfSelfHarmEmbeds, has_redactable_explicit: r6, has_redactable_gore: r5,
has_redactable_self_harm: r4});
} else if (r4) {
channel = ChannelStore.getChannel(channelId);
value3 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.REDACTABLE_MESSAGE_LOADED, {message_id: messageId,
channel_id: channelId,
channel_type: channel == null ? value3 : channel.type,
guild_id: channel == null ? value3 : channel.guild_id,
num_of_attachments: numOfAttachments, num_of_gore_attachments: numOfGoreAttachments,
num_of_explicit_attachments: numOfExplicitAttachments,
num_of_self_harm_attachments: numOfSelfHarmAttachments,
num_of_embeds: numOfEmbeds, num_of_gore_embeds: numOfGoreEmbeds,
num_of_explicit_embeds: numOfExplicitEmbeds,
num_of_self_harm_embeds: numOfSelfHarmEmbeds, has_redactable_explicit: r6, has_redactable_gore: r5,
has_redactable_self_harm: r4});
}
}
}
}
function trackExplicitMediaScanComplete({messageId, channelId, numOfAttachments, numOfExplicitAttachments, numOfEmbeds, numOfExplicitEmbeds}) { // fn#42053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:5644, offset: 0x0112f2c6, size: 178 bytes, params: 2, frame: 22
var channel;
var value3;
var defaultImport;
if (channelId != null) {
channel = ChannelStore.getChannel(channelId);
value3 = undefined;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.EXPLICIT_MEDIA_RETROACTIVE_SCAN_COMPLETE, {message_id: messageId,
channel_id: channelId, channel_type: channel == null ? value3 : channel.type,
guild_id: channel == null ? value3 : channel.guild_id, num_of_attachments: numOfAttachments,
num_of_explicit_attachments: numOfExplicitAttachments, num_of_embeds: numOfEmbeds,
num_of_explicit_embeds: numOfExplicitEmbeds});
}
}
function handleExplicitMediaScanTimeoutForMessage(a0) { // fn#42054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:6120, offset: 0x0112f378, size: 71 bytes, params: 2, frame: 14
const value = timeoutAttachmentsAndEmbedsForMessage(a0);
return a0.merge({attachments: value.attachments, embeds: value.embeds, messageSnapshots: (({messageSnapshots}) => {
if (messageSnapshots == null) {
return messageSnapshots;
}
if (messageSnapshots.length === 0) {
return messageSnapshots;
}
return messageSnapshots.map(_fun42056);
})(a0)});
}
function shouldAgeVerifyForExplicitMedia() { // fn#42058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:6716, offset: 0x0112f46b, size: 90 bytes, params: 1, frame: 14
var value;
const isFeatureAgeGated = (require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */).isFeatureAgeGated;
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
const SENSITIVE_CONTENT_SHOW_SETTING = AgeGatedFeature.SENSITIVE_CONTENT_SHOW_SETTING;
value = Reflect.apply(isFeatureAgeGated, value, [SENSITIVE_CONTENT_SHOW_SETTING]);
return value && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).shouldShowTiggerPawtect();
}
function useShouldAgeVerifyForReason(a0) { // fn#42059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:7001, offset: 0x0112f4c5, size: 72 bytes, params: 2, frame: 14
const value2 = useShouldAgeVerifyForExplicitMedia();
return !(value2 ? a0 == null : !value2) && (require(4840) /* metro dependency 4840: ObscureMediaModels */).AGE_VERIFICATION_OBSCURABLE_REASONS.has(a0);
}
function trackToggleMediaObscurityV2({obscure}) { // fn#42060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:7181, offset: 0x0112f50d, size: 110 bytes, params: 2, frame: 16
var defaultImport;
const ageVerificationUtilsModule = require(4813) /* metro dependency 4813: AgeVerificationUtils */;
if (ageVerificationUtilsModule.isVerifiedAdult()) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.EXPLICIT_MEDIA_OBSCURITY_TOGGLE_V2,
{toggle_direction: obscure ? 'hide' : 'show'});
}
}
function hasMessageSnapshotsWithAttachmentsOrEmbeds({message_snapshots}) { // fn#42061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:7392, offset: 0x0112f57b, size: 40 bytes, params: 2, frame: 12
return message_snapshots?.some(function(a0) {
var r0;
var r1;
var property = a0.message;
var value = undefined;
if (property == null) {
r0 = value;
} else {
property = property.attachments;
r0 = property;
}
r0 = r0 != null && a0.message.attachments.length > 0;
if (!r0) {
property = a0.message;
r1 = property == null ? value : property.embeds;
value = r1 != null;
r1 = value && a0.message.embeds.length > 0;
r0 = r1;
}
return r0;
});
}
function handleExplicitMediaScanTimeoutForForwardedMessage({messageSnapshots}) { // fn#42055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:6249, owner: handleExplicitMediaScanTimeoutForMessage.handleExplicitMediaScanTimeoutForForwardedMessage, offset: 0x0112f3bf, size: 47 bytes, params: 2, frame: 11
if (messageSnapshots == null) {
return messageSnapshots;
}
if (messageSnapshots.length === 0) {
return messageSnapshots;
}
return messageSnapshots.map(_fun42056);
}
function _fun42056(a0) { // fn#42056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4999:6384, offset: 0x0112f3ee, size: 76 bytes, params: 2, frame: 14
const message = a0.message;
let value = environment.__proto__.__proto__;
value = timeoutAttachmentsAndEmbedsForMessage(message);
return a0.merge({message: message.merge({attachments: value.attachments, embeds: value.embeds})});
}
@@ -0,0 +1,137 @@
/* Metro module 4837; source: modules/explicit_media_redaction/ExplicitMediaSearchStore.tsx; dependencies: [6, 7, 15, 17, 18, 4625, 4821, 566, 694, 2] */
function _fun42313(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5015:6, offset: 0x01135c22, size: 336 bytes, params: 8, frame: 20
const env0_0 = require;
const createCompositeKey_42317 = function({channel_id, id}) {
return '' + channel_id + ':' + id;
};
const closure = function({data}) {
env0_7 = {};
data.forEach(_fun42319);
};
const reset_42322 = function() {
env0_7 = {};
};
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 env0_7 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun42323(Store);
value.displayName = 'SearchMessageStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {SEARCH_MESSAGES_SUCCESS: closure,
MOD_VIEW_SEARCH_MESSAGES_SUCCESS: closure, MESSAGE_UPDATE: MESSAGE_UPDATE_42326, LOGOUT: function() {
reset_42322();
}, CONNECTION_OPEN: function() {
reset_42322();
}, MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT: MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT_42329});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/ExplicitMediaSearchStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_42314() { // fn#42314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5015:148, offset: 0x01135d72, 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_42314_isNativeReflectConstruct = function() {
return !!result;
})();
}
function MOD_VIEW_SEARCH_MESSAGES_SUCCESS_42318({data}) { // fn#42318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5015:413, offset: 0x01135dd0, size: 38 bytes, params: 2, frame: 11
env0_7 = {};
data.forEach(function({messages}) {
messages.forEach(_fun42320);
});
}
function _fun42323(a0) { // fn#42323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5015:616, offset: 0x01135e73, size: 68 bytes, params: 2, frame: 15
const closure = ExplicitMediaSearchStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getMessage', value: value_42325}]);
}
function MESSAGE_UPDATE_42326({message}) { // fn#42326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5015:1234, offset: 0x01135edf, size: 129 bytes, params: 2, frame: 18
var r0;
var binding;
if (message.id == null) {
return false;
}
if (message.channel_id == null) {
return false;
}
var value;
const compositeKey_42317 = createCompositeKey_42317(message);
const property = env0_7[compositeKey_42317];
const value2 = property != null;
if (value2) {
binding = env0_7;
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
binding[compositeKey_42317] = value.updateMessageRecord(property, {attachments: message.attachments,
embeds: message.embeds});
value = true;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function MESSAGE_EXPLICIT_CONTENT_SCAN_TIMEOUT_42329({messageId, channelId}) { // fn#42329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5015:1591, offset: 0x01135f6f, size: 92 bytes, params: 2, frame: 15
var binding;
var value;
const compositeKey_42317 = createCompositeKey_42317({id: messageId, channel_id: channelId});
const property = env0_7[compositeKey_42317];
if (property != null) {
binding = env0_7;
value = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
binding[compositeKey_42317] = value.handleExplicitMediaScanTimeoutForMessage(property);
}
}
function _fun42319({messages}) { // fn#42319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5015:476, offset: 0x01135df6, size: 30 bytes, params: 2, frame: 11
messages.forEach(function(a0) {
a0.forEach(_fun42321);
});
}
function value_42325(a0, a1) { // fn#42325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5015:966, offset: 0x01135eb7, size: 40 bytes, params: 3, frame: 12
return env1_7[createCompositeKey_42317({id: a0, channel_id: a1})];
}
function _fun42320(a0) { // fn#42320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5015:504, offset: 0x01135e14, size: 24 bytes, params: 2, frame: 11
a0.forEach(_fun42321);
}
function _fun42321(a0) { // fn#42321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5015:519, offset: 0x01135e2c, size: 58 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_7;
const compositeKey_42317 = createCompositeKey_42317(a0);
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
binding[compositeKey_42317] = value.createMessageRecord(a0);
}
@@ -0,0 +1,153 @@
/* Metro module 4822; source: modules/explicit_media_redaction/ExplicitMediaStore.tsx; dependencies: [6, 7, 15, 17, 18, 672, 21, 4823, 566, 694, 2] */
function _fun42063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5000:6, offset: 0x0112f612, size: 390 bytes, params: 8, frame: 20
const env0_0 = require;
const reset_42067 = function() {
env0_11 = {};
env0_12 = {};
};
let 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 Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const DAY = Millis.DAY;
const env0_8 = 14 * DAY;
Object = global.Object;
const env0_9 = Object.freeze([]);
let env0_11 = {};
let env0_12 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun42068(Store);
value.displayName = 'FalsePositiveStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() {
reset_42067();
}, CONNECTION_OPEN: function(a0) {
env0_10 = a0.explicitContentScanVersion;
reset_42067();
}, MESSAGE_EXPLICIT_CONTENT_FP_CREATE: MESSAGE_EXPLICIT_CONTENT_FP_CREATE,
MESSAGE_EXPLICIT_CONTENT_FP_SUBMIT: MESSAGE_EXPLICIT_CONTENT_FP_SUBMIT});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/ExplicitMediaStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_42064() { // fn#42064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5000:148, offset: 0x0112f798, 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_42064_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun42068(a0) { // fn#42068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5000:441, offset: 0x0112f809, size: 139 bytes, params: 2, frame: 16
const closure = ExplicitMediaStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'getFpMessageInfo', value: value_42070}, {key: 'getChannelFpInfo',
value: value_42071}, {key: 'canSubmitFpReport', value: value_42072}, {key: 'validContentScanVersion',
get: get_42073}]);
}
function MESSAGE_EXPLICIT_CONTENT_FP_CREATE({messageId, channelId, attachments}) { // fn#42076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5000:1424, offset: 0x0112f994, size: 110 bytes, params: 2, frame: 18
const object2 = {messageId: messageId, channelId: channelId, attachments: attachments, reportSubmit: false};
const r7 = env0_12[channelId] ?? env0_9;
const binding = env0_12;
const items2 = [];
const value2 = arraySpread(items2, r7, 0, r7);
items2[value2] = object2;
value2 + 1;
binding[channelId] = items2;
env0_11[messageId] = object2;
}
function MESSAGE_EXPLICIT_CONTENT_FP_SUBMIT({messageId, channelId}) { // fn#42077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5000:1642, offset: 0x0112fa02, size: 95 bytes, params: 2, frame: 16
var binding;
var object2;
const property = env0_12[channelId];
if (property != null) {
binding = env0_12;
binding[channelId] = property.map(function(a0) {
var r0;
var object;
var value = a0;
var messageId2 = value.messageId;
if (messageId2 !== messageId) {
r0 = value;
} else {
object = {};
copyDataProperties(object, value, messageId2);
object['reportSubmit'] = true;
r0 = object;
}
return r0;
});
binding = env0_11;
object2 = {};
copyDataProperties(object2, binding[messageId], property);
object2['reportSubmit'] = true;
binding[messageId] = object2;
}
}
function value_42071(a0) { // fn#42071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5000:823, offset: 0x0112f894, size: 26 bytes, params: 2, frame: 3
return env1_12[a0] ?? env1_9;
}
function value_42072(a0) { // fn#42072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5000:900, offset: 0x0112f8ae, size: 86 bytes, params: 2, frame: 15
var r1;
var r0;
var reportSubmit;
var defaultImport;
const value = environment.__proto__;
const property = env1_11[a0];
const value2 = property != null;
if (value2) {
reportSubmit = property.reportSubmit;
if (reportSubmit) {
r1 = !reportSubmit;
} else {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r1 = defaultImport.age(property.messageId) < env1_8;
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
}
function get_42073() { // fn#42073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5000:1022, offset: 0x0112f904, size: 101 bytes, params: 1, frame: 15
const isSensitiveContentSelfHarmEnabled2 = (require(4823) /* metro dependency 4823: SensitiveContentSelfHarmExperiment */).isSensitiveContentSelfHarmEnabled('ExplicitMediaStore.validContentScanVersion');
const value2 = env1_10 != null;
if (isSensitiveContentSelfHarmEnabled2) {
return value2 ? env1_10 : 5;
}
const value3 = 4;
const r4 = value2 ? env1_10 : value3;
const Math = global.Math;
return Math.min(r4, value3);
}
@@ -0,0 +1,215 @@
/* Metro module 4839; source: modules/explicit_media_redaction/HarmTypeConfiguration.tsx; dependencies: [661, 4840, 4630, 4841, 3829, 4842, 4844, 1314, 2] */
function _fun42379(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5017:6, offset: 0x01137903, size: 666 bytes, params: 8, frame: 25
var object7;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const {MessageAttachmentFlags, MessageEmbedFlags} = require(661) /* metro dependency 661: Constants */;
object7 = {EXPLICIT: 'explicit', GORE: 'gore', SELF_HARM: 'self_harm'};
const object8 = {NONE: 0};
object8[0] = 'NONE';
object8.EXPLICIT = 1;
object8[1] = 'EXPLICIT';
object8.GORE = 2;
object8[2] = 'GORE';
object8.SELF_HARM = 4;
object8[4] = 'SELF_HARM';
object8.ALL = 7;
object8[7] = 'ALL';
const object9 = {};
const EXPLICIT = object7.EXPLICIT;
const object10 = {};
const EXPLICIT2 = object7.EXPLICIT;
object10.harmType = EXPLICIT2;
const ObscureReason = (require(4840) /* metro dependency 4840: ObscureMediaModels */).ObscureReason;
const EXPLICIT_CONTENT = ObscureReason.EXPLICIT_CONTENT;
object10.obscureReason = EXPLICIT_CONTENT;
let CONTAINS_EXPLICIT_MEDIA = MessageAttachmentFlags.CONTAINS_EXPLICIT_MEDIA;
object10.attachmentFlag = CONTAINS_EXPLICIT_MEDIA;
CONTAINS_EXPLICIT_MEDIA = MessageEmbedFlags.CONTAINS_EXPLICIT_MEDIA;
object10.embedFlag = CONTAINS_EXPLICIT_MEDIA;
const ContentScanFlags = (require(4630) /* metro dependency 4630: MediaTypes */).ContentScanFlags;
const EXPLICIT3 = ContentScanFlags.EXPLICIT;
object10.genericMediaFlag = EXPLICIT3;
const EXPLICIT4 = object8.EXPLICIT;
object10.bitmask = EXPLICIT4;
object10.devSettingKey = 'obscure_blur_effect_explicit_content_enabled';
object10.getProtoUserSettings = getProtoUserSettings;
object10.getUserSettingsWithDefaults = getUserSettingsWithDefaults;
object9[EXPLICIT] = object10;
const GORE = object7.GORE;
const object11 = {};
const GORE2 = object7.GORE;
object11.harmType = GORE2;
const GORE_CONTENT = ObscureReason.GORE_CONTENT;
object11.obscureReason = GORE_CONTENT;
let CONTAINS_GORE_CONTENT = MessageAttachmentFlags.CONTAINS_GORE_CONTENT;
object11.attachmentFlag = CONTAINS_GORE_CONTENT;
CONTAINS_GORE_CONTENT = MessageEmbedFlags.CONTAINS_GORE_CONTENT;
object11.embedFlag = CONTAINS_GORE_CONTENT;
const GORE3 = ContentScanFlags.GORE;
object11.genericMediaFlag = GORE3;
const GORE4 = object8.GORE;
object11.bitmask = GORE4;
object11.devSettingKey = 'obscure_blur_effect_gore_content_enabled';
object11.getProtoUserSettings = getProtoUserSettings_42382;
object11.getUserSettingsWithDefaults = getUserSettingsWithDefaults_42383;
object9[GORE] = object11;
const SELF_HARM = object7.SELF_HARM;
const object12 = {};
const SELF_HARM2 = object7.SELF_HARM;
object12.harmType = SELF_HARM2;
const SELF_HARM_CONTENT = ObscureReason.SELF_HARM_CONTENT;
object12.obscureReason = SELF_HARM_CONTENT;
let CONTAINS_SELF_HARM_CONTENT = MessageAttachmentFlags.CONTAINS_SELF_HARM_CONTENT;
object12.attachmentFlag = CONTAINS_SELF_HARM_CONTENT;
CONTAINS_SELF_HARM_CONTENT = MessageEmbedFlags.CONTAINS_SELF_HARM_CONTENT;
object12.embedFlag = CONTAINS_SELF_HARM_CONTENT;
const SELF_HARM3 = ContentScanFlags.SELF_HARM;
object12.genericMediaFlag = SELF_HARM3;
const SELF_HARM4 = object8.SELF_HARM;
object12.bitmask = SELF_HARM4;
object12.devSettingKey = 'obscure_blur_effect_self_harm_content_enabled';
object12.getProtoUserSettings = getProtoUserSettings_42384;
object12.getUserSettingsWithDefaults = getUserSettingsWithDefaults_42385;
object9[SELF_HARM] = object12;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/HarmTypeConfiguration.tsx');
exports.ContentHarmType = object7;
exports.ContentHarmTypeBitMask = object8;
exports.CONTENT_SCAN_TYPE_REGISTRY = object9;
}
function getProtoUserSettings(a0) { // fn#42380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5017:701, offset: 0x01137b9d, size: 194 bytes, params: 2, frame: 17
const value = undefined;
const explicitContentSettings = a0 == null || a0.textAndImages == null ? value : a0.textAndImages.explicitContentSettings;
const {GUILD, FRIEND_DM,
NON_FRIEND_DM} = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ContentHarmTypeChannel;
return {[GUILD]: explicitContentSettings == null ? value : explicitContentSettings.explicitContentGuilds,
[FRIEND_DM]: explicitContentSettings == null ? value : explicitContentSettings.explicitContentFriendDm,
[NON_FRIEND_DM]: explicitContentSettings == null ? value : explicitContentSettings.explicitContentNonFriendDm};
}
function getUserSettingsWithDefaults(a0) { // fn#42381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5017:1071, offset: 0x01137c5f, size: 594 bytes, params: 2, frame: 22
var r8;
var object2;
var value2;
const ContentHarmTypeChannel = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ContentHarmTypeChannel;
var GUILD;
const ExplicitContentSettings = (require(3829) /* metro dependency 3829: UserSettings */).ExplicitContentSettings;
var setting;
var FRIEND_DM;
var setting2;
var NON_FRIEND_DM;
let value = a0;
if (value != null) {
r8 = value;
} else {
object2 = {};
value2 = undefined;
GUILD = ContentHarmTypeChannel.GUILD;
setting = ExplicitContentSettings.getSetting();
object2[GUILD] = setting == null ? value2 : setting.explicitContentGuilds;
FRIEND_DM = ContentHarmTypeChannel.FRIEND_DM;
setting2 = ExplicitContentSettings.getSetting();
object2[FRIEND_DM] = setting2 == null ? value2 : setting2.explicitContentFriendDm;
NON_FRIEND_DM = ContentHarmTypeChannel.NON_FRIEND_DM;
value = ExplicitContentSettings.getSetting();
object2[NON_FRIEND_DM] = value == null ? value2 : value.explicitContentNonFriendDm;
r8 = object2;
}
object2 = {};
const value5 = undefined;
GUILD = ContentHarmTypeChannel.GUILD;
const sensitiveMediaExplicitRedactionSettingsUtilsModule = require(4842) /* metro dependency 4842: SensitiveMediaExplicitRedactionSettingsUtils */;
object2[GUILD] = sensitiveMediaExplicitRedactionSettingsUtilsModule.resolveExplicitContentSettingWithDefaults({setting: r8 == null ? value5 : r8[ContentHarmTypeChannel.GUILD]});
FRIEND_DM = ContentHarmTypeChannel.FRIEND_DM;
const moduleValue2 = sensitiveMediaExplicitRedactionSettingsUtilsModule;
object2[FRIEND_DM] = moduleValue2.resolveExplicitContentSettingWithDefaults({'setting': null, 'isDm': true,
'isFriend': true, setting: r8 == null ? value5 : r8[ContentHarmTypeChannel.FRIEND_DM]});
NON_FRIEND_DM = ContentHarmTypeChannel.NON_FRIEND_DM;
const moduleValue3 = sensitiveMediaExplicitRedactionSettingsUtilsModule;
object2[NON_FRIEND_DM] = moduleValue3.resolveExplicitContentSettingWithDefaults({setting: r8 == null ? value5 : r8[ContentHarmTypeChannel.NON_FRIEND_DM],
isDm: true});
return object2;
}
function getProtoUserSettings_42382(a0) { // fn#42382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5017:2308, offset: 0x01137eb1, size: 194 bytes, params: 2, frame: 17
const value = undefined;
const goreContentSettings = a0 == null || a0.textAndImages == null ? value : a0.textAndImages.goreContentSettings;
const {GUILD, FRIEND_DM,
NON_FRIEND_DM} = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ContentHarmTypeChannel;
return {[GUILD]: goreContentSettings == null ? value : goreContentSettings.goreContentGuilds,
[FRIEND_DM]: goreContentSettings == null ? value : goreContentSettings.goreContentFriendDm,
[NON_FRIEND_DM]: goreContentSettings == null ? value : goreContentSettings.goreContentNonFriendDm};
}
function getUserSettingsWithDefaults_42383(a0) { // fn#42383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5017:2662, offset: 0x01137f73, size: 594 bytes, params: 2, frame: 22
var r8;
var object2;
var value2;
const ContentHarmTypeChannel = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ContentHarmTypeChannel;
var GUILD;
const GoreContentSettings = (require(3829) /* metro dependency 3829: UserSettings */).GoreContentSettings;
var setting;
var FRIEND_DM;
var setting2;
var NON_FRIEND_DM;
let value = a0;
if (value != null) {
r8 = value;
} else {
object2 = {};
value2 = undefined;
GUILD = ContentHarmTypeChannel.GUILD;
setting = GoreContentSettings.getSetting();
object2[GUILD] = setting == null ? value2 : setting.goreContentGuilds;
FRIEND_DM = ContentHarmTypeChannel.FRIEND_DM;
setting2 = GoreContentSettings.getSetting();
object2[FRIEND_DM] = setting2 == null ? value2 : setting2.goreContentFriendDm;
NON_FRIEND_DM = ContentHarmTypeChannel.NON_FRIEND_DM;
value = GoreContentSettings.getSetting();
object2[NON_FRIEND_DM] = value == null ? value2 : value.goreContentNonFriendDm;
r8 = object2;
}
object2 = {};
const value5 = undefined;
GUILD = ContentHarmTypeChannel.GUILD;
const sensitiveMediaGoreRedactionSettingsUtilsModule = require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */;
object2[GUILD] = sensitiveMediaGoreRedactionSettingsUtilsModule.resolveGoreSettingWithDefaults({setting: r8 == null ? value5 : r8[ContentHarmTypeChannel.GUILD]});
FRIEND_DM = ContentHarmTypeChannel.FRIEND_DM;
const moduleValue2 = sensitiveMediaGoreRedactionSettingsUtilsModule;
object2[FRIEND_DM] = moduleValue2.resolveGoreSettingWithDefaults({'setting': null, 'isDm': true, 'isFriend': true,
setting: r8 == null ? value5 : r8[ContentHarmTypeChannel.FRIEND_DM]});
NON_FRIEND_DM = ContentHarmTypeChannel.NON_FRIEND_DM;
const moduleValue3 = sensitiveMediaGoreRedactionSettingsUtilsModule;
object2[NON_FRIEND_DM] = moduleValue3.resolveGoreSettingWithDefaults({setting: r8 == null ? value5 : r8[ContentHarmTypeChannel.NON_FRIEND_DM],
isDm: true});
return object2;
}
function getProtoUserSettings_42384(a0) { // fn#42384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5017:3882, offset: 0x011381c5, size: 194 bytes, params: 2, frame: 17
const value = undefined;
const selfHarmContentSettings = a0 == null || a0.textAndImages == null ? value : a0.textAndImages.selfHarmContentSettings;
const {GUILD, FRIEND_DM,
NON_FRIEND_DM} = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ContentHarmTypeChannel;
return {[GUILD]: selfHarmContentSettings == null ? value : selfHarmContentSettings.selfHarmContentGuilds,
[FRIEND_DM]: selfHarmContentSettings == null ? value : selfHarmContentSettings.selfHarmContentFriendDm,
[NON_FRIEND_DM]: selfHarmContentSettings == null ? value : selfHarmContentSettings.selfHarmContentNonFriendDm};
}
function getUserSettingsWithDefaults_42385() { // fn#42385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5017:4252, offset: 0x01138287, size: 164 bytes, params: 1, frame: 16
const object2 = {};
const ContentHarmTypeChannel = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ContentHarmTypeChannel;
const GUILD = ContentHarmTypeChannel.GUILD;
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
let UNSET_EXPLICIT_CONTENT_REDACTION = ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION;
object2[GUILD] = UNSET_EXPLICIT_CONTENT_REDACTION;
const FRIEND_DM = ContentHarmTypeChannel.FRIEND_DM;
UNSET_EXPLICIT_CONTENT_REDACTION = ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION;
object2[FRIEND_DM] = UNSET_EXPLICIT_CONTENT_REDACTION;
const NON_FRIEND_DM = ContentHarmTypeChannel.NON_FRIEND_DM;
UNSET_EXPLICIT_CONTENT_REDACTION = ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION;
object2[NON_FRIEND_DM] = UNSET_EXPLICIT_CONTENT_REDACTION;
return object2;
}
@@ -0,0 +1,25 @@
/* Metro module 4840; source: modules/explicit_media_redaction/ObscureMediaModels.tsx; dependencies: [2] */
function _fun42386(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5018:6, offset: 0x0113832b, size: 288 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {SPOILER: 'spoiler', EXPLICIT_CONTENT: 'explicit_content',
POTENTIAL_EXPLICIT_CONTENT: 'potential_explicit_content', GORE_CONTENT: 'gore_content',
SELF_HARM_CONTENT: 'self_harm_content'};
let Set = global.Set;
let EXPLICIT_CONTENT = object2.EXPLICIT_CONTENT;
let GORE_CONTENT = object2.GORE_CONTENT;
let SELF_HARM_CONTENT = object2.SELF_HARM_CONTENT;
const POTENTIAL_EXPLICIT_CONTENT = object2.POTENTIAL_EXPLICIT_CONTENT;
let set = new Set([EXPLICIT_CONTENT, GORE_CONTENT, SELF_HARM_CONTENT, POTENTIAL_EXPLICIT_CONTENT]);
Set = global.Set;
EXPLICIT_CONTENT = object2.EXPLICIT_CONTENT;
GORE_CONTENT = object2.GORE_CONTENT;
SELF_HARM_CONTENT = object2.SELF_HARM_CONTENT;
set = new Set([EXPLICIT_CONTENT, GORE_CONTENT, SELF_HARM_CONTENT]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/ObscureMediaModels.tsx');
exports.ObscureReason = object2;
exports.SENSITIVE_CONTENT_OBSCURABLE_REASONS = set;
exports.AGE_VERIFICATION_OBSCURABLE_REASONS = set;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,13 @@
/* Metro module 4823; source: modules/explicit_media_redaction/SensitiveContentSelfHarmExperiment.tsx; dependencies: [1854, 2] */
function _fun42079(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5001:6, offset: 0x0112fa93, size: 177 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2025-09-sensitive-content-self-harm', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/SensitiveContentSelfHarmExperiment.tsx');
exports.SensitiveContentSelfHarmExperiment = value;
exports.useIsSensitiveContentSelfHarmEnabled = useIsSensitiveContentSelfHarmEnabled;
exports.isSensitiveContentSelfHarmEnabled = isSensitiveContentSelfHarmEnabled;
}
@@ -0,0 +1,170 @@
/* Metro module 4842; source: modules/explicit_media_redaction/SensitiveMediaExplicitRedactionSettingsUtils.tsx; dependencies: [1878, 3831, 1314, 3835, 3842, 3829, 4843, 2] */
function _fun42388(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5020:6, offset: 0x011384f5, size: 739 bytes, params: 8, frame: 21
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const ExplicitContentFilterTypes = (require(3831) /* metro dependency 3831: DMSafetyConstants */).ExplicitContentFilterTypes;
object3 = {};
let DISABLED = ExplicitContentFilterTypes.DISABLED;
let value = DISABLED.valueOf();
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
let SHOW = ExplicitContentRedaction.SHOW;
object3[value] = SHOW;
let NON_FRIENDS = ExplicitContentFilterTypes.NON_FRIENDS;
value = NON_FRIENDS.valueOf();
SHOW = ExplicitContentRedaction.SHOW;
object3[value] = SHOW;
let FRIENDS_AND_NON_FRIENDS = ExplicitContentFilterTypes.FRIENDS_AND_NON_FRIENDS;
value = FRIENDS_AND_NON_FRIENDS.valueOf();
let BLOCK = ExplicitContentRedaction.BLOCK;
object3[value] = BLOCK;
object3 = {};
DISABLED = ExplicitContentFilterTypes.DISABLED;
value = DISABLED.valueOf();
SHOW = ExplicitContentRedaction.SHOW;
object3[value] = SHOW;
NON_FRIENDS = ExplicitContentFilterTypes.NON_FRIENDS;
value = NON_FRIENDS.valueOf();
BLOCK = ExplicitContentRedaction.BLOCK;
object3[value] = BLOCK;
FRIENDS_AND_NON_FRIENDS = ExplicitContentFilterTypes.FRIENDS_AND_NON_FRIENDS;
value = FRIENDS_AND_NON_FRIENDS.valueOf();
BLOCK = ExplicitContentRedaction.BLOCK;
object3[value] = BLOCK;
object3 = {};
DISABLED = ExplicitContentFilterTypes.DISABLED;
value = DISABLED.valueOf();
let BLUR = ExplicitContentRedaction.BLUR;
object3[value] = BLUR;
NON_FRIENDS = ExplicitContentFilterTypes.NON_FRIENDS;
value = NON_FRIENDS.valueOf();
BLUR = ExplicitContentRedaction.BLUR;
object3[value] = BLUR;
FRIENDS_AND_NON_FRIENDS = ExplicitContentFilterTypes.FRIENDS_AND_NON_FRIENDS;
value = FRIENDS_AND_NON_FRIENDS.valueOf();
BLOCK = ExplicitContentRedaction.BLOCK;
object3[value] = BLOCK;
const object4 = {};
DISABLED = ExplicitContentFilterTypes.DISABLED;
value = DISABLED.valueOf();
BLUR = ExplicitContentRedaction.BLUR;
object4[value] = BLUR;
NON_FRIENDS = ExplicitContentFilterTypes.NON_FRIENDS;
value = NON_FRIENDS.valueOf();
BLOCK = ExplicitContentRedaction.BLOCK;
object4[value] = BLOCK;
FRIENDS_AND_NON_FRIENDS = ExplicitContentFilterTypes.FRIENDS_AND_NON_FRIENDS;
value = FRIENDS_AND_NON_FRIENDS.valueOf();
BLOCK = ExplicitContentRedaction.BLOCK;
object4[value] = BLOCK;
const closure = resolveExplicitContentSettingWithDefaults;
const closure2 = resolveSettingWithDefaultsForTeen;
const resultDefaultSettingsForSensitiveContentDefaultsMixed = function(a0) {
var r1;
var r0;
var property = a0.isDm;
r1 = property !== undefined ? property : false;
property = a0.isFriend;
r0 = property !== undefined ? property : false;
r0 = r1 ? r0 ? require(dependencyMap[2]).ExplicitContentRedaction.BLUR : require(dependencyMap[2]).ExplicitContentRedaction.BLOCK : require(dependencyMap[2]).ExplicitContentRedaction.BLUR;
return r0;
};
const closure3 = getExplicitContentSettingOrDefault;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/SensitiveMediaExplicitRedactionSettingsUtils.tsx');
exports.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM = object3;
exports.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_NON_FRIEND_DM = object4;
exports.resolveExplicitContentSettingWithDefaults = closure;
exports.resolveSettingWithDefaultsForTeen = closure2;
exports.getExplicitContentSettingOrDefault = closure3;
exports.updateExplicitContentSetting = updateExplicitContentSetting;
exports.shouldRedactMessageMediaForForum = shouldRedactMessageMediaForForum;
}
function resolveExplicitContentSettingWithDefaults({setting, isDm, isFriend}) { // fn#42389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5020:1011, offset: 0x011387d8, size: 249 bytes, params: 2, frame: 20
var r1;
var currentUser;
var moduleValue;
const SettingsDefaultFeature = (require(3842) /* metro dependency 3842: SettingsDefaultFeature */).SettingsDefaultFeature;
const value = undefined;
isDm = !(isDm === value) && isDm;
isFriend = !(isFriend === value) && isFriend;
if (setting == null) {
currentUser = UserStore.getCurrentUser();
moduleValue = require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */;
r1 = moduleValue.isSettingTeenByDefault(SettingsDefaultFeature.SENSITIVE_CONTENT) ? resultDefaultSettingsForSensitiveContentDefaultsMixed({isDm: isDm,
isFriend: isFriend}) : (currentUser == null ? value : currentUser.nsfwAllowed) === false ? resolveSettingWithDefaultsForTeen({isDm: isDm,
isFriend: isFriend}) : resolveSettingWithDefaultsForAdult({isDm: isDm, isFriend: isFriend});
} else {
var ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
var UNSET_EXPLICIT_CONTENT_REDACTION = ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION;
if (setting !== UNSET_EXPLICIT_CONTENT_REDACTION) {
return setting;
}
currentUser = UserStore.getCurrentUser();
moduleValue = require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */;
r1 = moduleValue.isSettingTeenByDefault(SettingsDefaultFeature.SENSITIVE_CONTENT) ? resultDefaultSettingsForSensitiveContentDefaultsMixed({isDm: isDm,
isFriend: isFriend}) : (currentUser == null ? value : currentUser.nsfwAllowed) === false ? resolveSettingWithDefaultsForTeen({isDm: isDm,
isFriend: isFriend}) : resolveSettingWithDefaultsForAdult({isDm: isDm, isFriend: isFriend});
}
return r1;
}
function resolveSettingWithDefaultsForAdult({isDm, isFriend}) { // fn#42390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5020:1513, offset: 0x011388d1, size: 120 bytes, params: 2, frame: 14
var setting;
isDm = !(isDm === undefined) && isDm;
isFriend = !(isFriend === undefined) && isFriend;
if (isDm) {
setting = (require(3829) /* metro dependency 3829: UserSettings */).ExplicitContentFilter.getSetting();
return isFriend ? env0_3[setting] : env0_4[setting];
}
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
return ExplicitContentRedaction.SHOW;
}
function resolveSettingWithDefaultsForTeen({isDm, isFriend}) { // fn#42391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5020:1697, offset: 0x01138949, size: 120 bytes, params: 2, frame: 14
var setting;
isDm = !(isDm === undefined) && isDm;
isFriend = !(isFriend === undefined) && isFriend;
if (isDm) {
setting = (require(3829) /* metro dependency 3829: UserSettings */).ExplicitContentFilter.getSetting();
return isFriend ? env0_5[setting] : env0_6[setting];
}
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
return ExplicitContentRedaction.BLUR;
}
function getExplicitContentSettingOrDefault(a0) { // fn#42393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5020:2048, offset: 0x01138a2e, size: 187 bytes, params: 2, frame: 17
const r5 = a0 ?? (require(3829) /* metro dependency 3829: UserSettings */).ExplicitContentSettings.getSetting();
const object2 = {};
const resolveExplicitContentSettingWithDefaultsBinding = resolveExplicitContentSettingWithDefaults;
const value2 = undefined;
object2.explicitContentGuilds = resolveExplicitContentSettingWithDefaultsBinding({setting: r5 == null ? value2 : r5.explicitContentGuilds});
object2.explicitContentNonFriendDm = resolveExplicitContentSettingWithDefaults({setting: r5 == null ? value2 : r5.explicitContentNonFriendDm,
isDm: true});
object2.explicitContentFriendDm = resolveExplicitContentSettingWithDefaults({'setting': null, 'isDm': true,
'isFriend': true, setting: r5 == null ? value2 : r5.explicitContentFriendDm});
return object2;
}
function updateExplicitContentSetting(a0) { // fn#42394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5020:3030, offset: 0x01138ae9, size: 71 bytes, params: 2, frame: 14
const explicitContentSettingOrDefault = getExplicitContentSettingOrDefault();
const ExplicitContentSettings = (require(3829) /* metro dependency 3829: UserSettings */).ExplicitContentSettings;
const updateSetting = ExplicitContentSettings.updateSetting;
const object2 = {};
copyDataProperties(object2, a0, copyDataProperties(object2, explicitContentSettingOrDefault, undefined));
Reflect.apply(updateSetting, ExplicitContentSettings, [object2]);
}
function shouldRedactMessageMediaForForum() { // fn#42395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5020:3172, offset: 0x01138b30, size: 75 bytes, params: 1, frame: 13
if (UserStore.getCurrentUser() == null) {
return false;
}
return (require(4843) /* metro dependency 4843: SensitiveMediaRedactionSettingUtils */).getShouldObscureForSetting(getExplicitContentSettingOrDefault().explicitContentGuilds);
}
@@ -0,0 +1,104 @@
/* Metro module 4844; source: modules/explicit_media_redaction/SensitiveMediaGoreRedactionSettingsUtils.tsx; dependencies: [31, 1878, 661, 1314, 3835, 3842, 3829, 2] */
function _fun42399(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5022:6, offset: 0x01138c62, size: 227 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
const closure = resolveGoreSettingWithDefaults;
const resultDefaultSettingsForSensitiveContentDefaultsMixed_42401 = function(a0) {
var r1;
var r0;
var property = a0.isDm;
r1 = property !== undefined ? property : false;
property = a0.isFriend;
r0 = property !== undefined ? property : false;
r0 = r1 ? r0 ? require(dependencyMap[3]).ExplicitContentRedaction.BLUR : require(dependencyMap[3]).ExplicitContentRedaction.BLOCK : require(dependencyMap[3]).ExplicitContentRedaction.BLUR;
return r0;
};
const closure2 = resolveGoreSettingWithDefaultsForTeen;
const closure3 = getGoreContentSettingOrDefault;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/SensitiveMediaGoreRedactionSettingsUtils.tsx');
exports.resolveGoreSettingWithDefaults = closure;
exports.resolveGoreSettingWithDefaultsForTeen = closure2;
exports.getGoreContentSettingOrDefault = closure3;
exports.updateGoreContentSetting = updateGoreContentSetting;
exports.useSensitiveContentFilterHelpArticle = useSensitiveContentFilterHelpArticle;
}
function resolveGoreSettingWithDefaults({setting, isDm, isFriend}) { // fn#42400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5022:174, offset: 0x01138d45, size: 249 bytes, params: 2, frame: 20
var r1;
var currentUser;
var moduleValue;
const SettingsDefaultFeature = (require(3842) /* metro dependency 3842: SettingsDefaultFeature */).SettingsDefaultFeature;
const value = undefined;
isDm = !(isDm === value) && isDm;
isFriend = !(isFriend === value) && isFriend;
if (setting == null) {
currentUser = UserStore.getCurrentUser();
moduleValue = require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */;
r1 = moduleValue.isSettingTeenByDefault(SettingsDefaultFeature.SENSITIVE_CONTENT) ? resultDefaultSettingsForSensitiveContentDefaultsMixed_42401({isDm: isDm,
isFriend: isFriend}) : (currentUser == null ? value : currentUser.nsfwAllowed) === false ? resolveGoreSettingWithDefaultsForTeen({isDm: isDm,
isFriend: isFriend}) : resolveGoreSettingWithDefaultsForAdult({isDm: isDm, isFriend: isFriend});
} else {
var ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
var UNSET_EXPLICIT_CONTENT_REDACTION = ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION;
if (setting !== UNSET_EXPLICIT_CONTENT_REDACTION) {
return setting;
}
currentUser = UserStore.getCurrentUser();
moduleValue = require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */;
r1 = moduleValue.isSettingTeenByDefault(SettingsDefaultFeature.SENSITIVE_CONTENT) ? resultDefaultSettingsForSensitiveContentDefaultsMixed_42401({isDm: isDm,
isFriend: isFriend}) : (currentUser == null ? value : currentUser.nsfwAllowed) === false ? resolveGoreSettingWithDefaultsForTeen({isDm: isDm,
isFriend: isFriend}) : resolveGoreSettingWithDefaultsForAdult({isDm: isDm, isFriend: isFriend});
}
return r1;
}
function resolveGoreSettingWithDefaultsForAdult({isDm, isFriend}) { // fn#42402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5022:854, offset: 0x01138eab, size: 120 bytes, params: 2, frame: 13
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
isDm = !(isDm === undefined) && isDm;
isFriend = !(isFriend === undefined) && isFriend;
return isDm && isFriend ? ExplicitContentRedaction.SHOW : isDm ? ExplicitContentRedaction.BLOCK : ExplicitContentRedaction.SHOW;
}
function resolveGoreSettingWithDefaultsForTeen({isDm, isFriend}) { // fn#42403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5022:1043, offset: 0x01138f23, size: 120 bytes, params: 2, frame: 13
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
isDm = !(isDm === undefined) && isDm;
isFriend = !(isFriend === undefined) && isFriend;
return isDm && isFriend ? ExplicitContentRedaction.BLUR : isDm ? ExplicitContentRedaction.BLOCK : ExplicitContentRedaction.BLUR;
}
function getGoreContentSettingOrDefault(a0) { // fn#42404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5022:1225, offset: 0x01138f9b, size: 187 bytes, params: 2, frame: 17
const r5 = a0 ?? (require(3829) /* metro dependency 3829: UserSettings */).GoreContentSettings.getSetting();
const object2 = {};
const resolveGoreSettingWithDefaultsBinding = resolveGoreSettingWithDefaults;
const value2 = undefined;
object2.goreContentGuilds = resolveGoreSettingWithDefaultsBinding({setting: r5 == null ? value2 : r5.goreContentGuilds});
object2.goreContentNonFriendDm = resolveGoreSettingWithDefaults({setting: r5 == null ? value2 : r5.goreContentNonFriendDm,
isDm: true});
object2.goreContentFriendDm = resolveGoreSettingWithDefaults({'setting': null, 'isDm': true, 'isFriend': true,
setting: r5 == null ? value2 : r5.goreContentFriendDm});
return object2;
}
function updateGoreContentSetting(a0) { // fn#42405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5022:1966, offset: 0x01139056, size: 71 bytes, params: 2, frame: 14
const goreContentSettingOrDefault = getGoreContentSettingOrDefault();
const GoreContentSettings = (require(3829) /* metro dependency 3829: UserSettings */).GoreContentSettings;
const updateSetting = GoreContentSettings.updateSetting;
const object2 = {};
copyDataProperties(object2, a0, copyDataProperties(object2, goreContentSettingOrDefault, undefined));
Reflect.apply(updateSetting, GoreContentSettings, [object2]);
}
function useSensitiveContentFilterHelpArticle() { // fn#42406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5022:2104, offset: 0x0113909d, size: 31 bytes, params: 1, frame: 13
return env0_2.useMemo(function() {
return HelpdeskArticles.EXPLICIT_MEDIA_REDACTION;
}, []);
}
@@ -0,0 +1,20 @@
/* Metro module 4843; source: modules/explicit_media_redaction/SensitiveMediaRedactionSettingUtils.tsx; dependencies: [1314, 22, 2] */
function _fun42396(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5021:6, offset: 0x01138b7b, size: 105 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/explicit_media_redaction/SensitiveMediaRedactionSettingUtils.tsx');
exports.getShouldObscureForSetting = getShouldObscureForSetting;
exports.areSettingsEqual = areSettingsEqual;
}
function getShouldObscureForSetting(a0) { // fn#42397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5021:227, offset: 0x01138be4, size: 81 bytes, params: 2, frame: 14
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
const BLUR = ExplicitContentRedaction.BLUR;
return a0 === BLUR || a0 === ExplicitContentRedaction.BLOCK;
}
function areSettingsEqual(a0, a1) { // fn#42398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5021:379, offset: 0x01138c35, size: 45 bytes, params: 3, frame: 13
return (require(22) /* metro dependency 22 */).isEqual(a0, a1);
}
@@ -0,0 +1,106 @@
/* Metro module 9796; source: modules/explicit_media_redaction/hooks/useContentHarmTypes.tsx; dependencies: [31, 1348, 1379, 3793, 1878, 4838, 566, 4843, 4839, 2] */
function _fun76775(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9982:6, offset: 0x01de4727, size: 198 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = useEnabledHarmTypesBitmaskForChannelAndAuthorId;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/hooks/useContentHarmTypes.tsx');
exports.useEnabledHarmTypesBitmaskForChannelAndAuthorId = closure;
exports.useEnabledHarmTypesBitmaskForMessage = useEnabledHarmTypesBitmaskForMessage;
}
function useEnabledHarmTypesBitmaskForChannelAndAuthorId(a0, a1) { // fn#76776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9982:146, offset: 0x01de47ed, size: 349 bytes, params: 3, frame: 26
var r0;
const env0_0 = a0;
const env0_1 = a1;
var value;
const eligibleHarmTypesConfigsForContext = (require(4838) /* metro dependency 4838: ObscuredMediaUtils */).getEligibleHarmTypesConfigsForContext();
const env0_2 = eligibleHarmTypesConfigsForContext;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const value4 = env0_2.useMemo(_fun76781,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, RelationshipStore],
_fun76778), eligibleHarmTypesConfigsForContext,
(require(566) /* metro dependency 566: flux */).useStateFromStores([UserSettingsProtoStore], _fun76779,
[eligibleHarmTypesConfigsForContext],
(require(4843) /* metro dependency 4843: SensitiveMediaRedactionSettingUtils */).areSettingsEqual), a1,
currentUser]);
if (value4.length === 0) {
r0 = (require(4839) /* metro dependency 4839: HarmTypeConfiguration */).ContentHarmTypeBitMask.NONE;
} else {
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
value = value.contentHarmTypesToFlags(value4);
r0 = value;
}
return r0;
}
function useEnabledHarmTypesBitmaskForMessage(a0) { // fn#76784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9982:1119, offset: 0x01de4aaf, size: 77 bytes, params: 2, frame: 13
var r0;
var value;
if (a0 == null) {
r0 = {};
} else {
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
value = value.getChannelIdAndAuthorIdFromMessage(a0);
r0 = value;
}
return useEnabledHarmTypesBitmaskForChannelAndAuthorId(r0.channelId, r0.authorId);
}
function _fun76778() { // fn#76778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9982:357, offset: 0x01de494a, size: 71 bytes, params: 1, frame: 17
return (require(4838) /* metro dependency 4838: ObscuredMediaUtils */).getChannelTypeById(env0_0, require,
[ChannelStore, RelationshipStore]);
}
function _fun76779() { // fn#76779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9982:435, offset: 0x01de4991, size: 32 bytes, params: 1, frame: 13
return env0_2.reduce(function(a0, a1) {
var object = {};
copyDataProperties(object, a0, a1);
object[a1.harmType] = a1.getProtoUserSettings(UserSettingsProtoStore.settings);
return object;
}, {});
}
function _fun76781() { // fn#76781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9982:562, offset: 0x01de49e5, size: 99 bytes, params: 1, frame: 14
var r0;
var value;
if (channelTypeById == null) {
r0 = [];
} else if (require === currentUser?.id) {
r0 = [];
} else if (currentUser == null) {
r0 = [];
} else {
value = env0_2.map(_fun76782);
value = value.filter(function(a0) {
return a0 != null;
});
r0 = value;
}
return r0;
}
function _fun76782(a0) { // fn#76782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9982:620, offset: 0x01de4a48, size: 103 bytes, params: 2, frame: 14
var r4;
let value = environment.__proto__;
let property = env1_5[a0.harmType];
const channelTypeByIdBinding = channelTypeById;
const value2 = null;
if (value2 == channelTypeByIdBinding) {
r4 = value2;
} else {
property = a0.getUserSettingsWithDefaults(property)[channelTypeById];
r4 = property;
}
value = environment.__proto__.__proto__;
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
return value.shouldRedactForSettingValue(r4) ? a0.harmType : value2;
}
@@ -0,0 +1,67 @@
/* Metro module 13343; source: modules/explicit_media_redaction/hooks/useExplicitContentSettingsOrDefault.tsx; dependencies: [1348, 632, 4842, 4844, 2] */
function _fun101606(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13533:6, offset: 0x02219db6, size: 127 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/hooks/useExplicitContentSettingsOrDefault.tsx');
exports.useExplicitContentSettingOrDefault = useExplicitContentSettingOrDefault;
exports.useGoreContentSettingOrDefault = useGoreContentSettingOrDefault;
}
function useExplicitContentSettingOrDefault() { // fn#101607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13533:255, offset: 0x02219e35, size: 244 bytes, params: 1, frame: 20
var object2;
const value2 = undefined;
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([UserSettingsProtoStore],
_fun101608);
object2 = {};
object2.explicitContentGuilds = (require(4842) /* metro dependency 4842: SensitiveMediaExplicitRedactionSettingsUtils */).resolveExplicitContentSettingWithDefaults({setting: value3 == null ? value2 : value3.explicitContentGuilds});
object2.explicitContentNonFriendDm = (require(4842) /* metro dependency 4842: SensitiveMediaExplicitRedactionSettingsUtils */).resolveExplicitContentSettingWithDefaults({setting: value3 == null ? value2 : value3.explicitContentNonFriendDm,
isDm: true});
object2.explicitContentFriendDm = (require(4842) /* metro dependency 4842: SensitiveMediaExplicitRedactionSettingsUtils */).resolveExplicitContentSettingWithDefaults({'setting': null,
'isDm': true, 'isFriend': true, setting: value3 == null ? value2 : value3.explicitContentFriendDm});
return object2;
}
function useGoreContentSettingOrDefault() { // fn#101609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13533:902, offset: 0x02219f73, size: 244 bytes, params: 1, frame: 20
var object2;
const value2 = undefined;
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([UserSettingsProtoStore],
_fun101610);
object2 = {};
object2.goreContentGuilds = (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaults({setting: value3 == null ? value2 : value3.goreContentGuilds});
object2.goreContentNonFriendDm = (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaults({setting: value3 == null ? value2 : value3.goreContentNonFriendDm,
isDm: true});
object2.goreContentFriendDm = (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaults({'setting': null,
'isDm': true, 'isFriend': true, setting: value3 == null ? value2 : value3.goreContentFriendDm});
return object2;
}
function _fun101608() { // fn#101608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13533:304, offset: 0x02219f29, size: 74 bytes, params: 1, frame: 14
var r0;
let value = environment.__proto__;
const explicitContentSettings = UserSettingsProtoStore.settings.textAndImages?.explicitContentSettings;
if (explicitContentSettings != null) {
r0 = explicitContentSettings;
} else {
value = require(4842) /* metro dependency 4842: SensitiveMediaExplicitRedactionSettingsUtils */;
value = value.getExplicitContentSettingOrDefault();
r0 = value;
}
return r0;
}
function _fun101610() { // fn#101610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13533:951, offset: 0x0221a067, size: 74 bytes, params: 1, frame: 14
var r0;
let value = environment.__proto__;
const goreContentSettings = UserSettingsProtoStore.settings.textAndImages?.goreContentSettings;
if (goreContentSettings != null) {
r0 = goreContentSettings;
} else {
value = require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */;
value = value.getGoreContentSettingOrDefault();
r0 = value;
}
return r0;
}
@@ -0,0 +1,209 @@
/* Metro module 8009; source: modules/explicit_media_redaction/hooks/useExplicitMediaActions.tsx; dependencies: [5, 57, 31, 4131, 2] */
function _fun63610(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8187:6, offset: 0x01b8777d, size: 147 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/hooks/useExplicitMediaActions.tsx');
exports.useExplicitMediaActions = useExplicitMediaActions;
}
function useExplicitMediaActions({onError, onSuccess, report}) { // fn#63611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8187:255, offset: 0x01b87810, size: 149 bytes, params: 2, frame: 19
const env0_2 = report;
const binding = env0_4;
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
const object2 = {};
object2.reportFalsePositive = binding.useCallback(env0_2(_fun63613), [property, onError, onSuccess, report]);
object2.isReportFalsePositiveLoading = property;
return object2;
}
function* _fun63613() { // fn#63613, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8187:414, offset: 0x01b878ae, size: 197 bytes, params: 1, frame: 16
var value;
var value2;
var binding;
var value3;
var value4;
var value5;
var value6;
var error;
var value7;
var binding2;
var property;
var value8;
var APIError;
var prototype;
var aPIError;
var value10;
var value11;
exceptionLanding34: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = environment.__proto__;
if (!env1_4) {
env1_3(true);
reducibleJoin4: while (true) {
reduciblePort33: while (true) {
exceptionLanding15: while (true) {
try {
try {
binding = env1_2;
} catch (error) {
break exceptionLanding15;
}
} catch (error) {
break exceptionLanding34;
}
break reducibleJoin4;
}
value7 = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
break exceptionLanding34;
}
try {
binding2 = env2_1;
} catch (error) {
break exceptionLanding34;
}
try {
property = binding2[3];
} catch (error) {
break exceptionLanding34;
}
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding34;
}
try {
APIError = value8.APIError;
} catch (error) {
break exceptionLanding34;
}
try {
prototype = APIError.prototype;
} catch (error) {
break exceptionLanding34;
}
try {
} catch (error) {
break exceptionLanding34;
}
try {
aPIError = new APIError();
} catch (error) {
break exceptionLanding34;
}
try {
value10 = aPIError instanceof Object ? aPIError : undefined;
} catch (error) {
break exceptionLanding34;
}
try {
} catch (error) {
break exceptionLanding34;
}
try {
value11 = require == null;
} catch (error) {
break exceptionLanding34;
}
reducibleJoin33: while (true) {
if (value11) {
break reducibleJoin33;
}
try {
} catch (error) {
break exceptionLanding34;
}
try {
require(value10);
} catch (error) {
break exceptionLanding34;
}
break reducibleJoin33;
}
break reduciblePort33;
}
env1_3(false);
return undefined;
}
try {
try {
value3 = binding();
} catch (error) {
break exceptionLanding15;
}
} catch (error) {
break exceptionLanding34;
}
yield value3;
try {
try {
value4 = undefined;
value5 = false;
} catch (error) {
break exceptionLanding15;
}
} catch (error) {
break exceptionLanding34;
}
if (value5) {
env1_3(false);
return value4;
}
try {
try {
} catch (error) {
break exceptionLanding15;
}
} catch (error) {
break exceptionLanding34;
}
try {
try {
value6 = dependencyMap == null;
} catch (error) {
break exceptionLanding15;
}
} catch (error) {
break exceptionLanding34;
}
reducibleJoin13: while (true) {
if (value6) {
break reducibleJoin13;
}
try {
try {
} catch (error) {
break exceptionLanding15;
}
} catch (error) {
break exceptionLanding34;
}
try {
try {
dependencyMap();
} catch (error) {
break exceptionLanding15;
}
} catch (error) {
break exceptionLanding34;
}
break reducibleJoin13;
}
env1_3(false);
}
return undefined;
}
env1_3(false);
throw error;
}
@@ -0,0 +1,71 @@
/* Metro module 9795; source: modules/explicit_media_redaction/hooks/useExplicitMediaAttachmentsForMessage.tsx; dependencies: [4814, 632, 9796, 4838, 4841, 2] */
function _fun76766(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9981:6, offset: 0x01de443c, size: 127 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/hooks/useExplicitMediaAttachmentsForMessage.tsx');
exports.useRedactableMediaAttachmentsForMessage = useRedactableMediaAttachmentsForMessage;
exports.useRedactableMediaEmbedsForMessage = useRedactableMediaEmbedsForMessage;
}
function useRedactableMediaAttachmentsForMessage(a0, a1, a2) { // fn#76767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9981:262, offset: 0x01de44bb, size: 181 bytes, params: 4, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = undefined;
const message = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([MessageStore],
_fun76768);
const env0_3 = (require(9796) /* metro dependency 9796: useContentHarmTypes */).useEnabledHarmTypesBitmaskForMessage(message);
if (message == null) {
return [];
}
let r0 = message == null || message.attachments == null ? value2 : message.attachments.filter(value2 !== a2 ? _fun76769 : _fun76770);
r0 = r0 ?? [];
return r0;
}
function useRedactableMediaEmbedsForMessage(a0, a1, a2) { // fn#76771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9981:655, offset: 0x01de4609, size: 181 bytes, params: 4, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = undefined;
const message = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([MessageStore],
_fun76772);
const env0_3 = (require(9796) /* metro dependency 9796: useContentHarmTypes */).useEnabledHarmTypesBitmaskForMessage(message);
if (message == null) {
return [];
}
let r0 = message == null || message.embeds == null ? value2 : message.embeds.filter(value2 !== a2 ? function({id}) {
return id === importDefault;
} : _fun76774);
r0 = r0 ?? [];
return r0;
}
function _fun76768() { // fn#76768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9981:314, offset: 0x01de4570, size: 32 bytes, params: 1, frame: 13
return MessageStore.getMessage(env0_0, require);
}
function _fun76769(a0) { // fn#76769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9981:425, offset: 0x01de4590, size: 37 bytes, params: 2, frame: 4
return a0.url === importDefault || a0.id === importDefault;
}
function _fun76770(a0) { // fn#76770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9981:448, offset: 0x01de45b5, size: 84 bytes, params: 2, frame: 16
let value = environment.__proto__;
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
const isMediaObscuredForHarmTypes = value.isMediaObscuredForHarmTypes;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
const Attachment = ObscuredMediaTypes.Attachment;
return Reflect.apply(isMediaObscuredForHarmTypes, value, [{type: Attachment, media: a0}, env0_3]);
}
function _fun76774(a0) { // fn#76774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9981:830, offset: 0x01de46d3, size: 84 bytes, params: 2, frame: 16
let value = environment.__proto__;
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
const isMediaObscuredForHarmTypes = value.isMediaObscuredForHarmTypes;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
const Embed = ObscuredMediaTypes.Embed;
return Reflect.apply(isMediaObscuredForHarmTypes, value, [{type: Embed, media: a0}, env0_3]);
}
@@ -0,0 +1,13 @@
/* Metro module 13346; source: modules/explicit_media_redaction/hooks/useSensitiveMediaSettingDisabled.tsx; dependencies: [13347, 2] */
function _fun101622(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13536:6, offset: 0x0221a932, 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/explicit_media_redaction/hooks/useSensitiveMediaSettingDisabled.tsx');
exports.useSensitiveMediaSettingDisabled = useSensitiveMediaSettingDisabled;
}
function useSensitiveMediaSettingDisabled() { // fn#101623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13536:236, offset: 0x0221a992, size: 36 bytes, params: 1, frame: 11
return (require(13347) /* metro dependency 13347: useParentalControlSettings */).useIsParentallyControlled();
}
@@ -0,0 +1,26 @@
/* Metro module 10610; source: modules/explicit_media_redaction/hooks/useShouldRenderReportFalsePositiveButton.tsx; dependencies: [4822, 632, 2] */
function _fun81757(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10796:6, offset: 0x01edd27e, size: 127 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const explicitMediaStore = importDefault(4822) /* metro dependency 4822: ExplicitMediaStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/hooks/useShouldRenderReportFalsePositiveButton.tsx');
exports.shouldRenderReportFalsePositiveButton = shouldRenderReportFalsePositiveButton;
exports.useShouldRenderReportFalsePositiveButton = useShouldRenderReportFalsePositiveButton;
}
function shouldRenderReportFalsePositiveButton(a0) { // fn#81758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10796:263, offset: 0x01edd2fd, size: 29 bytes, params: 2, frame: 11
return ExplicitMediaStore.getFpMessageInfo(a0) != null;
}
function useShouldRenderReportFalsePositiveButton(a0) { // fn#81759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10796:337, offset: 0x01edd31a, size: 72 bytes, params: 2, frame: 14
const env0_0 = a0;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
return Reflect.apply(useStateFromStores, useStateFromStoresModule, [[ExplicitMediaStore], _fun81760]) != null;
}
function _fun81760() { // fn#81760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10796:378, offset: 0x01edd362, size: 27 bytes, params: 1, frame: 11
return ExplicitMediaStore.getFpMessageInfo(env0_0);
}
@@ -0,0 +1,197 @@
/* Metro module 11468; source: modules/explicit_media_redaction/native/ExplicitMediaLearnMoreActionSheet.tsx; dependencies: [31, 27, 4824, 661, 33, 4501, 697, 11469, 4813, 4821, 1244, 7007, 4080, 3853, 1948, 5263, 5074, 9794, 1962, 6275, 5473, 4573, 4578, 6766, 2] */
function _fun87797(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11654:6, offset: 0x01fcb755, size: 499 bytes, params: 8, frame: 23
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 env0_5 = (require(4824) /* metro dependency 4824: ExplicitMediaRedactionConstants */).EXPLICIT_MEDIA_FALSE_POSITIVE_ACTION_SHEET_KEY;
let value = require(661) /* metro dependency 661: Constants */;
const env0_6 = value.HelpdeskArticles;
const env0_7 = value.UserSettingsSections;
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 = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.paddingVertical = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.paddingHorizontal = PX_24;
object4.justifyContent = 'center';
object3.container = object4;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.art = {alignSelf: 'center', marginBottom: PX_16};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.infoHeader = {marginBottom: PX_8, alignItems: 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.info = {marginBottom: PX_24, alignItems: 'center'};
object3.infoDesc = {textAlign: 'center'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.buttonsContainer = {gap: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.linkSubtext = {textAlign: 'center', marginBottom: PX_8};
const env0_10 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/native/ExplicitMediaLearnMoreActionSheet.tsx');
exports.default = ExplicitMediaLearnMoreActionSheet;
}
function ExplicitMediaLearnMoreActionSheet({channelId, messageId, attachmentId, embedId}) { // fn#87798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11654:839, offset: 0x01fcb948, size: 1199 bytes, params: 2, frame: 37
const env0_3 = embedId;
const styles = useStyles();
const value2 = (importDefault(11469) /* metro dependency 11469: useUserIsConsideredAdult */)();
const value3 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useIsVerifiedTeen();
const value4 = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).useShouldAgeVerifyForExplicitMedia();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value5 = Reflect.apply(string, intl, [t['9KiIz6']]);
const value6 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5e0geG']);
const binding = env0_3;
const value7 = binding.useMemo(_fun87801, [value3, value4]);
const value8 = binding.useCallback(_fun87802, [channelId, messageId]);
binding.useEffect(_fun87804, [channelId, messageId]);
const value9 = binding.useCallback(_fun87805, [value7, value4, value8, channelId, messageId, attachmentId, embedId]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const ShieldSpotIllustration = (require(5473) /* metro dependency 5473: native */).ShieldSpotIllustration;
const items2 = [<View style={styles.art}><ShieldSpotIllustration height={120} width={120} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={styles.info}><Text style={styles.infoHeader} accessibilityRole="header" variant="heading-xl/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sGW77l)}</Text><Text style={styles.infoDesc} variant="text-md/medium" color="text-default">{value7 ? value6 : value2 ? intl.string(t.RUw0ZC) : intl.string(t['E/oQYL'])}</Text></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const object = {'variant': 'primary', 'size': 'md'};
if (value7) {
object.text = value5;
object.onPress = onPress_87800;
} else {
string = intl.string;
if (value2) {
object.text = Reflect.apply(string, intl, [t['9D+zGX']]);
object.onPress = onPress_87799;
} else {
object.text = Reflect.apply(string, intl, [t.hvVgAZ]);
object.onPress = function() {
importDefault(dependencyMap[13]).openURL(importDefault(dependencyMap[14]).getArticleURL(HelpdeskArticles.EXPLICIT_MEDIA_REDACTION));
};
}
}
const items3 = [<Button {...object} />];
items3[1] = <Button variant="secondary" size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bmbHPA)} onPress={onPress_87808} />;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
items3[2] = <TextWithIOSLinkWorkaround style={styles.linkSubtext} variant="text-sm/medium" color="text-muted">{value9()}</TextWithIOSLinkWorkaround>;
items2[2] = <View style={styles.buttonsContainer}>{items3}</View>;
return (
<BottomSheet startExpanded>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
}
function ExplicitMediaLearnMoreActionSheetOnPress() { // fn#87799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11654:1253, owner: ExplicitMediaLearnMoreActionSheet.onPress, offset: 0x01fcbdf7, size: 117 bytes, params: 1, frame: 15
const binding = env0_7;
const value = environment.__proto__;
const TrackMediaRedactionActionType = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TrackMediaRedactionActionType;
const EXPLICIT_MEDIA_LEARN_MORE_CLICK_SETTINGS = TrackMediaRedactionActionType.EXPLICIT_MEDIA_LEARN_MORE_CLICK_SETTINGS;
binding(EXPLICIT_MEDIA_LEARN_MORE_CLICK_SETTINGS);
const openUserSettingsModule = require(7007) /* metro dependency 7007: openUserSettings */;
const openUserSettings = openUserSettingsModule.openUserSettings;
const CONTENT_AND_SOCIAL = UserSettingsSections.CONTENT_AND_SOCIAL;
Reflect.apply(openUserSettings, openUserSettingsModule, [{screen: CONTENT_AND_SOCIAL}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function ExplicitMediaLearnMoreActionSheetOnPress_87800() { // fn#87800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11654:1581, owner: ExplicitMediaLearnMoreActionSheet.onPress, offset: 0x01fcbe6c, size: 131 bytes, params: 1, frame: 16
const binding = env0_7;
let value = environment.__proto__;
const TrackMediaRedactionActionType = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TrackMediaRedactionActionType;
const EXPLICIT_MEDIA_LEARN_MORE_CLICK_AGE_VERIFY_REVERIFY = TrackMediaRedactionActionType.EXPLICIT_MEDIA_LEARN_MORE_CLICK_AGE_VERIFY_REVERIFY;
binding(EXPLICIT_MEDIA_LEARN_MORE_CLICK_AGE_VERIFY_REVERIFY);
value = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
const showAgeVerificationGetStartedModal = value.showAgeVerificationGetStartedModal;
const AgeVerificationModalEntryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint;
const SENSITIVE_MEDIA_LEARN_MORE = AgeVerificationModalEntryPoint.SENSITIVE_MEDIA_LEARN_MORE;
Reflect.apply(showAgeVerificationGetStartedModal, value, [{entryPoint: SENSITIVE_MEDIA_LEARN_MORE}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun87801() { // fn#87801, offset: 0x01fcbeef, size: 16 bytes, params: 1, frame: 3
return env0_4 && env0_5;
}
function _fun87802(a0) { // fn#87802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11654:1170, offset: 0x01fcbeff, size: 66 bytes, params: 2, frame: 14
const value = environment.__proto__;
(require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).trackMediaRedactionAction({action: a0,
channelId: channelId, messageId: messageId});
}
function _fun87804() { // fn#87804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11654:1877, offset: 0x01fcbf88, size: 84 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
const trackMediaRedactionAction = value.trackMediaRedactionAction;
const TrackMediaRedactionActionType = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TrackMediaRedactionActionType;
const EXPLICIT_MEDIA_LEARN_MORE_VIEWED = TrackMediaRedactionActionType.EXPLICIT_MEDIA_LEARN_MORE_VIEWED;
Reflect.apply(trackMediaRedactionAction, value, [{action: EXPLICIT_MEDIA_LEARN_MORE_VIEWED, channelId: channelId,
messageId: messageId}]);
}
function _fun87805() { // fn#87805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11654:2051, offset: 0x01fcbfdc, size: 179 bytes, params: 1, frame: 17
var environment;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
if (env0_6) {
value = environment.__proto__;
value = intl.format(t['TGqx+i'], {handleOnHelpUrlHook: handleOnHelpUrlHook});
r0 = value;
} else {
value = null;
if (env0_5) {
r0 = value;
} else {
value = environment.__proto__;
value = intl.format(t.Ge0HUi, {handleFalsePositiveHook: handleFalsePositiveHook_87807});
r0 = value;
}
}
return r0;
}
function ExplicitMediaLearnMoreActionSheetOnPress_87808() { // fn#87808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11654:3685, owner: ExplicitMediaLearnMoreActionSheet.onPress, offset: 0x01fcc1a7, size: 77 bytes, params: 1, frame: 14
const binding = env0_7;
const value = environment.__proto__;
const TrackMediaRedactionActionType = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TrackMediaRedactionActionType;
const EXPLICIT_MEDIA_LEARN_MORE_CLICK_DISMISS = TrackMediaRedactionActionType.EXPLICIT_MEDIA_LEARN_MORE_CLICK_DISMISS;
binding(EXPLICIT_MEDIA_LEARN_MORE_CLICK_DISMISS);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function handleOnHelpUrlHook() { // fn#87806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11654:2120, offset: 0x01fcc08f, size: 111 bytes, params: 1, frame: 16
const defaultImport = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
const openUrl = defaultImport.openUrl;
const defaultImport2 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport2.getArticleURL;
const TIGGER_PAWTECT_LEARN_MORE = HelpdeskArticles.TIGGER_PAWTECT_LEARN_MORE;
Reflect.apply(openUrl, defaultImport, [Reflect.apply(getArticleURL, defaultImport2, [TIGGER_PAWTECT_LEARN_MORE])]);
const binding = env1_7;
const TrackMediaRedactionActionType = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TrackMediaRedactionActionType;
const EXPLICIT_MEDIA_LEARN_MORE_CLICK_AGE_VERIFY_LEARN_MORE = TrackMediaRedactionActionType.EXPLICIT_MEDIA_LEARN_MORE_CLICK_AGE_VERIFY_LEARN_MORE;
binding(EXPLICIT_MEDIA_LEARN_MORE_CLICK_AGE_VERIFY_LEARN_MORE);
}
function handleFalsePositiveHook_87807() { // fn#87807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11654:2364, offset: 0x01fcc0fe, size: 169 bytes, params: 1, frame: 19
importDefault(dependencyMap[12]).hideActionSheet();
const binding = env1_7;
const TrackMediaRedactionActionType = require(dependencyMap[9]).TrackMediaRedactionActionType;
const EXPLICIT_MEDIA_LEARN_MORE_CLICK_FALSE_POSITIVE = TrackMediaRedactionActionType.EXPLICIT_MEDIA_LEARN_MORE_CLICK_FALSE_POSITIVE;
binding(EXPLICIT_MEDIA_LEARN_MORE_CLICK_FALSE_POSITIVE);
const defaultImport2 = importDefault(dependencyMap[12]);
defaultImport2.openLazy(require(dependencyMap[18])(dependencyMap[17], dependencyMap.paths),
EXPLICIT_MEDIA_FALSE_POSITIVE_ACTION_SHEET_KEY, {channelId: channelId, messageId: messageId,
attachmentId: attachmentId, embedId: embedId});
}
@@ -0,0 +1,105 @@
/* Metro module 13344; source: modules/explicit_media_redaction/native/ExplicitMediaRedactionNativeUtils.tsx; dependencies: [1878, 4824, 9615, 1314, 1244, 4821, 5263, 5074, 4080, 13345, 1962, 4838, 4841, 2] */
function _fun101611(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13534:6, offset: 0x0221a0b1, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_4 = (require(4824) /* metro dependency 4824: ExplicitMediaRedactionConstants */).EXPLICIT_MEDIA_SETTINGS_ACTION_SHEET_KEY;
const env0_5 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchMediaTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/native/ExplicitMediaRedactionNativeUtils.tsx');
exports.handleSensitiveMediaFilterPress = handleSensitiveMediaFilterPress;
exports.shouldAgeVerifyForSearchMedia = shouldAgeVerifyForSearchMedia;
}
function handleSensitiveMediaFilterPress({title, subtitle, handlePress, excluded, currentValue}) { // fn#101612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13534:330, offset: 0x0221a160, size: 662 bytes, params: 2, frame: 26
const ExplicitContentRedaction = require(dependencyMap[3]).ExplicitContentRedaction;
var push;
var object2;
const intl = require(dependencyMap[4]).intl;
const t = require(dependencyMap[4]).t;
var object4;
const nsfwAllowed = UserStore.getCurrentUser()?.nsfwAllowed;
const items2 = [];
let r3 = excluded != null && excluded.includes(ExplicitContentRedaction.SHOW);
r3 = !r3 ? !nsfwAllowed : r3;
if (!r3) {
push = items2.push;
object2 = {};
object2.value = ExplicitContentRedaction.SHOW;
object2.label = intl.string(t['5k5OFp']);
object2.onPress = onPress_101613;
Reflect.apply(push, items2, [object2]);
}
if (!(excluded != null && excluded.includes(ExplicitContentRedaction.BLUR))) {
items2.push({value: ExplicitContentRedaction.BLUR, label: intl.string(t.S49Uad), onPress: function() {
handlePress(require(dependencyMap[3]).ExplicitContentRedaction.BLUR);
}});
}
if (!(excluded != null && excluded.includes(ExplicitContentRedaction.BLOCK))) {
push = items2.push;
object4 = {};
object4.value = ExplicitContentRedaction.BLOCK;
object4.label = intl.string(t['D/157Y']);
object4.onPress = function() {
handlePress(require(dependencyMap[3]).ExplicitContentRedaction.BLOCK);
};
Reflect.apply(push, items2, [object4]);
}
const defaultImport = importDefault(dependencyMap[8]);
defaultImport.openLazy(require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths),
EXPLICIT_MEDIA_SETTINGS_ACTION_SHEET_KEY, {title: title, subtitle: subtitle, options: items2,
currentValue: currentValue});
}
function shouldAgeVerifyForSearchMedia(a0, a1) { // fn#101616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13534:1385, offset: 0x0221a4f4, size: 367 bytes, params: 3, frame: 20
var r1;
var r0;
const ObscuredMediaTypes = (require(4841) /* metro dependency 4841: ExplicitMediaRedactionModels */).ObscuredMediaTypes;
let value = null;
if (value == a1) {
return false;
}
const enabledHarmTypesForMessage = (require(4838) /* metro dependency 4838: ObscuredMediaUtils */).getEnabledHarmTypesForMessage(a1);
if (enabledHarmTypesForMessage === 0) {
return false;
}
const type = a0.type;
const ATTACHMENT = SearchMediaTypes.ATTACHMENT;
const r5 = type === ATTACHMENT ? {type: ObscuredMediaTypes.Attachment,
media: a0.attachment} : a0.type === SearchMediaTypes.EMBED ? {type: ObscuredMediaTypes.Embed,
media: a0.embed} : a0.type !== SearchMediaTypes.COMPONENT ? value : {type: ObscuredMediaTypes.GenericMedia,
media: a0.unfurledMediaItem};
value = value != r5;
if (value) {
value = require(4838) /* metro dependency 4838: ObscuredMediaUtils */;
value = value.isMediaObscuredForHarmTypes(r5, enabledHarmTypesForMessage);
if (value) {
value = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
value = value.shouldAgeVerifyForExplicitMedia();
r1 = value;
} else {
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
function handleSensitiveMediaFilterPressOnPress() { // fn#101613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13534:629, owner: handleSensitiveMediaFilterPress.onPress, offset: 0x0221a3f6, size: 152 bytes, params: 1, frame: 15
var defaultImport;
var showAgeVerificationGetStartedModal;
var object2;
const explicitMediaRedactionUtilsModule = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
if (explicitMediaRedactionUtilsModule.shouldAgeVerifyForExplicitMedia()) {
defaultImport = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
showAgeVerificationGetStartedModal = defaultImport.showAgeVerificationGetStartedModal;
object2 = {};
object2.entryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint.OBSCURED_MEDIA;
Reflect.apply(showAgeVerificationGetStartedModal, defaultImport, [object2]);
} else {
handlePress((require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction.SHOW);
}
}
@@ -0,0 +1,69 @@
/* Metro module 13345; source: modules/explicit_media_redaction/native/ExplicitMediaSettingsActionSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 4080, 6275, 6758, 7988, 1314, 7987, 2] */
function _fun101617(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13535:6, offset: 0x0221a663, size: 256 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 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.marginTop = PX_24;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const env0_7 = Reflect.apply(createStyles, value, [{content: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/native/ExplicitMediaSettingsActionSheet.tsx');
exports.default = ExplicitMediaSettingsActionSheet;
}
function ExplicitMediaSettingsActionSheet({title, subtitle, options, currentValue}) { // fn#101618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13535:373, offset: 0x0221a763, size: 303 bytes, params: 2, frame: 26
const styles = useStyles();
const value2 = env0_3.useCallback(_fun101619, [options]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const bottomSheetTitleHeader = <BottomSheetTitleHeader title={title} subtitle={subtitle} />;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
return (
<BottomSheet startExpanded>
{bottomSheetTitleHeader}
<View style={styles.content}>
<TableRadioGroup
defaultValue={currentValue ?? (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction.SHOW}
onChange={value2}
hasIcons={false}
>
{options.map(_fun101621)}
</TableRadioGroup>
</View>
</BottomSheet>
);
}
function _fun101619(a0) { // fn#101619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13535:489, offset: 0x0221a892, size: 88 bytes, params: 2, frame: 11
var environment;
const env0_0 = a0;
let value = options.find(_fun101620);
if (value != null) {
value.onPress();
value = environment.__proto__;
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
value.hideActionSheet();
}
}
function _fun101621(a0) { // fn#101621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13535:849, offset: 0x0221a8ea, size: 72 bytes, params: 2, frame: 16
const value = environment.__proto__;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={a0.label}
value={a0.value}
key={a0.value}
/>
);
}
@@ -0,0 +1,190 @@
/* Metro module 8010; source: modules/explicit_media_redaction/native/false_positive_reporting/ExplicitMediaFalsePositiveActionSheet.tsx; dependencies: [31, 27, 33, 4660, 8011, 4501, 697, 1305, 4080, 3857, 8035, 8036, 1244, 3856, 4821, 6275, 4573, 4578, 2] */
function _fun63614(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8188:6, offset: 0x01b87973, size: 665 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.Image;
const env0_6 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const ExplicitMediaFalsePositivePreviewEmbed = function({embed}) {
var r5;
var value = undefined;
r5 = value === embed.video ? embed.thumbnail == null ? value : embed.thumbnail.url : embed.type !== 'gifv' ? embed.video.url : embed.thumbnail == null ? value : embed.thumbnail.url;
var value2 = null;
return value2 == r5 ? value2 : <ExplicitMediaFalsePositivePreview url={r5} />;
};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
object2.contentContainer = {'justifyContent': 'center', 'textAlign': 'center', 'alignItems': 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.heading = {marginBottom: PX_8};
const object3 = {width: '100%'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.padding = PX_16;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.marginTop = PX_8;
object3.aspectRatio = '4 / 3';
object2.mediaContainer = object3;
const nativeModule = require(1305) /* metro dependency 1305: native */;
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
const FOUR_DP_ELEVATION_SHADOW_PARAMS = nativeModule.FOUR_DP_ELEVATION_SHADOW_PARAMS;
object2.elevationShadow = Reflect.apply(generateBoxShadowStyle, nativeModule, [FOUR_DP_ELEVATION_SHADOW_PARAMS]);
object2.image = {resizeMode: 'contain'};
const object5 = {flex: 1};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.media = object5;
const object8 = {};
const MOBILE_ACTIONSHEET_GRADIENT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_GRADIENT_BACKGROUND_DEFAULT;
object8.backgroundColor = MOBILE_ACTIONSHEET_GRADIENT_BACKGROUND_DEFAULT;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.paddingVertical = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingHorizontal = PX_16;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.gap = PX_8;
object2.footer = object8;
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/native/false_positive_reporting/ExplicitMediaFalsePositiveActionSheet.tsx');
exports.handleSuccess = handleSuccess;
exports.handleError = handleError_63619;
exports.ExplicitMediaFalsePositiveActionSheet = ExplicitMediaFalsePositiveActionSheet;
}
function ExplicitMediaFalsePositivePreviewAttachment(a0) { // fn#63616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8188:429, offset: 0x01b87c75, size: 50 bytes, params: 2, frame: 14
const url = a0.attachment.url;
const value = null;
return value == url ? value : <ExplicitMediaFalsePositivePreview url={url} />;
}
function ExplicitMediaFalsePositivePreview({url}) { // fn#63617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8188:560, offset: 0x01b87ca7, size: 225 bytes, params: 2, frame: 21
var r4;
var value;
const styles = useStyles();
const isVideo2 = (require(4660) /* metro dependency 4660: UploadUtils */).isVideo(url);
const items2 = [styles.mediaContainer];
items2[1] = styles.elevationShadow;
if (isVideo2) {
value = importDefault(8011) /* metro dependency 8011 */;
value = ((Component) => <Component volume={0} resizeMode="cover" repeat style={styles.media} source={{uri: url}} controls paused />)(value);
r4 = value;
} else {
r4 = <Image style={[styles.media, styles.image]} source={{uri: url}} />;
}
return (
<View style={items2}>
{r4}
</View>
);
}
function handleSuccess(a0) { // fn#63618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8188:1703, offset: 0x01b87d88, size: 182 bytes, params: 2, frame: 17
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(a0);
const defaultImport2 = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = defaultImport2.open;
const object2 = {key: 'explicit_media_report_false_positive_success',
icon: importDefault(8035) /* metro dependency 8035 */};
const ShieldIcon = (require(8036) /* metro dependency 8036: ShieldIcon */).ShieldIcon;
object2.IconComponent = ShieldIcon;
object2.iconColor = 'text-brand';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gFsTKu);
Reflect.apply(open, defaultImport2, [object2]);
}
function handleError_63619() { // fn#63619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8188:1957, offset: 0x01b87e3e, size: 85 bytes, params: 1, frame: 16
const value = require(3856) /* metro dependency 3856: ToastUtils */;
const presentError = value.presentError;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const R0RpRX = (require(1244) /* metro dependency 1244: indexNative */).t.R0RpRX;
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
}
function ExplicitMediaFalsePositiveActionSheet({channelId, messageId, isReportFalsePositiveLoading, attachmentPreview, embedPreview, onConfirmPress, analyticsContext}) { // fn#63620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8188:2084, offset: 0x01b87e93, size: 793 bytes, params: 2, frame: 34
const env0_3 = analyticsContext;
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useCallback(_fun63621, [channelId, messageId, analyticsContext]);
const value3 = binding.useCallback(function() {
if (onConfirmPress != null) {
onConfirmPress();
}
var moduleValue = require(dependencyMap[14]);
var object = {action: require(dependencyMap[14]).TrackMediaRedactionActionType.EXPLICIT_MEDIA_FALSE_POSITIVE_CLICK_CONFIRM};
object.channelId = channelId;
object.messageId = messageId;
object.context = analyticsContext;
moduleValue.trackMediaRedactionAction(object);
}, [channelId, messageId, analyticsContext, onConfirmPress]);
binding.useEffect(_fun63623, [channelId, messageId, analyticsContext]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const TPpVkI = (require(1244) /* metro dependency 1244: indexNative */).t.TPpVkI;
const items2 = [<Text style={styles.heading} variant="heading-lg/bold">{Reflect.apply(string, intl,
[TPpVkI])}</Text>];
items2[1] = <Text variant="text-sm/normal">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['z4du/I'])}</Text>;
items2[2] = attachmentPreview != null && <ExplicitMediaFalsePositivePreviewAttachment attachment={attachmentPreview} />;
items2[3] = embedPreview != null && <ExplicitMediaFalsePositivePreviewEmbed embed={embedPreview} />;
const scrollView = <ScrollView style={styles.content} contentContainerStyle={styles.contentContainer}>{items2}</ScrollView>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<BottomSheet startExpanded>
<View>
{scrollView}
<View style={styles.footer}>
<Button
variant="primary"
size="md"
disabled={isReportFalsePositiveLoading}
loading={isReportFalsePositiveLoading}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cY+Oob'])}
onPress={value3}
/>
<Button
variant="secondary"
size="md"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
onPress={value2}
/>
</View>
</View>
</BottomSheet>
);
}
function _fun63621() { // fn#63621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8188:2287, offset: 0x01b881ac, size: 118 bytes, params: 1, frame: 16
const value = environment.__proto__;
const explicitMediaRedactionUtilsModule = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
const trackMediaRedactionAction = explicitMediaRedactionUtilsModule.trackMediaRedactionAction;
const TrackMediaRedactionActionType = explicitMediaRedactionUtilsModule.TrackMediaRedactionActionType;
const EXPLICIT_MEDIA_FALSE_POSITIVE_CLICK_CANCEL = TrackMediaRedactionActionType.EXPLICIT_MEDIA_FALSE_POSITIVE_CLICK_CANCEL;
Reflect.apply(trackMediaRedactionAction, explicitMediaRedactionUtilsModule,
[{action: EXPLICIT_MEDIA_FALSE_POSITIVE_CLICK_CANCEL, channelId: channelId, messageId: messageId,
context: analyticsContext}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun63623() { // fn#63623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8188:2720, offset: 0x01b88292, size: 92 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */;
const trackMediaRedactionAction = value.trackMediaRedactionAction;
const TrackMediaRedactionActionType = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TrackMediaRedactionActionType;
const EXPLICIT_MEDIA_FALSE_POSITIVE_VIEWED = TrackMediaRedactionActionType.EXPLICIT_MEDIA_FALSE_POSITIVE_VIEWED;
Reflect.apply(trackMediaRedactionAction, value, [{action: EXPLICIT_MEDIA_FALSE_POSITIVE_VIEWED,
channelId: channelId, messageId: messageId, context: analyticsContext}]);
}
@@ -0,0 +1,62 @@
/* Metro module 9794; source: modules/explicit_media_redaction/native/false_positive_reporting/ExplicitMediaObscuredFalsePositiveActionSheet.tsx; dependencies: [31, 4824, 33, 9795, 8009, 8010, 4846, 4080, 4821, 2] */
function _fun76758(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9980:6, offset: 0x01de4101, size: 164 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(4824) /* metro dependency 4824: ExplicitMediaRedactionConstants */).EXPLICIT_MEDIA_FALSE_POSITIVE_ACTION_SHEET_KEY;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/native/false_positive_reporting/ExplicitMediaObscuredFalsePositiveActionSheet.tsx');
exports.default = ExplicitMediaObscuredFalsePositiveActionSheet_76759;
}
function ExplicitMediaObscuredFalsePositiveActionSheet_76759({channelId, messageId, attachmentId, embedId}) { // fn#76759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9980:335, offset: 0x01de41a5, size: 448 bytes, params: 2, frame: 24
const value3 = (require(9795) /* metro dependency 9795: useExplicitMediaAttachmentsForMessage */).useRedactableMediaAttachmentsForMessage(channelId,
messageId, attachmentId);
const value4 = (require(9795) /* metro dependency 9795: useExplicitMediaAttachmentsForMessage */).useRedactableMediaEmbedsForMessage(channelId,
messageId, embedId);
const env0_3 = value4;
const {reportFalsePositive,
isReportFalsePositiveLoading} = (require(8009) /* metro dependency 8009: useExplicitMediaActions */).useExplicitMediaActions({onSuccess: function() {
return require(dependencyMap[5]).handleSuccess(EXPLICIT_MEDIA_FALSE_POSITIVE_ACTION_SHEET_KEY);
}, onError: onError, report: report_76762});
if (!((value3?.length ?? 0) > 0) && !((value4?.length ?? 0) > 0)) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
const value9 = env0_3.useCallback(function() {
reportFalsePositive();
}, [reportFalsePositive]);
const ExplicitMediaFalsePositiveActionSheet = (require(8010) /* metro dependency 8010: ExplicitMediaFalsePositiveActionSheet */).ExplicitMediaFalsePositiveActionSheet;
const explicitMediaFalsePositiveActionSheetProps = {channelId: channelId, messageId: messageId,
isReportFalsePositiveLoading: isReportFalsePositiveLoading,
attachmentPreview: value3.length !== 1 ? undefined : value3[0],
embedPreview: value4.length !== 1 ? undefined : value4[0], onConfirmPress: value9};
const TrackMediaRedactionContext = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TrackMediaRedactionContext;
const EXPLICIT_MEDIA_OBSCURED_FALSE_POSITIVE_FLOW = TrackMediaRedactionContext.EXPLICIT_MEDIA_OBSCURED_FALSE_POSITIVE_FLOW;
explicitMediaFalsePositiveActionSheetProps.analyticsContext = EXPLICIT_MEDIA_OBSCURED_FALSE_POSITIVE_FLOW;
return <ExplicitMediaFalsePositiveActionSheet {...explicitMediaFalsePositiveActionSheetProps} />;
}
function ExplicitMediaObscuredFalsePositiveActionSheet_76759OnError() { // fn#76761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9980:641, owner: ExplicitMediaObscuredFalsePositiveActionSheet_76759.onError, offset: 0x01de438f, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(8010) /* metro dependency 8010: ExplicitMediaFalsePositiveActionSheet */).handleError();
}
function ExplicitMediaObscuredFalsePositiveActionSheet_76759Report() { // fn#76762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9980:674, owner: ExplicitMediaObscuredFalsePositiveActionSheet_76759.report, offset: 0x01de43b4, size: 136 bytes, params: 1, frame: 22
var environment;
let value = environment.__proto__;
value = undefined;
const explicitMediaRedactionActionCreatorsModule = require(4846) /* metro dependency 4846: ExplicitMediaRedactionActionCreators */;
const reportFalsePositive = explicitMediaRedactionActionCreatorsModule.reportFalsePositive;
const channelIdBinding = channelId;
const messageIdBinding = messageId;
let r1 = env0_2 == null ? value : env0_2.map(function(a0) {
return a0.id;
});
r1 = r1 ?? [];
return Reflect.apply(reportFalsePositive, explicitMediaRedactionActionCreatorsModule, [channelIdBinding,
messageIdBinding, r1, env0_3.map(function(a0) {
return a0.id;
}) ?? []]);
}
@@ -0,0 +1,65 @@
/* Metro module 8008; source: modules/explicit_media_redaction/native/false_positive_reporting/ExplicitMediaSenderFalsePositiveActionSheet.tsx; dependencies: [31, 4822, 4824, 33, 632, 8009, 8010, 8007, 4846, 4080, 4821, 2] */
function _fun63601(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8186:6, offset: 0x01b8747e, size: 178 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 */;
const explicitMediaStore = importDefault(4822) /* metro dependency 4822: ExplicitMediaStore */;
const env0_5 = (require(4824) /* metro dependency 4824: ExplicitMediaRedactionConstants */).EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_ACTION_SHEET_KEY;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/explicit_media_redaction/native/false_positive_reporting/ExplicitMediaSenderFalsePositiveActionSheet.tsx');
exports.default = ExplicitMediaObscuredFalsePositiveActionSheet;
}
function ExplicitMediaObscuredFalsePositiveActionSheet({channelId, messageId}) { // fn#63602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8186:351, offset: 0x01b87530, size: 359 bytes, params: 2, frame: 20
const fpMessageInfo = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ExplicitMediaStore],
function() {
return ExplicitMediaStore.getFpMessageInfo(messageId);
});
const env0_2 = fpMessageInfo.attachments.map(function(a0) {
return a0.id;
});
const env0_3 = fpMessageInfo.attachments.map(function(a0) {
return a0.filename;
});
const {reportFalsePositive,
isReportFalsePositiveLoading} = (require(8009) /* metro dependency 8009: useExplicitMediaActions */).useExplicitMediaActions({onSuccess: onSuccess_63606,
onError: onError, report: report_63608});
if (!(fpMessageInfo.attachments.length > 0)) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
const value3 = env0_3.useCallback(function() {
reportFalsePositive();
}, [reportFalsePositive]);
const ExplicitMediaFalsePositiveActionSheet = (require(8010) /* metro dependency 8010: ExplicitMediaFalsePositiveActionSheet */).ExplicitMediaFalsePositiveActionSheet;
const TrackMediaRedactionContext = (require(4821) /* metro dependency 4821: ExplicitMediaRedactionUtils */).TrackMediaRedactionContext;
const EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_FLOW = TrackMediaRedactionContext.EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_FLOW;
return (
<ExplicitMediaFalsePositiveActionSheet
channelId={channelId}
messageId={messageId}
isReportFalsePositiveLoading={isReportFalsePositiveLoading}
onConfirmPress={value3}
analyticsContext={EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_FLOW}
/>
);
}
function ExplicitMediaObscuredFalsePositiveActionSheetOnSuccess() { // fn#63606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8186:612, owner: ExplicitMediaObscuredFalsePositiveActionSheet.onSuccess, offset: 0x01b876bd, size: 81 bytes, params: 1, frame: 15
let value = environment.__proto__;
(require(8010) /* metro dependency 8010: ExplicitMediaFalsePositiveActionSheet */).handleSuccess(EXPLICIT_MEDIA_SENDER_FALSE_POSITIVE_ACTION_SHEET_KEY);
value = importDefault(8007) /* metro dependency 8007: ExplicitMediaFalsePositiveActionCreators */;
value.disableFalsePositiveButton(channelId, messageId);
}
function ExplicitMediaObscuredFalsePositiveActionSheetOnError() { // fn#63607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8186:691, owner: ExplicitMediaObscuredFalsePositiveActionSheet.onError, offset: 0x01b8770e, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(8010) /* metro dependency 8010: ExplicitMediaFalsePositiveActionSheet */).handleError();
}
function ExplicitMediaObscuredFalsePositiveActionSheetReport() { // fn#63608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8186:724, owner: ExplicitMediaObscuredFalsePositiveActionSheet.report, offset: 0x01b87733, size: 59 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(4846) /* metro dependency 4846: ExplicitMediaRedactionActionCreators */;
return value.reportFailedSendFalsePositive(channelId, messageId, env0_2, env0_3);
}