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,181 @@
/* Metro module 14887; source: modules/nuf/native/components/notification/GuildOpenNotificationNudge.tsx; dependencies: [57, 31, 1945, 1867, 3969, 4864, 11872, 11873, 661, 33, 566, 14888, 1244, 14889, 11874, 5105, 3987, 7013, 1365, 11875, 4080, 14887, 1962, 2] */
function _fun112625(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:6, offset: 0x023d4fdf, size: 369 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const pushNotificationPermissionStore = importDefault(11872) /* metro dependency 11872: PushNotificationPermissionStore */;
const env0_10 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionPromptType;
let value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_11 = value.EventActionLocation;
const env0_12 = value.NotificationNudgeSurface;
value = require(661) /* metro dependency 661: Constants */;
const env0_13 = value.UserNotificationSettings;
const env0_14 = value.ZERO_STRING_GUILD_ID;
const env0_15 = (require(33) /* metro dependency 33 */).jsx;
object = {cooldownDurationMs: 5184000000};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/GuildOpenNotificationNudge.tsx');
exports.default = GuildOpenNotificationNudge;
exports.GUILD_OPEN_NOTIFICATION_NUDGE_KEY = 'guild-open-notification-nudge-key';
exports.useGuildOpenNudge = useGuildOpenNudge;
}
function GuildOpenNotificationNudge({guildId, markAsDismissed, onHide}) { // fn#112626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:524, offset: 0x023d5150, size: 262 bytes, params: 2, frame: 24
var object2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun112627);
const NotificationNudgeBottomSheet = importDefault(14888) /* metro dependency 14888: NotificationNudgeBottomSheet */;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.tyWHMY,
{guildName: value2});
object2.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ehJH+P']);
const GUILD_OPEN = EventActionLocation.GUILD_OPEN;
object2.actionLocation = GUILD_OPEN;
const GUILD_OPEN_BOTTOM_SHEET = NotificationNudgeSurface.GUILD_OPEN_BOTTOM_SHEET;
object2.surface = GUILD_OPEN_BOTTOM_SHEET;
object2.markAsDismissed = markAsDismissed;
object2.onHide = onHide;
return <NotificationNudgeBottomSheet {...object2} />;
}
function useGuildOpenNudge() { // fn#112628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1005, offset: 0x023d528f, size: 619 bytes, params: 1, frame: 30
var r6;
var moduleValue7;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], _fun112629);
const defaultImport = importDefault(14889) /* metro dependency 14889: GuildPushNotificationNudgeExperiment */;
const useConfig = defaultImport.useConfig;
const showNewSheet = Reflect.apply(useConfig, defaultImport, [{location: 'useGuildOpenNudge'}]).showNewSheet;
const value3 = (require(11874) /* metro dependency 11874: NotificationPermissionUtil */).useCanSeePushNotificationNudge();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun112630);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun112631);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, GuildMemberStore],
_fun112632);
const binding = env0_4;
const env0_2 = binding.useRef(value2);
let [property, env0_3] = env0_3Binding(binding.useState(value6), 2);
binding.useEffect(_fun112633, [value2, value6]);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PushNotificationPermissionStore],
_fun112634);
const value10 = null;
const value11 = value10 != value2;
if (value11) {
moduleValue7 = require(3987) /* metro dependency 3987: RouteUtils */;
r6 = !moduleValue7.isPseudoGuildId(value2);
} else {
r6 = value11;
}
r6 = r6 && showNewSheet && value3;
r6 = r6 && !property && !value4;
r6 = r6 && value5 !== UserNotificationSettings.NO_MESSAGES && value9;
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedTimeRecurringGuildDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringGuildDismissibleContent;
const NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD = r6 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD : value10;
const value17 = env0_3Binding(Reflect.apply(useSelectedTimeRecurringGuildDismissibleContent,
useSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_GUILD_OPEN_PER_GUILD,
value10 != value2 ? value2 : ZERO_STRING_GUILD_ID, env0_16]), 2);
property = value17[0];
var env0_4 = property;
env0_4.useEffect(_fun112635, [value2, value17[1], property]);
}
function _fun112627() { // fn#112627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:639, offset: 0x023d5256, size: 57 bytes, params: 1, frame: 12
const value = environment.__proto__;
return GuildStore.getGuild(guildId)?.name ?? '';
}
function _fun112629() { // fn#112629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1073, offset: 0x023d54fa, size: 31 bytes, params: 1, frame: 10
let value = environment.__proto__;
value = SelectedGuildStore.getGuildId();
const value2 = null;
return value2 != value ? value : value2;
}
function _fun112630() { // fn#112630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1271, offset: 0x023d5519, size: 40 bytes, params: 1, frame: 12
return env0_0 == null || UserGuildSettingsStore.isMuted(env0_0);
}
function _fun112631() { // fn#112631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1334, offset: 0x023d5541, size: 52 bytes, params: 1, frame: 12
return env0_0 != null ? UserGuildSettingsStore.getMessageNotifications(env0_0) : UserNotificationSettings.NO_MESSAGES;
}
function _fun112632() { // fn#112632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1428, offset: 0x023d5575, size: 89 bytes, params: 1, frame: 16
var r0;
var value3;
var moduleValue;
var isBlockedByOnboarding;
var getGuild;
var binding;
var value;
const value2 = env0_0 != null;
if (value2) {
value3 = environment.__proto__;
moduleValue = require(5105) /* metro dependency 5105: GuildOnboardingUtils */;
isBlockedByOnboarding = moduleValue.isBlockedByOnboarding;
getGuild = GuildStore.getGuild;
binding = env0_0;
value = Reflect.apply(getGuild, GuildStore, [binding]);
value = Reflect.apply(isBlockedByOnboarding, moduleValue, [value, GuildMemberStore.getSelfMember(binding)]);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun112633() { // fn#112633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1574, offset: 0x023d55ce, size: 67 bytes, params: 1, frame: 12
const binding = env0_2;
const current = binding.current;
const binding2 = env0_0;
binding.current = binding2;
if (current !== binding2) {
env0_3(env0_1);
} else if (env0_1) {
env0_3(true);
}
}
function _fun112634() { // fn#112634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:1675, offset: 0x023d5611, size: 118 bytes, params: 1, frame: 13
var r0;
var Date;
var date;
let value = environment.__proto__;
const getState = PushNotificationPermissionStore.getState;
const promptLastSeen = Reflect.apply(getState, PushNotificationPermissionStore, []).promptLastSeen;
const GUILD_OPEN_BOTTOM_SHEET = PermissionPromptType.GUILD_OPEN_BOTTOM_SHEET;
const property = promptLastSeen[GUILD_OPEN_BOTTOM_SHEET];
value = property == null;
if (value) {
r0 = value;
} else {
Date = global.Date;
value = Date.now();
Date = global.Date;
date = new Date(property);
value -= date.getTime();
value = value >= 604800000;
r0 = value;
}
return r0;
}
function _fun112635() { // fn#112635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15084:2062, offset: 0x023d5687, size: 164 bytes, params: 1, frame: 18
var value4;
var moduleValue;
var defaultImport;
if (env0_0 != null && env0_4 != null) {
value4 = environment.__proto__;
moduleValue = require(dependencyMap[19]);
moduleValue.setPushPermissionReactivationSeen(PermissionPromptType.GUILD_OPEN_BOTTOM_SHEET);
defaultImport = importDefault(dependencyMap[20]);
defaultImport.openLazy(require(dependencyMap[22])(dependencyMap[21], dependencyMap.paths),
'guild-open-notification-nudge-key', {guildId: env0_0, markAsDismissed: env0_5});
}
}
@@ -0,0 +1,107 @@
/* Metro module 14888; source: modules/nuf/native/components/notification/NotificationNudgeBottomSheet.tsx; dependencies: [31, 27, 11873, 661, 1376, 33, 4501, 697, 683, 4080, 11874, 6275, 5473, 4573, 6261, 4578, 1244, 2] */
function _fun112636(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:6, offset: 0x023d572b, size: 433 bytes, params: 8, frame: 23
var object2;
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(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_5 = value.EventActionType;
const env0_6 = value.NotificationNudgeAnalyticsAction;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_8 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.container = {marginHorizontal: PX_24, alignItems: 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.illustration = {marginVertical: PX_24};
object2.title = {textAlign: 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.body = {textAlign: 'center', marginTop: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.buttonsContainer = {marginTop: PX_8, width: '100%'};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/NotificationNudgeBottomSheet.tsx');
exports.default = NotificationNudgeBottomSheet;
}
function NotificationNudgeBottomSheet({title, body, actionLocation, surface, markAsDismissed, onHide}) { // fn#112637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:683, offset: 0x023d58dc, size: 685 bytes, params: 2, frame: 31
const env0_3 = onHide;
const styles = useStyles();
const binding = env0_3;
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[8]);
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.IMPRESSION,
prompt_type: surface});
}, [surface]);
const value2 = binding.useCallback(_fun112639, [onHide]);
const value3 = binding.useCallback(_fun112640, [surface, actionLocation, value2, markAsDismissed]);
const value4 = binding.useCallback(_fun112641, [surface, value2, markAsDismissed]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BellSpotIllustration = (require(5473) /* metro dependency 5473: native */).BellSpotIllustration;
const items2 = [<View style={styles.illustration}><BellSpotIllustration scale={0.8} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={styles.title} variant="heading-xl/bold" accessibilityRole="header">{title}</Text>;
items2[2] = <Text style={styles.body} variant="text-sm/medium" color="text-default">{body}</Text>;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const button = <Button text={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['+7MDbQ']])} onPress={value3} />;
string = intl.string;
const L5eIZ2 = (require(1244) /* metro dependency 1244: indexNative */).t.L5eIZ2;
items2[3] = <View style={styles.buttonsContainer}><ButtonGroup>{button}<Button text={Reflect.apply(string, intl,
[L5eIZ2])} onPress={value4} variant="secondary" /></ButtonGroup></View>;
return (
<BottomSheet>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
}
function _fun112639() { // fn#112639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:929, offset: 0x023d5bd5, size: 58 bytes, params: 1, frame: 12
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
if (onHide != null) {
onHide();
}
}
function _fun112640() { // fn#112640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:997, offset: 0x023d5c0f, size: 142 bytes, params: 1, frame: 19
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const ACCEPT = NotificationNudgeAnalyticsAction.ACCEPT;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: ACCEPT, prompt_type: surface}]);
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST,
actionLocation, env0_4]);
}
function _fun112641() { // fn#112641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15085:1193, offset: 0x023d5c9d, size: 103 bytes, params: 1, frame: 17
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
const DISMISS = NotificationNudgeAnalyticsAction.DISMISS;
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: DISMISS, prompt_type: surface}]);
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
env0_4();
}
@@ -0,0 +1,22 @@
/* Metro module 11873; source: modules/nuf/native/components/notification/NotificationPermissionConstants.tsx; dependencies: [2] */
function _fun91053(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12059:6, offset: 0x02051aee, size: 482 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/NotificationPermissionConstants.tsx');
exports.EventActionType = {SKIP_STEP: 'skip_step', ALLOW_TO_REQUEST: 'allow_to_request', REQUEST: 'request',
TO_SETTINGS: 'to_settings', REQUEST_PROVISIONAL: 'request_provisional', DISMISS: 'dismiss'};
exports.EventActionLocation = {ALERT: 'alert', AUTO_PROMPT: 'auto_prompt', NAV: 'nav', FOOTER: 'footer', CTA: 'cta',
DM_LIST: 'dm_list', MESSAGE_SENT: 'message_sent', USER_SETTING: 'user_setting',
NOTIFICATION_SETTING: 'notification_setting', INVITE_ACCEPTED: 'invite_accepted',
FRIEND_REQUEST_SENT: 'friend_request_sent', FRIEND_REQUEST_ACCEPTED: 'friend_request_accepted',
NOTIFICATION_CENTER: 'notification_center', CHANNEL_BANNER: 'channel_banner', POST_REACTION: 'post_reaction',
GUILD_OPEN: 'guild_open', CALL_DISCONNECT: 'call_disconnect'};
exports.NOTIFICATION_REACTIVATION_ACTIONSHEET_KEY = 'notification-reactivation-actionsheet-key';
exports.NotificationNudgeSurface = {CHANNEL_BANNER: 'channel_banner',
NOTIFICATION_CENTER_BANNER: 'notification_center_banner', POST_REACTION_BANNER: 'post_reaction_banner',
NOTIFICATION_SETTINGS_PERMISSION_HEADER: 'notification_settings_permission_header',
GUILD_OPEN_BOTTOM_SHEET: 'guild_open_bottom_sheet',
CALL_DISCONNECT_BOTTOM_SHEET: 'call_disconnect_bottom_sheet'};
exports.NotificationNudgeAnalyticsAction = {IMPRESSION: 'impression', DISMISS: 'dismiss', ACCEPT: 'accept'};
}
@@ -0,0 +1,84 @@
/* Metro module 15802; source: modules/nuf/native/components/notification/NotificationReactivationActionSheet.tsx; dependencies: [31, 27, 11873, 661, 33, 4501, 697, 683, 11874, 4080, 6275, 15803, 4573, 1244, 6261, 4578, 2] */
function _fun121447(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:6, offset: 0x025483d6, size: 409 bytes, params: 8, frame: 23
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 = (require(11873) /* metro dependency 11873: NotificationPermissionConstants */).EventActionType;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
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;
object2 = {};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.container = {marginHorizontal: PX_24, alignItems: 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.image = {marginVertical: PX_24, height: 120};
object2.title = {textAlign: 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.subtitle = {textAlign: 'center', marginTop: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.buttons = {marginTop: PX_8};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/NotificationReactivationActionSheet.tsx');
exports.default = NotificationReactivationActionSheet;
}
function NotificationReactivationActionSheet({location}) { // fn#121448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:614, offset: 0x0254856f, size: 634 bytes, params: 2, frame: 30
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useCallback(function() {
var moduleValue = require(dependencyMap[8]);
var ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
moduleValue.requestPushNotificationPermission(ALLOW_TO_REQUEST, location, _fun121450);
}, [location]);
const value3 = binding.useCallback(_fun121451, [location]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const items2 = [<Image style={styles.image} source={importDefault(15803) /* metro dependency 15803 */} resizeMode="contain" />];
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-xl/bold" accessibilityRole="header">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)}</Text>;
items2[2] = <Text style={styles.subtitle} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['rW5gw/'])}</Text>;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[3] = <ButtonGroup style={styles.buttons}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)} onPress={value2} /><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/L3kom'])} onPress={value3} variant="secondary" /></ButtonGroup>;
return (
<BottomSheet>
<View style={styles.container}>
{items2}
</View>
</BottomSheet>
);
}
function _fun121449() { // fn#121449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:700, offset: 0x025487e9, size: 66 bytes, params: 1, frame: 16
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST, location,
_fun121450]);
}
function _fun121451() { // fn#121451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:827, offset: 0x02548850, size: 104 bytes, params: 1, frame: 18
const value = environment.__proto__;
const SKIP_STEP = EventActionType.SKIP_STEP;
const locationBinding = location;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = AnalyticEvents.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
Reflect.apply(track, defaultImport, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: SKIP_STEP,
action_location: locationBinding, permission_granted: undefined}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun121450() { // fn#121450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16010:769, offset: 0x0254882b, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
@@ -0,0 +1,84 @@
/* Metro module 14890; source: modules/nuf/native/components/notification/PostCallDisconnectNudge.tsx; dependencies: [57, 31, 1934, 4297, 11872, 11873, 33, 14888, 1244, 14891, 11874, 566, 7013, 1365, 11875, 4080, 14890, 1962, 2] */
function _fun112643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:6, offset: 0x023d5db5, size: 288 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_7 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionPromptType;
const notificationPermissionConstantsModule = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_8 = notificationPermissionConstantsModule.EventActionLocation;
const env0_9 = notificationPermissionConstantsModule.NotificationNudgeSurface;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
object = {cooldownDurationMs: 604800000};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/PostCallDisconnectNudge.tsx');
exports.default = PostCallDisconnectNudge;
exports.POST_CALL_DISCONNECT_NUDGE_KEY = 'post-call-disconnect-nudge-key';
exports.usePostCallDisconnectNudge = usePostCallDisconnectNudge;
}
function PostCallDisconnectNudge({markAsDismissed, onHide}) { // fn#112644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:424, offset: 0x023d5ed5, size: 201 bytes, params: 2, frame: 22
const NotificationNudgeBottomSheet = importDefault(14888) /* metro dependency 14888: NotificationNudgeBottomSheet */;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pJbYq1);
object2.body = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vegtFT);
const CALL_DISCONNECT = EventActionLocation.CALL_DISCONNECT;
object2.actionLocation = CALL_DISCONNECT;
const CALL_DISCONNECT_BOTTOM_SHEET = NotificationNudgeSurface.CALL_DISCONNECT_BOTTOM_SHEET;
object2.surface = CALL_DISCONNECT_BOTTOM_SHEET;
object2.markAsDismissed = markAsDismissed;
object2.onHide = onHide;
return <NotificationNudgeBottomSheet {...object2} />;
}
function usePostCallDisconnectNudge() { // fn#112645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:758, offset: 0x023d5f9e, size: 395 bytes, params: 1, frame: 25
const defaultImport = importDefault(14891) /* metro dependency 14891: PostCallDisconnectNudgeExperiment */;
const useConfig = defaultImport.useConfig;
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'usePostCallDisconnectNudge'}]).enabled;
const value2 = (require(11874) /* metro dependency 11874: NotificationPermissionUtil */).useCanSeePushNotificationNudge();
const currentClientVoiceChannelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore],
function() {
return VoiceStateStore.getCurrentClientVoiceChannelId(null);
});
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
const binding = env0_4;
const env0_2 = binding.useRef(currentClientVoiceChannelId);
let [property, env0_3] = env0_3Binding(binding.useState(false), 2);
binding.useEffect(_fun112648, [currentClientVoiceChannelId, channelId]);
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedTimeRecurringDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
const NOTIFICATION_NUDGE_POST_CALL_DISCONNECT = property && enabled && value2 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_POST_CALL_DISCONNECT : null;
const value7 = env0_3Binding(Reflect.apply(useSelectedTimeRecurringDismissibleContent,
useSelectedDismissibleContentModule, [NOTIFICATION_NUDGE_POST_CALL_DISCONNECT, env0_11]), 2);
property = value7[0];
var env0_4 = property;
env0_4.useEffect(_fun112649, [property, value7[1]]);
}
function _fun112648() { // fn#112648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:1118, offset: 0x023d6152, size: 63 bytes, params: 1, frame: 14
const binding = env0_2;
const current = binding.current;
binding.current = currentClientVoiceChannelId;
env0_3(current != null && currentClientVoiceChannelId == null && current === channelId);
}
function _fun112649() { // fn#112649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15087:1365, offset: 0x023d6191, size: 142 bytes, params: 1, frame: 18
var value2;
var moduleValue;
var defaultImport;
if (env0_4 != null) {
value2 = environment.__proto__;
moduleValue = require(dependencyMap[14]);
moduleValue.setPushPermissionReactivationSeen(PermissionPromptType.CALL_DISCONNECT_BOTTOM_SHEET);
defaultImport = importDefault(dependencyMap[15]);
defaultImport.openLazy(require(dependencyMap[17])(dependencyMap[16], dependencyMap.paths),
'post-call-disconnect-nudge-key', {markAsDismissed: env0_5});
}
}
@@ -0,0 +1,93 @@
/* Metro module 14357; source: modules/nuf/native/components/notification/RedesignNotificationModal.tsx; dependencies: [31, 27, 11872, 11873, 661, 33, 4501, 697, 11874, 683, 11875, 12005, 14358, 1244, 2] */
function _fun108657(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:6, offset: 0x02328763, size: 377 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = RedesignNotificationModal;
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.Image;
const env0_5 = value.View;
const env0_6 = (require(11872) /* metro dependency 11872: PushNotificationPermissionStore */).PermissionStateType;
value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
const env0_7 = value.EventActionLocation;
const env0_8 = value.EventActionType;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {flex: 1};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
object.marginTop = -PX_48;
const env0_11 = Reflect.apply(createStyles, value, [{container: object,
notificationHeaderImage: {'position': 'absolute', 'alignSelf': 'center', 'zIndex': 2, 'top': -140,
'height': 156, 'width': 150}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/notification/RedesignNotificationModal.tsx');
exports.default = closure;
exports.RedesignNotificationScreen = RedesignNotificationScreen;
}
function RedesignNotificationModal({onComplete}) { // fn#108658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:489, offset: 0x023288dc, size: 323 bytes, params: 2, frame: 24
const styles = useStyles();
const value2 = env0_3.useCallback(function() {
var moduleValue = require(dependencyMap[8]);
var ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
var ALERT = EventActionLocation.ALERT;
moduleValue.requestPushNotificationPermission(ALLOW_TO_REQUEST, ALERT, _fun108660);
}, [onComplete]);
const value3 = env0_3.useCallback(_fun108661, [onComplete]);
const NewUserPermissionsOnboardingAndroid = importDefault(12005) /* metro dependency 12005: NewUserPermissionsOnboardingAndroid */;
const defaultImportProps = {onAllow: value2, onDontAllow: value3,
header: <Image resizeMode="contain" style={styles.notificationHeaderImage} source={importDefault(14358) /* metro dependency 14358 */} />};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
defaultImportProps.title = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['3nx0b5']]);
string = intl.string;
const Gf7U1T = (require(1244) /* metro dependency 1244: indexNative */).t.Gf7U1T;
defaultImportProps.subtitle = Reflect.apply(string, intl, [Gf7U1T]);
return (
<View style={styles.container}>
<NewUserPermissionsOnboardingAndroid {...defaultImportProps} />
</View>
);
}
function RedesignNotificationScreen(a0) { // fn#108662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:1347, offset: 0x02328b07, size: 49 bytes, params: 2, frame: 13
return <RedesignNotificationModal onComplete={a0.route.params.onComplete} />;
}
function _fun108659() { // fn#108659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:567, offset: 0x02328a1f, size: 69 bytes, params: 1, frame: 16
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
const ALERT = EventActionLocation.ALERT;
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST, ALERT,
function() {
if (onComplete != null) {
onComplete();
}
}]);
}
function _fun108661() { // fn#108661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14554:687, offset: 0x02328a64, size: 163 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const NOTIFICATION_PERMISSION_PREPROMPT_ACKED = AnalyticEvents.NOTIFICATION_PERMISSION_PREPROMPT_ACKED;
const SKIP_STEP = EventActionType.SKIP_STEP;
const ALERT = EventActionLocation.ALERT;
Reflect.apply(track, defaultImport, [NOTIFICATION_PERMISSION_PREPROMPT_ACKED, {action_type: SKIP_STEP,
action_location: ALERT}]);
const pushNotificationActionCreatorsModule = require(11875) /* metro dependency 11875: PushNotificationActionCreators */;
const setPushPermissionState = pushNotificationActionCreatorsModule.setPushPermissionState;
const PROMPT_SKIPPED = PermissionStateType.PROMPT_SKIPPED;
Reflect.apply(setPushPermissionState, pushNotificationActionCreatorsModule, [PROMPT_SKIPPED]);
(require(11874) /* metro dependency 11874: NotificationPermissionUtil */).enableProvisionalPushNotification();
if (onComplete != null) {
onComplete(true);
}
}