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,14 @@
/* Metro module 9033; source: modules/guild_scheduled_events/native/GuildEventModalConstants.tsx; dependencies: [2] */
function _fun70249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9218:6, offset: 0x01cf413c, size: 137 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/GuildEventModalConstants.tsx');
exports.CREATE_GUILD_EVENT_MODAL_KEY = 'create-guild-event-modal';
exports.START_EVENT_MODAL_KEY = 'start-event-modal';
exports.GUILD_EVENTS_LIST_ACTION_SHEET_KEY = 'guild-scheduled-events-list';
exports.GUILD_EVENT_INFO_ACTION_SHEET_KEY = 'guild-scheduled-events-info';
exports.isGuildEventValid = function(a0, a1) {
return a0 !== '' && a1 != null;
};
}
@@ -0,0 +1,77 @@
/* Metro module 9219; source: modules/guild_scheduled_events/native/GuildScheduledEventHeaderUtils.tsx; dependencies: [4117, 1385, 9039, 697, 9132, 1244, 8145, 9220, 2] */
function _fun72102(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9404:6, offset: 0x01d39957, size: 156 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildScheduledEventStoreModule = require(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_3 = guildScheduledEventStoreModule.isGuildEventEnded;
const env0_4 = guildScheduledEventStoreModule.isGuildScheduledEventActive;
const env0_5 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/GuildScheduledEventHeaderUtils.tsx');
exports.getGuildScheduledEventHeaderProps = getGuildScheduledEventHeaderProps;
}
function getGuildScheduledEventHeaderProps({eventTimeData, isStage, theme, event, isCanceled, recurrenceId}) { // fn#72103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9404:343, offset: 0x01d399f3, size: 793 bytes, params: 2, frame: 35
var r1;
var r12;
var r13;
var r6;
var r7;
var r11;
var defaultImport2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var defaultImport3;
var defaultImport4;
var value8;
var ICON_FEEDBACK_POSITIVE;
const startDateTimeString = eventTimeData.startDateTimeString;
const diffMinutes = eventTimeData.diffMinutes;
const currentOrPastEvent = eventTimeData.currentOrPastEvent;
const upcomingEvent = eventTimeData.upcomingEvent;
let r2 = recurrenceId != null ? (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(event) === recurrenceId && isGuildScheduledEventActive(event) : isGuildScheduledEventActive(event);
const isGuildEventEnded2 = isGuildEventEnded(event);
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
const defaultImport = importDefault(9132) /* metro dependency 9132 */;
if (r2) {
value8 = intl.string(t['X2K3/4']);
r12 = isStage ? importDefault(8145) /* metro dependency 8145 */ : defaultImport;
r13 = event?.entity_type !== GuildScheduledEventEntityTypes.EXTERNAL ? value8 : intl.string(t.TxqPQR);
ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
r6 = r13;
r7 = ICON_FEEDBACK_POSITIVE;
r11 = r12;
} else if (isGuildEventEnded2) {
defaultImport4 = importDefault(9220) /* metro dependency 9220 */;
r6 = startDateTimeString;
r7 = ICON_SUBTLE;
r11 = defaultImport4;
} else if (currentOrPastEvent) {
defaultImport3 = importDefault(9220) /* metro dependency 9220 */;
r6 = intl.string(t.WINqKV);
r7 = ICON_SUBTLE;
r11 = defaultImport3;
} else if (upcomingEvent) {
defaultImport2 = importDefault(9220) /* metro dependency 9220 */;
r6 = diffMinutes > 0 ? intl.formatToPlainString(t.PQlCWk, {minutes: diffMinutes}) : intl.string(t.WINqKV);
r7 = ICON_SUBTLE;
r11 = defaultImport2;
} else {
r6 = startDateTimeString;
r7 = ICON_SUBTLE;
r11 = defaultImport;
}
r7 = isCanceled ? (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL : r7;
const object2 = {icon: r11, text: r6};
object2.color = (importDefault(697) /* metro dependency 697: native */).internal.resolveSemanticColor(theme, r7);
if (isGuildEventEnded2) {
r1 = !isGuildEventEnded2;
} else {
r2 = !r2 ? currentOrPastEvent : r2;
r2 = !r2 ? upcomingEvent : r2;
r1 = r2;
}
object2.shouldChangeTextColor = r1;
return object2;
}
@@ -0,0 +1,414 @@
/* Metro module 9052; source: modules/guild_scheduled_events/native/GuildScheduledEventModalActionCreators.tsx; dependencies: [5, 31, 1379, 1935, 1867, 3784, 4117, 1385, 9033, 661, 33, 5080, 44, 9053, 1962, 4080, 9074, 9125, 9140, 9148, 4497, 9037, 3857, 1244, 9149, 9132, 9043, 9150, 9049, 6797, 3856, 9151, 8879, 9032, 9044, 9039, 9214, 8153, 3829, 6796, 1478, 9215, 6802, 2] */
function _fun70752(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:6, offset: 0x01d067de, size: 523 bytes, params: 8, frame: 24
const env0_0 = require;
const closure = openCreateOrEditGuildEventModal;
const closure2 = function(a0, a1, a2) {
importDefault(dependencyMap[15]).hideAllActionSheets();
importDefault(dependencyMap[11]).pushLazy(require(dependencyMap[14])(dependencyMap[18], dependencyMap.paths),
{event: a0, recurrenceId: a1, onCloseActionSheet: a2}, START_EVENT_MODAL_KEY);
};
const closure3 = openDeleteGuildEventActionSheet;
const closure4 = updateRsvp_70758;
const closure5 = handleGuildScheduledEventRsvp;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
let value = require(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_9 = value.isGuildEventEnded;
const env0_10 = value.isGuildScheduledEventActive;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_12 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventUserResponses;
value = require(9033) /* metro dependency 9033: GuildEventModalConstants */;
const env0_13 = value.CREATE_GUILD_EVENT_MODAL_KEY;
const env0_14 = value.GUILD_EVENTS_LIST_ACTION_SHEET_KEY;
const env0_15 = value.START_EVENT_MODAL_KEY;
value = require(661) /* metro dependency 661: Constants */;
const env0_16 = value.InstantInviteSources;
const env0_17 = value.Permissions;
const env0_18 = value.Routes;
const env0_19 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/GuildScheduledEventModalActionCreators.tsx');
exports.openCreateOrEditGuildEventModal = closure;
exports.openGuildEventListActionSheet = function(a0) {
importDefault(dependencyMap[15]).openLazy(require(dependencyMap[14])(dependencyMap[17], dependencyMap.paths),
GUILD_EVENTS_LIST_ACTION_SHEET_KEY, {guild: a0});
};
exports.closeGuildEventListActionSheet = function() {
importDefault(dependencyMap[15]).hideActionSheet(GUILD_EVENTS_LIST_ACTION_SHEET_KEY);
};
exports.openStartGuildEventModal = closure2;
exports.openDeleteGuildEventActionSheet = closure3;
exports.updateRsvp = closure4;
exports.handleGuildScheduledEventRsvp = closure5;
exports.openShareEvent = openShareEvent;
exports.transitionToEventDetailsFromInvite = function() {
return _transitionToEventDetailsFromInvite_70763.apply(this, arguments);
};
exports.showGuildEventModeratorActionSheet = showGuildEventModeratorActionSheet;
}
function openCreateOrEditGuildEventModal(a0, {guildEvent, channel, onClose, recurrenceId}) { // fn#70753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:460, offset: 0x01d069e9, size: 297 bytes, params: 3, frame: 22
var defaultImport2;
var defaultImport4;
const closure = function() {
importDefault(dependencyMap[11]).popWithKey(CREATE_GUILD_EVENT_MODAL_KEY);
if (onClose != null) {
onClose();
}
};
if (recurrenceId != null) {
importDefault(dependencyMap[12])(guildEvent != null, 'recurrence editing requires a guild event');
defaultImport4 = importDefault(dependencyMap[11]);
defaultImport4.pushLazy(require(dependencyMap[14])(dependencyMap[13], dependencyMap.paths),
{guildEvent: guildEvent,
recurrenceId: recurrenceId, onCloseModal: closure}, CREATE_GUILD_EVENT_MODAL_KEY);
} else {
importDefault(dependencyMap[15]).hideAllActionSheets();
defaultImport2 = importDefault(dependencyMap[11]);
defaultImport2.pushLazy(require(dependencyMap[14])(dependencyMap[16], dependencyMap.paths), {guild: a0,
targetChannel: channel, initialGuildEvent: guildEvent, onCloseModal: closure},
CREATE_GUILD_EVENT_MODAL_KEY);
}
}
function openDeleteGuildEventActionSheet(a0, a1, a2) { // fn#70756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1096, offset: 0x01d06bcf, size: 104 bytes, params: 4, frame: 16
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert('DeleteEventAlert',
((Component) => <Component eventId={a0} guildId={a1} recurrenceId={a2} />)(env0_4.lazy(_fun70757)));
}
function updateRsvp_70758(a0, a1, a2, a3) { // fn#70758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1269, offset: 0x01d06c64, size: 68 bytes, params: 5, frame: 20
const env0_0 = a3;
(importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */).updateRsvp(a0, a1, a2, a3,
_fun70759);
}
function handleGuildScheduledEventRsvp(a0, a1, a2, a3) { // fn#70760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1571, offset: 0x01d06d83, size: 109 bytes, params: 5, frame: 16
const env0_0 = a0;
const env0_1 = a2;
const env0_2 = a3;
const value = require(9043) /* metro dependency 9043: GuildEventRsvpUtils */;
value.handleRsvp({eventId: a0, recurrenceId: a1, guildId: a2, updateRsvp: updateRsvp_70761,
openRsvpPicker: openRsvpPicker, onRsvp: a3});
}
function _transitionToEventDetailsFromInvite_70763() { // fn#70763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1881, offset: 0x01d06e8f, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun70765).apply(this, arguments);
}
function openShareEvent(a0, a1) { // fn#70768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:2806, offset: 0x01d06fe3, size: 530 bytes, params: 3, frame: 26
var defaultImport;
var open;
var object2;
var intl;
var value4;
var isGuildEventInvitable2;
var value7;
var moduleValue2;
var value;
const r3 = ChannelStore.getChannel(a0.channel_id) ?? GuildChannelStore.getDefaultChannel(a0.guild_id);
if (r3 != null) {
value4 = undefined;
isGuildEventInvitable2 = (require(9049) /* metro dependency 9049: useCanInviteForGuildEvent */).isGuildEventInvitable(a0);
if (isGuildEventInvitable2) {
value7 = GuildStore.getGuild(a0.guild_id);
if ((value7 == null ? value4 : value7.vanityURLCode) == null) {
(require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(r3,
{createInvite: isGuildEventInvitable2, guildScheduledEventId: a0.id, stackingBehavior: 'stack',
source: InstantInviteSources.GUILD_SCHEDULED_EVENT});
} else if (value7.vanityURLCode === '') {
(require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(r3,
{createInvite: isGuildEventInvitable2, guildScheduledEventId: a0.id, stackingBehavior: 'stack',
source: InstantInviteSources.GUILD_SCHEDULED_EVENT});
} else if (PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, r3)) {
(require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(r3,
{createInvite: isGuildEventInvitable2, guildScheduledEventId: a0.id, stackingBehavior: 'stack',
source: InstantInviteSources.GUILD_SCHEDULED_EVENT});
} else {
moduleValue2 = require(9151) /* metro dependency 9151: InstantInviteUtils */;
moduleValue2.showVanityUrlInviteActionSheet(value7, r3, InstantInviteSources.GUILD_SCHEDULED_EVENT,
{guildScheduledEventId: a0.id, stackingBehavior: 'stack'});
}
} else if (a1 != null && a1 !== '') {
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(a1);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentLinkCopied();
}
} else {
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport.open;
object2 = {key: 'ERROR_OCCURRED_TRY_AGAIN'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fEptJP);
object2.icon = importDefault(9149) /* metro dependency 9149 */;
Reflect.apply(open, defaultImport, [object2]);
}
}
function showGuildEventModeratorActionSheet(a0, a1, a2) { // fn#70770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:3734, offset: 0x01d071f5, size: 1962 bytes, params: 4, frame: 29
var r11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var defaultImport;
var tidaWebformEnabled;
var moduleValue3;
var object;
const env0_0 = a0;
const env0_1 = a2;
const guild = GuildStore.getGuild(a0.guild_id);
const isInterestedInEventRecurrence2 = GuildScheduledEventStore.isInterestedInEventRecurrence(a0.id, a2);
const value3 = undefined;
const eventException = (require(9044) /* metro dependency 9044: useEventException */).getEventException(a2, a0.id);
const value5 = null;
const is_canceled = value5 == eventException ? value3 : eventException.is_canceled;
const r10 = value5 != is_canceled && is_canceled;
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(a0);
const scheduleUtilsModule = require(9039) /* metro dependency 9039: ScheduleUtils */;
const getEventTimeData = scheduleUtilsModule.getEventTimeData;
const withinStartWindow = Reflect.apply(getEventTimeData, scheduleUtilsModule,
[a0.scheduled_start_time]).withinStartWindow;
const items2 = [];
const r7 = isGuildScheduledEventActive2 || r10 ? value5 : {label: isInterestedInEventRecurrence2 ? intl.string(t['7M5gaN']) : intl.string(t.FXixvH),
onPress: onPress_70771};
if (value5 == guild) {
if (value5 != r7) {
items2.push(r7);
}
} else if (a1) {
if (isGuildEventEnded(a0)) {
if (value5 != r7) {
items2.push(r7);
}
} else {
if (!isGuildScheduledEventActive2) {
if (withinStartWindow) {
if (isInterestedInEventRecurrence2) {
if (!r10) {
items2.push({label: intl.string(t.cK1GGY), onPress: onPress_70772});
}
} else if (value5 != r7) {
items2.push(r7);
}
} else if (!r10) {
items2.push({label: intl.string(t.cK1GGY), onPress: onPress_70772});
}
}
r11 = !isGuildScheduledEventActive2 && withinStartWindow;
r11 = r11 && !isInterestedInEventRecurrence2;
r11 = !r11 ? value5 == r7 : r11;
if (!r11) {
items2.push(r7);
}
r11 = value5 == a2 || r10;
if (!r11) {
items2.push({label: intl.string(t.wmVmXN), onPress: onPress_70773});
}
if (!r10) {
items2.push({label: value5 != a2 ? intl.string(t.BW1Qoh) : intl.string(t.Rgy2dU),
onPress: onPress_70774});
}
if (isGuildScheduledEventActive2) {
items2.push({label: intl.string(t.qaYzPA), isDestructive: true, onPress: onPress_70775});
} else {
if (value5 != a2) {
if (value5 == eventException) {
items2.push({label: intl.string(t.tqClly), isDestructive: true, onPress: onPress_70777});
} else if (eventException.is_canceled) {
items2.push({label: intl.string(t.b8606G), onPress: onPress_70776});
} else {
items2.push({label: intl.string(t.tqClly), isDestructive: true, onPress: onPress_70777});
}
}
items2.push({label: value5 != a0.recurrence_rule ? intl.string(t.wr33rW) : intl.string(t.B9sJLX),
isDestructive: true, onPress: onPress_70778});
}
}
} else if (value5 != r7) {
items2.push(r7);
}
let push = items2.push;
const string = intl.string;
const IBA5wX = t.IBA5wX;
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [IBA5wX]), isDestructive: true,
onPress: onPress_70779}]);
items2.push({label: value5 != a0.recurrence_rule ? intl.string(t.AYnhB7) : intl.string(t['9o+VKx']),
onPress: onPress_70780});
if (value5 != a2) {
items2.push({label: intl.string(t.QLtDqP), onPress: onPress_70781});
}
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const getSetting = DeveloperMode.getSetting;
if (Reflect.apply(getSetting, DeveloperMode, [])) {
items2.push({label: intl.string(t.WZwPO4), onPress: onPress_70782});
if (value5 != a2) {
items2.push({label: intl.string(t.NZRGQo), onPress: onPress_70783});
}
defaultImport = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
tidaWebformEnabled = defaultImport.getCurrentConfig({location: 'showGuildEventModeratorActionSheet'}).tidaWebformEnabled;
moduleValue3 = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
if (tidaWebformEnabled && value5 != (importDefault(9215) /* metro dependency 9215: getGuildEventImage */)(a0,
moduleValue3.getWindowDimensions().width)) {
push = items2.push;
object = {};
object.label = intl.string(t['8xHmxo']);
object.onPress = onPress_70784;
Reflect.apply(push, items2, [object]);
}
}
(require(6802) /* metro dependency 6802: showSimpleActionSheet */).showSimpleActionSheet({'key': 'GuildEvent',
'stackingBehavior': 'stack', 'options': null, 'hasIcons': false, options: items2});
return value3;
}
function _fun70757() { // fn#70757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1158, offset: 0x01d06c37, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__;
return require(dependencyMap[14])(dependencyMap[19], dependencyMap.paths);
}
function _fun70759(a0) { // fn#70759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1327, offset: 0x01d06ca8, size: 219 bytes, params: 2, frame: 19
var r4;
var value5;
var defaultImport;
var open;
var object2;
var intl;
var string;
var t;
const value = a0 != null;
if (value || importAll === GuildScheduledEventUserResponses.INTERESTED) {
value5 = environment.__proto__;
defaultImport = importDefault(dependencyMap[22]);
open = defaultImport.open;
object2 = {};
r4 = value ? 'ERROR_OCCURRED_TRY_AGAIN' : 'GUILD_EVENT_INTERESTED_NOTIFICATION';
object2.key = r4;
intl = require(dependencyMap[23]).intl;
string = intl.string;
t = require(dependencyMap[23]).t;
r4 = value ? Reflect.apply(string, intl, [t.fEptJP]) : Reflect.apply(string, intl, [t.osvXlf]);
object2.content = r4;
object2.icon = importDefault(value ? dependencyMap[24] : dependencyMap[25]);
Reflect.apply(open, defaultImport, [object2]);
}
}
function handleGuildScheduledEventRsvpUpdateRsvp(a0, a1, a2, a3) { // fn#70761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1686, owner: handleGuildScheduledEventRsvp.updateRsvp, offset: 0x01d06df0, size: 34 bytes, params: 5, frame: 17
updateRsvp_70758(env0_0, a1, importDefault, a3);
}
function openRsvpPicker(a0, a1) { // fn#70762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1732, owner: handleGuildScheduledEventRsvp.openRsvpPicker, offset: 0x01d06e12, size: 125 bytes, params: 3, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[15]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[14]);
value = value(dependencyMap[27], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'GuildEventRsvpPickerActionSheet', {event: a0, recurrenceId: a1,
guildId: importDefault, onRsvp: importAll}, 'stack']);
}
function* _fun70765(a0, a1) { // fn#70765, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1974, offset: 0x01d06ecc, size: 150 bytes, params: 3, frame: 16
if (true) {
value = environment.__proto__.__proto__;
var value3 = env2_0(env2_2[32]);
yield value3.transitionToGuildFromEventInvite(a0);
if (false) {
return undefined;
}
if (!(a0.channel_id != null && env2_10(a0))) {
env2_0(env2_2[33]).openGuildEventDetails({eventId: a0.id, event: a0, recurrenceId: a1});
}
}
}
function showGuildEventModeratorActionSheetOnPress() { // fn#70771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4129, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d0799f, size: 38 bytes, params: 1, frame: 15
handleGuildScheduledEventRsvp(env0_0.id, importDefault, guild_id);
}
function showGuildEventModeratorActionSheetOnPress_70772() { // fn#70772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4289, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d079c5, size: 28 bytes, params: 1, frame: 13
openStartGuildEventModal(env0_0, importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70773() { // fn#70773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4429, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d079e1, size: 44 bytes, params: 1, frame: 14
openCreateOrEditGuildEventModal(env0_3, {guildEvent: env0_0, recurrenceId: importDefault});
}
function showGuildEventModeratorActionSheetOnPress_70774() { // fn#70774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4612, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07a0d, size: 35 bytes, params: 1, frame: 13
openCreateOrEditGuildEventModal(env0_3, {guildEvent: env0_0});
}
function showGuildEventModeratorActionSheetOnPress_70775() { // fn#70775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4748, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07a30, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
const endEvent = value.endEvent;
const binding = env0_0;
Reflect.apply(endEvent, value, [binding.id, binding.guild_id]);
}
function showGuildEventModeratorActionSheetOnPress_70776() { // fn#70776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4884, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07a68, size: 62 bytes, params: 1, frame: 17
const value = environment.__proto__;
(importDefault(9214) /* metro dependency 9214: restoreEventRecurrence */)(env0_4, env0_3.id, env0_0.id,
importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70777() { // fn#70777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4992, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07aa6, size: 39 bytes, params: 1, frame: 15
const openDeleteGuildEventActionSheetBinding = openDeleteGuildEventActionSheet;
const binding = env0_0;
openDeleteGuildEventActionSheetBinding(binding.id, binding.guild_id, importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70778() { // fn#70778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5192, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07acd, size: 35 bytes, params: 1, frame: 14
const openDeleteGuildEventActionSheetBinding = openDeleteGuildEventActionSheet;
const binding = env0_0;
openDeleteGuildEventActionSheetBinding(binding.id, binding.guild_id, undefined);
}
function showGuildEventModeratorActionSheetOnPress_70779() { // fn#70779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5353, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07af0, size: 71 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideAllActionSheets();
(require(8153) /* metro dependency 8153: ReportModals */).showReportModalForGuildScheduledEvent(env0_0);
}
function showGuildEventModeratorActionSheetOnPress_70780() { // fn#70780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5568, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07b37, size: 130 bytes, params: 1, frame: 22
const value = environment.__proto__;
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = clipboardUtilsNativeModule.copy;
const protocol = global.location.protocol;
const host = global.location.host;
const GUILD_EVENT_DETAILS = Routes.GUILD_EVENT_DETAILS;
Reflect.apply(copy, clipboardUtilsNativeModule, ['' + protocol + '//' + host + Reflect.apply(GUILD_EVENT_DETAILS,
Routes, [guild_id, env0_0.id, null])]);
}
function showGuildEventModeratorActionSheetOnPress_70781() { // fn#70781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5737, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07bb9, size: 132 bytes, params: 1, frame: 22
const value = environment.__proto__;
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = clipboardUtilsNativeModule.copy;
const protocol = global.location.protocol;
const host = global.location.host;
const GUILD_EVENT_DETAILS = Routes.GUILD_EVENT_DETAILS;
Reflect.apply(copy, clipboardUtilsNativeModule, ['' + protocol + '//' + host + Reflect.apply(GUILD_EVENT_DETAILS,
Routes, [guild_id, env0_0.id, importDefault])]);
}
function showGuildEventModeratorActionSheetOnPress_70782() { // fn#70782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5931, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07c3d, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(env0_0.id);
}
function showGuildEventModeratorActionSheetOnPress_70783() { // fn#70783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:6027, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07c6f, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70784() { // fn#70784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:6281, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07c9c, size: 67 bytes, params: 1, frame: 14
const value = environment.__proto__;
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_5);
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
}
@@ -0,0 +1,67 @@
/* Metro module 9148; source: modules/guild_scheduled_events/native/components/DeleteEventAlert.tsx; dependencies: [5, 31, 4117, 33, 4501, 566, 9037, 4080, 4500, 1244, 4573, 2] */
function _fun71668(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:6, offset: 0x01d28edc, size: 213 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
importAll(31) /* metro dependency 31 */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({contentText: {textAlign: 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/DeleteEventAlert.tsx');
exports.default = DeleteEventAlert;
}
function DeleteEventAlert({eventId, guildId, recurrenceId, eventException}) { // fn#71669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:313, offset: 0x01d28fb1, size: 751 bytes, params: 2, frame: 29
var object2;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value4 = Reflect.apply(useStateFromStores, fluxModule, [[GuildScheduledEventStore], function() {
return GuildScheduledEventStore.getGuildScheduledEvent(eventId);
}])?.recurrence_rule != null;
const value5 = recurrenceId != null;
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.title = value5 ? Reflect.apply(string, intl, [t.tqClly]) : value4 ? Reflect.apply(string, intl,
[t.wr33rW]) : Reflect.apply(string, intl, [t.B9sJLX]);
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.v2GWNQ);
object2.extraContent = value4 ? value5 ? null : ((Text) => <Text variant="text-md/medium" color="text-default" style={styles.contentText}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ZcpcyO,
{})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
const items2 = [<AlertActionButton variant="destructive" onPress={function() {
return _handleConfirmClick.apply(this, arguments);
}} text={value4 ? value5 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B9sJLX) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8ZsNv5']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B9sJLX)} key="delete" />];
items2[1] = <AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oEAioF)} key="cancel" />;
object2.actions = items2;
return <AlertModal {...object2} />;
}
function _handleConfirmClick() { // fn#71670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:525, owner: DeleteEventAlert._handleConfirmClick, offset: 0x01d292a0, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun71672).apply(this, arguments);
}
function* _fun71672() { // fn#71672, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:586, offset: 0x01d292e0, size: 156 bytes, params: 1, frame: 20
if (true) {
value = environment.__proto__.__proto__;
var value4 = env3_1(env3_2[6]);
if (GuildScheduledEventStore) {
yield value4.deleteRecurrence(importDefault, require, dependencyMap, env2_3);
if (false) {
return undefined;
}
} else {
yield value4.deleteGuildEvent(require, importDefault);
if (false) {
return undefined;
}
}
env3_1(env3_2[7]).hideActionSheet();
}
}
@@ -0,0 +1,126 @@
/* Metro module 9079; source: modules/guild_scheduled_events/native/components/EditGuildEventChannelSelection.tsx; dependencies: [31, 27, 3784, 3793, 1878, 4117, 661, 33, 4501, 697, 6992, 9075, 9061, 4805, 566, 6647, 9063, 9064, 1244, 4573, 5278, 1848, 9080, 9052, 4080, 9059, 1962, 1305, 9060, 2] */
function _fun70949(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:6, offset: 0x01d0e493, size: 398 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_9 = value.ChannelTypes;
const env0_10 = value.Permissions;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
const env0_13 = Reflect.apply(createStyles, value, [{container: {flexDirection: 'column'},
channelSelectorButton: {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
backgroundColor: REDESIGN_BUTTON_TERTIARY_BACKGROUND}, channelIcon: {marginRight: 8},
channelTypeText: {'flex': 1, 'marginBottom': 8}, channelNameText: {flex: 1}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventChannelSelection.tsx');
exports.default = EditGuildEventChannelSelection;
}
function EditGuildEventChannelSelection({guild, channelType, channel, guildEventId, recurrenceId, onChangeChannel, style}) { // fn#70950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:673, offset: 0x01d0e621, size: 993 bytes, params: 2, frame: 31
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const styles = useStyles();
const value3 = (require(6992) /* metro dependency 6992: InputFieldContainerNative */).useInputStyles({hasLeadingIcon: true});
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
const value4 = channelType === GUILD_STAGE_VOICE;
const env0_6 = (require(9075) /* metro dependency 9075: useGetEventChannelsByType */).useGetEventChannelsByType(guild.id,
channelType);
const env0_7 = (require(9061) /* metro dependency 9061: useGuildsUserCanStartStageIn */).useChannelsUserCanStartStageIn(guild);
const value5 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const env0_8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
return PermissionStore.can(MANAGE_CHANNELS, guild);
});
const env0_9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getGuildScheduledEvent(guildEventId);
}, [guildEventId]);
const r13 = channel != null ? (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel) : importDefault(9063) /* metro dependency 9063 */;
const r12 = channel != null ? (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponent(channel) : (require(9064) /* metro dependency 9064: LocationIcon */).LocationIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r17 = value4 ? Reflect.apply(string, intl, [t.S7GjDz]) : Reflect.apply(string, intl, [t['7RYWCP']]);
const items2 = [styles.container, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text style={styles.channelTypeText} variant="text-sm/semibold" color="text-subtle">{r17}</Text>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object = {accessibilityLabel: r17};
string = intl.string;
const AaXbMD = (require(1244) /* metro dependency 1244: indexNative */).t.AaXbMD;
object.accessibilityHint = Reflect.apply(string, intl, [AaXbMD]);
object.accessibilityValue = {text: value5 ?? undefined};
object.accessibilityRole = 'button';
object.style = [value3.padding, value3.radius, styles.channelSelectorButton];
object.onPress = onPress_70953;
const items5 = [r12 != null ? ((Component) => <Component style={styles.channelIcon} />)(r12) : <Icon source={r13} style={styles.channelIcon} />];
items5[1] = <Text style={styles.channelNameText} variant="text-md/medium" color="interactive-text-active">{value5}</Text>;
items5[2] = <Icon source={importDefault(9060) /* metro dependency 9060 */} />;
return (
<View style={items2}>
{text}
<PressableOpacity {...object}>
{items5}
</PressableOpacity>
</View>
);
}
function EditGuildEventChannelSelectionOnPress() { // fn#70953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:1715, owner: EditGuildEventChannelSelection.onPress, offset: 0x01d0ea43, size: 369 bytes, params: 1, frame: 26
var environment;
const value = environment.__proto__;
const value2 = undefined;
importAll(dependencyMap[21]).dismissGlobalKeyboard();
const value4 = env0_6.map(function(a0) {
var object = {value: a0.id};
object.label = require(dependencyMap[13]).computeChannelName(a0, UserStore, RelationshipStore, true);
return object;
});
const length = env0_7.length;
const value5 = null;
const r8 = length !== 0 ? value5 : env0_8 ? ((Component) => <Component guildId={guild.id} onCreate={onCreate_70955} />)(importDefault(dependencyMap[22])) : value5;
const defaultImport2 = importDefault(dependencyMap[24]);
const openLazy = defaultImport2.openLazy;
const value7 = require(dependencyMap[26])(dependencyMap[25], dependencyMap.paths);
const resultBinding = result;
const intl = require(dependencyMap[18]).intl;
const string = intl.string;
const t = require(dependencyMap[18]).t;
const id = value5 == channel ? value2 : channel.id;
Reflect.apply(openLazy, defaultImport2, [value7, 'SelectUpdatesChannel',
{title: resultBinding ? Reflect.apply(string, intl, [t.S7GjDz]) : Reflect.apply(string, intl, [t['7RYWCP']]),
items: value4, body: r8, onItemSelect: onItemSelect_70956, selectedItem: value5 != id ? id : value2,
hasIcons: false}]);
return value2;
}
function onPressOnCreate(a0) { // fn#70955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:1894, owner: EditGuildEventChannelSelection.onPress.onCreate, offset: 0x01d0ebfb, size: 88 bytes, params: 2, frame: 17
let value = environment.__proto__.__proto__;
value = undefined;
const guildScheduledEventModalActionCreatorsModule = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
guildScheduledEventModalActionCreatorsModule.openCreateOrEditGuildEventModal(guild, {channel: a0,
guildEvent: env1_9 ?? value, recurrenceId: recurrenceId});
return value;
}
function onPressOnItemSelect_70956(a0) { // fn#70956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:2190, owner: EditGuildEventChannelSelection.onPress.onItemSelect, offset: 0x01d0ec53, size: 88 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const value2 = env1_6.find(_fun70957);
if (value2 != null) {
onChangeChannel(value2);
}
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
@@ -0,0 +1,397 @@
/* Metro module 9119; source: modules/guild_scheduled_events/native/components/EditGuildEventDetails.tsx; dependencies: [57, 31, 4117, 1385, 33, 4501, 1244, 3738, 9039, 1484, 4573, 4578, 1848, 9038, 3869, 9056, 9110, 9058, 2] */
function _fun71437(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:6, offset: 0x01d1fb79, size: 267 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildScheduledEventActive;
const env0_7 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({error: {paddingVertical: 8}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventDetails.tsx');
exports.default = EditGuildEventDetails;
}
function EditGuildEventDetails({guildEvent, initialGuildEvent, onChange}) { // fn#71438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:406, offset: 0x01d1fc84, size: 1311 bytes, params: 2, frame: 39
var r6;
var object7;
const styles = useStyles();
const name = guildEvent.name;
const description = guildEvent.description;
const entityType = guildEvent.entityType;
const scheduledStartTime = guildEvent.scheduledStartTime;
const scheduledEndTime = guildEvent.scheduledEndTime;
const recurrenceRule = guildEvent.recurrenceRule;
const env0_4 = recurrenceRule;
const binding = env0_5;
let value2 = binding.useMemo(_fun71439, [scheduledStartTime]);
const value3 = binding.useMemo(_fun71440, [scheduledEndTime, scheduledStartTime]);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [_fun71441]);
const binding2 = env0_4;
const value5 = binding2(value4, 2);
const env0_7 = value5[0];
const env0_8 = value5[1];
const value6 = binding.useMemo(function() {
return importDefault(dependencyMap[7])();
}, []);
const value7 = binding.useMemo(function() {
var value2 = importDefault(dependencyMap[7])();
var MAX_DAYS_AHEAD_AN_EVENT_CAN_START = require(dependencyMap[8]).MAX_DAYS_AHEAD_AN_EVENT_CAN_START;
return value2.add(MAX_DAYS_AHEAD_AN_EVENT_CAN_START, 'days');
}, []);
const value8 = binding.useMemo(_fun71444, [value2]);
const value9 = binding.useMemo(function() {
var value2 = importDefault(dependencyMap[7])();
var MAX_DAYS_AHEAD_AN_EVENT_CAN_END = require(dependencyMap[8]).MAX_DAYS_AHEAD_AN_EVENT_CAN_END;
return value2.add(MAX_DAYS_AHEAD_AN_EVENT_CAN_END, 'days');
}, []);
const value11 = binding.useRef(null);
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(initialGuildEvent);
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property = value12[0];
const env0_11 = value12[1];
const env0_12 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const r11 = property != null ? ((Text) => <Text style={styles.error} variant="text-sm/normal" color="text-feedback-critical">{property}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const PDTjLN = t.PDTjLN;
const fragment = <>{r11}<Button text={Reflect.apply(string, intl,
[PDTjLN])} variant="primary" onPress={onPress_71447} disabled={property != null} /></>;
const EditGuildEventStepContainer = importDefault(9056) /* metro dependency 9056: EditGuildEventStepContainer */;
const EditGuildEventStepHeader = importDefault(9110) /* metro dependency 9110: EditGuildEventStepHeader */;
string = intl.string;
const GG6vbr = (require(1244) /* metro dependency 1244: indexNative */).t.GG6vbr;
const items2 = [<EditGuildEventStepHeader title={Reflect.apply(string, intl,
[GG6vbr])} subtitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q5lgwV)} />];
const GuildEventTopic = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventTopic;
items2[1] = <GuildEventTopic topic={name} onChange={function(a0) {
handleChangeEvent({name: a0});
}} />;
const GuildEventDatetime = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventDatetime;
items2[2] = <GuildEventDatetime date={value2} onChange={onChange_71449} disabled={isGuildScheduledEventActive2} minimumDate={value6} maximumDate={value7} dateLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kKOIwJ)} timeLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6dGmCD'])} />;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
const value16 = entityType === EXTERNAL;
if (value16) {
r6 = <GuildEventDatetime date={value3} onChange={function(a0) {
handleChangeEvent({scheduledEndTime: a0.toISOString()});
}} minimumDate={value8} maximumDate={value9} dateLabel={intl.string(t.CTLgZJ)} timeLabel={intl.string(t.j2RuXF)} />;
} else {
r6 = value16;
}
items2[3] = r6;
const GuildEventRecurrence = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventRecurrence;
items2[4] = <GuildEventRecurrence startDate={value2} recurrenceRule={recurrenceRule} onRecurrenceChange={onRecurrenceChange} />;
const GuildEventDescription = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventDescription;
items2[5] = <GuildEventDescription description={description ?? ''} onChange={function(a0) {
handleChangeEvent({description: a0});
}} onFocus={function() {
global.setTimeout(_fun71454, 100);
}} />;
return (
<EditGuildEventStepContainer action={fragment} ref={value11}>
{items2}
</EditGuildEventStepContainer>
);
}
function _fun71439() { // fn#71439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:610, offset: 0x01d201a3, size: 39 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(3738) /* metro dependency 3738 */)(scheduledStartTime);
}
function _fun71440() { // fn#71440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:644, offset: 0x01d201ca, size: 103 bytes, params: 1, frame: 14
var r0;
var value2;
var value3;
var value;
if (scheduledEndTime != null) {
value3 = environment.__proto__;
r0 = (importDefault(3738) /* metro dependency 3738 */)(scheduledEndTime);
} else {
value2 = environment.__proto__;
value = (importDefault(3738) /* metro dependency 3738 */)(scheduledStartTime);
value = value.add(1, 'hour');
r0 = value;
}
return r0;
}
function _fun71441() { // fn#71441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:714, offset: 0x01d20231, size: 71 bytes, params: 1, frame: 15
let value = environment.__proto__;
const scheduleUtilsModule = require(9039) /* metro dependency 9039: ScheduleUtils */;
const recurrenceRuleToOption = scheduleUtilsModule.recurrenceRuleToOption;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(scheduledStartTime);
return Reflect.apply(recurrenceRuleToOption, scheduleUtilsModule, [value, recurrenceRule]);
}
function _fun71444() { // fn#71444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:919, offset: 0x01d202db, size: 57 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(env0_5);
return value.add(15, 'minutes');
}
function handleChangeEvent(a0) { // fn#71446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:1152, owner: EditGuildEventDetails.handleChangeEvent, offset: 0x01d20358, size: 30 bytes, params: 2, frame: 12
env0_11(null);
onChange(a0);
}
function EditGuildEventDetailsOnPress() { // fn#71447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:1388, owner: EditGuildEventDetails.onPress, offset: 0x01d20376, size: 271 bytes, params: 1, frame: 16
var binding;
var guildEventBinding;
var name;
var length;
var value3;
var navigate;
var property;
var moduleValue2;
var EditGuildEventScreens;
var PREVIEW;
var Error;
var moduleValue3;
var intl;
var string;
var moduleValue4;
var t;
var GoV0uR;
var value4;
var prototype;
var error;
var value6;
var message;
var AccessibilityAnnouncer;
var announce;
importAll(dependencyMap[12]).dismissGlobalKeyboard();
reducibleJoin3: while (true) {
reduciblePort41: while (true) {
exceptionLanding40: while (true) {
try {
binding = env0_11;
} catch (error) {
break exceptionLanding40;
}
break reducibleJoin3;
}
binding = env0_11;
message = error.message;
binding(message);
AccessibilityAnnouncer = require(dependencyMap[14]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
message = error.message;
Reflect.apply(announce, AccessibilityAnnouncer, [message]);
break reduciblePort41;
}
return undefined;
}
try {
binding(null);
} catch (error) {
break exceptionLanding40;
}
try {
guildEventBinding = guildEvent;
} catch (error) {
break exceptionLanding40;
}
try {
name = guildEventBinding.name;
} catch (error) {
break exceptionLanding40;
}
try {
length = name.length;
} catch (error) {
break exceptionLanding40;
}
try {
value3 = length === 0;
} catch (error) {
break exceptionLanding40;
}
if (!value3) {
try {
binding = env0_12;
} catch (error) {
break exceptionLanding40;
}
try {
navigate = binding.navigate;
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
property = dependencyMap[13];
} catch (error) {
break exceptionLanding40;
}
try {
moduleValue2 = require(property);
} catch (error) {
break exceptionLanding40;
}
try {
EditGuildEventScreens = moduleValue2.EditGuildEventScreens;
} catch (error) {
break exceptionLanding40;
}
try {
PREVIEW = EditGuildEventScreens.PREVIEW;
} catch (error) {
break exceptionLanding40;
}
try {
Reflect.apply(navigate, binding, [PREVIEW]);
} catch (error) {
break exceptionLanding40;
}
return undefined;
}
try {
Error = global.Error;
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
property = dependencyMap[6];
} catch (error) {
break exceptionLanding40;
}
try {
moduleValue3 = require(property);
} catch (error) {
break exceptionLanding40;
}
try {
intl = moduleValue3.intl;
} catch (error) {
break exceptionLanding40;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding40;
}
try {
property = dependencyMap[6];
} catch (error) {
break exceptionLanding40;
}
try {
moduleValue4 = require(property);
} catch (error) {
break exceptionLanding40;
}
try {
t = moduleValue4.t;
} catch (error) {
break exceptionLanding40;
}
try {
GoV0uR = t.GoV0uR;
} catch (error) {
break exceptionLanding40;
}
try {
value4 = Reflect.apply(string, intl, [GoV0uR]);
} catch (error) {
break exceptionLanding40;
}
try {
prototype = Error.prototype;
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
error = new Error();
} catch (error) {
break exceptionLanding40;
}
try {
value6 = error instanceof Object ? error : undefined;
} catch (error) {
break exceptionLanding40;
}
try {
throw value6;
} catch (error) {
break exceptionLanding40;
}
}
function EditGuildEventDetailsOnChange_71449(a0) { // fn#71449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:1982, owner: EditGuildEventDetails.onChange, offset: 0x01d2049e, size: 279 bytes, params: 2, frame: 17
var binding;
var value3;
var value8;
var intl;
if (env0_10) {
binding = env0_11;
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return binding(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nKIaRG));
}
const object2 = {};
object2.scheduledStartTime = a0.toISOString();
if (scheduledEndTime != null && env0_6.isBefore(a0)) {
value3 = environment.__proto__;
object2.scheduledEndTime = (importDefault(3738) /* metro dependency 3738 */)(a0).add(1, 'hour').toISOString();
}
if (a0 != null && env0_7 != null) {
value8 = environment.__proto__;
object2.recurrenceRule = (require(9039) /* metro dependency 9039: ScheduleUtils */).recurrenceOptionToRecurrenceRule(env0_7,
a0);
}
handleChangeEvent(object2);
}
function onRecurrenceChange(a0) { // fn#71451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:2740, owner: EditGuildEventDetails.onRecurrenceChange, offset: 0x01d205d9, size: 86 bytes, params: 2, frame: 15
var value2;
if (env0_5 != null) {
value2 = environment.__proto__;
onChange({recurrenceRule: (require(9039) /* metro dependency 9039: ScheduleUtils */).recurrenceOptionToRecurrenceRule(a0,
env0_5)});
env0_8(a0);
}
}
function EditGuildEventDetailsOnFocus() { // fn#71453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:2953, owner: EditGuildEventDetails.onFocus, offset: 0x01d20648, size: 30 bytes, params: 1, frame: 13
global.setTimeout(_fun71454, 100);
}
function _fun71454() { // fn#71454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:2970, offset: 0x01d20666, size: 41 bytes, params: 1, frame: 10
if (env1_9.current != null) {
env1_9.current.scrollToEnd();
}
}
@@ -0,0 +1,238 @@
/* Metro module 9074; source: modules/guild_scheduled_events/native/components/EditGuildEventModal.tsx; dependencies: [5, 57, 31, 1385, 33, 4501, 697, 9038, 9047, 1848, 9037, 3869, 1244, 9042, 9075, 9055, 9078, 9119, 9120, 5280, 2] */
function _fun70896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:6, offset: 0x01d0c675, size: 272 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const env0_9 = Reflect.apply(createStyles, createStylesModule,
[{cardStyle: {backgroundColor: BACKGROUND_BASE_LOW}}]);
value = value.memo(_fun70897);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventModal.tsx');
exports.default = value;
}
function _fun70897({guild, onCloseModal, initialGuildEvent, targetChannel}) { // fn#70897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:280, offset: 0x01d0c785, size: 681 bytes, params: 2, frame: 27
const styles = useStyles();
const initialGuildEventData = (require(9038) /* metro dependency 9038: EditGuildEventUtils */).getInitialGuildEventData(initialGuildEvent,
targetChannel);
const binding = env0_6;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [initialGuildEventData]);
const binding2 = env0_5;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_4 = value4[1];
useState = binding.useState;
const editGuildEventUtilsModule = require(9038) /* metro dependency 9038: EditGuildEventUtils */;
const property2 = binding2(Reflect.apply(useState, binding,
[editGuildEventUtilsModule.isEditingEvent(initialGuildEvent)]), 1)[0];
useState = binding.useState;
const property3 = binding2(Reflect.apply(useState, binding, [_fun70898]), 1)[0];
const value5 = binding2((importDefault(9047) /* metro dependency 9047: LazyAPIPromise */)(_fun70899), 2);
var env0_6 = value5[0];
const property4 = value5[1];
let object5 = {guild: guild, guildEvent: property, initialGuildEvent: initialGuildEvent, isEdit: property2,
error: property4.error, loading: property4.loading, onSave: _fun70900(), onChange: onChange_70904};
const closure = function(a0) {
var env0_0 = a0;
return _fun70907;
};
object5 = {};
const EditGuildEventScreens = editGuildEventUtilsModule.EditGuildEventScreens;
let CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
const object6 = {title: ''};
const CHANNEL_SELECTOR2 = EditGuildEventScreens.CHANNEL_SELECTOR;
object6.customNavbar = closure(CHANNEL_SELECTOR2);
object6.headerLeft = function() {
return null;
};
object6.render = render_70909;
object6.fullscreen = true;
object5[CHANNEL_SELECTOR] = object6;
const DETAILS = EditGuildEventScreens.DETAILS;
const object7 = {title: ''};
const DETAILS2 = EditGuildEventScreens.DETAILS;
object7.customNavbar = closure(DETAILS2);
object7.render = render_70910;
object7.fullscreen = true;
object5[DETAILS] = object7;
const PREVIEW = EditGuildEventScreens.PREVIEW;
const object8 = {title: ''};
const PREVIEW2 = EditGuildEventScreens.PREVIEW;
object8.customNavbar = closure(PREVIEW2);
object8.render = render_70911;
object8.fullscreen = true;
object5[PREVIEW] = object8;
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
return (
<Navigator
screens={object5}
initialRouteName={CHANNEL_SELECTOR}
initialRouteStack={property3}
cardShadowEnabled={false}
cardOverlayEnabled={false}
cardStyle={styles.cardStyle}
/>
);
}
function _fun70898() { // fn#70898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:506, offset: 0x01d0ca2e, size: 107 bytes, params: 1, frame: 15
const binding = env0_5;
const object2 = {};
const EditGuildEventScreens = (require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens;
const CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
object2.name = CHANNEL_SELECTOR;
return binding ? [object2, {name: EditGuildEventScreens.DETAILS}] : [object2];
}
function _fun70899() { // fn#70899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:694, offset: 0x01d0ca99, size: 177 bytes, params: 1, frame: 17
var r0;
let value = environment.__proto__;
const value2 = undefined;
(importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
if (env0_5) {
if ((initialGuildEvent == null ? value2 : initialGuildEvent.id) != null) {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.saveEvent(initialGuildEvent.id, env0_3, guild.id);
r0 = value;
} else {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.createGuildEvent(env0_3, guild.id);
r0 = value;
}
} else {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.createGuildEvent(env0_3, guild.id);
r0 = value;
}
return r0;
}
function _fun70900() { // fn#70900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:878, offset: 0x01d0cb4a, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun70902);
return _fun70903;
}
function onChange_70904(a0) { // fn#70904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1281, offset: 0x01d0cc8c, size: 230 bytes, params: 2, frame: 19
var environment;
var id;
var r3;
var value2;
var value3;
var moduleValue;
var getChannelTypeFromEntity;
var value4;
var moduleValue2;
var getEventChannelsByType;
var property;
const env0_0 = a0;
let entityType = a0.entityType;
const value = null;
if (value != entityType) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(9042) /* metro dependency 9042: EntityUtils */;
getChannelTypeFromEntity = moduleValue.getChannelTypeFromEntity;
entityType = a0.entityType;
value4 = Reflect.apply(getChannelTypeFromEntity, moduleValue, [entityType]);
moduleValue2 = require(9075) /* metro dependency 9075: useGetEventChannelsByType */;
getEventChannelsByType = moduleValue2.getEventChannelsByType;
id = guild.id;
property = env1_5(Reflect.apply(getEventChannelsByType, moduleValue2, [id, value4]), 1)[0];
id = value == property ? value3 : property.id;
r3 = value != id ? id : value;
a0.channelId = r3;
entityType = a0.entityType;
r3 = entityType !== GuildScheduledEventEntityTypes.EXTERNAL && env0_3.entityType === GuildScheduledEventEntityTypes.EXTERNAL;
if (r3) {
a0.entityMetadata = value;
}
}
env0_4(_fun70905);
}
function getChannelSelectorHeader(a0) { // fn#70906, offset: 0x01d0cd8e, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun70907;
}
function render_70909() { // fn#70909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1809, offset: 0x01d0cddf, size: 86 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component {...env0_7} {...{['guildEventId']: initialGuildEvent?.id}} />)(importDefault(9078) /* metro dependency 9078: EditGuildEventWhere */);
}
function render_70910() { // fn#70910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:2014, offset: 0x01d0ce35, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...env0_7} />)(importDefault(9119) /* metro dependency 9119: EditGuildEventDetails */);
}
function render_70911() { // fn#70911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:2186, offset: 0x01d0ce6a, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...env0_7} />)(importDefault(9120) /* metro dependency 9120: EditGuildEventPreview */);
}
function* _fun70902() { // fn#70902, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:898, offset: 0x01d0cb79, size: 275 bytes, params: 1, frame: 19
var value6;
var binding;
var binding2;
var AccessibilityAnnouncer;
var announce;
var intl;
var value7;
var binding3;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = undefined;
yield env2_6();
const value4 = undefined;
if (false) {
return value4;
}
if (value4 != null) {
if (env2_5) {
if ((importAll == null ? value3 : importAll.id) != null) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding3 = env3_3;
AccessibilityAnnouncer = binding(binding3[11]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = binding(binding3[12]).intl;
Reflect.apply(announce, AccessibilityAnnouncer, [intl.string(binding(binding3[12]).t['F9On+q'])]);
} else {
value6 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
AccessibilityAnnouncer = binding(binding2[11]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = binding(binding2[12]).intl;
Reflect.apply(announce, AccessibilityAnnouncer, [intl.string(binding(binding2[12]).t['5HzXO5'])]);
}
} else {
value6 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
AccessibilityAnnouncer = binding(binding2[11]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = binding(binding2[12]).intl;
Reflect.apply(announce, AccessibilityAnnouncer, [intl.string(binding(binding2[12]).t['5HzXO5'])]);
}
importDefault();
}
return value3;
}
function _fun70907() { // fn#70907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1597, offset: 0x01d0cda0, size: 63 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__;
return ((Component) => <Component screen={env0_0} onClose={onCloseModal} />)(importDefault(9055) /* metro dependency 9055: EditGuildEventModalNavbar */);
}
@@ -0,0 +1,54 @@
/* Metro module 9055; source: modules/guild_scheduled_events/native/components/EditGuildEventModalNavbar.tsx; dependencies: [57, 31, 27, 33, 4501, 9038, 1360, 6618, 4573, 1244, 5277, 8160, 2] */
function _fun70799(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9240:6, offset: 0x01d08519, size: 275 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'space-between', 'paddingHorizontal': 4, 'paddingVertical': 8},
headerTitle: {'lineHeight': 28, 'textTransform': 'uppercase'}, buttonContainer: {width: 60},
rightButton: {marginLeft: 12}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventModalNavbar.tsx');
exports.default = EditGuildEventModalNavbar;
}
function EditGuildEventModalNavbar({screen, onClose}) { // fn#70800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9240:534, offset: 0x01d0862c, size: 574 bytes, params: 2, frame: 30
var r2;
const styles = useStyles();
const EditGuildEventScreens = (require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens;
const CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
if (CHANNEL_SELECTOR === screen) {
r2 = [1, 3];
} else if ((require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens.DETAILS === screen) {
r2 = [2, 3];
} else if ((require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens.PREVIEW === screen) {
r2 = [3, 3];
} else {
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(screen);
r2 = undefined;
}
const value3 = env0_3(r2, 2);
const property = value3[0];
const property2 = value3[1];
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
let buttonContainer = styles.buttonContainer;
const items2 = [<View style={buttonContainer} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.headerTitle} variant="text-xs/bold" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['42HaFY'],
{step: property, total: property2})}</Text>;
buttonContainer = styles.buttonContainer;
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
items2[2] = <View style={buttonContainer}><HeaderActionButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={onClose} source={importDefault(8160) /* metro dependency 8160 */} style={styles.rightButton} /></View>;
return (
<SafeAreaPaddingView top style={styles.header}>
{items2}
</SafeAreaPaddingView>
);
}
@@ -0,0 +1,219 @@
/* Metro module 9120; source: modules/guild_scheduled_events/native/components/EditGuildEventPreview.tsx; dependencies: [31, 27, 1379, 661, 33, 4501, 697, 477, 566, 4805, 9042, 9121, 1305, 1244, 4573, 9122, 9123, 9038, 6618, 9048, 4578, 9039, 4496, 9124, 1962, 2] */
function _fun71455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:6, offset: 0x01d2068f, size: 744 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
const env0_3 = importAll(dependencyMap[value]);
const env0_4 = (require(27) /* metro dependency 27 */).View;
const value2 = 2;
const env0_5 = importDefault(dependencyMap[value2]);
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {'flex': 1, 'padding': 16, 'paddingBottom': 0, 'backgroundColor': null,
'flexDirection': 'column', 'height': '100%', 'overflow': 'visible', backgroundColor: BACKGROUND_BASE_LOW};
object2.centered = {'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center'};
object2.centerContainer = {'flexGrow': 0, 'width': '100%'};
object2.flex = {'flex': 1, 'overflow': 'visible'};
object2.header = {'alignItems': 'center', 'paddingBottom': 24};
const object4 = {'fontSize': 24, 'fontFamily': null, 'lineHeight': 30, 'marginTop': 16, 'marginBottom': 8};
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object4.fontFamily = PRIMARY_BOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object4.color = MOBILE_TEXT_HEADING_PRIMARY;
object2.headerTitle = object4;
object2.headerSubtitle = {textAlign: 'center'};
const object7 = {'padding': 16, 'backgroundColor': null, 'marginBottom': 24, 'borderColor': null, 'borderWidth': 1,
'borderRadius': null, 'shadowOpacity': 0.2, 'elevation': 2, 'shadowRadius': 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object7.backgroundColor = BACKGROUND_SURFACE_HIGH;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object7.borderColor = BORDER_SUBTLE;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object7.shadowOffset = {'height': 8, 'width': 0};
object7.overflow = 'visible';
object2.eventContainer = object7;
object2.channelContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
'height': 14};
const object9 = {'tintColor': null, 'marginRight': 4, 'height': 14};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object9.tintColor = TEXT_SUBTLE;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object9.transform = [{translateY: platformUtilsModule.isAndroid() ? value2 : value}];
object2.channelIcon = object9;
object2.buttonContainer = {'position': 'absolute', 'bottom': 16, 'left': 0, 'right': 0};
const object10 = {'paddingBottom': 8, 'fontSize': 14};
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
object10.fontFamily = PRIMARY_MEDIUM;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object10.color = RED_400;
object2.error = object10;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventPreview.tsx');
exports.default = EditGuildEventPreview;
}
function PreviewBody({event}) { // fn#71456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:1394, offset: 0x01d20977, size: 635 bytes, params: 2, frame: 32
var r11;
var formatToPlainString;
var sxcQPE;
var object;
const styles = useStyles();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channel_id);
}, [event.channel_id]);
const r14 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(value3) ?? (require(9042) /* metro dependency 9042: EntityUtils */).getLocationFromEvent(event);
const env0_3 = (require(9121) /* metro dependency 9121: GuildEventUtils */).getEventLocationIconSource(event,
value3, true);
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const legacyText = <LegacyText style={styles.headerTitle}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBsFE3)}</LegacyText>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
if (value3 != null) {
formatToPlainString = intl.formatToPlainString;
sxcQPE = (require(1244) /* metro dependency 1244: indexNative */).t.sxcQPE;
object = {};
object.channelName = (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: value3});
r11 = Reflect.apply(formatToPlainString, intl, [sxcQPE, object]);
} else {
r11 = undefined;
}
return (
<View style={styles.header}>
{legacyText}
<Text
style={styles.headerSubtitle}
accessibilityLabel={r11}
variant="text-sm/medium"
color="text-default"
>
{value3 != null ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.f55NX0,
{channelName: r14,
channelHook: channelHook}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.KDPFi9)}
</Text>
</View>
);
}
function EditGuildEventPreview({guild, initialGuildEvent, guildEvent, isEdit, loading, error, onSave}) { // fn#71459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:2587, offset: 0x01d20d2a, size: 738 bytes, params: 2, frame: 38
const env0_3 = isEdit;
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r17 = isEdit ? Reflect.apply(string, intl, [t.e5VEcE]) : Reflect.apply(string, intl, [t['60lJ0C']]);
const value4 = env0_3.useMemo(_fun71460, [guildEvent, guild.id]);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const items3 = [styles.flex];
items3[1] = styles.centered;
const GuildEventCardImageHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardImageHeader;
const items2 = [<GuildEventCardImageHeader event={value4} />];
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
items2[1] = <GuildEventCardHeader event={value4} isPreview />;
const GuildEventCardMetaInfo = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardMetaInfo;
items2[2] = <GuildEventCardMetaInfo event={value4} />;
const GuildEventSimpleLocation = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventSimpleLocation;
items2[3] = <GuildEventSimpleLocation event={value4} />;
const view = <View style={styles.centerContainer}><View style={styles.eventContainer}>{items2}</View><PreviewBody event={value4} /></View>;
const r13 = error != null ? ((LegacyText) => <LegacyText style={styles.error}>{error.getAnyErrorMessage()}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText) : null;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<SafeAreaPaddingView bottom style={styles.container}>
<View style={items3}>
{view}
<View style={styles.buttonContainer}>
{r13}
<Button
text={r17}
variant="primary"
onPress={onPress_71461}
disabled={loading}
loading={loading}
/>
</View>
</View>
</SafeAreaPaddingView>
);
}
function channelHook() { // fn#71458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:2042, owner: PreviewBody.channelHook, offset: 0x01d20bf2, size: 312 bytes, params: 1, frame: 28
var r10;
let value = environment.__proto__;
const Fragment = env1_3.Fragment;
const value3 = null;
const view = <View style={styles.channelContainer}>{value3 != env0_3 && ((Icon) => <Icon source={env0_3} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
if (value3 != env0_2) {
value = require(9123) /* metro dependency 9123: guildEventDetailsParserNative */;
value = value.guildEventDetailsParser(env0_2, true);
r10 = value;
} else {
r10 = value3;
}
return (
<Fragment key={value3 != env0_2 ? env0_2 : 'preview-body'}>
{view}
<Text
accessibilityElementsHidden
importantForAccessibility="no"
variant="text-sm/medium"
color="text-default"
>
{r10}
</Text>
</Fragment>
);
}
function _fun71460() { // fn#71460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:2808, offset: 0x01d2100c, size: 55 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9038) /* metro dependency 9038: EditGuildEventUtils */;
return value.convertToFakeGuildEvent(guildEvent, guild.id);
}
function EditGuildEventPreviewOnPress() { // fn#71461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3460, owner: EditGuildEventPreview.onPress, offset: 0x01d21043, size: 137 bytes, params: 1, frame: 16
var environment;
var value2;
var moduleValue;
var value;
if (guildEvent.recurrenceRule == null) {
onSave();
} else if (isEdit) {
value2 = environment.__proto__;
moduleValue = require(9039) /* metro dependency 9039: ScheduleUtils */;
if (moduleValue.hasScheduleChanges(initialGuildEvent, guildEvent)) {
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_71462});
} else {
onSave();
}
} else {
onSave();
}
}
function onPressImporter_71462() { // fn#71462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3553, owner: EditGuildEventPreview.onPress.importer, offset: 0x01d210cc, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[24]);
value = value(dependencyMap[23], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun71464;
});
}
function _fun71463({default: env0_0}) { // fn#71463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3587, offset: 0x01d2110c, size: 23 bytes, params: 2, frame: 2
return _fun71464;
}
function _fun71464(a0) { // fn#71464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3602, offset: 0x01d21123, size: 52 bytes, params: 2, frame: 14
return ((Component) => <Component {...a0} {...{['onConfirm']: onSave}} />)(env0_0);
}
@@ -0,0 +1,140 @@
/* Metro module 9053; source: modules/guild_scheduled_events/native/components/EditGuildEventRecurrenceModal.tsx; dependencies: [5, 57, 31, 33, 4501, 697, 9044, 9039, 9047, 1848, 9054, 4578, 1244, 9055, 9038, 9056, 9057, 4573, 5280, 2] */
function _fun70785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:6, offset: 0x01d07cdf, size: 265 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const env0_9 = Reflect.apply(createStyles, value, [{cardStyle: {backgroundColor: BACKGROUND_BASE_LOW}}]);
object = {TIME: 'TIME'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventRecurrenceModal.tsx');
exports.default = EditGuildEventRecurrenceModal;
}
function EditGuildEventRecurrenceModal({guildEvent, onCloseModal, recurrenceId}) { // fn#70786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:414, offset: 0x01d07de8, size: 558 bytes, params: 2, frame: 25
var object2;
const styles = useStyles();
const scheduleForRecurrenceWithException = (require(9039) /* metro dependency 9039: ScheduleUtils */).getScheduleForRecurrenceWithException((require(9039) /* metro dependency 9039: ScheduleUtils */).getBaseScheduleForRecurrence(recurrenceId,
guildEvent), (importDefault(9044) /* metro dependency 9044: useEventException */)(recurrenceId, guildEvent.id));
let binding = env0_6;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [scheduleForRecurrenceWithException]);
const binding2 = env0_5;
const value6 = binding2(value5, 2);
var env0_5 = value6[0];
var env0_6 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property = value7[0];
const env0_8 = value7[1];
const value8 = binding2((importDefault(9047) /* metro dependency 9047: LazyAPIPromise */)(_fun70787), 2);
const env0_9 = value8[0];
const error = value8[1].error;
const env0_10 = error;
const value9 = _fun70788();
binding.useEffect(_fun70793, [error]);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_12 = <Button size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])} onPress={value9} disabled={property != null} />;
object2 = {};
binding = env0_10;
let TIME = binding.TIME;
object2[TIME] = {title: '', customNavbar: customNavbar, headerLeft: function() {
return null;
}, render: render_70796, fullscreen: true};
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
TIME = binding.TIME;
return (
<Navigator
screens={object2}
initialRouteName={TIME}
cardShadowEnabled={false}
cardOverlayEnabled={false}
cardStyle={styles.cardStyle}
/>
);
}
function _fun70787() { // fn#70787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:716, offset: 0x01d08016, size: 78 bytes, params: 1, frame: 17
const value = environment.__proto__;
(importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
return (importDefault(9054) /* metro dependency 9054: saveGuildEventRecurrence */)(guildEvent, recurrenceId, env0_5,
env0_3);
}
function _fun70788() { // fn#70788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:805, offset: 0x01d08064, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun70790);
return _fun70791;
}
function handleScheduleChange({startDate, endDate}) { // fn#70792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:976, owner: EditGuildEventRecurrenceModal.handleScheduleChange, offset: 0x01d08100, size: 110 bytes, params: 2, frame: 16
var r0;
let value = startDate != null;
if (value && endDate != null && endDate.isBefore(startDate)) {
value = startDate.clone();
value = value.add(1, 'hour');
r0 = value;
} else {
r0 = endDate;
}
env0_6({startDate: startDate, endDate: r0});
env0_8(null);
}
function _fun70793() { // fn#70793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:1114, offset: 0x01d0816e, size: 57 bytes, params: 1, frame: 14
const binding = env0_8;
const errorBinding = error;
const value2 = null;
const value3 = undefined;
const r3 = value2 == errorBinding ? value3 : error.getAnyErrorMessage();
binding(value2 != r3 ? r3 : value2);
return value3;
}
function customNavbar() { // fn#70794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:1337, owner: EditGuildEventRecurrenceModal.customNavbar, offset: 0x01d081a7, size: 84 bytes, params: 1, frame: 16
const EditGuildEventModalNavbar = importDefault(9055) /* metro dependency 9055: EditGuildEventModalNavbar */;
const EditGuildEventScreens = (require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens;
const DETAILS = EditGuildEventScreens.DETAILS;
return <EditGuildEventModalNavbar screen={DETAILS} onClose={onCloseModal} />;
}
function EditGuildEventRecurrenceModalRender() { // fn#70796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:1438, owner: EditGuildEventRecurrenceModal.render, offset: 0x01d081fb, size: 196 bytes, params: 1, frame: 20
const value = environment.__proto__;
const EditGuildEventStepContainer = importDefault(9056) /* metro dependency 9056: EditGuildEventStepContainer */;
const defaultImportProps = {action: env0_12};
const value3 = ((Component) => <Component guildEvent={guildEvent} recurrenceId={recurrenceId} schedule={env0_5} onChange={handleScheduleChange} />)(importDefault(9057) /* metro dependency 9057: GuildEventSchedule */);
const value4 = null;
return (
<EditGuildEventStepContainer {...defaultImportProps}>
{value3}
{value4 != env0_7 ? ((Text) => <Text variant="text-md/normal" color="text-feedback-critical">{env0_7}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : value4}
</EditGuildEventStepContainer>
);
}
function* _fun70790() { // fn#70790, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:825, offset: 0x01d08093, size: 109 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__.__proto__;
if (Reflect.apply(env3_0(env3_3[7]).areSchedulesIdentical, value, [env2_5, env2_4])) {
importDefault();
} else {
var styles = useStyles();
yield styles;
value = undefined;
if (false) {
return value;
}
if (value != null) {
importDefault();
}
}
}
}
@@ -0,0 +1,56 @@
/* Metro module 9056; source: modules/guild_scheduled_events/native/components/EditGuildEventStepContainer.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 5463, 2] */
function _fun70801(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9241:6, offset: 0x01d0886a, size: 347 bytes, params: 8, frame: 24
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.ScrollView;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {'flex': 1, 'paddingHorizontal': 0, 'paddingVertical': 0, 'backgroundColor': null,
'flexDirection': 'column', 'height': '100%', backgroundColor: BACKGROUND_BASE_LOW};
object2.flex = {flex: 1};
object2.scroller = {paddingHorizontal: 16};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.buttonContainer = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'paddingHorizontal': 16,
'paddingVertical': 16, backgroundColor: BACKGROUND_BASE_LOW};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.forwardRef(_fun70802);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventStepContainer.tsx');
exports.default = value;
}
function _fun70802({children, action}, a1) { // fn#70802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9241:563, offset: 0x01d089c5, size: 309 bytes, params: 3, frame: 25
const styles = useStyles();
const binding = env0_3;
const [property, env0_0] = env0_2(binding.useState(32), 2);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets;
return (
<View style={styles.container}>
<ScrollView
ref={a1}
automaticallyAdjustContentInsets={false}
keyboardShouldPersistTaps="handled"
style={[styles.flex, {marginBottom: property + insets.bottom}]}
contentContainerStyle={styles.scroller}
>
{children}
</ScrollView>
<View
style={[styles.buttonContainer, {paddingBottom: insets.bottom}]}
onLayout={binding.useCallback(_fun70803, [])}
>
{action}
</View>
</View>
);
}
@@ -0,0 +1,34 @@
/* Metro module 9110; source: modules/guild_scheduled_events/native/components/EditGuildEventStepHeader.tsx; dependencies: [31, 27, 33, 4501, 4573, 2] */
function _fun71261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9295:6, offset: 0x01d1b1c5, size: 241 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'alignItems': 'center',
'paddingBottom': 24}, headerTitle: {'marginTop': 8, 'marginBottom': 8}, headerSubtitle: {textAlign: 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventStepHeader.tsx');
exports.default = EditGuildEventStepHeader;
}
function EditGuildEventStepHeader({title, subtitle}) { // fn#71262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9295:416, offset: 0x01d1b2b6, size: 218 bytes, params: 2, frame: 22
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const styles = useStyles();
return (
<View style={styles.header}>
<Text
style={styles.headerTitle}
accessibilityRole="header"
variant="heading-xl/semibold"
color="mobile-text-heading-primary"
>
{title}
</Text>
{subtitle != null ? subtitle === '' ? null : <Text style={styles.headerSubtitle} variant="text-sm/medium" color="text-default">{subtitle}</Text> : null}
</View>
);
}
@@ -0,0 +1,592 @@
/* Metro module 9078; source: modules/guild_scheduled_events/native/components/EditGuildEventWhere.tsx; dependencies: [57, 31, 1379, 3784, 4117, 1385, 661, 33, 4501, 1244, 9042, 566, 1484, 9079, 9058, 4573, 4578, 1848, 9038, 3869, 9056, 9110, 3738, 9111, 6766, 9112, 2] */
function _fun70938(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9263:6, offset: 0x01d0daeb, size: 365 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_8 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildScheduledEventActive;
let value = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
const env0_9 = value.AGE_VERIFICATION_STAGE_CHANNEL_TYPES;
const env0_10 = value.GuildScheduledEventEntityTypes;
value = require(661) /* metro dependency 661: Constants */;
const env0_11 = value.Permissions;
const env0_12 = value.GuildSettingsSections;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.Fragment;
const env0_15 = value.jsxs;
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({channelSelection: {marginTop: 16},
error: {paddingVertical: 8}, text: {marginTop: 24}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventWhere.tsx');
exports.default = EditGuildEventWhere;
}
function EditGuildEventWhere({guild, guildEvent, guildEventId, initialGuildEvent, onChange}) { // fn#70939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9263:573, offset: 0x01d0dc58, size: 1143 bytes, params: 2, frame: 35
var r8;
const styles = useStyles();
const binding = env0_5;
const value3 = binding.useRef(null);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(guildEvent.channelId);
}, [guildEvent.channelId]);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var MANAGE_ROLES = Permissions.MANAGE_ROLES;
return PermissionStore.can(MANAGE_ROLES, guild);
}, [guild]);
const [property, env0_4] = env0_4Binding(binding.useState(null), 2);
var env0_5 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(initialGuildEvent);
const EditGuildEventChannelSelection = importDefault(9079) /* metro dependency 9079: EditGuildEventChannelSelection */;
const entityUtilsModule = require(9042) /* metro dependency 9042: EntityUtils */;
const getChannelTypeFromEntity = entityUtilsModule.getChannelTypeFromEntity;
let entityType = guildEvent.entityType;
const editGuildEventChannelSelection = <EditGuildEventChannelSelection guild={guild} channel={value4} guildEventId={guildEventId} channelType={Reflect.apply(getChannelTypeFromEntity,
entityUtilsModule, [entityType])} onChangeChannel={onChangeChannel} style={styles.channelSelection} />;
entityType = guildEvent.entityType;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
if (entityType === EXTERNAL) {
const GuildEventLocation = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventLocation;
r8 = <GuildEventLocation location={entityUtilsModule.getLocationFromEventData(guildEvent) ?? ''} onChange={onChange_70943} onFocus={function() {
global.setTimeout(_fun70945, 100);
}} />;
} else {
r8 = value4 != null ? editGuildEventChannelSelection : null;
}
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const r10 = property != null ? ((Text) => <Text style={styles.error} variant="text-sm/normal" color="text-feedback-critical">{property}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
const fragment = <>{r10}<Button text={Reflect.apply(string, intl,
[PDTjLN])} variant="primary" onPress={onPress_70946} disabled={property != null} /></>;
const EditGuildEventStepContainer = importDefault(9056) /* metro dependency 9056: EditGuildEventStepContainer */;
const EditGuildEventStepHeader = importDefault(9110) /* metro dependency 9110: EditGuildEventStepHeader */;
const editGuildEventStepHeaderProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['DC+Qm8'])};
string = intl.string;
const IwmXLP = (require(1244) /* metro dependency 1244: indexNative */).t.IwmXLP;
editGuildEventStepHeaderProps.subtitle = Reflect.apply(string, intl, [IwmXLP]);
const items4 = [<EditGuildEventStepHeader {...editGuildEventStepHeaderProps} />];
const GuildEventEntityTypeSelection = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventEntityTypeSelection;
items4[1] = <GuildEventEntityTypeSelection guild={guild} entityType={guildEvent.entityType} onChange={onChange_70947} disabled={isGuildScheduledEventActive2} />;
items4[2] = r8;
items4[3] = AGE_VERIFICATION_STAGE_CHANNEL_TYPES.has(guildEvent.entityType) && ((Component) => <Component />)(importDefault(9111) /* metro dependency 9111: StageChannelAgeVerificationNoticeForEvent */);
items4[4] = value5 && ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround style={styles.text} variant="text-sm/normal" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['K+DH2o'],
{onClick: function() {
importDefault(dependencyMap[25]).open(guild.id, GuildSettingsSections.ROLES);
}})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround);
return (
<EditGuildEventStepContainer action={fragment} ref={value3}>
{items4}
</EditGuildEventStepContainer>
);
}
function onChangeChannel({id}) { // fn#70942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9263:1050, owner: EditGuildEventWhere.onChangeChannel, offset: 0x01d0e114, size: 41 bytes, params: 2, frame: 12
env0_4(null);
onChange({channelId: id});
}
function EditGuildEventWhereOnChange(a0) { // fn#70943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9263:1239, owner: EditGuildEventWhere.onChange, offset: 0x01d0e13d, size: 43 bytes, params: 2, frame: 13
env0_4(null);
onChange({entityMetadata: {location: a0}});
}
function EditGuildEventWhereOnFocus() { // fn#70944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9263:1293, owner: EditGuildEventWhere.onFocus, offset: 0x01d0e168, size: 30 bytes, params: 1, frame: 13
global.setTimeout(_fun70945, 100);
}
function EditGuildEventWhereOnPress() { // fn#70946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9263:1606, owner: EditGuildEventWhere.onPress, offset: 0x01d0e1af, size: 526 bytes, params: 1, frame: 18
var binding;
var guildEventBinding;
var entityType;
var channelId;
var NONE;
var value3;
var EXTERNAL;
var value4;
var property;
var moduleValue2;
var getLocationFromEventData;
var value5;
var value6;
var value7;
var value8;
var push;
var moduleValue3;
var EditGuildEventScreens;
var DETAILS;
var Error;
var moduleValue4;
var intl;
var string;
var moduleValue5;
var t;
var value9;
var prototype;
var error;
var value11;
var moduleValue6;
var moduleValue7;
var q91szp;
var value12;
var value14;
var moduleValue8;
var moduleValue9;
var C4KzmQ;
var value15;
var value17;
var message;
var AccessibilityAnnouncer;
var announce;
importAll(dependencyMap[17]).dismissGlobalKeyboard();
reducibleJoin3: while (true) {
reduciblePort97: while (true) {
exceptionLanding96: while (true) {
try {
binding = env0_4;
} catch (error) {
break exceptionLanding96;
}
break reducibleJoin3;
}
binding = env0_4;
message = error.message;
binding(message);
AccessibilityAnnouncer = require(dependencyMap[19]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
message = error.message;
Reflect.apply(announce, AccessibilityAnnouncer, [message]);
break reduciblePort97;
}
return undefined;
}
try {
binding(null);
} catch (error) {
break exceptionLanding96;
}
try {
guildEventBinding = guildEvent;
} catch (error) {
break exceptionLanding96;
}
try {
entityType = guildEventBinding.entityType;
} catch (error) {
break exceptionLanding96;
}
try {
channelId = guildEventBinding.channelId;
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
NONE = GuildScheduledEventEntityTypes.NONE;
} catch (error) {
break exceptionLanding96;
}
try {
value3 = entityType === NONE;
} catch (error) {
break exceptionLanding96;
}
if (!value3) {
try {
} catch (error) {
break exceptionLanding96;
}
try {
EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
} catch (error) {
break exceptionLanding96;
}
try {
value4 = entityType !== EXTERNAL;
} catch (error) {
break exceptionLanding96;
}
if (!value4) {
try {
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
property = dependencyMap[10];
} catch (error) {
break exceptionLanding96;
}
try {
moduleValue2 = require(property);
} catch (error) {
break exceptionLanding96;
}
try {
getLocationFromEventData = moduleValue2.getLocationFromEventData;
} catch (error) {
break exceptionLanding96;
}
try {
value5 = Reflect.apply(getLocationFromEventData, moduleValue2, [guildEventBinding]);
} catch (error) {
break exceptionLanding96;
}
try {
value6 = value5 == null;
} catch (error) {
break exceptionLanding96;
}
reducibleJoin22: while (true) {
if (!value6) {
break reducibleJoin22;
}
try {
Error = global.Error;
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
property = dependencyMap[9];
} catch (error) {
break exceptionLanding96;
}
try {
moduleValue6 = require(property);
} catch (error) {
break exceptionLanding96;
}
try {
intl = moduleValue6.intl;
} catch (error) {
break exceptionLanding96;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding96;
}
try {
property = dependencyMap[9];
} catch (error) {
break exceptionLanding96;
}
try {
moduleValue7 = require(property);
} catch (error) {
break exceptionLanding96;
}
try {
t = moduleValue7.t;
} catch (error) {
break exceptionLanding96;
}
try {
q91szp = t.q91szp;
} catch (error) {
break exceptionLanding96;
}
try {
value12 = Reflect.apply(string, intl, [q91szp]);
} catch (error) {
break exceptionLanding96;
}
try {
prototype = Error.prototype;
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
error = new Error();
} catch (error) {
break exceptionLanding96;
}
try {
value14 = error instanceof Object ? error : undefined;
} catch (error) {
break exceptionLanding96;
}
try {
throw value14;
} catch (error) {
break exceptionLanding96;
}
}
}
try {
value7 = channelId != null;
} catch (error) {
break exceptionLanding96;
}
if (!value7) {
try {
} catch (error) {
break exceptionLanding96;
}
try {
EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
} catch (error) {
break exceptionLanding96;
}
try {
value8 = entityType !== EXTERNAL;
} catch (error) {
break exceptionLanding96;
}
reducibleJoin26: while (true) {
if (!value8) {
break reducibleJoin26;
}
try {
Error = global.Error;
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
property = dependencyMap[9];
} catch (error) {
break exceptionLanding96;
}
try {
moduleValue4 = require(property);
} catch (error) {
break exceptionLanding96;
}
try {
intl = moduleValue4.intl;
} catch (error) {
break exceptionLanding96;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding96;
}
try {
property = dependencyMap[9];
} catch (error) {
break exceptionLanding96;
}
try {
moduleValue5 = require(property);
} catch (error) {
break exceptionLanding96;
}
try {
t = moduleValue5.t;
} catch (error) {
break exceptionLanding96;
}
try {
property = t['4LQwnw'];
} catch (error) {
break exceptionLanding96;
}
try {
value9 = Reflect.apply(string, intl, [property]);
} catch (error) {
break exceptionLanding96;
}
try {
prototype = Error.prototype;
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
error = new Error();
} catch (error) {
break exceptionLanding96;
}
try {
value11 = error instanceof Object ? error : undefined;
} catch (error) {
break exceptionLanding96;
}
try {
throw value11;
} catch (error) {
break exceptionLanding96;
}
}
}
try {
binding = env0_5;
} catch (error) {
break exceptionLanding96;
}
try {
push = binding.push;
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
property = dependencyMap[18];
} catch (error) {
break exceptionLanding96;
}
try {
moduleValue3 = require(property);
} catch (error) {
break exceptionLanding96;
}
try {
EditGuildEventScreens = moduleValue3.EditGuildEventScreens;
} catch (error) {
break exceptionLanding96;
}
try {
DETAILS = EditGuildEventScreens.DETAILS;
} catch (error) {
break exceptionLanding96;
}
try {
Reflect.apply(push, binding, [DETAILS]);
} catch (error) {
break exceptionLanding96;
}
return undefined;
}
try {
Error = global.Error;
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
property = dependencyMap[9];
} catch (error) {
break exceptionLanding96;
}
try {
moduleValue8 = require(property);
} catch (error) {
break exceptionLanding96;
}
try {
intl = moduleValue8.intl;
} catch (error) {
break exceptionLanding96;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding96;
}
try {
property = dependencyMap[9];
} catch (error) {
break exceptionLanding96;
}
try {
moduleValue9 = require(property);
} catch (error) {
break exceptionLanding96;
}
try {
t = moduleValue9.t;
} catch (error) {
break exceptionLanding96;
}
try {
C4KzmQ = t.C4KzmQ;
} catch (error) {
break exceptionLanding96;
}
try {
value15 = Reflect.apply(string, intl, [C4KzmQ]);
} catch (error) {
break exceptionLanding96;
}
try {
prototype = Error.prototype;
} catch (error) {
break exceptionLanding96;
}
try {
} catch (error) {
break exceptionLanding96;
}
try {
error = new Error();
} catch (error) {
break exceptionLanding96;
}
try {
value17 = error instanceof Object ? error : undefined;
} catch (error) {
break exceptionLanding96;
}
try {
throw value17;
} catch (error) {
break exceptionLanding96;
}
}
function EditGuildEventWhereOnChange_70947(a0) { // fn#70947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9263:2385, owner: EditGuildEventWhere.onChange, offset: 0x01d0e3bd, size: 153 bytes, params: 2, frame: 17
env0_4(null);
const object2 = {entityType: a0, scheduledEndTime: undefined};
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
if (a0 === EXTERNAL) {
object2.scheduledEndTime = ((importDefault(3738) /* metro dependency 3738 */)(guildEvent.scheduledStartTime) ?? (importDefault(3738) /* metro dependency 3738 */)()).add(1,
'hour').toISOString();
}
onChange(object2);
}
function _fun70945() { // fn#70945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9263:1310, offset: 0x01d0e186, size: 41 bytes, params: 1, frame: 10
if (env1_3.current != null) {
env1_3.current.scrollToEnd();
}
}
@@ -0,0 +1,27 @@
/* Metro module 9124; source: modules/guild_scheduled_events/native/components/EditGuildScheduledEventResetWarningAlert.tsx; dependencies: [31, 33, 4596, 1244, 2] */
function _fun71474(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9309:6, offset: 0x01d21f7f, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildScheduledEventResetWarningAlert.tsx');
exports.default = EditGuildScheduledEventResetWarningAlert;
}
function EditGuildScheduledEventResetWarningAlert({onClose, onConfirm}) { // fn#71475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9309:255, offset: 0x01d22009, size: 298 bytes, params: 2, frame: 22
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const object2 = {onClose: onClose, onConfirm: onConfirm};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aNCYas);
const format = intl.format;
const RWBa5X = (require(1244) /* metro dependency 1244: indexNative */).t.RWBa5X;
object2.body = Reflect.apply(format, intl, [RWBa5X, {}]);
object2.confirmText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cY+Oob']);
const Colors = Alert.Colors;
const GREEN = Colors.GREEN;
object2.confirmColor = GREEN;
object2.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
return <Alert {...object2} />;
}
@@ -0,0 +1,72 @@
/* Metro module 9227; source: modules/guild_scheduled_events/native/components/EndEventActionSheet.tsx; dependencies: [31, 27, 1385, 661, 33, 4501, 697, 9127, 4080, 9228, 8132, 1305, 1244, 4573, 4578, 9037, 2] */
function _fun72158(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:6, offset: 0x01d3c87b, size: 364 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).EXPLICIT_END_EVENT_SHEET_KEY;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'fontSize': 24, 'fontFamily': null, 'textAlign': 'center'};
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object.fontFamily = PRIMARY_BOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object.color = MOBILE_TEXT_HEADING_PRIMARY;
const env0_7 = Reflect.apply(createStyles, value, [{container: {'paddingVertical': 24, 'paddingHorizontal': 16,
'alignItems': 'center'}, title: object, subtitle: {'marginTop': 8, 'textAlign': 'center'},
cancelButtonContainer: {'marginTop': 24, 'alignSelf': 'stretch'}, confirmButtonContainer: {'marginTop': 8,
'alignSelf': 'stretch'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EndEventActionSheet.tsx');
exports.default = EndEventActionSheet;
}
function EndEventActionSheet({channel}) { // fn#72159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:686, offset: 0x01d3c9e7, size: 606 bytes, params: 2, frame: 31
const styles = useStyles();
if ((require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useActiveEvent(channel.id) == null) {
return null;
}
const closure = onPress_72160;
const ScrollHandlingActionSheet = importDefault(8132) /* metro dependency 8132: ScrollHandlingActionSheet */;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items2 = [<LegacyText style={styles.title} accessibilityRole="header">{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['4Ao8LC']])}</LegacyText>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={styles.subtitle} variant="text-md/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0I0B8f'])}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const P60OAX = (require(1244) /* metro dependency 1244: indexNative */).t.P60OAX;
items2[2] = <View style={styles.cancelButtonContainer}><Button text={Reflect.apply(string, intl,
[P60OAX])} grow onPress={closure} /></View>;
items2[3] = <View style={styles.confirmButtonContainer}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mjB9pd)} variant="destructive" grow onPress={onPress_72161} /></View>;
return (
<ScrollHandlingActionSheet>
<View style={styles.container}>
{items2}
</View>
</ScrollHandlingActionSheet>
);
}
function EndEventActionSheetOnPress() { // fn#72160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:808, owner: EndEventActionSheet.onPress, offset: 0x01d3cc45, size: 76 bytes, params: 1, frame: 14
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(EXPLICIT_END_EVENT_SHEET_KEY);
value = require(9228) /* metro dependency 9228: CallsUtils */;
value.handleDisconnect(channel);
}
function EndEventActionSheetOnPress_72161() { // fn#72161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:1469, owner: EndEventActionSheet.onPress, offset: 0x01d3cc91, size: 64 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
const endEvent = value.endEvent;
const binding = env0_1;
Reflect.apply(endEvent, value, [binding.id, binding.guild_id]);
onPress_72160();
}
@@ -0,0 +1,105 @@
/* Metro module 9135; source: modules/guild_scheduled_events/native/components/GuildEventCard.tsx; dependencies: [31, 27, 4294, 4117, 1385, 33, 4501, 697, 9048, 6261, 566, 9038, 6239, 8128, 9136, 2] */
function _fun71563(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:6, offset: 0x01d24787, size: 322 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const env0_5 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildScheduledEventActive;
const env0_6 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).AGE_VERIFICATION_STAGE_CHANNEL_TYPES;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const styles = Reflect.apply(createStyles, createStylesModule, [{actionContainer: {paddingTop: PX_16,
paddingBottom: 0}}]);
value = value.memo(_fun71565);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventCard.tsx');
exports.default = value;
exports.useGuildEventCardStyles = styles;
}
function GuildEventCardControls({event, isConnected, onCloseAction}) { // fn#71564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:334, offset: 0x01d248c9, size: 287 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).usePrimaryActionButtonType(event,
isConnected);
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const GuildEventCardPrimaryAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardPrimaryAction;
const guildEventCardPrimaryAction = <GuildEventCardPrimaryAction event={event} onCloseAction={onCloseAction} isConnected={isConnected} />;
const PrimaryActionType = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).PrimaryActionType;
const START = PrimaryActionType.START;
const r6 = value2 === START && ((GuildEventCardRSVPAction) => <GuildEventCardRSVPAction event={event} />)((require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardRSVPAction);
const GuildEventShareAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventShareAction;
return (
<ButtonGroup direction="horizontal" style={styles.actionContainer}>
{guildEventCardPrimaryAction}
{r6}
<GuildEventShareAction event={event} />
</ButtonGroup>
);
}
function _fun71565({event, onPress, onCloseAction, hideControls, hideAgeVerificationNotice, isNew}) { // fn#71565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:768, offset: 0x01d249e8, size: 600 bytes, params: 2, frame: 35
var r8;
hideControls = !(hideControls === undefined) && hideControls;
hideAgeVerificationNotice = !(hideAgeVerificationNotice === undefined) && hideAgeVerificationNotice;
isNew = !(isNew === undefined) && isNew;
const channel_id = event.channel_id;
var value;
const r17 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], _fun71566,
[channel_id]) && isGuildScheduledEventActive(event);
const editGuildEventUtilsModule = require(9038) /* metro dependency 9038: EditGuildEventUtils */;
const value3 = editGuildEventUtilsModule.recurrenceRuleFromServer(event.recurrence_rule);
const closure = function() {
if (onPress != null) {
onPress(event);
}
};
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
const items2 = [<GuildEventCardHeader event={event} isNew={isNew} />];
const GuildEventCardMetaInfo = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardMetaInfo;
items2[1] = <GuildEventCardMetaInfo event={event} onTitlePress={closure} />;
items2[2] = !hideAgeVerificationNotice && AGE_VERIFICATION_STAGE_CHANNEL_TYPES.has(event.entity_type) && ((Component) => <Component noBackground onConfirmPress={onCloseAction} channelId={channel_id} />)(importDefault(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */);
const GuildEventSimpleLocation = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventSimpleLocation;
items2[3] = <GuildEventSimpleLocation event={event} />;
items2[4] = hideControls ? null : <GuildEventCardControls event={event} onCloseAction={onCloseAction} isConnected={r17} />;
const value10 = value3 != null;
if (value10) {
value = importDefault(9136) /* metro dependency 9136: GuildEventRecurrences */;
value = ((Component) => <Component guildId={event.guild_id} recurrenceRule={value3} guildEventId={event.id} onRecurrencePress={onRecurrencePress} />)(value);
r8 = value;
} else {
r8 = value10;
}
items2[5] = r8;
return (
<Card accessible={false} onPress={closure}>
<View>
{items2}
</View>
</Card>
);
}
function _fun71566() { // fn#71566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:928, offset: 0x01d24c40, size: 47 bytes, params: 1, frame: 10
var r0;
let value = environment.__proto__;
const isConnected2 = RTCConnectionStore.isConnected();
if (isConnected2) {
value = RTCConnectionStore.getChannelId();
value = value === channel_id;
r0 = value;
} else {
r0 = isConnected2;
}
return r0;
}
function onRecurrencePress(a0) { // fn#71568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:1567, offset: 0x01d24c6f, size: 39 bytes, params: 2, frame: 14
return onPress?.(event, a0);
}
@@ -0,0 +1,299 @@
/* Metro module 9058; source: modules/guild_scheduled_events/native/components/GuildEventModalComponents.tsx; dependencies: [31, 27, 1385, 661, 33, 4501, 7981, 1244, 9039, 4573, 8554, 1848, 4080, 9059, 1962, 9060, 9061, 9062, 6711, 9063, 9064, 8145, 6707, 7988, 7987, 7681, 3738, 9066, 4572, 2] */
function _fun70809(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:6, offset: 0x01d08ed9, size: 456 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
let value = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
const env0_6 = value.GuildScheduledEventEntityTypes;
const env0_7 = value.GUILD_EVENT_MAX_DESCRIPTION_LENGTH;
const env0_8 = value.MAX_EVENT_LOCATION_LENGTH;
const env0_9 = value.GUILD_EVENT_MAX_NAME_LENGTH;
const env0_10 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({formGroup: {paddingVertical: 8},
formGroupSmall: {paddingVertical: 4}, formGroupLarge: {'paddingTop': 16, 'paddingBottom': 4},
dateInput: {'flexGrow': 1, 'flexShrink': 1, 'flexBasis': '60%'}, timeInput: {'flexGrow': 1, 'flexShrink': 1,
'flexBasis': '30%'}, formHeader: {marginBottom: 8}, header: {'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center', 'marginBottom': 8}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventModalComponents.tsx');
exports.GuildEventTopic = GuildEventTopic;
exports.GuildEventLocation = GuildEventLocation;
exports.GuildEventRecurrence = GuildEventRecurrence;
exports.GuildEventEntityTypeSelection = GuildEventEntityTypeSelection;
exports.GuildEventDescription = GuildEventDescription;
exports.GuildEventDatetime = GuildEventDatetime;
}
function GuildEventTopic({topic, onChange}) { // fn#70810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:798, offset: 0x01d090a1, size: 274 bytes, params: 2, frame: 24
const styles = useStyles();
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.formGroupSmall}>
<TextInput
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0HbEQ6'])}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0HbEQ6'])}
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6/yars'])}
onChange={onChange}
value={topic}
maxLength={GUILD_EVENT_MAX_NAME_LENGTH}
autoFocus
isClearable
/>
</View>
);
}
function GuildEventLocation({location, onChange, onFocus}) { // fn#70811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1165, offset: 0x01d091b3, size: 233 bytes, params: 2, frame: 25
const styles = useStyles();
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.formGroupLarge}>
<TextInput
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yx785A)}
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mkCMia)}
value={location}
maxLength={MAX_EVENT_LOCATION_LENGTH}
onChange={onChange}
onFocus={onFocus}
isClearable
/>
</View>
);
}
function GuildEventRecurrence({startDate, recurrenceRule, onRecurrenceChange}) { // fn#70812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1481, offset: 0x01d0929c, size: 491 bytes, params: 2, frame: 26
const styles = useStyles();
const env0_3 = env0_4.useMemo(_fun70813, [recurrenceRule, startDate]);
const label = (require(9039) /* metro dependency 9039: ScheduleUtils */).getRecurrenceOptions(startDate).find(_fun70814)?.label;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = <View style={styles.header}><Text variant="text-sm/semibold" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['59TVxL'])}</Text></View>;
const InputButton = (require(8554) /* metro dependency 8554: native */).InputButton;
return (
<View style={styles.formGroup}>
{view}
<InputButton
onPress={onPress_70815}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['59TVxL'])}
value={label}
icon={importDefault(9060) /* metro dependency 9060 */}
iconPosition="end"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['59TVxL'])}
accessibilityHint={label}
/>
</View>
);
}
function GuildEventEntityTypeSelection({guild, entityType, disabled, onChange}) { // fn#70817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:2387, offset: 0x01d095cb, size: 698 bytes, params: 2, frame: 26
var unshift;
const value2 = (require(9061) /* metro dependency 9061: useGuildsUserCanStartStageIn */).useChannelsUserCanStartStageIn(guild);
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const BVZqJl = t.BVZqJl;
object2.name = Reflect.apply(string, intl, [BVZqJl]);
const VOICE = GuildScheduledEventEntityTypes.VOICE;
object2.value = VOICE;
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['EV//4f']);
object2.icon = importDefault(9062) /* metro dependency 9062 */;
const VoiceNormalIcon = (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon;
object2.IconComponent = VoiceNormalIcon;
object2.disabled = disabled;
const items2 = [object2];
object2 = {};
object2.name = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w7ipbz);
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
object2.value = EXTERNAL;
string = intl.string;
const DYxrHm = (require(1244) /* metro dependency 1244: indexNative */).t.DYxrHm;
object2.description = Reflect.apply(string, intl, [DYxrHm]);
object2.icon = importDefault(9063) /* metro dependency 9063 */;
const LocationIcon = (require(9064) /* metro dependency 9064: LocationIcon */).LocationIcon;
object2.IconComponent = LocationIcon;
object2.disabled = disabled;
items2[1] = object2;
const features = guild.features;
const has = features.has;
const COMMUNITY = GuildFeatures.COMMUNITY;
if (Reflect.apply(has, features, [COMMUNITY])) {
unshift = items2.unshift;
object2 = {};
object2.name = intl.string(t.EErMzA);
object2.value = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
object2.description = intl.string(t.LgALpp);
object2.icon = importDefault(8145) /* metro dependency 8145 */;
object2.IconComponent = (require(6707) /* metro dependency 6707: StageIcon */).StageIcon;
object2.disabled = value2.length === 0 || disabled;
Reflect.apply(unshift, items2, [object2]);
}
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
return (
<TableRadioGroup
defaultValue={entityType}
onChange={onChange}
hasIcons
>
{items2.map(_fun70818)}
</TableRadioGroup>
);
}
function GuildEventDescription({description, onChange, onFocus}) { // fn#70819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3364, offset: 0x01d098ec, size: 263 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = env0_4.useRef(null);
const TextArea = (require(7681) /* metro dependency 7681: TextAreaNative */).TextArea;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.formGroupSmall} ref={value2}>
<TextArea
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+gRCC7'])}
maxLength={GUILD_EVENT_MAX_DESCRIPTION_LENGTH}
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['kWO/E8'])}
onChange={onChange}
onFocus={onFocus_70820}
value={description}
/>
</View>
);
}
function GuildEventDatetime({dateLabel, timeLabel, date = importDefault(dependencyMap[26])(), minimumDate, maximumDate, disabled, onChange = function() {
}}) { // fn#70821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3716, offset: 0x01d09a13, size: 598 bytes, params: 2, frame: 31
var value;
if (maximumDate === undefined) {
value = (importDefault(3738) /* metro dependency 3738 */)();
value = value.add(30, 'days');
value = value.endOf('month');
}
const styles = useStyles();
const closure = function(a0) {
var env0_0 = a0;
return _fun70824;
};
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={styles.formHeader} variant="text-sm/semibold" color="text-subtle">{dateLabel}</Text>;
const InputButton = (require(8554) /* metro dependency 8554: native */).InputButton;
value = <View style={styles.dateInput}>{value}<InputButton text={dateLabel} value={date.format('MMM Do YYYY')} onPress={closure('date')} disabled={disabled} /></View>;
const items2 = [value];
items2[1] = <View style={styles.timeInput}><Text style={styles.formHeader} variant="text-sm/semibold" color="text-subtle">{timeLabel}</Text><InputButton text={timeLabel} value={date.format('LT')} onPress={closure('time')} disabled={disabled} /></View>;
return (
<View style={styles.formGroup}>
<Stack direction="horizontal" spacing={16}>
{items2}
</Stack>
</View>
);
}
function _fun70813() { // fn#70813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1589, offset: 0x01d09487, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9039) /* metro dependency 9039: ScheduleUtils */;
return value.recurrenceRuleToOption(startDate, recurrenceRule);
}
function _fun70814({value}) { // fn#70814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1690, offset: 0x01d094b9, size: 21 bytes, params: 2, frame: 2
return value === env0_3;
}
function GuildEventRecurrenceOnPress() { // fn#70815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1941, owner: GuildEventRecurrence.onPress, offset: 0x01d094ce, size: 201 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
importAll(dependencyMap[11]).dismissGlobalKeyboard();
const defaultImport = importDefault(dependencyMap[12]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[14]);
value = value(dependencyMap[13], dependencyMap.paths);
const object2 = {};
const intl = require(dependencyMap[7]).intl;
object2.title = intl.string(require(dependencyMap[7]).t['59TVxL']);
object2.items = env0_4;
object2.onItemSelect = onItemSelect_70816;
object2.selectedItem = env0_3;
object2.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value, 'SelectRecurrenceOption', object2]);
}
function _fun70818({name, value, description, IconComponent, disabled}) { // fn#70818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3193, offset: 0x01d09885, size: 103 bytes, params: 2, frame: 20
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={name}
subLabel={description}
value={value}
icon={<IconComponent />}
disabled={disabled}
key={name}
/>
);
}
function GuildEventDatetimeHandleOpenDatePicker(a0) { // fn#70823, owner: GuildEventDatetime.handleOpenDatePicker, offset: 0x01d09c69, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun70824;
}
function onPressOnItemSelect(a0) { // fn#70816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:2115, owner: GuildEventRecurrence.onPress.onItemSelect, offset: 0x01d09597, size: 52 bytes, params: 2, frame: 12
let value = environment.__proto__;
onRecurrenceChange(a0);
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun70824() { // fn#70824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3921, offset: 0x01d09c7b, size: 268 bytes, params: 1, frame: 19
var environment;
var r6;
var value2;
var defaultImport;
var openLazy;
var value4;
var object2;
var binding;
if (!disabled) {
value2 = environment.__proto__.__proto__;
importAll(dependencyMap[11]).dismissGlobalKeyboard();
r6 = env0_0 === 'date' ? dateLabel : timeLabel;
defaultImport = importDefault(dependencyMap[12]);
openLazy = defaultImport.openLazy;
value4 = require(dependencyMap[14])(dependencyMap[27], dependencyMap.paths);
object2 = {onSubmit: onSubmit_70825, title: r6};
binding = env1_2;
object2.startDate = binding.toDate();
r6 = minimumDate != null ? minimumDate.toDate() : env1_2.toDate();
object2.minimumDate = r6;
binding = env1_4;
object2.maximumDate = binding.toDate();
object2.requireDateChanged = true;
object2.mode = env0_0;
Reflect.apply(openLazy, defaultImport, [value4, 'DatePicker', object2]);
}
}
function onSubmit_70825(a0) { // fn#70825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:4052, offset: 0x01d09d87, size: 118 bytes, params: 2, frame: 15
var set;
var object2;
var binding;
if (env1_0 !== 'date') {
value = environment.__proto__.__proto__;
env2_6(a0);
} else {
set = a0.set;
object2 = {};
value = environment.__proto__.__proto__;
binding = env2_2;
object2.hour = binding.get('hour');
object2.minute = binding.get('minute');
object2.second = 0;
object2.millisecond = 0;
env2_6(Reflect.apply(set, a0, [object2]));
}
}
@@ -0,0 +1,121 @@
/* Metro module 9138; source: modules/guild_scheduled_events/native/components/GuildEventRecurrence.tsx; dependencies: [31, 27, 1379, 1867, 4117, 33, 4501, 697, 566, 9044, 9077, 9045, 9039, 1244, 5278, 9048, 4573, 9052, 1305, 9139, 2] */
function _fun71581(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:6, offset: 0x01d2556f, size: 437 bytes, params: 8, frame: 22
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {container: {'alignSelf': 'stretch', 'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'center'}, eventHeader: {'marginStart': 8, 'flexShrink': 0, 'flexGrow': 1}};
const object5 = {};
const INTERACTIVE_BACKGROUND_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_SELECTED;
object5.backgroundColor = INTERACTIVE_BACKGROUND_SELECTED;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.active = object5;
object4.actions = {'alignItems': 'center', 'flexDirection': 'row', 'flexShrink': 0};
const object6 = {'flexShrink': 0, 'alignItems': 'center', 'flexDirection': 'row', 'padding': 8, 'marginLeft': 8};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.secondarySmallButton = object6;
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object4.secondarySmallIcon = {tintColor: TEXT_STRONG};
const env0_10 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventRecurrence.tsx');
exports.default = GuildEventRecurrence_71582;
}
function GuildEventRecurrence_71582({recurrenceId, guildEventId, onPress, isActive}) { // fn#71582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:832, offset: 0x01d25724, size: 1142 bytes, params: 2, frame: 34
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const guildScheduledEvent = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getGuildScheduledEvent(guildEventId);
});
const env0_3 = guildScheduledEvent;
const value3 = (importDefault(9044) /* metro dependency 9044: useEventException */)(recurrenceId,
guildScheduledEvent?.id);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildScheduledEvent?.guild_id);
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(guildScheduledEvent?.channel_id);
});
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const env0_5 = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[channel ?? guild]).canManageGuildEvent(guildScheduledEvent);
const value4 = (require(9045) /* metro dependency 9045: useEventSchedule */).useEventScheduleById(guildEventId,
recurrenceId);
const value6 = env0_3.useMemo(_fun71586, [value4 == null ? undefined : value4.startTime.toISOString()]);
if (guildScheduledEvent == null) {
return null;
}
const is_canceled = (value3 ?? ({})).is_canceled;
let r11 = is_canceled !== undefined && is_canceled;
const value8 = '';
const value13 = (r11 ? value8 + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyBVRm) + ', ' : value8) + guildScheduledEvent.name + (value6 != null ? ', ' + value6.startDateTimeString : value8);
const items2 = [styles.container];
items2[1] = isActive ? styles.active : undefined;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps2 = {'accessible': true, 'accessibilityRole': 'button', accessibilityLabel: value13,
onPress: onPress_71587, style: styles.eventHeader};
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
const pressableOpacity = <PressableOpacity {...pressableOpacityProps2}><GuildEventCardHeader isActive={isActive} event={guildScheduledEvent} showUserCount={false} showCreator={false} recurrenceId={recurrenceId} /></PressableOpacity>;
r11 = r11 && ((Text) => <Text variant="text-sm/semibold" color="text-feedback-critical">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyBVRm)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
const object = {'accessible': true, 'accessibilityRole': 'button'};
const string = intl.string;
const HIgA5a = (require(1244) /* metro dependency 1244: indexNative */).t.HIgA5a;
object.accessibilityLabel = value8 + Reflect.apply(string, intl, [HIgA5a]) + ', ' + value13;
object.onPress = onPress_71588;
object.style = styles.secondarySmallButton;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(9139) /* metro dependency 9139 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
iconProps.size = REFRESH_SMALL_16;
iconProps.style = styles.secondarySmallIcon;
return (
<View style={items2}>
{pressableOpacity}
<View style={styles.actions}>
{r11}
<PressableOpacity {...object}>
<Icon {...iconProps} />
</PressableOpacity>
</View>
</View>
);
}
function _fun71586() { // fn#71586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:1360, offset: 0x01d25c12, size: 58 bytes, params: 1, frame: 13
const value2 = null;
return value2 != env0_6 ? (require(9039) /* metro dependency 9039: ScheduleUtils */).getEventTimeData(env0_6) : value2;
}
function GuildEventRecurrence_71582OnPress(a0) { // fn#71587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:1748, owner: GuildEventRecurrence_71582.onPress, offset: 0x01d25c4c, size: 55 bytes, params: 2, frame: 12
a0.stopPropagation();
if (!(env0_7 || onPress == null)) {
onPress(recurrenceId);
}
}
function GuildEventRecurrence_71582OnPress_71588(a0) { // fn#71588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:2230, owner: GuildEventRecurrence_71582.onPress, offset: 0x01d25c83, size: 80 bytes, params: 2, frame: 15
var value2;
var moduleValue;
a0.stopPropagation();
if (guild != null) {
value2 = environment.__proto__;
moduleValue = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue.showGuildEventModeratorActionSheet(guildScheduledEvent, env0_5, recurrenceId);
}
}
@@ -0,0 +1,59 @@
/* Metro module 9136; source: modules/guild_scheduled_events/native/components/GuildEventRecurrences.tsx; dependencies: [31, 27, 33, 4501, 697, 9137, 4573, 1244, 21, 9138, 4578, 2] */
function _fun71569(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:6, offset: 0x01d24c96, size: 271 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
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;
const object = {'marginTop': 8, 'marginBottom': 8, 'borderRadius': null, 'maxHeight': 140};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_8 = Reflect.apply(createStyles, value, [{container: {marginTop: 16}, scrollView: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventRecurrences.tsx');
exports.default = GuildEventRecurrences;
}
function GuildEventRecurrences({guildId, recurrenceRule, guildEventId, onRecurrencePress, activeRecurrenceId, hideViewMoreButton}) { // fn#71570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:424, offset: 0x01d24da5, size: 441 bytes, params: 2, frame: 29
const value2 = env0_3.useRef(null);
const styles = useStyles();
const value3 = (importDefault(9137) /* metro dependency 9137: useGuildEventRecurrences */)(guildEventId, guildId,
recurrenceRule);
const recurrenceStartTimes = value3.recurrenceStartTimes;
const canViewMoreRecurrences = value3.canViewMoreRecurrences;
const env0_4 = value3.updateRecurrenceStartTimes;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [<Text variant="heading-md/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['D/jjoa'])}</Text>];
items2[1] = <ScrollView style={styles.scrollView} ref={value2}>{recurrenceStartTimes.map(_fun71571)}</ScrollView>;
items2[2] = canViewMoreRecurrences && !hideViewMoreButton && ((Button) => <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8O7Hpy'])} onPress={onPress_71572} size="sm" />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun71571(a0) { // fn#71571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:873, offset: 0x01d24f5e, size: 114 bytes, params: 2, frame: 18
const value = environment.__proto__;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const fromTimestamp = defaultImport.fromTimestamp;
const getTime = a0.getTime;
const value2 = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, a0, [])]);
return ((Component) => <Component recurrenceId={value2} guildEventId={guildEventId} onPress={onRecurrencePress} isActive={value2 === activeRecurrenceId} key={value2} />)(importDefault(9138) /* metro dependency 9138: GuildEventRecurrence */);
}
function GuildEventRecurrencesOnPress(a0) { // fn#71572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:1080, owner: GuildEventRecurrences.onPress, offset: 0x01d24fd0, size: 53 bytes, params: 2, frame: 10
a0.stopPropagation();
updateRecurrenceStartTimes();
const current = env0_3.current;
if (current != null) {
current.scrollToEnd();
}
}
@@ -0,0 +1,75 @@
/* Metro module 9057; source: modules/guild_scheduled_events/native/components/GuildEventSchedule.tsx; dependencies: [31, 33, 3738, 9039, 9058, 1244, 2] */
function _fun70804(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9242:6, offset: 0x01d08b1e, size: 161 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventSchedule.tsx');
exports.default = GuildEventSchedule;
}
function GuildEventSchedule({guildEvent, recurrenceId, schedule, onChange}) { // fn#70805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9242:261, offset: 0x01d08bbf, size: 649 bytes, params: 2, frame: 30
var r5;
const MAX_YEARS_AHEAD_RECURRING_EVENT = (require(9039) /* metro dependency 9039: ScheduleUtils */).MAX_YEARS_AHEAD_RECURRING_EVENT;
const value2 = (importDefault(3738) /* metro dependency 3738 */)();
const value3 = (importDefault(3738) /* metro dependency 3738 */)();
let add = value3.add;
const MAX_DAYS_AHEAD_AN_EVENT_CAN_START = (require(9039) /* metro dependency 9039: ScheduleUtils */).MAX_DAYS_AHEAD_AN_EVENT_CAN_START;
const value4 = Reflect.apply(add, value3, [MAX_DAYS_AHEAD_AN_EVENT_CAN_START, 'days']);
const value5 = env0_3.useMemo(_fun70806, [schedule.startDate]);
const value6 = (importDefault(3738) /* metro dependency 3738 */)();
add = value6.add;
const MAX_DAYS_AHEAD_AN_EVENT_CAN_END = (require(9039) /* metro dependency 9039: ScheduleUtils */).MAX_DAYS_AHEAD_AN_EVENT_CAN_END;
const value7 = Reflect.apply(add, value6, [MAX_DAYS_AHEAD_AN_EVENT_CAN_END, 'days']);
if (recurrenceId != null) {
value4.add(MAX_YEARS_AHEAD_RECURRING_EVENT, 'years');
value7.add(MAX_YEARS_AHEAD_RECURRING_EVENT, 'years');
}
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const GuildEventDatetime = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventDatetime;
const guildEventDatetimeProps2 = {date: schedule.startDate, onChange: function(a0) {
var r3;
var onChangeBinding = onChange;
var object = {};
copyDataProperties(object, schedule, r3);
object['startDate'] = a0;
onChangeBinding(object);
}, minimumDate: value2, maximumDate: value4};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
guildEventDatetimeProps2.dateLabel = Reflect.apply(string, intl, [t.kKOIwJ]);
guildEventDatetimeProps2.timeLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6dGmCD']);
const guildEventDatetime = <GuildEventDatetime {...guildEventDatetimeProps2} />;
const value9 = guildEvent.scheduled_end_time != null;
if (value9) {
r5 = <GuildEventDatetime date={schedule.endDate} onChange={function(a0) {
var r3;
var onChangeBinding = onChange;
var object = {};
copyDataProperties(object, schedule, r3);
object['endDate'] = a0;
onChangeBinding(object);
}} minimumDate={value5} maximumDate={value7} dateLabel={intl.string(t.CTLgZJ)} timeLabel={intl.string(t.j2RuXF)} />;
} else {
r5 = value9;
}
return (
<>
{guildEventDatetime}
{r5}
</>
);
}
function _fun70806() { // fn#70806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9242:437, offset: 0x01d08e48, size: 63 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(schedule.startDate);
return value.add(15, 'minutes');
}
@@ -0,0 +1,58 @@
/* Metro module 9121; source: modules/guild_scheduled_events/native/components/GuildEventUtils.tsx; dependencies: [9042, 9063, 6647, 9064, 2] */
function _fun71465(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9306:6, offset: 0x01d21157, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventUtils.tsx');
exports.getEventLocationIconSource = getEventLocationIconSource;
exports.getEventLocationIconComponent = getEventLocationIconComponent;
}
function getEventLocationIconSource(a0, a1, a2) { // fn#71466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9306:223, offset: 0x01d211cb, size: 133 bytes, params: 4, frame: 15
var r2;
var r0;
var value;
const locationFromEvent = (require(9042) /* metro dependency 9042: EntityUtils */).getLocationFromEvent(a0);
const value3 = null;
if (value3 != locationFromEvent) {
r0 = importDefault(9063) /* metro dependency 9063 */;
} else if (value3 != a1) {
value = require(6647) /* metro dependency 6647: ChannelUtils */;
if (a2) {
value = value.getChannelIcon(a1);
r2 = value;
} else {
value = value.getSimpleChannelIcon(a1);
r2 = value;
}
r0 = r2;
} else {
r0 = value3;
}
return r0;
}
function getEventLocationIconComponent(a0, a1, a2) { // fn#71467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9306:383, offset: 0x01d21250, size: 148 bytes, params: 4, frame: 16
var r2;
var r0;
var value;
const locationFromEvent = (require(9042) /* metro dependency 9042: EntityUtils */).getLocationFromEvent(a0);
const value3 = null;
if (value3 != locationFromEvent) {
r0 = (require(9064) /* metro dependency 9064: LocationIcon */).LocationIcon;
} else if (value3 != a1) {
value = require(6647) /* metro dependency 6647: ChannelUtils */;
if (a2) {
value = value.getChannelIconComponent(a1);
r2 = value;
} else {
value = value.getSimpleChannelIconComponent(a1);
r2 = value;
}
r0 = value3 != r2 ? r2 : value3;
} else {
r0 = value3;
}
return r0;
}
@@ -0,0 +1,104 @@
/* Metro module 12099; source: modules/guild_scheduled_events/native/components/GuildEventVoiceBanner.tsx; dependencies: [31, 27, 1934, 4117, 33, 4501, 697, 9127, 566, 9077, 9039, 4080, 9052, 7709, 9032, 5278, 9048, 4578, 1244, 2] */
function _fun92913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:6, offset: 0x0209de6a, size: 371 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_6 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildScheduledEventActive;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'margin': 12, 'padding': 12, 'borderRadius': null, 'borderColor': null, 'borderWidth': 1};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.borderColor = BORDER_SUBTLE;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{header: object,
descriptionContainerStyle: {paddingTop: 4}, buttonContainer: {marginTop: 12}}]);
value = value.memo(_fun92914);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventVoiceBanner.tsx');
exports.default = value;
}
function _fun92914({channel}) { // fn#92914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:474, offset: 0x0209dfdd, size: 671 bytes, params: 2, frame: 28
var Button;
var intl;
const styles = useStyles();
const value3 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useActiveEvent(channel.id);
const value4 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useImminentUpcomingGuildEvents(channel.id);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value5 = Reflect.apply(useStateFromStores, fluxModule, [[SelectedChannelStore], function() {
return SelectedChannelStore.getVoiceChannelId();
}]) === channel.id;
const r2 = value3 ?? value4?.[0];
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const canManageGuildEvent2 = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[channel]).canManageGuildEvent(r2);
const r22 = (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(r2) ?? undefined;
const binding = r22;
const value7 = binding.useCallback(_fun92916, [r2, channel, value3, r22]);
const value8 = binding.useCallback(_fun92918, [r2]);
if (r2 == null) {
return null;
}
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(r2);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
const items2 = [<GuildEventCardHeader event={r2} showUserCount={false} />];
const GuildEventCardMetaInfo = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardMetaInfo;
items2[1] = <GuildEventCardMetaInfo event={r2} descriptionContainerStyle={styles.descriptionContainerStyle} condensed={value5} />;
let r6 = value5 && canManageGuildEvent2 && !isGuildScheduledEventActive2;
if (r6) {
var viewBindingProps = {style: styles.buttonContainer};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r6 = <View {...viewBindingProps}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cK1GGY)} onPress={value7} variant="active" size="sm" grow /></View>;
}
items2[2] = r6;
return (
<PressableOpacity
accessibilityRole="button"
onPress={value8}
style={styles.header}
>
{items2}
</PressableOpacity>
);
}
function _fun92916() { // fn#92916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:833, offset: 0x0209e28f, size: 112 bytes, params: 1, frame: 16
var environment;
var value4;
var moduleValue;
if (env0_1 == null && env0_2 != null) {
value4 = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
moduleValue = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue.openStartGuildEventModal(env0_2, env0_3, _fun92917);
}
}
function _fun92918() { // fn#92918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:1002, offset: 0x0209e32c, size: 104 bytes, params: 1, frame: 14
var value2;
if (env0_2 != null) {
value2 = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(9032) /* metro dependency 9032: GuildScheduledEventModalActionCreatorsNative */).openGuildEventDetails({eventId: env0_2.id,
event: env0_2});
}
}
function _fun92917() { // fn#92917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:923, offset: 0x0209e2ff, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
value.openVoiceChannelActionSheet(channel);
}
@@ -0,0 +1,130 @@
/* Metro module 9125; source: modules/guild_scheduled_events/native/components/GuildEventsListActionSheet.tsx; dependencies: [31, 27, 4605, 1385, 661, 4865, 33, 4501, 9126, 6758, 1244, 9067, 9052, 9127, 9036, 9032, 4594, 683, 5097, 6275, 9130, 6619, 2] */
function _fun71476(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:6, offset: 0x01d22133, size: 294 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const env0_6 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).ANALYTICS_GUILD_EVENTS_MODAL_NAME;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_8 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventsListActionSheet.tsx');
exports.default = GuildEventsListActionSheet;
}
function GuildEventsListHeader({eventCount, guild}) { // fn#71477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:284, offset: 0x01d22259, size: 387 bytes, params: 2, frame: 24
var r4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var ActionSheetHeaderPressableText;
var object3;
const value2 = (importDefault(9126) /* metro dependency 9126: useCanCreateAnEvent */)(guild.id);
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const r6 = eventCount > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.p1zLAf,
{count: eventCount}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tlopTM);
if (value2) {
ActionSheetHeaderPressableText = (require(9067) /* metro dependency 9067: ActionSheetHeaderPressableTextNative */).ActionSheetHeaderPressableText;
r4 = <ActionSheetHeaderPressableText accessibilityLabel={intl.string(t['60lJ0C'])} label={intl.string(t.NzROFF)} onPress={onPress_71478} />;
} else {
r4 = value2;
}
return <BottomSheetTitleHeader title={r6} trailing={r4} />;
}
function GuildEventsListActionSheet({guild}) { // fn#71480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:967, offset: 0x01d22463, size: 502 bytes, params: 2, frame: 27
const defaultImport = importDefault(9127) /* metro dependency 9127: useGuildScheduledEvents */;
let id = guild.id;
const value2 = defaultImport(id);
const styles = useStyles();
const binding = env0_3;
const useRef = binding.useRef;
const ackMessageId = ReadStateStore.ackMessageId;
id = guild.id;
const GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
const value3 = Reflect.apply(useRef, binding, [Reflect.apply(ackMessageId, ReadStateStore, [id, GUILD_EVENT])]);
binding.useEffect(_fun71481, [value2, guild.id]);
const value4 = binding.useCallback(_fun71483, []);
const value5 = binding.useCallback(_fun71484, [guild]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun71486);
binding.useEffect(_fun71487, [guild.id]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const bottomSheetProps = {'showGradient': true, 'scrollable': null, 'startExpanded': true,
scrollable: value2.length > 0};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const VSlyAn = (require(1244) /* metro dependency 1244: indexNative */).t.VSlyAn;
bottomSheetProps.dismissAccessibilityLabel = Reflect.apply(string, intl, [VSlyAn]);
bottomSheetProps.header = <GuildEventsListHeader eventCount={value2.length} guild={guild} />;
return (
<BottomSheet {...bottomSheetProps}>
<View style={styles.container}>
{((Component) => <Component inActionSheet events={value2} onPressEvent={value5} onCloseAction={value4} guild={guild} lastAckedId={(importDefault(6619) /* metro dependency 6619: useRefValue */)(value3)} />)(importDefault(9130) /* metro dependency 9130: GuildEventsListView */)}
</View>
</BottomSheet>
);
}
function GuildEventsListHeaderOnPress() { // fn#71478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:684, owner: GuildEventsListHeader.onPress, offset: 0x01d223dc, size: 90 bytes, params: 1, frame: 16
var environment;
var value2;
var moduleValue2;
if (env0_1) {
value2 = environment.__proto__;
(require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */).closeGuildEventListActionSheet();
moduleValue2 = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue2.openCreateOrEditGuildEventModal(guild, {onClose: onClose_71479});
}
}
function _fun71481() { // fn#71481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1101, offset: 0x01d22659, size: 73 bytes, params: 1, frame: 12
env0_1.forEach(_fun71482);
(importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventsForCurrentUser(guild.id);
}
function _fun71483() { // fn#71483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1246, offset: 0x01d226e2, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */).closeGuildEventListActionSheet();
}
function _fun71484(a0, a1) { // fn#71484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1316, offset: 0x01d22707, size: 80 bytes, params: 3, frame: 14
var environment;
const value = environment.__proto__;
(require(9032) /* metro dependency 9032: GuildScheduledEventModalActionCreatorsNative */).openGuildEventDetails({eventId: a0.id,
event: a0, recurrenceId: a1, onClose: onClose_71485});
}
function _fun71486() { // fn#71486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1471, offset: 0x01d22757, size: 90 bytes, params: 1, frame: 16
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: ANALYTICS_GUILD_EVENTS_MODAL_NAME, guild_id: guild.id,
guild_events_count: env0_1.length}]);
}
function _fun71487() { // fn#71487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1572, offset: 0x01d227b1, size: 78 bytes, params: 1, frame: 14
var value2;
var moduleValue;
if (guild.id != null) {
value2 = environment.__proto__;
moduleValue = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
moduleValue.ackGuildFeature(guild.id, ReadStateTypes.GUILD_EVENT);
}
}
function onPressOnClose_71479() { // fn#71479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:787, owner: GuildEventsListHeader.onPress.onClose, offset: 0x01d22436, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value.openGuildEventListActionSheet(guild);
}
function _fun71482({id}) { // fn#71482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1117, offset: 0x01d226a2, size: 64 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */;
const getGuildEventUserCounts = value.getGuildEventUserCounts;
const id = guild.id;
return Reflect.apply(getGuildEventUserCounts, value, [id, id, []]);
}
@@ -0,0 +1,75 @@
/* Metro module 9130; source: modules/guild_scheduled_events/native/components/GuildEventsListView.tsx; dependencies: [31, 27, 33, 697, 1585, 6277, 9131, 9135, 21, 2] */
function _fun71549(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:6, offset: 0x01d23f17, size: 264 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.FlatList;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.spacer = {height: PX_16, width: '100%'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {paddingHorizontal: PX_16};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventsListView.tsx');
exports.default = GuildEventsListView;
exports.styles = object2;
}
function FormSeparator_71550() { // fn#71550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:253, offset: 0x01d2401f, size: 37 bytes, params: 1, frame: 13
return <View style={env0_6.spacer} />;
}
function GuildEventsListView({events, guild, onPressEvent, onCloseAction, lastAckedId, inActionSheet}) { // fn#71551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:423, offset: 0x01d24044, size: 350 bytes, params: 2, frame: 21
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
if (events.length === 0) {
const BottomSheetView = (require(6277) /* metro dependency 6277 */).BottomSheetView;
return (
<BottomSheetView>
{((Component) => <Component onClose={onCloseAction} guild={guild} />)(importDefault(9131) /* metro dependency 9131: GuildEventsNoContent */)}
</BottomSheetView>
);
}
const r2 = inActionSheet ? (require(6277) /* metro dependency 6277 */).BottomSheetFlatList : FlatList;
const r2Props = {data: events, style: env0_6.container, keyExtractor: function(a0) {
return a0.id;
}, renderItem: renderItem_71553, ItemSeparatorComponent: FormSeparator_71550, initialNumToRender: 5,
ListEmptyComponent: ListEmptyComponent};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
r2Props.contentContainerStyle = {paddingBottom: PX_16 + bottom};
return ((Component) => <Component {...r2Props} />)(r2);
}
function GuildEventsListViewRenderItem({item}) { // fn#71553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:755, owner: GuildEventsListView.renderItem, offset: 0x01d241a2, size: 137 bytes, params: 2, frame: 19
var r4;
let value = environment.__proto__;
const GuildEventCard = importDefault(9135) /* metro dependency 9135: GuildEventCard */;
const onCloseActionBinding = onCloseAction;
const onPressEventBinding = onPressEvent;
const value3 = lastAckedId != null;
if (value3) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(item.id, lastAckedId);
value = value > 0;
r4 = value;
} else {
r4 = value3;
}
return (
<GuildEventCard
event={item}
onCloseAction={onCloseActionBinding}
onPress={onPressEventBinding}
isNew={r4}
/>
);
}
function GuildEventsListViewListEmptyComponent() { // fn#71554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:932, owner: GuildEventsListView.ListEmptyComponent, offset: 0x01d2422b, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component onClose={onCloseAction} guild={guild} />)(importDefault(9131) /* metro dependency 9131: GuildEventsNoContent */);
}
@@ -0,0 +1,57 @@
/* Metro module 9131; source: modules/guild_scheduled_events/native/components/GuildEventsNoContent.tsx; dependencies: [31, 27, 3784, 661, 482, 33, 4501, 6597, 697, 566, 8124, 9132, 9133, 4573, 1244, 6766, 9112, 2] */
function _fun71555(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9316:6, offset: 0x01d24266, size: 387 bytes, params: 8, frame: 26
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).GuildSettingsSections;
let value = require(482) /* metro dependency 482: Constants */;
const Fonts = value.Fonts;
const env0_6 = value.Permissions;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 24, {marginBottom: 8}), 24);
object['textAlign'] = 'center';
const env0_9 = Reflect.apply(createStyles, value, [{container: {'display': 'flex', 'flexDirection': 'column',
'justifyContent': 'center', 'alignItems': 'center', 'marginBottom': 88, 'padding': 16}, title: object,
subtitle: {'paddingBottom': 2, 'textAlign': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventsNoContent.tsx');
exports.default = GuildEventsNoContent;
}
function GuildEventsNoContent({guild, onClose}) { // fn#71556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9316:657, offset: 0x01d243e9, size: 541 bytes, params: 2, frame: 29
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var MANAGE_ROLES = Permissions.MANAGE_ROLES;
return PermissionStore.can(MANAGE_ROLES, guild);
}, [guild]);
const StageSparkle = importDefault(8124) /* metro dependency 8124: StageSparkle */;
const object = {icon: importDefault(9132) /* metro dependency 9132 */};
const CalendarIcon = (require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon;
object.IconComponent = CalendarIcon;
const items2 = [<StageSparkle {...object} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['WgZ+3D'])}</Text>;
items2[2] = <Text style={styles.subtitle} variant="text-sm/normal" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['v/S/PG'])}</Text>;
items2[3] = value2 && ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround style={styles.subtitle} variant="text-sm/normal" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['K+DH2o'],
{onClick: function() {
onClose();
importDefault(dependencyMap[16]).open(guild.id, GuildSettingsSections.ROLES);
}})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround);
return (
<View style={styles.container}>
{items2}
</View>
);
}
@@ -0,0 +1,160 @@
/* Metro module 9034; source: modules/guild_scheduled_events/native/components/GuildScheduledEventDetailsActionSheet.tsx; dependencies: [57, 31, 27, 1867, 4117, 1385, 33, 4501, 697, 1244, 6771, 6789, 566, 9035, 9046, 9047, 9036, 1585, 8853, 9048, 9221, 6275, 6277, 9223, 9224, 2] */
function _fun70251(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:6, offset: 0x01cf41de, size: 328 bytes, params: 8, frame: 21
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 guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
let value = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
const env0_8 = value.EventDetailSections;
const env0_9 = value.MAX_RSVP_USER_DISPLAY_COUNT;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const env0_12 = Reflect.apply(createStyles, value, [{segmentedControl: {paddingHorizontal: PX_12},
header: {flexDirection: 'column'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildScheduledEventDetailsActionSheet.tsx');
exports.default = GuildScheduledEventDetailsActionSheet;
}
function GuildScheduledEventDetailsActionSheet({eventId, event, recurrenceId, onCloseActionSheet}) { // fn#70252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:494, offset: 0x01cf4326, size: 1172 bytes, params: 2, frame: 39
let env0_3 = undefined;
const env0_4 = undefined;
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const GUILD_EVENT_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GUILD_EVENT_MODAL;
const analyticsLocations = defaultImport(GUILD_EVENT_MODAL).analyticsLocations;
let binding = env0_4;
let useState = binding.useState;
const value4 = env0_3(Reflect.apply(useState, binding, [recurrenceId]), 2);
const property = value4[0];
const property2 = value4[1];
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getGuildScheduledEvent(eventId) ?? event;
}, [eventId, event]);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun70254);
const id = value5?.id;
const value8 = (importDefault(9035) /* metro dependency 9035: useGuildScheduledEventUserCount */)(value5?.guild_id,
id, property);
env0_3 = value8;
const value9 = (importDefault(9046) /* metro dependency 9046: useInterestedEventUsers */)(id, property);
binding = value9;
const value10 = binding.useMemo(_fun70255, [value9, value8]);
const value11 = (importDefault(9047) /* metro dependency 9047: LazyAPIPromise */)(_fun70256);
const binding2 = env0_3;
const value12 = binding2(value11, 2);
const env0_5 = value12[0];
const {loading, error} = value12[1];
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property4 = value13[0];
const env0_6 = value13[1];
useState = binding.useState;
const value14 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property5 = value14[0];
const env0_7 = value14[1];
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value15 = binding.useCallback(_fun70257, []);
const value16 = binding.useCallback(function() {
}, []);
let EVENT_INFO = EventDetailSections.EVENT_INFO;
items = [EVENT_INFO];
if (value6) {
items.push(EventDetailSections.RSVP_LIST);
}
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
const object3 = {pageWidth: 0, defaultIndex: property4, onSetActiveIndex: onSetActiveIndex_70259};
object3.items = items.map(_fun70260);
const value17 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object3]);
if (value5 == null) {
return null;
}
const GuildEventCardImageHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardImageHeader;
const view = <View style={styles.header} onLayout={value16}><GuildEventCardImageHeader event={value5} />{items.length > 1 ? <View style={styles.segmentedControl}>{((SegmentedControl) => <SegmentedControl state={value17} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}</View> : null}</View>;
const r8 = property4 < items.length ? items[property4] : EventDetailSections.EVENT_INFO;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
EVENT_INFO = EventDetailSections.EVENT_INFO;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet
scrollable
startExpanded
onDismiss={onCloseActionSheet}
header={view}
>
{r8 === EVENT_INFO ? ((BottomSheetScrollView) => <BottomSheetScrollView>{((Component) => <Component guildEvent={value5} safeBottomPadding={bottom} onCloseActionSheet={onCloseActionSheet} onLayout={value15} recurrenceId={property} onRecurrencePress={property2} />)(importDefault(9223) /* metro dependency 9223: EventDetailInfoSheet */)}</BottomSheetScrollView>)((require(6277) /* metro dependency 6277 */).BottomSheetScrollView) : ((Component) => <Component userListItems={value10} guildId={value5.guild_id} loading={loading} error={error} contentHeight={property5 - bottom} safeBottomPadding={bottom} />)(importDefault(9224) /* metro dependency 9224: EventDetailRsvpSheet */)}
</BottomSheet>
</AnalyticsLocationProvider>
);
}
function _fun70254() { // fn#70254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:844, offset: 0x01cf47df, size: 51 bytes, params: 1, frame: 14
const getGuild = GuildStore.getGuild;
return Reflect.apply(getGuild, GuildStore, [env0_2?.guild_id]) != null;
}
function _fun70255() { // fn#70255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:987, offset: 0x01cf4812, size: 131 bytes, params: 1, frame: 17
var r0;
var binding2;
var items2;
var value;
const binding = env0_3;
const length = env0_4.length;
const r2 = length >= MAX_RSVP_USER_DISPLAY_COUNT && binding > MAX_RSVP_USER_DISPLAY_COUNT;
const value5 = 0;
const r4 = r2 ? global.Math.max(binding - length, value5) : value5;
if (r4 > value5) {
if (env0_4.length > value5) {
binding2 = env0_4;
items2 = [];
value = arraySpread(items2, binding2, value5, binding);
items2[value] = {count: r4};
value + 1;
r0 = items2;
} else {
r0 = env0_4;
}
} else {
r0 = env0_4;
}
return r0;
}
function _fun70256() { // fn#70256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1162, offset: 0x01cf4895, size: 91 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = undefined;
return (importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventUsers(env0_2 == null ? value : env0_2.id,
null, env0_2 == null ? value : env0_2.guild_id);
}
function _fun70257({nativeEvent}) { // fn#70257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1408, offset: 0x01cf48f0, size: 36 bytes, params: 2, frame: 11
env0_7(nativeEvent.layout.height);
}
function GuildScheduledEventDetailsActionSheetOnSetActiveIndex(a0) { // fn#70259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1607, owner: GuildScheduledEventDetailsActionSheet.onSetActiveIndex, offset: 0x01cf4914, size: 73 bytes, params: 2, frame: 13
if (a0 < env0_8.length && env0_8[a0] === EventDetailSections.RSVP_LIST) {
env0_5();
}
env0_6(a0);
}
function _fun70260(a0) { // fn#70260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1666, offset: 0x01cf495d, size: 251 bytes, params: 2, frame: 18
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const binding = env0_3;
const value = environment.__proto__;
const EVENT_INFO = EventDetailSections.EVENT_INFO;
const r1 = EVENT_INFO === a0 ? intl.string(t.iW6Xuo) : EventDetailSections.RSVP_LIST === a0 ? intl.formatToPlainString(t['ZrTT/N'],
{userCount: binding}) : intl.string(t.iW6Xuo);
return {id: r1, label: r1, page: null};
}
@@ -0,0 +1,93 @@
/* Metro module 10751; source: modules/guild_scheduled_events/native/components/GuildScheduledEventPrompts.tsx; dependencies: [31, 33, 4501, 697, 9077, 7972, 9052, 9132, 1244, 3826, 3738, 2] */
function _fun82663(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:6, offset: 0x01efdba6, size: 332 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.actionBarCTAContainer = {marginVertical: 4};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.iconStyle = {'tintColor': null, 'width': 20, 'height': 20, tintColor: WHITE};
const object3 = {};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object3.backgroundColor = BACKGROUND_BRAND;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.padding = 4;
object2.iconContainerStyle = object3;
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object2.greenIcon = {backgroundColor: GREEN_360};
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildScheduledEventPrompts.tsx');
exports.ScheduleEventPrompt = ScheduleEventPrompt;
exports.StartEventPrompt = StartEventPrompt;
}
function ScheduleEventPrompt({guild, channel, isLive}) { // fn#82664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:555, offset: 0x01efdcf2, size: 298 bytes, params: 2, frame: 21
var r0;
var FormCTA;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
if (Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[channel]).canCreateGuildEvent) {
FormCTA = (require(7972) /* metro dependency 7972: native */).FormCTA;
r0 = <FormCTA style={styles.actionBarCTAContainer} onPress={onPress_82665} iconSource={importDefault(9132) /* metro dependency 9132 */} iconStyle={styles.iconStyle} iconContainerStyle={styles.iconContainerStyle} completed={isLive} title={intl.string(t['60lJ0C'])} subtitle={intl.string(t['EYn7/y'])} />;
} else {
r0 = null;
}
return r0;
}
function StartEventPrompt({event, recurrenceId, channel, isLive}) { // fn#82666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:1026, offset: 0x01efde54, size: 397 bytes, params: 2, frame: 24
var r0;
var FormCTA;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var PTebCR;
var object;
var value;
const styles = useStyles();
const name = event.name;
const scheduled_start_time = event.scheduled_start_time;
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
if (Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[channel]).canManageGuildEvent(event)) {
FormCTA = (require(7972) /* metro dependency 7972: native */).FormCTA;
var formCTAProps2 = {style: styles.actionBarCTAContainer, onPress: onPress_82667,
iconSource: importDefault(9132) /* metro dependency 9132 */, iconStyle: styles.iconStyle,
iconContainerStyle: [styles.iconContainerStyle, styles.greenIcon], completed: isLive,
title: intl.formatToPlainString(t['1vGXqM'], {eventName: name})};
formatToPlainString = intl.formatToPlainString;
PTebCR = t.PTebCR;
object = {};
value = require(3826) /* metro dependency 3826: DateUtils */;
object.startTime = value.calendarFormat((importDefault(3738) /* metro dependency 3738 */)(scheduled_start_time));
formCTAProps2.subtitle = Reflect.apply(formatToPlainString, intl, [PTebCR, object]);
value = <FormCTA {...formCTAProps2} />;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function ScheduleEventPromptOnPress() { // fn#82665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:748, owner: ScheduleEventPrompt.onPress, offset: 0x01efde1c, size: 56 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value.openCreateOrEditGuildEventModal(guild, {channel: channel});
}
function StartEventPromptOnPress() { // fn#82667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:1271, owner: StartEventPrompt.onPress, offset: 0x01efdfe1, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value.openStartGuildEventModal(event, recurrenceId);
}
@@ -0,0 +1,113 @@
/* Metro module 9080; source: modules/guild_scheduled_events/native/components/StageChannelUpsell.tsx; dependencies: [57, 31, 27, 1383, 9081, 9033, 661, 33, 4501, 697, 5278, 1305, 8160, 9082, 4573, 1244, 4578, 5080, 9083, 1962, 4080, 2] */
function _fun70958(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:6, offset: 0x01d0ecab, size: 469 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
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(1383) /* metro dependency 1383: ChannelRecord */).createChannelRecord;
const env0_7 = (require(9081) /* metro dependency 9081: StageChannelUpsellCardStore */).useStageChannelUpsellCardStore;
const env0_8 = (require(9033) /* metro dependency 9033: GuildEventModalConstants */).CREATE_GUILD_EVENT_MODAL_KEY;
const env0_9 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'flexDirection': 'column', 'alignItems': 'center', 'backgroundColor': null, 'padding': 16,
'margin': 16};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_12 = Reflect.apply(createStyles, value, [{container: object, image: {marginBottom: 16},
closeContainer: {'position': 'absolute', 'top': 14, 'right': 14}, header: {'lineHeight': 20, 'marginBottom': 4},
description: {'textAlign': 'center', 'marginBottom': 4}, button: {'marginTop': 12, 'alignSelf': 'stretch'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/StageChannelUpsell.tsx');
exports.default = StageChannelUpsell;
}
function StageChannelUpsell({guildId, onCreate}) { // fn#70959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:838, offset: 0x01d0ee80, size: 717 bytes, params: 2, frame: 28
var r0;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var description;
var Button;
const styles = useStyles();
const value3 = env0_3(useStageChannelUpsellCardStore(), 2);
if (value3[0]) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
items2 = [((PressableOpacity) => <PressableOpacity onPress={value3[1]} accessibilityRole="button" style={styles.closeContainer}>{((Icon) => <Icon source={importDefault(8160) /* metro dependency 8160 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)];
items2[1] = <Image source={importDefault(9082) /* metro dependency 9082 */} style={styles.image} />;
string = intl.string;
items2[2] = <Text style={styles.header} variant="text-md/bold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t.Sx8Ezi])}</Text>;
description = styles.description;
string = intl.string;
items2[3] = <Text style={description} variant="text-sm/medium" color="text-default">{Reflect.apply(string, intl,
[t.JUzPhm])}</Text>;
description = styles.description;
items2[4] = <Text style={description} variant="text-sm/medium" color="text-default">{intl.format(t.Vh7rP7,
{suggestionsHook: suggestionsHook})}</Text>;
var viewBindingProps2 = {style: styles.button};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[5] = <View {...viewBindingProps2}><Button variant="secondary" size="md" text={Reflect.apply(string, intl,
[t['X/3SyA']])} onPress={onPress_70961} /></View>;
r0 = <View {...viewBindingProps}>{items2}</View>;
}
return r0;
}
function suggestionsHook(a0, a1) { // fn#70960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:1572, owner: StageChannelUpsell.suggestionsHook, offset: 0x01d0f14d, size: 67 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-sm/semibold"
color="mobile-text-heading-primary"
key={a1}
>
{a0}
</Text>
);
}
function StageChannelUpsellOnPress() { // fn#70961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:1812, owner: StageChannelUpsell.onPress, offset: 0x01d0f190, size: 186 bytes, params: 1, frame: 21
var environment;
const value = environment.__proto__;
importDefault(dependencyMap[17]).popWithKey(CREATE_GUILD_EVENT_MODAL_KEY);
const defaultImport2 = importDefault(dependencyMap[17]);
const pushLazy = defaultImport2.pushLazy;
const value2 = require(dependencyMap[19])(dependencyMap[18], dependencyMap.paths);
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
Reflect.apply(pushLazy, defaultImport2, [value2, {guildId: guildId, channelType: GUILD_STAGE_VOICE,
onChannelCreated: onChannelCreated_70962, onClose: onClose_70963}, 'CREATE_CHANNEL_MODAL_KEY']);
env0_2();
importDefault(dependencyMap[20]).hideActionSheet();
}
function onPressOnChannelCreated(a0) { // fn#70962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:1942, owner: StageChannelUpsell.onPress.onChannelCreated, offset: 0x01d0f24a, size: 57 bytes, params: 2, frame: 12
var value2;
let value = environment.__proto__.__proto__;
const createChannelRecordBinding = createChannelRecord;
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
value = createChannelRecordBinding({id: a0, type: GUILD_STAGE_VOICE});
if (value != null) {
value2 = environment.__proto__;
onCreate(value);
}
}
function onPressOnClose() { // fn#70963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:2010, owner: StageChannelUpsell.onPress.onClose, offset: 0x01d0f283, size: 42 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('CREATE_CHANNEL_MODAL_KEY');
}
@@ -0,0 +1,200 @@
/* Metro module 9140; source: modules/guild_scheduled_events/native/components/StartEventModal.tsx; dependencies: [5, 57, 31, 27, 1379, 1867, 1385, 9033, 33, 4501, 697, 5080, 5278, 1244, 1305, 8196, 4573, 9135, 566, 9077, 9141, 6618, 8128, 9144, 4578, 2] */
function _fun71590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:6, offset: 0x01d25d19, size: 732 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const closure = PreviewEventCard;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
const env0_9 = value.AGE_VERIFICATION_STAGE_CHANNEL_TYPES;
const env0_10 = value.GuildScheduledEventEntityTypes;
const env0_11 = (require(9033) /* metro dependency 9033: GuildEventModalConstants */).START_EVENT_MODAL_KEY;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object3.mainContainer = object4;
object3.container = {'flex': 1, 'flexDirection': 'column', 'justifyContent': 'space-between',
'alignContent': 'center'};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.headerContainer = {'display': 'flex', 'flexDirection': 'column', gap: PX_24};
object3.footerContainer = {'display': 'flex', 'flexDirection': 'column'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.header = {alignItems: 'center', paddingTop: PX_24};
object3.headerTitle = {'lineHeight': 24, 'textAlign': 'center'};
const object7 = {'display': 'flex', 'flexDirection': 'column'};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.gap = PX_8;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.marginTop = PX_16;
object3.buttonContainer = object7;
const object8 = {'borderColor': null, 'backgroundColor': null, 'shadowColor': '#000', 'shadowOpacity': 0.2,
'shadowRadius': 16};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object8.borderColor = BORDER_SUBTLE;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object8.backgroundColor = BACKGROUND_SURFACE_HIGH;
object8.shadowOffset = {'height': 8, 'width': 0};
object3.previewCard = object8;
object3.headerPrivacyLevel = {'textAlign': 'center', 'lineHeight': 18};
const env0_14 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/StartEventModal.tsx');
exports.default = StartEventModal;
exports.PreviewEventCard = closure;
}
function NavigationBar({onClose}) { // fn#71591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1137, offset: 0x01d25ff5, size: 199 bytes, params: 2, frame: 22
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
return (
<View>
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
onPress={function() {
return onClose();
}}
>
<Icon source={importDefault(8196) /* metro dependency 8196 */} />
</PressableOpacity>
</View>
);
}
function StartEventHeader({event}) { // fn#71593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1373, offset: 0x01d260bc, size: 238 bytes, params: 2, frame: 25
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.header}>
<Text
style={styles.headerPrivacyLevel}
variant="heading-lg/bold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['q+fFJv'])}
</Text>
<Text
style={styles.headerTitle}
variant="text-md/medium"
color="text-default"
>
{event.name}
</Text>
</View>
);
}
function PreviewEventCard({event}) { // fn#71594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1721, offset: 0x01d261aa, size: 83 bytes, params: 2, frame: 16
const styles = useStyles();
return ((Component) => <Component event={event} hideControls style={styles.previewCard} hideAgeVerificationNotice />)(importDefault(9135) /* metro dependency 9135: GuildEventCard */);
}
function StartEventModal({event, onCloseActionSheet}) { // fn#71595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1975, offset: 0x01d261fd, size: 964 bytes, params: 2, frame: 37
let env0_5 = undefined;
const styles = useStyles();
const env0_2 = event.guild_id;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guild_id);
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(event.channel_id);
}, [event]);
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const env0_3 = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[value2 ?? guild]).canManageGuildEvent(event);
const entity_type = event.entity_type;
const STAGE_INSTANCE = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
const value4 = entity_type === STAGE_INSTANCE;
let binding = env0_5;
const value5 = binding.useState(value4);
binding = undefined;
const value6 = binding(value5, 2);
const property = value6[0];
env0_5 = value6[1];
const value7 = binding((importDefault(9141) /* metro dependency 9141: useStartEvent */)(), 2);
const env0_6 = value7[0];
const {loading, error} = value7[1];
const closure = onClose_71598;
const value8 = _fun71599();
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const navigationBar = <NavigationBar onClose={closure} />;
const view = <View style={styles.headerContainer}><StartEventHeader event={event} /><PreviewEventCard event={event} /></View>;
const items5 = [AGE_VERIFICATION_STAGE_CHANNEL_TYPES.has(event.entity_type) && ((Component) => <Component channelId={event.channel_id} />)(importDefault(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */)];
items5[1] = value4 ? ((NotificationToggle) => <NotificationToggle sendStartNotification={property} onToggle={onToggle_71604} />)((require(9144) /* metro dependency 9144: StartStageChannelModal */).NotificationToggle) : null;
const r18 = error != null ? ((Text) => <Text variant="text-sm/medium" color="text-feedback-critical">{error.getAnyErrorMessage()}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items5[2] = <View style={styles.buttonContainer}>{r18}<Button variant="active" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cK1GGY)} onPress={value8} disabled={loading} loading={loading} /></View>;
return (
<SafeAreaPaddingView
top
bottom
style={styles.mainContainer}
>
{navigationBar}
<View style={styles.container}>
{view}
<View style={styles.footerContainer}>
{items5}
</View>
</View>
</SafeAreaPaddingView>
);
}
function StartEventModalOnClose() { // fn#71598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:2407, owner: StartEventModal.onClose, offset: 0x01d265fb, size: 73 bytes, params: 1, frame: 14
let value = a0;
const r2 = value !== undefined ? value : false;
value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(START_EVENT_MODAL_KEY);
if (onCloseActionSheet != null) {
onCloseActionSheet(r2);
}
}
function _fun71599() { // fn#71599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:2482, offset: 0x01d26644, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun71601);
return _fun71603;
}
function StartEventModalOnToggle() { // fn#71604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:3062, owner: StartEventModal.onToggle, offset: 0x01d266df, size: 25 bytes, params: 1, frame: 11
env0_5(function(a0) {
return !a0;
});
}
function* _fun71601() { // fn#71601, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:2502, offset: 0x01d26673, size: 90 bytes, params: 1, frame: 16
var environment;
if (true) {
value = environment.__proto__.__proto__;
if (env2_3) {
yield View(require, env2_4, {onSuccess: function() {
return ChannelStore(true);
}});
if (false) {
return undefined;
}
} else {
ChannelStore(false);
}
}
}
@@ -0,0 +1,66 @@
/* Metro module 9217; source: modules/guild_scheduled_events/native/components/ThrottledButton.tsx; dependencies: [31, 33, 4578, 2] */
function _fun72084(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:6, offset: 0x01d39481, size: 154 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = useThrottledActionHandler;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/ThrottledButton.tsx');
exports.default = ThrottledButton;
exports.useThrottledActionHandler = closure;
}
function useThrottledActionHandler() { // fn#72085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:120, offset: 0x01d3951b, size: 83 bytes, params: 1, frame: 14
const value = a0;
let env0_0 = value !== undefined ? value : 500;
const env0_1 = env0_2.useRef(null);
env0_2.useEffect(function() {
return _fun72087;
}, []);
return function(a0) {
var env0_0 = a0;
return _fun72089;
};
}
function ThrottledButton(a0) { // fn#72091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:441, offset: 0x01d39618, size: 173 bytes, params: 2, frame: 20
const onPress = a0.onPress;
const onPressIn = a0.onPressIn;
const onPressOut = a0.onPressOut;
let throttleMs = a0.throttleMs;
throttleMs = throttleMs === undefined ? 500 : throttleMs;
const object2 = {'onPress': 0, 'onPressIn': 0, 'onPressOut': 0, 'throttleMs': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const value3 = useThrottledActionHandler(throttleMs);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const buttonProps = {...value};
buttonProps['onPress'] = value3(onPress);
buttonProps['onPressIn'] = value3(onPressIn);
buttonProps['onPressOut'] = value3(onPressOut);
return <Button {...buttonProps} />;
}
function _fun72086() { // fn#72086, offset: 0x01d3956e, size: 11 bytes, params: 1, frame: 1
return _fun72087;
}
function _fun72088(a0) { // fn#72088, offset: 0x01d39596, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun72089;
}
function _fun72089(a0) { // fn#72089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:243, offset: 0x01d395a8, size: 93 bytes, params: 2, frame: 14
var environment;
if (env0_0 != null && env1_1.current === null) {
env0_0(a0);
value = environment.__proto__;
env1_1.current = global.setTimeout(_fun72090, env1_0);
}
}
function _fun72090() { // fn#72090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:302, offset: 0x01d39605, size: 19 bytes, params: 1, frame: 2
env2_1.current = null;
}
@@ -0,0 +1,81 @@
/* Metro module 11842; source: modules/guild_scheduled_events/native/components/UpcomingEventsLongPressActionSheet.tsx; dependencies: [31, 27, 1867, 4864, 4865, 33, 4501, 566, 6805, 6758, 6819, 1244, 7972, 1305, 11843, 5097, 4080, 11844, 11845, 6613, 6610, 2] */
function _fun90756(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:6, offset: 0x02044375, size: 265 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_6 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({headerIcon: {marginRight: 16}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/UpcomingEventsLongPressActionSheet.tsx');
exports.default = UpcomingEventsLongPressActionSheet;
}
function UpcomingEventsLongPressActionSheet({guildId}) { // fn#90757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:377, offset: 0x0204447e, size: 701 bytes, params: 2, frame: 31
const styles = useStyles();
const guild = require(dependencyMap[7]).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const value2 = require(dependencyMap[7]).useStateFromStores([UserGuildSettingsStore], function() {
return UserGuildSettingsStore.isMuteScheduledEventsEnabled(guildId);
});
const ActionSheet = require(dependencyMap[8]).ActionSheet;
const BottomSheetTitleHeader = require(dependencyMap[9]).BottomSheetTitleHeader;
const object = {};
const defaultImport = importDefault(dependencyMap[10]);
const GuildIconSizes = require(dependencyMap[10]).GuildIconSizes;
const LARGE = GuildIconSizes.LARGE;
object.leading = <View style={styles.headerIcon}>{((Component) => <Component guild={guild} size={LARGE} />)(defaultImport)}</View>;
const intl = require(dependencyMap[11]).intl;
let string = intl.string;
const t = require(dependencyMap[11]).t;
object.title = Reflect.apply(string, intl, [t.tlopTM]);
const items2 = [<BottomSheetTitleHeader {...object} />];
const FormRow = require(dependencyMap[12]).FormRow;
const object3 = {};
const Icon = require(dependencyMap[13]).Icon;
object3.leading = <Icon source={importDefault(dependencyMap[14])} />;
const FormLabel = require(dependencyMap[12]).FormLabel;
object3.label = <FormLabel text={intl.string(require(dependencyMap[11]).t.e6RscS)} />;
object3.onPress = onPress_90760;
items2[1] = <FormRow {...object3} />;
const formRowProps = {leading: <Icon source={importDefault(value2 ? dependencyMap[17] : dependencyMap[18])} />};
string = intl.string;
formRowProps.label = <FormLabel text={value2 ? Reflect.apply(string, intl, [t.COiLo0]) : Reflect.apply(string, intl,
[t.ONG3Yz])} />;
formRowProps.onPress = onPress_90761;
items2[2] = <FormRow {...formRowProps} />;
return (
<ActionSheet>
{items2}
</ActionSheet>
);
}
function UpcomingEventsLongPressActionSheetOnPress() { // fn#90760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:940, owner: UpcomingEventsLongPressActionSheet.onPress, offset: 0x02044756, size: 82 bytes, params: 1, frame: 16
const value = environment.__proto__;
const readStateActionCreatorsModule = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
const ackGuildFeature = readStateActionCreatorsModule.ackGuildFeature;
const guildIdBinding = guildId;
const GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
Reflect.apply(ackGuildFeature, readStateActionCreatorsModule, [guildIdBinding, GUILD_EVENT]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function UpcomingEventsLongPressActionSheetOnPress_90761() { // fn#90761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:1213, owner: UpcomingEventsLongPressActionSheet.onPress, offset: 0x020447a8, size: 97 bytes, params: 1, frame: 19
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateGuildNotificationSettings = defaultImport.updateGuildNotificationSettings;
const guildIdBinding = guildId;
const object2 = {};
const value3 = !env0_1;
object2.mute_scheduled_events = value3;
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateGuildNotificationSettings, defaultImport, [guildIdBinding, object2,
NotificationLabel.mutedEvents(value3)]);
}
@@ -0,0 +1,91 @@
/* Metro module 9150; source: modules/guild_scheduled_events/native/components/action_sheets/GuildEventRsvpPickerActionSheet.tsx; dependencies: [57, 31, 27, 1385, 33, 4501, 697, 9043, 1244, 6275, 6758, 6618, 7988, 7987, 4578, 9052, 4080, 2] */
function _fun71676(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:6, offset: 0x01d293dd, size: 301 bytes, params: 8, frame: 22
var object2;
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 env0_6 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventUserResponses;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {paddingHorizontal: PX_16};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.buttonWrapper = {marginTop: PX_24};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/action_sheets/GuildEventRsvpPickerActionSheet.tsx');
exports.default = GuildEventRsvpPickerActionSheet;
}
function GuildEventRsvpPickerActionSheet({event, recurrenceId, guildId, onRsvp}) { // fn#71677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:466, offset: 0x01d2950a, size: 685 bytes, params: 2, frame: 26
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const binding = env0_4;
const useState = binding.useState;
const ResponseOptions = (require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).ResponseOptions;
const SERIES = ResponseOptions.SERIES;
const value4 = onRsvp(Reflect.apply(useState, binding, [SERIES]), 2);
const property = value4[0];
const property2 = value4[1];
const response = (require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).getExistingRsvp(event.id,
null)?.response;
let INTERESTED = GuildScheduledEventUserResponses.INTERESTED;
const r1 = response === INTERESTED ? GuildScheduledEventUserResponses.UNINTERESTED : GuildScheduledEventUserResponses.INTERESTED;
INTERESTED = GuildScheduledEventUserResponses.INTERESTED;
const r6 = r1 === INTERESTED ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WtORed) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8MPCVr']);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object2.header = <BottomSheetTitleHeader title={r6} />;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const tableRadioGroup = <TableRadioGroup defaultValue={property} onChange={property2} hasIcons={false}>{(require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).getResponseOptions().map(_fun71678)}</TableRadioGroup>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const object3 = {onPress: onPress_71679};
const string = intl.string;
const TyCVIq = (require(1244) /* metro dependency 1244: indexNative */).t.TyCVIq;
object3.text = Reflect.apply(string, intl, [TyCVIq]);
return (
<BottomSheet {...object2}>
<SafeAreaPaddingView bottom style={styles.container}>
{tableRadioGroup}
<View style={styles.buttonWrapper}>
<Button {...object3} />
</View>
</SafeAreaPaddingView>
</BottomSheet>
);
}
function _fun71678(a0) { // fn#71678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:1108, offset: 0x01d297b7, size: 72 bytes, params: 2, frame: 16
const value = environment.__proto__;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={a0.value}
label={a0.name}
key={a0.value}
/>
);
}
function GuildEventRsvpPickerActionSheetOnPress() { // fn#71679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:1241, owner: GuildEventRsvpPickerActionSheet.onPress, offset: 0x01d297ff, size: 157 bytes, params: 1, frame: 21
const binding = env0_4;
const ResponseOptions = (require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).ResponseOptions;
const SERIES = ResponseOptions.SERIES;
const value3 = null;
const recurrenceId2 = binding === SERIES ? value3 : recurrenceId;
const guildScheduledEventModalActionCreatorsModule = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
guildScheduledEventModalActionCreatorsModule.updateRsvp(event.id, recurrenceId2, guildId, env0_5);
if (value3 != onRsvp) {
onRsvp();
}
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
@@ -0,0 +1,239 @@
/* Metro module 9223; source: modules/guild_scheduled_events/native/components/event_detail/EventDetailInfoSheet.tsx; dependencies: [31, 27, 4502, 1945, 1867, 4294, 1878, 1385, 9033, 482, 33, 4501, 697, 6597, 4080, 566, 9038, 9036, 9035, 9048, 9216, 4573, 1244, 1305, 3995, 8128, 6261, 9136, 2] */
function _fun72130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:6, offset: 0x01d3b0dc, size: 766 bytes, params: 8, frame: 28
var object2;
const env0_0 = require;
const closure = function() {
importDefault(dependencyMap[14]).hideActionSheet(GUILD_EVENT_INFO_ACTION_SHEET_KEY);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).AGE_VERIFICATION_STAGE_CHANNEL_TYPES;
const env0_11 = (require(9033) /* metro dependency 9033: GuildEventModalConstants */).GUILD_EVENT_INFO_ACTION_SHEET_KEY;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.eventContainer = {paddingHorizontal: PX_16};
object2.eventHeader = {paddingTop: 19};
const object3 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object3, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 20), undefined);
object2.eventTitle = object3;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.controlsContainer = {paddingTop: PX_16};
const object5 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingTop = PX_16;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingBottom = PX_8;
object2.eventTitleContainer = object5;
const object9 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object9.paddingTop = PX_16;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object9.paddingBottom = PX_4;
object2.eventDescriptionContainer = object9;
const object10 = {};
const value3 = textStyles;
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object10, value3(PRIMARY_MEDIUM, TEXT_SUBTLE, 14), undefined);
object2.guildTextStyle = object10;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.interestedContainer = {paddingTop: PX_8, flexDirection: 'row'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.interestedIcon = {marginRight: PX_8};
object2.ageVerificationContainer = {marginTop: 16};
const env0_15 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/event_detail/EventDetailInfoSheet.tsx');
exports.default = EventDetailInfoSheet;
exports.closeGuildEventInfoActionSheet = closure;
}
function EventDetailInfoSheet({guildEvent, safeBottomPadding, onLayout, onCloseActionSheet, recurrenceId, onRecurrencePress}) { // fn#72132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1198, offset: 0x01d3b404, size: 1608 bytes, params: 2, frame: 39
var r5;
var items6;
const DividerPosition = (require(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */).DividerPosition;
var value;
const styles = useStyles();
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], _fun72134,
[guildEvent.channel_id]);
const editGuildEventUtilsModule = require(9038) /* metro dependency 9038: EditGuildEventUtils */;
const value3 = editGuildEventUtilsModule.recurrenceRuleFromServer(guildEvent.recurrence_rule);
env0_3.useEffect(_fun72135, [guildEvent.guild_id, guildEvent.id]);
const value4 = (importDefault(9035) /* metro dependency 9035: useGuildScheduledEventUserCount */)(guildEvent.guild_id,
guildEvent.id, recurrenceId);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun72136);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserStore,
GuildMemberStore], _fun72137, [guildEvent]);
const creator = value6.creator;
const env0_5 = value6.creatorMember;
const items3 = [styles.eventContainer];
items3[1] = {paddingBottom: safeBottomPadding + 16};
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
const items4 = [<GuildEventCardHeader event={guildEvent} style={styles.eventHeader} showUserCount={false} showEndDate showCreator={false} recurrenceId={recurrenceId} />];
const GuildEventCardTitle = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardTitle;
items4[1] = <GuildEventCardTitle event={guildEvent} textStyle={styles.eventTitle} style={styles.eventTitleContainer} />;
const GuildEventCardSimpleGuildInfo = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardSimpleGuildInfo;
items4[2] = <GuildEventCardSimpleGuildInfo event={guildEvent} textStyle={styles.guildTextStyle} />;
const GuildEventSimpleLocation = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventSimpleLocation;
items4[3] = <GuildEventSimpleLocation event={guildEvent} />;
const BellIcon = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
const bellIcon = <BellIcon size="sm" style={styles.interestedIcon} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items4[4] = <View style={styles.interestedContainer}>{bellIcon}<Text variant="text-sm/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['+DLsD8'],
{count: value4})}</Text></View>;
let r7 = creator != null && value5;
if (r7) {
var viewBinding2Props = {style: styles.interestedContainer};
items6 = [((Avatar) => <Avatar user={creator} guildId={guildEvent.guild_id} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} style={styles.interestedIcon} />)((require(1305) /* metro dependency 1305: native */).Avatar)];
items6[1] = <Text variant="text-sm/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['66DLFs'],
{usernameHook: usernameHook_72138})}</Text>;
r7 = <View {...viewBinding2Props}>{items6}</View>;
}
items4[5] = r7;
const GuildEventCardDescription = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardDescription;
items4[6] = <GuildEventCardDescription event={guildEvent} style={styles.eventDescriptionContainer} />;
items4[7] = AGE_VERIFICATION_STAGE_CHANNEL_TYPES.has(guildEvent.entity_type) && ((Component) => <Component noBackground divider={[DividerPosition.TOP,
DividerPosition.BOTTOM]} onConfirmPress={onConfirmPress} channelId={guildEvent.channel_id} style={styles.ageVerificationContainer} />)(importDefault(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */);
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const GuildEventCardPrimaryAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardPrimaryAction;
const guildEventCardPrimaryAction = <GuildEventCardPrimaryAction event={guildEvent} onCloseAction={function() {
closeGuildEventInfoActionSheet();
if (onCloseActionSheet != null) {
onCloseActionSheet();
}
}} isConnected={value2} recurrenceId={recurrenceId} />;
const r15 = value5 ? ((GuildEventShareAction) => <GuildEventShareAction event={guildEvent} />)((require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventShareAction) : null;
const GuildEventModeratorAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventModeratorAction;
items4[8] = <ButtonGroup direction="horizontal" style={styles.controlsContainer}>{guildEventCardPrimaryAction}{r15}<GuildEventModeratorAction event={guildEvent} recurrenceId={recurrenceId} /></ButtonGroup>;
const value17 = value3 != null;
if (value17) {
value = importDefault(9136) /* metro dependency 9136: GuildEventRecurrences */;
value = ((Component) => <Component guildId={guildEvent.guild_id} recurrenceRule={value3} guildEventId={guildEvent.id} onRecurrencePress={function(a0) {
return onRecurrencePress(a0);
}} activeRecurrenceId={recurrenceId} />)(value);
r5 = value;
} else {
r5 = value17;
}
items4[9] = r5;
return (
<View style={items3} onLayout={onLayout}>
{items4}
</View>
);
}
function _fun72134() { // fn#72134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1429, offset: 0x01d3ba5b, size: 52 bytes, params: 1, frame: 10
var r0;
let value = environment.__proto__;
const isConnected2 = RTCConnectionStore.isConnected();
if (isConnected2) {
value = RTCConnectionStore.getChannelId();
value = value === guildEvent.channel_id;
r0 = value;
} else {
r0 = isConnected2;
}
return r0;
}
function _fun72135() { // fn#72135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1567, offset: 0x01d3ba8f, size: 86 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */;
const getGuildEventUserCounts = value.getGuildEventUserCounts;
const guildEventBinding = guildEvent;
Reflect.apply(getGuildEventUserCounts, value, [guildEventBinding.guild_id, guildEventBinding.id, []]);
(importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventsForCurrentUser(guildEventBinding.guild_id);
}
function _fun72136() { // fn#72136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1765, offset: 0x01d3bae5, size: 38 bytes, params: 1, frame: 11
const value = environment.__proto__;
const getGuild = GuildStore.getGuild;
return Reflect.apply(getGuild, GuildStore, [guildEvent.guild_id]) != null;
}
function _fun72137() { // fn#72137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1843, offset: 0x01d3bb0b, size: 107 bytes, params: 1, frame: 16
var r0;
var object2;
var value2;
var getUser;
var getMember;
var guild_id;
let creator_id = guildEvent.creator_id;
if (creator_id != null) {
object2 = {};
value2 = environment.__proto__;
getUser = UserStore.getUser;
guildEventBinding = guildEvent;
creator_id = guildEventBinding.creator_id;
object2.creator = Reflect.apply(getUser, UserStore, [creator_id]);
getMember = GuildMemberStore.getMember;
guild_id = guildEventBinding.guild_id;
creator_id = guildEventBinding.creator_id;
object2.creatorMember = Reflect.apply(getMember, GuildMemberStore, [guild_id, creator_id]);
r0 = object2;
} else {
r0 = {'creator': null, 'creatorMember': null};
}
return r0;
}
function EventDetailInfoSheetUsernameHook() { // fn#72138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:2962, owner: EventDetailInfoSheet.usernameHook, offset: 0x01d3bb76, size: 336 bytes, params: 1, frame: 23
var r8;
var creatorMemberBinding;
var RoleDot;
let value = environment.__proto__;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
let r0 = roleStyle === 'dot' && creatorMember?.colorString != null;
if (r0) {
RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
creatorMemberBinding = creatorMember;
r0 = <RoleDot size="small" color={creatorMemberBinding.colorString} colors={creatorMemberBinding.colorStrings} />;
}
const value7 = undefined;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const legacyTextProps = {style: creatorMember != null ? roleStyle !== 'username' ? value7 : creatorMember.colorString != null ? {color: creatorMember.colorString} : value7 : value7};
const nick = creatorMember == null ? value7 : creatorMember.nick;
if (nick != null) {
r8 = nick;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(creator);
r8 = value;
}
return (
<>
{r0}
<LegacyText {...legacyTextProps}>
{r8}
</LegacyText>
</>
);
}
function EventDetailInfoSheetOnConfirmPress() { // fn#72139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:3524, owner: EventDetailInfoSheet.onConfirmPress, offset: 0x01d3bcc6, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideAllActionSheets();
}
@@ -0,0 +1,195 @@
/* Metro module 9224; source: modules/guild_scheduled_events/native/components/event_detail/EventDetailRsvpSheet.tsx; dependencies: [31, 27, 4396, 1878, 482, 33, 4501, 697, 6597, 8124, 9225, 4573, 1244, 7972, 5475, 6771, 566, 1305, 9210, 3995, 8743, 9226, 6277, 5461, 2] */
function _fun72142(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:6, offset: 0x01d3bd0f, size: 655 bytes, params: 8, frame: 31
var object2;
const env0_0 = require;
const closure = EventDetailRsvpSheet;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {staticMessageContentContainer: {'flex': 1, 'padding': 16}};
object2.userList = {paddingTop: 16};
object2.userListRow = {paddingVertical: 8};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object2.userName = {color: TEXT_DEFAULT, fontFamily: PRIMARY_SEMIBOLD, fontSize: 16};
object2.emptyDisplayContainer = {'alignItems': 'center', 'justifyContent': 'center', 'minHeight': 200};
object2.staticMessageContent = {height: '100%'};
const object3 = {paddingTop: 24};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
let MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object3, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 20, {marginBottom: 8}), 20);
object3['textAlign'] = 'center';
object2.emptyDisplayTitle = object3;
MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.remainingUsersIcon = {'tintColor': null, 'height': 18, 'width': 18, tintColor: MOBILE_TEXT_HEADING_PRIMARY};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.remainingUsersIconContainer = {'backgroundColor': null, 'borderRadius': 16, 'height': 32, 'width': 32,
'alignItems': 'center', 'justifyContent': 'center', backgroundColor: BACKGROUND_BASE_LOWEST};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.memo(_fun72151);
closure.displayName = 'EventDetailRsvpSheet';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/event_detail/EventDetailRsvpSheet.tsx');
exports.default = closure;
exports.UserRow = value;
}
function EmptyDisplay({children, style}) { // fn#72143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:927, offset: 0x01d3bf9e, size: 130 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.emptyDisplayContainer, style];
let value = importDefault(8124) /* metro dependency 8124: StageSparkle */;
value = ((Component) => <Component icon={importDefault(9225) /* metro dependency 9225 */} />)(value);
return (
<View style={items2}>
{value}
{children}
</View>
);
}
function FetchErrorDisplay({style}) { // fn#72144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1069, offset: 0x01d3c020, size: 161 bytes, params: 2, frame: 21
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<EmptyDisplay style={style}>
<Text
style={styles.emptyDisplayTitle}
variant="heading-lg/extrabold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.obChXk)}
</Text>
</EmptyDisplay>
);
}
function NoUsersDisplay({style}) { // fn#72145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1320, offset: 0x01d3c0c1, size: 161 bytes, params: 2, frame: 21
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<EmptyDisplay style={style}>
<Text
style={styles.emptyDisplayTitle}
variant="heading-lg/extrabold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hW0mBR)}
</Text>
</EmptyDisplay>
);
}
function RemainingUsersRow({remainingUsersGroup}) { // fn#72146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1568, offset: 0x01d3c162, size: 237 bytes, params: 2, frame: 26
const styles = useStyles();
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const object2 = {};
const userListRow = styles.userListRow;
object2.DEPRECATED_style = userListRow;
object2.leading = <View style={styles.remainingUsersIconContainer}>{((Component) => <Component source={importDefault(9225) /* metro dependency 9225 */} style={styles.remainingUsersIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const BdQTfR = (require(1244) /* metro dependency 1244: indexNative */).t.BdQTfR;
object2.label = Reflect.apply(formatToPlainString, intl, [BdQTfR, {userRemainCount: remainingUsersGroup.count}]);
return <FormRow {...object2} key="userRemaining" />;
}
function keyExtractor_72147(a0) { // fn#72147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:2737, offset: 0x01d3c24f, size: 81 bytes, params: 2, frame: 12
const value = require(9226) /* metro dependency 9226: EventDetailTypes */;
return value.isRemainingUsersGroup(a0) ? 'RemainingUsersGroup-' + a0.count : a0.user_id;
}
function EventDetailRsvpSheet({userListItems, guildId, loading, error, contentHeight, safeBottomPadding}) { // fn#72148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:2846, offset: 0x01d3c2a0, size: 430 bytes, params: 2, frame: 24
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
const styles = useStyles();
const object2 = {paddingBottom: safeBottomPadding};
const value2 = env0_3.useCallback(_fun72149, [guildId]);
const closure = StaticMessageContainer;
return loading && userListItems.length === 0 ? ((Component) => <Component>{((ActivityIndicator) => <ActivityIndicator style={[styles.staticMessageContent,
object2]} />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}</Component>)(closure) : error != null ? ((Component) => <Component><FetchErrorDisplay style={[styles.staticMessageContent,
object2]} /></Component>)(closure) : userListItems.length === 0 ? ((Component) => <Component><NoUsersDisplay style={[styles.staticMessageContent,
object2]} /></Component>)(closure) : <BottomSheetFlatList contentContainerStyle={[styles.userList,
{paddingBottom: safeBottomPadding}]} data={userListItems} renderItem={value2} ItemSeparatorComponent={(require(7972) /* metro dependency 7972: native */).FormDivider} keyExtractor={keyExtractor_72147} />;
}
function _fun72151({eventUser, guildId}) { // fn#72151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1922, offset: 0x01d3c53c, size: 482 bytes, params: 2, frame: 32
var object4;
var r10;
var value;
const styles = useStyles();
const env0_1 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(eventUser.user_id);
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
let user_id = eventUser.user_id;
const {isMobileOnline, isVROnline, status} = Reflect.apply(useStateFromStoresObject, fluxModule, [[PresenceStore],
function() {
var object = {};
var eventUserBinding = eventUser;
object.isMobileOnline = PresenceStore.isMobileOnline(eventUserBinding.user_id);
object.isVROnline = PresenceStore.isVROnline(eventUserBinding.user_id);
object.status = PresenceStore.getStatus(eventUserBinding.user_id);
return object;
}, [user_id]]);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
object4 = {};
const userListRow = styles.userListRow;
object4.DEPRECATED_style = userListRow;
object4.leading = user != null ? ((Avatar) => <Avatar user={user} guildId={guildId} isMobileOnline={isMobileOnline} isVROnline={isVROnline} status={status} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} autoStatusCutout />)((require(1305) /* metro dependency 1305: native */).Avatar) : null;
const DiscordTag = importDefault(9210) /* metro dependency 9210: DiscordTag */;
const object2 = {user: user};
const nick = eventUser.member?.nick;
if (nick != null) {
r10 = nick;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(eventUser.user);
r10 = value;
}
object2.nick = r10;
let userName = styles.userName;
object2.usernameStyle = userName;
userName = styles.userName;
object2.nicknameStyle = userName;
object4.label = <DiscordTag {...object2} />;
object4.onPress = onPress_72154;
user_id = eventUser.user_id;
return <FormRow {...object4} key={user_id} />;
}
function _fun72149({item}) { // fn#72149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:3006, offset: 0x01d3c44e, size: 100 bytes, params: 2, frame: 16
const value = environment.__proto__;
return (require(9226) /* metro dependency 9226: EventDetailTypes */).isRemainingUsersGroup(item) ? <RemainingUsersRow remainingUsersGroup={item} /> : ((Component) => <Component eventUser={item} guildId={guildId} />)(env1_10);
}
function StaticMessageContainer({children}) { // fn#72150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:3155, owner: EventDetailRsvpSheet.StaticMessageContainer, offset: 0x01d3c4b2, size: 138 bytes, params: 2, frame: 20
const styles = useStyles();
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
return (
<BottomSheetScrollView style={styles.staticMessageContentContainer} scrollEnabled={false}>
<View style={[styles.staticMessageContentContainer, {minHeight: contentHeight}]}>
{children}
</View>
</BottomSheetScrollView>
);
}
function onPress_72154() { // fn#72154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:2660, offset: 0x01d3c792, size: 60 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
const user_id = eventUser.user_id;
value({userId: user_id, sourceAnalyticsLocations: analyticsLocations});
}
@@ -0,0 +1,10 @@
/* Metro module 9226; source: modules/guild_scheduled_events/native/components/event_detail/EventDetailTypes.tsx; dependencies: [2] */
function _fun72156(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9411:6, offset: 0x01d3c814, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/event_detail/EventDetailTypes.tsx');
exports.isRemainingUsersGroup = function(a0) {
return a0.count !== undefined;
};
}
@@ -0,0 +1,473 @@
/* Metro module 14571; source: modules/guild_scheduled_events/native/guild_sidebar/GuildLiveChannelNotice.tsx; dependencies: [31, 27, 4810, 1384, 4492, 3784, 4300, 1385, 482, 33, 697, 1305, 6622, 10989, 8778, 8518, 477, 4582, 4501, 4573, 10319, 10981, 1848, 7709, 8113, 4048, 7702, 4578, 4002, 4805, 566, 1244, 6647, 9133, 9042, 9064, 9032, 6273, 6268, 4809, 9127, 6707, 14570, 12129, 6239, 2] */
function _fun110212(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:6, offset: 0x0236e58b, size: 1046 bytes, params: 8, frame: 33
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = 0;
const moduleValue = importAll(dependencyMap[value]);
const env0_5 = (require(27) /* metro dependency 27 */).View;
const stageChannelParticipantStore = importDefault(4810) /* metro dependency 4810: StageChannelParticipantStore */;
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const env0_11 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const env0_12 = (require(482) /* metro dependency 482: Constants */).Permissions;
const value3 = require(33) /* metro dependency 33 */;
const env0_13 = value3.jsx;
const env0_14 = value3.jsxs;
const env0_15 = value3.Fragment;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const env0_19 = AVATAR_SIZE_MAP[XSMALL];
const PX_122 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const PX_82 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const guildEventRules = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).guildEventRules;
const markupUtils = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
const reactParserFor = markupUtils.reactParserFor;
object3 = {};
copyDataProperties(object3, guildEventRules, undefined);
const object5 = {};
copyDataProperties(object5, guildEventRules.channelMention, undefined);
object5['react'] = (require(10989) /* metro dependency 10989: MarkupInlineChannelMentionRules */).inlineChannelMentionReact;
object3['channelMention'] = object5;
object3['guild'] = {react: react_110231};
const object6 = {};
object6.react = (require(10989) /* metro dependency 10989: MarkupInlineChannelMentionRules */).inlineChannelReact;
object3['channel'] = object6;
const env0_23 = Reflect.apply(reactParserFor, markupUtils, [object3]);
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
const env0_24 = Reflect.apply(createStyles, createStylesModule, [_fun110232]);
const value6 = createStylesModule;
createStyles = value6.createStyles;
object3 = {};
object3.card = {padding: PX_122};
object3.row = {'flexDirection': 'row', 'alignItems': 'center'};
object3.infoRow = {marginTop: PX_4};
object3.liveNowIcon = {marginEnd: 4};
object3.uppercase = {textTransform: 'uppercase'};
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object3.headingText = {marginTop: platformUtilsModule.isAndroid() ? -2 : value};
const object7 = {'width': 7, 'height': 7, 'marginRight': 7};
const STATUS_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE;
object7.backgroundColor = STATUS_POSITIVE;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.liveDot = object7;
object3.calendarIcon = {marginRight: 7};
object3.topic = {marginTop: PX_82};
object3.button = {marginTop: PX_82};
const env0_25 = Reflect.apply(createStyles, value6, [object3]);
const env0_26 = moduleValue.memo(_fun110233);
value = moduleValue.memo(_fun110234);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/guild_sidebar/GuildLiveChannelNotice.tsx');
exports.default = value;
exports.LIVE_CHANNEL_NOTICE_MARGIN_TOP = PX_8;
exports.LIVE_CHANNEL_NOTICE_MARGIN_BOTTOM = PX_12;
exports.getScaledLiveChannelNoticeHeight = getScaledLiveChannelNoticeHeight;
}
function UserSummaryRow({users, max, guildId, audienceCount, isLiveStreaming}) { // fn#110213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:1394, offset: 0x0236e9a1, size: 541 bytes, params: 2, frame: 33
var r8;
var r0;
var value2;
var items2;
max = max === undefined ? 5 : max;
const Math = global.Math;
const env0_2 = Math.max(users.length - max, 0);
const styles = useStyles(env0_19);
if (users.length !== 0) {
var viewBindingProps = {style: styles.container};
items2 = [users.map(_fun110214)];
r8 = audienceCount != null && audienceCount > 0;
r8 = r8 && <View style={[styles.wrapper, users.length > 0 && ({marginLeft: 4})]}><View style={[styles.badge,
styles.audienceBadge]}>{((HeadphonesIcon) => <HeadphonesIcon size="custom" style={(require(10981) /* metro dependency 10981: ChannelListLayout */).makeSizeStyle(14)} />)((require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon)}{((Text) => <Text variant="text-xs/semibold" style={{marginLeft: 4}} maxFontSizeMultiplier={1}>{audienceCount}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View></View>;
items2[1] = r8;
items2[2] = isLiveStreaming && ((LiveTag) => <LiveTag style={{marginLeft: 4}} />)((require(1305) /* metro dependency 1305: native */).LiveTag);
r0 = <View {...viewBindingProps}>{items2}</View>;
} else {
value2 = null;
if (value2 == audienceCount) {
if (isLiveStreaming) {
var viewBindingProps = {style: styles.container};
items2 = [users.map(_fun110214)];
r8 = audienceCount != null && audienceCount > 0;
r8 = r8 && <View style={[styles.wrapper,
users.length > 0 && ({marginLeft: 4})]}><View style={[styles.badge,
styles.audienceBadge]}>{((HeadphonesIcon) => <HeadphonesIcon size="custom" style={(require(10981) /* metro dependency 10981: ChannelListLayout */).makeSizeStyle(14)} />)((require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon)}{((Text) => <Text variant="text-xs/semibold" style={{marginLeft: 4}} maxFontSizeMultiplier={1}>{audienceCount}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View></View>;
items2[1] = r8;
items2[2] = isLiveStreaming && ((LiveTag) => <LiveTag style={{marginLeft: 4}} />)((require(1305) /* metro dependency 1305: native */).LiveTag);
r0 = <View {...viewBindingProps}>{items2}</View>;
} else {
r0 = value2;
}
} else if (audienceCount !== 0) {
var viewBindingProps = {style: styles.container};
items2 = [users.map(_fun110214)];
r8 = audienceCount != null && audienceCount > 0;
r8 = r8 && <View style={[styles.wrapper, users.length > 0 && ({marginLeft: 4})]}><View style={[styles.badge,
styles.audienceBadge]}>{((HeadphonesIcon) => <HeadphonesIcon size="custom" style={(require(10981) /* metro dependency 10981: ChannelListLayout */).makeSizeStyle(14)} />)((require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon)}{((Text) => <Text variant="text-xs/semibold" style={{marginLeft: 4}} maxFontSizeMultiplier={1}>{audienceCount}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View></View>;
items2[1] = r8;
items2[2] = isLiveStreaming && ((LiveTag) => <LiveTag style={{marginLeft: 4}} />)((require(1305) /* metro dependency 1305: native */).LiveTag);
r0 = <View {...viewBindingProps}>{items2}</View>;
} else if (isLiveStreaming) {
var viewBindingProps = {style: styles.container};
items2 = [users.map(_fun110214)];
r8 = audienceCount != null && audienceCount > 0;
r8 = r8 && <View style={[styles.wrapper, users.length > 0 && ({marginLeft: 4})]}><View style={[styles.badge,
styles.audienceBadge]}>{((HeadphonesIcon) => <HeadphonesIcon size="custom" style={(require(10981) /* metro dependency 10981: ChannelListLayout */).makeSizeStyle(14)} />)((require(10319) /* metro dependency 10319: HeadphonesIcon */).HeadphonesIcon)}{((Text) => <Text variant="text-xs/semibold" style={{marginLeft: 4}} maxFontSizeMultiplier={1}>{audienceCount}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View></View>;
items2[1] = r8;
items2[2] = isLiveStreaming && ((LiveTag) => <LiveTag style={{marginLeft: 4}} />)((require(1305) /* metro dependency 1305: native */).LiveTag);
r0 = <View {...viewBindingProps}>{items2}</View>;
} else {
r0 = value2;
}
}
return r0;
}
function useJoin(a0) { // fn#110215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:2723, offset: 0x0236ed40, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_4.useCallback(_fun110216, [a0]);
}
function JoinChannelButton({channel, label, disabled}) { // fn#110217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:2897, offset: 0x0236edf1, size: 218 bytes, params: 2, frame: 23
disabled = !(disabled === undefined) && disabled;
const styles = useStyles();
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const value3 = (importDefault(7702) /* metro dependency 7702: useIsUsingClientTheme */)();
const value4 = useJoin(channel);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
let value = require(4002) /* metro dependency 4002: shared */;
value = value.isThemeLight(value2);
const value5 = 'tertiary';
return (
<View style={styles.button}>
<Button
onPress={value4}
variant={value ? value3 ? value5 : 'active' : value5}
size="sm"
disabled={disabled}
text={label}
/>
</View>
);
}
function GuildVoiceEventNotice({guildEvent, channel}) { // fn#110218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:3981, offset: 0x0236eecb, size: 436 bytes, params: 2, frame: 26
var object2;
var r4;
var object3;
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([SortedVoiceStateStore],
_fun110219);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var CONNECT = Permissions.CONNECT;
return PermissionStore.can(CONNECT, channel);
});
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore],
function() {
return ApplicationStreamingStore.getAllApplicationStreamsForChannel(channel.id).length > 0;
});
const binding = env0_26;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.heading = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['X2K3/4']);
object2.topic = guildEvent.name;
object2.location = value3;
object2.LocationIcon = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponent(channel);
const CalendarIcon = (require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon;
object2.LiveIcon = CalendarIcon;
object2.voiceUsers = <UserSummaryRow guildId={channel.guild_id} users={value4} isLiveStreaming={value6} />;
if (value5) {
r4 = <JoinChannelButton channel={channel} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VJlc0S)} />;
} else {
r4 = undefined;
}
object2.joinButton = r4;
return ((Component) => <Component {...object2} />)(binding);
}
function GuildExternalEventNotice({guildEvent}) { // fn#110223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:4650, offset: 0x0236f0fe, size: 233 bytes, params: 2, frame: 22
var r0;
var binding;
var intl;
const locationFromEvent = (require(9042) /* metro dependency 9042: EntityUtils */).getLocationFromEvent(guildEvent);
if (locationFromEvent == null) {
r0 = null;
} else {
binding = env0_26;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = ((Component) => <Component heading={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TxqPQR)} topic={guildEvent.name} location={env0_23(locationFromEvent,
true)} LocationIcon={(require(9064) /* metro dependency 9064: LocationIcon */).LocationIcon} LiveIcon={(require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon} joinButton={<SeeDetailButton guildEvent={guildEvent} />} />)(binding);
}
return r0;
}
function SeeDetailButton({guildEvent}) { // fn#110224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:4955, offset: 0x0236f1e7, size: 198 bytes, params: 2, frame: 21
const styles = useStyles();
const value2 = env0_4.useCallback(_fun110225, [guildEvent]);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.button}>
<Button
onPress={value2}
variant="active"
size="sm"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z4FcDs)}
/>
</View>
);
}
function GuildLiveStageNotice({stageInstance, channel}) { // fn#110226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:5231, offset: 0x0236f2eb, size: 618 bytes, params: 2, frame: 28
var object2;
var r4;
var object3;
const value3 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const stageChannelParticipantStoreHooksModule = require(6273) /* metro dependency 6273: StageChannelParticipantStoreHooks */;
const useStageParticipants = stageChannelParticipantStoreHooksModule.useStageParticipants;
const id = channel.id;
const StageChannelParticipantNamedIndex = (require(6268) /* metro dependency 6268: StageChannelParticipants */).StageChannelParticipantNamedIndex;
const SPEAKER = StageChannelParticipantNamedIndex.SPEAKER;
const value6 = Reflect.apply(useStageParticipants, stageChannelParticipantStoreHooksModule, [id,
SPEAKER]).filter(function({type}) {
return type === require(dependencyMap[38]).StageChannelParticipantTypes.VOICE;
}).map(function(a0) {
return a0.user;
});
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageChannelParticipantStore],
function() {
return StageChannelParticipantStore.getParticipantCount(channel.id,
require(dependencyMap[38]).StageChannelParticipantNamedIndex.AUDIENCE);
}, [channel.id]);
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var CONNECT = Permissions.CONNECT;
return PermissionStore.can(CONNECT, channel);
});
const value9 = (require(4809) /* metro dependency 4809: StageMediaHooks */).useStageHasStream(channel.id);
const value10 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useGuildActiveEvent(channel.guild_id);
const binding = env0_26;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.heading = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['X2K3/4']);
object2.location = value3;
object2.LocationIcon = value10 != null ? (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponent(channel) : undefined;
object2.LiveIcon = value10 != null ? (require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon : (require(6707) /* metro dependency 6707: StageIcon */).StageIcon;
object2.topic = stageInstance.topic;
object2.voiceUsers = <UserSummaryRow guildId={channel.guild_id} users={value6} isLiveStreaming={value9} audienceCount={value7} />;
if (value8) {
r4 = <JoinChannelButton channel={channel} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7vb2cc'])} />;
} else {
r4 = undefined;
}
object2.joinButton = r4;
return ((Component) => <Component {...object2} />)(binding);
}
function react_110231(a0, a1, a2) { // fn#110231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:656, offset: 0x0236f5cb, size: 72 bytes, params: 4, frame: 15
var r0;
var value;
if (typeof a0.content === 'string') {
r0 = a0.content;
} else {
value = require(8778) /* metro dependency 8778: MarkupRulesUtils */;
value = value.smartOutput(a0, a1, a2);
r0 = value;
}
return r0;
}
function _fun110232(a0) { // fn#110232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:807, offset: 0x0236f613, size: 266 bytes, params: 2, frame: 17
const object2 = {};
object2.container = {'flexDirection': 'row', 'alignItems': 'center', marginTop: PX_8};
const object6 = {'backgroundColor': null, 'borderRadius': null, 'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'center', 'height': null, 'paddingHorizontal': 6};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object6.backgroundColor = BACKGROUND_MOD_STRONG;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object6.height = a0;
object2.overflowCircle = object6;
const object7 = {};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object7.backgroundColor = BACKGROUND_BASE_LOW;
object7.height = env0_19;
object2.wrapper = object7;
const object8 = {'borderRadius': null, 'paddingHorizontal': 8, 'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object8.height = a0;
object2.badge = object8;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.audienceBadge = {backgroundColor: BACKGROUND_BASE_LOWER};
return object2;
}
function _fun110233({heading, location, LocationIcon, topic, isLiveStreaming, LiveIcon, voiceUsers, joinButton}) { // fn#110233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:3176, offset: 0x0236f71d, size: 608 bytes, params: 2, frame: 32
var r9;
var jsxRuntimeEnv0_15Binding;
var items5;
var value;
const styles = useStyles();
const r8 = LiveIcon != null ? <LiveIcon size="xxs" color="status-positive" style={styles.calendarIcon} /> : <View style={styles.liveDot} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items3 = [<View style={styles.row}>{r8}<Text variant={isLiveStreaming ? 'text-xs/bold' : 'text-xs/semibold'} color="status-positive" style={[styles.headingText,
isLiveStreaming && styles.uppercase]}>{heading}</Text></View>, voiceUsers];
items3[2] = <Text style={styles.topic} lineClamp={1} variant="text-md/semibold" color="redesign-channel-name-text">{topic}</Text>;
const items4 = [styles.row];
items4[1] = styles.infoRow;
const value7 = location != null;
if (value7) {
jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
items5 = [LocationIcon != null && <LocationIcon style={styles.liveNowIcon} size="xxs" color="redesign-channel-name-muted-text" />];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items5[1] = <Text lineClamp={1} variant="text-xs/medium" color="redesign-channel-name-muted-text" style={{marginTop: value ? -2 : 0,
flexShrink: 1}}>{location}</Text>;
value = <>{items5}</>;
r9 = value;
} else {
r9 = value7;
}
items3[3] = <View style={items4}>{r9}</View>;
items3[4] = joinButton;
return (
<View>
{items3}
</View>
);
}
function _fun110234({guild, style}) { // fn#110234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:6166, offset: 0x0236f97d, size: 430 bytes, params: 2, frame: 25
const styles = useStyles();
const value3 = (require(14570) /* metro dependency 14570: useActiveEventOrStageInstanceChannel */).useActiveEventOrStageInstanceChannel(guild.id);
const value4 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useGuildActiveEvent(guild.id);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore], _fun110235,
[value3]);
const value6 = useJoin(value3);
const value8 = env0_4.useCallback(_fun110236, [value3?.id, value4]);
const entity_type = value4?.entity_type;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
const r5 = entity_type === EXTERNAL ? <GuildExternalEventNotice guildEvent={value4} /> : value3 == null ? value3 != null && value4 != null ? <GuildVoiceEventNotice guildEvent={value4} channel={value3} /> : null : value5 != null ? <GuildLiveStageNotice stageInstance={value5} channel={value3} /> : value3 != null && value4 != null ? <GuildVoiceEventNotice guildEvent={value4} channel={value3} /> : null;
if (r5 == null) {
return null;
} else {
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
return (
<Card
variant="secondary"
style={[styles.card, style]}
onPress={value6}
onLongPress={value8}
>
{r5}
</Card>
);
}
}
function getScaledLiveChannelNoticeHeight(a0, {hasSpeakers, hasButton, hasAudience, hasStream}) { // fn#110237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:7175, offset: 0x0236fbed, size: 302 bytes, params: 3, frame: 22
const useScaledTextLineHeightAndroidModule = require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */;
const value2 = useScaledTextLineHeightAndroidModule.scaleTextLineHeight('text-xs/bold', a0);
const r6 = hasSpeakers || hasAudience || hasStream ? PX_8 + env0_19 : 0;
const moduleValue2 = useScaledTextLineHeightAndroidModule;
const value5 = PX_8 + moduleValue2.scaleTextLineHeight('text-md/semibold', a0);
const value8 = PX_4 + ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? -2 : 0);
const moduleValue4 = useScaledTextLineHeightAndroidModule;
return PX_8 + PX_12 + value2 + r6 + value5 + (value8 + moduleValue4.scaleTextLineHeight('text-xs/medium',
a0)) + (hasButton ? PX_8 + (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_HEIGHT : 0) + PX_12 + PX_12;
}
function _fun110214(a0, a1) { // fn#110214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:1596, offset: 0x0236ebbe, size: 386 bytes, params: 3, frame: 24
var r0;
var value2;
var object;
var value4;
var Text;
var value;
if (a1 >= max) {
return undefined;
}
if (a1 !== max - 1) {
value2 = environment.__proto__;
r0 = <View style={[styles.wrapper,
a1 !== 0 && ({marginLeft: 4})]} key={a1}>{((Avatar) => <Avatar user={a0} guildId={guildId} size={XSMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)}</View>;
} else if (env0_2 > 0) {
value4 = environment.__proto__;
var viewProps = {style: [styles.wrapper, a1 !== 0 && ({marginLeft: 4})]};
var viewBinding2Props = {style: styles.overflowCircle};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = env0_2 + 1;
value = <View {...viewProps} key="overflow"><View {...viewBinding2Props}><Text variant="text-xs/medium" lineClamp={1} maxFontSizeMultiplier={1}>{'+' + value}</Text></View></View>;
r0 = value;
} else {
value2 = environment.__proto__;
r0 = <View style={[styles.wrapper,
a1 !== 0 && ({marginLeft: 4})]} key={a1}>{((Avatar) => <Avatar user={a0} guildId={guildId} size={XSMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)}</View>;
}
return r0;
}
function _fun110216() { // fn#110216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:2765, offset: 0x0236ed6c, size: 133 bytes, params: 1, frame: 15
var value2;
if (env0_0 != null) {
value2 = environment.__proto__;
(importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
if (env0_0.isGuildVoice()) {
(require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).openGuildVoiceModal(env0_0);
} else {
(require(8113) /* metro dependency 8113: StageChannelModalActionCreators */).connectAndOpen(env0_0);
}
}
}
function _fun110219() { // fn#110219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:4096, offset: 0x0236f07f, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const getVoiceStatesForChannel = SortedVoiceStateStore.getVoiceStatesForChannel;
return Reflect.apply(getVoiceStatesForChannel, SortedVoiceStateStore, [channel]).map(function(a0) {
return a0.user;
});
}
function _fun110225() { // fn#110225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:5023, offset: 0x0236f2ad, size: 62 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(9032) /* metro dependency 9032: GuildScheduledEventModalActionCreatorsNative */;
const openGuildEventDetails = value.openGuildEventDetails;
const guildEventBinding = guildEvent;
Reflect.apply(openGuildEventDetails, value, [{eventId: guildEventBinding.id, event: guildEventBinding}]);
}
function _fun110235() { // fn#110235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:6330, offset: 0x0236fb2b, size: 47 bytes, params: 1, frame: 13
return StageInstanceStore.getStageInstanceByChannel(env0_0?.id);
}
function _fun110236() { // fn#110236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14768:6419, offset: 0x0236fb5a, size: 147 bytes, params: 1, frame: 13
var value3;
var moduleValue;
var value4;
var moduleValue2;
var openGuildEventDetails;
var binding;
if (env0_1 != null) {
value4 = environment.__proto__;
moduleValue2 = require(9032) /* metro dependency 9032: GuildScheduledEventModalActionCreatorsNative */;
openGuildEventDetails = moduleValue2.openGuildEventDetails;
binding = env0_1;
Reflect.apply(openGuildEventDetails, moduleValue2, [{eventId: binding.id, event: binding}]);
} else if (env0_0?.id != null) {
value3 = environment.__proto__;
moduleValue = require(12129) /* metro dependency 12129: openChannelLongPressActionSheet */;
moduleValue.openChannelLongPressActionSheet(env0_0.id);
}
}
@@ -0,0 +1,41 @@
/* Metro module 9876; source: modules/guild_scheduled_events/native/handleAcceptEventInstantInvite.tsx; dependencies: [4117, 8581, 4116, 8879, 9052, 2] */
function _fun77460(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10062:6, offset: 0x01dfd79c, size: 118 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/handleAcceptEventInstantInvite.tsx');
exports.default = handleAcceptEventInstantInvite;
}
function handleAcceptEventInstantInvite(a0) { // fn#77461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10062:222, offset: 0x01dfd812, size: 211 bytes, params: 2, frame: 18
var moduleValue2;
var getGuildScheduledEvent;
var guild_scheduled_event;
const value2 = undefined;
const ageGateUtilsModule = require(8581) /* metro dependency 8581: AgeGateUtils */;
if (!ageGateUtilsModule.handleNSFWGuildInvite(a0)) {
moduleValue2 = require(4116) /* metro dependency 4116: InviteTypeUtils */;
if (moduleValue2.isGuildScheduledEventInviteEmbed(a0)) {
if (a0.code != null) {
getGuildScheduledEvent = GuildScheduledEventStore.getGuildScheduledEvent;
guild_scheduled_event = a0.guild_scheduled_event;
if (Reflect.apply(getGuildScheduledEvent, GuildScheduledEventStore,
[guild_scheduled_event == null ? value2 : guild_scheduled_event.id]) != null) {
(importDefault(8879) /* metro dependency 8879: InstantInviteActionCreators */).acceptInvite({inviteKey: a0.code,
context: {location: 'Guild Scheduled Event Invite Button Embed'}, callback: callback_77462});
}
}
}
}
return value2;
}
function handleAcceptEventInstantInviteCallback() { // fn#77462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10062:566, owner: handleAcceptEventInstantInvite.callback, offset: 0x01dfd8e5, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */).transitionToEventDetailsFromInvite(env0_0);
}
@@ -0,0 +1,78 @@
/* Metro module 11841; source: modules/guild_scheduled_events/native/hooks/useEventsButtonProps.tsx; dependencies: [31, 4605, 4864, 4865, 566, 9127, 6664, 8919, 9052, 4080, 11842, 1962, 1244, 11846, 2] */
function _fun90750(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:6, offset: 0x02043f92, size: 175 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_6 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/hooks/useEventsButtonProps.tsx');
exports.default = useEventsButtonProps;
}
function useEventsButtonProps(a0) { // fn#90751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:264, offset: 0x02044041, size: 467 bytes, params: 2, frame: 24
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_0 = a0;
const {hasUnread,
mentionCount} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ReadStateStore],
_fun90752, [a0.id]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun90753);
const value4 = (importDefault(9127) /* metro dependency 9127: useGuildScheduledEvents */)(a0.id);
const binding = env0_3;
const value5 = binding.useCallback(_fun90754, [a0]);
const value6 = binding.useCallback(_fun90755, [a0.id]);
const r4 = value4.length > 0 ? intl.formatToPlainString(t.IBdqSu, {number: value4.length}) : intl.string(t.tlopTM);
const ChannelModes = (require(11846) /* metro dependency 11846: BaseChannelItem */).ChannelModes;
const DEFAULT = ChannelModes.DEFAULT;
return {hasUnread: hasUnread, mentionCount: mentionCount,
mode: hasUnread && !value3 ? ChannelModes.UNREAD_IMPORTANT : DEFAULT, name: r4, eventsMuted: value3,
handlePress: value5, handleLongPress: value6};
}
function _fun90752() { // fn#90752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:341, offset: 0x02044214, size: 78 bytes, params: 1, frame: 16
const object2 = {};
const hasUnread = ReadStateStore.hasUnread;
const binding = env0_0;
let id = binding.id;
let GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
object2.hasUnread = Reflect.apply(hasUnread, ReadStateStore, [id, GUILD_EVENT]);
const getMentionCount = ReadStateStore.getMentionCount;
id = binding.id;
GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
object2.mentionCount = Reflect.apply(getMentionCount, ReadStateStore, [id, GUILD_EVENT]);
return object2;
}
function _fun90753() { // fn#90753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:516, offset: 0x02044262, size: 32 bytes, params: 1, frame: 11
return UserGuildSettingsStore.isMuteScheduledEventsEnabled(env0_0.id);
}
function _fun90754() { // fn#90754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:592, offset: 0x02044282, size: 122 bytes, params: 1, frame: 15
var r0;
let value = environment.__proto__;
const useShowMemberVerificationGateModule = require(6664) /* metro dependency 6664: useShowMemberVerificationGate */;
if (useShowMemberVerificationGateModule.shouldShowMembershipVerificationGate(env0_0.id)) {
value = require(8919) /* metro dependency 8919: MemberVerificationModalActionCreators */;
value = value.openMemberVerificationModal(env0_0.id);
r0 = value;
} else {
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value = value.openGuildEventListActionSheet(env0_0);
r0 = value;
}
return r0;
}
function _fun90755() { // fn#90755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:753, offset: 0x020442fc, size: 121 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[9]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
const binding = env0_0;
Reflect.apply(openLazy, defaultImport, [value, 'UpcomingEventsLongPress-' + binding.id, {guildId: binding.id}]);
}