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,10 @@
/* Metro module 16143; source: modules/notifications/native/ClearChannelNotificationsOnAppForegroundExperiment.tsx; dependencies: [1854, 2] */
function _fun124722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16351:6, offset: 0x025c1b2d, size: 158 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2025-10-clear-channel-notifications-on-app-foreground-ios',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/ClearChannelNotificationsOnAppForegroundExperiment.tsx');
exports.shouldClearChannelNotificationsOnAppForeground = shouldClearChannelNotificationsOnAppForeground;
}
@@ -0,0 +1,11 @@
/* Metro module 9904; source: modules/notifications/native/Constants.tsx; dependencies: [2] */
function _fun77623(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10090:6, offset: 0x01e04605, size: 150 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/Constants.tsx');
exports.NotificationUserFeedbackReasons = {TOO_MANY: 'TOO_MANY', IRRELEVANT: 'IRRELEVANT',
DISLIKE_CONTENT: 'DISLIKE_CONTENT', IRRELEVANT_CHANNEL: 'IRRELEVANT_CHANNEL',
IRRELEVANT_USER: 'IRRELEVANT_USER', IRRELEVANT_TOPIC: 'IRRELEVANT_TOPIC',
SENSITIVE_OR_OFFENSIVE_TOPIC: 'SENSITIVE_OR_OFFENSIVE_TOPIC'};
}
@@ -0,0 +1,80 @@
/* Metro module 9903; source: modules/notifications/native/GuildHighlightsNotificationsActionCreators.tsx; dependencies: [9904, 661, 4080, 9905, 1962, 1244, 683, 2] */
function _fun77619(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10089:6, offset: 0x01e0427a, size: 146 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(9904) /* metro dependency 9904: Constants */).NotificationUserFeedbackReasons;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/GuildHighlightsNotificationsActionCreators.tsx');
exports.openGuildHighlightNotificationForPush = openGuildHighlightNotificationForPush;
}
function openGuildHighlightNotificationForPush(a0, a1, a2, a3, a4) { // fn#77620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10089:312, offset: 0x01e0430c, size: 498 bytes, params: 6, frame: 26
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
const env0_4 = a4;
const defaultImport = importDefault(dependencyMap[2]);
const openLazy = defaultImport.openLazy;
const value2 = require(dependencyMap[4])(dependencyMap[3], dependencyMap.paths);
const object = {};
const TOO_MANY = NotificationUserFeedbackReasons.TOO_MANY;
object.value = TOO_MANY;
const intl = require(dependencyMap[5]).intl;
let string = intl.string;
const t = require(dependencyMap[5]).t;
object.label = Reflect.apply(string, intl, [t.pLeQp0]);
const items2 = [object];
const IRRELEVANT_CHANNEL = NotificationUserFeedbackReasons.IRRELEVANT_CHANNEL;
string = intl.string;
const Lu4n25 = t.Lu4n25;
items2[1] = {value: IRRELEVANT_CHANNEL, label: Reflect.apply(string, intl, [Lu4n25])};
const IRRELEVANT_USER = NotificationUserFeedbackReasons.IRRELEVANT_USER;
string = intl.string;
const TF6AhF = t.TF6AhF;
items2[2] = {value: IRRELEVANT_USER, label: Reflect.apply(string, intl, [TF6AhF])};
const object2 = {};
const IRRELEVANT_TOPIC = NotificationUserFeedbackReasons.IRRELEVANT_TOPIC;
object2.value = IRRELEVANT_TOPIC;
object2.label = intl.string(t['s+8J8f']);
items2[3] = object2;
const SENSITIVE_OR_OFFENSIVE_TOPIC = NotificationUserFeedbackReasons.SENSITIVE_OR_OFFENSIVE_TOPIC;
items2[4] = {value: SENSITIVE_OR_OFFENSIVE_TOPIC, label: intl.string(t.fEUR7Y)};
Reflect.apply(openLazy, defaultImport, [value2, 'GuildHighlightsNotifications', {guildId: a0,
feedbackSettings: {reasons: items2, onFeedbackShown: onFeedbackShown,
onFeedbackCompleted: onFeedbackCompleted}}]);
}
function onFeedbackShown() { // fn#77621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10089:858, owner: openGuildHighlightNotificationForPush.onFeedbackShown, offset: 0x01e044fe, size: 111 bytes, params: 1, frame: 17
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEEDBACK_FORM_VIEWED = AnalyticEvents.FEEDBACK_FORM_VIEWED;
const object2 = {};
object2.type = importDefault;
object2.location = importAll;
object2.guild_id = env0_0;
const channel_id = require.channel_id;
object2.channel_id = channel_id;
object2.message_id = require.id;
copyDataProperties(object2, env0_4, channel_id);
Reflect.apply(track, defaultImport, [FEEDBACK_FORM_VIEWED, object2]);
}
function onFeedbackCompleted({rating, reason}) { // fn#77622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10089:998, owner: openGuildHighlightNotificationForPush.onFeedbackCompleted, offset: 0x01e0456d, size: 152 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FEEDBACK_FORM_SUBMITTED = AnalyticEvents.FEEDBACK_FORM_SUBMITTED;
const object2 = {};
object2.type = importDefault;
object2.location = importAll;
object2.rating = rating;
const value3 = reason == null;
object2.reason = value3 ? undefined : reason.value;
object2.guild_id = env0_0;
object2.channel_id = require.channel_id;
object2.message_id = require.id;
copyDataProperties(object2, env0_4, value3);
Reflect.apply(track, defaultImport, [FEEDBACK_FORM_SUBMITTED, object2]);
}
@@ -0,0 +1,249 @@
/* Metro module 9905; source: modules/notifications/native/GuildHighlightsNotificationsActionSheet.tsx; dependencies: [57, 31, 27, 1867, 4864, 661, 9906, 33, 4501, 697, 6819, 4573, 9907, 632, 1244, 9908, 1585, 6275, 6277, 6766, 1948, 4017, 6239, 7972, 6613, 6610, 4080, 2] */
function _fun77624(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10091:6, offset: 0x01e0469b, size: 616 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.HelpdeskArticles;
const env0_9 = value.HighlightSettings;
const env0_10 = (require(9906) /* metro dependency 9906: Constants */).FeedbackRating;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const env0_13 = Reflect.apply(createStyles, value, [{contentContainer: {'padding': 24, 'alignItems': 'center',
'justifyContent': 'center'}, header: {'alignItems': 'center', 'paddingBottom': 24},
headerTitle: {marginBottom: 4}, centerText: {textAlign: 'center'}, feedback: {'marginTop': 16,
'alignItems': 'stretch', 'alignSelf': 'stretch', 'paddingBottom': 16}, thanks: {'height': 40,
'textAlign': 'center', 'textAlignVertical': 'center'}, settings: {'flex': 1, 'backgroundColor': null,
'marginVertical': 8, 'padding': 0, backgroundColor: BACKGROUND_SURFACE_HIGH}}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object = {'flexDirection': 'row', 'padding': 8, 'marginBottom': 16, 'backgroundColor': null,
'alignItems': 'center', 'justifyContent': 'center'};
const GUILD_NOTIFICATIONS_BOTTOM_SHEET_PILL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.GUILD_NOTIFICATIONS_BOTTOM_SHEET_PILL_BACKGROUND;
object.backgroundColor = GUILD_NOTIFICATIONS_BOTTOM_SHEET_PILL_BACKGROUND;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object, SHADOW_LOW, undefined);
const env0_14 = Reflect.apply(createStyles, value, [{guildPill: object, guildName: {paddingHorizontal: 8}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/GuildHighlightsNotificationsActionSheet.tsx');
exports.default = SummaryFeedbackActionSheet;
}
function GuildPill({guild}) { // fn#77625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10091:1013, offset: 0x01e04903, size: 210 bytes, params: 2, frame: 22
const styles = useStyles();
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const SMALL_32 = GuildIconSizes.SMALL_32;
const guildIcon = <GuildIcon guild={guild} size={SMALL_32} animate />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.guildPill}>
{guildIcon}
<Text
style={styles.guildName}
variant="heading-md/semibold"
color="mobile-text-heading-primary"
>
{guild?.name}
</Text>
</View>
);
}
function isFeedbackComplete(a0) { // fn#77626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10091:1301, offset: 0x01e049d5, size: 49 bytes, params: 2, frame: 4
const {rating, reason} = a0 ?? ({});
const GOOD = FeedbackRating.GOOD;
return rating === GOOD || reason != null;
}
function isFeedbackGood(a0) { // fn#77627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10091:1400, offset: 0x01e04a06, size: 36 bytes, params: 2, frame: 2
const rating = (a0 ?? ({})).rating;
const GOOD = FeedbackRating.GOOD;
return rating === GOOD;
}
function SummaryFeedbackActionSheet({guildId, feedbackSettings}) { // fn#77628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10091:1581, offset: 0x01e04a2a, size: 1702 bytes, params: 2, frame: 42
var r11;
var r1;
var r21;
var r13;
var FeedbackForm;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var Card;
var FormSwitchRow;
var object11;
const styles = useStyles();
const binding = env0_4;
const value4 = binding.useRef(null);
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [undefined]);
const binding2 = env0_3;
const value6 = binding2(value5, 2);
const property = value6[0];
var env0_4 = value6[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value8[0];
const env0_6 = value8[1];
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value9[0];
const env0_7 = value9[1];
const value10 = binding.useCallback(_fun77629, [property2, feedbackSettings]);
binding.useEffect(function() {
return _fun77631;
}, [property, value10]);
const value11 = binding.useCallback(_fun77632, [value10]);
const value12 = binding.useCallback(_fun77633, []);
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresObject = useStateFromStoresModule.useStateFromStoresObject;
object = [UserGuildSettingsStore];
object[1] = GuildStore;
const {guild, muted, notifyHighlights} = Reflect.apply(useStateFromStoresObject, useStateFromStoresModule, [object,
function() {
var object = {};
var guildIdBinding = guildId;
object.guild = GuildStore.getGuild(guildIdBinding);
object.muted = UserGuildSettingsStore.isMuted(guildIdBinding);
object.notifyHighlights = UserGuildSettingsStore.getNotifyHighlights(guildIdBinding);
return object;
}, [guildId]]);
const value14 = feedbackSettings?.reasons != null;
if (value14) {
if (isFeedbackComplete(property)) {
r1 = <Text style={[styles.centerText,
styles.thanks]} variant="heading-md/semibold" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kZbFIO)}</Text>;
} else {
FeedbackForm = (require(9908) /* metro dependency 9908: FeedbackForm */).FeedbackForm;
var feedbackFormProps = {ratingsBodyLabel: intl.string(t.Yzl7Or),
reasonsHeaderLabel: intl.string(t.g1q5fr)};
r11 = feedbackSettings?.reasons ?? [];
feedbackFormProps.reasons = r11;
r11 = feedbackSettings != null ? feedbackSettings.onFeedbackShown : function() {
};
feedbackFormProps.trackOpen = r11;
feedbackFormProps.onFeedbackChanged = value11;
r1 = <FeedbackForm {...feedbackFormProps} />;
}
r21 = r1;
} else {
r21 = null;
}
const value19 = 316 + (value14 ? property2 ? 64 : 148 : 0) + (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
let r6 = value14 ? isFeedbackComplete(property) : !value14;
r6 = !r6 ? property?.rating == null : r6;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const r5 = r6 ? value19 : undefined;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const r7 = property3 ? value12 : undefined;
const items4 = [<GuildPill guild={guild} />];
items4[1] = <Text style={styles.headerTitle} variant="heading-lg/semibold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o8Bypv)}</Text>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
let centerText = styles.centerText;
let format = intl.format;
const enfuur = (require(1244) /* metro dependency 1244: indexNative */).t.enfuur;
let defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const HIGHLIGHTS_NOTIFICATIONS = HelpdeskArticles.HIGHLIGHTS_NOTIFICATIONS;
items4[2] = <TextWithIOSLinkWorkaround style={centerText} variant="text-md/medium" color="text-default">{Reflect.apply(format,
intl, [enfuur, {helpUrl: Reflect.apply(getArticleURL, defaultImport,
[HIGHLIGHTS_NOTIFICATIONS])}])}</TextWithIOSLinkWorkaround>;
const items5 = [<View style={styles.header}>{items4}</View>];
items5[1] = r21 != null && ((View) => <View style={styles.feedback}>{r21}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
const isFeedbackGood2 = isFeedbackGood(property);
if (isFeedbackGood2) {
r13 = !isFeedbackGood2;
} else {
Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
var cardProps = {'style': null, 'shadow': 'low', 'border': 'subtle', style: styles.settings};
FormSwitchRow = (require(7972) /* metro dependency 7972: native */).FormSwitchRow;
r13 = <Card {...cardProps}><FormSwitchRow disabled={muted} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.MVi7LQ)} value={muted || notifyHighlights === HighlightSettings.DISABLED} onValueChange={function(a0) {
var defaultImport = importDefault(dependencyMap[24]);
var updateGuildNotificationSettings = defaultImport.updateGuildNotificationSettings;
var guildIdBinding = guildId;
var object = {};
object.notify_highlights = a0 ? HighlightSettings.DISABLED : HighlightSettings.ENABLED;
var NotificationLabel = require(dependencyMap[25]).NotificationLabel;
Reflect.apply(updateGuildNotificationSettings, defaultImport, [guildIdBinding, object,
NotificationLabel.highlights(!a0)]);
}} /></Card>;
}
items5[2] = r13;
centerText = styles.centerText;
format = intl.format;
const F9rfLX = (require(1244) /* metro dependency 1244: indexNative */).t.F9rfLX;
items5[3] = <TextWithIOSLinkWorkaround style={centerText} variant="text-sm/medium" color="text-default">{Reflect.apply(format,
intl, [F9rfLX, {notifSettingsHook: notifSettingsHook}])}</TextWithIOSLinkWorkaround>;
return (
<BottomSheet
scrollable
ref={value4}
contentHeight={r5}
startHeight={value19}
>
<BottomSheetScrollView contentContainerStyle={styles.contentContainer} onLayout={r7}>
<View>
{items5}
</View>
</BottomSheetScrollView>
</BottomSheet>
);
}
function _fun77629(a0) { // fn#77629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10091:1819, offset: 0x01e050d0, size: 132 bytes, params: 2, frame: 14
var value6;
if (!(env0_5 || a0?.rating == null)) {
if (!(feedbackSettings == null || feedbackSettings.onFeedbackCompleted == null)) {
feedbackSettings.onFeedbackCompleted(a0);
}
value6 = environment.__proto__;
(require(9907) /* metro dependency 9907: PushFeedbackActions */).handleSurveyCleanup();
env0_6(true);
}
}
function _fun77630() { // fn#77630, offset: 0x01e05154, size: 11 bytes, params: 1, frame: 1
return _fun77631;
}
function _fun77632(a0) { // fn#77632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10091:2027, offset: 0x01e05173, size: 97 bytes, params: 2, frame: 14
env0_4(a0);
if (isFeedbackComplete(a0)) {
env0_8(a0);
env0_7(false);
} else {
env0_7(true);
}
(require(9907) /* metro dependency 9907: PushFeedbackActions */).handleSurveyCleanup();
}
function _fun77633() { // fn#77633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10091:2132, offset: 0x01e051d4, size: 43 bytes, params: 1, frame: 11
const current = env0_2.current;
if (current != null) {
current.expandActionSheet();
}
env0_7(false);
}
function notifSettingsHook() { // fn#77637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10091:4168, owner: SummaryFeedbackActionSheet.notifSettingsHook, offset: 0x01e052ba, size: 67 bytes, params: 1, frame: 13
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
value.open(guildId);
}
function _fun77631() { // fn#77631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10091:1987, offset: 0x01e0515f, size: 20 bytes, params: 1, frame: 11
env1_8(env1_3);
}
@@ -0,0 +1,36 @@
/* Metro module 10931; source: modules/notifications/native/InAppMessageSoundsStore.tsx; dependencies: [587, 685, 3769, 2] */
function _fun83743(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11117:6, offset: 0x01f26855, size: 156 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(685) /* metro dependency 685 */).createWithEqualityFn(_fun83744);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/InAppMessageSoundsStore.tsx');
exports.isInAppMessageSoundsEnabled = isInAppMessageSoundsEnabled;
exports.setInAppMessageSoundsEnabled = setInAppMessageSoundsEnabled;
exports.useInAppMessageSoundsEnabled = useInAppMessageSoundsEnabled;
}
function _fun83744() { // fn#83744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11117:162, offset: 0x01f268f1, size: 67 bytes, params: 1, frame: 12
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const value = Storage.get('InAppMessageSoundsEnabled');
return {isEnabled: value == null || value};
}
function isInAppMessageSoundsEnabled() { // fn#83745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11117:350, offset: 0x01f26934, size: 25 bytes, params: 1, frame: 9
const binding = env0_2;
const getState = binding.getState;
return Reflect.apply(getState, binding, []).isEnabled;
}
function setInAppMessageSoundsEnabled(a0) { // fn#83746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11117:451, offset: 0x01f2694d, size: 74 bytes, params: 2, frame: 15
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set('InAppMessageSoundsEnabled', a0);
env0_2.setState({isEnabled: a0});
}
function useInAppMessageSoundsEnabled() { // fn#83747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11117:575, offset: 0x01f26997, size: 52 bytes, params: 1, frame: 13
return env0_2(function(a0) {
return a0.isEnabled;
}, (require(3769) /* metro dependency 3769 */).shallow);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,12 @@
/* Metro module 13002; source: modules/notifications/native/NotifSettingsExperiments.tsx; dependencies: [1854, 2] */
function _fun99176(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13192:6, offset: 0x021be68f, size: 177 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2026-04-declarative-notif-settings', 'kind': 'user',
defaultConfig: {'enabled': false, 'clearDeclarative': false}, variations: {[1]: {'enabled': true,
'clearDeclarative': false}, [2]: {'enabled': false, 'clearDeclarative': true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/NotifSettingsExperiments.tsx');
exports.declarativeNotifSettingsExperiment = value;
}
@@ -0,0 +1,446 @@
/* Metro module 13003; source: modules/notifications/native/NotifSettingsUtils.android.tsx; dependencies: [12999, 1244, 13004, 13005, 1216, 2] */
function _fun99177(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13193:6, offset: 0x021be740, size: 317 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const _arrayLikeToArray_99180 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const formatCategory = function(a0) {
var object = {id: a0.string_id};
object.name = require(dependencyMap[1]).intl.string(a0.title);
return object;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const notificationSettingsConstantsModule = require(12999) /* metro dependency 12999: NotificationSettingsConstants */;
const env0_3 = notificationSettingsConstantsModule.NOTIF_CATEGORIES;
const env0_4 = notificationSettingsConstantsModule.NOTIF_SETTING_MAPPING;
const env0_5 = notificationSettingsConstantsModule.NOTIF_SETTINGS;
object2 = {NONE: 0};
object2[0] = 'NONE';
object2.MIN = 1;
object2[1] = 'MIN';
object2.LOW = 2;
object2[2] = 'LOW';
object2.DEFAULT = 3;
object2[3] = 'DEFAULT';
object2.HIGH = 4;
object2[4] = 'HIGH';
object2 = {clear: clear_99186, registerDeclarativeNotificationCategories: registerDeclarativeNotificationCategories};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/NotifSettingsUtils.android.tsx');
exports.default = object2;
}
function _createForOfIteratorHelperLoose_99178(a0, a1) { // fn#99178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13193:177, offset: 0x021be87d, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun99179;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_99180(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_99180(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_99180(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun99179;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function inferImportanceFromBehavior(a0) { // fn#99181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13193:1219, offset: 0x021be9f1, size: 118 bytes, params: 2, frame: 3
return 'ringtone' in a0 && a0.ringtone != null || a0.visibility === 'popup' ? env0_6.HIGH : a0.visibility === 'hidden' ? env0_6.MIN : a0.sound ? env0_6.DEFAULT : env0_6.LOW;
}
function formatSetting(a0, a1) { // fn#99183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13193:1468, offset: 0x021beaa9, size: 175 bytes, params: 3, frame: 16
const value = a1;
const object2 = {};
object2.id = a0.string_id;
object2.groupId = a0.category;
const value3 = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.name = intl.string(a0.title);
object2.importance = value ?? inferImportanceFromBehavior(a0.behavior);
object2.ringtone = 'ringtone' in a0.behavior ? a0.behavior.ringtone : value3;
object2.badge = a0.behavior.badge;
object2.vibrate = a0.behavior.vibrate;
return object2;
}
function buildChannelsAndMapping() { // fn#99184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13193:1744, offset: 0x021beb58, size: 783 bytes, params: 1, frame: 42
var getAndroidNotifChannelStates;
var r6;
var r13;
var r29;
var r4;
var value6;
var value7;
var value8;
var value9;
var done;
var value10;
var set;
var channelId;
var importance;
var value11;
var value12;
var value13;
var value14;
var value15;
var value16;
var id;
var value17;
var value18;
var value19;
var value20;
var notifType;
var notifSetting;
var property;
var value21;
var value22;
var value23;
var get;
var value24;
var string_id;
var value25;
var inferImportanceFromBehaviorBinding;
var behavior;
var value26;
var value27;
var value32;
var push;
var formatSettingBinding;
var value33;
const value2 = undefined;
const {settings,
mappings} = (require(13005) /* metro dependency 13005: NotificationSettingsUtils */).getAssignedNotifSettingsAndMappings();
let Map = global.Map;
let prototype = Map.prototype;
const value4 = Object.create(prototype, {constructor: {value: Map}});
let map = new Map();
const value5 = map instanceof Object ? map : value4;
reducibleJoin2: while (true) {
if ((importDefault(13004) /* metro dependency 13004: NativeNotifSettingsModule */) == null) {
getAndroidNotifChannelStates = value2;
break reducibleJoin2;
}
getAndroidNotifChannelStates = (importDefault(13004) /* metro dependency 13004: NativeNotifSettingsModule */).getAndroidNotifChannelStates;
break reducibleJoin2;
}
reducibleJoin17: while (true) {
if (getAndroidNotifChannelStates == null) {
break reducibleJoin17;
}
Map = global.Map;
prototype = Map.prototype;
value6 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
value7 = map instanceof Object ? map : value6;
value8 = _createForOfIteratorHelperLoose_99178(getAndroidNotifChannelStates());
value9 = value8();
done = value9.done;
if (!done) {
r6 = value9;
reducibleLoop4: while (true) {
value10 = r6.value;
set = value7.set;
channelId = value10.channelId;
importance = value10.importance;
Reflect.apply(set, value7, [channelId, importance]);
value11 = value8();
done = value11.done;
if (done) {
break reducibleLoop4;
}
r6 = value11;
continue reducibleLoop4;
}
}
Map = global.Map;
prototype = Map.prototype;
value12 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
value13 = map instanceof Object ? map : value12;
value14 = _createForOfIteratorHelperLoose_99178(NOTIF_SETTINGS);
value15 = value14();
done = value15.done;
if (!done) {
r6 = value15;
reducibleLoop6: while (true) {
value16 = r6.value;
set = value13.set;
id = value16.id;
Reflect.apply(set, value13, [id, value16]);
value17 = value14();
done = value17.done;
if (done) {
break reducibleLoop6;
}
r6 = value17;
continue reducibleLoop6;
}
}
value18 = _createForOfIteratorHelperLoose_99178(mappings);
value19 = value18();
done = value19.done;
if (done) {
break reducibleJoin17;
}
r13 = value19;
reducibleLoop8: while (true) {
value20 = r13.value;
notifType = value20.notifType;
notifSetting = value20.notifSetting;
property = NOTIF_SETTING_MAPPING[notifType];
reducibleJoin16: while (true) {
if (property == null) {
break reducibleJoin16;
}
value21 = _createForOfIteratorHelperLoose_99178(property);
value22 = value21();
done = value22.done;
if (done) {
break reducibleJoin16;
}
r29 = value22;
reducibleLoop10: while (true) {
value23 = r29.value;
if (value23 !== notifSetting) {
get = value13.get;
value24 = Reflect.apply(get, value13, [value23]);
reducibleJoin14: while (true) {
if (value24 == null) {
break reducibleJoin14;
}
get = value7.get;
string_id = value24.string_id;
value25 = Reflect.apply(get, value7, [string_id]);
if (value25 == null) {
break reducibleJoin14;
}
inferImportanceFromBehaviorBinding = inferImportanceFromBehavior;
behavior = value24.behavior;
if (value25 !== inferImportanceFromBehaviorBinding(behavior)) {
set = value5.set;
Reflect.apply(set, value5, [notifSetting, value25]);
break reducibleJoin16;
}
break reducibleJoin14;
}
}
value26 = value21();
done = value26.done;
if (done) {
break reducibleJoin16;
}
r29 = value26;
continue reducibleLoop10;
}
}
value27 = value18();
done = value27.done;
if (done) {
break reducibleJoin17;
}
r13 = value27;
continue reducibleLoop8;
}
}
const items2 = [];
Map = global.Map;
map = new Map();
const value30 = _createForOfIteratorHelperLoose_99178(settings);
const value31 = value30();
done = value31.done;
if (!done) {
r4 = value31;
reducibleLoop18: while (true) {
value32 = r4.value;
push = items2.push;
formatSettingBinding = formatSetting;
get = value5.get;
id = value32.id;
Reflect.apply(push, items2, [formatSettingBinding(value32, Reflect.apply(get, value5, [id]))]);
set = map.set;
id = value32.id;
string_id = value32.string_id;
Reflect.apply(set, map, [id, string_id]);
value33 = value30();
done = value33.done;
if (done) {
break reducibleLoop18;
}
r4 = value33;
continue reducibleLoop18;
}
}
const object2 = {};
object2.mapping = mappings.flatMap(_fun99185);
object2.channels = items2;
object2.inheritedImportances = value5;
return object2;
}
function clear_99186() { // fn#99186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13193:2883, offset: 0x021bee9f, size: 97 bytes, params: 1, frame: 15
const r2 = (importDefault(13004) /* metro dependency 13004: NativeNotifSettingsModule */) ?? ({});
const registerAndroidNotifGroupsAndChannels = r2.registerAndroidNotifGroupsAndChannels;
const registerAndroidNotifTypeMappings = r2.registerAndroidNotifTypeMappings;
if (registerAndroidNotifGroupsAndChannels != null) {
registerAndroidNotifGroupsAndChannels([], []);
}
if (registerAndroidNotifTypeMappings != null) {
registerAndroidNotifTypeMappings([]);
}
}
function registerDeclarativeNotificationCategories() { // fn#99187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13193:3086, offset: 0x021bef00, size: 264 bytes, params: 1, frame: 24
let r1 = (importDefault(13004) /* metro dependency 13004: NativeNotifSettingsModule */) ?? ({});
const registerAndroidNotifGroupsAndChannels = r1.registerAndroidNotifGroupsAndChannels;
const registerAndroidNotifTypeMappings = r1.registerAndroidNotifTypeMappings;
if (registerAndroidNotifGroupsAndChannels == null) {
return false;
}
if (registerAndroidNotifTypeMappings == null) {
return false;
}
const {channels, mapping, inheritedImportances} = buildChannelsAndMapping();
const defaultImport3 = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
const addBreadcrumb = defaultImport3.addBreadcrumb;
const object = {};
object.channels = channels.map(function(a0) {
return a0.id;
});
const Array = global.Array;
object.inheritedImportances = Array.from(inheritedImportances.entries()).map(function(a0) {
var r0;
var r1;
var r3;
var item3;
var value3;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r4 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r3 = value;
} else {
r0 = item3;
r1 = value3;
r3 = item;
}
}
if (!r1) {
r0.return();
}
return 'NotifSettings#' + r4 + ' -> ' + r3;
});
Reflect.apply(addBreadcrumb, defaultImport3, [{message: 'Registering declarative notification categories',
data: object}]);
registerAndroidNotifGroupsAndChannels(NOTIF_CATEGORIES.map(formatCategory), channels);
registerAndroidNotifTypeMappings(mapping);
return true;
}
function _fun99185({notifType, notifSetting}) { // fn#99185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13193:2747, offset: 0x021bee67, size: 56 bytes, params: 2, frame: 12
const value = env0_0.get(notifSetting);
return value == null ? [] : {type: notifType, channel: value};
}
@@ -0,0 +1,72 @@
/* Metro module 9926; source: modules/notifications/native/NotificationSurveyActionSheet.tsx; dependencies: [31, 9904, 661, 33, 1244, 683, 9927, 9907, 4080, 9929, 1962, 2] */
function _fun77709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10112:6, offset: 0x01e07cd9, size: 193 bytes, params: 8, frame: 18
const env0_0 = require;
const trackOpen_77710 = function() {
var defaultImport = importDefault(dependencyMap[5]);
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
defaultImport.track(OPEN_POPOUT, {'type': 'Notification Feedback Sheet', 'source': 'Notification End'});
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(9904) /* metro dependency 9904: Constants */).NotificationUserFeedbackReasons;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/NotificationSurveyActionSheet.tsx');
exports.default = NotificationSurveyActionSheet;
}
function NotificationSurveyActionSheet({notificationType, location, messageId}) { // fn#77711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10112:405, offset: 0x01e07dd8, size: 469 bytes, params: 2, frame: 22
let object2 = {};
const TOO_MANY = NotificationUserFeedbackReasons.TOO_MANY;
object2.value = TOO_MANY;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.pLeQp0]);
const items2 = [object2];
object2 = {};
const IRRELEVANT = NotificationUserFeedbackReasons.IRRELEVANT;
object2.value = IRRELEVANT;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuwPcC);
items2[1] = object2;
object2 = {};
const DISLIKE_CONTENT = NotificationUserFeedbackReasons.DISLIKE_CONTENT;
object2.value = DISLIKE_CONTENT;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.glUMhg);
items2[2] = object2;
const FeedbackActionSheet = importDefault(9927) /* metro dependency 9927: FeedbackActionSheet */;
const feedbackActionSheetProps = {'headerLabel': null, 'showHeaderCloseButton': true,
'hideDontShowAgainCheckbox': true,
headerLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wGioO1)};
string = intl.string;
const Yzl7Or = (require(1244) /* metro dependency 1244: indexNative */).t.Yzl7Or;
feedbackActionSheetProps.ratingsBodyLabel = Reflect.apply(string, intl, [Yzl7Or]);
feedbackActionSheetProps.reasonsHeaderLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.g1q5fr);
feedbackActionSheetProps.reasons = items2;
feedbackActionSheetProps.trackOpen = trackOpen_77710;
feedbackActionSheetProps.trackReport = trackReport;
return <FeedbackActionSheet {...feedbackActionSheetProps} />;
}
function NotificationSurveyActionSheetTrackReport({rating, reason}) { // fn#77712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10112:1022, owner: NotificationSurveyActionSheet.trackReport, offset: 0x01e07fad, size: 277 bytes, params: 2, frame: 20
var value2;
var defaultImport;
let value = null;
if (value != rating) {
value2 = environment.__proto__;
defaultImport = importDefault(dependencyMap[5]);
defaultImport.track(AnalyticEvents.NOTIFICATION_REPORT_SUBMITTED,
{reason: value != reason ? reason.value : value,
rating: rating, notification_type: notificationType, location: location, message_id: messageId});
}
value = environment.__proto__;
require(dependencyMap[7]).handleSurveyCleanup();
value = importDefault(dependencyMap[8]);
const openLazy = value.openLazy;
const value3 = require(dependencyMap[10])(dependencyMap[9], dependencyMap.paths);
const object2 = {};
const intl = require(dependencyMap[4]).intl;
object2.header = intl.string(require(dependencyMap[4]).t.wGioO1);
Reflect.apply(openLazy, value, [value3, 'UserFeedbackSurvey', object2]);
}
@@ -0,0 +1,63 @@
/* Metro module 9929; source: modules/notifications/native/NotificationSurveyResponseActionSheet.tsx; dependencies: [31, 27, 661, 33, 4501, 6597, 697, 4080, 6275, 6758, 6806, 9930, 4573, 1244, 6766, 1948, 2] */
function _fun77731(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10115:6, offset: 0x01e08f94, size: 410 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.Image;
value = require(661) /* metro dependency 661: Constants */;
const Fonts = value.Fonts;
const env0_5 = value.HelpdeskArticles;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
let INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
copyDataProperties(object4, textStyles(DISPLAY_EXTRABOLD, INTERACTIVE_TEXT_ACTIVE, 16), undefined);
object4['marginTop'] = 8;
object4['marginBottom'] = 8;
object3.title = object4;
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object3.subtitle = {'color': null, 'textAlign': 'center', 'width': 343, color: INTERACTIVE_TEXT_ACTIVE};
object3.view = {'paddingTop': 50, 'paddingBottom': 100, 'alignItems': 'center'};
object3.rating = {'width': 116, 'height': 93};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/NotificationSurveyResponseActionSheet.tsx');
exports.default = NotificationSurveyResponseActionSheet;
}
function NotificationSurveyResponseActionSheet({header}) { // fn#77733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10115:664, offset: 0x01e0912e, size: 499 bytes, params: 2, frame: 30
const styles = useStyles();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const r5 = header != null && ((BottomSheetTitleHeader) => <BottomSheetTitleHeader title={header} trailing={((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={onClose} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton)} />)((require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader);
const items2 = [<Image style={styles.rating} source={importDefault(9930) /* metro dependency 9930 */} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.title} variant="heading-md/bold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['d9+vQ8'])}</Text>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const format = intl.format;
const WxD5QY = (require(1244) /* metro dependency 1244: indexNative */).t.WxD5QY;
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const HIGHLIGHTS_NOTIFICATIONS = HelpdeskArticles.HIGHLIGHTS_NOTIFICATIONS;
items2[2] = <TextWithIOSLinkWorkaround style={styles.subtitle} variant="text-md/normal">{Reflect.apply(format, intl,
[WxD5QY, {helpUrl: Reflect.apply(getArticleURL, defaultImport,
[HIGHLIGHTS_NOTIFICATIONS])}])}</TextWithIOSLinkWorkaround>;
return (
<BottomSheet>
{r5}
<View style={styles.view}>
{items2}
</View>
</BottomSheet>
);
}
@@ -0,0 +1,392 @@
/* Metro module 12998; source: modules/notifications/native/NotificationTokenManager.tsx; dependencies: [6, 7, 15, 17, 18, 27, 1220, 11876, 1226, 12999, 661, 1244, 11875, 694, 10741, 13002, 13003, 1216, 2518, 477, 13004, 683, 4561, 2] */
function _fun99146(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:6, offset: 0x021bc33e, size: 344 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = (require(27) /* metro dependency 27 */).NativeModules;
const apexExperimentStore = importDefault(1220) /* metro dependency 1220: ApexExperimentStore */;
const multiAccountStore = importDefault(11876) /* metro dependency 11876: MultiAccountStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_12 = (require(12999) /* metro dependency 12999: NotificationSettingsConstants */).NOTIF_SETTINGS;
const env0_13 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
value = _fun99150(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/NotificationTokenManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_99147() { // fn#99147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:253, offset: 0x021bc496, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_99147_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun99150(a0) { // fn#99150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:456, offset: 0x021bc4f8, size: 253 bytes, params: 2, frame: 16
const closure = NotificationTokenManager;
env0_7(closure, a0);
return env0_4(closure, [{key: '_initialize', value: value_99161}, {key: '_terminate', value: value_99163},
{key: 'registerListener', value: value_99164}, {key: 'registerNotificationCategories', value: value_99165},
{key: 'registerLegacyNotificationCategories', value: value_99166}, {key: 'trackDisabledAndroidNotifChannels',
value: value_99167}, {key: 'getToken', value: function() {
return this.token;
}}, {key: 'canSync', get: get_99172}]);
}
function NotificationTokenManager(a0) { // fn#99151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:468, offset: 0x021bc5f5, size: 270 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, NotificationTokenManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(NotificationTokenManager);
binding = env1_5;
if (_isNativeReflectConstruct_99147()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value._experimentUnsubscribe = null;
value.token = null;
value.hasRegisterEventListener = false;
value.hasTrackedDisabledAndroidNotifChannels = false;
value.postConnectionOpenTimeoutID = null;
value._handleExperimentsUpdated = _handleExperimentsUpdated;
value.handleToken = handleToken;
value.registerToken = registerToken;
value.handleSyncNoMultiAccountOnLoginSuccess = handleSyncNoMultiAccountOnLoginSuccess;
value.handleSyncNoMultiAccountOnRegisterSuccess = handleSyncNoMultiAccountOnRegisterSuccess;
value.handleSyncNoMultiAccountOnPostConnectionOpen = handleSyncNoMultiAccountOnPostConnectionOpen;
value.handleSyncNoMultiAccount = handleSyncNoMultiAccount;
value.handleSyncWithMultiAccount = handleSyncWithMultiAccount;
return value;
}
function value_99161() { // fn#99161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:2063, offset: 0x021bc943, size: 241 bytes, params: 1, frame: 18
var environment;
if (this.token != null) {
this.handleToken(this.token);
}
let value = environment.__proto__;
ApexExperimentStore.addChangeListener(this._handleExperimentsUpdated);
this._experimentUnsubscribe = _experimentUnsubscribe;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('LOGIN_SUCCESS', this.handleSyncNoMultiAccountOnLoginSuccess);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('REGISTER_SUCCESS', this.handleSyncNoMultiAccountOnRegisterSuccess);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('POST_CONNECTION_OPEN', this.handleSyncNoMultiAccountOnPostConnectionOpen);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('POST_CONNECTION_OPEN', this.handleSyncWithMultiAccount);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('MULTI_ACCOUNT_REMOVE_ACCOUNT', this.handleSyncWithMultiAccount);
}
function value_99163() { // fn#99163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:2705, offset: 0x021bca57, size: 200 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('LOGIN_SUCCESS', this.handleSyncNoMultiAccountOnLoginSuccess);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('REGISTER_SUCCESS', this.handleSyncNoMultiAccountOnRegisterSuccess);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('POST_CONNECTION_OPEN', this.handleSyncNoMultiAccountOnPostConnectionOpen);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('POST_CONNECTION_OPEN', this.handleSyncWithMultiAccount);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('MULTI_ACCOUNT_REMOVE_ACCOUNT', this.handleSyncWithMultiAccount);
if (this._experimentUnsubscribe != null) {
this._experimentUnsubscribe();
this._experimentUnsubscribe = null;
}
}
function value_99164() { // fn#99164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:3275, offset: 0x021bcb1f, size: 100 bytes, params: 1, frame: 12
if (this.hasRegisterEventListener) {
throw new global.Error('Device token listener already registered.');
}
this.hasRegisterEventListener = true;
let value = environment.__proto__;
value = importDefault(10741) /* metro dependency 10741: PushNotification */;
value.addRegisterEventListener(this.handleToken);
}
function value_99165() { // fn#99165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:3511, offset: 0x021bcb83, size: 275 bytes, params: 1, frame: 17
var r4;
var enabled;
var property;
var defaultImport;
var value4;
var error;
var defaultImport2;
var clearDeclarative;
var defaultImport3;
var defaultImport4;
let value = environment.__proto__;
const config = require(dependencyMap[15]).declarativeNotifSettingsExperiment.getConfig({location: 'registerNotificationCategories'});
const value3 = false;
try {
enabled = config.enabled;
if (enabled) {
property = dependencyMap[16];
defaultImport = importDefault(property);
value4 = defaultImport.registerDeclarativeNotificationCategories();
r4 = value4;
} else {
r4 = value3;
}
} catch (error) {
defaultImport2 = importDefault(dependencyMap[17]);
defaultImport2.captureException(error);
r4 = value3;
}
if (!r4) {
try {
clearDeclarative = config.clearDeclarative;
if (clearDeclarative) {
property = dependencyMap[17];
defaultImport3 = importDefault(property);
defaultImport3.addBreadcrumb({message: 'Clearing declarative notification categories'});
property = dependencyMap[16];
defaultImport4 = importDefault(property);
defaultImport4.clear();
}
} catch (error) {
value = importDefault(dependencyMap[17]);
value.captureException(error);
}
this.registerLegacyNotificationCategories();
}
this.trackDisabledAndroidNotifChannels();
}
function value_99166() { // fn#99166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:4048, offset: 0x021bcc96, size: 1563 bytes, params: 1, frame: 21
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var object4;
let DCDNotificationCategoryUtils = NativeModules.DCDNotificationCategoryUtils;
const registerNotificationCategories = DCDNotificationCategoryUtils.registerNotificationCategories;
DCDNotificationCategoryUtils = NativeModules.DCDNotificationCategoryUtils;
const registerNotificationCategoriesAndGroups = DCDNotificationCategoryUtils.registerNotificationCategoriesAndGroups;
if (registerNotificationCategoriesAndGroups != null) {
object3 = {};
object3.calls = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */)['IUH/Oe']);
object3.mediaConnections = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */).VeBD1N);
object3.messages = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */)['4qWUAO']);
object3.directMessages = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */).NGdNZb);
object3.friendRequests = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */).NxgGZA);
object3.polls = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */).MOjygY);
object3.social = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */)['UzRF+8']);
object3.stageLive = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */)['4n388K']);
object3.guildEventLive = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */)['40TIqW']);
object3.guildHighlights = intl.string(t.p5jg9S);
object3.forumThreadCreated = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */).HibKoy);
object3.systemMessages = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */).zJlwvV);
object3.other = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */).kIrLfg);
object3.default = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */)['T+79Eo']);
object3.reactions = intl.string(t.gHp0C4);
object4 = {};
object4.realtime = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */).S5cB9e);
object4.social = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */)['UzRF+8']);
object4.server = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */).zRKbpz);
object4.other = intl.string((importDefault(2518) /* metro dependency 2518: NotificationSettingsMessages */).q5M7HV);
registerNotificationCategoriesAndGroups(object3, object4);
} else if (registerNotificationCategories != null) {
object3 = {};
object3.calls = intl.string(t.JJogjm);
object3.mediaConnections = intl.string(t.K3lovD);
object3.messages = intl.string(t.OIgYlQ);
object3.directMessages = intl.string(t.YUU0RF);
object3.social = intl.string(t.TdEu5X);
object3.gameDetection = intl.string(t['A/4saf']);
object3.stageLive = intl.string(t.qGRagm);
object3.guildEventLive = intl.string(t.MfGr0a);
object3.guildHighlights = intl.string(t.p5jg9S);
object3.forumThreadCreated = intl.string(t.dl57ho);
object3.other = intl.string(t.BcZTKu);
object3.otherHighPriority = intl.string(t.bcv3rp);
registerNotificationCategories(object3);
}
}
function value_99167() { // fn#99167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:5863, offset: 0x021bd2b1, size: 272 bytes, params: 1, frame: 17
var environment;
var getAndroidNotifChannelStates;
var value;
var value2;
var moduleValue;
var androidNotifChannelStates;
var Set;
var value4;
var set;
var value7;
var defaultImport2;
var track;
var ANDROID_NOTIFICATION_CHANNELS_SYNCED;
var object2;
if (!this.hasTrackedDisabledAndroidNotifChannels) {
this.hasTrackedDisabledAndroidNotifChannels = true;
value = environment.__proto__;
value2 = undefined;
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isAndroid()) {
getAndroidNotifChannelStates = (importDefault(13004) /* metro dependency 13004: NativeNotifSettingsModule */) == null ? value2 : (importDefault(13004) /* metro dependency 13004: NativeNotifSettingsModule */).getAndroidNotifChannelStates;
if (getAndroidNotifChannelStates != null) {
androidNotifChannelStates = getAndroidNotifChannelStates();
Set = global.Set;
value4 = NOTIF_SETTINGS.map(function(a0) {
return a0.string_id;
});
set = new Set();
value7 = androidNotifChannelStates.filter(_fun99169);
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport2.track;
ANDROID_NOTIFICATION_CHANNELS_SYNCED = AnalyticEvents.ANDROID_NOTIFICATION_CHANNELS_SYNCED;
object2 = {};
object2.disabled_channels = value7.map(_fun99170);
Reflect.apply(track, defaultImport2, [ANDROID_NOTIFICATION_CHANNELS_SYNCED, object2]);
}
}
}
}
function get_99172() { // fn#99172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:6350, offset: 0x021bd401, size: 50 bytes, params: 1, frame: 10
var r0;
var value;
const isInitialized = this.isInitialized;
if (isInitialized) {
value = environment.__proto__;
value = AuthenticationStore.isAuthenticated();
r0 = value;
} else {
r0 = isInitialized;
}
if (r0) {
value = environment.__proto__;
value = !MultiAccountStore.isSwitchingAccount;
r0 = value;
}
return r0;
}
function _handleExperimentsUpdated() { // fn#99152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:906, owner: NotificationTokenManager._handleExperimentsUpdated, offset: 0x021bc703, size: 19 bytes, params: 1, frame: 9
return env0_0.registerNotificationCategories();
}
function handleToken(a0) { // fn#99153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:959, owner: NotificationTokenManager.handleToken, offset: 0x021bc716, size: 43 bytes, params: 2, frame: 10
const binding = env0_0;
binding.token = a0;
if (binding.canSync) {
env0_0.registerToken();
}
}
function registerToken() { // fn#99154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:1019, owner: NotificationTokenManager.registerToken, offset: 0x021bc741, size: 283 bytes, params: 1, frame: 24
var environment;
var value2;
var DCDNotificationCategoryUtils;
var registerNotificationReplyCategories;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var TBA5Xg;
var value3;
var value4;
var defaultImport;
if (env0_0.token != null) {
value2 = environment.__proto__.__proto__;
DCDNotificationCategoryUtils = NativeModules.DCDNotificationCategoryUtils;
registerNotificationReplyCategories = DCDNotificationCategoryUtils.registerNotificationReplyCategories;
string = intl.string;
TBA5Xg = t.TBA5Xg;
value3 = Reflect.apply(string, intl, [TBA5Xg]);
value4 = intl.string(t.TXNS7S);
string = intl.string;
TBA5Xg = t.TBA5Xg;
Reflect.apply(registerNotificationReplyCategories, DCDNotificationCategoryUtils, [value3, value4,
Reflect.apply(string, intl, [TBA5Xg]), function() {
}]);
if (NativeModules.PushNotificationAndroid) {
NativeModules.PushNotificationAndroid.onRegisterNotificationToken();
}
defaultImport = importDefault(11875) /* metro dependency 11875: PushNotificationActionCreators */;
defaultImport.registerDevice(env0_0.token);
}
}
function handleSyncNoMultiAccountOnLoginSuccess() { // fn#99156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:1396, owner: NotificationTokenManager.handleSyncNoMultiAccountOnLoginSuccess, offset: 0x021bc85c, size: 21 bytes, params: 1, frame: 9
env0_0.handleSyncNoMultiAccount();
}
function handleSyncNoMultiAccountOnRegisterSuccess() { // fn#99157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:1475, owner: NotificationTokenManager.handleSyncNoMultiAccountOnRegisterSuccess, offset: 0x021bc871, size: 43 bytes, params: 1, frame: 14
const binding = env0_0;
binding.postConnectionOpenTimeoutID = global.setTimeout(binding.handleSyncNoMultiAccountOnPostConnectionOpen, 5000);
}
function handleSyncNoMultiAccountOnPostConnectionOpen() { // fn#99158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:1621, owner: NotificationTokenManager.handleSyncNoMultiAccountOnPostConnectionOpen, offset: 0x021bc89c, size: 64 bytes, params: 1, frame: 13
var clearTimeout;
var binding;
if (env0_0.postConnectionOpenTimeoutID != null) {
clearTimeout = global.clearTimeout;
binding = env0_0;
clearTimeout(binding.postConnectionOpenTimeoutID);
binding.postConnectionOpenTimeoutID = null;
binding.handleSyncNoMultiAccount();
}
}
function handleSyncNoMultiAccount() { // fn#99159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:1801, owner: NotificationTokenManager.handleSyncNoMultiAccount, offset: 0x021bc8dc, size: 53 bytes, params: 1, frame: 10
if (env0_0.canSync && !MultiAccountStore.canUseMultiAccountNotifications) {
env0_0.registerToken();
}
}
function handleSyncWithMultiAccount() { // fn#99160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:1901, owner: NotificationTokenManager.handleSyncWithMultiAccount, offset: 0x021bc911, size: 50 bytes, params: 1, frame: 10
if (env0_0.canSync && MultiAccountStore.canUseMultiAccountNotifications) {
env0_0.registerToken();
}
}
function value_99161_experimentUnsubscribe() { // fn#99162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:2201, owner: value_99161._experimentUnsubscribe, offset: 0x021bca34, size: 35 bytes, params: 1, frame: 11
ApexExperimentStore.removeChangeListener(env0_0._handleExperimentsUpdated);
}
function _fun99169(a0) { // fn#99169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13188:6129, offset: 0x021bd3cc, size: 42 bytes, params: 2, frame: 12
return a0.importance === 0 && env0_0.has(a0.channelId);
}
@@ -0,0 +1,29 @@
/* Metro module 10930; source: modules/notifications/native/playInAppMessageSound.tsx; dependencies: [10907, 10931, 661, 1581, 10756, 2] */
function _fun83741(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11116:6, offset: 0x01f266fe, size: 162 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const notificationSettingsStore = importDefault(10907) /* metro dependency 10907: NotificationSettingsStore */;
const env0_3 = (require(10931) /* metro dependency 10931: InAppMessageSoundsStore */).isInAppMessageSoundsEnabled;
const env0_4 = (require(661) /* metro dependency 661: Constants */).InAppNotificationTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/native/playInAppMessageSound.tsx');
exports.playInAppMessageSound = playInAppMessageSound;
}
function playInAppMessageSound({type}) { // fn#83742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11116:306, offset: 0x01f267a0, size: 181 bytes, params: 2, frame: 15
var moduleValue;
const MESSAGE = InAppNotificationTypes.MESSAGE;
if (type === MESSAGE) {
moduleValue = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
if (moduleValue.isMetaQuest()) {
if (isInAppMessageSoundsEnabled()) {
if (!NotificationSettingsStore.isSoundDisabled('message1')) {
if (!(global.Date.now() - env0_5 < 1000)) {
(require(10756) /* metro dependency 10756: SoundUtils */).playSound('message1', 0.4);
}
}
}
}
}
}