/* Metro module 8749; source: modules/user_profile/native/UserProfileActionSheet.tsx; dependencies: [57, 31, 27, 1379, 1945, 1878, 7624, 6816, 661, 6276, 33, 4501, 6277, 4017, 1585, 566, 8490, 6771, 6789, 7326, 3829, 8514, 8750, 8498, 8751, 8503, 8505, 8481, 8494, 8752, 1478, 5314, 8502, 4048, 3860, 697, 8746, 8753, 8061, 1932, 8491, 683, 4008, 4080, 8743, 1484, 6275, 1305, 8754, 1244, 3868, 8758, 477, 7007, 8759, 8779, 10338, 8474, 6515, 10496, 1314, 2] */ function _fun68486(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6, offset: 0x01c509a0, size: 543 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(57) /* metro dependency 57 */; let value = importAll(31) /* metro dependency 31 */; const value2 = require(27) /* metro dependency 27 */; const env0_5 = value2.StyleSheet; const env0_6 = value2.View; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */; const env0_11 = (require(6816) /* metro dependency 6816: Constants */).UserProfileThemeTypes; const constantsModule = require(661) /* metro dependency 661: Constants */; const env0_12 = constantsModule.AnalyticEvents; const env0_13 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID; const env0_14 = constantsModule.UserSettingsSections; const env0_15 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH; const value4 = require(33) /* metro dependency 33 */; const env0_16 = value4.jsx; const env0_17 = value4.jsxs; const env0_18 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}, profileContainer: {position: 'relative'}, noPadding: {paddingHorizontal: 0}, profileEffect: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'zIndex': 1}}); object = {code: 'function UserProfileActionSheetTsx1(){const{value}=this.__closure;return value.get();}'}; object = {code: 'function UserProfileActionSheetTsx2(prepared){const{animatedPosition}=this.__closure;return animatedPosition.set(prepared);}'}; object = {code: 'function UserProfileActionSheetTsx3(){const{animatedPosition,safeAreaTop,interpolate,animatedIndex,Extrapolation}=this.__closure;return{transform:[{translateY:animatedPosition.get()+safeAreaTop}],opacity:interpolate(animatedIndex.get(),[-1,0],[0,1],Extrapolation.CLAMP)};}'}; object = {code: 'function UserProfileActionSheetTsx4(payload,context){const{defaultHandleOnScroll,scrollPosition,animatedScrollableState,SCROLLABLE_STATE}=this.__closure;var _defaultHandleOnScrol;(_defaultHandleOnScrol=defaultHandleOnScroll)===null||_defaultHandleOnScrol===void 0||_defaultHandleOnScrol(payload,context);scrollPosition.set(animatedScrollableState.get()===SCROLLABLE_STATE.LOCKED?0:payload.contentOffset.y);}'}; object = {code: 'function UserProfileActionSheetTsx5(){const{scrollPosition}=this.__closure;const transform=scrollPosition.get()<=0?[{translateY:scrollPosition.get()}]:[];return{transform:transform};}'}; value = value.memo(UserProfileActionSheet); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/native/UserProfileActionSheet.tsx'); exports.default = value; } function UseAnimatedPosition({animatedPosition}) { // fn#68487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:784, offset: 0x01c50bbf, size: 179 bytes, params: 2, frame: 17 const moduleValue = require(6277) /* metro dependency 6277 */; const useBottomSheet = moduleValue.useBottomSheet; const animatedPosition2 = Reflect.apply(useBottomSheet, moduleValue, []).animatedPosition; const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */; const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction; const closure = function() { return animatedPosition.get(); }; closure.__closure = {value: animatedPosition2}; closure.__workletHash = 5684011437075; closure.__initData = env0_19; const closure2 = function(a0) { return animatedPosition.set(a0); }; closure2.__closure = {animatedPosition: animatedPosition}; closure2.__workletHash = 15360670503044; closure2.__initData = env0_20; Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]); return null; } function ActionSheetAlignedView({animatedPosition, animatedIndex, safeAreaTop, children}) { // fn#68490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:1399, offset: 0x01c50c88, size: 245 bytes, params: 2, frame: 22 const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */; const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle; const closure = ActionSheetAlignedViewU; const object2 = {animatedPosition: animatedPosition, safeAreaTop: safeAreaTop}; object2.interpolate = reanimatedRexportModule.interpolate; object2.animatedIndex = animatedIndex; const Extrapolation = reanimatedRexportModule.Extrapolation; object2.Extrapolation = Extrapolation; closure.__closure = object2; closure.__workletHash = 16546700050596; closure.__initData = env0_21; const value2 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]); const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View; return ( {children} ); } function UserProfileActionSheet({userId, channelId, messageId, roleId, sessionId, disableCalls, disableMessage, isVoiceContext, onClose, location, openedAt, isPreviewingChanges, showGuildProfile, sourceAnalyticsLocations = [], initialSection}) { // fn#68492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:2559, offset: 0x01c50e1c, size: 3564 bytes, params: 2, frame: 65 var r25; var r0; const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider; const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider; var object3; const UserProfileAnalyticsProvider = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).UserProfileAnalyticsProvider; const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet; var items2; var BottomSheetScrollView; var moduleValue14; var items3; var items5; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var EmptyState; let value = undefined; isPreviewingChanges = !(isPreviewingChanges === value) && isPreviewingChanges; showGuildProfile = showGuildProfile === value || showGuildProfile; const env0_23 = value; const styles = useStyles(); const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0); const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1); const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top; const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() { return UserStore.getUser(userId); }); const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(channelId); }, [channelId]); const guild_id = value7 == null ? value : value7.guild_id; const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun68495); const value9 = (importDefault(8490) /* metro dependency 8490: useDisplayProfile */)((user == null ? value : user.id) ?? EMPTY_STRING_SNOWFLAKE_ID, showGuildProfile ? guild_id : value); const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */; let object = []; const value10 = arraySpread(object, sourceAnalyticsLocations, 0, undefined); const USER_PROFILE_ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_PROFILE_ACTION_SHEET; object[value10] = USER_PROFILE_ACTION_SHEET; value10 + 1; const analyticsLocations = defaultImport2(object).analyticsLocations; const {bottomSheetRef, bottomSheetClose} = (require(7326) /* metro dependency 7326: useBottomSheetRef */).useBottomSheetRef(); let binding = isVoiceContext; const value12 = binding.useRef(null); const value13 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0); const value14 = binding.useMemo(_fun68496, [value13]); const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */; const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle; const closure = UserProfileActionSheetW; closure.__closure = {scrollPosition: value13}; closure.__workletHash = 6237718973214; closure.__initData = env0_23; const value15 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]); let useState = binding.useState; const value16 = Reflect.apply(useState, binding, [false]); const binding2 = disableMessage; const value17 = binding2(value16, 2); const property = value17[0]; const env0_22 = value17[1]; useState = binding.useState; const value18 = binding2(Reflect.apply(useState, binding, [0]), 2); const property2 = value18[0]; const env0_24 = value18[1]; const value19 = binding.useCallback(_fun68501, []); const ProfileVisibility = (require(3829) /* metro dependency 3829: UserSettings */).ProfileVisibility; const value20 = ProfileVisibility.useSetting(); const {pendingThemeColors, pendingAvatarDecoration, pendingProfileEffect, pendingProfileFrame} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserProfileSettingsStore], function() { return UserProfileSettingsStore.getPendingChanges(); }); const value22 = (require(8514) /* metro dependency 8514: UserProfileAnalyticsContext */).useCreateUserProfileAnalyticsContext({layout: 'ACTION_SHEET', sourceSessionId: sessionId, userId: userId, guildId: guild_id, channelId: channelId, messageId: messageId, roleId: roleId, showGuildProfile: showGuildProfile}); const r22 = isPreviewingChanges && value !== pendingProfileFrame ? pendingProfileFrame == null ? value : pendingProfileFrame.skuId : value9 == null || value9.profileFrame == null ? value : value9.profileFrame.skuId; const value23 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape(); const value24 = (importDefault(8498) /* metro dependency 8498: useMaybeFetchProfileFrame */)(value23 ? value : r22, 'UserProfileActionSheet'); (importDefault(8751) /* metro dependency 8751: useMaybeTrackProfileFrameViewed */)({skuId: value23 ? value : r22, openedAt: openedAt, context: value22, analyticsLocations: analyticsLocations}); const value25 = isVoiceContext.useMemo(_fun68503, [value24, value5, top, value6, property2]); const value26 = (importDefault(8481) /* metro dependency 8481: useProfileEffect */)(isPreviewingChanges && value !== pendingProfileEffect ? pendingProfileEffect == null ? value : pendingProfileEffect.skuId : value9 == null || value9.profileEffect == null ? value : value9.profileEffect.skuId); const {theme, primaryColor, secondaryColor} = (importDefault(8494) /* metro dependency 8494: useProfileTheme */)({user: user, displayProfile: value9, pendingThemeColors: isPreviewingChanges ? pendingThemeColors : value}); const value28 = (importDefault(8752) /* metro dependency 8752: useUserProfileBannerHeight */)(ACTION_SHEET_MAX_WIDTH); const {height, width} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)(); const NAV_BAR_HEIGHT_MULTILINE = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT_MULTILINE; const value30 = height - NAV_BAR_HEIGHT_MULTILINE - top; binding = isVoiceContext; const value31 = binding.useMemo(_fun68504, [isPreviewingChanges, value24, width]); const value32 = (importDefault(4048) /* metro dependency 4048: useTheme */)(); const useTokenModule = require(3860) /* metro dependency 3860: useToken */; const useToken = useTokenModule.useToken; const INTERACTIVE_TEXT_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_HOVER; const value33 = Reflect.apply(useToken, useTokenModule, [INTERACTIVE_TEXT_HOVER, theme]); const value34 = (importDefault(8746) /* metro dependency 8746: useUserProfileAnalyticsProperties */)({userId: userId, user: user, channelId: channelId, guildId: guild_id, displayProfile: value9, guildMember: value8}); const env0_32 = binding.useMemo(_fun68505, [user, channelId]); let useEffect = binding.useEffect; Reflect.apply(useEffect, binding, [_fun68506, [user, userId]]); binding.useEffect(_fun68507, [user, guild_id, channelId]); binding.useEffect(_fun68508, [value34, value9, guild_id, property, value8]); useEffect = binding.useEffect; object = [pendingAvatarDecoration == null ? value : pendingAvatarDecoration.skuId]; object[1] = pendingProfileEffect == null ? value : pendingProfileEffect.skuId; object[2] = pendingProfileFrame == null ? value : pendingProfileFrame.skuId; object[3] = sourceAnalyticsLocations; Reflect.apply(useEffect, binding, [_fun68509, object]); binding = isVoiceContext; binding.useEffect(function() { return _fun68511; }, [onClose]); binding.useEffect(_fun68512, [userId]); const env0_33 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(); if (user == null) { object = {value: analyticsLocations}; var userProfileAnalyticsProviderProps = {value: value22, openedAt: openedAt, fetchStartedAt: value9 == null ? value : value9.fetchStartedAt, fetchEndedAt: value9 == null ? value : value9.fetchEndedAt, isLoaded: value9 == null ? value : value9.isLoaded}; EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState; value = ; r0 = value; } else { object = {theme: theme, primaryColor: primaryColor, secondaryColor: secondaryColor}; object3 = {value: analyticsLocations}; var userProfileAnalyticsProviderProps = {value: value22, openedAt: openedAt, fetchStartedAt: value9 == null ? value : value9.fetchStartedAt, fetchEndedAt: value9 == null ? value : value9.fetchEndedAt, isLoaded: value9 == null ? value : value9.isLoaded}; var bottomSheetProps2 = {'ref': null, 'handleDisabled': true, 'scrollable': true, 'startExpanded': true, ref: bottomSheetRef, maxHeight: value30 - value31, contentStyles: styles.noPadding, backdropChildren: value25, animatedIndex: value6}; r25 = value24 != null && ; items2 = [r25]; items2[1] = ((Component) => )(importDefault(8758) /* metro dependency 8758: UserProfileFixedBackground */); BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView; var bottomSheetScrollViewProps2 = {scrollsToTop: false, style: styles.container, contentContainerStyle: {pointerEvents: isPreviewingChanges ? 'none' : value}}; moduleValue14 = require(477) /* metro dependency 477: PlatformUtils */; bottomSheetScrollViewProps2.scrollEventsHandlersHook = moduleValue14.isIOS() ? value14 : value; bottomSheetScrollViewProps2.ref = value12; var viewBindingProps = {style: styles.profileContainer, onLayout: value19}; items3 = [_fun68517(user)]; items3[1] = value26 != null && ((View) => {((Component) => )(importDefault(8474) /* metro dependency 8474: ProfileEffect */)})((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View); items2[2] = {items3}; r25 = value24 == null && ((ActionSheetHeaderBar) => )((require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar); items2[3] = r25; items5 = [{items2}]; items5[1] = value24 != null && {((Component) => )(importDefault(8503) /* metro dependency 8503: ProfileFrame */)}{((ActionSheetHeaderBar) => )((require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar)}; items5[2] = isPreviewingChanges && {((ActionSheetBackdropToast) => )((require(10496) /* metro dependency 10496: ActionSheetBackdropToast */).ActionSheetBackdropToast)}; value = {items5}; r0 = value; } return r0; } function ActionSheetAlignedViewU() { // fn#68491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:1532, owner: ActionSheetAlignedView.u, offset: 0x01c50d7d, size: 159 bytes, params: 1, frame: 21 const object3 = {}; const object4 = {}; object4.translateY = animatedPosition.get() + safeAreaTop; object3.transform = [object4]; const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */; const interpolate = reanimatedRexportModule.interpolate; const value = animatedIndex.get(); const Extrapolation = reanimatedRexportModule.Extrapolation; const CLAMP = Extrapolation.CLAMP; object3.opacity = Reflect.apply(interpolate, reanimatedRexportModule, [value, [-1, 0], [0, 1], CLAMP]); return object3; } function _fun68495() { // fn#68495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:3095, offset: 0x01c51c3d, size: 45 bytes, params: 1, frame: 14 const guild_idBinding = guild_id; const value2 = null; return value2 != guild_idBinding ? GuildMemberStore.getMember(guild_id, userId) : value2; } function _fun68496() { // fn#68496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:3396, offset: 0x01c51c6a, size: 25 bytes, params: 1, frame: 11 return ((a0) => { var env0_0 = a0; return _fun68498; })(env0_20); } function UserProfileActionSheetW() { // fn#68500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:3989, owner: UserProfileActionSheet.W, offset: 0x01c51df2, size: 67 bytes, params: 1, frame: 12 var items; var object; if (env0_20.get() <= 0) { object = {}; object.translateY = env0_20.get(); items = [object]; } else { items = []; } return {transform: items}; } function _fun68501({nativeEvent}) { // fn#68501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:4249, offset: 0x01c51e35, size: 55 bytes, params: 2, frame: 12 const binding = env0_24; const Math = global.Math; binding(Math.floor(nativeEvent.layout.width)); } function _fun68503() { // fn#68503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:4956, offset: 0x01c51e7f, size: 171 bytes, params: 1, frame: 22 const value2 = null; return value2 == env0_29 ? value2 : {((Component) => )(importDefault(8503) /* metro dependency 8503: ProfileFrame */)}; } function _fun68504() { // fn#68504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:5532, offset: 0x01c51f2a, size: 94 bytes, params: 1, frame: 15 var Math; var min; var widthBinding; var value2; if (isPreviewingChanges) { if (env0_29 == null) { return 0; } Math = global.Math; min = Math.min; widthBinding = width; value2 = environment.__proto__; return (importDefault(8502) /* metro dependency 8502: scaleProfileFrame */)(env0_29, Reflect.apply(min, Math, [widthBinding, ACTION_SHEET_MAX_WIDTH])).overflowTop; } return 0; } function _fun68505() { // fn#68505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:5806, offset: 0x01c51f88, size: 63 bytes, params: 1, frame: 14 var r0; var value3; var moduleValue; const value2 = user != null; if (value2) { value3 = environment.__proto__; moduleValue = require(8753) /* metro dependency 8753: ApplicationPresenceUtils */; r0 = moduleValue.shouldDisableUserPresenceInChannel(user, channelId); } else { r0 = value2; } return r0; } function _fun68506() { // fn#68506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:5889, offset: 0x01c51fc7, size: 57 bytes, params: 1, frame: 12 var value2; var moduleValue; if (user == null) { value2 = environment.__proto__; moduleValue = require(8061) /* metro dependency 8061: UserActionCreators */; moduleValue.getUser(userId); } } function _fun68507() { // fn#68507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:5945, offset: 0x01c52000, size: 192 bytes, params: 1, frame: 19 var id; var value5; var value6; var defaultImport2; if (!(user == null || user.isNonUserBot() && !(importDefault(1932) /* metro dependency 1932: isChangelogUser */)(user.id))) { value5 = environment.__proto__; value6 = undefined; defaultImport2 = importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */; id = user.id; userBinding = user; defaultImport2(id, userBinding.getAvatarURL(guild_id, 80), {'type': 'action_sheet', 'withMutualGuilds': true, 'withMutualFriends': true, 'dispatchWait': true, guildId: guild_id, channelId: channelId ?? value6}); } } function _fun68508() { // fn#68508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6170, offset: 0x01c520c0, size: 131 bytes, params: 1, frame: 15 var value6; var defaultImport; if (!(env0_21 || env0_17 == null)) { if (guild_id == null || env0_16?.fullProfileLoadedTimestamp != null) { value6 = environment.__proto__; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.OPEN_POPOUT, env0_31); env0_22(true); } } } function _fun68509() { // fn#68509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6324, offset: 0x01c52143, size: 213 bytes, params: 1, frame: 19 var r5; var defaultImport; var track; var OPEN_MODAL; const value2 = env0_8.at(-1); const value4 = undefined; const COLLECTIBLES_SHOP_PROFILE_PREVIEW = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_PROFILE_PREVIEW; if (value2 === COLLECTIBLES_SHOP_PROFILE_PREVIEW) { defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; track = defaultImport.track; OPEN_MODAL = AnalyticEvents.OPEN_MODAL; r5 = (pendingAvatarDecoration == null ? value4 : pendingAvatarDecoration.skuId) ?? (pendingProfileEffect == null ? value4 : pendingProfileEffect.skuId); r5 = r5 ?? (pendingProfileFrame == null ? value4 : pendingProfileFrame.skuId); Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: 'Collectibles Shop Details Modal Expanded', location_stack: env0_8, sku_id: r5}]); } return value4; } function _fun68510() { // fn#68510, offset: 0x01c52218, size: 11 bytes, params: 1, frame: 1 return function() { if (onClose != null) { onClose(); } }; } function _fun68512() { // fn#68512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6731, offset: 0x01c5223e, size: 126 bytes, params: 1, frame: 15 var environment; var key; var currentRoute; const closure = handleNavigationChange; let value = environment.__proto__; value = undefined; const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef(); if (rootNavigationRef != null) { if (rootNavigationRef.isReady()) { currentRoute = rootNavigationRef.getCurrentRoute(); key = currentRoute == null ? value : currentRoute.key; rootNavigationRef.addListener('state', closure); return _fun68514; } } return value; } function showUserProfileActionSheetWithParams() { // fn#68515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:7201, owner: UserProfileActionSheet.showUserProfileActionSheetWithParams, offset: 0x01c52359, size: 57 bytes, params: 1, frame: 14 let value = environment.__proto__; value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */; const object2 = {}; const analyticsLocationsBinding = analyticsLocations; object2.sourceAnalyticsLocations = analyticsLocationsBinding; copyDataProperties(object2, env0_28, analyticsLocationsBinding); value(object2); } function handleUserSettingsClose() { // fn#68516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:7276, owner: UserProfileActionSheet.handleUserSettingsClose, offset: 0x01c52392, size: 29 bytes, params: 1, frame: 10 env0_33.goBack(); showUserProfileActionSheetWithParams(); } function _fun68517(a0) { // fn#68517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:8623, offset: 0x01c523af, size: 326 bytes, params: 2, frame: 18 var r0; const object2 = {user: a0}; var value; object2.channel = env0_14; object2.displayProfile = env0_17; object2.disableCalls = disableCalls; object2.disableMessage = disableMessage; object2.isVoiceContext = isVoiceContext; object2.location = location; object2.disableStatus = env0_32; object2.scrollViewRef = env0_19; object2.isPreviewingChanges = isPreviewingChanges; object2.navigateToShop = function() { return require(dependencyMap[53]).openUserSettings({screen: UserSettingsSections.COLLECTIBLES_SHOP, onClose: handleUserSettingsClose}); }; object2.navigateToPremium = function() { return require(dependencyMap[53]).openUserSettings({screen: UserSettingsSections.PREMIUM, onClose: handleUserSettingsClose}); }; object2.showUserProfileActionSheet = showUserProfileActionSheetWithParams; object2.initialSection = initialSection; const value3 = undefined; const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */; object2.scrollPosition = platformUtilsModule.isIOS() ? env0_20 : value3; if (a0.isNonUserBot()) { value = importDefault(8759) /* metro dependency 8759: NonUserBotProfileContent */; value = ((Component) => )(value); r0 = value; } else if (a0.bot) { value = importDefault(8779) /* metro dependency 8779: BotUserProfileContent */; value = ((Component) => )(value); r0 = value; } else { value = importDefault(10338) /* metro dependency 10338: UserProfileContent */; value = ((Component) => )(value); r0 = value; } return r0; } function buildBottomSheeetScrollEventsHandlers(a0) { // fn#68497, offset: 0x01c51c83, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun68498; } function handleNavigationChange() { // fn#68513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6958, offset: 0x01c522bc, size: 126 bytes, params: 1, frame: 14 var key2; var currentRoute; var defaultImport; var hideActionSheet; var getUserProfileActionSheetKey; var value4; var value; const value2 = undefined; if (env0_0 == null) { key2 = value2; } else { currentRoute = env0_0.getCurrentRoute(); key2 = currentRoute == null ? value2 : currentRoute.key; } if (key2 !== key) { value = environment.__proto__.__proto__; defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */; hideActionSheet = defaultImport.hideActionSheet; value = require(8743) /* metro dependency 8743: showUserProfileActionSheet */; getUserProfileActionSheetKey = value.getUserProfileActionSheetKey; value4 = environment.__proto__; Reflect.apply(hideActionSheet, defaultImport, [Reflect.apply(getUserProfileActionSheetKey, value, [userId])]); } return value2; } function _fun68514() { // fn#68514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:6903, offset: 0x01c5233a, size: 31 bytes, params: 1, frame: 13 const binding = env0_0; binding.removeListener('state', handleNavigationChange); } function _fun68498(a0, a1, a2) { // fn#68498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:3456, offset: 0x01c51c95, size: 232 bytes, params: 4, frame: 23 var environment; let value = environment.__proto__.__proto__.__proto__; const value2 = (require(6277) /* metro dependency 6277 */).useScrollEventsHandlersDefault(a0, a1, a2); const moduleValue2 = require(6277) /* metro dependency 6277 */; const useBottomSheetInternal = moduleValue2.useBottomSheetInternal; const animatedScrollableState = Reflect.apply(useBottomSheetInternal, moduleValue2, []).animatedScrollableState; const env0_0 = animatedScrollableState; const handleOnScroll = value2.handleOnScroll; const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */; const useWorkletCallback = reanimatedRexportModule.useWorkletCallback; const closure = s_68499; let object2 = {defaultHandleOnScroll: handleOnScroll}; object2.scrollPosition = env0_0; object2.animatedScrollableState = animatedScrollableState; const SCROLLABLE_STATE = moduleValue2.SCROLLABLE_STATE; object2.SCROLLABLE_STATE = SCROLLABLE_STATE; closure.__closure = object2; closure.__workletHash = 13254130622789; closure.__initData = env3_22; value = Reflect.apply(useWorkletCallback, reanimatedRexportModule, [closure, [handleOnScroll, animatedScrollableState]]); object2 = {}; copyDataProperties(object2, value2, undefined); object2['handleOnScroll'] = value; return object2; } function s_68499(a0, a1) { // fn#68499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8934:3634, offset: 0x01c51d7d, size: 117 bytes, params: 3, frame: 16 if (handleOnScroll != null) { handleOnScroll(a0, a1); } const binding = env1_0; const set = binding.set; const value = animatedScrollableState.get(); const SCROLLABLE_STATE = (require(6277) /* metro dependency 6277 */).SCROLLABLE_STATE; const LOCKED = SCROLLABLE_STATE.LOCKED; Reflect.apply(set, binding, [value === LOCKED ? 0 : a0.contentOffset.y]); }