Files
discord-decomp/sources/modules/user_profile/native/UserProfileActivityButtons.tsx
T
2026-07-27 16:20:00 +03:00

806 lines
33 KiB
TypeScript

/* Metro module 10256; source: modules/user_profile/native/UserProfileActivityButtons.tsx; dependencies: [5, 31, 1378, 1379, 5040, 4111, 1867, 6877, 3784, 3793, 1934, 6876, 4297, 661, 6868, 33, 4501, 697, 6771, 3774, 632, 10257, 10258, 6885, 4578, 1244, 8840, 8109, 4080, 10265, 6887, 1305, 8381, 10216, 3853, 10266, 8419, 5080, 5176, 4008, 8113, 7709, 4915, 1423, 9354, 7007, 8846, 10218, 1471, 8872, 2] */
function _fun79633(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:6, offset: 0x01e5bcd2, size: 534 bytes, params: 8, frame: 21
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 embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const localActivityStore = importDefault(6877) /* metro dependency 6877: LocalActivityStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
let value = require(661) /* metro dependency 661: Constants */;
const env0_15 = value.PlatformTypes;
const env0_16 = value.UserSettingsSections;
value = require(6868) /* metro dependency 6868: SpotifyConstants */;
const env0_17 = value.SpotifyEndpoints;
const env0_18 = value.SpotifyResourceTypes;
const env0_19 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const CONTROL_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT;
const env0_20 = Reflect.apply(createStyles, value, [{icon: {tintColor: CONTROL_SECONDARY_TEXT_DEFAULT}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileActivityButtons.tsx');
exports.JoinActivityButton = JoinActivityButton;
exports.JoinGameActivityButton = JoinGameActivityButton;
exports.PlayOnSpotifyButton = PlayOnSpotifyButton;
exports.WatchActivityButton = WatchActivityButton;
exports.VoiceChannelButtons = VoiceChannelButtons;
exports.ConnectPlatformButton = ConnectPlatformButton;
exports.CustomActivityButton = CustomActivityButton;
}
function JoinActivityButton({user, currentUser, activity, application, onAction}) { // fn#79634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:560, offset: 0x01e5bee8, size: 707 bytes, params: 2, frame: 24
var r0;
const ActivityJoinability = (require(10258) /* metro dependency 10258: getActivityJoinability */).ActivityJoinability;
var Button;
var JOINED;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_5 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const env0_6 = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(EmbeddedActivitiesStore.getEmbeddedActivityForUserId(user.id,
application?.id)?.location);
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
let useStateFromStores = useStateFromStoresModule.useStateFromStores;
const env0_7 = Reflect.apply(useStateFromStores, useStateFromStoresModule, [[], _fun79635]);
const moduleValue3 = useStateFromStoresModule;
useStateFromStores = moduleValue3.useStateFromStores;
object = [ChannelStore];
object[1] = GuildStore;
object[2] = GuildMemberCountStore;
object[3] = RelationshipStore;
object[4] = SelectedChannelStore;
object[5] = VoiceStateStore;
object[6] = PermissionStore;
object[7] = LocalActivityStore;
object[8] = SelfPresenceStore;
object[9] = EmbeddedActivitiesStore;
const value5 = Reflect.apply(useStateFromStores, moduleValue3, [object, _fun79636]);
if ((importDefault(6885) /* metro dependency 6885: isEmbeddedActivity */)(activity)) {
if (application != null) {
if (value5 === ActivityJoinability.CANNOT_JOIN) {
r0 = null;
} else {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
object = {};
JOINED = ActivityJoinability.JOINED;
object.text = value5 === JOINED ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DPfdsq) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4i2vj+']);
object.icon = ((AppsIcon) => <AppsIcon size="sm" color="white" />)((require(8840) /* metro dependency 8840: AppsIcon */).AppsIcon);
object.variant = 'active';
JOINED = ActivityJoinability.JOINED;
object.disabled = value5 === JOINED;
object.onPress = onPress_79637;
r0 = <Button {...object} />;
}
} else {
r0 = null;
}
} else {
r0 = null;
}
return r0;
}
function JoinGameActivityButton({user, currentUser, activity, application, onAction}) { // fn#79638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:1781, offset: 0x01e5c314, size: 527 bytes, params: 2, frame: 24
var r8;
var r0;
const ActivityJoinability = (require(10258) /* metro dependency 10258: getActivityJoinability */).ActivityJoinability;
var Button;
var JOINED;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_5 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const object2 = {};
object2.id = application.id;
object2.deeplink_uri = application.deepLinkUri;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore,
GuildStore, GuildMemberCountStore, RelationshipStore, SelectedChannelStore, VoiceStateStore, PermissionStore,
LocalActivityStore, SelfPresenceStore, EmbeddedActivitiesStore], _fun79639);
if (application == null) {
r0 = null;
} else if (value2 === ActivityJoinability.CANNOT_JOIN) {
r0 = null;
} else {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
JOINED = ActivityJoinability.JOINED;
r8 = value2 === JOINED ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DPfdsq) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VJlc0S);
JOINED = ActivityJoinability.JOINED;
r0 = <Button text={r8} variant="active" disabled={value2 === JOINED} onPress={onPress_79640} />;
}
return r0;
}
function PlayOnSpotifyButton({activity, onAction}) { // fn#79641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:2826, offset: 0x01e5c66a, size: 317 bytes, params: 2, frame: 24
var r0;
var Button;
var intl;
const styles = useStyles();
if ((importDefault(6887) /* metro dependency 6887: isListeningOnSpotify */)(activity)) {
if (activity.sync_id != null) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <Button text={intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.LEgD7t,
{platform: activity.name})} icon={((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} source={importDefault(8381) /* metro dependency 8381 */} disableColor style={styles.icon} />)((require(1305) /* metro dependency 1305: native */).Icon)} variant="secondary" onPress={env0_3(_fun79643)} />;
} else {
r0 = null;
}
} else {
r0 = null;
}
return r0;
}
function WatchActivityButton({activity, onAction}) { // fn#79644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:3399, offset: 0x01e5c874, size: 197 bytes, params: 2, frame: 20
var r0;
var Button;
var intl;
if ((importDefault(8419) /* metro dependency 8419: isStreaming */)(activity)) {
if ((importDefault(10266) /* metro dependency 10266: getStreamURL */)(activity) != null) {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.I6JG46)} variant="secondary" onPress={onPress_79645} />;
} else {
r0 = null;
}
} else {
r0 = null;
}
return r0;
}
function VoiceChannelButtons({channel, isInChannel, onAction}) { // fn#79646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:3680, offset: 0x01e5c97b, size: 475 bytes, params: 2, frame: 25
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_2 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().newestAnalyticsLocation;
const isGuildStageVoice2 = channel.isGuildStageVoice();
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const isDM2 = channel.isDM();
return (
<Button
text={isInChannel ? isDM2 || channel.isGroupDM() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7hwn2A']) : isGuildStageVoice2 ? intl.string(t.Acqcot) : intl.string(t.BXxdl7) : isDM2 || channel.isGroupDM() ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ozoE2A) : isGuildStageVoice2 ? intl.string(t['7vb2cc']) : intl.string(t['96ANUN'])}
variant={isInChannel ? 'secondary' : 'active'}
grow
onPress={onPress_79647}
/>
);
}
function ConnectPlatformButton({type, onAction}) { // fn#79648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:4594, offset: 0x01e5cc91, size: 396 bytes, params: 2, frame: 23
const styles = useStyles();
const env0_2 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().newestAnalyticsLocation;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, useStateFromStoresModule, [[ConnectedAccountsStore], function() {
return ConnectedAccountsStore.getAccount(null, type) != null;
}])) {
return null;
}
const value2 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(type);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const XWSHTb = (require(1244) /* metro dependency 1244: indexNative */).t.XWSHTb;
const object = {};
object.platform = value2.name;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
const avatarUtilsModule = require(1423) /* metro dependency 1423: AvatarUtils */;
return (
<Button
text={Reflect.apply(formatToPlainString, intl, [XWSHTb, object])}
icon={<Icon size={SMALL} source={avatarUtilsModule.makeSource(value2.icon.whitePNG)} disableColor style={styles.icon} />}
variant="secondary"
onPress={onPress_79650}
/>
);
}
function CustomActivityButton({user, activity, index, onAction}) { // fn#79652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:5284, offset: 0x01e5ceec, size: 253 bytes, params: 2, frame: 22
var r7;
var r0;
var Button;
var intl;
const buttons = activity.buttons;
const value = null;
if (value == buttons) {
r0 = value;
} else if (index >= activity.buttons.length) {
r0 = value;
} else {
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
if ((importDefault(8846) /* metro dependency 8846: isCrunchyrollActivity */)(activity)) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.I6JG46);
} else {
r7 = activity.buttons[index];
}
r0 = <Button text={r7} variant="secondary" onPress={onAction(_fun79654)} />;
}
return r0;
}
function _fun79635() { // fn#79635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:852, offset: 0x01e5c1ab, size: 67 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (importDefault(10257) /* metro dependency 10257: getActivityChannelId */)({channelId: env0_6,
userId: user.id, activity: activity});
}
function _fun79636() { // fn#79636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:958, offset: 0x01e5c1ee, size: 176 bytes, params: 1, frame: 14
return (importDefault(10258) /* metro dependency 10258: getActivityJoinability */)({isEmbedded: true, user: user,
currentUser: currentUser, activity: activity, application: application, channelId: env0_7,
ChannelStore: ChannelStore, GuildStore: GuildStore, GuildMemberCountStore: GuildMemberCountStore,
RelationshipStore: RelationshipStore, SelectedChannelStore: SelectedChannelStore,
VoiceStateStore: VoiceStateStore, PermissionStore: PermissionStore, LocalActivityStore: LocalActivityStore,
SelfPresenceStore: SelfPresenceStore, EmbeddedActivitiesStore: EmbeddedActivitiesStore});
}
function JoinActivityButtonOnPress() { // fn#79637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:1593, owner: JoinActivityButton.onPress, offset: 0x01e5c29e, size: 118 bytes, params: 1, frame: 15
onAction({action: 'PRESS_JOIN_BUTTON'});
(importDefault(8109) /* metro dependency 8109: handleJoinEmbeddedActivity */)({applicationId: application.id,
activityChannelId: env0_7, locationObject: {}, analyticsLocations: analyticsLocations});
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun79639() { // fn#79639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:2001, offset: 0x01e5c523, size: 174 bytes, params: 1, frame: 14
return (importDefault(10258) /* metro dependency 10258: getActivityJoinability */)({user: user,
currentUser: currentUser, activity: activity, application: application, channelId: null, isEmbedded: false,
ChannelStore: ChannelStore, GuildStore: GuildStore, GuildMemberCountStore: GuildMemberCountStore,
RelationshipStore: RelationshipStore, SelectedChannelStore: SelectedChannelStore,
VoiceStateStore: VoiceStateStore, PermissionStore: PermissionStore, LocalActivityStore: LocalActivityStore,
SelfPresenceStore: SelfPresenceStore, EmbeddedActivitiesStore: EmbeddedActivitiesStore});
}
function JoinGameActivityButtonOnPress() { // fn#79640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:2576, owner: JoinGameActivityButton.onPress, offset: 0x01e5c5d1, size: 153 bytes, params: 1, frame: 18
onAction({action: 'PRESS_JOIN_BUTTON'});
const defaultImport = importDefault(10265) /* metro dependency 10265: GamesActionCreatorsNative */;
const join = defaultImport.join;
const activityBinding = activity;
Reflect.apply(join, defaultImport, [{userId: user.id, sessionId: activityBinding.session_id, application: env0_6,
channelId: null, messageId: null, applicationActivity: activityBinding, source: 'UserProfile',
analyticsLocations: analyticsLocations}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function* _fun79643() { // fn#79643, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:3156, offset: 0x01e5c7b2, size: 194 bytes, params: 1, frame: 20
var r3;
var binding;
var binding2;
var property;
var value4;
var canOpenSpotifyUrl;
var canOpenSpotifyUrl2;
var value5;
var value6;
var binding3;
var value7;
var attributeInstall;
var openURL;
var APP_STORE;
var openUrl;
var TRACK;
var error;
if (false) {
return undefined;
}
value = environment.__proto__;
require({action: 'PRESS_PLAY_ON_SPOTIFY_BUTTON'});
try {
binding = env2_0;
} catch (error) {
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
return undefined;
}
try {
property = binding2[33];
} catch (error) {
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
return undefined;
}
try {
canOpenSpotifyUrl = value4.canOpenSpotifyUrl;
} catch (error) {
return undefined;
}
try {
canOpenSpotifyUrl2 = Reflect.apply(canOpenSpotifyUrl, value4, []);
} catch (error) {
return undefined;
}
yield canOpenSpotifyUrl2;
try {
value5 = undefined;
value6 = false;
} catch (error) {
return undefined;
}
if (value6) {
return value5;
}
try {
binding = env2_0;
} catch (error) {
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
return undefined;
}
try {
property = binding3[33];
} catch (error) {
return undefined;
}
try {
value7 = binding(property);
} catch (error) {
return undefined;
}
if (value5) {
try {
openUrl = value7.openUrl;
} catch (error) {
return undefined;
}
try {
binding = env2_18;
} catch (error) {
return undefined;
}
try {
TRACK = binding.TRACK;
} catch (error) {
return undefined;
}
try {
} catch (error) {
return undefined;
}
try {
value = Reflect.apply(openUrl, value7, [value5, TRACK, importDefault]);
r3 = value;
} catch (error) {
return undefined;
}
} else {
try {
attributeInstall = value7.attributeInstall;
} catch (error) {
return undefined;
}
try {
Reflect.apply(attributeInstall, value7, []);
} catch (error) {
return undefined;
}
try {
binding = env2_1;
} catch (error) {
return undefined;
}
try {
property = binding3[34];
} catch (error) {
return undefined;
}
try {
value = binding(property);
} catch (error) {
return undefined;
}
try {
openURL = value.openURL;
} catch (error) {
return undefined;
}
try {
binding = env2_17;
} catch (error) {
return undefined;
}
try {
APP_STORE = binding.APP_STORE;
} catch (error) {
return undefined;
}
try {
value = Reflect.apply(openURL, value, [APP_STORE]);
r3 = value;
} catch (error) {
return undefined;
}
}
return r3;
}
function WatchActivityButtonOnPress() { // fn#79645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:3591, owner: WatchActivityButton.onPress, offset: 0x01e5c939, size: 66 bytes, params: 1, frame: 13
onAction({action: 'PRESS_WATCH_BUTTON'});
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(env0_1);
}
function VoiceChannelButtonsOnPress() { // fn#79647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:4193, owner: VoiceChannelButtons.onPress, offset: 0x01e5cb56, size: 315 bytes, params: 1, frame: 17
var r2;
var rootNavigationRef;
var value5;
var currentRoute;
var moduleValue2;
var moduleValue3;
const onActionBinding = onAction;
const value2 = undefined;
onActionBinding({action: 'PRESS_JOIN_CALL_BUTTON'});
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
const YouBarExperiment = (require(5176) /* metro dependency 5176: YouBarExperiment */).YouBarExperiment;
const getConfig = YouBarExperiment.getConfig;
if (Reflect.apply(getConfig, YouBarExperiment, [{location: 'VoiceChannelButtons'}]).enabled) {
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
value5 = (rootNavigationRef == null ? value2 : rootNavigationRef.isReady()) === true;
if (value5) {
currentRoute = rootNavigationRef.getCurrentRoute();
r2 = (currentRoute == null ? value2 : currentRoute.name) === 'you';
} else {
r2 = value5;
}
if (r2) {
rootNavigationRef.goBack();
}
}
if (env0_3) {
moduleValue3 = require(8113) /* metro dependency 8113: StageChannelModalActionCreators */;
moduleValue3.connectAndOpen(channel);
} else {
moduleValue2 = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
moduleValue2.openGuildVoiceModal(channel, newestAnalyticsLocation);
}
return value2;
}
function ConnectPlatformButtonOnPress() { // fn#79650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:5054, owner: ConnectPlatformButton.onPress, offset: 0x01e5ce3f, size: 118 bytes, params: 1, frame: 15
const onActionBinding = onAction;
const typeBinding = type;
const PLAYSTATION = PlatformTypes.PLAYSTATION;
onActionBinding({action: typeBinding !== PLAYSTATION ? 'PRESS_CONNECT_XBOX_BUTTON' : 'PRESS_CONNECT_PLAYSTATION_BUTTON'});
(importDefault(9354) /* metro dependency 9354: authorizeConnectionNative */)({platformType: env0_3.type,
location: newestAnalyticsLocation, onClose: function() {
return require(dependencyMap[45]).openUserSettings({screen: UserSettingsSections.CONNECTIONS});
}});
}
function* _fun79654() { // fn#79654, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:5523, offset: 0x01e5cff4, size: 354 bytes, params: 1, frame: 21
var protocol;
var hostname;
var binding2;
var property;
var value5;
var getMetadata;
var id;
var value6;
var value7;
var value8;
var button_urls;
var length;
var value9;
var value10;
var binding3;
var property2;
var value11;
var safeParseWithQuery;
var value12;
var value13;
var value14;
var value15;
var value16;
var binding4;
var value17;
var format;
var value18;
var value19;
var handleClick;
var closure;
var error;
let value = undefined;
if (true) {
value = undefined;
var env0_0;
var binding = env1_3;
var object2 = {action: 'PRESS_CUSTOM_BUTTON'};
binding(object2);
reducibleJoin4: while (true) {
reduciblePort69: while (true) {
exceptionLanding68: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding68;
}
break reducibleJoin4;
}
break reduciblePort69;
}
return value;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding68;
}
try {
property = binding2[47];
} catch (error) {
break exceptionLanding68;
}
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding68;
}
try {
getMetadata = value5.getMetadata;
} catch (error) {
break exceptionLanding68;
}
try {
} catch (error) {
break exceptionLanding68;
}
try {
} catch (error) {
break exceptionLanding68;
}
try {
id = require.id;
} catch (error) {
break exceptionLanding68;
}
try {
value6 = Reflect.apply(getMetadata, value5, [importDefault, id]);
} catch (error) {
break exceptionLanding68;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding68;
}
if (value8) {
return value7;
}
try {
button_urls = value7.button_urls;
} catch (error) {
break exceptionLanding68;
}
try {
length = button_urls.length;
} catch (error) {
break exceptionLanding68;
}
try {
} catch (error) {
break exceptionLanding68;
}
try {
value9 = length <= dependencyMap;
} catch (error) {
break exceptionLanding68;
}
if (value9) {
return value;
}
try {
button_urls = value7.button_urls;
} catch (error) {
break exceptionLanding68;
}
try {
} catch (error) {
break exceptionLanding68;
}
try {
property = button_urls[dependencyMap];
} catch (error) {
break exceptionLanding68;
}
try {
value10 = typeof property !== 'string';
} catch (error) {
break exceptionLanding68;
}
if (value10) {
return value;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding68;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding68;
}
try {
property2 = binding3[48];
} catch (error) {
break exceptionLanding68;
}
try {
value11 = binding(property2);
} catch (error) {
break exceptionLanding68;
}
try {
safeParseWithQuery = value11.safeParseWithQuery;
} catch (error) {
break exceptionLanding68;
}
try {
value12 = Reflect.apply(safeParseWithQuery, value11, [property]);
} catch (error) {
break exceptionLanding68;
}
try {
value13 = value12 == null;
} catch (error) {
break exceptionLanding68;
}
reducibleJoin38: while (true) {
if (value13) {
protocol = value;
break reducibleJoin38;
}
try {
protocol = value12.protocol;
} catch (error) {
break exceptionLanding68;
}
break reducibleJoin38;
}
try {
value14 = protocol == null;
} catch (error) {
break exceptionLanding68;
}
if (!value14) {
try {
value15 = value12 == null;
} catch (error) {
break exceptionLanding68;
}
reducibleJoin44: while (true) {
if (value15) {
hostname = value;
break reducibleJoin44;
}
try {
hostname = value12.hostname;
} catch (error) {
break exceptionLanding68;
}
break reducibleJoin44;
}
try {
value16 = hostname == null;
} catch (error) {
break exceptionLanding68;
}
reducibleJoin64: while (true) {
if (!value16) {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding68;
}
try {
binding4 = env2_2;
} catch (error) {
break exceptionLanding68;
}
try {
property = binding4[48];
} catch (error) {
break exceptionLanding68;
}
try {
value17 = binding(property);
} catch (error) {
break exceptionLanding68;
}
try {
format = value17.format;
} catch (error) {
break exceptionLanding68;
}
try {
value18 = Reflect.apply(format, value17, [value12]);
} catch (error) {
break exceptionLanding68;
}
try {
env0_0 = value18;
} catch (error) {
break exceptionLanding68;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding68;
}
try {
property = binding4[49];
} catch (error) {
break exceptionLanding68;
}
try {
value19 = binding(property);
} catch (error) {
break exceptionLanding68;
}
try {
handleClick = value19.handleClick;
} catch (error) {
break exceptionLanding68;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding68;
}
try {
object2.href = value18;
} catch (error) {
break exceptionLanding68;
}
try {
closure = onConfirm_79655;
} catch (error) {
break exceptionLanding68;
}
try {
object2.onConfirm = closure;
} catch (error) {
break exceptionLanding68;
}
try {
object2.trusted = false;
} catch (error) {
break exceptionLanding68;
}
try {
Reflect.apply(handleClick, value19, [object2]);
} catch (error) {
break exceptionLanding68;
}
return value;
}
break reducibleJoin64;
}
}
}
return value;
}
function onConfirm_79655() { // fn#79655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10442:5880, offset: 0x01e5d156, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return env3_1(env3_2[34]).openURL(env0_0);
}