This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,241 +1,278 @@
/* Metro module 11731; source: modules/app_launcher/native/screens/app_list_view/AppLauncherViewAllScreen.tsx; dependencies: [31, 27, 1483, 33, 4501, 697, 11673, 3860, 1585, 8774, 11592, 5068, 5278, 1244, 5284, 4573, 1305, 11634, 11597, 11671, 11639, 11642, 11643, 11593, 8048, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as AppLauncherNativeConstantsModule from '../../AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
import * as UseTokenModule from '../../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ApplicationCommandTypesModule from '../../../../application_commands/ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ArrowLargeLeftIconModule from '../../../../../design/components/Icon/native/redesign/generated/ArrowLargeLeftIcon.tsx'; /* Metro dependency 5284 */
import * as AppLauncherContextModule from '../../AppLauncherContext.tsx'; /* Metro dependency 8774 */
import * as AppLauncherNativeUtilsModule from '../../AppLauncherNativeUtils.tsx'; /* Metro dependency 11592 */
import * as FrecencySectionModule from '../home/FrecencySection.tsx'; /* Metro dependency 11593 */
import * as UseBottomSheetFlashListBottomViewabilityInsetModule from '../../hooks/useBottomSheetFlashListBottomViewabilityInset.tsx'; /* Metro dependency 11639 */
import * as UseTrackAppLauncherItemImpressionOnFirstViewModule from '../../hooks/useTrackAppLauncherItemImpressionOnFirstView.tsx'; /* Metro dependency 11642 */
import * as AppLauncherFlashListModule from '../../base_components/AppLauncherFlashList.tsx'; /* Metro dependency 11643 */
import * as AppDetailContentModule from '../application_view/app/AppDetailContent.tsx'; /* Metro dependency 11671 */
import * as AppLauncherBackButtonModule from '../../base_components/AppLauncherBackButton.tsx'; /* Metro dependency 11673 */
function _fun89888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:6, offset: 0x020225f5, size: 435 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(1483) /* metro dependency 1483: AppLauncherNativeConstants */;
let value = AppLauncherNativeConstantsModule;
const DEFAULT_CONTENT_PADDING = value.DEFAULT_CONTENT_PADDING;
const env0_6 = value.FLASH_LIST_ITEM_IMPRESSION_VIEWABILITY_CONFIG;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
object2 = {bottom: 4};
object = {bottom: 4};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let MOBILE_KEYBOARD_PANEL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
object2.container = {'height': '100%', 'backgroundColor': null, 'flex': 1, 'flexDirection': 'column',
object.container = {'height': '100%', 'backgroundColor': null, 'flex': 1, 'flexDirection': 'column',
'paddingBottom': 12, backgroundColor: MOBILE_KEYBOARD_PANEL_BACKGROUND};
MOBILE_KEYBOARD_PANEL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_KEYBOARD_PANEL_BACKGROUND;
object2.header = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between', 'height': 24,
object.header = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between', 'height': 24,
'backgroundColor': null, 'paddingHorizontal': null, 'marginBottom': 12,
backgroundColor: MOBILE_KEYBOARD_PANEL_BACKGROUND, paddingHorizontal: DEFAULT_CONTENT_PADDING};
const object3 = {paddingHorizontal: DEFAULT_CONTENT_PADDING};
const object4 = {paddingHorizontal: DEFAULT_CONTENT_PADDING};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.paddingBottom = PX_4;
object2.list = object3;
const BACK_BUTTON_SIZE = (require(11673) /* metro dependency 11673: AppLauncherBackButton */).BACK_BUTTON_SIZE;
object2.backButton = {width: BACK_BUTTON_SIZE, height: BACK_BUTTON_SIZE, alignItems: 'center',
object4.paddingBottom = PX_4;
object.list = object4;
const BACK_BUTTON_SIZE = (AppLauncherBackButtonModule).BACK_BUTTON_SIZE;
object.backButton = {width: BACK_BUTTON_SIZE, height: BACK_BUTTON_SIZE, alignItems: 'center',
justifyContent: 'center'};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/app_list_view/AppLauncherViewAllScreen.tsx');
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/app_list_view/AppLauncherViewAllScreen.tsx');
exports.default = AppLauncherViewAllScreen;
}
function AppLauncherViewAllScreen(a0) { // fn#89889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:905, offset: 0x020227a8, size: 1366 bytes, params: 2, frame: 36
const params = a0.route.params;
const context = params.context;
const analyticsLocation = params.analyticsLocation;
const sectionItemType = params.sectionItemType;
const sectionName = params.sectionName;
const sectionOverallPosition = params.sectionOverallPosition;
const applications = params.applications;
const env0_3 = applications;
const commands = params.commands;
const sectionDescriptors = params.sectionDescriptors;
const title = params.title;
const promotedApplicationIds = params.promotedApplicationIds;
const navigation = a0.navigation;
const r24 = sectionName ?? 'frecency_view_all';
const env0_9 = r24;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_HEIGHT;
const value2 = Reflect.apply(useToken, useTokenModule, [TABLE_ROW_HEIGHT]);
const styles = useStyles();
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom + DEFAULT_CONTENT_PADDING;
const {chatInputRef, keyboardCloseReasonRef,
entrypoint} = (require(8774) /* metro dependency 8774: AppLauncherContext */).useRequiredAppLauncherContext();
const binding = env0_3;
const value5 = binding.useCallback(_fun89890, [chatInputRef, keyboardCloseReasonRef, navigation]);
const value6 = binding.useCallback(_fun89891, [analyticsLocation, context, entrypoint, navigation]);
const value7 = binding.useCallback(_fun89892, [analyticsLocation, context, entrypoint, navigation,
sectionDescriptors]);
const value8 = binding.useMemo(_fun89893, [value5, styles.backButton, styles.header, title]);
const value9 = binding.useCallback(_fun89894, [applications, promotedApplicationIds, value6, r24]);
const value11 = binding.useCallback(_fun89897, [sectionDescriptors, context, commands.length,
binding.useCallback(function() {
var current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
function AppLauncherViewAllScreen(a0) { // fn#89889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:905, offset: 0x020227a8, size: 1366 bytes, params: 2, frame: 36
const params = a0.route.params;
const context = params.context;
const analyticsLocation = params.analyticsLocation;
const sectionItemType = params.sectionItemType;
const sectionName = params.sectionName;
const sectionOverallPosition = params.sectionOverallPosition;
const applications = params.applications;
const applications2 = applications;
const commands = params.commands;
const sectionDescriptors = params.sectionDescriptors;
const title = params.title;
const promotedApplicationIds = params.promotedApplicationIds;
const navigation = a0.navigation;
const r24 = sectionName ?? 'frecency_view_all';
const env0_9 = r24;
const useToken = UseTokenModule.useToken;
const TABLE_ROW_HEIGHT = (Native).modules.mobile.TABLE_ROW_HEIGHT;
const value2 = Reflect.apply(useToken, UseTokenModule, [TABLE_ROW_HEIGHT]);
const styles = useStyles();
const value3 = (UseSafeAreaInsetsNative)().bottom + DEFAULT_CONTENT_PADDING;
const {chatInputRef, keyboardCloseReasonRef,
entrypoint} = (AppLauncherContextModule).useRequiredAppLauncherContext();
const binding = applications2;
const value5 = binding.useCallback(_fun89890, [chatInputRef, keyboardCloseReasonRef, navigation]);
const value6 = binding.useCallback(_fun89891, [analyticsLocation, context, entrypoint, navigation]);
const value7 = binding.useCallback(_fun89892, [analyticsLocation, context, entrypoint, navigation,
sectionDescriptors]);
const value8 = binding.useMemo(_fun89893, [value5, styles.backButton, styles.header, title]);
const value9 = binding.useCallback(_fun89894, [applications, promotedApplicationIds, value6, r24]);
const value11 = binding.useCallback(_fun89897, [sectionDescriptors, context, commands.length,
binding.useCallback(function() {
var current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
}
keyboardCloseReasonRef.current = require(dependencyMap[9]).AppLauncherKeyboardCloseReason.COMMAND;
}, [chatInputRef, keyboardCloseReasonRef]), r24, value7]);
const {flashListRef,
bottomVisibilityInsetRef} = (UseBottomSheetFlashListBottomViewabilityInsetModule).useBottomSheetFlashListBottomViewabilityInset();
const useTrackAppLauncherItemImpressionOnFirstView = UseTrackAppLauncherItemImpressionOnFirstViewModule.useTrackAppLauncherItemImpressionOnFirstView;
const trackAppLauncherItemImpressionOnFirstView = Reflect.apply(useTrackAppLauncherItemImpressionOnFirstView,
UseTrackAppLauncherItemImpressionOnFirstViewModule, []).trackAppLauncherItemImpressionOnFirstView;
const value13 = (AppLauncherFlashListModule).useAppLauncherFlashListProps();
const value14 = binding.useMemo(_fun89900, [value3, styles.list]);
const value15 = binding.useMemo(function() {
return [{viewabilityConfig: FLASH_LIST_ITEM_IMPRESSION_VIEWABILITY_CONFIG, onViewableItemsChanged: _fun89902}];
}, [r24, sectionOverallPosition, trackAppLauncherItemImpressionOnFirstView]);
const value16 = binding.useMemo(function() {
return [{viewabilityConfig: FLASH_LIST_ITEM_IMPRESSION_VIEWABILITY_CONFIG, onViewableItemsChanged: _fun89905}];
}, [r24, sectionOverallPosition, trackAppLauncherItemImpressionOnFirstView]);
const value17 = binding.useMemo(_fun89907, [value2, applications.length]);
const value18 = binding.useMemo(_fun89908, [value2, commands.length]);
const SectionItemType = (FrecencySectionModule).SectionItemType;
const APPS = SectionItemType.APPS;
return (
<View style={styles.container}>
{value8}
{
sectionItemType === APPS
? ((Component) => <Component preserveScrollMomentum estimatedFirstItemOffset={10} contentContainerStyle={value14} scrollIndicatorInsets={env0_9} keyExtractor={function(a0) {
return a0.id;
}} data={applications} renderItem={value9} accessibilityRole="radiogroup" estimatedItemSize={value2} estimatedListSize={value17} ref={entrypoint !== (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint.VOICE ? flashListRef : value13.scrollerRef} bottomViewabilityInsetRef={bottomVisibilityInsetRef} viewabilityConfigCallbackPairs={value15} animatedOnScroll={value13.onScroll} simultaneousHandlers={value13.gestureRef} animatedProps={value13.animatedProps} />)(importDefault(11643) /* metro dependency 11643: AppLauncherFlashList */)
: ((Component) => <Component preserveScrollMomentum estimatedFirstItemOffset={10} contentContainerStyle={value14} scrollIndicatorInsets={env0_9} keyExtractor={keyExtractor_89910} data={commands} renderItem={value11} accessibilityRole="radiogroup" estimatedItemSize={value2} estimatedListSize={value18} ref={entrypoint !== (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint.VOICE ? flashListRef : value13.scrollerRef} bottomViewabilityInsetRef={bottomVisibilityInsetRef} viewabilityConfigCallbackPairs={value16} animatedOnScroll={value13.onScroll} simultaneousHandlers={value13.gestureRef} animatedProps={value13.animatedProps} />)(importDefault(11643) /* metro dependency 11643: AppLauncherFlashList */)
}
</View>
);
function _fun89890() { // fn#89890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:1380, offset: 0x02022cfe, size: 112 bytes, params: 1, frame: 13
var keyboardCloseReasonRefBinding;
var value2;
var current;
const navigationBinding = navigation;
if (navigationBinding.canGoBack()) {
navigation.pop();
} else {
keyboardCloseReasonRefBinding = keyboardCloseReasonRef;
value2 = environment.__proto__;
keyboardCloseReasonRefBinding.current = (require(8774) /* metro dependency 8774: AppLauncherContext */).AppLauncherKeyboardCloseReason.BACK;
current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
}
}
}
keyboardCloseReasonRef.current = require(dependencyMap[9]).AppLauncherKeyboardCloseReason.COMMAND;
}, [chatInputRef, keyboardCloseReasonRef]), r24, value7]);
const {flashListRef,
bottomVisibilityInsetRef} = (require(11639) /* metro dependency 11639: useBottomSheetFlashListBottomViewabilityInset */).useBottomSheetFlashListBottomViewabilityInset();
const useTrackAppLauncherItemImpressionOnFirstViewModule = require(11642) /* metro dependency 11642: useTrackAppLauncherItemImpressionOnFirstView */;
const useTrackAppLauncherItemImpressionOnFirstView = useTrackAppLauncherItemImpressionOnFirstViewModule.useTrackAppLauncherItemImpressionOnFirstView;
const trackAppLauncherItemImpressionOnFirstView = Reflect.apply(useTrackAppLauncherItemImpressionOnFirstView,
useTrackAppLauncherItemImpressionOnFirstViewModule, []).trackAppLauncherItemImpressionOnFirstView;
const value13 = (require(11643) /* metro dependency 11643: AppLauncherFlashList */).useAppLauncherFlashListProps();
const value14 = binding.useMemo(_fun89900, [value3, styles.list]);
const value15 = binding.useMemo(function() {
return [{viewabilityConfig: FLASH_LIST_ITEM_IMPRESSION_VIEWABILITY_CONFIG, onViewableItemsChanged: _fun89902}];
}, [r24, sectionOverallPosition, trackAppLauncherItemImpressionOnFirstView]);
const value16 = binding.useMemo(function() {
return [{viewabilityConfig: FLASH_LIST_ITEM_IMPRESSION_VIEWABILITY_CONFIG, onViewableItemsChanged: _fun89905}];
}, [r24, sectionOverallPosition, trackAppLauncherItemImpressionOnFirstView]);
const value17 = binding.useMemo(_fun89907, [value2, applications.length]);
const value18 = binding.useMemo(_fun89908, [value2, commands.length]);
const SectionItemType = (require(11593) /* metro dependency 11593: FrecencySection */).SectionItemType;
const APPS = SectionItemType.APPS;
return (
<View style={styles.container}>
{value8}
{sectionItemType === APPS ? ((Component) => <Component preserveScrollMomentum estimatedFirstItemOffset={10} contentContainerStyle={value14} scrollIndicatorInsets={env0_9} keyExtractor={function(a0) {
return a0.id;
}} data={applications} renderItem={value9} accessibilityRole="radiogroup" estimatedItemSize={value2} estimatedListSize={value17} ref={entrypoint !== (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint.VOICE ? flashListRef : value13.scrollerRef} bottomViewabilityInsetRef={bottomVisibilityInsetRef} viewabilityConfigCallbackPairs={value15} animatedOnScroll={value13.onScroll} simultaneousHandlers={value13.gestureRef} animatedProps={value13.animatedProps} />)(importDefault(11643) /* metro dependency 11643: AppLauncherFlashList */) : ((Component) => <Component preserveScrollMomentum estimatedFirstItemOffset={10} contentContainerStyle={value14} scrollIndicatorInsets={env0_9} keyExtractor={keyExtractor_89910} data={commands} renderItem={value11} accessibilityRole="radiogroup" estimatedItemSize={value2} estimatedListSize={value18} ref={entrypoint !== (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint.VOICE ? flashListRef : value13.scrollerRef} bottomViewabilityInsetRef={bottomVisibilityInsetRef} viewabilityConfigCallbackPairs={value16} animatedOnScroll={value13.onScroll} simultaneousHandlers={value13.gestureRef} animatedProps={value13.animatedProps} />)(importDefault(11643) /* metro dependency 11643: AppLauncherFlashList */)}
</View>
);
}
function _fun89890() { // fn#89890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:1380, offset: 0x02022cfe, size: 112 bytes, params: 1, frame: 13
var keyboardCloseReasonRefBinding;
var value2;
var current;
const navigationBinding = navigation;
if (navigationBinding.canGoBack()) {
navigation.pop();
} else {
keyboardCloseReasonRefBinding = keyboardCloseReasonRef;
value2 = environment.__proto__;
keyboardCloseReasonRefBinding.current = (require(8774) /* metro dependency 8774: AppLauncherContext */).AppLauncherKeyboardCloseReason.BACK;
current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
function _fun89891({application, sectionName}) { // fn#89891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:1542, offset: 0x02022d6e, size: 144 bytes, params: 2, frame: 18
AppLauncherNativeUtilsModule.handleApplicationSelected({location: analyticsLocation ?? (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW_FRECENCT,
application: application, navigation: navigation, context: context, sectionName: sectionName,
entrypoint: entrypoint});
}
function _fun89892(a0, a1, a2) { // fn#89892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:1810, offset: 0x02022dfe, size: 163 bytes, params: 4, frame: 16
AppLauncherNativeUtilsModule.handleApplicationCommandSelected({location: analyticsLocation ?? (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW_FRECENCT,
context: context, command: a0, section: a1, sectionDescriptors: sectionDescriptors, query: '',
navigation: navigation, sectionName: a2, entrypoint: entrypoint});
}
function _fun89893() { // fn#89893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:2095, offset: 0x02022ea1, size: 332 bytes, params: 1, frame: 23
const value = environment.__proto__;
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {style: styles.backButton};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
pressableOpacityProps.accessibilityRole = 'button';
pressableOpacityProps.onPress = env0_16;
const ArrowLargeLeftIcon = (ArrowLargeLeftIconModule).ArrowLargeLeftIcon;
const INTERACTIVE_TEXT_DEFAULT = (Native).colors.INTERACTIVE_TEXT_DEFAULT;
const items2 = [
<PressableOpacity {...pressableOpacityProps}>
<ArrowLargeLeftIcon color={INTERACTIVE_TEXT_DEFAULT} />
</PressableOpacity>,
];
const Text = (TextModule).Text;
items2[1] = (
<Text
lineClamp={1}
variant="heading-lg/bold"
color="mobile-text-heading-primary"
>
{title}
</Text>
);
const Spacer = (NativeModule).Spacer;
const BACK_BUTTON_SIZE = (AppLauncherBackButtonModule).BACK_BUTTON_SIZE;
items2[2] = <Spacer size={BACK_BUTTON_SIZE} />;
return (
<View style={styles.header}>
{items2}
</View>
);
}
function _fun89894({item, index}) { // fn#89894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:2571, offset: 0x02022fed, size: 168 bytes, params: 2, frame: 21
return ((Component) => <Component application={item} onPress={onPress_89895} isFirstRow={index === 0} isLastRow={applications != null && index === applications.length - 1} showsPromoted={promotedApplicationIds?.has(item.id)} key={item.id} />)(importDefault(11634) /* metro dependency 11634: RecommendationAppRow */);
function onPress_89895() { // fn#89895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:2663, offset: 0x02023095, size: 38 bytes, params: 1, frame: 12
return env1_17({application: item, sectionName: env1_9});
}
}
function _fun89897({item, index}) { // fn#89897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:2946, offset: 0x02023108, size: 334 bytes, params: 2, frame: 24
const r7 = sectionDescriptors?.find(function({id}) {
return id === item.applicationId;
});
const appLauncherIconSource = (require(11592) /* metro dependency 11592: AppLauncherNativeUtils */).getAppLauncherIconSource(r7?.application);
const value6 = commands.length - 1;
if (r7 == null) {
return null;
}
const r5 = appLauncherIconSource != null && ((Component) => <Component iconSource={appLauncherIconSource} iconSize={36} />)(importDefault(11597) /* metro dependency 11597: EntityBorderAppIcon */);
const CommandRow = (AppDetailContentModule).CommandRow;
const commandRowProps = {command: item, onPressCommand: onPressCommand, onExecuteCommand: env0_19,
isFirstRow: index === 0, isLastRow: index === value6, context: context, section: r7};
const ApplicationCommandTriggerLocations = (ApplicationCommandTypesModule).ApplicationCommandTriggerLocations;
const APP_LAUNCHER_FRECENTS_VIEW_ALL = ApplicationCommandTriggerLocations.APP_LAUNCHER_FRECENTS_VIEW_ALL;
commandRowProps.location = APP_LAUNCHER_FRECENTS_VIEW_ALL;
commandRowProps.sectionName = env0_9;
commandRowProps.icon = r5;
return <CommandRow {...commandRowProps} />;
function onPressCommand() { // fn#89899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:3239, offset: 0x02023256, size: 33 bytes, params: 1, frame: 15
return env1_18(item, env0_1, env1_9);
}
}
function _fun89900() { // fn#89900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:3711, offset: 0x02023277, size: 37 bytes, params: 1, frame: 12
const object = {};
const stylesBinding = styles;
copyDataProperties(object, stylesBinding.list, stylesBinding);
object['paddingBottom'] = env0_12;
return object;
}
function _fun89901() { // fn#89901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:3771, offset: 0x0202329c, size: 38 bytes, params: 1, frame: 2
return [{viewabilityConfig: FLASH_LIST_ITEM_IMPRESSION_VIEWABILITY_CONFIG,
onViewableItemsChanged: function({viewableItems}) {
viewableItems.forEach(_fun89903);
}}];
function onViewableItemsChanged({viewableItems}) { // fn#89902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:3820, offset: 0x020232c2, size: 32 bytes, params: 2, frame: 11
viewableItems.forEach(_fun89903);
function _fun89903({item, index}) { // fn#89903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:3853, offset: 0x020232e2, size: 97 bytes, params: 2, frame: 16
trackAppLauncherItemImpressionOnFirstView({itemKey: 'applicationId:' + item.id, sectionName: env2_9,
sectionPosition: index, sectionOverallPosition: sectionOverallPosition, applicationId: item.id});
}
}
}
function _fun89904() { // fn#89904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:4016, offset: 0x02023343, size: 38 bytes, params: 1, frame: 2
return [{viewabilityConfig: FLASH_LIST_ITEM_IMPRESSION_VIEWABILITY_CONFIG,
onViewableItemsChanged: function({viewableItems}) {
viewableItems.forEach(_fun89906);
}}];
function onViewableItemsChanged_89905({viewableItems}) { // fn#89905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:4065, offset: 0x02023369, size: 32 bytes, params: 2, frame: 11
viewableItems.forEach(_fun89906);
function _fun89906({item, index}) { // fn#89906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:4098, offset: 0x02023389, size: 107 bytes, params: 2, frame: 16
trackAppLauncherItemImpressionOnFirstView({itemKey: 'commandId:' + item.id, sectionName: env2_9,
sectionPosition: index, sectionOverallPosition: sectionOverallPosition, applicationId: item.applicationId,
commandId: item.id});
}
}
}
function _fun89907() { // fn#89907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:4283, offset: 0x020233f4, size: 38 bytes, params: 1, frame: 3
return {height: env0_10 * applications.length, width: 500};
}
function _fun89908() { // fn#89908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:4347, offset: 0x0202341a, size: 38 bytes, params: 1, frame: 3
return {height: env0_10 * commands.length, width: 500};
}
}
}
function _fun89891({application, sectionName}) { // fn#89891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:1542, offset: 0x02022d6e, size: 144 bytes, params: 2, frame: 18
const appLauncherNativeUtilsModule = require(11592) /* metro dependency 11592: AppLauncherNativeUtils */;
appLauncherNativeUtilsModule.handleApplicationSelected({location: analyticsLocation ?? (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW_FRECENCT,
application: application, navigation: navigation, context: context, sectionName: sectionName,
entrypoint: entrypoint});
}
function _fun89892(a0, a1, a2) { // fn#89892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:1810, offset: 0x02022dfe, size: 163 bytes, params: 4, frame: 16
const appLauncherNativeUtilsModule = require(11592) /* metro dependency 11592: AppLauncherNativeUtils */;
appLauncherNativeUtilsModule.handleApplicationCommandSelected({location: analyticsLocation ?? (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW_FRECENCT,
context: context, command: a0, section: a1, sectionDescriptors: sectionDescriptors, query: '',
navigation: navigation, sectionName: a2, entrypoint: entrypoint});
}
function _fun89893() { // fn#89893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:2095, offset: 0x02022ea1, size: 332 bytes, params: 1, frame: 23
const value = environment.__proto__;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: styles.backButton};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
pressableOpacityProps.accessibilityRole = 'button';
pressableOpacityProps.onPress = env0_16;
const ArrowLargeLeftIcon = (require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
const items2 = [<PressableOpacity {...pressableOpacityProps}><ArrowLargeLeftIcon color={INTERACTIVE_TEXT_DEFAULT} /></PressableOpacity>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text lineClamp={1} variant="heading-lg/bold" color="mobile-text-heading-primary">{title}</Text>;
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
const BACK_BUTTON_SIZE = (require(11673) /* metro dependency 11673: AppLauncherBackButton */).BACK_BUTTON_SIZE;
items2[2] = <Spacer size={BACK_BUTTON_SIZE} />;
return (
<View style={styles.header}>
{items2}
</View>
);
}
function _fun89894({item, index}) { // fn#89894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:2571, offset: 0x02022fed, size: 168 bytes, params: 2, frame: 21
return ((Component) => <Component application={item} onPress={onPress_89895} isFirstRow={index === 0} isLastRow={applications != null && index === applications.length - 1} showsPromoted={promotedApplicationIds?.has(item.id)} key={item.id} />)(importDefault(11634) /* metro dependency 11634: RecommendationAppRow */);
}
function _fun89897({item, index}) { // fn#89897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:2946, offset: 0x02023108, size: 334 bytes, params: 2, frame: 24
const r7 = sectionDescriptors?.find(function({id}) {
return id === item.applicationId;
});
const appLauncherIconSource = (require(11592) /* metro dependency 11592: AppLauncherNativeUtils */).getAppLauncherIconSource(r7?.application);
const value6 = commands.length - 1;
if (r7 == null) {
return null;
}
const r5 = appLauncherIconSource != null && ((Component) => <Component iconSource={appLauncherIconSource} iconSize={36} />)(importDefault(11597) /* metro dependency 11597: EntityBorderAppIcon */);
const CommandRow = (require(11671) /* metro dependency 11671: AppDetailContent */).CommandRow;
const commandRowProps = {command: item, onPressCommand: onPressCommand, onExecuteCommand: env0_19,
isFirstRow: index === 0, isLastRow: index === value6, context: context, section: r7};
const ApplicationCommandTriggerLocations = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations;
const APP_LAUNCHER_FRECENTS_VIEW_ALL = ApplicationCommandTriggerLocations.APP_LAUNCHER_FRECENTS_VIEW_ALL;
commandRowProps.location = APP_LAUNCHER_FRECENTS_VIEW_ALL;
commandRowProps.sectionName = env0_9;
commandRowProps.icon = r5;
return <CommandRow {...commandRowProps} />;
}
function _fun89900() { // fn#89900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:3711, offset: 0x02023277, size: 37 bytes, params: 1, frame: 12
const object2 = {};
const stylesBinding = styles;
copyDataProperties(object2, stylesBinding.list, stylesBinding);
object2['paddingBottom'] = env0_12;
return object2;
}
function _fun89901() { // fn#89901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:3771, offset: 0x0202329c, size: 38 bytes, params: 1, frame: 2
return [{viewabilityConfig: FLASH_LIST_ITEM_IMPRESSION_VIEWABILITY_CONFIG,
onViewableItemsChanged: function({viewableItems}) {
viewableItems.forEach(_fun89903);
}}];
}
function _fun89904() { // fn#89904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:4016, offset: 0x02023343, size: 38 bytes, params: 1, frame: 2
return [{viewabilityConfig: FLASH_LIST_ITEM_IMPRESSION_VIEWABILITY_CONFIG,
onViewableItemsChanged: function({viewableItems}) {
viewableItems.forEach(_fun89906);
}}];
}
function _fun89907() { // fn#89907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:4283, offset: 0x020233f4, size: 38 bytes, params: 1, frame: 3
return {height: env0_10 * applications.length, width: 500};
}
function _fun89908() { // fn#89908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:4347, offset: 0x0202341a, size: 38 bytes, params: 1, frame: 3
return {height: env0_10 * commands.length, width: 500};
}
function onPress_89895() { // fn#89895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:2663, offset: 0x02023095, size: 38 bytes, params: 1, frame: 12
return env1_17({application: item, sectionName: env1_9});
}
function onPressCommand() { // fn#89899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:3239, offset: 0x02023256, size: 33 bytes, params: 1, frame: 15
return env1_18(item, env0_1, env1_9);
}
function onViewableItemsChanged({viewableItems}) { // fn#89902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:3820, offset: 0x020232c2, size: 32 bytes, params: 2, frame: 11
viewableItems.forEach(_fun89903);
}
function onViewableItemsChanged_89905({viewableItems}) { // fn#89905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:4065, offset: 0x02023369, size: 32 bytes, params: 2, frame: 11
viewableItems.forEach(_fun89906);
}
function _fun89903({item, index}) { // fn#89903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:3853, offset: 0x020232e2, size: 97 bytes, params: 2, frame: 16
trackAppLauncherItemImpressionOnFirstView({itemKey: 'applicationId:' + item.id, sectionName: env2_9,
sectionPosition: index, sectionOverallPosition: sectionOverallPosition, applicationId: item.id});
}
function _fun89906({item, index}) { // fn#89906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:4098, offset: 0x02023389, size: 107 bytes, params: 2, frame: 16
trackAppLauncherItemImpressionOnFirstView({itemKey: 'commandId:' + item.id, sectionName: env2_9,
sectionPosition: index, sectionOverallPosition: sectionOverallPosition, applicationId: item.applicationId,
commandId: item.id});
function AppLauncherViewAllScreenKeyExtractor_89910(a0) { // fn#89910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11917:5003, owner: AppLauncherViewAllScreen.keyExtractor, offset: 0x00e46f8c, size: 10 bytes, params: 2, frame: 1
return a0.id;
}
global.__d(_fun89888, 11731, [31, 27, 1483, 33, 4501, 697, 11673, 3860, 1585, 8774, 11592, 5068, 5278, 1244, 5284,
4573, 1305, 11634, 11597, 11671, 11639, 11642, 11643, 11593, 8048,
2]) /* metro module 11731, dependencies: [31, 27, 1483, 33, 4501, 697, 11673, 3860, 1585, 8774, 11592, 5068, 5278, 1244, 5284, 4573, 1305, 11634, 11597, 11671, 11639, 11642, 11643, 11593, 8048, 2] */;
@@ -1,127 +1,157 @@
/* Metro module 11669; source: modules/app_launcher/native/screens/application_view/AppLauncherApplicationViewScreen.tsx; dependencies: [31, 27, 7861, 1483, 5066, 33, 4501, 8774, 11670, 8046, 1583, 11671, 6777, 4017, 11672, 2] */
import ApplicationCommandIndexStore from '../../../../application_commands/ApplicationCommandIndexStore.tsx'; /* Metro dependency 7861 */
import UseNavigationTransitionEnded from '../../hooks/useNavigationTransitionEnded.tsx'; /* Metro dependency 11670 */
import AppDetailContent from './app/AppDetailContent.tsx'; /* Metro dependency 11671 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ApplicationCommandConstantsModule from '../../../../application_commands/ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as UseGetOrFetchApplicationsModule from '../../../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import * as AppLauncherContextModule from '../../AppLauncherContext.tsx'; /* Metro dependency 8774 */
function _fun89445(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:6, offset: 0x0200da9c, size: 292 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 */;
let value = ReactNativeModule;
const env0_4 = value.ActivityIndicator;
const env0_5 = value.View;
const applicationCommandIndexStore = importDefault(7861) /* metro dependency 7861: ApplicationCommandIndexStore */;
value = require(1483) /* metro dependency 1483: AppLauncherNativeConstants */;
const env0_7 = value.AppLauncherRouteName;
const SCREEN_BACKGROUND_COLOR = value.SCREEN_BACKGROUND_COLOR;
const env0_8 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {backgroundColor: SCREEN_BACKGROUND_COLOR,
const env0_10 = (CreateStylesModule).createStyles({container: {backgroundColor: SCREEN_BACKGROUND_COLOR,
flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/application_view/AppLauncherApplicationViewScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/application_view/AppLauncherApplicationViewScreen.tsx');
exports.default = AppLauncherApplicationViewScreen;
}
function AppLauncherApplicationViewScreenInner({context, application, lockableScrollableContentOffsetY, initiallyExpanded, installOnDemand, sectionName, onPressBack, onActivityItemSelected, entrypoint, expandBottomSheet, onCommandExecuted}) { // fn#89446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:324, offset: 0x0200dbc0, size: 359 bytes, params: 2, frame: 30
const {bottomSheetExpandReasonRef,
chatInputRef} = (require(8774) /* metro dependency 8774: AppLauncherContext */).useRequiredAppLauncherContext();
const env0_3 = chatInputRef;
const value3 = (importDefault(11670) /* metro dependency 11670: useNavigationTransitionEnded */)();
const r18 = initiallyExpanded ?? (require(8046) /* metro dependency 8046: AppLauncherUtils */).isEmbeddedApp(application);
const value4 = env0_3.useCallback(function() {
var current = chatInputRef.current;
var object = {};
object.type = require(dependencyMap[10]).KeyboardTypes.APP_LAUNCHER;
object.context = {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, application: application};
current.openCustomKeyboard(object);
}, [application, chatInputRef]);
env0_3.useEffect(_fun89448, [value3, r18, expandBottomSheet, bottomSheetExpandReasonRef]);
return ((Component) => <Component application={application} context={context} lockableScrollableContentOffsetY={lockableScrollableContentOffsetY} installOnDemand={installOnDemand} sectionName={sectionName} onPressBack={onPressBack} onActivityItemSelected={onActivityItemSelected} entrypoint={entrypoint} onCommandExecuted={onCommandExecuted} onAauth2Cancel={value4} />)(importDefault(11671) /* metro dependency 11671: AppDetailContent */);
}
function AppLauncherApplicationViewScreen(a0) { // fn#89449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:1333, offset: 0x0200ddde, size: 552 bytes, params: 2, frame: 32
var r4;
var object;
const params = a0.route.params;
const application = params.application;
const applicationId = params.applicationId;
const env0_0 = params.onPressBack;
const context = params.context;
const initiallyExpanded = params.initiallyExpanded;
const installOnDemand = params.installOnDemand;
const sectionName = params.sectionName;
const expandBottomSheet = params.expandBottomSheet;
const onCommandExecuted = params.onCommandExecuted;
const env0_3 = a0.navigation;
const value = undefined;
const value3 = (require(8774) /* metro dependency 8774: AppLauncherContext */).useRequiredAppLauncherContext();
const env0_4 = value3.chatInputRef;
const entrypoint = value3.entrypoint;
const onActivityItemSelected = value3.onActivityItemSelected;
const env0_5 = value3.keyboardCloseReasonRef;
const styles = useStyles();
const value4 = null;
const id = value4 == application ? value : application.id;
const r0 = value4 == id ? applicationId : id;
const useGetOrFetchApplicationsModule = require(6777) /* metro dependency 6777: useGetOrFetchApplications */;
const useGetOrFetchApplication = useGetOrFetchApplicationsModule.useGetOrFetchApplication;
let BUILT_IN = BuiltInSectionId.BUILT_IN;
const value5 = Reflect.apply(useGetOrFetchApplication, useGetOrFetchApplicationsModule,
[r0 === BUILT_IN ? value4 : r0]);
BUILT_IN = BuiltInSectionId.BUILT_IN;
const r17 = r0 === BUILT_IN ? (require(8046) /* metro dependency 8046: AppLauncherUtils */).FAKE_BUILT_IN_APP : value4 == value5 ? application : value5;
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
env0_3.useEffect(_fun89450, [r0, context, installOnDemand]);
if (value4 != r17) {
r4 = <AppLauncherApplicationViewScreenInner context={context} application={r17} lockableScrollableContentOffsetY={value6} initiallyExpanded={initiallyExpanded} installOnDemand={installOnDemand} sectionName={sectionName} onPressBack={onPressBack} onActivityItemSelected={onActivityItemSelected} entrypoint={entrypoint} expandBottomSheet={expandBottomSheet} onCommandExecuted={onCommandExecuted} />;
} else {
object = {};
object.paddingTop = (require(11672) /* metro dependency 11672: Header */).EXPANDED_HEADER_HEIGHT;
r4 = <View style={object}><ActivityIndicator /></View>;
}
return (
<View style={styles.container}>
{r4}
</View>
);
}
function _fun89448() { // fn#89448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:904, offset: 0x0200dd88, size: 86 bytes, params: 1, frame: 13
var bottomSheetExpandReasonRefBinding;
var value2;
if (env0_5 && env0_4) {
bottomSheetExpandReasonRefBinding = bottomSheetExpandReasonRef;
value2 = environment.__proto__;
bottomSheetExpandReasonRefBinding.current = (require(8774) /* metro dependency 8774: AppLauncherContext */).AppLauncherBottomSheetExpandReason.APP_VIEW;
if (expandBottomSheet != null) {
expandBottomSheet();
function AppLauncherApplicationViewScreenInner({context, application, lockableScrollableContentOffsetY, initiallyExpanded, installOnDemand, sectionName, onPressBack, onActivityItemSelected, entrypoint, expandBottomSheet, onCommandExecuted}) { // fn#89446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:324, offset: 0x0200dbc0, size: 359 bytes, params: 2, frame: 30
const {bottomSheetExpandReasonRef,
chatInputRef} = (AppLauncherContextModule).useRequiredAppLauncherContext();
const chatInputRef2 = chatInputRef;
const value3 = (UseNavigationTransitionEnded)();
const r18 = initiallyExpanded ?? (require(8046) /* metro dependency 8046: AppLauncherUtils */).isEmbeddedApp(application);
const value4 = chatInputRef2.useCallback(function() {
var current = chatInputRef.current;
var object = {};
object.type = require(dependencyMap[10]).KeyboardTypes.APP_LAUNCHER;
object.context = {initialRouteName: AppLauncherRouteName.APPLICATION_VIEW, application: application};
current.openCustomKeyboard(object);
}, [application, chatInputRef]);
chatInputRef2.useEffect(_fun89448, [value3, r18, expandBottomSheet, bottomSheetExpandReasonRef]);
return ((Component) => <Component application={application} context={context} lockableScrollableContentOffsetY={lockableScrollableContentOffsetY} installOnDemand={installOnDemand} sectionName={sectionName} onPressBack={onPressBack} onActivityItemSelected={onActivityItemSelected} entrypoint={entrypoint} onCommandExecuted={onCommandExecuted} onAauth2Cancel={value4} />)(AppDetailContent);
function _fun89448() { // fn#89448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:904, offset: 0x0200dd88, size: 86 bytes, params: 1, frame: 13
var bottomSheetExpandReasonRefBinding;
var value2;
if (env0_5 && env0_4) {
bottomSheetExpandReasonRefBinding = bottomSheetExpandReasonRef;
value2 = environment.__proto__;
bottomSheetExpandReasonRefBinding.current = (require(8774) /* metro dependency 8774: AppLauncherContext */).AppLauncherBottomSheetExpandReason.APP_VIEW;
if (expandBottomSheet != null) {
expandBottomSheet();
}
}
}
}
}
function _fun89450() { // fn#89450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:1893, offset: 0x0200e006, size: 86 bytes, params: 1, frame: 13
var value4;
if (env0_6 != null && context.type === 'channel' && installOnDemand) {
value4 = environment.__proto__;
ApplicationCommandIndexStore.queryInstallOnDemandApp(env0_6, context.channel.id);
}
}
function onPressBack() { // fn#89451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:2187, owner: AppLauncherApplicationViewScreen.onPressBack, offset: 0x0200e05c, size: 130 bytes, params: 1, frame: 14
var keyboardCloseReasonRefBinding;
var value2;
var current;
if (onPressBack != null) {
onPressBack();
}
const navigationBinding = navigation;
if (navigationBinding.canGoBack()) {
navigation.pop();
} else {
keyboardCloseReasonRefBinding = keyboardCloseReasonRef;
value2 = environment.__proto__;
keyboardCloseReasonRefBinding.current = (require(8774) /* metro dependency 8774: AppLauncherContext */).AppLauncherKeyboardCloseReason.BACK;
current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
function AppLauncherApplicationViewScreen(a0) { // fn#89449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:1333, offset: 0x0200ddde, size: 552 bytes, params: 2, frame: 32
var r4;
var object2;
const params = a0.route.params;
const application = params.application;
const applicationId = params.applicationId;
const env0_0 = params.onPressBack;
const context = params.context;
const initiallyExpanded = params.initiallyExpanded;
const installOnDemand = params.installOnDemand;
const sectionName = params.sectionName;
const expandBottomSheet = params.expandBottomSheet;
const onCommandExecuted = params.onCommandExecuted;
const navigation = a0.navigation;
const value = undefined;
const value3 = (AppLauncherContextModule).useRequiredAppLauncherContext();
const env0_4 = value3.chatInputRef;
const entrypoint = value3.entrypoint;
const onActivityItemSelected = value3.onActivityItemSelected;
const env0_5 = value3.keyboardCloseReasonRef;
const styles = useStyles();
const value4 = null;
const id = value4 == application ? value : application.id;
const r0 = value4 == id ? applicationId : id;
const useGetOrFetchApplication = UseGetOrFetchApplicationsModule.useGetOrFetchApplication;
let BUILT_IN = BuiltInSectionId.BUILT_IN;
const value5 = Reflect.apply(useGetOrFetchApplication, UseGetOrFetchApplicationsModule,
[r0 === BUILT_IN ? value4 : r0]);
BUILT_IN = BuiltInSectionId.BUILT_IN;
const r17 = r0 === BUILT_IN ? (require(8046) /* metro dependency 8046: AppLauncherUtils */).FAKE_BUILT_IN_APP : value4 == value5 ? application : value5;
const value6 = (ReanimatedRexportModule).useSharedValue(0);
navigation.useEffect(_fun89450, [r0, context, installOnDemand]);
if (value4 != r17) {
r4 = (
<AppLauncherApplicationViewScreenInner
context={context}
application={r17}
lockableScrollableContentOffsetY={value6}
initiallyExpanded={initiallyExpanded}
installOnDemand={installOnDemand}
sectionName={sectionName}
onPressBack={onPressBack_89451}
onActivityItemSelected={onActivityItemSelected}
entrypoint={entrypoint}
expandBottomSheet={expandBottomSheet}
onCommandExecuted={onCommandExecuted}
/>
);
} else {
object2 = {};
object2.paddingTop = (require(11672) /* metro dependency 11672: Header */).EXPANDED_HEADER_HEIGHT;
r4 = (
<View style={object2}>
<ActivityIndicator />
</View>
);
}
return (
<View style={styles.container}>
{r4}
</View>
);
function _fun89450() { // fn#89450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:1893, offset: 0x0200e006, size: 86 bytes, params: 1, frame: 13
var value4;
var applicationCommandIndexStoreBinding;
if (env0_6 != null && context.type === 'channel' && installOnDemand) {
value4 = environment.__proto__;
applicationCommandIndexStoreBinding = ApplicationCommandIndexStore;
applicationCommandIndexStoreBinding.queryInstallOnDemandApp(env0_6, context.channel.id);
}
}
function AppLauncherApplicationViewScreenOnPressBack() { // fn#89451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11855:2187, owner: AppLauncherApplicationViewScreen.onPressBack, offset: 0x0200e05c, size: 130 bytes, params: 1, frame: 14
var keyboardCloseReasonRefBinding;
var value2;
var current;
if (onPressBack != null) {
onPressBack();
}
const navigationBinding = navigation;
if (navigationBinding.canGoBack()) {
navigation.pop();
} else {
keyboardCloseReasonRefBinding = keyboardCloseReasonRef;
value2 = environment.__proto__;
keyboardCloseReasonRefBinding.current = (require(8774) /* metro dependency 8774: AppLauncherContext */).AppLauncherKeyboardCloseReason.BACK;
current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
}
}
}
}
}
global.__d(_fun89445, 11669, [31, 27, 7861, 1483, 5066, 33, 4501, 8774, 11670, 8046, 1583, 11671, 6777, 4017, 11672,
2]) /* metro module 11669, dependencies: [31, 27, 7861, 1483, 5066, 33, 4501, 8774, 11670, 8046, 1583, 11671, 6777, 4017, 11672, 2] */;
@@ -1,14 +1,24 @@
/* Metro module 11672; source: modules/app_launcher/native/screens/application_view/Header.tsx; dependencies: [31, 27, 1878, 8047, 1483, 661, 33, 697, 4501, 4017, 566, 11592, 3860, 8372, 11597, 8046, 7504, 11673, 4573, 1305, 8341, 4057, 683, 6797, 8809, 3856, 1244, 11674, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AppLauncherStore from '../../../AppLauncherStore.tsx'; /* Metro dependency 8047 */
import UseAvatarColor from '../../../../avatar/useAvatarColor.tsx'; /* Metro dependency 8372 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as AppLauncherNativeConstantsModule from '../../AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
import * as UseTokenModule from '../../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun89480(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:6, offset: 0x0200f96c, size: 689 bytes, params: 8, frame: 27
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(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const appLauncherStore = importDefault(8047) /* metro dependency 8047: AppLauncherStore */;
let value = require(1483) /* metro dependency 1483: AppLauncherNativeConstants */;
ReactModule;
let value = AppLauncherNativeConstantsModule;
const DEFAULT_CONTENT_PADDING = value.DEFAULT_CONTENT_PADDING;
const SCREEN_BACKGROUND_COLOR = value.SCREEN_BACKGROUND_COLOR;
value = require(661) /* metro dependency 661: Constants */;
@@ -20,236 +30,262 @@ function _fun89480(global, require, importDefault, importAll, module, exports, d
const xl = (importDefault(697) /* metro dependency 697: native */).radii.xl;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {headerContainer: {'position': 'absolute', 'top': -16, 'left': 0, 'right': 0, 'minHeight': 161}};
object2.expandedHeaderBanner = {height: 105};
const object7 = {'position': 'absolute', 'padding': 4, 'bottom': -40, 'left': 16};
object7.backgroundColor = SCREEN_BACKGROUND_COLOR;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl + 4;
object2.appIconMask = object7;
const object8 = {'height': 56, 'justifyContent': 'space-between', 'alignItems': 'center', 'position': 'absolute',
object = {headerContainer: {'position': 'absolute', 'top': -16, 'left': 0, 'right': 0, 'minHeight': 161}};
object.expandedHeaderBanner = {height: 105};
const object3 = {'position': 'absolute', 'padding': 4, 'bottom': -40, 'left': 16};
object3.backgroundColor = SCREEN_BACKGROUND_COLOR;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl + 4;
object.appIconMask = object3;
const object4 = {'height': 56, 'justifyContent': 'space-between', 'alignItems': 'center', 'position': 'absolute',
'top': 0, 'left': 0, 'right': 0, 'flexDirection': 'row', 'paddingHorizontal': null, 'paddingTop': 16};
object8.paddingHorizontal = DEFAULT_CONTENT_PADDING;
object4.paddingHorizontal = DEFAULT_CONTENT_PADDING;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.paddingBottom = PX_12;
object2.collapsedHeaderBanner = object8;
object2.collapsedHeaderBannerOverlay = {'backgroundColor': 'black', 'position': 'absolute', 'top': 0, 'left': 0,
object4.paddingBottom = PX_12;
object.collapsedHeaderBanner = object4;
object.collapsedHeaderBannerOverlay = {'backgroundColor': 'black', 'position': 'absolute', 'top': 0, 'left': 0,
'right': 0, 'bottom': 0};
const object9 = {'height': 72, 'width': 72};
object9.borderRadius = xl;
const object5 = {'height': 72, 'width': 72};
object5.borderRadius = xl;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object9.backgroundColor = BACKGROUND_MOD_MUTED;
object2.loadingIcon = object9;
const object10 = {'flexDirection': 'row', 'display': 'flex', 'gap': null, 'position': 'absolute', 'right': null,
object5.backgroundColor = BACKGROUND_MOD_MUTED;
object.loadingIcon = object5;
const object6 = {'flexDirection': 'row', 'display': 'flex', 'gap': null, 'position': 'absolute', 'right': null,
'top': null, 'alignItems': 'center', 'justifyContent': 'center'};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object10.gap = PX_16;
object6.gap = PX_16;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.right = PX_12;
object6.right = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object10.top = PX_12;
object2.actionsWrapper = object10;
const env0_11 = Reflect.apply(createStyles, value, [object2]);
object2 = {code: "function HeaderTsx1(){const{interpolate,scrollOffsetY,HEADER_SCROLL_RANGE}=this.__closure;return{transform:[{translateY:interpolate(scrollOffsetY.get(),[0,HEADER_SCROLL_RANGE],[0,-HEADER_SCROLL_RANGE],'clamp')}]};}"};
object2 = {code: "function HeaderTsx2(){const{interpolate,scrollOffsetY,HEADER_SCROLL_RANGE}=this.__closure;return{transform:[{translateY:interpolate(scrollOffsetY.get(),[0,HEADER_SCROLL_RANGE],[0,HEADER_SCROLL_RANGE],'clamp')}]};}"};
object2 = {code: "function HeaderTsx3(){const{interpolate,scrollOffsetY,HEADER_SCROLL_RANGE}=this.__closure;return{transform:[{translateY:interpolate(scrollOffsetY.get(),[HEADER_SCROLL_RANGE*0.5,HEADER_SCROLL_RANGE],[16,0],'clamp')}],opacity:interpolate(scrollOffsetY.get(),[HEADER_SCROLL_RANGE*0.5,HEADER_SCROLL_RANGE],[0,1],'clamp')};}"};
object2 = {code: "function HeaderTsx4(){const{interpolate,scrollOffsetY,HEADER_SCROLL_RANGE}=this.__closure;return{opacity:interpolate(scrollOffsetY.get(),[HEADER_SCROLL_RANGE*0.5,HEADER_SCROLL_RANGE],[0,0.5],'clamp')};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/application_view/Header.tsx');
object6.top = PX_12;
object.actionsWrapper = object6;
const env0_11 = Reflect.apply(createStyles, value, [object]);
object = {code: "function HeaderTsx1(){const{interpolate,scrollOffsetY,HEADER_SCROLL_RANGE}=this.__closure;return{transform:[{translateY:interpolate(scrollOffsetY.get(),[0,HEADER_SCROLL_RANGE],[0,-HEADER_SCROLL_RANGE],'clamp')}]};}"};
object = {code: "function HeaderTsx2(){const{interpolate,scrollOffsetY,HEADER_SCROLL_RANGE}=this.__closure;return{transform:[{translateY:interpolate(scrollOffsetY.get(),[0,HEADER_SCROLL_RANGE],[0,HEADER_SCROLL_RANGE],'clamp')}]};}"};
object = {code: "function HeaderTsx3(){const{interpolate,scrollOffsetY,HEADER_SCROLL_RANGE}=this.__closure;return{transform:[{translateY:interpolate(scrollOffsetY.get(),[HEADER_SCROLL_RANGE*0.5,HEADER_SCROLL_RANGE],[16,0],'clamp')}],opacity:interpolate(scrollOffsetY.get(),[HEADER_SCROLL_RANGE*0.5,HEADER_SCROLL_RANGE],[0,1],'clamp')};}"};
object = {code: "function HeaderTsx4(){const{interpolate,scrollOffsetY,HEADER_SCROLL_RANGE}=this.__closure;return{opacity:interpolate(scrollOffsetY.get(),[HEADER_SCROLL_RANGE*0.5,HEADER_SCROLL_RANGE],[0,0.5],'clamp')};}"};
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/application_view/Header.tsx');
exports.default = Header_89481;
exports.SHEET_HANDLE_CONTAINER_HEIGHT = 16;
exports.EXPANDED_HEADER_HEIGHT = 161;
}
function Header_89481({application, onPressBack, scrollOffsetY, onAddAppMenuClick}) { // fn#89481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:2268, offset: 0x0200fc1d, size: 1272 bytes, params: 2, frame: 35
var moduleValue5;
var moduleValue6;
var IconButton;
var object12;
var intl;
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppLauncherStore], function() {
return AppLauncherStore.entrypoint();
});
const styles = useStyles();
let r5 = application != null ? (require(11592) /* metro dependency 11592: AppLauncherNativeUtils */).getAppLauncherIconSource(application) : null;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value5 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW]);
const defaultImport = importDefault(8372) /* metro dependency 8372: useAvatarColor */;
const r2 = typeof r5 === 'number' ? r5 : r5?.uri;
const value6 = '';
const value7 = defaultImport(r2, value5 ?? value6);
const r20 = r5 != null ? ((Component) => <Component iconSource={r5} iconBorderRadius={xl} iconSize={72} />)(importDefault(11597) /* metro dependency 11597: EntityBorderAppIcon */) : <View style={styles.loadingIcon} />;
const value10 = _fun89483({scrollOffsetY: scrollOffsetY});
const value11 = _fun89485({scrollOffsetY: scrollOffsetY});
const value12 = _fun89488({scrollOffsetY: scrollOffsetY});
const r21 = application != null ? (require(8046) /* metro dependency 8046: AppLauncherUtils */).getSectionName(application) : value6;
let r0 = application != null && 'flags' in application;
if (r0) {
moduleValue5 = require(7504) /* metro dependency 7504: ApplicationFlagUtils */;
r0 = moduleValue5.hasApplicationFlag(application, ApplicationFlags.EMBEDDED);
}
const env0_3 = UserStore.getCurrentUser();
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.headerContainer];
items2[1] = value10.style;
const items3 = [<View style={[styles.expandedHeaderBanner,
{backgroundColor: value7}]} pointerEvents="none"><View style={styles.appIconMask}>{r20}</View></View>];
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [styles.collapsedHeaderBanner];
items4[1] = {backgroundColor: value7};
items4[2] = value11.headerStyle;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items6 = [<View4 style={[styles.collapsedHeaderBannerOverlay, value12.style]} pointerEvents="none" />];
items6[1] = ((Component) => <Component onPress={onPressBack} />)(importDefault(11673) /* metro dependency 11673: AppLauncherBackButton */);
const View5 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const nameStyle = value11.nameStyle;
const Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
items6[2] = <View5 style={nameStyle} pointerEvents="none"><Heading variant="heading-lg/bold" color="white">{r21}</Heading></View5>;
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
items6[3] = <Spacer size={32} pointerEvents="none" />;
items3[1] = <View3 style={items4} pointerEvents="box-none">{items6}</View3>;
if (application != null) {
moduleValue6 = require(8046) /* metro dependency 8046: AppLauncherUtils */;
if (moduleValue6.isRealApplication(application)) {
var viewBindingProps = {style: styles.actionsWrapper};
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
var iconButtonProps = {'size': 'sm', 'variant': 'secondary-overlay',
icon: importDefault(4057) /* metro dependency 4057 */, onPress: onPress_89490};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XWDihq);
iconButtonProps.maxFontSizeMultiplier = 1.5;
r5 = <View {...viewBindingProps}><IconButton {...iconButtonProps} />{((Component) => <Component application={application} onAddAppMenuClick={onAddAppMenuClick} />)(importDefault(11674) /* metro dependency 11674: AppDetailsOverflowMenu */)}</View>;
function Header_89481({application, onPressBack, scrollOffsetY, onAddAppMenuClick}) { // fn#89481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:2268, offset: 0x0200fc1d, size: 1272 bytes, params: 2, frame: 35
var moduleValue5;
var moduleValue6;
var IconButton;
var object;
var intl;
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppLauncherStore], function() {
return AppLauncherStore.entrypoint();
});
const styles = useStyles();
let r5 = application != null ? (require(11592) /* metro dependency 11592: AppLauncherNativeUtils */).getAppLauncherIconSource(application) : null;
const useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const value5 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOW]);
const defaultImport = UseAvatarColor;
const r2 = typeof r5 === 'number' ? r5 : r5?.uri;
const value6 = '';
const value7 = defaultImport(r2, value5 ?? value6);
const r20 = (
r5 != null
? ((Component) => <Component iconSource={r5} iconBorderRadius={xl} iconSize={72} />)(importDefault(11597) /* metro dependency 11597: EntityBorderAppIcon */)
: (
<View style={styles.loadingIcon} />
)
);
const value10 = _fun89483({scrollOffsetY: scrollOffsetY});
const value11 = _fun89485({scrollOffsetY: scrollOffsetY});
const value12 = _fun89488({scrollOffsetY: scrollOffsetY});
const r21 = application != null ? (require(8046) /* metro dependency 8046: AppLauncherUtils */).getSectionName(application) : value6;
let r0 = application != null && 'flags' in application;
if (r0) {
moduleValue5 = require(7504) /* metro dependency 7504: ApplicationFlagUtils */;
r0 = moduleValue5.hasApplicationFlag(application, ApplicationFlags.EMBEDDED);
}
const env0_3 = UserStore.getCurrentUser();
const View2 = (ReanimatedRexport).View;
const items2 = [styles.headerContainer];
items2[1] = value10.style;
const items3 = [
<View style={[styles.expandedHeaderBanner, {backgroundColor: value7}]} pointerEvents="none">
<View style={styles.appIconMask}>
{r20}
</View>
</View>,
];
const View3 = (ReanimatedRexport).View;
const items4 = [styles.collapsedHeaderBanner];
items4[1] = {backgroundColor: value7};
items4[2] = value11.headerStyle;
const View4 = (ReanimatedRexport).View;
const items6 = [
<View4 style={[styles.collapsedHeaderBannerOverlay, value12.style]} pointerEvents="none" />,
];
items6[1] = ((Component) => <Component onPress={onPressBack} />)(importDefault(11673) /* metro dependency 11673: AppLauncherBackButton */);
const View5 = (ReanimatedRexport).View;
const nameStyle = value11.nameStyle;
const Heading = (TextModule).Heading;
items6[2] = (
<View5 style={nameStyle} pointerEvents="none">
<Heading variant="heading-lg/bold" color="white">
{r21}
</Heading>
</View5>
);
const Spacer = (NativeModule).Spacer;
items6[3] = <Spacer size={32} pointerEvents="none" />;
items3[1] = (
<View3 style={items4} pointerEvents="box-none">
{items6}
</View3>
);
if (application != null) {
moduleValue6 = require(8046) /* metro dependency 8046: AppLauncherUtils */;
if (moduleValue6.isRealApplication(application)) {
var viewBindingProps = {style: styles.actionsWrapper};
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
var iconButtonProps = {'size': 'sm', 'variant': 'secondary-overlay',
icon: importDefault(4057) /* metro dependency 4057 */, onPress: onPress_89490};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
iconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XWDihq);
iconButtonProps.maxFontSizeMultiplier = 1.5;
r5 = (
<View {...viewBindingProps}>
<IconButton {...iconButtonProps} />
{((Component) => <Component application={application} onAddAppMenuClick={onAddAppMenuClick} />)(importDefault(11674) /* metro dependency 11674: AppDetailsOverflowMenu */)}
</View>
);
} else {
r5 = null;
}
} else {
r5 = null;
}
} else {
r5 = null;
items3[2] = r5;
return (
<View2 style={items2} pointerEvents="box-none">
{items3}
</View2>
);
function _fun89483({scrollOffsetY}) { // fn#89483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:2690, offset: 0x02010128, size: 133 bytes, params: 2, frame: 19
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const n_894842 = n_89484;
const object2 = {};
object2.interpolate = ReanimatedRexportModule.interpolate;
object2.scrollOffsetY = scrollOffsetY;
object2.HEADER_SCROLL_RANGE = 105;
n_894842.__closure = object2;
n_894842.__workletHash = 2572905048492;
n_894842.__initData = env1_12;
return {style: Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [n_894842])};
function n_89484() { // fn#89484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:2760, offset: 0x020101ad, size: 124 bytes, params: 1, frame: 19
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return {transform: [{translateY: value.interpolate(scrollOffsetY.get(), [0, 105], [0, -105], 'clamp')}]};
}
}
function _fun89485({scrollOffsetY}) { // fn#89485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:3002, offset: 0x02010229, size: 230 bytes, params: 2, frame: 22
const object = {};
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = n_89486;
const interpolate = ReanimatedRexportModule.interpolate;
closure.__closure = {interpolate: interpolate, scrollOffsetY: scrollOffsetY, HEADER_SCROLL_RANGE: 105};
closure.__workletHash = 8190094903650;
closure.__initData = env1_13;
object.headerStyle = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = l_89487;
closure.__closure = {interpolate: interpolate, scrollOffsetY: scrollOffsetY, HEADER_SCROLL_RANGE: 105};
closure.__workletHash = 14190901941859;
closure.__initData = env1_14;
object.nameStyle = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
return object;
function n_89486() { // fn#89486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:3080, offset: 0x0201030f, size: 118 bytes, params: 1, frame: 19
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return {transform: [{translateY: value.interpolate(scrollOffsetY.get(), [0, 105], [0, 105], 'clamp')}]};
}
function l_89487() { // fn#89487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:3333, offset: 0x02010385, size: 176 bytes, params: 1, frame: 25
const object = {};
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const scrollOffsetYBinding = scrollOffsetY;
object.transform = [{translateY: Reflect.apply(interpolate, value, [scrollOffsetYBinding.get(), [52.5, 105], [16,
0], 'clamp'])}];
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object.opacity = value.interpolate(scrollOffsetYBinding.get(), [52.5, 105], [0, 1], 'clamp');
return object;
}
}
function _fun89488({scrollOffsetY}) { // fn#89488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:3636, offset: 0x02010435, size: 133 bytes, params: 2, frame: 19
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const n_894892 = n_89489;
const object2 = {};
object2.interpolate = ReanimatedRexportModule.interpolate;
object2.scrollOffsetY = scrollOffsetY;
object2.HEADER_SCROLL_RANGE = 105;
n_894892.__closure = object2;
n_894892.__workletHash = 9589752719246;
n_894892.__initData = env1_15;
return {style: Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [n_894892])};
function n_89489() { // fn#89489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:3706, offset: 0x020104ba, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return {opacity: value.interpolate(scrollOffsetY.get(), [52.5, 105], [0, 0.5], 'clamp')};
}
}
function Header_89481OnPress() { // fn#89490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:4853, owner: Header_89481.onPress, offset: 0x0201051a, size: 272 bytes, params: 1, frame: 21
var r2;
var getApplicationInstallURL;
var moduleValue3;
var getActivityLaunchURL;
const value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[22]);
const track = defaultImport.track;
const APP_LAUNCHER_APPLICATION_LINK_COPIED = AnalyticEvents.APP_LAUNCHER_APPLICATION_LINK_COPIED;
let object = {};
let id = application.id;
object.application_id = id;
object.source = env0_1;
Reflect.apply(track, defaultImport, [APP_LAUNCHER_APPLICATION_LINK_COPIED, object]);
const moduleValue = require(dependencyMap[23]);
const copy = moduleValue.copy;
const binding = env0_2;
const moduleValue2 = require(dependencyMap[24]);
if (binding) {
getActivityLaunchURL = moduleValue2.getActivityLaunchURL;
object = {};
id = application.id;
object.applicationId = id;
id = env0_3 == null ? value2 : env0_3.id;
object.referrerId = id;
r2 = Reflect.apply(getActivityLaunchURL, moduleValue2, [object]);
} else {
getApplicationInstallURL = moduleValue2.getApplicationInstallURL;
object = {};
applicationBinding = application;
object.id = applicationBinding.id;
moduleValue3 = require(dependencyMap[15]);
copyDataProperties(object, moduleValue3.getInstallAppProps(applicationBinding), dependencyMap);
r2 = Reflect.apply(getApplicationInstallURL, moduleValue2, [object]);
}
Reflect.apply(copy, moduleValue, [r2]);
require(dependencyMap[25]).presentLinkCopied();
return value2;
}
}
items3[2] = r5;
return (
<View2 style={items2} pointerEvents="box-none">
{items3}
</View2>
);
}
function _fun89483({scrollOffsetY}) { // fn#89483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:2690, offset: 0x02010128, size: 133 bytes, params: 2, frame: 19
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = n_89484;
const object = {};
object.interpolate = reanimatedRexportModule.interpolate;
object.scrollOffsetY = scrollOffsetY;
object.HEADER_SCROLL_RANGE = 105;
closure.__closure = object;
closure.__workletHash = 2572905048492;
closure.__initData = env1_12;
return {style: Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure])};
}
function _fun89485({scrollOffsetY}) { // fn#89485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:3002, offset: 0x02010229, size: 230 bytes, params: 2, frame: 22
const object2 = {};
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = n_89486;
const interpolate = reanimatedRexportModule.interpolate;
closure.__closure = {interpolate: interpolate, scrollOffsetY: scrollOffsetY, HEADER_SCROLL_RANGE: 105};
closure.__workletHash = 8190094903650;
closure.__initData = env1_13;
object2.headerStyle = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
useAnimatedStyle = moduleValue2.useAnimatedStyle;
closure = l_89487;
closure.__closure = {interpolate: interpolate, scrollOffsetY: scrollOffsetY, HEADER_SCROLL_RANGE: 105};
closure.__workletHash = 14190901941859;
closure.__initData = env1_14;
object2.nameStyle = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
return object2;
}
function _fun89488({scrollOffsetY}) { // fn#89488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:3636, offset: 0x02010435, size: 133 bytes, params: 2, frame: 19
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = n_89489;
const object = {};
object.interpolate = reanimatedRexportModule.interpolate;
object.scrollOffsetY = scrollOffsetY;
object.HEADER_SCROLL_RANGE = 105;
closure.__closure = object;
closure.__workletHash = 9589752719246;
closure.__initData = env1_15;
return {style: Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure])};
}
function Header_89481OnPress() { // fn#89490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:4853, owner: Header_89481.onPress, offset: 0x0201051a, size: 272 bytes, params: 1, frame: 21
var r2;
var getApplicationInstallURL;
var moduleValue3;
var getActivityLaunchURL;
const value = environment.__proto__;
const value2 = undefined;
const defaultImport = importDefault(dependencyMap[22]);
const track = defaultImport.track;
const APP_LAUNCHER_APPLICATION_LINK_COPIED = AnalyticEvents.APP_LAUNCHER_APPLICATION_LINK_COPIED;
let object2 = {};
let id = application.id;
object2.application_id = id;
object2.source = env0_1;
Reflect.apply(track, defaultImport, [APP_LAUNCHER_APPLICATION_LINK_COPIED, object2]);
const moduleValue = require(dependencyMap[23]);
const copy = moduleValue.copy;
const binding = env0_2;
const moduleValue2 = require(dependencyMap[24]);
if (binding) {
getActivityLaunchURL = moduleValue2.getActivityLaunchURL;
object2 = {};
id = application.id;
object2.applicationId = id;
id = env0_3 == null ? value2 : env0_3.id;
object2.referrerId = id;
r2 = Reflect.apply(getActivityLaunchURL, moduleValue2, [object2]);
} else {
getApplicationInstallURL = moduleValue2.getApplicationInstallURL;
object2 = {};
applicationBinding = application;
object2.id = applicationBinding.id;
moduleValue3 = require(dependencyMap[15]);
copyDataProperties(object2, moduleValue3.getInstallAppProps(applicationBinding), dependencyMap);
r2 = Reflect.apply(getApplicationInstallURL, moduleValue2, [object2]);
}
Reflect.apply(copy, moduleValue, [r2]);
require(dependencyMap[25]).presentLinkCopied();
return value2;
}
function n_89484() { // fn#89484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:2760, offset: 0x020101ad, size: 124 bytes, params: 1, frame: 19
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return {transform: [{translateY: value.interpolate(scrollOffsetY.get(), [0, 105], [0, -105], 'clamp')}]};
}
function n_89486() { // fn#89486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:3080, offset: 0x0201030f, size: 118 bytes, params: 1, frame: 19
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return {transform: [{translateY: value.interpolate(scrollOffsetY.get(), [0, 105], [0, 105], 'clamp')}]};
}
function l_89487() { // fn#89487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:3333, offset: 0x02010385, size: 176 bytes, params: 1, frame: 25
const object2 = {};
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const scrollOffsetYBinding = scrollOffsetY;
object2.transform = [{translateY: Reflect.apply(interpolate, value, [scrollOffsetYBinding.get(), [52.5, 105], [16,
0], 'clamp'])}];
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.opacity = value.interpolate(scrollOffsetYBinding.get(), [52.5, 105], [0, 1], 'clamp');
return object2;
}
function n_89489() { // fn#89489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11858:3706, offset: 0x020104ba, size: 96 bytes, params: 1, frame: 18
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return {opacity: value.interpolate(scrollOffsetY.get(), [52.5, 105], [0, 0.5], 'clamp')};
}
global.__d(_fun89480, 11672, [31, 27, 1878, 8047, 1483, 661, 33, 697, 4501, 4017, 566, 11592, 3860, 8372, 11597,
8046, 7504, 11673, 4573, 1305, 8341, 4057, 683, 6797, 8809, 3856, 1244, 11674,
2]) /* metro module 11672, dependencies: [31, 27, 1878, 8047, 1483, 661, 33, 697, 4501, 4017, 566, 11592, 3860, 8372, 11597, 8046, 7504, 11673, 4573, 1305, 8341, 4057, 683, 6797, 8809, 3856, 1244, 11674, 2] */;
@@ -1,86 +1,93 @@
/* Metro module 11625; source: modules/app_launcher/native/screens/application_view/activity/HeroMedia.tsx; dependencies: [31, 4502, 1483, 6276, 33, 4501, 8775, 10718, 566, 6777, 11599, 9543, 1244, 2] */
import AccessibilityStore from '../../../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseEmbeddedActivityBackground from '../../../../../activities/utils/useEmbeddedActivityBackground.tsx'; /* Metro dependency 10718 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AppLauncherNativeConstantsModule from '../../../AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ActionSheetConstantsModule from '../../../../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as UseGetOrFetchApplicationsModule from '../../../../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
function _fun89187(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11811:6, offset: 0x02003315, size: 258 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = useHeroMediaDimensions;
const useHeroMediaDimensions2 = useHeroMediaDimensions;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const env0_4 = (require(1483) /* metro dependency 1483: AppLauncherNativeConstants */).DEFAULT_CONTENT_PADDING;
const env0_5 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({mediaBackground: {backgroundColor: 'black'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/application_view/activity/HeroMedia.tsx');
ReactModule;
const env0_7 = (CreateStylesModule).createStyles({mediaBackground: {backgroundColor: 'black'}});
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/application_view/activity/HeroMedia.tsx');
exports.default = HeroMedia_89189;
exports.useHeroMediaDimensions = closure;
}
exports.useHeroMediaDimensions = useHeroMediaDimensions2;
function useHeroMediaDimensions() { // fn#89188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11811:263, offset: 0x02003417, size: 145 bytes, params: 1, frame: 15
let value = a0;
const width = (value !== undefined ? value : {}).width;
value = (width ?? global.Math.min(width ?? (require(8775) /* metro dependency 8775: useDefaultAppLauncherWidth */).useDefaultAppLauncherWidth(),
ACTION_SHEET_MAX_WIDTH)) - 2 * DEFAULT_CONTENT_PADDING;
const object = {width: value};
const Math = global.Math;
object.height = Math.floor(9 * value / 16);
return object;
}
function useHeroMediaDimensions() { // fn#89188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11811:263, offset: 0x02003417, size: 145 bytes, params: 1, frame: 15
let value = a0;
const width = (value !== undefined ? value : {}).width;
value = (width ?? global.Math.min(width ?? (require(8775) /* metro dependency 8775: useDefaultAppLauncherWidth */).useDefaultAppLauncherWidth(),
ACTION_SHEET_MAX_WIDTH)) - 2 * DEFAULT_CONTENT_PADDING;
const object2 = {width: value};
const Math = global.Math;
object2.height = Math.floor(9 * value / 16);
return object2;
}
function HeroMedia_89189({applicationId, containerHeight, width}) { // fn#89189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11811:560, offset: 0x020034a8, size: 602 bytes, params: 2, frame: 28
var object2;
var r0;
var value9;
var Video;
var height;
var intl;
var mediaBackground;
var value;
const styles = useStyles();
const value3 = useHeroMediaDimensions({width: width});
const defaultImport = importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */;
object2 = {applicationId: applicationId};
object2.size = value3.width;
object2.names = ['embedded_cover'];
const value4 = defaultImport(object2);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
}, []);
const value6 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(applicationId);
const embeddedActivityConfig = value6?.embeddedActivityConfig;
const r14 = embeddedActivityConfig?.activity_preview_video_asset_id != null ? (importDefault(11599) /* metro dependency 11599: getPreviewVideoAssetUrl */)(applicationId,
embeddedActivityConfig.activity_preview_video_asset_id) : null;
if (r14 == null) {
r0 = null;
} else {
value9 = '';
if (value9 === r14) {
function HeroMedia_89189({applicationId, containerHeight, width}) { // fn#89189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11811:560, offset: 0x020034a8, size: 602 bytes, params: 2, frame: 28
var r0;
var value9;
var Video;
var height;
var intl;
var mediaBackground;
var value;
const styles = useStyles();
const value3 = useHeroMediaDimensions({width: width});
const defaultImport = UseEmbeddedActivityBackground;
object = {applicationId: applicationId};
object.size = value3.width;
object.names = ['embedded_cover'];
const value4 = defaultImport(object);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.useReducedMotion;
}, []);
const value6 = (UseGetOrFetchApplicationsModule).useGetOrFetchApplication(applicationId);
const embeddedActivityConfig = value6?.embeddedActivityConfig;
const r14 = embeddedActivityConfig?.activity_preview_video_asset_id != null ? (importDefault(11599) /* metro dependency 11599: getPreviewVideoAssetUrl */)(applicationId,
embeddedActivityConfig.activity_preview_video_asset_id) : null;
if (r14 == null) {
r0 = null;
} else {
Video = importDefault(9543) /* metro dependency 9543: Video */;
var videoProps = {muted: true, paused: value5,
src: r14 == null ? {uri: value4.url ?? value9} : value9 !== r14 ? {videoURI: r14} : {uri: value4.url ?? value9}};
height = value3.height;
videoProps.height = height;
videoProps.width = value3.width;
videoProps.poster = value4.url;
videoProps.resizeMode = 'cover';
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
videoProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['Af+EQD'],
{applicationName: value6?.name ?? value9});
mediaBackground = styles.mediaBackground;
height = value3.height;
value = containerHeight != null;
videoProps.style = [mediaBackground, {maxHeight: height},
value && ({transform: [{translateY: (containerHeight - value3.height) / 2}]})];
mediaBackground = styles.mediaBackground;
videoProps.videoStyle = mediaBackground;
videoProps.postponeRender = false;
value = <Video {...videoProps} />;
r0 = value;
value9 = '';
if (value9 === r14) {
r0 = null;
} else {
Video = importDefault(9543) /* metro dependency 9543: Video */;
var videoProps = {muted: true, paused: value5,
src: r14 == null ? {uri: value4.url ?? value9} : value9 !== r14 ? {videoURI: r14} : {uri: value4.url ?? value9}};
height = value3.height;
videoProps.height = height;
videoProps.width = value3.width;
videoProps.poster = value4.url;
videoProps.resizeMode = 'cover';
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
videoProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['Af+EQD'],
{applicationName: value6?.name ?? value9});
mediaBackground = styles.mediaBackground;
height = value3.height;
value = containerHeight != null;
videoProps.style = [mediaBackground, {maxHeight: height},
value && ({transform: [{translateY: (containerHeight - value3.height) / 2}]})];
mediaBackground = styles.mediaBackground;
videoProps.videoStyle = mediaBackground;
videoProps.postponeRender = false;
value = <Video {...videoProps} />;
r0 = value;
}
}
return r0;
}
return r0;
}
global.__d(_fun89187, 11625, [31, 4502, 1483, 6276, 33, 4501, 8775, 10718, 566, 6777, 11599, 9543, 1244,
2]) /* metro module 11625, dependencies: [31, 4502, 1483, 6276, 33, 4501, 8775, 10718, 566, 6777, 11599, 9543, 1244, 2] */;
@@ -1,429 +1,517 @@
/* Metro module 11671; source: modules/app_launcher/native/screens/application_view/app/AppDetailContent.tsx; dependencies: [5, 31, 27, 7861, 1483, 661, 5066, 33, 4501, 11672, 697, 11595, 6238, 8774, 11646, 5065, 10658, 4584, 1585, 8060, 1909, 11675, 8046, 5068, 11592, 1478, 11577, 477, 11677, 4573, 1244, 10358, 11643, 11679, 9392, 1305, 11685, 11687, 4080, 4863, 8870, 2] */
import Module00005 from '../../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import UseWindowDimensionsNative from '../../../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseKeyboardActionSheetHeight from '../../../../../action_sheet/native/useKeyboardActionSheetHeight.tsx'; /* Metro dependency 11577 */
import AppLauncherFlashList from '../../../base_components/AppLauncherFlashList.tsx'; /* Metro dependency 11643 */
import UseSortedSectionCommands from '../../../../hooks/useSortedSectionCommands.tsx'; /* Metro dependency 11675 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ServerModule from '../../../../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as TextModule from '../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseFontScaleModule from '../../../../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as ApplicationCommandConstantsModule from '../../../../../application_commands/ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as TableRowNativeModule from '../../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as ApplicationCommandIndexStoreModule from '../../../../../application_commands/ApplicationCommandIndexStore.tsx'; /* Metro dependency 7861 */
import * as ApplicationCommandQueryApiModule from '../../../../../application_commands/ApplicationCommandQueryApi.tsx'; /* Metro dependency 8060 */
import * as AppLauncherContextModule from '../../../AppLauncherContext.tsx'; /* Metro dependency 8774 */
import * as AppLauncherNativeUtilsModule from '../../../AppLauncherNativeUtils.tsx'; /* Metro dependency 11592 */
import * as UsePlaceholderSizeModule from '../../../hooks/usePlaceholderSize.tsx'; /* Metro dependency 11595 */
import * as AppLauncherFlashListModule from '../../../base_components/AppLauncherFlashList.tsx'; /* Metro dependency 11643 */
import * as HeaderModule from '../Header.tsx'; /* Metro dependency 11672 */
function _fun89456(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:6, offset: 0x0200e265, size: 936 bytes, params: 8, frame: 30
var object2;
const env0_0 = require;
const closure = CommandRow_89458;
const CommandRow_894582 = CommandRow_89458;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
let value = require(7861) /* metro dependency 7861: ApplicationCommandIndexStore */;
let value = ApplicationCommandIndexStoreModule;
const env0_7 = value.useContextIndexState;
const env0_8 = value.useUserIndexState;
value = require(1483) /* metro dependency 1483: AppLauncherNativeConstants */;
const DEFAULT_CONTENT_PADDING = value.DEFAULT_CONTENT_PADDING;
const env0_10 = value.useAppLauncherNavigation;
const env0_11 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_12 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).DISCOVERY_COMMANDS_QUERY_LIMIT;
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
const env0_15 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const EXPANDED_HEADER_HEIGHT = (require(11672) /* metro dependency 11672: Header */).EXPANDED_HEADER_HEIGHT;
const SHEET_HANDLE_CONTAINER_HEIGHT = (require(11672) /* metro dependency 11672: Header */).SHEET_HANDLE_CONTAINER_HEIGHT;
object2.headerSpacer = {height: EXPANDED_HEADER_HEIGHT - SHEET_HANDLE_CONTAINER_HEIGHT};
object2.list = {paddingHorizontal: DEFAULT_CONTENT_PADDING};
object2.commandsHeaderContainer = {'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'center', 'marginBottom': 8};
object2.commandsHeaderTextContainer = {'alignItems': 'center', 'flexDirection': 'row', 'gap': 8};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.viewContainerStyle = object3;
object = {};
const EXPANDED_HEADER_HEIGHT = (HeaderModule).EXPANDED_HEADER_HEIGHT;
const SHEET_HANDLE_CONTAINER_HEIGHT = (HeaderModule).SHEET_HANDLE_CONTAINER_HEIGHT;
object.headerSpacer = {height: EXPANDED_HEADER_HEIGHT - SHEET_HANDLE_CONTAINER_HEIGHT};
object.list = {paddingHorizontal: DEFAULT_CONTENT_PADDING};
object.commandsHeaderContainer = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
'marginBottom': 8};
object.commandsHeaderTextContainer = {'alignItems': 'center', 'flexDirection': 'row', 'gap': 8};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.viewContainerStyle = object4;
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object2.mainContainerStyle = {'backgroundColor': null, 'paddingHorizontal': 12, 'paddingVertical': 16,
object.mainContainerStyle = {'backgroundColor': null, 'paddingHorizontal': 12, 'paddingVertical': 16,
backgroundColor: CARD_BACKGROUND_DEFAULT};
object2.expandDescriptionCTAStyle = {'right': 16, 'bottom': 16};
object.expandDescriptionCTAStyle = {'right': 16, 'bottom': 16};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.monetizationDisclosureTextStyle = {marginLeft: PX_4};
const object5 = {'flexDirection': 'row', 'alignItems': 'center'};
object.monetizationDisclosureTextStyle = {marginLeft: PX_4};
const object7 = {'flexDirection': 'row', 'alignItems': 'center'};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.marginBottom = PX_24;
object7.marginBottom = PX_24;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.gap = PX_16;
object2.monetizationDisclosureContainerStyle = object5;
object2.monetizationDisclosureStyle = {'flexDirection': 'row', 'alignItems': 'center'};
const object6 = {'backgroundColor': null, 'height': 16, 'marginBottom': 4, 'borderRadius': null,
object7.gap = PX_16;
object.monetizationDisclosureContainerStyle = object7;
object.monetizationDisclosureStyle = {'flexDirection': 'row', 'alignItems': 'center'};
const object8 = {'backgroundColor': null, 'height': 16, 'marginBottom': 4, 'borderRadius': null,
'alignSelf': 'flex-start'};
let BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object6.backgroundColor = BACKGROUND_MOD_SUBTLE;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.loadingTextPlaceholder = object6;
const object10 = {};
object8.backgroundColor = BACKGROUND_MOD_SUBTLE;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.loadingTextPlaceholder = object8;
const object9 = {};
BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object10.backgroundColor = BACKGROUND_MOD_SUBTLE;
object10.height = 16;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object10.alignSelf = 'flex-start';
object2.loadingTextPlaceholderSmall = object10;
object2.noCommandsTextContainer = {alignItems: 'center'};
const env0_16 = Reflect.apply(createStyles, value, [object2]);
object2 = {PLACEHOLDER: 0};
object2[0] = 'PLACEHOLDER';
object2.COMMAND = 1;
object2[1] = 'COMMAND';
object9.backgroundColor = BACKGROUND_MOD_SUBTLE;
object9.height = 16;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object9.alignSelf = 'flex-start';
object.loadingTextPlaceholderSmall = object9;
object.noCommandsTextContainer = {alignItems: 'center'};
const env0_16 = Reflect.apply(createStyles, value, [object]);
object = {PLACEHOLDER: 0};
object[0] = 'PLACEHOLDER';
object.COMMAND = 1;
object[1] = 'COMMAND';
const Array = global.Array;
const array = new Array(6);
const fill = array.fill;
const PLACEHOLDER = object2.PLACEHOLDER;
const PLACEHOLDER = object.PLACEHOLDER;
const env0_18 = Reflect.apply(fill, array, [{type: PLACEHOLDER}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/AppDetailContent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/AppDetailContent.tsx');
exports.default = AppDetailContent;
exports.BETWEEN_SECTIONS_MARGIN = 24;
exports.CommandRow = closure;
}
function PlaceholderCommandRow_89457({isFirstRow, isLastRow}) { // fn#89457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:1665, offset: 0x0200e60d, size: 294 bytes, params: 2, frame: 28
isFirstRow = !(isFirstRow === undefined) && isFirstRow;
isLastRow = !(isLastRow === undefined) && isLastRow;
const styles = useStyles();
const value2 = (require(11595) /* metro dependency 11595: usePlaceholderSize */).usePlaceholderWidth(10, 50);
const value3 = (require(11595) /* metro dependency 11595: usePlaceholderSize */).usePlaceholderWidth(30, 90);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={<View style={[styles.loadingTextPlaceholder, {width: '' + value2 + '%'}]} />}
subLabel={<View style={[styles.loadingTextPlaceholderSmall, {width: '' + value3 + '%'}]} />}
subLabelLineClamp={1}
start={isFirstRow}
end={isLastRow}
/>
);
}
function CommandRow_89458({command, onPressCommand, isFirstRow, isLastRow, context, onExecuteCommand, section, location, installOnDemand, sectionName, icon}) { // fn#89458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:2012, offset: 0x0200e733, size: 333 bytes, params: 2, frame: 25
const appLauncherContextModule = require(8774) /* metro dependency 8774: AppLauncherContext */;
const useAppLauncherContext = appLauncherContextModule.useAppLauncherContext;
const env0_6 = Reflect.apply(useAppLauncherContext, appLauncherContextModule, []).entrypoint;
useUserIndexState(true, true);
useContextIndexState(context, true, true);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
start={isFirstRow}
end={isLastRow}
label={command.displayName}
labelLineClamp={1}
subLabel={command.displayDescription}
subLabelLineClamp={1}
icon={icon}
onPress={function() {
return onPressCommand(command, section, location);
}}
trailing={((Component) => <Component command={command} context={context} beforeExecuteCommand={beforeExecuteCommand} onExecuteCommand={onExecuteCommand} tryExecuteCommand={installOnDemand ? _fun89461() : undefined} sectionName={sectionName} />)(importDefault(11646) /* metro dependency 11646: CommandRowButton */)}
/>
);
}
function AppDetailContent({context, application, lockableScrollableContentOffsetY, onPressBack, installOnDemand, sectionName, onActivityItemSelected, entrypoint, onCommandExecuted, onAauth2Cancel}) { // fn#89465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:3114, offset: 0x0200e9e2, size: 2184 bytes, params: 2, frame: 58
var moduleValue4;
var moduleValue7;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items3;
const env0_5 = onCommandExecuted;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const {chatInputRef,
keyboardCloseReasonRef} = (require(8774) /* metro dependency 8774: AppLauncherContext */).useRequiredAppLauncherContext();
const value4 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const Math = global.Math;
const value6 = 60 + Math.max(36 * value4 - 36, 0);
const applicationCommandQueryApiModule = importAll(8060) /* metro dependency 8060: ApplicationCommandQueryApi */;
const useDiscovery = applicationCommandQueryApiModule.useDiscovery;
const object2 = {context: context};
const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
object2.filters = {commandTypes: [CHAT]};
object2.options = {'placeholderCount': 0, 'limit': null, 'includeFrecency': true,
limit: DISCOVERY_COMMANDS_QUERY_LIMIT, allowApplicationState: installOnDemand, installOnDemand: installOnDemand,
applicationId: application.id};
object2.allowFetch = true;
const {filterSection, commandsByActiveSection, sectionDescriptors, loading} = Reflect.apply(useDiscovery,
applicationCommandQueryApiModule, [object2]);
const value8 = (importDefault(11675) /* metro dependency 11675: useSortedSectionCommands */)({sectionId: application.id,
commandsByActiveSection: commandsByActiveSection});
const sortOrder = value8.sortOrder;
const env0_13 = value8.setSortOrder;
const commands = value8.commands;
const canSort = value8.canSort;
const result = useUserIndexState(true, true).result;
const value10 = (result == null ? undefined : result.sections[application.id]) == null;
const value11 = !loading;
const r26 = loading ? value11 : commands.length === 0;
let r9 = r26 && value10;
if (r9) {
moduleValue4 = require(8046) /* metro dependency 8046: AppLauncherUtils */;
r9 = !moduleValue4.isEmbeddedApp(application);
}
const binding = env0_5;
const value14 = binding.useMemo(_fun89466, [loading, commands, context.type]);
binding.useEffect(function() {
filterSection(application.id);
}, [application.id, filterSection]);
const value16 = binding.useCallback(_fun89469, [context, entrypoint, installOnDemand, useAppLauncherNavigation(),
onCommandExecuted, sectionDescriptors, sectionName]);
const value17 = binding.useCallback(function() {
var current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
}
keyboardCloseReasonRef.current = require(dependencyMap[13]).AppLauncherKeyboardCloseReason.COMMAND;
if (onCommandExecuted != null) {
onCommandExecuted();
}
}, [chatInputRef, keyboardCloseReasonRef, onCommandExecuted]);
const value18 = sectionDescriptors.find(function({id}) {
return id === application.id;
});
const value19 = binding.useCallback(_fun89472, [value16, commands.length, context, value17, value18,
installOnDemand, sectionName]);
const value20 = bottom + DEFAULT_CONTENT_PADDING;
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const maximum = (importDefault(11577) /* metro dependency 11577: useKeyboardActionSheetHeight */)().maximum;
const value21 = binding.useMemo(_fun89473, [application, styles.monetizationDisclosureContainerStyle,
styles.monetizationDisclosureStyle, styles.monetizationDisclosureTextStyle]);
const value22 = binding.useMemo(_fun89474, [value20, styles.list]);
const value23 = binding.useMemo(_fun89475, [value20]);
const value24 = binding.useMemo(function() {
return {width: width, height: maximum};
}, [width, maximum]);
const value25 = (require(11643) /* metro dependency 11643: AppLauncherFlashList */).useAppLauncherFlashListProps();
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const AppLauncherFlashList = importDefault(11643) /* metro dependency 11643: AppLauncherFlashList */;
const items2 = [<View style={styles.headerSpacer} />];
items2[1] = (require(8046) /* metro dependency 8046: AppLauncherUtils */).isEmbeddedApp(application) ? ((Component) => <Component application={application} context={context} sectionName={sectionName} onActivityItemSelected={onActivityItemSelected} entrypoint={entrypoint} hasCommands={commands.length > 0} />)(importDefault(11679) /* metro dependency 11679: ActivityDetailContent */) : ((Component) => <Component application={application} viewContainerStyle={styles.viewContainerStyle} mainContainerStyle={styles.mainContainerStyle} expandDescriptionCTAStyle={styles.expandDescriptionCTAStyle} />)(importDefault(9392) /* metro dependency 9392: DetailsHeader */);
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
const PX_16 = value21 == null ? 24 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[2] = <Spacer size={PX_16} />;
items2[3] = value21;
let r24 = commands.length > 1 && value11 && context.type === 'channel' && ((Component) => <Component context={context} allCommands={commands} onPressCommand={value16} section={value18} onExecuteCommand={value17} installOnDemand={installOnDemand} sectionName={sectionName} />)(importDefault(11685) /* metro dependency 11685: FrecencyCommandsSection */);
items2[4] = r24;
if (r26) {
moduleValue7 = require(8046) /* metro dependency 8046: AppLauncherUtils */;
r24 = moduleValue7.isEmbeddedApp(application) ? null : <View style={styles.noCommandsTextContainer}>{((Text) => <Text variant="text-sm/normal" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['w8+YDM'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
} else {
r24 = null;
}
items2[5] = r24;
if (r26) {
r24 = null;
} else if (context.type !== 'channel') {
r24 = null;
} else {
var viewBindingProps = {style: styles.commandsHeaderContainer};
items3 = [<View style={styles.commandsHeaderTextContainer}>{((Heading) => <Heading variant="text-md/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GOXqks)}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading)}</View>];
items3[1] = canSort && ((Component) => <Component sortOrder={sortOrder} onSortOptionPress={function(a0) {
setSortOrder(a0);
}} />)(importDefault(11687) /* metro dependency 11687: CommandListSortButton */);
r24 = <View {...viewBindingProps}>{items3}</View>;
}
items2[6] = r24;
return (
<>
<AppLauncherFlashList
ListHeaderComponent={<>{items2}</>}
contentContainerStyle={value22}
scrollIndicatorInsets={value23}
renderItem={value19}
data={value14}
estimatedItemSize={value6}
estimatedListSize={value24}
preserveScrollMomentum
lockableScrollableContentOffsetY={lockableScrollableContentOffsetY}
automaticallyAdjustsScrollIndicatorInsets={false}
keyboardDismissMode="none"
animatedOnScroll={value25.onScroll}
ref={value25.scrollerRef}
simultaneousHandlers={value25.gestureRef}
animatedProps={value25.animatedProps}
key={loading ? 'loading' : undefined}
/>
{((Component) => <Component application={application} onPressBack={onPressBack} scrollOffsetY={lockableScrollableContentOffsetY} showsAddCTA={r9} onAddAppMenuClick={onAddAppMenuClick} />)(importDefault(11672) /* metro dependency 11672: Header */)}
</>
);
}
function beforeExecuteCommand() { // fn#89460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:2465, owner: CommandRow_89458.beforeExecuteCommand, offset: 0x0200e89e, size: 98 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
const trackCommandSelected = value.trackCommandSelected;
const object2 = {};
object2.command = command;
object2.location = location;
object2.triggerSection = (require(5065) /* metro dependency 5065: ApplicationCommandUtils */).getCommandTriggerSection(section);
object2.sectionName = sectionName;
return Reflect.apply(trackCommandSelected, value, [object2]);
}
function _fun89461() { // fn#89461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:2628, offset: 0x0200e900, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun89463);
return _fun89464;
}
function _fun89466() { // fn#89466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:4086, offset: 0x0200f26a, size: 67 bytes, params: 1, frame: 11
return context.type !== 'channel' ? [] : loading ? env1_18 : commands.map(_fun89467);
}
function _fun89469(a0, a1) { // fn#89469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:4237, offset: 0x0200f2e3, size: 176 bytes, params: 3, frame: 14
let value = a2;
const r4 = value !== undefined ? value : (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW;
value = environment.__proto__;
(require(11592) /* metro dependency 11592: AppLauncherNativeUtils */).handleApplicationCommandSelected({location: r4,
context: context, command: a0, section: a1, sectionDescriptors: sectionDescriptors, query: '',
navigation: env0_15, installOnDemand: installOnDemand, sectionName: sectionName, entrypoint: entrypoint,
onCommandExecuted: onCommandExecuted});
}
function _fun89472({item, index}) { // fn#89472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:4735, offset: 0x0200f40a, size: 271 bytes, params: 2, frame: 18
const type = item.type;
const PLACEHOLDER = env1_17.PLACEHOLDER;
if (PLACEHOLDER === type) {
return <PlaceholderCommandRow_89457 isFirstRow={index === 0} isLastRow={index === env1_18.length - 1} />;
}
const COMMAND = env1_17.COMMAND;
if (COMMAND === type) {
exports.CommandRow = CommandRow_894582;
function PlaceholderCommandRow_89457({isFirstRow, isLastRow}) { // fn#89457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:1665, offset: 0x0200e60d, size: 294 bytes, params: 2, frame: 28
isFirstRow = !(isFirstRow === undefined) && isFirstRow;
isLastRow = !(isLastRow === undefined) && isLastRow;
const styles = useStyles();
const value2 = (UsePlaceholderSizeModule).usePlaceholderWidth(10, 50);
const value3 = (UsePlaceholderSizeModule).usePlaceholderWidth(30, 90);
const TableRow = (TableRowNativeModule).TableRow;
return (
<CommandRow_89458
command={item.command}
onPressCommand={env0_16}
isFirstRow={index === 0}
isLastRow={index === commands.length - 1}
context={context}
onExecuteCommand={env0_17}
section={env0_18}
location={(require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW}
installOnDemand={installOnDemand}
sectionName={sectionName}
<TableRow
label={<View style={[styles.loadingTextPlaceholder, {width: '' + value2 + '%'}]} />}
subLabel={<View style={[styles.loadingTextPlaceholderSmall, {width: '' + value3 + '%'}]} />}
subLabelLineClamp={1}
start={isFirstRow}
end={isLastRow}
/>
);
}
return null;
}
function _fun89473() { // fn#89473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:5247, offset: 0x0200f519, size: 590 bytes, params: 1, frame: 29
var r6;
var r7;
var object2;
var stylesBinding;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
const value = environment.__proto__;
const r3 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && (require(8046) /* metro dependency 8046: AppLauncherUtils */).isApplicationMonetizedWithIAP(application);
const appLauncherUtilsModule = require(8046) /* metro dependency 8046: AppLauncherUtils */;
const isApplicationAdSupported2 = appLauncherUtilsModule.isApplicationAdSupported(application);
const value4 = null;
if (isApplicationAdSupported2) {
object2 = {};
stylesBinding = styles;
object2.style = stylesBinding.monetizationDisclosureStyle;
items3 = [((BillIcon) => <BillIcon size="sm" color="icon-muted" />)((require(11677) /* metro dependency 11677: BillIcon */).BillIcon)];
items3[1] = <Text style={stylesBinding.monetizationDisclosureTextStyle} variant="text-xs/normal" color="text-subtle" lineClamp={1}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5khEk8'])}</Text>;
r6 = <View {...object2}>{items3}</View>;
} else {
r6 = value4;
}
if (r3) {
object2 = {};
stylesBinding = styles;
object2.style = stylesBinding.monetizationDisclosureStyle;
items2 = [((ShopIcon) => <ShopIcon size="sm" color="icon-muted" />)((require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon)];
items2[1] = <Text style={stylesBinding.monetizationDisclosureTextStyle} variant="text-xs/normal" color="text-subtle" lineClamp={1}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8z5B2U'])}</Text>;
r7 = <View {...object2}>{items2}</View>;
} else {
r7 = value4;
}
return r3 || isApplicationAdSupported2 ? <View style={styles.monetizationDisclosureContainerStyle}>{r7}{r6}</View> : value4;
}
function _fun89474() { // fn#89474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:6135, offset: 0x0200f767, size: 37 bytes, params: 1, frame: 12
const object2 = {};
const stylesBinding = styles;
copyDataProperties(object2, stylesBinding.list, stylesBinding);
object2['paddingBottom'] = env0_19;
return object2;
}
function _fun89475() { // fn#89475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:6198, offset: 0x0200f78c, size: 15 bytes, params: 1, frame: 2
return {bottom: env0_19};
}
function onAddAppMenuClick({installAppProps}) { // fn#89478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:7903, owner: AppDetailContent.onAddAppMenuClick, offset: 0x0200f7c5, size: 319 bytes, params: 2, frame: 19
var environment;
var moduleValue;
let value = environment.__proto__;
importDefault(dependencyMap[38]).hideActionSheet();
const keyboardCloseReasonRefBinding = keyboardCloseReasonRef;
const AppLauncherKeyboardCloseReason = require(dependencyMap[13]).AppLauncherKeyboardCloseReason;
const OAUTH_MODAL = AppLauncherKeyboardCloseReason.OAUTH_MODAL;
keyboardCloseReasonRefBinding.current = OAUTH_MODAL;
const current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
}
let object2 = {};
const ApplicationCommandTriggerLocations = require(dependencyMap[23]).ApplicationCommandTriggerLocations;
const APP_LAUNCHER_APPLICATION_VIEW_MORE_MENU = ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW_MORE_MENU;
object2.location = APP_LAUNCHER_APPLICATION_VIEW_MORE_MENU;
object2.application_id = application.id;
object2.section_name = sectionName;
object2.source = entrypoint;
if (installAppProps.customInstallUrl == null) {
moduleValue = require(dependencyMap[39]);
moduleValue.trackWithMetadata(AnalyticEvents.APP_LAUNCHER_OAUTH2_AUTHORIZE_OPENED, object2);
}
value = require(dependencyMap[40]);
const installApplication = value.installApplication;
object2 = {};
copyDataProperties(object2, installAppProps, dependencyMap);
object2['source'] = 'app_launcher_app_details';
object2['oauth2Callback'] = oauth2Callback;
Reflect.apply(installApplication, value, [object2]);
}
function* _fun89463(a0) { // fn#89463, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:2648, offset: 0x0200e92f, size: 179 bytes, params: 2, frame: 17
let value = undefined;
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_0;
value = undefined;
var value3 = binding(env3_3[16]);
yield value3.installApplicationOnDemandIfNeeded({applicationId: require.applicationId,
channel: importAll.type !== 'channel' ? value : importAll.channel,
commandIntegrationTypes: require.integration_types, appLauncherContext: {entrypoint: View, location: env2_4,
sectionName: env2_5}});
var value5 = undefined;
if (false) {
return value5;
function CommandRow_89458({command, onPressCommand, isFirstRow, isLastRow, context, onExecuteCommand, section, location, installOnDemand, sectionName, icon}) { // fn#89458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:2012, offset: 0x0200e733, size: 333 bytes, params: 2, frame: 25
const useAppLauncherContext = AppLauncherContextModule.useAppLauncherContext;
const env0_6 = Reflect.apply(useAppLauncherContext, AppLauncherContextModule, []).entrypoint;
useUserIndexState(true, true);
useContextIndexState(context, true, true);
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
start={isFirstRow}
end={isLastRow}
label={command.displayName}
labelLineClamp={1}
subLabel={command.displayDescription}
subLabelLineClamp={1}
icon={icon}
onPress={function() {
return onPressCommand(command, section, location);
}}
trailing={((Component) => <Component command={command} context={context} beforeExecuteCommand={beforeExecuteCommand_89460} onExecuteCommand={onExecuteCommand} tryExecuteCommand={installOnDemand ? _fun89461() : undefined} sectionName={sectionName} />)(importDefault(11646) /* metro dependency 11646: CommandRowButton */)}
/>
);
function CommandRow_89458BeforeExecuteCommand() { // fn#89460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:2465, owner: CommandRow_89458.beforeExecuteCommand, offset: 0x0200e89e, size: 98 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(5065) /* metro dependency 5065: ApplicationCommandUtils */;
const trackCommandSelected = value.trackCommandSelected;
const object = {};
object.command = command;
object.location = location;
object.triggerSection = (require(5065) /* metro dependency 5065: ApplicationCommandUtils */).getCommandTriggerSection(section);
object.sectionName = sectionName;
return Reflect.apply(trackCommandSelected, value, [object]);
}
if (value5.isAuthorized) {
a0();
function _fun89461() { // fn#89461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:2628, offset: 0x0200e900, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun89463);
return _fun89464;
function* _fun89463(a0) { // fn#89463, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:2648, offset: 0x0200e92f, size: 179 bytes, params: 2, frame: 17
let value = undefined;
if (true) {
value = environment.__proto__.__proto__.__proto__;
var binding = env3_0;
value = undefined;
var value3 = binding(env3_3[16]);
yield value3.installApplicationOnDemandIfNeeded({applicationId: require.applicationId,
channel: importAll.type !== 'channel' ? value : importAll.channel,
commandIntegrationTypes: require.integration_types, appLauncherContext: {entrypoint: View, location: env2_4,
sectionName: env2_5}});
var value5 = undefined;
if (false) {
return value5;
}
if (value5.isAuthorized) {
a0();
}
}
return value;
}
function _fun89464() { // fn#89464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:2921, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
return value;
}
function _fun89467(a0) { // fn#89467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:4123, offset: 0x0200f2ad, size: 29 bytes, params: 2, frame: 2
const COMMAND = env2_17.COMMAND;
return {type: COMMAND, command: a0};
}
function oauth2Callback({canceled, location}) { // fn#89479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:8390, owner: AppDetailContent.onAddAppMenuClick.oauth2Callback, offset: 0x0200f904, size: 104 bytes, params: 2, frame: 14
var value;
var moduleValue;
if (canceled) {
value = environment.__proto__;
if (onAauth2Cancel != null) {
onAauth2Cancel();
function AppDetailContent({context, application, lockableScrollableContentOffsetY, onPressBack, installOnDemand, sectionName, onActivityItemSelected, entrypoint, onCommandExecuted, onAauth2Cancel}) { // fn#89465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:3114, offset: 0x0200e9e2, size: 2184 bytes, params: 2, frame: 58
var moduleValue4;
var moduleValue7;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items3;
const onCommandExecuted2 = onCommandExecuted;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const {chatInputRef,
keyboardCloseReasonRef} = (AppLauncherContextModule).useRequiredAppLauncherContext();
const value4 = (UseFontScaleModule).useFontScale();
const Math = global.Math;
const value6 = 60 + Math.max(36 * value4 - 36, 0);
const useDiscovery = ApplicationCommandQueryApiModule.useDiscovery;
const object = {context: context};
const ApplicationCommandType = (ServerModule).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
object.filters = {commandTypes: [CHAT]};
object.options = {'placeholderCount': 0, 'limit': null, 'includeFrecency': true,
limit: DISCOVERY_COMMANDS_QUERY_LIMIT, allowApplicationState: installOnDemand, installOnDemand: installOnDemand,
applicationId: application.id};
object.allowFetch = true;
const {filterSection, commandsByActiveSection, sectionDescriptors, loading} = Reflect.apply(useDiscovery,
ApplicationCommandQueryApiModule, [object]);
const value8 = (UseSortedSectionCommands)({sectionId: application.id,
commandsByActiveSection: commandsByActiveSection});
const sortOrder = value8.sortOrder;
const env0_13 = value8.setSortOrder;
const commands = value8.commands;
const canSort = value8.canSort;
const result = useUserIndexState(true, true).result;
const value10 = (result == null ? undefined : result.sections[application.id]) == null;
const value11 = !loading;
const r26 = loading ? value11 : commands.length === 0;
let r9 = r26 && value10;
if (r9) {
moduleValue4 = require(8046) /* metro dependency 8046: AppLauncherUtils */;
r9 = !moduleValue4.isEmbeddedApp(application);
}
} else if (location != null) {
value = environment.__proto__.__proto__;
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
moduleValue.trackWithMetadata(AnalyticEvents.APP_LAUNCHER_OAUTH2_AUTHORIZE_SUCCEEDED, env0_0);
const binding = onCommandExecuted2;
const value14 = binding.useMemo(_fun89466, [loading, commands, context.type]);
binding.useEffect(function() {
filterSection(application.id);
}, [application.id, filterSection]);
const value16 = binding.useCallback(_fun89469, [context, entrypoint, installOnDemand, useAppLauncherNavigation(),
onCommandExecuted, sectionDescriptors, sectionName]);
const value17 = binding.useCallback(function() {
var current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
}
keyboardCloseReasonRef.current = require(dependencyMap[13]).AppLauncherKeyboardCloseReason.COMMAND;
if (onCommandExecuted != null) {
onCommandExecuted();
}
}, [chatInputRef, keyboardCloseReasonRef, onCommandExecuted]);
const value18 = sectionDescriptors.find(function({id}) {
return id === application.id;
});
const value19 = binding.useCallback(_fun89472, [value16, commands.length, context, value17, value18,
installOnDemand, sectionName]);
const value20 = bottom + DEFAULT_CONTENT_PADDING;
const width = (UseWindowDimensionsNative)().width;
const maximum = (UseKeyboardActionSheetHeight)().maximum;
const value21 = binding.useMemo(_fun89473, [application, styles.monetizationDisclosureContainerStyle,
styles.monetizationDisclosureStyle, styles.monetizationDisclosureTextStyle]);
const value22 = binding.useMemo(_fun89474, [value20, styles.list]);
const value23 = binding.useMemo(_fun89475, [value20]);
const value24 = binding.useMemo(function() {
return {width: width, height: maximum};
}, [width, maximum]);
const value25 = (AppLauncherFlashListModule).useAppLauncherFlashListProps();
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const items2 = [
<View style={styles.headerSpacer} />,
];
items2[1] = (
(require(8046) /* metro dependency 8046: AppLauncherUtils */).isEmbeddedApp(application)
? ((Component) => <Component application={application} context={context} sectionName={sectionName} onActivityItemSelected={onActivityItemSelected} entrypoint={entrypoint} hasCommands={commands.length > 0} />)(importDefault(11679) /* metro dependency 11679: ActivityDetailContent */)
: ((Component) => <Component application={application} viewContainerStyle={styles.viewContainerStyle} mainContainerStyle={styles.mainContainerStyle} expandDescriptionCTAStyle={styles.expandDescriptionCTAStyle} />)(importDefault(9392) /* metro dependency 9392: DetailsHeader */)
);
const Spacer = (NativeModule).Spacer;
const PX_16 = value21 == null ? 24 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[2] = <Spacer size={PX_16} />;
items2[3] = value21;
let r24 = commands.length > 1 && value11 && context.type === 'channel' && ((Component) => <Component context={context} allCommands={commands} onPressCommand={value16} section={value18} onExecuteCommand={value17} installOnDemand={installOnDemand} sectionName={sectionName} />)(importDefault(11685) /* metro dependency 11685: FrecencyCommandsSection */);
items2[4] = r24;
if (r26) {
moduleValue7 = require(8046) /* metro dependency 8046: AppLauncherUtils */;
r24 = (
moduleValue7.isEmbeddedApp(application)
? null
: (
<View style={styles.noCommandsTextContainer}>
{((Text) => <Text variant="text-sm/normal" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['w8+YDM'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
)
);
} else {
r24 = null;
}
items2[5] = r24;
if (r26) {
r24 = null;
} else if (context.type !== 'channel') {
r24 = null;
} else {
var viewBindingProps = {style: styles.commandsHeaderContainer};
items3 = [
<View style={styles.commandsHeaderTextContainer}>
{((Heading) => <Heading variant="text-md/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GOXqks)}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading)}
</View>,
];
items3[1] = canSort && ((Component) => <Component sortOrder={sortOrder} onSortOptionPress={function(a0) {
setSortOrder(a0);
}} />)(importDefault(11687) /* metro dependency 11687: CommandListSortButton */);
r24 = (
<View {...viewBindingProps}>
{items3}
</View>
);
}
items2[6] = r24;
return (
<>
<AppLauncherFlashList
ListHeaderComponent={<>
{items2}
</>}
contentContainerStyle={value22}
scrollIndicatorInsets={value23}
renderItem={value19}
data={value14}
estimatedItemSize={value6}
estimatedListSize={value24}
preserveScrollMomentum
lockableScrollableContentOffsetY={lockableScrollableContentOffsetY}
automaticallyAdjustsScrollIndicatorInsets={false}
keyboardDismissMode="none"
animatedOnScroll={value25.onScroll}
ref={value25.scrollerRef}
simultaneousHandlers={value25.gestureRef}
animatedProps={value25.animatedProps}
key={loading ? 'loading' : undefined}
/>
{((Component) => <Component application={application} onPressBack={onPressBack} scrollOffsetY={lockableScrollableContentOffsetY} showsAddCTA={r9} onAddAppMenuClick={onAddAppMenuClick} />)(importDefault(11672) /* metro dependency 11672: Header */)}
</>
);
function _fun89466() { // fn#89466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:4086, offset: 0x0200f26a, size: 67 bytes, params: 1, frame: 11
return context.type !== 'channel' ? [] : loading ? env1_18 : commands.map(_fun89467);
function _fun89467(a0) { // fn#89467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:4123, offset: 0x0200f2ad, size: 29 bytes, params: 2, frame: 2
const COMMAND = env2_17.COMMAND;
return {type: COMMAND, command: a0};
}
}
function _fun89469(a0, a1) { // fn#89469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:4237, offset: 0x0200f2e3, size: 176 bytes, params: 3, frame: 14
let value = a2;
const r4 = value !== undefined ? value : (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW;
value = environment.__proto__;
(AppLauncherNativeUtilsModule).handleApplicationCommandSelected({location: r4,
context: context, command: a0, section: a1, sectionDescriptors: sectionDescriptors, query: '',
navigation: env0_15, installOnDemand: installOnDemand, sectionName: sectionName, entrypoint: entrypoint,
onCommandExecuted: onCommandExecuted});
}
function _fun89472({item, index}) { // fn#89472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:4735, offset: 0x0200f40a, size: 271 bytes, params: 2, frame: 18
const type = item.type;
const PLACEHOLDER = env1_17.PLACEHOLDER;
if (PLACEHOLDER === type) {
return <PlaceholderCommandRow_89457 isFirstRow={index === 0} isLastRow={index === env1_18.length - 1} />;
}
const COMMAND = env1_17.COMMAND;
if (COMMAND === type) {
return (
<CommandRow_89458
command={item.command}
onPressCommand={env0_16}
isFirstRow={index === 0}
isLastRow={index === commands.length - 1}
context={context}
onExecuteCommand={env0_17}
section={env0_18}
location={(require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW}
installOnDemand={installOnDemand}
sectionName={sectionName}
/>
);
}
return null;
}
function _fun89473() { // fn#89473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:5247, offset: 0x0200f519, size: 590 bytes, params: 1, frame: 29
var r6;
var r7;
var object;
var stylesBinding;
var items3;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
const value = environment.__proto__;
const r3 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && (require(8046) /* metro dependency 8046: AppLauncherUtils */).isApplicationMonetizedWithIAP(application);
const appLauncherUtilsModule = require(8046) /* metro dependency 8046: AppLauncherUtils */;
const isApplicationAdSupported2 = appLauncherUtilsModule.isApplicationAdSupported(application);
const value4 = null;
if (isApplicationAdSupported2) {
object = {};
stylesBinding = styles;
object.style = stylesBinding.monetizationDisclosureStyle;
const BillIcon = (require(11677) /* metro dependency 11677: BillIcon */).BillIcon;
items3 = [
<BillIcon size="sm" color="icon-muted" />,
];
items3[1] = (
<Text
style={stylesBinding.monetizationDisclosureTextStyle}
variant="text-xs/normal"
color="text-subtle"
lineClamp={1}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5khEk8'])}
</Text>
);
r6 = (
<View {...object}>
{items3}
</View>
);
} else {
r6 = value4;
}
if (r3) {
object = {};
stylesBinding = styles;
object.style = stylesBinding.monetizationDisclosureStyle;
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
items2 = [
<ShopIcon size="sm" color="icon-muted" />,
];
items2[1] = (
<Text
style={stylesBinding.monetizationDisclosureTextStyle}
variant="text-xs/normal"
color="text-subtle"
lineClamp={1}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8z5B2U'])}
</Text>
);
r7 = (
<View {...object}>
{items2}
</View>
);
} else {
r7 = value4;
}
return (
r3 || isApplicationAdSupported2
? (
<View style={styles.monetizationDisclosureContainerStyle}>
{r7}
{r6}
</View>
)
: value4
);
}
function _fun89474() { // fn#89474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:6135, offset: 0x0200f767, size: 37 bytes, params: 1, frame: 12
const object = {};
const stylesBinding = styles;
copyDataProperties(object, stylesBinding.list, stylesBinding);
object['paddingBottom'] = env0_19;
return object;
}
function _fun89475() { // fn#89475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:6198, offset: 0x0200f78c, size: 15 bytes, params: 1, frame: 2
return {bottom: env0_19};
}
function onAddAppMenuClick({installAppProps}) { // fn#89478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:7903, owner: AppDetailContent.onAddAppMenuClick, offset: 0x0200f7c5, size: 319 bytes, params: 2, frame: 19
var environment;
var moduleValue;
let value = environment.__proto__;
importDefault(dependencyMap[38]).hideActionSheet();
const keyboardCloseReasonRefBinding = keyboardCloseReasonRef;
const AppLauncherKeyboardCloseReason = require(dependencyMap[13]).AppLauncherKeyboardCloseReason;
const OAUTH_MODAL = AppLauncherKeyboardCloseReason.OAUTH_MODAL;
keyboardCloseReasonRefBinding.current = OAUTH_MODAL;
const current = chatInputRef.current;
if (current != null) {
current.closeCustomKeyboard();
}
let object = {};
const ApplicationCommandTriggerLocations = require(dependencyMap[23]).ApplicationCommandTriggerLocations;
const APP_LAUNCHER_APPLICATION_VIEW_MORE_MENU = ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW_MORE_MENU;
object.location = APP_LAUNCHER_APPLICATION_VIEW_MORE_MENU;
object.application_id = application.id;
object.section_name = sectionName;
object.source = entrypoint;
if (installAppProps.customInstallUrl == null) {
moduleValue = require(dependencyMap[39]);
moduleValue.trackWithMetadata(AnalyticEvents.APP_LAUNCHER_OAUTH2_AUTHORIZE_OPENED, object);
}
value = require(dependencyMap[40]);
const installApplication = value.installApplication;
object = {};
copyDataProperties(object, installAppProps, dependencyMap);
object['source'] = 'app_launcher_app_details';
object['oauth2Callback'] = oauth2Callback;
Reflect.apply(installApplication, value, [object]);
function oauth2Callback({canceled, location}) { // fn#89479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11857:8390, owner: AppDetailContent.onAddAppMenuClick.oauth2Callback, offset: 0x0200f904, size: 104 bytes, params: 2, frame: 14
var value;
var moduleValue;
if (canceled) {
value = environment.__proto__;
if (onAauth2Cancel != null) {
onAauth2Cancel();
}
} else if (location != null) {
value = environment.__proto__.__proto__;
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
moduleValue.trackWithMetadata(AnalyticEvents.APP_LAUNCHER_OAUTH2_AUTHORIZE_SUCCEEDED, env0_0);
}
}
}
}
}
global.__d(_fun89456, 11671, [5, 31, 27, 7861, 1483, 661, 5066, 33, 4501, 11672, 697, 11595, 6238, 8774, 11646,
5065, 10658, 4584, 1585, 8060, 1909, 11675, 8046, 5068, 11592, 1478, 11577, 477, 11677, 4573, 1244, 10358,
11643, 11679, 9392, 1305, 11685, 11687, 4080, 4863, 8870,
2]) /* metro module 11671, dependencies: [5, 31, 27, 7861, 1483, 661, 5066, 33, 4501, 11672, 697, 11595, 6238, 8774, 11646, 5065, 10658, 4584, 1585, 8060, 1909, 11675, 8046, 5068, 11592, 1478, 11577, 477, 11677, 4573, 1244, 10358, 11643, 11679, 9392, 1305, 11685, 11687, 4080, 4863, 8870, 2] */;
@@ -1,75 +1,86 @@
/* Metro module 11674; source: modules/app_launcher/native/screens/application_view/app/AppDetailsOverflowMenu.tsx; dependencies: [31, 33, 8046, 8063, 1244, 10504, 3829, 6797, 3856, 8772, 8811, 8341, 8639, 2] */
import Module08639 from '../../../../../../by-id/module-08639.js'; /* Metro dependency 8639 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserSettingsModule from '../../../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ToastUtilsModule from '../../../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as AppLauncherUtilsModule from '../../../../utils/AppLauncherUtils.tsx'; /* Metro dependency 8046 */
import * as IconButtonNativeModule from '../../../../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
function _fun89493(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11860:6, offset: 0x020107a3, 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/app_launcher/native/screens/application_view/app/AppDetailsOverflowMenu.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/AppDetailsOverflowMenu.tsx');
exports.default = AppDetailsOverflowMenu;
}
function AppDetailsOverflowMenu({application, onAddAppMenuClick}) { // fn#89494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11860:246, offset: 0x0201082d, size: 421 bytes, params: 2, frame: 20
var push;
var object;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object2;
const installAppProps = (AppLauncherUtilsModule).getInstallAppProps(application);
const items2 = [];
if ((require(8063) /* metro dependency 8063: ApplicationInstallUtils */).canInstallApplication(installAppProps) && onAddAppMenuClick != null) {
push = items2.push;
object = {};
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NgXl3C);
object.action = action_89495;
object.IconComponent = (require(10504) /* metro dependency 10504: CirclePlusIcon */).CirclePlusIcon;
Reflect.apply(push, items2, [object]);
}
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const getSetting = DeveloperMode.getSetting;
if (Reflect.apply(getSetting, DeveloperMode, [])) {
push = items2.push;
object2 = {};
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+NP/b2']);
object2.action = action_89496;
object2.IconComponent = (require(8772) /* metro dependency 8772: IdIcon */).IdIcon;
Reflect.apply(push, items2, [object2]);
}
if (items2.length === 0) {
return null;
} else {
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
return (
<ContextMenu items={items2}>
{children_89497}
</ContextMenu>
);
}
function AppDetailsOverflowMenuAction() { // fn#89495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11860:465, owner: AppDetailsOverflowMenu.action, offset: 0x020109d2, size: 27 bytes, params: 1, frame: 11
return onAddAppMenuClick({installAppProps: env0_2});
}
function AppDetailsOverflowMenuAction_89496() { // fn#89496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11860:629, owner: AppDetailsOverflowMenu.action, offset: 0x020109ed, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(application.id);
(ToastUtilsModule).presentIdCopied();
}
function AppDetailsOverflowMenuChildren(a0) { // fn#89497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11860:770, owner: AppDetailsOverflowMenu.children, offset: 0x02010a35, size: 196 bytes, params: 2, frame: 19
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const IconButton = (IconButtonNativeModule).IconButton;
const iconButtonProps2 = {'ref': null, 'size': 'sm', 'variant': 'secondary-overlay', ref: ref,
icon: Module08639, ...value2};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const PdRCRg = (IndexNativeModule).t.PdRCRg;
iconButtonProps2['accessibilityLabel'] = Reflect.apply(string, intl, [PdRCRg]);
iconButtonProps2['maxFontSizeMultiplier'] = 1.5;
return <IconButton {...iconButtonProps2} />;
}
function AppDetailsOverflowMenu({application, onAddAppMenuClick}) { // fn#89494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11860:246, offset: 0x0201082d, size: 421 bytes, params: 2, frame: 20
var push;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var object4;
const installAppProps = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getInstallAppProps(application);
const items2 = [];
if ((require(8063) /* metro dependency 8063: ApplicationInstallUtils */).canInstallApplication(installAppProps) && onAddAppMenuClick != null) {
push = items2.push;
object3 = {};
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NgXl3C);
object3.action = action_89495;
object3.IconComponent = (require(10504) /* metro dependency 10504: CirclePlusIcon */).CirclePlusIcon;
Reflect.apply(push, items2, [object3]);
}
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const getSetting = DeveloperMode.getSetting;
if (Reflect.apply(getSetting, DeveloperMode, [])) {
push = items2.push;
object4 = {};
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+NP/b2']);
object4.action = action_89496;
object4.IconComponent = (require(8772) /* metro dependency 8772: IdIcon */).IdIcon;
Reflect.apply(push, items2, [object4]);
}
if (items2.length === 0) {
return null;
} else {
const ContextMenu = (require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu;
return (
<ContextMenu items={items2}>
{children_89497}
</ContextMenu>
);
}
}
function AppDetailsOverflowMenuAction() { // fn#89495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11860:465, owner: AppDetailsOverflowMenu.action, offset: 0x020109d2, size: 27 bytes, params: 1, frame: 11
return onAddAppMenuClick({installAppProps: env0_2});
}
function AppDetailsOverflowMenuAction_89496() { // fn#89496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11860:629, owner: AppDetailsOverflowMenu.action, offset: 0x020109ed, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(application.id);
(require(3856) /* metro dependency 3856: ToastUtils */).presentIdCopied();
}
function AppDetailsOverflowMenuChildren(a0) { // fn#89497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11860:770, owner: AppDetailsOverflowMenu.children, offset: 0x02010a35, size: 196 bytes, params: 2, frame: 19
const ref = a0.ref;
const value = Object.create(null);
value.ref = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const iconButtonProps2 = {'ref': null, 'size': 'sm', 'variant': 'secondary-overlay', ref: ref,
icon: importDefault(8639) /* metro dependency 8639 */, ...value2};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const PdRCRg = (require(1244) /* metro dependency 1244: indexNative */).t.PdRCRg;
iconButtonProps2['accessibilityLabel'] = Reflect.apply(string, intl, [PdRCRg]);
iconButtonProps2['maxFontSizeMultiplier'] = 1.5;
return <IconButton {...iconButtonProps2} />;
}
global.__d(_fun89493, 11674, [31, 33, 8046, 8063, 1244, 10504, 3829, 6797, 3856, 8772, 8811, 8341, 8639,
2]) /* metro module 11674, dependencies: [31, 33, 8046, 8063, 1244, 10504, 3829, 6797, 3856, 8772, 8811, 8341, 8639, 2] */;
@@ -1,284 +1,382 @@
/* Metro module 9392; source: modules/app_launcher/native/screens/application_view/app/DetailsHeader.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4017, 8046, 4000, 8764, 8750, 6266, 4504, 4507, 6619, 4573, 1244, 4589, 676, 2] */
import Module00057 from '../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ReanimatedRexport from '../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UsePrevious from '../../../../../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
import UseRefValue from '../../../../../../hooks/useRefValue.tsx'; /* Metro dependency 6619 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsIOSModule from '../../../../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as ColorUtilsModule from '../../../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as ReanimatedRexportModule from '../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingPresetsModule from '../../../../../../design/animation/reanimated/timing/timingPresets.tsx'; /* Metro dependency 4507 */
import * as AppLauncherUtilsModule from '../../../../utils/AppLauncherUtils.tsx'; /* Metro dependency 8046 */
import * as UseIsScreenLandscapeNativeModule from '../../../../../screen/useIsScreenLandscape.native.tsx'; /* Metro dependency 8750 */
function _fun73247(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:6, offset: 0x01d6468a, size: 570 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.Pressable;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
const env0_9 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.animatedViewContainer = {overflow: 'hidden'};
object2.container = {'position': 'relative', 'width': '100%'};
object2.measuringContainer = {'width': '100%', 'position': 'absolute'};
object2.descriptionContainer = {marginTop: 8};
object2.expandDescriptionCTAGradient = {'position': 'absolute', 'top': 0, 'height': '100%', 'width': 50,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.animatedViewContainer = {overflow: 'hidden'};
object.container = {'position': 'relative', 'width': '100%'};
object.measuringContainer = {'width': '100%', 'position': 'absolute'};
object.descriptionContainer = {marginTop: 8};
object.expandDescriptionCTAGradient = {'position': 'absolute', 'top': 0, 'height': '100%', 'width': 50,
'pointerEvents': 'none'};
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object2.expandDescriptionCTA = {'backgroundColor': null, 'position': 'absolute', 'right': 16, 'bottom': 16,
object.expandDescriptionCTA = {'backgroundColor': null, 'position': 'absolute', 'right': 16, 'bottom': 16,
'flexDirection': 'row', backgroundColor: CARD_BACKGROUND_DEFAULT};
object2.collapseDescriptionCTA = {marginTop: 4};
object.collapseDescriptionCTA = {marginTop: 4};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.nameContainer = {'display': 'flex', 'flexDirection': 'row', 'gap': null, 'overflow': 'hidden', gap: PX_4};
object2.nameText = {flexShrink: 1};
const object3 = {'justifyContent': 'center', 'paddingVertical': 2};
object.nameContainer = {'display': 'flex', 'flexDirection': 'row', 'gap': null, 'overflow': 'hidden', gap: PX_4};
object.nameText = {flexShrink: 1};
const object4 = {'justifyContent': 'center', 'paddingVertical': 2};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.paddingHorizontal = PX_8;
object4.paddingHorizontal = PX_8;
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object3.backgroundColor = INTERACTIVE_BACKGROUND_ACTIVE;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.partnerLabelWrapper = object3;
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function DetailsHeaderTsx1(){const{height}=this.__closure;return{height:height.get()};}'};
object2 = {code: 'function DetailsHeaderTsx2(){const{runOnJS,setShouldLineClamp}=this.__closure;runOnJS(setShouldLineClamp)(true);}'};
object4.backgroundColor = INTERACTIVE_BACKGROUND_ACTIVE;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.partnerLabelWrapper = object4;
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function DetailsHeaderTsx1(){const{height}=this.__closure;return{height:height.get()};}'};
object = {code: 'function DetailsHeaderTsx2(){const{runOnJS,setShouldLineClamp}=this.__closure;runOnJS(setShouldLineClamp)(true);}'};
value = value.memo(DetailsHeader);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/DetailsHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/DetailsHeader.tsx');
exports.default = value;
}
function DetailsHeader({application, viewContainerStyle, mainContainerStyle, expandDescriptionCTAStyle, hideName}) { // fn#73248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:1216, offset: 0x01d648c4, size: 2114 bytes, params: 2, frame: 50
var r17;
var r9;
var r8;
var r5;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items8;
const HorizontalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
var object15;
var items13;
var items14;
const styles = useStyles();
const isPartnerApplication2 = (require(8046) /* metro dependency 8046: AppLauncherUtils */).isPartnerApplication(application);
let binding = env0_4;
const value4 = binding.useRef(null);
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value6 = binding2(value5, 2);
const property = value6[0];
const env0_2 = value6[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value8[0];
var env0_3 = property2;
var env0_4 = value8[1];
const env0_5 = binding.useRef(true);
const value9 = useContainerAnimation();
const containerStyle = value9.containerStyle;
const env0_6 = value9.containerHeight;
const sectionName = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getSectionName(application);
const sectionDescription = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getSectionDescription(application);
let r10 = sectionDescription != null && sectionDescription.trim().length > 0;
const [property3, env0_9] = env0_3(env0_4.useState(null), 2);
let backgroundColor = styles.expandDescriptionCTA.backgroundColor;
let r2 = expandDescriptionCTAStyle != null && expandDescriptionCTAStyle !== false && typeof expandDescriptionCTAStyle === 'object';
r2 = r2 && 'backgroundColor' in expandDescriptionCTAStyle && typeof expandDescriptionCTAStyle.backgroundColor === 'string';
backgroundColor = r2 ? expandDescriptionCTAStyle.backgroundColor : backgroundColor;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
let items2 = [colorUtilsModule.hexOpacityToRgba(backgroundColor, 0)];
const moduleValue5 = colorUtilsModule;
items2[1] = moduleValue5.hexOpacityToRgba(backgroundColor, 1);
binding = env0_4;
const env0_10 = binding.useRef(0);
const env0_11 = binding.useRef(0);
const value22 = binding.useState(false);
const binding3 = env0_3;
const value23 = binding3(value22, 2);
const property4 = value23[0];
const env0_12 = value23[1];
useState = binding.useState;
const value24 = binding3(Reflect.apply(useState, binding, [false]), 2);
const property5 = value24[0];
const env0_14 = value24[1];
const value25 = binding.useMemo(_fun73251, [sectionDescription]);
const value26 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
binding.useEffect(_fun73252, [value26, (importDefault(6266) /* metro dependency 6266: usePrevious */)(value26)]);
const closure = onPress_73253;
const value28 = (importDefault(6619) /* metro dependency 6619: useRefValue */)(value4);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [styles.animatedViewContainer, containerStyle, viewContainerStyle];
const viewBindingProps = {style: [styles.container, mainContainerStyle], onLayout: onLayout_73255};
const value29 = !hideName;
const items6 = [hideName ? value29 : ((Heading) => <Heading style={styles.nameText} variant="heading-lg/bold" color="text-default" lineClamp={1}>{sectionName}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading)];
items6[1] = isPartnerApplication2 ? <View style={styles.partnerLabelWrapper}><Text variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LO4f0P)}</Text></View> : null;
const view = <View style={styles.nameContainer}>{items6}</View>;
if (r10) {
var pressableBindingProps = {style: hideName ? value29 : styles.descriptionContainer, onPress: closure,
accessibilityRole: 'button'};
items8 = [<Text variant="text-sm/medium" color="text-default" lineClamp={property4 || value28 == null ? 3 : undefined}>{value25}</Text>];
items8[1] = property && (property2 ? <Text variant="text-sm/medium" color="text-brand" style={styles.collapseDescriptionCTA}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.D5xGUK)}</Text> : null);
r17 = <Pressable {...pressableBindingProps}>{items8}</Pressable>;
} else {
r17 = r10;
}
const view2 = <View {...viewBindingProps}>{view}{r17}</View>;
if (property) {
if (property2) {
r9 = null;
} else {
var pressableBindingProps = {style: [styles.expandDescriptionCTA, expandDescriptionCTAStyle],
onPress: closure,
accessibilityRole: 'button'};
items2 = [((Component) => <Component start={HorizontalGradient.START} end={HorizontalGradient.END} colors={items2} style={[styles.expandDescriptionCTAGradient,
{right: property3 == null ? 0 : property3 - 5}]} />)(importDefault(4589) /* metro dependency 4589 */)];
items2[1] = <Text onLayout={onLayout_73256} variant="text-sm/medium" color="text-brand">{'… '}{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['OBCR+p'])}</Text>;
r9 = <Pressable {...pressableBindingProps}>{items2}</Pressable>;
}
r8 = r9;
} else {
r8 = property;
}
const view3 = <View2 style={items4}>{view2}{r8}</View2>;
if (property5) {
r5 = !property5;
} else {
var viewProps = {style: [mainContainerStyle, styles.measuringContainer, {'opacity': 0,
'pointerEvents': 'none'}],
onLayout: onLayout_73257};
items13 = [hideName ? value29 : ((Heading) => <Heading variant="heading-lg/bold" color="text-default">{sectionName}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading)];
function DetailsHeader({application, viewContainerStyle, mainContainerStyle, expandDescriptionCTAStyle, hideName}) { // fn#73248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:1216, offset: 0x01d648c4, size: 2114 bytes, params: 2, frame: 50
var r17;
var r9;
var r8;
var r5;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items8;
const HorizontalGradient = (ConstantsIOSModule).HorizontalGradient;
var object;
var items13;
var items14;
const styles = useStyles();
const isPartnerApplication2 = (AppLauncherUtilsModule).isPartnerApplication(application);
let binding = env0_4;
const value4 = binding.useRef(null);
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [false]);
const binding2 = property22;
const value6 = binding2(value5, 2);
const property = value6[0];
const env0_2 = value6[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value8[0];
var property22 = property2;
var env0_4 = value8[1];
const env0_5 = binding.useRef(true);
const value9 = useContainerAnimation();
const containerStyle = value9.containerStyle;
const env0_6 = value9.containerHeight;
const sectionName = (AppLauncherUtilsModule).getSectionName(application);
const sectionDescription = (AppLauncherUtilsModule).getSectionDescription(application);
let r10 = sectionDescription != null && sectionDescription.trim().length > 0;
const [property3, env0_9] = property22(env0_4.useState(null), 2);
let backgroundColor = styles.expandDescriptionCTA.backgroundColor;
let r2 = expandDescriptionCTAStyle != null && expandDescriptionCTAStyle !== false && typeof expandDescriptionCTAStyle === 'object';
r2 = r2 && 'backgroundColor' in expandDescriptionCTAStyle && typeof expandDescriptionCTAStyle.backgroundColor === 'string';
backgroundColor = r2 ? expandDescriptionCTAStyle.backgroundColor : backgroundColor;
let items2 = [ColorUtilsModule.hexOpacityToRgba(backgroundColor, 0)];
items2[1] = ColorUtilsModule.hexOpacityToRgba(backgroundColor, 1);
binding = env0_4;
const env0_10 = binding.useRef(0);
const env0_11 = binding.useRef(0);
const value22 = binding.useState(false);
const binding3 = property22;
const value23 = binding3(value22, 2);
const property4 = value23[0];
const env0_12 = value23[1];
useState = binding.useState;
const value24 = binding3(Reflect.apply(useState, binding, [false]), 2);
const property5 = value24[0];
const env0_14 = value24[1];
const value25 = binding.useMemo(_fun73251, [sectionDescription]);
const value26 = (UseIsScreenLandscapeNativeModule).useIsScreenLandscape();
binding.useEffect(_fun73252, [value26, (UsePrevious)(value26)]);
const onPress_732532 = onPress_73253;
const value28 = (UseRefValue)(value4);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const View2 = (ReanimatedRexport).View;
const items4 = [styles.animatedViewContainer, containerStyle, viewContainerStyle];
const viewBindingProps = {style: [styles.container, mainContainerStyle], onLayout: onLayout_73255};
const value29 = !hideName;
const items6 = [
hideName
? value29
: ((Heading) => <Heading style={styles.nameText} variant="heading-lg/bold" color="text-default" lineClamp={1}>{sectionName}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading),
];
items6[1] = (
isPartnerApplication2
? (
<View style={styles.partnerLabelWrapper}>
<Text variant="text-xs/medium" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.LO4f0P)}
</Text>
</View>
)
: null
);
const view = (
<View style={styles.nameContainer}>
{items6}
</View>
);
if (r10) {
var viewBinding3Props = {style: hideName ? value29 : styles.descriptionContainer};
items14 = [<Text variant="text-sm/medium" color="text-default" onTextLayout={onTextLayout}>{value25}</Text>];
items14[1] = <Text variant="text-sm/medium" color="text-brand" style={styles.collapseDescriptionCTA}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.D5xGUK)}</Text>;
r10 = <View {...viewBinding3Props}>{items14}</View>;
}
items13[1] = r10;
r5 = <View {...viewProps}>{items13}</View>;
}
return (
<>
{view3}
{r5}
</>
);
}
function useContainerAnimation() { // fn#73249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:1495, owner: DetailsHeader.useContainerAnimation, offset: 0x01d65106, size: 123 bytes, params: 1, frame: 17
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(null);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useContainerAnimationT;
closure.__closure = {height: value2};
closure.__workletHash = 23826674246;
closure.__initData = env1_11;
return {containerStyle: Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]),
containerHeight: value2};
}
function _fun73251() { // fn#73251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:2266, offset: 0x01d65199, size: 58 bytes, params: 1, frame: 13
const value2 = null;
return value2 == env0_7 ? value2 : (require(8764) /* metro dependency 8764: BioMarkupUtils */).parseBioReactWithCachedAST(env0_7);
}
function _fun73252() { // fn#73252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:2391, offset: 0x01d651d3, size: 54 bytes, params: 1, frame: 12
if (env0_15 !== env0_16) {
env0_14(false);
env0_11.current = 0;
env0_10.current = 0;
}
}
function DetailsHeaderOnPress() { // fn#73253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:2487, owner: DetailsHeader.onPress, offset: 0x01d65209, size: 310 bytes, params: 1, frame: 25
var environment;
var containerHeightBinding;
var set;
var value2;
var moduleValue;
var withTiming;
var current;
const timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
var value3;
var moduleValue2;
var closure;
var object2;
if (env0_1) {
env0_5.current = false;
if (env0_3) {
containerHeightBinding = containerHeight;
set = containerHeightBinding.set;
value3 = environment.__proto__;
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
current = env0_10.current;
closure = onPressT;
object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.setShouldLineClamp = env0_12;
closure.__closure = object2;
closure.__workletHash = 6050776164847;
closure.__initData = env1_12;
Reflect.apply(set, containerHeightBinding, [Reflect.apply(withTiming, moduleValue2, [current,
timingStandard,
'respect-motion-settings', closure])]);
var pressableBindingProps = {style: hideName ? value29 : styles.descriptionContainer, onPress: onPress_732532,
accessibilityRole: 'button'};
items8 = [
<Text
variant="text-sm/medium"
color="text-default"
lineClamp={property4 || value28 == null ? 3 : undefined}
>
{value25}
</Text>,
];
items8[1] = property && (property2 ? <Text variant="text-sm/medium" color="text-brand" style={styles.collapseDescriptionCTA}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.D5xGUK)}</Text> : null);
r17 = (
<Pressable {...pressableBindingProps}>
{items8}
</Pressable>
);
} else {
env0_12(false);
containerHeightBinding = containerHeight;
set = containerHeightBinding.set;
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, containerHeightBinding, [moduleValue.withTiming(env0_11.current, timingStandard)]);
r17 = r10;
}
env0_4(!env0_3);
}
}
function DetailsHeaderOnLayout(a0) { // fn#73255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:2963, owner: DetailsHeader.onLayout, offset: 0x01d65372, size: 114 bytes, params: 2, frame: 12
var containerHeightBinding;
var set;
var current;
if (!env0_13) {
env0_10.current = a0.nativeEvent.layout.height;
containerHeightBinding = containerHeight;
set = containerHeightBinding.set;
current = env0_10.current;
Reflect.apply(set, containerHeightBinding, [current]);
current = env0_11.current;
if (current > 0 && env0_10.current > 0) {
env0_14(true);
const view2 = (
<View {...viewBindingProps}>
{view}
{r17}
</View>
);
if (property) {
if (property2) {
r9 = null;
} else {
var pressableBindingProps = {style: [styles.expandDescriptionCTA, expandDescriptionCTAStyle],
onPress: onPress_732532, accessibilityRole: 'button'};
items2 = [
((Component) => <Component start={HorizontalGradient.START} end={HorizontalGradient.END} colors={items2} style={[styles.expandDescriptionCTAGradient,
{right: property3 == null ? 0 : property3 - 5}]} />)(importDefault(4589) /* metro dependency 4589 */),
];
items2[1] = (
<Text
onLayout={onLayout_73256}
variant="text-sm/medium"
color="text-brand"
>
{'… '}
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['OBCR+p'])}
</Text>
);
r9 = (
<Pressable {...pressableBindingProps}>
{items2}
</Pressable>
);
}
r8 = r9;
} else {
r8 = property;
}
const view3 = (
<View2 style={items4}>
{view2}
{r8}
</View2>
);
if (property5) {
r5 = !property5;
} else {
var viewProps = {style: [mainContainerStyle, styles.measuringContainer, {'opacity': 0,
'pointerEvents': 'none'}],
onLayout: onLayout_73257};
items13 = [
hideName
? value29
: ((Heading) => <Heading variant="heading-lg/bold" color="text-default">{sectionName}</Heading>)((require(4573) /* metro dependency 4573: Text */).Heading),
];
if (r10) {
var viewBinding3Props = {style: hideName ? value29 : styles.descriptionContainer};
items14 = [
<Text
variant="text-sm/medium"
color="text-default"
onTextLayout={onTextLayout_73258}
>
{value25}
</Text>,
];
items14[1] = (
<Text
variant="text-sm/medium"
color="text-brand"
style={styles.collapseDescriptionCTA}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.D5xGUK)}
</Text>
);
r10 = (
<View {...viewBinding3Props}>
{items14}
</View>
);
}
items13[1] = r10;
r5 = (
<View {...viewProps}>
{items13}
</View>
);
}
return (
<>
{view3}
{r5}
</>
);
function useContainerAnimation() { // fn#73249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:1495, owner: DetailsHeader.useContainerAnimation, offset: 0x01d65106, size: 123 bytes, params: 1, frame: 17
const value2 = (ReanimatedRexportModule).useSharedValue(null);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const useContainerAnimationT2 = useContainerAnimationT;
useContainerAnimationT2.__closure = {height: value2};
useContainerAnimationT2.__workletHash = 23826674246;
useContainerAnimationT2.__initData = env1_11;
return {containerStyle: Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [useContainerAnimationT2]),
containerHeight: value2};
function useContainerAnimationT() { // fn#73250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:1616, owner: DetailsHeader.useContainerAnimation.t, offset: 0x01d65181, size: 24 bytes, params: 1, frame: 10
const object = {};
object.height = env0_0.get();
return object;
}
}
function _fun73251() { // fn#73251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:2266, offset: 0x01d65199, size: 58 bytes, params: 1, frame: 13
const value2 = null;
return value2 == JsxRuntimeModule.jsx ? value2 : (require(8764) /* metro dependency 8764: BioMarkupUtils */).parseBioReactWithCachedAST(JsxRuntimeModule.jsx);
}
function _fun73252() { // fn#73252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:2391, offset: 0x01d651d3, size: 54 bytes, params: 1, frame: 12
if (env0_15 !== env0_16) {
env0_14(false);
env0_11.current = 0;
env0_10.current = 0;
}
}
function DetailsHeaderOnPress() { // fn#73253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:2487, owner: DetailsHeader.onPress, offset: 0x01d65209, size: 310 bytes, params: 1, frame: 25
var environment;
var containerHeightBinding;
var set;
var value2;
var moduleValue;
var withTiming;
var current;
const timingStandard = (TimingPresetsModule).timingStandard;
var value3;
var moduleValue2;
var onPressT2;
var object;
if (env0_1) {
env0_5.current = false;
if (Module00057) {
containerHeightBinding = containerHeight;
set = containerHeightBinding.set;
value3 = environment.__proto__;
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
withTiming = moduleValue2.withTiming;
current = env0_10.current;
onPressT2 = onPressT;
object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.setShouldLineClamp = env0_12;
onPressT2.__closure = object;
onPressT2.__workletHash = 6050776164847;
onPressT2.__initData = env1_12;
Reflect.apply(set, containerHeightBinding, [Reflect.apply(withTiming, moduleValue2, [current,
timingStandard,
'respect-motion-settings', onPressT2])]);
} else {
env0_12(false);
containerHeightBinding = containerHeight;
set = containerHeightBinding.set;
value2 = environment.__proto__;
moduleValue = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, containerHeightBinding, [moduleValue.withTiming(env0_11.current, timingStandard)]);
}
env0_4(!Module00057);
}
function onPressT() { // fn#73254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:2607, owner: DetailsHeader.onPress.t, offset: 0x01d6533f, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env1_12);
value(true);
}
}
function DetailsHeaderOnLayout(a0) { // fn#73255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:2963, owner: DetailsHeader.onLayout, offset: 0x01d65372, size: 114 bytes, params: 2, frame: 12
var containerHeightBinding;
var set;
var current;
if (!env0_13) {
env0_10.current = a0.nativeEvent.layout.height;
containerHeightBinding = containerHeight;
set = containerHeightBinding.set;
current = env0_10.current;
Reflect.apply(set, containerHeightBinding, [current]);
current = env0_11.current;
if (current > 0 && env0_10.current > 0) {
env0_14(true);
}
}
}
function DetailsHeaderOnLayout_73256(a0) { // fn#73256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:4104, owner: DetailsHeader.onLayout, offset: 0x01d653e4, size: 48 bytes, params: 2, frame: 11
if (JsxRuntimeModule.jsxs == null) {
env0_9(a0.nativeEvent.layout.width);
}
}
function DetailsHeaderOnLayout_73257({nativeEvent}) { // fn#73257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:4345, owner: DetailsHeader.onLayout, offset: 0x01d65414, size: 84 bytes, params: 2, frame: 12
env0_11.current = nativeEvent.layout.height;
if (env0_11.current > 0 && env0_10.current > 0) {
env0_14(true);
}
}
function DetailsHeaderOnTextLayout({nativeEvent}) { // fn#73258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:4650, owner: DetailsHeader.onTextLayout, offset: 0x01d65468, size: 81 bytes, params: 2, frame: 12
const length = nativeEvent.lines.length;
if (env0_0.current == null) {
env0_0.current = length;
}
if (length > 3) {
env0_12(true);
env0_2(true);
}
}
}
}
function DetailsHeaderOnLayout_73256(a0) { // fn#73256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:4104, owner: DetailsHeader.onLayout, offset: 0x01d653e4, size: 48 bytes, params: 2, frame: 11
if (env0_8 == null) {
env0_9(a0.nativeEvent.layout.width);
}
}
function DetailsHeaderOnLayout_73257({nativeEvent}) { // fn#73257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:4345, owner: DetailsHeader.onLayout, offset: 0x01d65414, size: 84 bytes, params: 2, frame: 12
env0_11.current = nativeEvent.layout.height;
if (env0_11.current > 0 && env0_10.current > 0) {
env0_14(true);
}
}
function DetailsHeaderOnTextLayout({nativeEvent}) { // fn#73258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:4650, owner: DetailsHeader.onTextLayout, offset: 0x01d65468, size: 81 bytes, params: 2, frame: 12
const length = nativeEvent.lines.length;
if (env0_0.current == null) {
env0_0.current = length;
}
if (length > 3) {
env0_12(true);
env0_2(true);
}
}
function onPressT() { // fn#73254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9578:2607, owner: DetailsHeader.onPress.t, offset: 0x01d6533f, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env1_12);
value(true);
}
global.__d(_fun73247, 9392, [57, 31, 27, 33, 4501, 697, 4017, 8046, 4000, 8764, 8750, 6266, 4504, 4507, 6619, 4573,
1244, 4589, 676,
2]) /* metro module 9392, dependencies: [57, 31, 27, 33, 4501, 697, 4017, 8046, 4000, 8764, 8750, 6266, 4504, 4507, 6619, 4573, 1244, 4589, 676, 2] */;
@@ -1,89 +1,107 @@
/* Metro module 11685; source: modules/app_launcher/native/screens/application_view/app/FrecencyCommandsSection.tsx; dependencies: [31, 27, 661, 33, 4501, 11671, 11686, 4863, 8048, 4573, 1244, 5068, 2] */
import UseFilterAndSortToOnlyFrecentCommands from '../../../../hooks/useFilterAndSortToOnlyFrecentCommands.tsx'; /* Metro dependency 11686 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ApplicationCommandTypesModule from '../../../../../application_commands/ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
import * as AppDetailContentModule from './AppDetailContent.tsx'; /* Metro dependency 11671 */
function _fun89545(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11871:6, offset: 0x02012def, size: 268 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 env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BETWEEN_SECTIONS_MARGIN = (require(11671) /* metro dependency 11671: AppDetailContent */).BETWEEN_SECTIONS_MARGIN;
const BETWEEN_SECTIONS_MARGIN = (AppDetailContentModule).BETWEEN_SECTIONS_MARGIN;
const env0_8 = Reflect.apply(createStyles, value, [{container: {marginBottom: BETWEEN_SECTIONS_MARGIN},
header: {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4, 'marginBottom': 8}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/FrecencyCommandsSection.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/FrecencyCommandsSection.tsx');
exports.default = FrecencyCommandsSection;
}
function FrecencyCommandsSection({context, allCommands, onPressCommand, section, onExecuteCommand, installOnDemand, sectionName}) { // fn#89546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11871:455, offset: 0x02012efb, size: 367 bytes, params: 2, frame: 25
var r0;
var Heading;
var intl;
var view;
const styles = useStyles();
const value2 = (UseFilterAndSortToOnlyFrecentCommands)({context: context,
commands: allCommands, limit: 5});
onExecuteCommand.useEffect(_fun89547, [value2.length, sectionName]);
if (value2.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
var viewBindingProps2 = {style: styles.header};
Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
view = (
<View {...viewBindingProps2}>
<Heading variant="text-md/medium" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.acSE0h)}
</Heading>
</View>
);
view = (
<View {...viewBindingProps}>
{[view, value2.map(_fun89548)]}
</View>
);
r0 = view;
}
return r0;
function _fun89547() { // fn#89547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11871:665, offset: 0x0201306a, size: 122 bytes, params: 1, frame: 18
var value2;
var moduleValue;
var trackWithMetadata;
var APP_LAUNCHER_FRECENTS_SEEN;
var object;
if (env0_6.length !== 0) {
value2 = environment.__proto__;
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
trackWithMetadata = moduleValue.trackWithMetadata;
APP_LAUNCHER_FRECENTS_SEEN = AnalyticEvents.APP_LAUNCHER_FRECENTS_SEEN;
object = {};
object.num = env0_6.length;
object.section_name = sectionName;
object.location = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherLocations.APP_DETAIL;
Reflect.apply(trackWithMetadata, moduleValue, [APP_LAUNCHER_FRECENTS_SEEN, object]);
}
}
function _fun89548(a0, a1) { // fn#89548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11871:1040, offset: 0x020130e4, size: 182 bytes, params: 3, frame: 21
const CommandRow = (AppDetailContentModule).CommandRow;
const onPressCommandBinding = onPressCommand;
const length = env0_6.length;
const contextBinding = context;
const onExecuteCommandBinding = onExecuteCommand;
const installOnDemandBinding = installOnDemand;
const sectionBinding = section;
const ApplicationCommandTriggerLocations = (ApplicationCommandTypesModule).ApplicationCommandTriggerLocations;
const APP_LAUNCHER_APPLICATION_VIEW_FRECENCT = ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW_FRECENCT;
return (
<CommandRow
command={a0}
onPressCommand={onPressCommandBinding}
isFirstRow={a1 === 0}
isLastRow={a1 === length - 1}
context={contextBinding}
onExecuteCommand={onExecuteCommandBinding}
installOnDemand={installOnDemandBinding}
section={sectionBinding}
location={APP_LAUNCHER_APPLICATION_VIEW_FRECENCT}
sectionName={sectionName}
key={a0.id}
/>
);
}
function FrecencyCommandsSection({context, allCommands, onPressCommand, section, onExecuteCommand, installOnDemand, sectionName}) { // fn#89546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11871:455, offset: 0x02012efb, size: 367 bytes, params: 2, frame: 25
var r0;
var Heading;
var intl;
var view;
const styles = useStyles();
const value2 = (importDefault(11686) /* metro dependency 11686: useFilterAndSortToOnlyFrecentCommands */)({context: context,
commands: allCommands, limit: 5});
onExecuteCommand.useEffect(_fun89547, [value2.length, sectionName]);
if (value2.length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
var viewBindingProps2 = {style: styles.header};
Heading = (require(4573) /* metro dependency 4573: Text */).Heading;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
view = <View {...viewBindingProps2}><Heading variant="text-md/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.acSE0h)}</Heading></View>;
view = <View {...viewBindingProps}>{[view, value2.map(_fun89548)]}</View>;
r0 = view;
}
return r0;
}
function _fun89547() { // fn#89547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11871:665, offset: 0x0201306a, size: 122 bytes, params: 1, frame: 18
var value2;
var moduleValue;
var trackWithMetadata;
var APP_LAUNCHER_FRECENTS_SEEN;
var object2;
if (env0_6.length !== 0) {
value2 = environment.__proto__;
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
trackWithMetadata = moduleValue.trackWithMetadata;
APP_LAUNCHER_FRECENTS_SEEN = AnalyticEvents.APP_LAUNCHER_FRECENTS_SEEN;
object2 = {};
object2.num = env0_6.length;
object2.section_name = sectionName;
object2.location = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherLocations.APP_DETAIL;
Reflect.apply(trackWithMetadata, moduleValue, [APP_LAUNCHER_FRECENTS_SEEN, object2]);
}
}
function _fun89548(a0, a1) { // fn#89548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11871:1040, offset: 0x020130e4, size: 182 bytes, params: 3, frame: 21
const CommandRow = (require(11671) /* metro dependency 11671: AppDetailContent */).CommandRow;
const onPressCommandBinding = onPressCommand;
const length = env0_6.length;
const contextBinding = context;
const onExecuteCommandBinding = onExecuteCommand;
const installOnDemandBinding = installOnDemand;
const sectionBinding = section;
const ApplicationCommandTriggerLocations = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations;
const APP_LAUNCHER_APPLICATION_VIEW_FRECENCT = ApplicationCommandTriggerLocations.APP_LAUNCHER_APPLICATION_VIEW_FRECENCT;
return (
<CommandRow
command={a0}
onPressCommand={onPressCommandBinding}
isFirstRow={a1 === 0}
isLastRow={a1 === length - 1}
context={contextBinding}
onExecuteCommand={onExecuteCommandBinding}
installOnDemand={installOnDemandBinding}
section={sectionBinding}
location={APP_LAUNCHER_APPLICATION_VIEW_FRECENCT}
sectionName={sectionName}
key={a0.id}
/>
);
}
global.__d(_fun89545, 11685, [31, 27, 661, 33, 4501, 11671, 11686, 4863, 8048, 4573, 1244, 5068,
2]) /* metro module 11685, dependencies: [31, 27, 661, 33, 4501, 11671, 11686, 4863, 8048, 4573, 1244, 5068, 2] */;
@@ -1,61 +1,72 @@
/* Metro module 11688; source: modules/app_launcher/native/screens/application_view/app/sort/CommandListSortActionSheet.tsx; dependencies: [31, 11676, 33, 1244, 6275, 6758, 11689, 697, 7988, 7987, 2] */
import Native from '../../../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as BottomSheetNativeModule from '../../../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as TableRadioRowNativeModule from '../../../../../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../../../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as AppLauncherConstantsModule from '../../../../../AppLauncherConstants.tsx'; /* Metro dependency 11676 */
import * as ArrowsUpDownIconModule from '../../../../../../../design/components/Icon/native/redesign/generated/ArrowsUpDownIcon.tsx'; /* Metro dependency 11689 */
function _fun89561(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11874:6, offset: 0x02013708, size: 160 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(11676) /* metro dependency 11676: AppLauncherConstants */).CommandListSortOrder;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/sort/CommandListSortActionSheet.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/sort/CommandListSortActionSheet.tsx');
exports.default = CommandListSortActionSheet;
function CommandListSortActionSheet({onClose, sortOrder, onSortOptionPress}) { // fn#89562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11874:286, offset: 0x020137a8, size: 446 bytes, params: 2, frame: 24
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object = {startExpanded: true};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const object2 = {};
const ArrowsUpDownIcon = (ArrowsUpDownIconModule).ArrowsUpDownIcon;
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
object2.leading = <ArrowsUpDownIcon size="sm" color={TEXT_DEFAULT} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.yeYaHf]);
object.header = <BottomSheetTitleHeader {...object2} />;
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
string = intl.string;
const SzxiqK = (require(1244) /* metro dependency 1244: indexNative */).t.SzxiqK;
const POPULAR = CommandListSortOrder.POPULAR;
const items2 = [{label: Reflect.apply(string, intl, [SzxiqK]), value: POPULAR}];
const object6 = {};
object6.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m8xsti);
const ALPHABETICAL = CommandListSortOrder.ALPHABETICAL;
object6.value = ALPHABETICAL;
items2[1] = object6;
return (
<BottomSheet {...object}>
<TableRadioGroup
hasIcons={false}
value={sortOrder}
onChange={function(a0) {
onSortOptionPress(a0);
onClose();
}}
>
{items2.map(_fun89564)}
</TableRadioGroup>
</BottomSheet>
);
function _fun89564({label, value}) { // fn#89564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11874:807, offset: 0x02013981, size: 67 bytes, params: 2, frame: 16
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={label}
value={value}
key={value}
/>
);
}
}
}
function CommandListSortActionSheet({onClose, sortOrder, onSortOptionPress}) { // fn#89562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11874:286, offset: 0x020137a8, size: 446 bytes, params: 2, frame: 24
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object3 = {startExpanded: true};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const object4 = {};
const ArrowsUpDownIcon = (require(11689) /* metro dependency 11689: ArrowsUpDownIcon */).ArrowsUpDownIcon;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object4.leading = <ArrowsUpDownIcon size="sm" color={TEXT_DEFAULT} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object4.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.yeYaHf]);
object3.header = <BottomSheetTitleHeader {...object4} />;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
string = intl.string;
const SzxiqK = (require(1244) /* metro dependency 1244: indexNative */).t.SzxiqK;
const POPULAR = CommandListSortOrder.POPULAR;
const items2 = [{label: Reflect.apply(string, intl, [SzxiqK]), value: POPULAR}];
const object5 = {};
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m8xsti);
const ALPHABETICAL = CommandListSortOrder.ALPHABETICAL;
object5.value = ALPHABETICAL;
items2[1] = object5;
return (
<BottomSheet {...object3}>
<TableRadioGroup
hasIcons={false}
value={sortOrder}
onChange={function(a0) {
onSortOptionPress(a0);
onClose();
}}
>
{items2.map(_fun89564)}
</TableRadioGroup>
</BottomSheet>
);
}
function _fun89564({label, value}) { // fn#89564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11874:807, offset: 0x02013981, size: 67 bytes, params: 2, frame: 16
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={label}
value={value}
key={value}
/>
);
}
global.__d(_fun89561, 11688, [31, 11676, 33, 1244, 6275, 6758, 11689, 697, 7988, 7987,
2]) /* metro module 11688, dependencies: [31, 11676, 33, 1244, 6275, 6758, 11689, 697, 7988, 7987, 2] */;
@@ -1,65 +1,79 @@
/* Metro module 11687; source: modules/app_launcher/native/screens/application_view/app/sort/CommandListSortButton.tsx; dependencies: [31, 27, 11676, 1309, 33, 4501, 697, 1244, 5278, 4080, 11688, 1962, 4573, 8708, 2] */
import Native from '../../../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FormConstantsModule from '../../../../../../../design/void/Form/native/FormConstants.tsx'; /* Metro dependency 1309 */
import * as TextModule from '../../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ChevronSmallDownIconModule from '../../../../../../../design/components/Icon/native/redesign/generated/ChevronSmallDownIcon.tsx'; /* Metro dependency 8708 */
import * as AppLauncherConstantsModule from '../../../../../AppLauncherConstants.tsx'; /* Metro dependency 11676 */
function _fun89557(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11873:6, offset: 0x02013384, size: 325 bytes, params: 8, frame: 22
var object3;
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(11676) /* metro dependency 11676: AppLauncherConstants */).CommandListSortOrder;
const env0_5 = (require(1309) /* metro dependency 1309: FormConstants */).ANDROID_FOREGROUND_RIPPLE;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {overflow: 'hidden'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object3.container = object4;
object = {};
const object2 = {overflow: 'hidden'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl;
object.container = object2;
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object3.button = {'gap': 4, 'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 12,
object.button = {'gap': 4, 'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 12,
'paddingVertical': 4, backgroundColor: BACKGROUND_MOD_NORMAL};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/sort/CommandListSortButton.tsx');
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/application_view/app/sort/CommandListSortButton.tsx');
exports.default = CommandListSortButton;
function CommandListSortButton({sortOrder, onSortOptionPress}) { // fn#89558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11873:579, offset: 0x020134c9, size: 414 bytes, params: 2, frame: 22
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const POPULAR = CommandListSortOrder.POPULAR;
const r11 = POPULAR === sortOrder ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SzxiqK) : CommandListSortOrder.ALPHABETICAL !== sortOrder ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m8xsti);
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {'accessibilityRole': 'button', 'androidRippleConfig': null, 'activeOpacity': 0.8,
androidRippleConfig: ANDROID_FOREGROUND_RIPPLE, style: styles.container, onPress: onPress_89559};
const Text = (TextModule).Text;
const text = (
<Text variant="text-sm/medium" color="text-default">
{r11}
</Text>
);
const ChevronSmallDownIcon = (ChevronSmallDownIconModule).ChevronSmallDownIcon;
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
return (
<PressableOpacity {...pressableOpacityProps}>
<View style={styles.button}>
{text}
<ChevronSmallDownIcon size="xs" color={TEXT_DEFAULT} />
</View>
</PressableOpacity>
);
function CommandListSortButtonOnPress() { // fn#89559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11873:915, owner: CommandListSortButton.onPress, offset: 0x02013667, size: 117 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[9]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'CommandListSortActionSheet', {sortOrder: sortOrder,
onSortOptionPress: onSortOptionPress, onClose: onClose_89560}]);
function onPressOnClose_89560() { // fn#89560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11873:1031, owner: CommandListSortButton.onPress.onClose, offset: 0x020136dc, size: 44 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet('CommandListSortActionSheet');
}
}
}
}
function CommandListSortButton({sortOrder, onSortOptionPress}) { // fn#89558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11873:579, offset: 0x020134c9, size: 414 bytes, params: 2, frame: 22
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const POPULAR = CommandListSortOrder.POPULAR;
const r11 = POPULAR === sortOrder ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.SzxiqK) : CommandListSortOrder.ALPHABETICAL !== sortOrder ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m8xsti);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {'accessibilityRole': 'button', 'androidRippleConfig': null, 'activeOpacity': 0.8,
androidRippleConfig: ANDROID_FOREGROUND_RIPPLE, style: styles.container, onPress: onPress_89559};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-sm/medium" color="text-default">{r11}</Text>;
const ChevronSmallDownIcon = (require(8708) /* metro dependency 8708: ChevronSmallDownIcon */).ChevronSmallDownIcon;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
return (
<PressableOpacity {...pressableOpacityProps}>
<View style={styles.button}>
{text}
<ChevronSmallDownIcon size="xs" color={TEXT_DEFAULT} />
</View>
</PressableOpacity>
);
}
function CommandListSortButtonOnPress() { // fn#89559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11873:915, owner: CommandListSortButton.onPress, offset: 0x02013667, size: 117 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[9]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'CommandListSortActionSheet', {sortOrder: sortOrder,
onSortOptionPress: onSortOptionPress, onClose: onClose_89560}]);
}
function onPressOnClose_89560() { // fn#89560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11873:1031, owner: CommandListSortButton.onPress.onClose, offset: 0x020136dc, size: 44 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('CommandListSortActionSheet');
}
global.__d(_fun89557, 11687, [31, 27, 11676, 1309, 33, 4501, 697, 1244, 5278, 4080, 11688, 1962, 4573, 8708,
2]) /* metro module 11687, dependencies: [31, 27, 11676, 1309, 33, 4501, 697, 1244, 5278, 4080, 11688, 1962, 4573, 8708, 2] */;
@@ -1,152 +1,175 @@
/* Metro module 11692; source: modules/app_launcher/native/screens/command_view/AppLauncherCommandViewHeader.tsx; dependencies: [31, 27, 1483, 33, 11673, 4501, 697, 11592, 4017, 3860, 8372, 5475, 4573, 1305, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as AppLauncherNativeConstantsModule from '../../AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */
import * as UseTokenModule from '../../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as AppLauncherBackButtonModule from '../../base_components/AppLauncherBackButton.tsx'; /* Metro dependency 11673 */
function _fun89631(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:6, offset: 0x02017651, size: 603 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(1483) /* metro dependency 1483: AppLauncherNativeConstants */;
let value = AppLauncherNativeConstantsModule;
const DEFAULT_CONTENT_PADDING = value.DEFAULT_CONTENT_PADDING;
const SCREEN_BACKGROUND_COLOR = value.SCREEN_BACKGROUND_COLOR;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
const BACK_BUTTON_SIZE = (require(11673) /* metro dependency 11673: AppLauncherBackButton */).BACK_BUTTON_SIZE;
const BACK_BUTTON_SIZE = (AppLauncherBackButtonModule).BACK_BUTTON_SIZE;
value = BACK_BUTTON_SIZE + 2 * DEFAULT_CONTENT_PADDING + 36 + 4;
const env0_8 = value - 56;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.headerContainer = {'alignItems': 'center', 'flexDirection': 'row', 'justifyContent': 'space-between',
const createStyles = CreateStylesModule.createStyles;
object = {};
object.headerContainer = {'alignItems': 'center', 'flexDirection': 'row', 'justifyContent': 'space-between',
'position': 'absolute', 'top': -16, 'left': 0, 'right': 0, padding: DEFAULT_CONTENT_PADDING};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.loadingHeaderContainer = {backgroundColor: BACKGROUND_BASE_LOWEST};
const object3 = {'position': 'absolute', 'padding': 4, 'bottom': -36, 'left': '50%'};
object3.backgroundColor = SCREEN_BACKGROUND_COLOR;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl + 4;
object2.appIconMask = object3;
const object6 = {'width': 72, 'height': 72};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object2.appIcon = object6;
object.loadingHeaderContainer = {backgroundColor: BACKGROUND_BASE_LOWEST};
const object4 = {'position': 'absolute', 'padding': 4, 'bottom': -36, 'left': '50%'};
object4.backgroundColor = SCREEN_BACKGROUND_COLOR;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl + 4;
object.appIconMask = object4;
const object5 = {'width': 72, 'height': 72};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object.appIcon = object5;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.loadingIcon = {backgroundColor: BACKGROUND_MOD_MUTED};
object2.appSmallName = {'textAlign': 'center', 'pointerEvents': 'none', 'flexGrow': 1, 'marginHorizontal': 8};
object2.icon = {transform: [{rotate: '180deg'}]};
object2.headerBannerOverlay = {'backgroundColor': 'black', 'position': 'absolute', 'top': 0, 'left': 0, 'right': 0,
object.loadingIcon = {backgroundColor: BACKGROUND_MOD_MUTED};
object.appSmallName = {'textAlign': 'center', 'pointerEvents': 'none', 'flexGrow': 1, 'marginHorizontal': 8};
object.icon = {transform: [{rotate: '180deg'}]};
object.headerBannerOverlay = {'backgroundColor': 'black', 'position': 'absolute', 'top': 0, 'left': 0, 'right': 0,
'bottom': 0};
const styles = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: "function AppLauncherCommandViewHeaderTsx1(){const{interpolate,scrollOffsetY,TOTAL_SCROLL_RANGE}=this.__closure;return{opacity:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[0,1],'clamp'),transform:[{translateY:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[12,0],'clamp')}]};}"};
object2 = {code: "function AppLauncherCommandViewHeaderTsx2(){const{APP_ICON_SIZE,APP_ICON_BORDER_WIDTH,DEFAULT_CONTENT_PADDING,interpolate,scrollOffsetY,TOTAL_SCROLL_RANGE}=this.__closure;return{transform:[{translateX:-APP_ICON_SIZE/2-APP_ICON_BORDER_WIDTH+DEFAULT_CONTENT_PADDING},{translateY:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[0,-APP_ICON_SIZE/2],'clamp')},{scale:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[1,0],'clamp')}],opacity:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[1,0],'clamp')};}"};
object2 = {code: "function AppLauncherCommandViewHeaderTsx3(){const{interpolate,scrollOffsetY,TOTAL_SCROLL_RANGE}=this.__closure;return{opacity:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[0,0.5],'clamp')};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/command_view/AppLauncherCommandViewHeader.tsx');
const styles = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: "function AppLauncherCommandViewHeaderTsx1(){const{interpolate,scrollOffsetY,TOTAL_SCROLL_RANGE}=this.__closure;return{opacity:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[0,1],'clamp'),transform:[{translateY:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[12,0],'clamp')}]};}"};
object = {code: "function AppLauncherCommandViewHeaderTsx2(){const{APP_ICON_SIZE,APP_ICON_BORDER_WIDTH,DEFAULT_CONTENT_PADDING,interpolate,scrollOffsetY,TOTAL_SCROLL_RANGE}=this.__closure;return{transform:[{translateX:-APP_ICON_SIZE/2-APP_ICON_BORDER_WIDTH+DEFAULT_CONTENT_PADDING},{translateY:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[0,-APP_ICON_SIZE/2],'clamp')},{scale:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[1,0],'clamp')}],opacity:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[1,0],'clamp')};}"};
object = {code: "function AppLauncherCommandViewHeaderTsx3(){const{interpolate,scrollOffsetY,TOTAL_SCROLL_RANGE}=this.__closure;return{opacity:interpolate(scrollOffsetY.get(),[0,TOTAL_SCROLL_RANGE],[0,0.5],'clamp')};}"};
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/command_view/AppLauncherCommandViewHeader.tsx');
exports.COLLAPSED_HEADER_HEIGHT = 56;
exports.EXPANDED_HEADER_TOTAL_CONSUMED_SPACE_IN_PARENT = value + -16;
exports.useStyles = styles;
exports.AppLauncherCommandViewHeader = AppLauncherCommandViewHeader;
function AppLauncherCommandViewHeader({command, onPressBack, scrollOffsetY, section}) { // fn#89632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:2264, offset: 0x020178ac, size: 948 bytes, params: 2, frame: 31
const styles = useStyles();
let binding = ReactModule;
const value3 = binding.useMemo(_fun89633, [section]);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = AppLauncherCommandViewHeaderA;
object = {interpolate: ReanimatedRexportModule.interpolate, scrollOffsetY: scrollOffsetY};
binding = env0_8;
object.TOTAL_SCROLL_RANGE = binding;
closure.__closure = object;
closure.__workletHash = 15596175827193;
closure.__initData = env0_10;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = AppLauncherCommandViewHeaderE;
object = {'APP_ICON_SIZE': 72, 'APP_ICON_BORDER_WIDTH': 4};
object.DEFAULT_CONTENT_PADDING = DEFAULT_CONTENT_PADDING;
object.interpolate = ReanimatedRexportModule.interpolate;
object.scrollOffsetY = scrollOffsetY;
object.TOTAL_SCROLL_RANGE = binding;
closure.__closure = object;
closure.__workletHash = 13563524587234;
closure.__initData = env0_11;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = AppLauncherCommandViewHeaderN;
closure.__closure = {interpolate: ReanimatedRexportModule.interpolate, scrollOffsetY: scrollOffsetY,
TOTAL_SCROLL_RANGE: binding};
closure.__workletHash = 2637023147700;
closure.__initData = env0_12;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const value9 = (importDefault(8372) /* metro dependency 8372: useAvatarColor */)(typeof value3 === 'number' ? value3 : value3?.uri,
Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOW]) ?? '');
const r8 = (
value3 != null
? ((Component) => <Component style={styles.appIcon} source={value3} />)(importDefault(5475) /* metro dependency 5475: FastImage */)
: (
<View style={[styles.appIcon, styles.loadingIcon]} />
)
);
const items2 = [styles.headerContainer];
items2[1] = command == null ? styles.loadingHeaderContainer : {backgroundColor: value9};
const View2 = (ReanimatedRexport).View;
const items4 = [
<View2 style={[styles.headerBannerOverlay, value6]} />,
];
items4[1] = ((Component) => <Component onPress={onPressBack} />)(importDefault(11673) /* metro dependency 11673: AppLauncherBackButton */);
const Text = (TextModule).Text;
items4[2] = (
<Text
lineClamp={1}
animated
style={[styles.appSmallName, value4]}
variant="heading-lg/bold"
color="white"
>
{command?.displayName}
</Text>
);
const Spacer = (NativeModule).Spacer;
items4[3] = <Spacer size={32} />;
const View3 = (ReanimatedRexport).View;
items4[4] = (
<View3 style={[styles.appIconMask, value5]}>
{r8}
</View3>
);
return (
<View style={items2}>
{items4}
</View>
);
function _fun89633() { // fn#89633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:2384, offset: 0x02017c60, size: 63 bytes, params: 1, frame: 14
const value = environment.__proto__;
return (require(11592) /* metro dependency 11592: AppLauncherNativeUtils */).getAppLauncherIconSource(section?.application);
}
function AppLauncherCommandViewHeaderA() { // fn#89634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:2488, owner: AppLauncherCommandViewHeader.A, offset: 0x02017c9f, size: 177 bytes, params: 1, frame: 24
const object = {};
let value = environment.__proto__;
const interpolate = ReanimatedRexportModule.interpolate;
const scrollOffsetYBinding = scrollOffsetY;
const value3 = scrollOffsetYBinding.get();
const binding = env1_8;
object.opacity = Reflect.apply(interpolate, ReanimatedRexportModule, [value3, [0, binding], [0, 1], 'clamp']);
value = ReanimatedRexportModule;
object.transform = [{translateY: value.interpolate(scrollOffsetYBinding.get(), [0, binding], [12, 0], 'clamp')}];
return object;
}
function AppLauncherCommandViewHeaderE() { // fn#89635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:2790, owner: AppLauncherCommandViewHeader.E, offset: 0x02017d50, size: 284 bytes, params: 1, frame: 26
const object = {};
let value = environment.__proto__;
const items2 = [{translateX: -40 + DEFAULT_CONTENT_PADDING}];
const interpolate = ReanimatedRexportModule.interpolate;
const scrollOffsetYBinding = scrollOffsetY;
const value3 = scrollOffsetYBinding.get();
const binding = env1_8;
items2[1] = {translateY: Reflect.apply(interpolate, ReanimatedRexportModule, [value3, [0, binding], [0, -36],
'clamp'])};
value = ReanimatedRexportModule;
items2[2] = {scale: value.interpolate(scrollOffsetYBinding.get(), [0, binding], [1, 0], 'clamp')};
object.transform = items2;
value = ReanimatedRexportModule;
object.opacity = value.interpolate(scrollOffsetYBinding.get(), [0, binding], [1, 0], 'clamp');
return object;
}
function AppLauncherCommandViewHeaderN() { // fn#89636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:3236, owner: AppLauncherCommandViewHeader.N, offset: 0x02017e6c, size: 97 bytes, params: 1, frame: 18
return {opacity: ReanimatedRexportModule.interpolate(scrollOffsetY.get(), [0, env1_8], [0, 0.5], 'clamp')};
}
}
}
function AppLauncherCommandViewHeader({command, onPressBack, scrollOffsetY, section}) { // fn#89632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:2264, offset: 0x020178ac, size: 948 bytes, params: 2, frame: 31
var object2;
const styles = useStyles();
let binding = env0_3;
const value3 = binding.useMemo(_fun89633, [section]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = AppLauncherCommandViewHeaderA;
object2 = {interpolate: reanimatedRexportModule.interpolate, scrollOffsetY: scrollOffsetY};
binding = env0_8;
object2.TOTAL_SCROLL_RANGE = binding;
closure.__closure = object2;
closure.__workletHash = 15596175827193;
closure.__initData = env0_10;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
useAnimatedStyle = moduleValue2.useAnimatedStyle;
closure = AppLauncherCommandViewHeaderE;
object2 = {'APP_ICON_SIZE': 72, 'APP_ICON_BORDER_WIDTH': 4};
object2.DEFAULT_CONTENT_PADDING = DEFAULT_CONTENT_PADDING;
object2.interpolate = reanimatedRexportModule.interpolate;
object2.scrollOffsetY = scrollOffsetY;
object2.TOTAL_SCROLL_RANGE = binding;
closure.__closure = object2;
closure.__workletHash = 13563524587234;
closure.__initData = env0_11;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = AppLauncherCommandViewHeaderN;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, scrollOffsetY: scrollOffsetY,
TOTAL_SCROLL_RANGE: binding};
closure.__workletHash = 2637023147700;
closure.__initData = env0_12;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value9 = (importDefault(8372) /* metro dependency 8372: useAvatarColor */)(typeof value3 === 'number' ? value3 : value3?.uri,
Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW]) ?? '');
const r8 = value3 != null ? ((Component) => <Component style={styles.appIcon} source={value3} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : <View style={[styles.appIcon,
styles.loadingIcon]} />;
const items2 = [styles.headerContainer];
items2[1] = command == null ? styles.loadingHeaderContainer : {backgroundColor: value9};
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [<View2 style={[styles.headerBannerOverlay, value6]} />];
items4[1] = ((Component) => <Component onPress={onPressBack} />)(importDefault(11673) /* metro dependency 11673: AppLauncherBackButton */);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items4[2] = <Text lineClamp={1} animated style={[styles.appSmallName,
value4]} variant="heading-lg/bold" color="white">{command?.displayName}</Text>;
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
items4[3] = <Spacer size={32} />;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items4[4] = <View3 style={[styles.appIconMask, value5]}>{r8}</View3>;
return (
<View style={items2}>
{items4}
</View>
);
}
function _fun89633() { // fn#89633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:2384, offset: 0x02017c60, size: 63 bytes, params: 1, frame: 14
const value = environment.__proto__;
return (require(11592) /* metro dependency 11592: AppLauncherNativeUtils */).getAppLauncherIconSource(section?.application);
}
function AppLauncherCommandViewHeaderA() { // fn#89634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:2488, owner: AppLauncherCommandViewHeader.A, offset: 0x02017c9f, size: 177 bytes, params: 1, frame: 24
const object2 = {};
let value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
const scrollOffsetYBinding = scrollOffsetY;
const value3 = scrollOffsetYBinding.get();
const binding = env1_8;
object2.opacity = Reflect.apply(interpolate, reanimatedRexportModule, [value3, [0, binding], [0, 1], 'clamp']);
value = reanimatedRexportModule;
object2.transform = [{translateY: value.interpolate(scrollOffsetYBinding.get(), [0, binding], [12, 0], 'clamp')}];
return object2;
}
function AppLauncherCommandViewHeaderE() { // fn#89635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:2790, owner: AppLauncherCommandViewHeader.E, offset: 0x02017d50, size: 284 bytes, params: 1, frame: 26
const object2 = {};
let value = environment.__proto__;
const items2 = [{translateX: -40 + DEFAULT_CONTENT_PADDING}];
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
const scrollOffsetYBinding = scrollOffsetY;
const value3 = scrollOffsetYBinding.get();
const binding = env1_8;
items2[1] = {translateY: Reflect.apply(interpolate, reanimatedRexportModule, [value3, [0, binding], [0, -36],
'clamp'])};
value = reanimatedRexportModule;
items2[2] = {scale: value.interpolate(scrollOffsetYBinding.get(), [0, binding], [1, 0], 'clamp')};
object2.transform = items2;
value = reanimatedRexportModule;
object2.opacity = value.interpolate(scrollOffsetYBinding.get(), [0, binding], [1, 0], 'clamp');
return object2;
}
function AppLauncherCommandViewHeaderN() { // fn#89636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11878:3236, owner: AppLauncherCommandViewHeader.N, offset: 0x02017e6c, size: 97 bytes, params: 1, frame: 18
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
return {opacity: reanimatedRexportModule.interpolate(scrollOffsetY.get(), [0, env1_8], [0, 0.5], 'clamp')};
}
global.__d(_fun89631, 11692, [31, 27, 1483, 33, 11673, 4501, 697, 11592, 4017, 3860, 8372, 5475, 4573, 1305,
2]) /* metro module 11692, dependencies: [31, 27, 1483, 33, 11673, 4501, 697, 11592, 4017, 3860, 8372, 5475, 4573, 1305, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,16 +1,20 @@
/* Metro module 11697; source: modules/app_launcher/native/screens/command_view/CommandOptionView.tsx; dependencies: [31, 27, 4502, 33, 1909, 4501, 697, 566, 4017, 11698, 11699, 4573, 11700, 1305, 11077, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AccessibilityStore from '../../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ServerModule from '../../../../../flow/Server.tsx'; /* Metro dependency 1909 */
function _fun89667(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11883:6, offset: 0x020195ea, size: 652 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
ReactModule;
const Set = global.Set;
const ApplicationCommandOptionType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandOptionType;
const ApplicationCommandOptionType = (ServerModule).ApplicationCommandOptionType;
let STRING = ApplicationCommandOptionType.STRING;
let INTEGER = ApplicationCommandOptionType.INTEGER;
const ATTACHMENT = ApplicationCommandOptionType.ATTACHMENT;
@@ -23,99 +27,127 @@ function _fun89667(global, require, importDefault, importAll, module, exports, d
let set = new Set([STRING, INTEGER, ATTACHMENT, BOOLEAN, MENTIONABLE, USER, ROLE, CHANNEL, NUMBER]);
set = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = set.createStyles;
const ICON_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL;
const ICON_FEEDBACK_CRITICAL = (Native).colors.ICON_FEEDBACK_CRITICAL;
const env0_8 = Reflect.apply(createStyles, set, [{optionDescription: {marginTop: 4},
optionErrorContainer: {'flexDirection': 'row', 'alignItems': 'center', 'marginTop': 4},
optionErrorIcon: {'marginRight': 4, 'tintColor': null, 'alignItems': 'center',
tintColor: ICON_FEEDBACK_CRITICAL}, labelText: {marginBottom: 8}}]);
STRING = ApplicationCommandOptionType.STRING;
items = [STRING];
items2 = [STRING];
INTEGER = ApplicationCommandOptionType.INTEGER;
items[1] = INTEGER;
items2[1] = INTEGER;
NUMBER = ApplicationCommandOptionType.NUMBER;
items[2] = NUMBER;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/command_view/CommandOptionView.tsx');
items2[2] = NUMBER;
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/command_view/CommandOptionView.tsx');
exports.default = CommandOptionView;
}
function CommandOptionView({style, option, autoFocusType, onDismiss, editedOptions, onOptionViewLayout, onStartEditing, onEndEditing, onOptionValueChange, onPressOption, onPressAttachmentOption, channel, optionValidationResults, setFocusedOption, command, optionValues, isPreSelectedOption}) { // fn#89668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11883:1085, offset: 0x02019876, size: 1181 bytes, params: 2, frame: 44
var r4;
var r6;
var r12;
var value4;
var FadeInUp;
var value6;
var value9;
var LayoutAnimationConfig;
var AwaitAnimationContext;
var object2;
var View2;
var object4;
var items2;
var View3;
var value;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [AccessibilityStore];
const useReducedMotion = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return AccessibilityStore.useReducedMotion;
}]);
const ReduceMotion = (require(4017) /* metro dependency 4017: ReanimatedRexport */).ReduceMotion;
const r5 = useReducedMotion ? ReduceMotion.Always : ReduceMotion.Never;
const {EnteringAnimation,
registerAnimationCompleteCallback} = (require(11698) /* metro dependency 11698: useOptionAnimations */).useOptionEnteringAnimation();
let binding = env0_7;
if (binding.has(option.type)) {
r4 = option.required || isPreSelectedOption;
r6 = r4 ? function(a0) {
return a0();
} : registerAnimationCompleteCallback;
value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).FadeOut.reduceMotion(r5);
FadeInUp = (require(4017) /* metro dependency 4017: ReanimatedRexport */).FadeInUp;
value6 = FadeInUp.withInitialValues({transform: [{translateY: -10}]}).reduceMotion(r5);
r12 = editedOptions.has(option.name) && optionValidationResults[option.name]?.error != null;
binding = env0_9;
value9 = binding.includes(option.type);
LayoutAnimationConfig = (require(4017) /* metro dependency 4017: ReanimatedRexport */).LayoutAnimationConfig;
object = {skipEntering: r4};
AwaitAnimationContext = (require(11699) /* metro dependency 11699: useAwaitAnimationComplete */).AwaitAnimationContext;
object2 = {handleQueuedCallback: r6};
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {collapsable: false, entering: EnteringAnimation,
exiting: (require(11698) /* metro dependency 11698: useOptionAnimations */).ExitingAnimation,
layout: (require(11698) /* metro dependency 11698: useOptionAnimations */).LayoutAnimation,
onLayout: onLayout_89671};
object4 = {collapsable: false, style: style};
items2 = [value9 && ((Text) => <Text style={styles.labelText} variant="text-sm/semibold" color="text-subtle">{option.displayName}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
items2[1] = ((Component) => <Component option={option} onStartEditing={onStartEditing} onEndEditing={onEndEditing} onDismiss={onDismiss} onOptionValueChange={onOptionValueChange} onFocus={onFocus_89672} onPress={onPress_89673} onPressAttachmentOption={onPressAttachmentOption} channel={channel} autoFocusType={autoFocusType} command={command} optionValues={optionValues} hasError={r12} />)(importDefault(11700) /* metro dependency 11700: AppLauncherCommandOption */);
items2[2] = ((Text) => <Text style={styles.optionDescription} variant="text-xs/medium" color="text-muted">{option.displayDescription}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
if (r12) {
View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view3Props = {collapsable: false, entering: value6, exiting: value4,
style: styles.optionErrorContainer};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
value = <Icon style={styles.optionErrorIcon} source={importDefault(11077) /* metro dependency 11077 */} size={(require(1305) /* metro dependency 1305: native */).IconSizes.REFRESH_SMALL_16} />;
value = <View3 {...view3Props}>{value}{((Text) => <Text variant="text-xs/medium" color="text-feedback-critical">{optionValidationResults[option.name].error}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View3>;
r12 = value;
function CommandOptionView({style, option, autoFocusType, onDismiss, editedOptions, onOptionViewLayout, onStartEditing, onEndEditing, onOptionValueChange, onPressOption, onPressAttachmentOption, channel, optionValidationResults, setFocusedOption, command, optionValues, isPreSelectedOption}) { // fn#89668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11883:1085, offset: 0x02019876, size: 1181 bytes, params: 2, frame: 44
var r4;
var r6;
var r12;
var value4;
var FadeInUp;
var value6;
var value9;
var LayoutAnimationConfig;
var AwaitAnimationContext;
var object3;
var View2;
var object5;
var items2;
var View3;
var value;
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
let object = [AccessibilityStore];
const useReducedMotion = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return AccessibilityStore.useReducedMotion;
}]);
const ReduceMotion = (require(4017) /* metro dependency 4017: ReanimatedRexport */).ReduceMotion;
const r5 = useReducedMotion ? ReduceMotion.Always : ReduceMotion.Never;
const {EnteringAnimation,
registerAnimationCompleteCallback} = (require(11698) /* metro dependency 11698: useOptionAnimations */).useOptionEnteringAnimation();
let binding = env0_7;
if (binding.has(option.type)) {
r4 = option.required || isPreSelectedOption;
r6 = r4 ? function(a0) {
return a0();
} : registerAnimationCompleteCallback;
value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).FadeOut.reduceMotion(r5);
FadeInUp = (require(4017) /* metro dependency 4017: ReanimatedRexport */).FadeInUp;
value6 = FadeInUp.withInitialValues({transform: [{translateY: -10}]}).reduceMotion(r5);
r12 = editedOptions.has(option.name) && optionValidationResults[option.name]?.error != null;
binding = env0_9;
value9 = binding.includes(option.type);
LayoutAnimationConfig = (require(4017) /* metro dependency 4017: ReanimatedRexport */).LayoutAnimationConfig;
object = {skipEntering: r4};
AwaitAnimationContext = (require(11699) /* metro dependency 11699: useAwaitAnimationComplete */).AwaitAnimationContext;
object3 = {handleQueuedCallback: r6};
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {collapsable: false, entering: EnteringAnimation,
exiting: (require(11698) /* metro dependency 11698: useOptionAnimations */).ExitingAnimation,
layout: (require(11698) /* metro dependency 11698: useOptionAnimations */).LayoutAnimation,
onLayout: onLayout_89671};
object5 = {collapsable: false, style: style};
items2 = [
value9 && ((Text) => <Text style={styles.labelText} variant="text-sm/semibold" color="text-subtle">{option.displayName}</Text>)((require(4573) /* metro dependency 4573: Text */).Text),
];
items2[1] = ((Component) => <Component option={option} onStartEditing={onStartEditing} onEndEditing={onEndEditing} onDismiss={onDismiss} onOptionValueChange={onOptionValueChange} onFocus={onFocus_89672} onPress={onPress_89673} onPressAttachmentOption={onPressAttachmentOption} channel={channel} autoFocusType={autoFocusType} command={command} optionValues={optionValues} hasError={r12} />)(importDefault(11700) /* metro dependency 11700: AppLauncherCommandOption */);
items2[2] = ((Text) => <Text style={styles.optionDescription} variant="text-xs/medium" color="text-muted">{option.displayDescription}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
if (r12) {
View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view3Props = {collapsable: false, entering: value6, exiting: value4,
style: styles.optionErrorContainer};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
value = (
<Icon
style={styles.optionErrorIcon}
source={importDefault(11077) /* metro dependency 11077 */}
size={(require(1305) /* metro dependency 1305: native */).IconSizes.REFRESH_SMALL_16}
/>
);
value = (
<View3 {...view3Props}>
{value}
{((Text) => <Text variant="text-xs/medium" color="text-feedback-critical">{optionValidationResults[option.name].error}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View3>
);
r12 = value;
}
items2[3] = r12;
return (
<LayoutAnimationConfig {...object}>
<AwaitAnimationContext {...object3}>
<View2 {...view2Props}>
<View {...object5}>
{items2}
</View>
</View2>
</AwaitAnimationContext>
</LayoutAnimationConfig>
);
}
items2[3] = r12;
return (
<LayoutAnimationConfig {...object}>
<AwaitAnimationContext {...object2}>
<View2 {...view2Props}>
<View {...object4}>
{items2}
</View>
</View2>
</AwaitAnimationContext>
</LayoutAnimationConfig>
);
return null;
function CommandOptionViewOnLayout(a0) { // fn#89671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11883:2128, owner: CommandOptionView.onLayout, offset: 0x02019d13, size: 24 bytes, params: 2, frame: 13
onOptionViewLayout(a0, option);
}
function CommandOptionViewOnFocus() { // fn#89672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11883:2392, owner: CommandOptionView.onFocus, offset: 0x02019d2b, size: 20 bytes, params: 1, frame: 11
return setFocusedOption(option);
}
function CommandOptionViewOnPress() { // fn#89673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11883:2409, owner: CommandOptionView.onPress, offset: 0x02019d3f, size: 20 bytes, params: 1, frame: 11
return onPressOption(option);
}
function onPressAttachmentOption() { // fn#89674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11883:2442, owner: CommandOptionView.onPressAttachmentOption, offset: 0x01c39198, size: 20 bytes, params: 1, frame: 11
return onPressAttachmentOption(option);
}
}
return null;
}
function CommandOptionViewOnLayout(a0) { // fn#89671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11883:2128, owner: CommandOptionView.onLayout, offset: 0x02019d13, size: 24 bytes, params: 2, frame: 13
onOptionViewLayout(a0, option);
}
global.__d(_fun89667, 11697, [31, 27, 4502, 33, 1909, 4501, 697, 566, 4017, 11698, 11699, 4573, 11700, 1305, 11077,
2]) /* metro module 11697, dependencies: [31, 27, 4502, 33, 1909, 4501, 697, 566, 4017, 11698, 11699, 4573, 11700, 1305, 11077, 2] */;
@@ -1,67 +1,98 @@
/* Metro module 11728; source: modules/app_launcher/native/screens/command_view/OptionalCommandOptionList.tsx; dependencies: [31, 27, 33, 4501, 697, 6238, 5278, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
function _fun89880(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11914:6, offset: 0x020221e7, size: 415 bytes, params: 8, frame: 22
var object4;
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 env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {'overflow': 'hidden', 'borderWidth': 1};
ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'overflow': 'hidden', 'borderWidth': 1};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object2.borderColor = BORDER_SUBTLE;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const SHADOW_BORDER = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_BORDER;
copyDataProperties(object5, SHADOW_BORDER, undefined);
object4.container = object5;
const object6 = {'borderRadius': null, 'minWidth': 48, 'height': 32, 'justifyContent': 'center',
copyDataProperties(object2, SHADOW_BORDER, undefined);
object.container = object2;
const object3 = {'borderRadius': null, 'minWidth': 48, 'height': 32, 'justifyContent': 'center',
'alignItems': 'center', 'paddingHorizontal': 12};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object6.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object4.addButton = object6;
object3.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object.addButton = object3;
const REDESIGN_BUTTON_TERTIARY_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_TEXT;
object4.addButtonText = {color: REDESIGN_BUTTON_TERTIARY_TEXT};
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/command_view/OptionalCommandOptionList.tsx');
object.addButtonText = {color: REDESIGN_BUTTON_TERTIARY_TEXT};
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/command_view/OptionalCommandOptionList.tsx');
exports.default = OptionalCommandOptionList;
function OptionList({options, onSelectOption, style}) { // fn#89881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11914:628, offset: 0x02022386, size: 113 bytes, params: 2, frame: 18
const styles = useStyles();
return (
<View style={[styles.container, style]} collapsable={false}>
{options.map(_fun89882)}
</View>
);
function _fun89882(a0, a1) { // fn#89882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11914:761, offset: 0x020223f7, size: 299 bytes, params: 3, frame: 26
const env0_0 = a0;
const TableRow = (TableRowNativeModule).TableRow;
const tableRowProps = {onPress: onPress_89883, start: false, end: a1 === options.length - 1, label: a0.displayName,
subLabel: a0.displayDescription};
const PressableOpacity = (PressablesModule).PressableOpacity;
const object2 = {accessibilityRole: 'button'};
const stylesBinding = styles;
object2.style = stylesBinding.addButton;
object2.onPress = onPress_89884;
const Text = (TextModule).Text;
const addButtonText = stylesBinding.addButtonText;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const OYkgVk = (IndexNativeModule).t.OYkgVk;
tableRowProps.trailing = (
<PressableOpacity {...object2}>
<Text variant="text-sm/semibold" style={addButtonText}>
{Reflect.apply(string, intl, [OYkgVk])}
</Text>
</PressableOpacity>
);
return <TableRow {...tableRowProps} key={a0.name} />;
function onPress_89883() { // fn#89883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11914:796, offset: 0x01e3bae8, size: 23 bytes, params: 1, frame: 11
return onSelectOption(env0_0);
}
function onPress_89884() { // fn#89884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11914:973, offset: 0x01e3bae8, size: 23 bytes, params: 1, frame: 11
return onSelectOption(env0_0);
}
}
}
function OptionalCommandOptionList({options, onSelectOption, style}) { // fn#89885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11914:1242, offset: 0x02022522, size: 71 bytes, params: 2, frame: 16
return (
options.length > 0
? (
<OptionList
style={style}
options={options}
onSelectOption={onSelectOption}
/>
)
: null
);
}
}
function OptionList({options, onSelectOption, style}) { // fn#89881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11914:628, offset: 0x02022386, size: 113 bytes, params: 2, frame: 18
const styles = useStyles();
return (
<View style={[styles.container, style]} collapsable={false}>
{options.map(_fun89882)}
</View>
);
}
function OptionalCommandOptionList({options, onSelectOption, style}) { // fn#89885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11914:1242, offset: 0x02022522, size: 71 bytes, params: 2, frame: 16
return options.length > 0 ? <OptionList style={style} options={options} onSelectOption={onSelectOption} /> : null;
}
function _fun89882(a0, a1) { // fn#89882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11914:761, offset: 0x020223f7, size: 299 bytes, params: 3, frame: 26
const env0_0 = a0;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {onPress: onPress_89883, start: false, end: a1 === options.length - 1, label: a0.displayName,
subLabel: a0.displayDescription};
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object = {accessibilityRole: 'button'};
const stylesBinding = styles;
object.style = stylesBinding.addButton;
object.onPress = onPress_89884;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const addButtonText = stylesBinding.addButtonText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const OYkgVk = (require(1244) /* metro dependency 1244: indexNative */).t.OYkgVk;
tableRowProps.trailing = <PressableOpacity {...object}><Text variant="text-sm/semibold" style={addButtonText}>{Reflect.apply(string,
intl, [OYkgVk])}</Text></PressableOpacity>;
return <TableRow {...tableRowProps} key={a0.name} />;
}
global.__d(_fun89880, 11728, [31, 27, 33, 4501, 697, 6238, 5278, 4573, 1244,
2]) /* metro module 11728, dependencies: [31, 27, 33, 4501, 697, 6238, 5278, 4573, 1244, 2] */;
@@ -1,133 +1,137 @@
/* Metro module 11698; source: modules/app_launcher/native/screens/command_view/hooks/useOptionAnimations.tsx; dependencies: [57, 31, 4504, 4017, 2] */
import Module00057 from '../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
function _fun89675(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:6, offset: 0x02019d53, size: 227 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
object = {code: 'function LayoutAnimation_useOptionAnimationsTsx1(values){const{withTiming,OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION}=this.__closure;const animations={originY:withTiming(values.targetOriginY,{duration:OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION})};const initialValues={originY:values.currentOriginY};return{initialValues:initialValues,animations:animations};}'};
const value = _fun89676();
object = {code: 'function ExitingAnimation_useOptionAnimationsTsx2(values){const{withTiming,OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION}=this.__closure;const offScreenX=Math.min(values.currentOriginX-values.windowWidth,-values.windowWidth);const animations={opacity:withTiming(0,{duration:OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION}),originX:withTiming(offScreenX,{duration:OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION})};const initialValues={originX:values.currentOriginX,opacity:1};return{initialValues:initialValues,animations:animations};}'};
const value2 = _fun89678();
object = {code: 'function useOptionAnimationsTsx3(){const{withTiming,Easing,OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION,withDelay,runOnJS,handleMountAnimationComplete}=this.__closure;const scaleAnimation=withTiming(1,{duration:250,easing:Easing.bezier(0.25,1.75,0.25,1.25)});const opacityAnimation=withTiming(1,{duration:200});const layoutShiftDelay=OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION-100;return{animations:{opacity:withDelay(layoutShiftDelay,opacityAnimation),transform:[{scale:withDelay(layoutShiftDelay,scaleAnimation)}]},initialValues:{opacity:0,transform:[{scale:0.92}]},callback:function(){runOnJS(handleMountAnimationComplete)();}};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/command_view/hooks/useOptionAnimations.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/command_view/hooks/useOptionAnimations.tsx');
exports.OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION = 300;
exports.LayoutAnimation = value;
exports.ExitingAnimation = value2;
exports.useOptionEnteringAnimation = useOptionEnteringAnimation;
}
function _fun89676() { // fn#89676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:488, offset: 0x02019e36, size: 90 bytes, params: 1, frame: 14
const LayoutAnimation2 = LayoutAnimation;
const object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION = 300;
LayoutAnimation2.__closure = object;
LayoutAnimation2.__workletHash = 16804895997501;
LayoutAnimation2.__initData = env0_4;
return LayoutAnimation2;
function LayoutAnimation({targetOriginY, currentOriginY}) { // fn#89677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:519, offset: 0x02019e90, size: 91 bytes, params: 2, frame: 16
const object = {};
const value = environment.__proto__;
object.originY = (require(4504) /* metro dependency 4504: timing */).withTiming(targetOriginY, {duration: 300});
return {initialValues: {originY: currentOriginY}, animations: object};
}
function _fun89676() { // fn#89676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:488, offset: 0x02019e36, size: 90 bytes, params: 1, frame: 14
const closure = LayoutAnimation;
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION = 300;
closure.__closure = object2;
closure.__workletHash = 16804895997501;
closure.__initData = env0_4;
return closure;
}
function _fun89678() { // fn#89678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:1386, offset: 0x02019eeb, size: 90 bytes, params: 1, frame: 14
const closure = ExitingAnimation;
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION = 300;
closure.__closure = object2;
closure.__workletHash = 8977480282966;
closure.__initData = env0_5;
return closure;
}
function useOptionEnteringAnimation() { // fn#89680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:2720, offset: 0x02019fed, size: 153 bytes, params: 1, frame: 16
var object2;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const binding = env0_3;
const env0_1 = binding.useRef([]);
const env0_2 = binding.useCallback(_fun89681, [value2]);
const value3 = binding.useState(_fun89683);
object2 = {};
object2.EnteringAnimation = env0_2(value3, 1)[0];
object2.registerAnimationCompleteCallback = registerAnimationCompleteCallback;
return object2;
}
function LayoutAnimation({targetOriginY, currentOriginY}) { // fn#89677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:519, offset: 0x02019e90, size: 91 bytes, params: 2, frame: 16
const object2 = {};
const value = environment.__proto__;
object2.originY = (require(4504) /* metro dependency 4504: timing */).withTiming(targetOriginY, {duration: 300});
return {initialValues: {originY: currentOriginY}, animations: object2};
}
function ExitingAnimation(a0) { // fn#89679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:1418, offset: 0x02019f45, size: 168 bytes, params: 2, frame: 21
const Math = global.Math;
const min = Math.min;
let value = a0.currentOriginX - a0.windowWidth;
value = Reflect.apply(min, Math, [value, -a0.windowWidth]);
const object2 = {};
object2.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(0, {duration: 300});
object2.originX = (require(4504) /* metro dependency 4504: timing */).withTiming(value, {duration: 300});
return {initialValues: {originX: a0.currentOriginX, opacity: 1}, animations: object2};
}
function _fun89681() { // fn#89681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:2823, offset: 0x0201a086, size: 80 bytes, params: 1, frame: 13
let binding = env0_0;
binding.set(true);
binding = env0_1;
let current = binding.current;
current.forEach(function(a0) {
return a0();
});
current = binding.current;
current.splice(0, binding.current.length);
}
function _fun89683() { // fn#89683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:2924, offset: 0x0201a0d6, size: 165 bytes, params: 1, frame: 16
const closure = n_89684;
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.Easing = Easing;
object2.OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION = 300;
object2.withDelay = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.handleMountAnimationComplete = env0_2;
closure.__closure = object2;
closure.__workletHash = 1048348699475;
closure.__initData = env1_6;
return closure;
}
function registerAnimationCompleteCallback(a0) { // fn#89686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:3576, owner: useOptionEnteringAnimation.registerAnimationCompleteCallback, offset: 0x0201a2c4, size: 53 bytes, params: 2, frame: 12
const binding = env0_0;
const get = binding.get;
if (Reflect.apply(get, binding, [])) {
a0();
} else {
env0_1.current.push(a0);
}
function _fun89678() { // fn#89678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:1386, offset: 0x02019eeb, size: 90 bytes, params: 1, frame: 14
const ExitingAnimation2 = ExitingAnimation;
const object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION = 300;
ExitingAnimation2.__closure = object;
ExitingAnimation2.__workletHash = 8977480282966;
ExitingAnimation2.__initData = env0_5;
return ExitingAnimation2;
function ExitingAnimation(a0) { // fn#89679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:1418, offset: 0x02019f45, size: 168 bytes, params: 2, frame: 21
const Math = global.Math;
const min = Math.min;
let value = a0.currentOriginX - a0.windowWidth;
value = Reflect.apply(min, Math, [value, -a0.windowWidth]);
const object = {};
object.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(0, {duration: 300});
object.originX = (require(4504) /* metro dependency 4504: timing */).withTiming(value, {duration: 300});
return {initialValues: {originX: a0.currentOriginX, opacity: 1}, animations: object};
}
}
function useOptionEnteringAnimation() { // fn#89680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:2720, offset: 0x02019fed, size: 153 bytes, params: 1, frame: 16
const value2 = (ReanimatedRexportModule).useSharedValue(false);
const env0_1 = ReactModule.useRef([]);
const env0_2 = ReactModule.useCallback(_fun89681, [value2]);
const value3 = ReactModule.useState(_fun89683);
object = {};
object.EnteringAnimation = env0_2(value3, 1)[0];
object.registerAnimationCompleteCallback = registerAnimationCompleteCallback;
return object;
function _fun89681() { // fn#89681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:2823, offset: 0x0201a086, size: 80 bytes, params: 1, frame: 13
let binding = env0_0;
binding.set(true);
binding = env0_1;
let current = binding.current;
current.forEach(function(a0) {
return a0();
});
current = binding.current;
current.splice(0, binding.current.length);
}
function _fun89683() { // fn#89683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:2924, offset: 0x0201a0d6, size: 165 bytes, params: 1, frame: 16
const n_896842 = n_89684;
const object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object.Easing = Easing;
object.OPTION_ENTRY_EXIT_LAYOUT_SHIFT_DURATION = 300;
object.withDelay = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay;
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.handleMountAnimationComplete = env0_2;
n_896842.__closure = object;
n_896842.__workletHash = 1048348699475;
n_896842.__initData = env1_6;
return n_896842;
function n_89684() { // fn#89684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:2938, offset: 0x0201a17b, size: 281 bytes, params: 1, frame: 24
var environment;
let value = environment.__proto__.__proto__;
const withTiming = (TimingModule).withTiming;
const object = {duration: 250};
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object.easing = Easing.bezier(0.25, 1.75, 0.25, 1.25);
value = Reflect.apply(withTiming, value, [1, object]);
const value2 = (TimingModule).withTiming(1, {duration: 200});
const object2 = {};
object2.opacity = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay(200, value2);
const object3 = {};
object3.scale = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay(200, value);
object2.transform = [object3];
return {animations: object2, initialValues: {opacity: 0, transform: [{scale: 0.92}]}, callback: callback_89685};
function n_89684Callback() { // fn#89685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:3227, owner: n_89684.callback, offset: 0x0201a294, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env2_2)();
}
}
}
function registerAnimationCompleteCallback(a0) { // fn#89686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:3576, owner: useOptionEnteringAnimation.registerAnimationCompleteCallback, offset: 0x0201a2c4, size: 53 bytes, params: 2, frame: 12
const binding = env0_0;
const get = binding.get;
if (Reflect.apply(get, binding, [])) {
a0();
} else {
env0_1.current.push(a0);
}
}
}
}
function n_89684() { // fn#89684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:2938, offset: 0x0201a17b, size: 281 bytes, params: 1, frame: 24
var environment;
let value = environment.__proto__.__proto__;
const withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const object4 = {duration: 250};
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object4.easing = Easing.bezier(0.25, 1.75, 0.25, 1.25);
value = Reflect.apply(withTiming, value, [1, object4]);
const value2 = (require(4504) /* metro dependency 4504: timing */).withTiming(1, {duration: 200});
const object5 = {};
object5.opacity = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay(200, value2);
const object6 = {};
object6.scale = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay(200, value);
object5.transform = [object6];
return {animations: object5, initialValues: {opacity: 0, transform: [{scale: 0.92}]}, callback: callback_89685};
}
function n_89684Callback() { // fn#89685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11884:3227, owner: n_89684.callback, offset: 0x0201a294, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env2_2)();
}
global.__d(_fun89675, 11698, [57, 31, 4504, 4017,
2]) /* metro module 11698, dependencies: [57, 31, 4504, 4017, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,33 +1,35 @@
/* Metro module 11629; source: modules/app_launcher/native/screens/home/AppLauncherHomeTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun89199(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11815:6, offset: 0x02003e7e, size: 281 bytes, params: 8, frame: 16
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {PLACEHOLDER: 0};
object2[0] = 'PLACEHOLDER';
object2.SECTION_HEADER = 1;
object2[1] = 'SECTION_HEADER';
object2.APP = 2;
object2[2] = 'APP';
object2.SHELF_ITEM = 3;
object2[3] = 'SHELF_ITEM';
object2.SHELF_ITEM_TUPLE = 4;
object2[4] = 'SHELF_ITEM_TUPLE';
object2.DIVIDER_ITEM = 5;
object2[5] = 'DIVIDER_ITEM';
object2.RECOMMENDATION_SECTION_HEADER = 6;
object2[6] = 'RECOMMENDATION_SECTION_HEADER';
object2.RECOMMENDATION_BANNER_CARD = 7;
object2[7] = 'RECOMMENDATION_BANNER_CARD';
object2.RECOMMENDATION_APP = 8;
object2[8] = 'RECOMMENDATION_APP';
object2.RECOMMENDATION_TUPLE = 9;
object2[9] = 'RECOMMENDATION_TUPLE';
object2.VIEW_ALL = 10;
object2[10] = 'VIEW_ALL';
object2.LEARN_MORE = 11;
object2[11] = 'LEARN_MORE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/AppLauncherHomeTypes.tsx');
exports.AppLauncherHomeListItemType = object2;
object = {PLACEHOLDER: 0};
object[0] = 'PLACEHOLDER';
object.SECTION_HEADER = 1;
object[1] = 'SECTION_HEADER';
object.APP = 2;
object[2] = 'APP';
object.SHELF_ITEM = 3;
object[3] = 'SHELF_ITEM';
object.SHELF_ITEM_TUPLE = 4;
object[4] = 'SHELF_ITEM_TUPLE';
object.DIVIDER_ITEM = 5;
object[5] = 'DIVIDER_ITEM';
object.RECOMMENDATION_SECTION_HEADER = 6;
object[6] = 'RECOMMENDATION_SECTION_HEADER';
object.RECOMMENDATION_BANNER_CARD = 7;
object[7] = 'RECOMMENDATION_BANNER_CARD';
object.RECOMMENDATION_APP = 8;
object[8] = 'RECOMMENDATION_APP';
object.RECOMMENDATION_TUPLE = 9;
object[9] = 'RECOMMENDATION_TUPLE';
object.VIEW_ALL = 10;
object[10] = 'VIEW_ALL';
object.LEARN_MORE = 11;
object[11] = 'LEARN_MORE';
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/AppLauncherHomeTypes.tsx');
exports.AppLauncherHomeListItemType = object;
}
global.__d(_fun89199, 11629, [2]) /* metro module 11629, dependencies: [2] */;
@@ -1,47 +1,57 @@
/* Metro module 11653; source: modules/app_launcher/native/screens/home/EmptyState.tsx; dependencies: [31, 27, 33, 4501, 697, 11592, 8048, 11654, 4573, 1244, 2] */
import HomeEmptyState from '../../images/HomeEmptyState.tsx'; /* Metro dependency 11654 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as AppLauncherTypesModule from '../../../AppLauncherTypes.tsx'; /* Metro dependency 8048 */
import * as AppLauncherNativeUtilsModule from '../../AppLauncherNativeUtils.tsx'; /* Metro dependency 11592 */
function _fun89359(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11839:6, offset: 0x0200aac1, size: 284 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;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'padding': 16, 'gap': 16, 'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center',
const object2 = {'padding': 16, 'gap': 16, 'backgroundColor': null, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_6 = Reflect.apply(createStyles, value, [{container: object, textContainer: {textAlign: 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/EmptyState.tsx');
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_6 = Reflect.apply(createStyles, value, [{container: object2, textContainer: {textAlign: 'center'}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/EmptyState.tsx');
exports.default = EmptyState_89360;
function EmptyState_89360() { // fn#89360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11839:465, offset: 0x0200abdd, size: 241 bytes, params: 1, frame: 22
const styles = useStyles();
const useLogAppLauncherEmptyStateView = AppLauncherNativeUtilsModule.useLogAppLauncherEmptyStateView;
const AppLauncherEmptyStateType = (AppLauncherTypesModule).AppLauncherEmptyStateType;
const HOME_EMPTY = AppLauncherEmptyStateType.HOME_EMPTY;
Reflect.apply(useLogAppLauncherEmptyStateView, AppLauncherNativeUtilsModule, [HOME_EMPTY]);
let value = HomeEmptyState;
value = ((Component) => <Component />)(value);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.container}>
{value}
<Text
style={styles.textContainer}
variant="text-md/semibold"
color="text-default"
>
{intl.string((IndexNativeModule).t['V7+xhH'])}
</Text>
</View>
);
}
}
function EmptyState_89360() { // fn#89360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11839:465, offset: 0x0200abdd, size: 241 bytes, params: 1, frame: 22
const styles = useStyles();
const appLauncherNativeUtilsModule = require(11592) /* metro dependency 11592: AppLauncherNativeUtils */;
const useLogAppLauncherEmptyStateView = appLauncherNativeUtilsModule.useLogAppLauncherEmptyStateView;
const AppLauncherEmptyStateType = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEmptyStateType;
const HOME_EMPTY = AppLauncherEmptyStateType.HOME_EMPTY;
Reflect.apply(useLogAppLauncherEmptyStateView, appLauncherNativeUtilsModule, [HOME_EMPTY]);
let value = importDefault(11654) /* metro dependency 11654: HomeEmptyState */;
value = ((Component) => <Component />)(value);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.container}>
{value}
<Text
style={styles.textContainer}
variant="text-md/semibold"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['V7+xhH'])}
</Text>
</View>
);
}
global.__d(_fun89359, 11653, [31, 27, 33, 4501, 697, 11592, 8048, 11654, 4573, 1244,
2]) /* metro module 11653, dependencies: [31, 27, 33, 4501, 697, 11592, 8048, 11654, 4573, 1244, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,76 +1,93 @@
/* Metro module 11594; source: modules/app_launcher/native/screens/home/FrecencySectionStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
import ClassCallCheck from '../../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun88793(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:6, offset: 0x01ff2ac2, size: 318 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_6 = {selection: null};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun88797(PersistedStore);
value.displayName = 'FrecencySectionStore';
value.persistKey = 'FrecencySectionStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{FRECENCY_SECTION_SET_SELECTION: FRECENCY_SECTION_SET_SELECTION});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/FrecencySectionStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/FrecencySectionStore.tsx');
exports.default = value;
exports.FrecencySectionSelection = {APPS: 'apps', COMMANDS: 'commands'};
}
function _isNativeReflectConstruct_88794() { // fn#88794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:148, offset: 0x01ff2c00, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_88794() { // fn#88794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:148, offset: 0x01ff2c00, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_88794_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_88794_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun88797(a0) { // fn#88797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:430, offset: 0x01ff2c62, size: 122 bytes, params: 2, frame: 16
const closure = FrecencySectionStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_88799}, {key: 'getState', value: value_88800},
{key: 'getSelection', value: value_88801}]);
}
function _fun88797(a0) { // fn#88797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:430, offset: 0x01ff2c62, size: 122 bytes, params: 2, frame: 16
const FrecencySectionStore2 = FrecencySectionStore;
Inherits(FrecencySectionStore2, a0);
return CreateClass(FrecencySectionStore2, [{key: 'initialize', value: value_88799}, {key: 'getState',
value: value_88800}, {key: 'getSelection', value: value_88801}]);
function FrecencySectionStore() { // fn#88798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:442, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, FrecencySectionStore);
const value3 = env1_3(FrecencySectionStore);
return env1_2(this, _isNativeReflectConstruct_88794() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function FRECENCY_SECTION_SET_SELECTION({selection}) { // fn#88802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:1072, offset: 0x01ff2d1b, size: 42 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, env0_6, undefined);
object2['selection'] = selection;
}
function value_88799(a0) { // fn#88799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:760, offset: 0x01ff2cdc, size: 20 bytes, params: 2, frame: 2
var value;
if (a0 != null) {
value = environment.__proto__;
env1_6 = a0;
}
}
function value_88800() { // fn#88800, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
function value_88801() { // fn#88801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:859, offset: 0x01ff2cf0, size: 43 bytes, params: 1, frame: 3
return env1_6.selection ?? env1_5.COMMANDS;
}
function value_88799(a0) { // fn#88799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:760, offset: 0x01ff2cdc, size: 20 bytes, params: 2, frame: 2
var value;
if (a0 != null) {
value = environment.__proto__;
env1_6 = a0;
}
function FRECENCY_SECTION_SET_SELECTION({selection}) { // fn#88802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:1072, offset: 0x01ff2d1b, size: 42 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, env0_6, undefined);
object['selection'] = selection;
}
}
function value_88801() { // fn#88801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11780:859, offset: 0x01ff2cf0, size: 43 bytes, params: 1, frame: 3
return env1_6.selection ?? env1_5.COMMANDS;
}
global.__d(_fun88793, 11594, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 11594, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 11596; source: modules/app_launcher/native/screens/home/FrecencySectionStoreActionCreators.tsx; dependencies: [694, 2] */
import Dispatcher from '../../../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun88806(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11782:6, offset: 0x01ff2e11, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/FrecencySectionStoreActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/FrecencySectionStoreActionCreators.tsx');
exports.setFrecencySectionSelection = setFrecencySectionSelection;
function setFrecencySectionSelection(a0) { // fn#88807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11782:235, offset: 0x01ff2e74, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'FRECENCY_SECTION_SET_SELECTION',
selection: a0});
}
}
function setFrecencySectionSelection(a0) { // fn#88807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11782:235, offset: 0x01ff2e74, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'FRECENCY_SECTION_SET_SELECTION',
selection: a0});
}
global.__d(_fun88806, 11596, [694, 2]) /* metro module 11596, dependencies: [694, 2] */;
@@ -1,10 +1,19 @@
/* Metro module 11652; source: modules/app_launcher/native/screens/home/InThisServerSection.tsx; dependencies: [31, 27, 33, 4501, 697, 11629, 1360, 4573, 1244, 5278, 11592, 8554, 8048, 11597, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as GlobalUtilsModule from '../../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NativeModule from '../../../../../design/components/experimental/native.tsx'; /* Metro dependency 8554 */
import * as AppLauncherNativeUtilsModule from '../../AppLauncherNativeUtils.tsx'; /* Metro dependency 11592 */
import * as AppLauncherHomeTypesModule from './AppLauncherHomeTypes.tsx'; /* Metro dependency 11629 */
function _fun89351(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:6, offset: 0x0200a446, size: 469 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
@@ -12,122 +21,128 @@ function _fun89351(global, require, importDefault, importAll, module, exports, d
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const object2 = {};
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
object.backgroundColor = CARD_BACKGROUND_DEFAULT;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.backgroundColor = CARD_BACKGROUND_DEFAULT;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object, SHADOW_LOW, undefined);
object['paddingLeft'] = 12;
object['paddingRight'] = 12;
object['paddingVertical'] = 12;
object['flexDirection'] = 'row';
object['justifyContent'] = 'center';
object['alignItems'] = 'center';
copyDataProperties(object2, SHADOW_LOW, undefined);
object2['paddingLeft'] = 12;
object2['paddingRight'] = 12;
object2['paddingVertical'] = 12;
object2['flexDirection'] = 'row';
object2['justifyContent'] = 'center';
object2['alignItems'] = 'center';
const env0_7 = Reflect.apply(createStyles, value, [{container: {marginBottom: 16},
headerContainer: {justifyContent: 'center'}, viewAll: {'position': 'absolute', 'right': 0},
scrollView: {'marginTop': 8, 'overflow': 'visible'}, scrollViewContentContainer: {gap: 8},
appCardContainer: object, iconContainer: {'marginEnd': 12, 'justifyContent': 'space-around'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/InThisServerSection.tsx');
appCardContainer: object2, iconContainer: {'marginEnd': 12, 'justifyContent': 'space-around'}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/InThisServerSection.tsx');
exports.default = InThisServerSection;
exports.IN_THIS_SERVER_ITEM_MAX = 8;
}
function AppInThisServer({appItem, onAppSelected}) { // fn#89352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:685, offset: 0x0200a61b, size: 295 bytes, params: 2, frame: 23
const styles = useStyles();
const application = appItem.application;
const appLauncherIconSource = (require(11592) /* metro dependency 11592: AppLauncherNativeUtils */).getAppLauncherIconSource(application);
const PressableScale = (require(8554) /* metro dependency 8554: native */).PressableScale;
const pressableScaleProps = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'button',
accessibilityLabel: application.name, onPress: onPress_89353, style: styles.appCardContainer};
const r7 = appLauncherIconSource != null ? ((Component) => <Component iconSource={appLauncherIconSource} wrapperStyle={styles.iconContainer} iconSize={36} />)(importDefault(11597) /* metro dependency 11597: EntityBorderAppIcon */) : null;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<PressableScale {...pressableScaleProps} key={application.id}>
{r7}
<Text
variant="text-md/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
>
{application.name}
</Text>
</PressableScale>
);
}
function InThisServerSection({items, onAppSelected, onViewAllSelected}) { // fn#89354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:1362, offset: 0x0200a79e, size: 608 bytes, params: 2, frame: 31
const env0_2 = undefined;
const styles = useStyles();
if (items.length === 0) {
return null;
}
items.forEach(_fun89355);
const value4 = [].slice(0, 8).map(_fun89356);
const value5 = value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
const binding = env0_2;
const env0_4 = binding == null ? undefined : binding.applications.map(function(a0) {
return a0;
});
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.container}>
<View style={styles.headerContainer}>
<Text variant="text-lg/bold" color="mobile-text-heading-primary">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oJyzCu)}
function AppInThisServer({appItem, onAppSelected}) { // fn#89352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:685, offset: 0x0200a61b, size: 295 bytes, params: 2, frame: 23
const styles = useStyles();
const application = appItem.application;
const appLauncherIconSource = (AppLauncherNativeUtilsModule).getAppLauncherIconSource(application);
const PressableScale = (NativeModule).PressableScale;
const pressableScaleProps = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'button',
accessibilityLabel: application.name, onPress: onPress_89353, style: styles.appCardContainer};
const r7 = (
appLauncherIconSource != null
? ((Component) => <Component iconSource={appLauncherIconSource} wrapperStyle={styles.iconContainer} iconSize={36} />)(importDefault(11597) /* metro dependency 11597: EntityBorderAppIcon */)
: null
);
const Text = (TextModule).Text;
return (
<PressableScale {...pressableScaleProps} key={application.id}>
{r7}
<Text
variant="text-md/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
>
{application.name}
</Text>
{env0_2 != null && ((PressableOpacity) => <PressableOpacity style={styles.viewAll} onPress={onPress_89358} accessibilityRole="button"><Text variant="text-sm/medium" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/qG8v7'])}</Text></PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}
</PressableScale>
);
function AppInThisServerOnPress() { // fn#89353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:913, owner: AppInThisServer.onPress, offset: 0x0200a742, size: 92 bytes, params: 1, frame: 13
var object;
if (onAppSelected != null && application != null) {
onAppSelectedBinding = onAppSelected;
object = {};
object.application = application;
value = environment.__proto__;
object.sectionName = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherSectionName.APPS_IN_THIS_SERVER;
onAppSelectedBinding(object);
}
}
}
function InThisServerSection({items, onAppSelected, onViewAllSelected}) { // fn#89354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:1362, offset: 0x0200a79e, size: 608 bytes, params: 2, frame: 31
const env0_2 = undefined;
const styles = useStyles();
if (items.length === 0) {
return null;
}
items.forEach(_fun89355);
const value4 = [].slice(0, 8).map(_fun89356);
const value5 = value4.filter((GlobalUtilsModule).isNotNullish);
const binding = env0_2;
const env0_4 = binding == null ? undefined : binding.applications.map(function(a0) {
return a0;
});
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.container}>
<View style={styles.headerContainer}>
<Text variant="text-lg/bold" color="mobile-text-heading-primary">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oJyzCu)}
</Text>
{env0_2 != null && ((PressableOpacity) => <PressableOpacity style={styles.viewAll} onPress={onPress_89358} accessibilityRole="button"><Text variant="text-sm/medium" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/qG8v7'])}</Text></PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}
</View>
<ScrollView
style={styles.scrollView}
contentContainerStyle={styles.scrollViewContentContainer}
horizontal
showsHorizontalScrollIndicator={false}
>
{value5}
</ScrollView>
</View>
<ScrollView
style={styles.scrollView}
contentContainerStyle={styles.scrollViewContentContainer}
horizontal
showsHorizontalScrollIndicator={false}
>
{value5}
</ScrollView>
</View>
);
}
);
function _fun89355(a0) { // fn#89355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:1496, offset: 0x0200a9fe, size: 113 bytes, params: 2, frame: 15
let type = a0.type;
const AppLauncherHomeListItemType = (AppLauncherHomeTypesModule).AppLauncherHomeListItemType;
const RECOMMENDATION_APP = AppLauncherHomeListItemType.RECOMMENDATION_APP;
if (type === RECOMMENDATION_APP) {
env0_3.push(a0);
}
type = a0.type;
const VIEW_ALL = AppLauncherHomeListItemType.VIEW_ALL;
if (type === VIEW_ALL) {
env0_2 = a0;
}
}
function _fun89356(a0) { // fn#89356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:1663, offset: 0x0200aa6f, size: 54 bytes, params: 2, frame: 15
return (
<AppInThisServer
appItem={a0}
onAppSelected={onAppSelected}
key={a0.application.id}
/>
);
}
function InThisServerSectionOnPress() { // fn#89358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:2073, owner: InThisServerSection.onPress, offset: 0x0200aaa5, size: 28 bytes, params: 1, frame: 10
return env0_4 != null && onViewAllSelected();
}
function AppInThisServerOnPress() { // fn#89353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:913, owner: AppInThisServer.onPress, offset: 0x0200a742, size: 92 bytes, params: 1, frame: 13
var object2;
if (onAppSelected != null && application != null) {
onAppSelectedBinding = onAppSelected;
object2 = {};
object2.application = application;
value = environment.__proto__;
object2.sectionName = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherSectionName.APPS_IN_THIS_SERVER;
onAppSelectedBinding(object2);
}
}
function _fun89355(a0) { // fn#89355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:1496, offset: 0x0200a9fe, size: 113 bytes, params: 2, frame: 15
let type = a0.type;
const AppLauncherHomeListItemType = (require(11629) /* metro dependency 11629: AppLauncherHomeTypes */).AppLauncherHomeListItemType;
const RECOMMENDATION_APP = AppLauncherHomeListItemType.RECOMMENDATION_APP;
if (type === RECOMMENDATION_APP) {
env0_3.push(a0);
}
type = a0.type;
const VIEW_ALL = AppLauncherHomeListItemType.VIEW_ALL;
if (type === VIEW_ALL) {
env0_2 = a0;
}
}
function _fun89356(a0) { // fn#89356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:1663, offset: 0x0200aa6f, size: 54 bytes, params: 2, frame: 15
return (
<AppInThisServer
appItem={a0}
onAppSelected={onAppSelected}
key={a0.application.id}
/>
);
}
function InThisServerSectionOnPress() { // fn#89358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11838:2073, owner: InThisServerSection.onPress, offset: 0x0200aaa5, size: 28 bytes, params: 1, frame: 10
return env0_4 != null && onViewAllSelected();
}
global.__d(_fun89351, 11652, [31, 27, 33, 4501, 697, 11629, 1360, 4573, 1244, 5278, 11592, 8554, 8048, 11597,
2]) /* metro module 11652, dependencies: [31, 27, 33, 4501, 697, 11629, 1360, 4573, 1244, 5278, 11592, 8554, 8048, 11597, 2] */;
@@ -1,82 +1,114 @@
/* Metro module 11636; source: modules/app_launcher/native/screens/home/LearnMoreAboutAppsSection.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 3853, 1948, 1244, 11637, 8048, 4573, 5278, 2] */
import TrackSectionHeader from './TrackSectionHeader.tsx'; /* Metro dependency 11637 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as AppLauncherTypesModule from '../../../AppLauncherTypes.tsx'; /* Metro dependency 8048 */
function _fun89217(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11822:6, offset: 0x020051cd, size: 473 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object = {};
const object2 = {};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object4.marginTop = PX_32;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.alignItems = 'center';
object2.marginTop = PX_32;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.alignItems = 'center';
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object4.backgroundColor = BACKGROUND_MOD_MUTED;
object2.backgroundColor = BACKGROUND_MOD_MUTED;
const PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
object4.paddingHorizontal = PX_64;
object3.container = object4;
object3.body = {textAlign: 'center'};
object2.paddingHorizontal = PX_64;
object.container = object2;
object.body = {textAlign: 'center'};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.divider = {height: PX_16};
const object6 = {'borderRadius': null, 'backgroundColor': null, 'paddingVertical': 12, 'paddingHorizontal': 16,
object.divider = {height: PX_16};
const object5 = {'borderRadius': null, 'backgroundColor': null, 'paddingVertical': 12, 'paddingHorizontal': 16,
'minHeight': 48, 'justifyContent': 'center', 'alignItems': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const CONTROL_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object6.backgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object5.backgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object6, SHADOW_LOW, undefined);
object3.linkButton = object6;
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/LearnMoreAboutAppsSection.tsx');
copyDataProperties(object5, SHADOW_LOW, undefined);
object.linkButton = object5;
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/LearnMoreAboutAppsSection.tsx');
exports.default = LearnMoreAboutAppsSection;
function LearnMoreAboutAppsSection({visible}) { // fn#89218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11822:802, offset: 0x020053a6, size: 628 bytes, params: 2, frame: 28
const styles = useStyles();
const value2 = ReactModule.useCallback(function() {
importDefault(dependencyMap[6]).openURL(importDefault(dependencyMap[7]).getAppsSupportURL(HelpdeskArticles.APPS_LEARN_MORE));
}, []);
const intl = (IndexNativeModule).intl;
let string = intl.string;
const value3 = Reflect.apply(string, intl, [(IndexNativeModule).t['kw8/Ec']]);
string = intl.string;
const GZoV1O = (IndexNativeModule).t.GZoV1O;
const value4 = Reflect.apply(string, intl, [GZoV1O]);
const value5 = intl.formatToPlainString((IndexNativeModule).t.xx5Sug,
{sectionTitle: value3, sectionBody: value4});
const AppLauncherSectionName = (AppLauncherTypesModule).AppLauncherSectionName;
const NEW_TO_APPS = AppLauncherSectionName.NEW_TO_APPS;
const items2 = [
<View style={styles.divider} />,
];
const Text = (TextModule).Text;
items2[1] = (
<Text variant="heading-lg/bold" color="mobile-text-heading-primary">
{value3}
</Text>
);
items2[2] = (
<Text
variant="text-xs/normal"
color="text-default"
style={styles.body}
>
{value4}
</Text>
);
items2[3] = <View style={styles.divider} />;
const PressableHighlight = (PressablesModule).PressableHighlight;
string = intl.string;
const Ye51oT = (IndexNativeModule).t.Ye51oT;
items2[4] = (
<PressableHighlight
style={styles.linkButton}
onPress={value2}
accessibilityRole="link"
accessibilityLabel={value5}
>
<Text variant="text-md/semibold" color="mobile-text-heading-primary">
{Reflect.apply(string, intl, [Ye51oT])}
</Text>
</PressableHighlight>
);
items2[5] = <View style={styles.divider} />;
return (
<TrackSectionHeader
sectionName={NEW_TO_APPS}
numItems={1}
numVisibleItems={1}
viewed={visible}
>
<View style={styles.container}>
{items2}
</View>
</TrackSectionHeader>
);
}
}
function LearnMoreAboutAppsSection({visible}) { // fn#89218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11822:802, offset: 0x020053a6, size: 628 bytes, params: 2, frame: 28
const styles = useStyles();
const value2 = env0_3.useCallback(function() {
importDefault(dependencyMap[6]).openURL(importDefault(dependencyMap[7]).getAppsSupportURL(HelpdeskArticles.APPS_LEARN_MORE));
}, []);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const value3 = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['kw8/Ec']]);
string = intl.string;
const GZoV1O = (require(1244) /* metro dependency 1244: indexNative */).t.GZoV1O;
const value4 = Reflect.apply(string, intl, [GZoV1O]);
const value5 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.xx5Sug,
{sectionTitle: value3, sectionBody: value4});
const TrackSectionHeader = importDefault(11637) /* metro dependency 11637: TrackSectionHeader */;
const AppLauncherSectionName = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherSectionName;
const NEW_TO_APPS = AppLauncherSectionName.NEW_TO_APPS;
const items2 = [<View style={styles.divider} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text variant="heading-lg/bold" color="mobile-text-heading-primary">{value3}</Text>;
items2[2] = <Text variant="text-xs/normal" color="text-default" style={styles.body}>{value4}</Text>;
items2[3] = <View style={styles.divider} />;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
string = intl.string;
const Ye51oT = (require(1244) /* metro dependency 1244: indexNative */).t.Ye51oT;
items2[4] = <PressableHighlight style={styles.linkButton} onPress={value2} accessibilityRole="link" accessibilityLabel={value5}><Text variant="text-md/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [Ye51oT])}</Text></PressableHighlight>;
items2[5] = <View style={styles.divider} />;
return (
<TrackSectionHeader
sectionName={NEW_TO_APPS}
numItems={1}
numVisibleItems={1}
viewed={visible}
>
<View style={styles.container}>
{items2}
</View>
</TrackSectionHeader>
);
}
global.__d(_fun89217, 11636, [31, 27, 661, 33, 4501, 697, 3853, 1948, 1244, 11637, 8048, 4573, 5278,
2]) /* metro module 11636, dependencies: [31, 27, 661, 33, 4501, 697, 3853, 1948, 1244, 11637, 8048, 4573, 5278, 2] */;
@@ -1,10 +1,14 @@
/* Metro module 11655; source: modules/app_launcher/native/screens/home/NoPermsState.tsx; dependencies: [31, 27, 33, 4501, 697, 4002, 4048, 11656, 11657, 11592, 8048, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun89363(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11841:6, offset: 0x0200b813, size: 310 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
value = require(33) /* metro dependency 33 */;
@@ -12,40 +16,48 @@ function _fun89363(global, require, importDefault, importAll, module, exports, d
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'paddingVertical': 16, 'paddingHorizontal': 24, 'gap': 12, 'backgroundColor': null,
const object2 = {'paddingVertical': 16, 'paddingHorizontal': 24, 'gap': 12, 'backgroundColor': null,
'borderRadius': null, 'alignItems': 'center', 'justifyContent': 'flex-start', 'display': 'flex',
'flexDirection': 'row'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_7 = Reflect.apply(createStyles, value, [{container: object, textContainer: {flexShrink: 1},
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_7 = Reflect.apply(createStyles, value, [{container: object2, textContainer: {flexShrink: 1},
image: {'width': 64, 'height': 64}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/NoPermsState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/NoPermsState.tsx');
exports.default = EmptyState_89364;
function EmptyState_89364() { // fn#89364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11841:571, offset: 0x0200b949, size: 330 bytes, params: 1, frame: 22
const styles = useStyles();
const defaultImport = importDefault(require(dependencyMap[5]).isThemeLight(importDefault(dependencyMap[6])()) ? dependencyMap[7] : dependencyMap[8]);
const moduleValue2 = require(dependencyMap[9]);
const useLogAppLauncherEmptyStateView = moduleValue2.useLogAppLauncherEmptyStateView;
const AppLauncherEmptyStateType = require(dependencyMap[10]).AppLauncherEmptyStateType;
const HOME_NO_PERMISSIONS = AppLauncherEmptyStateType.HOME_NO_PERMISSIONS;
Reflect.apply(useLogAppLauncherEmptyStateView, moduleValue2, [HOME_NO_PERMISSIONS]);
const image = (
<Image
style={styles.image}
resizeMode="contain"
source={defaultImport}
/>
);
const Text = require(dependencyMap[11]).Text;
const intl = require(dependencyMap[12]).intl;
return (
<View style={styles.container}>
{image}
<Text
style={styles.textContainer}
variant="text-sm/medium"
color="text-muted"
>
{intl.string(require(dependencyMap[12]).t.uDnXXj)}
</Text>
</View>
);
}
}
function EmptyState_89364() { // fn#89364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11841:571, offset: 0x0200b949, size: 330 bytes, params: 1, frame: 22
const styles = useStyles();
const defaultImport = importDefault(require(dependencyMap[5]).isThemeLight(importDefault(dependencyMap[6])()) ? dependencyMap[7] : dependencyMap[8]);
const moduleValue2 = require(dependencyMap[9]);
const useLogAppLauncherEmptyStateView = moduleValue2.useLogAppLauncherEmptyStateView;
const AppLauncherEmptyStateType = require(dependencyMap[10]).AppLauncherEmptyStateType;
const HOME_NO_PERMISSIONS = AppLauncherEmptyStateType.HOME_NO_PERMISSIONS;
Reflect.apply(useLogAppLauncherEmptyStateView, moduleValue2, [HOME_NO_PERMISSIONS]);
const image = <Image style={styles.image} resizeMode="contain" source={defaultImport} />;
const Text = require(dependencyMap[11]).Text;
const intl = require(dependencyMap[12]).intl;
return (
<View style={styles.container}>
{image}
<Text
style={styles.textContainer}
variant="text-sm/medium"
color="text-muted"
>
{intl.string(require(dependencyMap[12]).t.uDnXXj)}
</Text>
</View>
);
}
global.__d(_fun89363, 11655, [31, 27, 33, 4501, 697, 4002, 4048, 11656, 11657, 11592, 8048, 4573, 1244,
2]) /* metro module 11655, dependencies: [31, 27, 33, 4501, 697, 4002, 4048, 11656, 11657, 11592, 8048, 4573, 1244, 2] */;
@@ -1,45 +1,52 @@
/* Metro module 11601; source: modules/app_launcher/native/screens/home/SubmittingOverlay.tsx; dependencies: [33, 4501, 697, 4017, 4577, 4581, 4593, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringPresetsModule from '../../../../../design/animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
function _fun88849(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11787:6, offset: 0x01ff44fd, size: 215 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_SCRIM = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{ellipsis: {'backgroundColor': null,
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_SCRIM = (Native).colors.BACKGROUND_SCRIM;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [{ellipsis: {'backgroundColor': null,
'justifyContent': 'center', 'alignItems': 'center', backgroundColor: BACKGROUND_SCRIM}}]);
object = {code: "function SubmittingOverlayTsx1(){const{withSpring,submitting,SUBTLE_SPRING}=this.__closure;return{opacity:withSpring(submitting?1:0,SUBTLE_SPRING,'animate-always')};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/SubmittingOverlay.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/SubmittingOverlay.tsx');
exports.SubmittingOverlay = SubmittingOverlay;
function SubmittingOverlay({submitting, style}) { // fn#88850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11787:533, offset: 0x01ff45d4, size: 269 bytes, params: 2, frame: 22
const styles = useStyles();
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var r3;
var moduleValue = require(dependencyMap[4]);
var withSpring = moduleValue.withSpring;
r3 = submitting ? 1 : 0;
var SUBTLE_SPRING = require(dependencyMap[5]).SUBTLE_SPRING;
return {opacity: Reflect.apply(withSpring, moduleValue, [r3, SUBTLE_SPRING, 'animate-always'])};
};
const object = {};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.submitting = submitting;
let SUBTLE_SPRING = (SpringPresetsModule).SUBTLE_SPRING;
object.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object;
closure.__workletHash = 492443733468;
closure.__initData = env0_5;
const value2 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const View = (ReanimatedRexport).View;
return (
<View style={[style, styles.ellipsis, value2]}>
{submitting && ((Ellipsis) => <Ellipsis variant="active" size="md" />)((require(4593) /* metro dependency 4593: ButtonEllipsisNative */).Ellipsis)}
</View>
);
}
}
function SubmittingOverlay({submitting, style}) { // fn#88850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11787:533, offset: 0x01ff45d4, size: 269 bytes, params: 2, frame: 22
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var r3;
var moduleValue = require(dependencyMap[4]);
var withSpring = moduleValue.withSpring;
r3 = submitting ? 1 : 0;
var SUBTLE_SPRING = require(dependencyMap[5]).SUBTLE_SPRING;
return {opacity: Reflect.apply(withSpring, moduleValue, [r3, SUBTLE_SPRING, 'animate-always'])};
};
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.submitting = submitting;
let SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object2;
closure.__workletHash = 492443733468;
closure.__initData = env0_5;
const value2 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[style, styles.ellipsis, value2]}>
{submitting && ((Ellipsis) => <Ellipsis variant="active" size="md" />)((require(4593) /* metro dependency 4593: ButtonEllipsisNative */).Ellipsis)}
</View>
);
}
global.__d(_fun88849, 11601, [33, 4501, 697, 4017, 4577, 4581, 4593,
2]) /* metro module 11601, dependencies: [33, 4501, 697, 4017, 4577, 4581, 4593, 2] */;
@@ -1,26 +1,31 @@
/* Metro module 11637; source: modules/app_launcher/native/screens/home/TrackSectionHeader.tsx; dependencies: [8047, 8742, 480, 2] */
import AppLauncherStore from '../../../AppLauncherStore.tsx'; /* Metro dependency 8047 */
import UseTrackImpression from '../../../../app_analytics/useTrackImpression.tsx'; /* Metro dependency 8742 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AnalyticsUtilsModule from '../../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
function _fun89220(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11823:6, offset: 0x02005661, size: 118 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const appLauncherStore = importDefault(8047) /* metro dependency 8047: AppLauncherStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/TrackSectionHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/TrackSectionHeader.tsx');
exports.default = TrackSectionHeader;
function TrackSectionHeader({sectionName, numItems, numVisibleItems, viewed, children}) { // fn#89221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11823:213, offset: 0x020056d7, size: 183 bytes, params: 2, frame: 23
const defaultImport = UseTrackImpression;
const object = {};
const ImpressionTypes = (AnalyticsUtilsModule).ImpressionTypes;
const VIEW = ImpressionTypes.VIEW;
object.type = VIEW;
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const APP_LAUNCHER_SECTION = ImpressionNames.APP_LAUNCHER_SECTION;
object.name = APP_LAUNCHER_SECTION;
const object2 = {section_name: sectionName, num_items: numItems, num_visible_items: numVisibleItems};
object2.source = AppLauncherStore.entrypoint();
object.properties = object2;
defaultImport(object, {disableTrack: !viewed}, [viewed]);
return children;
}
}
function TrackSectionHeader({sectionName, numItems, numVisibleItems, viewed, children}) { // fn#89221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11823:213, offset: 0x020056d7, size: 183 bytes, params: 2, frame: 23
const defaultImport = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
const object3 = {};
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
const VIEW = ImpressionTypes.VIEW;
object3.type = VIEW;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const APP_LAUNCHER_SECTION = ImpressionNames.APP_LAUNCHER_SECTION;
object3.name = APP_LAUNCHER_SECTION;
const object4 = {section_name: sectionName, num_items: numItems, num_visible_items: numVisibleItems};
object4.source = AppLauncherStore.entrypoint();
object3.properties = object4;
defaultImport(object3, {disableTrack: !viewed}, [viewed]);
return children;
}
global.__d(_fun89220, 11637, [8047, 8742, 480, 2]) /* metro module 11637, dependencies: [8047, 8742, 480, 2] */;
@@ -1,73 +1,98 @@
/* Metro module 11633; source: modules/app_launcher/native/screens/home/recommendations/RecommendationsBanner.tsx; dependencies: [31, 27, 1885, 661, 33, 4501, 8774, 11625, 10718, 5475, 8490, 8507, 1423, 8372, 2] */
import AvatarUtils from '../../../../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
import UserRecord from '../../../../../../records/UserRecord.tsx'; /* Metro dependency 1885 */
import UserProfileBanner from '../../../../../user_profile/native/UserProfileBanner.tsx'; /* Metro dependency 8507 */
import UseEmbeddedActivityBackground from '../../../../../activities/utils/useEmbeddedActivityBackground.tsx'; /* Metro dependency 10718 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as AppLauncherContextModule from '../../../AppLauncherContext.tsx'; /* Metro dependency 8774 */
import * as HeroMediaModule from '../../application_view/activity/HeroMedia.tsx'; /* Metro dependency 11625 */
function _fun89208(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11819:6, offset: 0x02004a0c, size: 329 bytes, params: 8, frame: 20
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 userRecord = importDefault(1885) /* metro dependency 1885: UserRecord */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.BANNER_HEIGHT;
const env0_7 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({imageContainer: {'width': '100%',
let value = ReactModule;
const env0_9 = (CreateStylesModule).createStyles({imageContainer: {'width': '100%',
'height': '100%'}, image: {'width': '100%', 'height': '100%'}});
const env0_10 = value.memo(_fun89209);
const env0_11 = value.memo(_fun89211);
value = value.memo(RecommendationBanner);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/recommendations/RecommendationsBanner.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/recommendations/RecommendationsBanner.tsx');
exports.default = value;
}
function _fun89209({applicationId}) { // fn#89209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11819:318, offset: 0x02004b55, size: 261 bytes, params: 2, frame: 18
var r0;
var value;
const useRequiredAppLauncherContext = AppLauncherContextModule.useRequiredAppLauncherContext;
const value2 = (HeroMediaModule).useHeroMediaDimensions({width: Reflect.apply(useRequiredAppLauncherContext,
AppLauncherContextModule, []).width});
const {imageStyle, imageSource} = env0_3.useMemo(_fun89210, [value2,
(UseEmbeddedActivityBackground)({applicationId: applicationId,
size: value2.width, names: ['embedded_cover']})]);
if (imageSource != null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={imageStyle} source={imageSource} resizeMode="cover" />)(value);
r0 = value;
} else {
r0 = <View style={imageStyle} />;
}
return r0;
function _fun89210() { // fn#89210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11819:522, offset: 0x02004c5a, size: 129 bytes, params: 1, frame: 6
const binding = env0_0;
return {imageStyle: {backgroundColor: 'black', height: binding.height, width: binding.width,
transform: [{translateY: (BANNER_HEIGHT - binding.height) / 2}]}, imageSource: env0_1.url != null ? {uri: env0_1.url} : undefined};
}
function _fun89209({applicationId}) { // fn#89209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11819:318, offset: 0x02004b55, size: 261 bytes, params: 2, frame: 18
var r0;
var value;
const appLauncherContextModule = require(8774) /* metro dependency 8774: AppLauncherContext */;
const useRequiredAppLauncherContext = appLauncherContextModule.useRequiredAppLauncherContext;
const value2 = (require(11625) /* metro dependency 11625: HeroMedia */).useHeroMediaDimensions({width: Reflect.apply(useRequiredAppLauncherContext,
appLauncherContextModule, []).width});
const {imageStyle, imageSource} = env0_3.useMemo(_fun89210, [value2,
(importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */)({applicationId: applicationId,
size: value2.width, names: ['embedded_cover']})]);
if (imageSource != null) {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={imageStyle} source={imageSource} resizeMode="cover" />)(value);
r0 = value;
} else {
r0 = <View style={imageStyle} />;
}
return r0;
}
function _fun89211({applicationBot}) { // fn#89211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11819:811, offset: 0x02004cdb, size: 133 bytes, params: 2, frame: 17
const value3 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(applicationBot?.id ?? EMPTY_STRING_SNOWFLAKE_ID);
const UserProfileBanner = importDefault(8507) /* metro dependency 8507: UserProfileBanner */;
const userRecord = new UserRecord(applicationBot);
return <UserProfileBanner displayProfile={value3} user={userRecord} />;
}
function _fun89211({applicationBot}) { // fn#89211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11819:811, offset: 0x02004cdb, size: 133 bytes, params: 2, frame: 17
const value3 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)(applicationBot?.id ?? EMPTY_STRING_SNOWFLAKE_ID);
const userRecord2 = new UserRecord(applicationBot);
return <UserProfileBanner displayProfile={value3} user={userRecord2} />;
}
function RecommendationBanner({applicationEmbedded, applicationId, applicationIcon, applicationBot, overrideImageUrl}) { // fn#89212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11819:961, offset: 0x02004d60, size: 327 bytes, params: 2, frame: 23
var r0;
var value;
const styles = useStyles();
const applicationIconSource = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getApplicationIconSource({id: applicationId,
icon: applicationIcon, bot: applicationBot, botIconFirst: true});
if (overrideImageUrl != null) {
var viewBindingProps = {style: styles.imageContainer};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = <View {...viewBindingProps}>{((Component) => <Component style={styles.image} source={{uri: overrideImageUrl}} resizeMode="cover" />)(value)}</View>;
r0 = value;
} else {
r0 = applicationEmbedded ? ((Component) => <Component applicationId={applicationId} />)(env0_10) : applicationBot != null ? ((Component) => <Component applicationBot={applicationBot} />)(env0_11) : <View style={{backgroundColor: (importDefault(8372) /* metro dependency 8372: useAvatarColor */)(typeof applicationIconSource === 'number' ? applicationIconSource : applicationIconSource?.uri,
'')}} />;
function RecommendationBanner({applicationEmbedded, applicationId, applicationIcon, applicationBot, overrideImageUrl}) { // fn#89212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11819:961, offset: 0x02004d60, size: 327 bytes, params: 2, frame: 23
var r0;
var value;
const styles = useStyles();
const applicationIconSource = (AvatarUtils).getApplicationIconSource({id: applicationId,
icon: applicationIcon, bot: applicationBot, botIconFirst: true});
if (overrideImageUrl != null) {
var viewBindingProps = {style: styles.imageContainer};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = (
<View {...viewBindingProps}>
{((Component) => <Component style={styles.image} source={{uri: overrideImageUrl}} resizeMode="cover" />)(value)}
</View>
);
r0 = value;
} else {
r0 = (
applicationEmbedded
? ((Component) => <Component applicationId={applicationId} />)(env0_10)
: (
applicationBot != null
? ((Component) => <Component applicationBot={applicationBot} />)(env0_11)
: (
<View
style={{
backgroundColor: (importDefault(8372) /* metro dependency 8372: useAvatarColor */)(typeof applicationIconSource === 'number' ? applicationIconSource : applicationIconSource?.uri,
''),
}}
/>
)
)
);
}
return r0;
}
return r0;
}
function _fun89210() { // fn#89210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11819:522, offset: 0x02004c5a, size: 129 bytes, params: 1, frame: 6
const binding = env0_0;
return {imageStyle: {backgroundColor: 'black', height: binding.height, width: binding.width,
transform: [{translateY: (BANNER_HEIGHT - binding.height) / 2}]}, imageSource: env0_1.url != null ? {uri: env0_1.url} : undefined};
}
global.__d(_fun89208, 11633, [31, 27, 1885, 661, 33, 4501, 8774, 11625, 10718, 5475, 8490, 8507, 1423, 8372,
2]) /* metro module 11633, dependencies: [31, 27, 1885, 661, 33, 4501, 8774, 11625, 10718, 5475, 8490, 8507, 1423, 8372, 2] */;
@@ -1,134 +1,201 @@
/* Metro module 11632; source: modules/app_launcher/native/screens/home/recommendations/RecommendationsBannerCard.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 8046, 8491, 1423, 11623, 5278, 11633, 1909, 11627, 4573, 1244, 11597, 6243, 2] */
import AvatarUtils from '../../../../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun89205(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11818:6, offset: 0x020042eb, size: 626 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(661) /* metro dependency 661: Constants */).EMPTY_STRING_SNOWFLAKE_ID;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object = {};
const object2 = {};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.width = '100%';
object4.overflow = 'hidden';
object3.container = object4;
object3.banner = {'width': '100%', 'height': 106, 'overflow': 'hidden'};
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.width = '100%';
object2.overflow = 'hidden';
object.container = object2;
object.banner = {'width': '100%', 'height': 106, 'overflow': 'hidden'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.appDetailsContainer = {'padding': null, 'flexDirection': 'row', 'alignItems': 'center',
object.appDetailsContainer = {'padding': null, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between', padding: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.appDetails = {'marginLeft': null, 'flexDirection': 'column', 'flexGrow': 1, 'flexShrink': 1,
object.appDetails = {'marginLeft': null, 'flexDirection': 'column', 'flexGrow': 1, 'flexShrink': 1,
marginLeft: PX_16};
object3.appIconContainer = {flexShrink: 0};
const object5 = {'position': 'absolute', 'display': 'flex'};
object.appIconContainer = {flexShrink: 0};
const object6 = {'position': 'absolute', 'display': 'flex'};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.gap = PX_4;
object6.gap = PX_4;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.right = PX_8;
object6.right = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.top = PX_8;
object5.alignItems = 'flex-end';
object3.notifsContainer = object5;
object3.badge = {};
const object8 = {};
object6.top = PX_8;
object6.alignItems = 'flex-end';
object.notifsContainer = object6;
object.badge = {};
const object7 = {};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object8.paddingVertical = PX_4;
object7.paddingVertical = PX_4;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingHorizontal = PX_8;
object7.paddingHorizontal = PX_8;
const CONTROL_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object8.backgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.promotedLabelWrapper = object8;
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/recommendations/RecommendationsBannerCard.tsx');
object7.backgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.promotedLabelWrapper = object7;
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/recommendations/RecommendationsBannerCard.tsx');
exports.default = RecommendationsBannerCard;
}
function RecommendationsBannerCard({style, application, onPress, isFirst, isLast, isLandscape, showsPromoted, overrideImageUrl}) { // fn#89206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11818:1112, offset: 0x0200455d, size: 1130 bytes, params: 2, frame: 41
var object2;
var r15;
var r0;
var PressableOpacity;
var items2;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items4;
var items5;
var items6;
let value = undefined;
showsPromoted = !(showsPromoted === value) && showsPromoted;
const styles = useStyles();
let r21 = showsPromoted || (require(8046) /* metro dependency 8046: AppLauncherUtils */).isPromotedApplication(application);
const shelfBadgeTypeIfActive = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getShelfBadgeTypeIfActive(application);
const binding = env0_3;
const useEffect = binding.useEffect;
const bot = application.bot;
Reflect.apply(useEffect, binding, [function() {
var r1;
var value2 = undefined;
var defaultImport = importDefault(dependencyMap[7]);
var property = application.bot;
r1 = property == null ? value2 : property.id;
r1 = r1 ?? EMPTY_STRING_SNOWFLAKE_ID;
defaultImport(r1);
return value2;
}, [bot == null ? value : bot.id]]);
let defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getApplicationIconSource = defaultImport.getApplicationIconSource;
object2 = {id: application.id};
object2.icon = application.icon;
object2.bot = application.bot;
object2.botIconFirst = true;
const value7 = Reflect.apply(getApplicationIconSource, defaultImport, [object2]);
if (isLandscape) {
const BaseAppRow = (require(11623) /* metro dependency 11623: AppLauncherHomeScreen */).BaseAppRow;
r0 = <BaseAppRow application={application} iconSource={value7} onPress={onPress} isFirstRow={isFirst} isLastRow={isLast} />;
} else {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object2 = {};
r15 = isFirst ? 0 : 8;
object2.style = [styles.container, {marginTop: r15, marginBottom: isLast ? 0 : 8}, style];
object2.onPress = onPress;
var viewBindingProps = {style: styles.banner};
items2 = [((Component) => <Component applicationBot={application.bot} applicationEmbedded={(require(8046) /* metro dependency 8046: AppLauncherUtils */).isEmbeddedApp(application)} applicationId={application.id} applicationIcon={application.icon ?? value} overrideImageUrl={overrideImageUrl} />)(importDefault(11633) /* metro dependency 11633: RecommendationsBanner */)];
if (r21) {
var viewBinding2Props = {style: styles.notifsContainer};
items3 = [((Component) => <Component labelType={shelfBadgeTypeIfActive} replacementStyles={styles.badge} />)(importDefault(11627) /* metro dependency 11627: ActivityShelfBadge */)];
r21 = r21 && <View style={styles.promotedLabelWrapper}><Text variant="text-xxs/medium" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/eVltv'])}</Text></View>;
items3[1] = r21;
r15 = <View {...viewBinding2Props}>{items3}</View>;
} else if (shelfBadgeTypeIfActive === (require(1909) /* metro dependency 1909: Server */).EmbeddedActivityLabelTypes.NONE) {
r15 = null;
function RecommendationsBannerCard({style, application, onPress, isFirst, isLast, isLandscape, showsPromoted, overrideImageUrl}) { // fn#89206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11818:1112, offset: 0x0200455d, size: 1130 bytes, params: 2, frame: 41
var r15;
var r0;
var PressableOpacity;
var items2;
var items3;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items4;
var items5;
var items6;
let value = undefined;
showsPromoted = !(showsPromoted === value) && showsPromoted;
const styles = useStyles();
let r21 = showsPromoted || (require(8046) /* metro dependency 8046: AppLauncherUtils */).isPromotedApplication(application);
const shelfBadgeTypeIfActive = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getShelfBadgeTypeIfActive(application);
const useEffect = ReactModule.useEffect;
const bot = application.bot;
Reflect.apply(useEffect, ReactModule, [function() {
var r1;
var value2 = undefined;
var defaultImport = importDefault(dependencyMap[7]);
var property = application.bot;
r1 = property == null ? value2 : property.id;
r1 = r1 ?? EMPTY_STRING_SNOWFLAKE_ID;
defaultImport(r1);
return value2;
}, [bot == null ? value : bot.id]]);
let defaultImport = AvatarUtils;
const getApplicationIconSource = defaultImport.getApplicationIconSource;
object = {id: application.id};
object.icon = application.icon;
object.bot = application.bot;
object.botIconFirst = true;
const value7 = Reflect.apply(getApplicationIconSource, defaultImport, [object]);
if (isLandscape) {
const BaseAppRow = (require(11623) /* metro dependency 11623: AppLauncherHomeScreen */).BaseAppRow;
r0 = (
<BaseAppRow
application={application}
iconSource={value7}
onPress={onPress}
isFirstRow={isFirst}
isLastRow={isLast}
/>
);
} else {
var viewBinding2Props = {style: styles.notifsContainer};
items3 = [((Component) => <Component labelType={shelfBadgeTypeIfActive} replacementStyles={styles.badge} />)(importDefault(11627) /* metro dependency 11627: ActivityShelfBadge */)];
r21 = r21 && <View style={styles.promotedLabelWrapper}><Text variant="text-xxs/medium" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/eVltv'])}</Text></View>;
items3[1] = r21;
r15 = <View {...viewBinding2Props}>{items3}</View>;
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {};
r15 = isFirst ? 0 : 8;
object.style = [styles.container, {marginTop: r15, marginBottom: isLast ? 0 : 8}, style];
object.onPress = onPress;
var viewBindingProps = {style: styles.banner};
items2 = [
((Component) => <Component applicationBot={application.bot} applicationEmbedded={(require(8046) /* metro dependency 8046: AppLauncherUtils */).isEmbeddedApp(application)} applicationId={application.id} applicationIcon={application.icon ?? value} overrideImageUrl={overrideImageUrl} />)(importDefault(11633) /* metro dependency 11633: RecommendationsBanner */),
];
if (r21) {
var viewBinding2Props = {style: styles.notifsContainer};
items3 = [
((Component) => <Component labelType={shelfBadgeTypeIfActive} replacementStyles={styles.badge} />)(importDefault(11627) /* metro dependency 11627: ActivityShelfBadge */),
];
r21 = r21 && <View style={styles.promotedLabelWrapper}><Text variant="text-xxs/medium" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/eVltv'])}</Text></View>;
items3[1] = r21;
r15 = (
<View {...viewBinding2Props}>
{items3}
</View>
);
} else if (shelfBadgeTypeIfActive === (require(1909) /* metro dependency 1909: Server */).EmbeddedActivityLabelTypes.NONE) {
r15 = null;
} else {
var viewBinding2Props = {style: styles.notifsContainer};
items3 = [
((Component) => <Component labelType={shelfBadgeTypeIfActive} replacementStyles={styles.badge} />)(importDefault(11627) /* metro dependency 11627: ActivityShelfBadge */),
];
r21 = r21 && <View style={styles.promotedLabelWrapper}><Text variant="text-xxs/medium" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/eVltv'])}</Text></View>;
items3[1] = r21;
r15 = (
<View {...viewBinding2Props}>
{items3}
</View>
);
}
items2[1] = r15;
items4 = [
<View {...viewBindingProps}>
{items2}
</View>,
];
var viewBindingProps2 = {style: styles.appDetailsContainer};
r15 = value7 != null && ((Component) => <Component iconSource={value7} iconSize={36} wrapperStyle={styles.appIconContainer} />)(importDefault(11597) /* metro dependency 11597: EntityBorderAppIcon */);
items5 = [r15];
var viewBinding4Props = {style: styles.appDetails};
items6 = [
<Text
variant="heading-lg/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
>
{application.name}
</Text>,
];
items6[1] = (
<Text
variant="text-sm/normal"
color="text-subtle"
lineClamp={1}
>
{application.description}
</Text>
);
items5[1] = (
<View {...viewBinding4Props}>
{items6}
</View>
);
items5[2] = ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow);
items4[1] = (
<View {...viewBindingProps2}>
{items5}
</View>
);
value = (
<PressableOpacity {...object}>
{items4}
</PressableOpacity>
);
r0 = value;
}
items2[1] = r15;
items4 = [<View {...viewBindingProps}>{items2}</View>];
var viewBindingProps2 = {style: styles.appDetailsContainer};
r15 = value7 != null && ((Component) => <Component iconSource={value7} iconSize={36} wrapperStyle={styles.appIconContainer} />)(importDefault(11597) /* metro dependency 11597: EntityBorderAppIcon */);
items5 = [r15];
var viewBinding4Props = {style: styles.appDetails};
items6 = [<Text variant="heading-lg/semibold" color="mobile-text-heading-primary" lineClamp={1}>{application.name}</Text>];
items6[1] = <Text variant="text-sm/normal" color="text-subtle" lineClamp={1}>{application.description}</Text>;
items5[1] = <View {...viewBinding4Props}>{items6}</View>;
items5[2] = ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow);
items4[1] = <View {...viewBindingProps2}>{items5}</View>;
value = <PressableOpacity {...object2}>{items4}</PressableOpacity>;
r0 = value;
return r0;
}
return r0;
}
global.__d(_fun89205, 11632, [31, 27, 661, 33, 4501, 697, 8046, 8491, 1423, 11623, 5278, 11633, 1909, 11627, 4573,
1244, 11597, 6243,
2]) /* metro module 11632, dependencies: [31, 27, 661, 33, 4501, 697, 8046, 8491, 1423, 11623, 5278, 11633, 1909, 11627, 4573, 1244, 11597, 6243, 2] */;
@@ -1,216 +1,220 @@
/* Metro module 11641; source: modules/app_launcher/native/screens/home/useTrackAppLauncherHomeItemImpression.tsx; dependencies: [31, 11642, 11629, 7504, 483, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as AppLauncherHomeTypesModule from './AppLauncherHomeTypes.tsx'; /* Metro dependency 11629 */
import * as UseTrackAppLauncherItemImpressionOnFirstViewModule from '../../hooks/useTrackAppLauncherItemImpressionOnFirstView.tsx'; /* Metro dependency 11642 */
function _fun89236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11827:6, offset: 0x02005dd6, size: 118 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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/useTrackAppLauncherHomeItemImpression.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/useTrackAppLauncherHomeItemImpression.tsx');
exports.useTrackAppLauncherHomeItemImpression = useTrackAppLauncherHomeItemImpression;
}
function useTrackAppLauncherHomeItemImpression() { // fn#89237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11827:262, offset: 0x02005e4c, size: 86 bytes, params: 1, frame: 15
const useTrackAppLauncherItemImpressionOnFirstViewModule = require(11642) /* metro dependency 11642: useTrackAppLauncherItemImpressionOnFirstView */;
const useTrackAppLauncherItemImpressionOnFirstView = useTrackAppLauncherItemImpressionOnFirstViewModule.useTrackAppLauncherItemImpressionOnFirstView;
const trackAppLauncherItemImpressionOnFirstView = Reflect.apply(useTrackAppLauncherItemImpressionOnFirstView,
useTrackAppLauncherItemImpressionOnFirstViewModule, []).trackAppLauncherItemImpressionOnFirstView;
const binding = env0_3;
const useCallback = binding.useCallback;
return {trackAppLauncherHomeItemImpression: Reflect.apply(useCallback, binding, [function({viewableItems}) {
viewableItems.forEach(_fun89239);
}, [trackAppLauncherItemImpressionOnFirstView]])};
}
function _fun89238({viewableItems}) { // fn#89238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11827:471, offset: 0x02005ea2, size: 32 bytes, params: 2, frame: 11
viewableItems.forEach(_fun89239);
}
function _fun89239({item}) { // fn#89239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11827:504, offset: 0x02005ec2, size: 706 bytes, params: 2, frame: 27
var id;
var flags;
var r6;
var r8;
var shelfItem2SectionPosition;
var r16;
var r3;
var application;
var sectionPosition;
var applicationId;
var moduleValue;
var getApplicationFlags;
var value3;
var moduleValue2;
var value4;
var value5;
var trackAppLauncherItemImpressionOnFirstViewBinding;
var object2;
var sectionName;
let type = item.type;
let value = environment.__proto__.__proto__;
const AppLauncherHomeListItemType = (require(11629) /* metro dependency 11629: AppLauncherHomeTypes */).AppLauncherHomeListItemType;
const RECOMMENDATION_APP = AppLauncherHomeListItemType.RECOMMENDATION_APP;
if (type === RECOMMENDATION_APP) {
sectionPosition = item.sectionPosition;
application = item.application;
id = application.id;
moduleValue2 = require(7504) /* metro dependency 7504: ApplicationFlagUtils */;
getApplicationFlags = moduleValue2.getApplicationFlags;
application = item.application;
value4 = Reflect.apply(getApplicationFlags, moduleValue2, [application]);
r6 = id;
id = undefined;
flags = undefined;
r8 = sectionPosition;
shelfItem2SectionPosition = undefined;
r16 = value4;
value5 = environment.__proto__;
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object2 = {};
sectionName = item.sectionName;
object2.itemKey = 'sectionName:' + sectionName + ' applicationId:' + r6;
sectionName = item.sectionName;
object2.sectionName = sectionName;
} else {
type = item.type;
var RECOMMENDATION_BANNER_CARD = AppLauncherHomeListItemType.RECOMMENDATION_BANNER_CARD;
if (type === RECOMMENDATION_BANNER_CARD) {
sectionPosition = item.sectionPosition;
application = item.item.application;
id = application.id;
moduleValue = require(7504) /* metro dependency 7504: ApplicationFlagUtils */;
getApplicationFlags = moduleValue.getApplicationFlags;
application = item.item.application;
value3 = Reflect.apply(getApplicationFlags, moduleValue, [application]);
r6 = id;
id = undefined;
flags = undefined;
r8 = sectionPosition;
shelfItem2SectionPosition = undefined;
r16 = value3;
value5 = environment.__proto__;
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object2 = {};
sectionName = item.sectionName;
object2.itemKey = 'sectionName:' + sectionName + ' applicationId:' + r6;
sectionName = item.sectionName;
object2.sectionName = sectionName;
object2.sectionPosition = r8;
object2.sectionOverallPosition = item.sectionOverallPosition;
object2.applicationId = r6;
object2.applicationFlags = (importAll(483) /* metro dependency 483: BigFlagUtils */).asUintN(32, r16);
trackAppLauncherItemImpressionOnFirstViewBinding(object2);
if (id != null && shelfItem2SectionPosition != null) {
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object2 = {};
sectionName = item.sectionName;
object2.itemKey = 'sectionName:' + sectionName + ' applicationId:' + id;
sectionName = item.sectionName;
object2.sectionName = sectionName;
object2.sectionPosition = shelfItem2SectionPosition;
object2.sectionOverallPosition = item.sectionOverallPosition;
object2.applicationId = id;
if (flags != null) {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = value.asUintN(32, flags);
r3 = value;
function useTrackAppLauncherHomeItemImpression() { // fn#89237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11827:262, offset: 0x02005e4c, size: 86 bytes, params: 1, frame: 15
const useTrackAppLauncherItemImpressionOnFirstView = UseTrackAppLauncherItemImpressionOnFirstViewModule.useTrackAppLauncherItemImpressionOnFirstView;
const trackAppLauncherItemImpressionOnFirstView = Reflect.apply(useTrackAppLauncherItemImpressionOnFirstView,
UseTrackAppLauncherItemImpressionOnFirstViewModule, []).trackAppLauncherItemImpressionOnFirstView;
const useCallback = ReactModule.useCallback;
return {trackAppLauncherHomeItemImpression: Reflect.apply(useCallback, ReactModule, [function({viewableItems}) {
viewableItems.forEach(_fun89239);
}, [trackAppLauncherItemImpressionOnFirstView]])};
function _fun89238({viewableItems}) { // fn#89238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11827:471, offset: 0x02005ea2, size: 32 bytes, params: 2, frame: 11
viewableItems.forEach(_fun89239);
function _fun89239({item}) { // fn#89239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11827:504, offset: 0x02005ec2, size: 706 bytes, params: 2, frame: 27
var id;
var flags;
var r6;
var r8;
var shelfItem2SectionPosition;
var r16;
var r3;
var application;
var sectionPosition;
var applicationId;
var moduleValue;
var getApplicationFlags;
var value3;
var moduleValue2;
var value4;
var value5;
var trackAppLauncherItemImpressionOnFirstViewBinding;
var object;
var sectionName;
let type = item.type;
let value = environment.__proto__.__proto__;
const AppLauncherHomeListItemType = (AppLauncherHomeTypesModule).AppLauncherHomeListItemType;
const RECOMMENDATION_APP = AppLauncherHomeListItemType.RECOMMENDATION_APP;
if (type === RECOMMENDATION_APP) {
sectionPosition = item.sectionPosition;
application = item.application;
id = application.id;
moduleValue2 = require(7504) /* metro dependency 7504: ApplicationFlagUtils */;
getApplicationFlags = moduleValue2.getApplicationFlags;
application = item.application;
value4 = Reflect.apply(getApplicationFlags, moduleValue2, [application]);
r6 = id;
id = undefined;
flags = undefined;
r8 = sectionPosition;
shelfItem2SectionPosition = undefined;
r16 = value4;
value5 = environment.__proto__;
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object = {};
sectionName = item.sectionName;
object.itemKey = 'sectionName:' + sectionName + ' applicationId:' + r6;
sectionName = item.sectionName;
object.sectionName = sectionName;
} else {
r3 = undefined;
type = item.type;
var RECOMMENDATION_BANNER_CARD = AppLauncherHomeListItemType.RECOMMENDATION_BANNER_CARD;
if (type === RECOMMENDATION_BANNER_CARD) {
sectionPosition = item.sectionPosition;
application = item.item.application;
id = application.id;
moduleValue = require(7504) /* metro dependency 7504: ApplicationFlagUtils */;
getApplicationFlags = moduleValue.getApplicationFlags;
application = item.item.application;
value3 = Reflect.apply(getApplicationFlags, moduleValue, [application]);
r6 = id;
id = undefined;
flags = undefined;
r8 = sectionPosition;
shelfItem2SectionPosition = undefined;
r16 = value3;
value5 = environment.__proto__;
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object = {};
sectionName = item.sectionName;
object.itemKey = 'sectionName:' + sectionName + ' applicationId:' + r6;
sectionName = item.sectionName;
object.sectionName = sectionName;
object.sectionPosition = r8;
object.sectionOverallPosition = item.sectionOverallPosition;
object.applicationId = r6;
object.applicationFlags = (importAll(483) /* metro dependency 483: BigFlagUtils */).asUintN(32, r16);
trackAppLauncherItemImpressionOnFirstViewBinding(object);
if (id != null && shelfItem2SectionPosition != null) {
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object = {};
sectionName = item.sectionName;
object.itemKey = 'sectionName:' + sectionName + ' applicationId:' + id;
sectionName = item.sectionName;
object.sectionName = sectionName;
object.sectionPosition = shelfItem2SectionPosition;
object.sectionOverallPosition = item.sectionOverallPosition;
object.applicationId = id;
if (flags != null) {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = value.asUintN(32, flags);
r3 = value;
} else {
r3 = undefined;
}
object.applicationFlags = r3;
trackAppLauncherItemImpressionOnFirstViewBinding(object);
}
return undefined;
}
type = item.type;
var SHELF_ITEM = AppLauncherHomeListItemType.SHELF_ITEM;
if (type === SHELF_ITEM) {
sectionPosition = item.sectionPosition;
applicationId = item.applicationId;
flags = item.section.application.flags;
id = undefined;
r6 = applicationId;
r8 = sectionPosition;
shelfItem2SectionPosition = undefined;
r16 = flags;
flags = undefined;
value5 = environment.__proto__;
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object = {};
sectionName = item.sectionName;
object.itemKey = 'sectionName:' + sectionName + ' applicationId:' + r6;
sectionName = item.sectionName;
object.sectionName = sectionName;
object.sectionPosition = r8;
object.sectionOverallPosition = item.sectionOverallPosition;
object.applicationId = r6;
object.applicationFlags = (importAll(483) /* metro dependency 483: BigFlagUtils */).asUintN(32, r16);
trackAppLauncherItemImpressionOnFirstViewBinding(object);
if (id != null && shelfItem2SectionPosition != null) {
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object = {};
sectionName = item.sectionName;
object.itemKey = 'sectionName:' + sectionName + ' applicationId:' + id;
sectionName = item.sectionName;
object.sectionName = sectionName;
object.sectionPosition = shelfItem2SectionPosition;
object.sectionOverallPosition = item.sectionOverallPosition;
object.applicationId = id;
if (flags != null) {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = value.asUintN(32, flags);
r3 = value;
} else {
r3 = undefined;
}
object.applicationFlags = r3;
trackAppLauncherItemImpressionOnFirstViewBinding(object);
}
return undefined;
}
type = item.type;
var SHELF_ITEM_TUPLE = AppLauncherHomeListItemType.SHELF_ITEM_TUPLE;
if (type !== SHELF_ITEM_TUPLE) {
return undefined;
}
var shelfItem1SectionPosition = item.shelfItem1SectionPosition;
shelfItem2SectionPosition = item.shelfItem2SectionPosition;
var id2 = item.shelfItem1.application.id;
var shelfItem2 = item.shelfItem2;
id = shelfItem2 == null ? undefined : shelfItem2.application.id;
var flags2 = item.shelfItem1.application.flags;
shelfItem2 = item.shelfItem2;
flags = shelfItem2 == null ? undefined : shelfItem2.application.flags;
r6 = id2;
r8 = shelfItem1SectionPosition;
r16 = flags2;
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object = {};
object.itemKey = 'sectionName:' + item.sectionName + ' applicationId:' + r6;
object.sectionName = item.sectionName;
}
object2.applicationFlags = r3;
trackAppLauncherItemImpressionOnFirstViewBinding(object2);
}
return undefined;
}
type = item.type;
var SHELF_ITEM = AppLauncherHomeListItemType.SHELF_ITEM;
if (type === SHELF_ITEM) {
sectionPosition = item.sectionPosition;
applicationId = item.applicationId;
flags = item.section.application.flags;
id = undefined;
r6 = applicationId;
r8 = sectionPosition;
shelfItem2SectionPosition = undefined;
r16 = flags;
flags = undefined;
value5 = environment.__proto__;
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object2 = {};
sectionName = item.sectionName;
object2.itemKey = 'sectionName:' + sectionName + ' applicationId:' + r6;
sectionName = item.sectionName;
object2.sectionName = sectionName;
object2.sectionPosition = r8;
object2.sectionOverallPosition = item.sectionOverallPosition;
object2.applicationId = r6;
object2.applicationFlags = (importAll(483) /* metro dependency 483: BigFlagUtils */).asUintN(32, r16);
trackAppLauncherItemImpressionOnFirstViewBinding(object2);
if (id != null && shelfItem2SectionPosition != null) {
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object2 = {};
sectionName = item.sectionName;
object2.itemKey = 'sectionName:' + sectionName + ' applicationId:' + id;
sectionName = item.sectionName;
object2.sectionName = sectionName;
object2.sectionPosition = shelfItem2SectionPosition;
object2.sectionOverallPosition = item.sectionOverallPosition;
object2.applicationId = id;
if (flags != null) {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = value.asUintN(32, flags);
r3 = value;
} else {
r3 = undefined;
object.sectionPosition = r8;
object.sectionOverallPosition = item.sectionOverallPosition;
object.applicationId = r6;
object.applicationFlags = (importAll(483) /* metro dependency 483: BigFlagUtils */).asUintN(32, r16);
trackAppLauncherItemImpressionOnFirstViewBinding(object);
if (id != null && shelfItem2SectionPosition != null) {
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object = {};
sectionName = item.sectionName;
object.itemKey = 'sectionName:' + sectionName + ' applicationId:' + id;
sectionName = item.sectionName;
object.sectionName = sectionName;
object.sectionPosition = shelfItem2SectionPosition;
object.sectionOverallPosition = item.sectionOverallPosition;
object.applicationId = id;
if (flags != null) {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = value.asUintN(32, flags);
r3 = value;
} else {
r3 = undefined;
}
object.applicationFlags = r3;
trackAppLauncherItemImpressionOnFirstViewBinding(object);
}
object2.applicationFlags = r3;
trackAppLauncherItemImpressionOnFirstViewBinding(object2);
}
return undefined;
}
type = item.type;
var SHELF_ITEM_TUPLE = AppLauncherHomeListItemType.SHELF_ITEM_TUPLE;
if (type !== SHELF_ITEM_TUPLE) {
return undefined;
}
var shelfItem1SectionPosition = item.shelfItem1SectionPosition;
shelfItem2SectionPosition = item.shelfItem2SectionPosition;
var id2 = item.shelfItem1.application.id;
var shelfItem2 = item.shelfItem2;
id = shelfItem2 == null ? undefined : shelfItem2.application.id;
var flags2 = item.shelfItem1.application.flags;
shelfItem2 = item.shelfItem2;
flags = shelfItem2 == null ? undefined : shelfItem2.application.flags;
r6 = id2;
r8 = shelfItem1SectionPosition;
r16 = flags2;
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object2 = {};
object2.itemKey = 'sectionName:' + item.sectionName + ' applicationId:' + r6;
object2.sectionName = item.sectionName;
}
object2.sectionPosition = r8;
object2.sectionOverallPosition = item.sectionOverallPosition;
object2.applicationId = r6;
object2.applicationFlags = (importAll(483) /* metro dependency 483: BigFlagUtils */).asUintN(32, r16);
trackAppLauncherItemImpressionOnFirstViewBinding(object2);
if (id != null && shelfItem2SectionPosition != null) {
trackAppLauncherItemImpressionOnFirstViewBinding = trackAppLauncherItemImpressionOnFirstView;
object2 = {};
sectionName = item.sectionName;
object2.itemKey = 'sectionName:' + sectionName + ' applicationId:' + id;
sectionName = item.sectionName;
object2.sectionName = sectionName;
object2.sectionPosition = shelfItem2SectionPosition;
object2.sectionOverallPosition = item.sectionOverallPosition;
object2.applicationId = id;
if (flags != null) {
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
value = value.asUintN(32, flags);
r3 = value;
} else {
r3 = undefined;
}
object2.applicationFlags = r3;
trackAppLauncherItemImpressionOnFirstViewBinding(object2);
}
}
global.__d(_fun89236, 11641, [31, 11642, 11629, 7504, 483,
2]) /* metro module 11641, dependencies: [31, 11642, 11629, 7504, 483, 2] */;
@@ -1,74 +1,79 @@
/* Metro module 11628; source: modules/app_launcher/native/screens/home/useViewableAppLauncherHomeItems.tsx; dependencies: [31, 8047, 4017, 11629, 8742, 480, 2] */
import AppLauncherStore from '../../../AppLauncherStore.tsx'; /* Metro dependency 8047 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as AppLauncherHomeTypesModule from './AppLauncherHomeTypes.tsx'; /* Metro dependency 11629 */
function _fun89195(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11814:6, offset: 0x02003b80, size: 133 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const appLauncherStore = importDefault(8047) /* metro dependency 8047: AppLauncherStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/home/useViewableAppLauncherHomeItems.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/home/useViewableAppLauncherHomeItems.tsx');
exports.useViewableAppLauncherHomeItems = useViewableAppLauncherHomeItems;
}
function useViewableAppLauncherHomeItems() { // fn#89196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11814:260, offset: 0x02003c05, size: 141 bytes, params: 1, frame: 18
const value2 = (ReanimatedRexportModule).useSharedValue(false);
const value3 = (ReanimatedRexportModule).useSharedValue(false);
const value = ReactModule.useRef({});
const useCallback = ReactModule.useCallback;
return {handleViewableItemsChanged: Reflect.apply(useCallback, ReactModule, [function({viewableItems}) {
viewableItems.forEach(_fun89198);
}, [value2, value3, value]]), hasViewedActivityItem: value2, hasViewedLearnMoreItem: value3};
function _fun89197({viewableItems}) { // fn#89197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11814:429, offset: 0x02003c92, size: 32 bytes, params: 2, frame: 11
viewableItems.forEach(_fun89198);
function _fun89198({item}) { // fn#89198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11814:462, offset: 0x02003cb2, size: 460 bytes, params: 2, frame: 18
var value5;
var value9;
var current;
var sectionName;
var value14;
var moduleValue;
var trackImpression;
var object;
var object2;
let type = item.type;
const AppLauncherHomeListItemType = (AppLauncherHomeTypesModule).AppLauncherHomeListItemType;
const SHELF_ITEM = AppLauncherHomeListItemType.SHELF_ITEM;
if (!(type !== SHELF_ITEM || env1_0.get())) {
value5 = environment.__proto__;
env1_0.set(true);
}
type = item.type;
const LEARN_MORE = AppLauncherHomeListItemType.LEARN_MORE;
if (!(type !== LEARN_MORE || env1_1.get())) {
value9 = environment.__proto__;
env1_1.set(true);
}
type = item.type;
const RECOMMENDATION_SECTION_HEADER = AppLauncherHomeListItemType.RECOMMENDATION_SECTION_HEADER;
let r1 = type !== RECOMMENDATION_SECTION_HEADER && item.type !== AppLauncherHomeListItemType.SECTION_HEADER;
r1 = !r1 ? env1_2.current[item.sectionName] != null : r1;
if (!r1) {
value14 = environment.__proto__;
current = env1_2.current;
sectionName = item.sectionName;
current[sectionName] = true;
moduleValue = require(8742) /* metro dependency 8742: useTrackImpression */;
trackImpression = moduleValue.trackImpression;
object = {};
object.type = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes.VIEW;
object.name = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames.APP_LAUNCHER_SECTION;
object2 = {};
sectionName = item.sectionName;
object2.section_name = sectionName;
object2.num_items = item.numItems;
object2.num_visible_items = item.numVisibleItems;
object2.source = AppLauncherStore.entrypoint();
object.properties = object2;
Reflect.apply(trackImpression, moduleValue, [object]);
}
}
function useViewableAppLauncherHomeItems() { // fn#89196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11814:260, offset: 0x02003c05, size: 141 bytes, params: 1, frame: 18
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const binding = env0_2;
const value = binding.useRef({});
const useCallback = binding.useCallback;
return {handleViewableItemsChanged: Reflect.apply(useCallback, binding, [function({viewableItems}) {
viewableItems.forEach(_fun89198);
}, [value2, value3, value]]), hasViewedActivityItem: value2, hasViewedLearnMoreItem: value3};
}
}
function _fun89197({viewableItems}) { // fn#89197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11814:429, offset: 0x02003c92, size: 32 bytes, params: 2, frame: 11
viewableItems.forEach(_fun89198);
}
function _fun89198({item}) { // fn#89198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11814:462, offset: 0x02003cb2, size: 460 bytes, params: 2, frame: 18
var value5;
var value9;
var current;
var sectionName;
var value14;
var moduleValue;
var trackImpression;
var object3;
var object4;
let type = item.type;
const AppLauncherHomeListItemType = (require(11629) /* metro dependency 11629: AppLauncherHomeTypes */).AppLauncherHomeListItemType;
const SHELF_ITEM = AppLauncherHomeListItemType.SHELF_ITEM;
if (!(type !== SHELF_ITEM || env1_0.get())) {
value5 = environment.__proto__;
env1_0.set(true);
}
type = item.type;
const LEARN_MORE = AppLauncherHomeListItemType.LEARN_MORE;
if (!(type !== LEARN_MORE || env1_1.get())) {
value9 = environment.__proto__;
env1_1.set(true);
}
type = item.type;
const RECOMMENDATION_SECTION_HEADER = AppLauncherHomeListItemType.RECOMMENDATION_SECTION_HEADER;
let r1 = type !== RECOMMENDATION_SECTION_HEADER && item.type !== AppLauncherHomeListItemType.SECTION_HEADER;
r1 = !r1 ? env1_2.current[item.sectionName] != null : r1;
if (!r1) {
value14 = environment.__proto__;
current = env1_2.current;
sectionName = item.sectionName;
current[sectionName] = true;
moduleValue = require(8742) /* metro dependency 8742: useTrackImpression */;
trackImpression = moduleValue.trackImpression;
object3 = {};
object3.type = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes.VIEW;
object3.name = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames.APP_LAUNCHER_SECTION;
object4 = {};
sectionName = item.sectionName;
object4.section_name = sectionName;
object4.num_items = item.numItems;
object4.num_visible_items = item.numVisibleItems;
object4.source = AppLauncherStore.entrypoint();
object3.properties = object4;
Reflect.apply(trackImpression, moduleValue, [object3]);
}
}
global.__d(_fun89195, 11628, [31, 8047, 4017, 11629, 8742, 480,
2]) /* metro module 11628, dependencies: [31, 8047, 4017, 11629, 8742, 480, 2] */;
@@ -1,55 +1,64 @@
/* Metro module 11651; source: modules/app_launcher/native/screens/search/EmptyState.tsx; dependencies: [31, 27, 33, 4501, 11592, 8048, 1244, 3869, 4573, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as AccessibilityAnnouncerAndroidModule from '../../../../../external/discord_common/js/packages/design/components/AccessibilityAnnouncer/AccessibilityAnnouncer.android.tsx'; /* Metro dependency 3869 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as AppLauncherTypesModule from '../../../AppLauncherTypes.tsx'; /* Metro dependency 8048 */
import * as AppLauncherNativeUtilsModule from '../../AppLauncherNativeUtils.tsx'; /* Metro dependency 11592 */
function _fun89348(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11837:6, offset: 0x0200a1ac, size: 235 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'position': 'relative',
const env0_5 = (CreateStylesModule).createStyles({container: {'position': 'relative',
'justifyContent': 'center', 'alignItems': 'center'}, textContainer: {'justifyContent': 'center',
'width': '100%'}, text: {'marginTop': 16, 'textAlign': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/search/EmptyState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/search/EmptyState.tsx');
exports.default = EmptyState_89349;
}
function EmptyState_89349({query, showsGenericMessage}) { // fn#89349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11837:430, offset: 0x0200a297, size: 302 bytes, params: 2, frame: 22
showsGenericMessage = !(showsGenericMessage === undefined) && showsGenericMessage;
const styles = useStyles();
const appLauncherNativeUtilsModule = require(11592) /* metro dependency 11592: AppLauncherNativeUtils */;
const useLogAppLauncherEmptyStateView = appLauncherNativeUtilsModule.useLogAppLauncherEmptyStateView;
const AppLauncherEmptyStateType = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEmptyStateType;
const SEARCH_EMPTY = AppLauncherEmptyStateType.SEARCH_EMPTY;
Reflect.apply(useLogAppLauncherEmptyStateView, appLauncherNativeUtilsModule, [SEARCH_EMPTY, query]);
env0_2.useEffect(_fun89350, [showsGenericMessage]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<View style={styles.container}>
<View style={styles.textContainer}>
<Text
style={styles.text}
variant="text-sm/medium"
color="text-default"
>
{showsGenericMessage ? Reflect.apply(string, intl, [t.aOkFv8]) : Reflect.apply(string, intl,
[t.LSNOYf])}
</Text>
function EmptyState_89349({query, showsGenericMessage}) { // fn#89349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11837:430, offset: 0x0200a297, size: 302 bytes, params: 2, frame: 22
showsGenericMessage = !(showsGenericMessage === undefined) && showsGenericMessage;
const styles = useStyles();
const useLogAppLauncherEmptyStateView = AppLauncherNativeUtilsModule.useLogAppLauncherEmptyStateView;
const AppLauncherEmptyStateType = (AppLauncherTypesModule).AppLauncherEmptyStateType;
const SEARCH_EMPTY = AppLauncherEmptyStateType.SEARCH_EMPTY;
Reflect.apply(useLogAppLauncherEmptyStateView, AppLauncherNativeUtilsModule, [SEARCH_EMPTY, query]);
ReactModule.useEffect(_fun89350, [showsGenericMessage]);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<View style={styles.container}>
<View style={styles.textContainer}>
<Text
style={styles.text}
variant="text-sm/medium"
color="text-default"
>
{showsGenericMessage ? Reflect.apply(string, intl, [t.aOkFv8]) : Reflect.apply(string, intl,
[t.LSNOYf])}
</Text>
</View>
</View>
</View>
);
}
);
function _fun89350() { // fn#89350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11837:606, offset: 0x0200a3c5, size: 129 bytes, params: 1, frame: 17
const showsGenericMessageBinding = showsGenericMessage;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const r4 = showsGenericMessageBinding ? Reflect.apply(string, intl, [t.aOkFv8]) : Reflect.apply(string, intl,
[t.LSNOYf]);
const AccessibilityAnnouncer = (AccessibilityAnnouncerAndroidModule).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(r4, 'polite');
}
}
function _fun89350() { // fn#89350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11837:606, offset: 0x0200a3c5, size: 129 bytes, params: 1, frame: 17
const showsGenericMessageBinding = showsGenericMessage;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r4 = showsGenericMessageBinding ? Reflect.apply(string, intl, [t.aOkFv8]) : Reflect.apply(string, intl,
[t.LSNOYf]);
const AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(r4, 'polite');
}
global.__d(_fun89348, 11651, [31, 27, 33, 4501, 11592, 8048, 1244, 3869, 4573,
2]) /* metro module 11651, dependencies: [31, 27, 33, 4501, 11592, 8048, 1244, 3869, 4573, 2] */;
@@ -1,52 +1,60 @@
/* Metro module 11638; source: modules/app_launcher/native/screens/search/SearchBarBottomBorder.tsx; dependencies: [31, 33, 4501, 697, 4017, 4577, 4581, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringModule from '../../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
function _fun89222(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11824:6, offset: 0x0200578e, size: 226 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{border: {borderBottomColor: BORDER_SUBTLE,
const createStyles = CreateStylesModule.createStyles;
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{border: {borderBottomColor: BORDER_SUBTLE,
borderBottomWidth: 1}}]);
object = {code: 'function SearchBarBottomBorderTsx1(){const{withSpring,scrollPosition,triggerScrollHeight,springStandard}=this.__closure;return{opacity:withSpring(scrollPosition.get()>triggerScrollHeight?1:0,springStandard)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/search/SearchBarBottomBorder.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/search/SearchBarBottomBorder.tsx');
exports.usePinnedSearchBarBottomBorder = usePinnedSearchBarBottomBorder;
function usePinnedSearchBarBottomBorder({key, triggerScrollHeight}) { // fn#89223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11824:578, offset: 0x02005870, size: 323 bytes, params: 2, frame: 25
triggerScrollHeight = triggerScrollHeight === undefined ? 1 : triggerScrollHeight;
const styles = useStyles();
const value2 = (ReanimatedRexportModule).useSharedValue(0);
ReactModule.useEffect(_fun89224, [key, value2]);
const value3 = ReactModule.useCallback(_fun89225, [value2]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const usePinnedSearchBarBottomBorderU2 = usePinnedSearchBarBottomBorderU;
usePinnedSearchBarBottomBorderU2.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
scrollPosition: value2, triggerScrollHeight: triggerScrollHeight,
springStandard: (require(4581) /* metro dependency 4581: springPresets */).springStandard};
usePinnedSearchBarBottomBorderU2.__workletHash = 5466161440826;
usePinnedSearchBarBottomBorderU2.__initData = env0_6;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [usePinnedSearchBarBottomBorderU2]);
object = {scrollHandler: value3};
const View = (ReanimatedRexport).View;
object.bottomBorderComponent = <View style={[styles.border, value4]} key={key} />;
return object;
function _fun89224() { // fn#89224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11824:702, offset: 0x01b81419, size: 23 bytes, params: 1, frame: 11
env0_1.set(0);
}
function _fun89225({offset}) { // fn#89225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11824:748, offset: 0x020059b3, size: 30 bytes, params: 2, frame: 11
env0_1.set(offset);
}
function usePinnedSearchBarBottomBorderU() { // fn#89226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11824:810, owner: usePinnedSearchBarBottomBorder.u, offset: 0x020059d1, size: 102 bytes, params: 1, frame: 17
const object = {};
object.opacity = SpringModule.withSpring(env0_1.get() > triggerScrollHeight ? 1 : 0,
(require(4581) /* metro dependency 4581: springPresets */).springStandard);
return object;
}
}
}
function usePinnedSearchBarBottomBorder({key, triggerScrollHeight}) { // fn#89223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11824:578, offset: 0x02005870, size: 323 bytes, params: 2, frame: 25
var object2;
triggerScrollHeight = triggerScrollHeight === undefined ? 1 : triggerScrollHeight;
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const binding = env0_3;
binding.useEffect(_fun89224, [key, value2]);
const value3 = binding.useCallback(_fun89225, [value2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = usePinnedSearchBarBottomBorderU;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
scrollPosition: value2, triggerScrollHeight: triggerScrollHeight,
springStandard: (require(4581) /* metro dependency 4581: springPresets */).springStandard};
closure.__workletHash = 5466161440826;
closure.__initData = env0_6;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
object2 = {scrollHandler: value3};
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object2.bottomBorderComponent = <View style={[styles.border, value4]} key={key} />;
return object2;
}
function _fun89225({offset}) { // fn#89225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11824:748, offset: 0x020059b3, size: 30 bytes, params: 2, frame: 11
env0_1.set(offset);
}
function usePinnedSearchBarBottomBorderU() { // fn#89226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11824:810, owner: usePinnedSearchBarBottomBorder.u, offset: 0x020059d1, size: 102 bytes, params: 1, frame: 17
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
object2.opacity = springModule.withSpring(env0_1.get() > triggerScrollHeight ? 1 : 0,
(require(4581) /* metro dependency 4581: springPresets */).springStandard);
return object2;
}
global.__d(_fun89222, 11638, [31, 33, 4501, 697, 4017, 4577, 4581,
2]) /* metro module 11638, dependencies: [31, 33, 4501, 697, 4017, 4577, 4581, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,75 +1,79 @@
/* Metro module 11648; source: modules/app_launcher/native/screens/search/useTrackSearchItems.tsx; dependencies: [31, 8774, 8742, 480, 5068, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as AppLauncherContextModule from '../../AppLauncherContext.tsx'; /* Metro dependency 8774 */
function _fun89330(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11834:6, offset: 0x02009656, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/native/screens/search/useTrackSearchItems.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/app_launcher/native/screens/search/useTrackSearchItems.tsx');
exports.useTrackSearchItems = useTrackSearchItems;
}
function useTrackSearchItems(a0, a1, a2) { // fn#89331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11834:228, offset: 0x020096c8, size: 149 bytes, params: 4, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const appLauncherContextModule = require(8774) /* metro dependency 8774: AppLauncherContext */;
const useAppLauncherContext = appLauncherContextModule.useAppLauncherContext;
const entrypoint = Reflect.apply(useAppLauncherContext, appLauncherContextModule, []).entrypoint;
const binding = env0_2;
const env0_4 = binding.useRef({});
const env0_5 = binding.useRef(a2);
const useCallback = binding.useCallback;
return {handleViewableItemsChanged: Reflect.apply(useCallback, binding, [_fun89332, [entrypoint, a0, a1, a2]])};
}
function _fun89332({viewableItems}) { // fn#89332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11834:391, offset: 0x0200975d, size: 78 bytes, params: 2, frame: 12
var binding;
if (env0_5.current !== importDefault) {
binding = env0_5;
binding.current = importDefault;
binding = env0_4;
binding.current = {};
}
viewableItems.forEach(_fun89333);
}
function _fun89333(a0) { // fn#89333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11834:466, offset: 0x020097ab, size: 271 bytes, params: 2, frame: 21
var value;
var value2;
var moduleValue;
var applicationId;
var commandId;
var value3;
var moduleValue2;
var trackImpression;
var object3;
var object4;
if (a0.isViewable) {
value = environment.__proto__;
value2 = env1_0(a0.item);
if (value2 != null) {
if (env1_4.current[value2] == null) {
env1_4.current[value2] = true;
moduleValue = require(a0.item);
applicationId = moduleValue.applicationId;
commandId = moduleValue.commandId;
value3 = environment.__proto__.__proto__;
moduleValue2 = require(8742) /* metro dependency 8742: useTrackImpression */;
trackImpression = moduleValue2.trackImpression;
object3 = {};
object3.type = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes.VIEW;
object3.name = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames.APP_LAUNCHER_SEARCH_RESULTS_ITEM;
object4 = {};
object4.location = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.APP_LAUNCHER_HOME_SEARCH;
object4.application_id = applicationId;
object4.command_id = commandId;
object4.search_results_position = a0.index;
object4.query = importDefault;
object4.source = entrypoint;
object3.properties = object4;
Reflect.apply(trackImpression, moduleValue2, [object3, false]);
function useTrackSearchItems(a0, a1, a2) { // fn#89331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11834:228, offset: 0x020096c8, size: 149 bytes, params: 4, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const useAppLauncherContext = AppLauncherContextModule.useAppLauncherContext;
const entrypoint = Reflect.apply(useAppLauncherContext, AppLauncherContextModule, []).entrypoint;
const binding = env0_2;
const env0_4 = binding.useRef({});
const env0_5 = binding.useRef(a2);
const useCallback = binding.useCallback;
return {handleViewableItemsChanged: Reflect.apply(useCallback, binding, [_fun89332, [entrypoint, a0, a1, a2]])};
function _fun89332({viewableItems}) { // fn#89332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11834:391, offset: 0x0200975d, size: 78 bytes, params: 2, frame: 12
var binding;
if (env0_5.current !== importDefault) {
binding = env0_5;
binding.current = importDefault;
binding = env0_4;
binding.current = {};
}
viewableItems.forEach(_fun89333);
function _fun89333(a0) { // fn#89333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11834:466, offset: 0x020097ab, size: 271 bytes, params: 2, frame: 21
var value;
var value2;
var moduleValue;
var applicationId;
var commandId;
var value3;
var moduleValue2;
var trackImpression;
var object;
var object2;
if (a0.isViewable) {
value = environment.__proto__;
value2 = env1_0(a0.item);
if (value2 != null) {
if (env1_4.current[value2] == null) {
env1_4.current[value2] = true;
moduleValue = require(a0.item);
applicationId = moduleValue.applicationId;
commandId = moduleValue.commandId;
value3 = environment.__proto__.__proto__;
moduleValue2 = require(8742) /* metro dependency 8742: useTrackImpression */;
trackImpression = moduleValue2.trackImpression;
object = {};
object.type = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes.VIEW;
object.name = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames.APP_LAUNCHER_SEARCH_RESULTS_ITEM;
object2 = {};
object2.location = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).ApplicationCommandTriggerLocations.APP_LAUNCHER_HOME_SEARCH;
object2.application_id = applicationId;
object2.command_id = commandId;
object2.search_results_position = a0.index;
object2.query = importDefault;
object2.source = entrypoint;
object.properties = object2;
Reflect.apply(trackImpression, moduleValue2, [object, false]);
}
}
}
}
}
}
}
global.__d(_fun89330, 11648, [31, 8774, 8742, 480, 5068,
2]) /* metro module 11648, dependencies: [31, 8774, 8742, 480, 5068, 2] */;