/* Metro module 9839; source: modules/reactions/native/MessageReactionsContent.tsx; dependencies: [57, 31, 27, 4502, 1379, 1945, 7150, 3784, 661, 33, 4017, 4573, 4501, 697, 566, 3795, 644, 7152, 7151, 6518, 22, 6771, 4617, 3995, 6746, 1305, 1423, 9210, 477, 5312, 8743, 7331, 9840, 1244, 9841, 4000, 3829, 6739, 9842, 4504, 1478, 4071, 4080, 9843, 1962, 6818, 6796, 9844, 4081, 4082, 1585, 8754, 6275, 6277, 587, 6860, 7172, 7213, 9845, 8140, 2] */ import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Module00644 from '../../../by-id/module-00644.js'; /* Metro dependency 644 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */ import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */ import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */ import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */ import NicknameUtils from '../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */ import Emoji from '../../emojis/native/Emoji.tsx'; /* Metro dependency 6739 */ import FormRow from '../../../design/void/Form/native/FormRow.tsx'; /* Metro dependency 6746 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import TidaWebformExperiment from '../../guild/TidaWebformExperiment.tsx'; /* Metro dependency 6796 */ import MessageReactionsStore from '../../../stores/MessageReactionsStore.tsx'; /* Metro dependency 7150 */ import ShowUserProfileActionSheet from '../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */ import SlideoutButton from '../../../components_native/common/SlideoutButton.tsx'; /* Metro dependency 9840 */ import TabBar from '../../../components_native/common/TabBar.tsx'; /* Metro dependency 9844 */ 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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as StorageModule from '../../../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */ import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */ import * as ReactionUtilsModule from '../ReactionUtils.tsx'; /* Metro dependency 3795 */ import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */ import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ import * as XSmallIconModule from '../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */ import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */ import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */ import * as ChevronSmallRightIconModule from '../../../design/components/Icon/native/redesign/generated/ChevronSmallRightIcon.tsx'; /* Metro dependency 6818 */ import * as MessageReactionsTypesModule from '../../messages/MessageReactionsTypes.tsx'; /* Metro dependency 7152 */ import * as BurstReactionEffectUtilsModule from '../../messages/native/burst_reactions/BurstReactionEffectUtils.tsx'; /* Metro dependency 7172 */ import * as NoResultsModule from '../../../design/components/Illustration/native/redesign/generated/NoResults.tsx'; /* Metro dependency 8754 */ function _fun77084(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:6, offset: 0x01df0335, size: 1211 bytes, params: 8, frame: 26 const env0_0 = require; const useReactors2 = useReactors; const useReactorsOnScrollNative2 = useReactorsOnScrollNative; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactNativeModule; const env0_6 = value.ActivityIndicator; value.Platform; const env0_7 = value.Pressable; const env0_8 = value.View; value = require(661) /* metro dependency 661: Constants */; const env0_14 = value.DEFAULT_NUM_REACTION_USERS; const env0_15 = value.Permissions; value = require(33) /* metro dependency 33 */; const env0_16 = value.jsx; const env0_17 = value.jsxs; value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */; const createAnimatedComponent = value.createAnimatedComponent; const Text = (TextModule).Text; const env0_18 = Reflect.apply(createAnimatedComponent, value, [Text]); value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; object.container = {flex: 1}; const object3 = {padding: 32}; object3.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object3.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object.containerEmpty = object3; const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND; object.listRow = {height: 48, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND}; const object5 = {'flexDirection': 'row', 'alignItems': 'center', 'borderRadius': null, 'padding': 8, 'marginTop': 8}; object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object.tabContainer = object5; const INTERACTIVE_BACKGROUND_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_SELECTED; object.tabContainerSelected = {backgroundColor: INTERACTIVE_BACKGROUND_SELECTED}; object.tab = {'padding': 0, 'marginHorizontal': 8, 'marginBottom': 8}; object.tabSelected = {borderBottomColor: 'transparent'}; const object8 = {}; object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object.tabActive = object8; object.reactionTab = {'display': 'flex', 'flexDirection': 'column'}; object.removeButtonContainer = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center'}; const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object.emojiOptionsButton = {'flexDirection': 'row', 'alignItems': 'center', 'marginRight': null, 'gap': 2, marginRight: PX_16}; const object10 = {'backgroundColor': null, 'borderRadius': null, 'height': 32, 'overflow': 'hidden', 'minWidth': 42, 'marginRight': 20, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 12}; const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL; object10.backgroundColor = BACKGROUND_FEEDBACK_CRITICAL; object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xxl; object.removeAllButton = object10; let INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT; object.reactionCountText = {color: INTERACTIVE_TEXT_DEFAULT}; const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE; object.reactionCountTextSelected = {color: INTERACTIVE_TEXT_ACTIVE}; object.emoji = {marginRight: 8}; INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT; object.emojiText = {'lineHeight': 24, 'fontSize': 20, 'textAlign': 'center', color: INTERACTIVE_TEXT_DEFAULT}; object.emojiImage = {'resizeMode': 'contain', 'width': 24, 'height': 24}; object.emojiTextIdentifier = {padding: 16}; object.avatar = {marginRight: 10}; object.buttonRow = {'flexDirection': 'row', 'justifyContent': 'flex-end', 'alignItems': 'center'}; object.loadingSpinner = {'height': 48, 'padding': 6}; const env0_19 = Reflect.apply(createStyles, value, [object]); object = {code: 'function MessageReactionsContentTsx1(){const{useReducedMotion,buttonWidth,withTiming}=this.__closure;return{maxWidth:useReducedMotion?buttonWidth.get():withTiming(buttonWidth.get(),{duration:200})};}'}; object = {code: "function MessageReactionsContentTsx2(){const{useReducedMotion,textOpacity,withTiming}=this.__closure;return{opacity:useReducedMotion?textOpacity.get():withTiming(textOpacity.get(),{duration:125}),color:'white',fontSize:14,marginLeft:8,textAlignVertical:'center'};}"}; const Storage = (StorageModule).Storage; const env0_25 = Storage.get('MessageReactionsContent_SwipableBounced', false); (FileImportTrackerModule).fileFinishedImporting('modules/reactions/native/MessageReactionsContent.tsx'); exports.useReactors = useReactors2; exports.useReactorsOnScrollNative = useReactorsOnScrollNative2; exports.MessageReactionsEmpty = MessageReactionsEmpty; exports.MessageReactionsContent = MessageReactionsContent; function useReactors({channelId, messageId, reaction, reactionType}) { // fn#77085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:1931, offset: 0x01df07f0, size: 284 bytes, params: 2, frame: 24 const value3 = (FluxModule).useStateFromStores([MessageReactionsStore], _fun77086, [channelId, messageId, reaction.emoji, reactionType], Module00644); object = {reactors: value3}; const ReactionTypes = (MessageReactionsTypesModule).ReactionTypes; const VOTE = ReactionTypes.VOTE; object.reactorsHasMore = (reactionType === VOTE ? reaction.count_details?.vote ?? 0 : reactionType === ReactionTypes.BURST ? reaction.burst_count : reaction.count) > value3.length; return object; function _fun77086() { // fn#77086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:2048, offset: 0x01df090c, size: 97 bytes, params: 1, frame: 19 var r0; let value = environment.__proto__; value = MessageReactionsStore.getReactions(channelId, messageId, reaction.emoji, DEFAULT_NUM_REACTION_USERS, reactionType); const Array = global.Array; const from = Array.from; if (value == null) { r0 = undefined; } else { value = value.values(); r0 = value; } r0 = r0 ?? []; return Reflect.apply(from, Array, [r0]); } } function useReactorsOnScrollNative({channelId, messageId, reactionSelected, reactors, reactorsHasMore, reactionType}) { // fn#77087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:2368, offset: 0x01df096d, size: 302 bytes, params: 2, frame: 21 const env0_5Binding = ReactModule.useRef(false); const value3 = env0_5Binding.useCallback(_fun77088, [channelId, messageId, reactionSelected, reactorsHasMore, reactors.length > 0 ? reactors[reactors.length - 1].id : null, reactionType]); const env0_8 = env0_5Binding.useRef(value3); env0_5Binding.useEffect(_fun77090, [value3]); const env0_9 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun77091); return (importDefault(6518) /* metro dependency 6518: useInitialValue */)(function() { return _fun77094; }); function _fun77088(a0, a1) { // fn#77088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:2564, offset: 0x01df0a9b, size: 190 bytes, params: 3, frame: 14 var environment; var value2; var moduleValue; if (a0 / a1 > 0.75 && reactorsHasMore && !ReactModule.current) { ReactModule.current = true; value2 = environment.__proto__; moduleValue = importAll(7151) /* metro dependency 7151: ReactionActionCreators */; moduleValue.getReactors({channelId: channelId, messageId: messageId, emoji: reactionSelected.emoji, limit: DEFAULT_NUM_REACTION_USERS, after: id, type: reactionType}).then(_fun77089); } function _fun77089() { // fn#77089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:2701, offset: 0x01df0b59, size: 19 bytes, params: 1, frame: 2 env1_5.current = false; } } function _fun77090() { // fn#77090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:2767, offset: 0x01df0b6c, size: 21 bytes, params: 1, frame: 2 env0_8.current = env0_7; } function _fun77091() { // fn#77091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:2807, offset: 0x01df0b81, size: 51 bytes, params: 1, frame: 13 var environment; const value = environment.__proto__; return (Module00022).debounce(_fun77092, 16); function _fun77092(a0, a1) { // fn#77092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:2830, offset: 0x01df0bb4, size: 26 bytes, params: 3, frame: 13 return env1_8.current(a0, a1); } } function _fun77093() { // fn#77093, offset: 0x01df0bce, size: 11 bytes, params: 1, frame: 1 return _fun77094; function _fun77094({nativeEvent}) { // fn#77094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:2880, offset: 0x01df0bd9, size: 48 bytes, params: 2, frame: 13 return env1_9(nativeEvent.contentOffset.y, nativeEvent.contentSize.height); } } } function useRenderFooter(a0, a1) { // fn#77095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:2951, offset: 0x01df0c09, size: 73 bytes, params: 3, frame: 16 const env0_0 = a0; const env0_1 = a1; const styles = useStyles(); return ReactModule.useCallback(_fun77096, [a0, a1, styles]); function _fun77096() { // fn#77096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:3013, offset: 0x01df0c52, size: 72 bytes, params: 1, frame: 14 return ( require ? ( ) : ( env0_0.length !== 0 ? null : ( ) ) ); } } function useRenderItem(a0, a1, a2, a3, a4) { // fn#77097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:3091, offset: 0x01df0c9a, size: 144 bytes, params: 6, frame: 21 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; const env0_3 = a3; const env0_4 = a4; const styles = useStyles(); return styles.useCallback(_fun77098, [a0, a2, a4, a1, a3, styles, (UseAnalyticsLocations)().analyticsLocations]); function _fun77098(a0, a1) { // fn#77098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:3189, offset: 0x01df0d2a, size: 714 bytes, params: 3, frame: 34 var r12; var r5; var value; const binding = env0_0; const property = binding[a1]; const id = property.id; const value2 = binding.length - 1; const channel = ChannelStore.getChannel(importDefault); const value5 = null; const r1 = value5 != channel ? channel.getGuildId() : value5; const value7 = undefined; const nickname = (NicknameUtils).getNickname(r1, importDefault, property); const r16 = value5 != nickname ? nickname : (importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(property); const r21 = value5 != r1 ? GuildMemberStore.getMember(r1, id) : value5; const env0_2 = importAll.burst_count > 0 ? (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes.BURST : (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes.NORMAL; const stylesBinding = styles; const listRow = stylesBinding.listRow; const object2 = {}; const Avatar = (NativeModule).Avatar; const avatarProps = {style: stylesBinding.avatar}; const AvatarSizes = (NativeModule).AvatarSizes; const SMALL = AvatarSizes.SMALL; avatarProps.size = SMALL; avatarProps.source = value5 == r1 || value5 == (value5 == r21 ? value7 : r21.avatar) ? property.getAvatarSource(r1) : (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getGuildMemberAvatarSource(r21, property); object2.leading = ; object2.label = ((Component) => )(importDefault(9210) /* metro dependency 9210: DiscordTag */); if (env0_4) { value = require(477) /* metro dependency 477: PlatformUtils */; r12 = ( value.isAndroid() ? ( {((XSmallIcon) => )((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)} ) : value5 ); } else { r12 = value5; } object2.trailing = r12; object2.onLongPress = onLongPress_77100; const items2 = [ , ]; if (a1 === value2) { r5 = value5; } else { value = importDefault(7331) /* metro dependency 7331: FormDivider */; value = ((Component) => )(value); r5 = value; } items2[1] = r5; return ( {items2} ); function onPress_77099() { // fn#77099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:3783, offset: 0x01df0ff4, size: 158 bytes, params: 1, frame: 17 let value = environment.__proto__.__proto__; value = require(7151) /* metro dependency 7151: ReactionActionCreators */; const removeReaction = value.removeReaction; const object = {}; object.channelId = importDefault; object.messageId = require; object.emoji = importAll.emoji; const ReactionLocations = (require(7151) /* metro dependency 7151: ReactionActionCreators */).ReactionLocations; const MESSAGE = ReactionLocations.MESSAGE; object.location = MESSAGE; object.userId = env0_0.id; const binding = env0_2; const ReactionTypes = (MessageReactionsTypesModule).ReactionTypes; const BURST = ReactionTypes.BURST; object.options = {burst: binding === BURST}; return Reflect.apply(removeReaction, value, [object]); } function onLongPress_77100() { // fn#77100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:4011, offset: 0x01df1092, size: 82 bytes, params: 1, frame: 14 const value = environment.__proto__.__proto__; (ShowUserProfileActionSheet)({userId: id, channelId: importDefault, messageId: require, localUser: env0_0, sourceAnalyticsLocations: analyticsLocations}); } } } function useRenderQuickActions(a0, a1, a2, a3) { // fn#77101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:4147, offset: 0x01df10e4, size: 95 bytes, params: 5, frame: 18 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; const env0_3 = a3; const styles = useStyles(); return ReactModule.useCallback(_fun77102, [a3, a0, a1, a2, styles]); function _fun77102(a0, a1) { // fn#77102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:4219, offset: 0x01df1143, size: 311 bytes, params: 3, frame: 23 const env0_0 = importAll[a1]; const env0_1 = importDefault.burst_count > 0 ? (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes.BURST : (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes.NORMAL; const intl = (IndexNativeModule).intl; const string = intl.string; const N86XcP = (IndexNativeModule).t.N86XcP; const XSmallIcon = (XSmallIconModule).XSmallIcon; const RED_400 = (Native).unsafe_rawColors.RED_400; return ( ); function onPress_77103() { // fn#77103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:4494, offset: 0x01df127a, size: 158 bytes, params: 1, frame: 17 let value = environment.__proto__.__proto__; value = require(7151) /* metro dependency 7151: ReactionActionCreators */; const removeReaction = value.removeReaction; const object = {}; object.channelId = env1_0; object.messageId = require; object.emoji = importDefault.emoji; const ReactionLocations = (require(7151) /* metro dependency 7151: ReactionActionCreators */).ReactionLocations; const MESSAGE = ReactionLocations.MESSAGE; object.location = MESSAGE; object.userId = env0_0.id; const binding = env0_1; const ReactionTypes = (MessageReactionsTypesModule).ReactionTypes; const BURST = ReactionTypes.BURST; object.options = {burst: binding === BURST}; return Reflect.apply(removeReaction, value, [object]); } } } function ReactionTab({reaction, selected}) { // fn#77104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:4697, offset: 0x01df1318, size: 703 bytes, params: 2, frame: 29 var r9; var r3; var r13; var object; var moduleValue2; var defaultImport; var getEmojiURL; const styles = useStyles(); const value3 = reaction.burst_count > 0; const value5 = (require(9841) /* metro dependency 9841: useEmojiColorPalette */).useEmojiColorPalette(reaction.burst_colors ?? []); const r14 = value5?.accentColor != null ? {color: value5.accentColor} : null; if (value5 != null) { moduleValue2 = require(4000) /* metro dependency 4000: ColorUtils */; r9 = {backgroundColor: moduleValue2.hexOpacityToRgba(value5.backgroundColor, value5.opacity)}; } else { r9 = null; } const emoji = reaction.emoji; const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.useReducedMotion; }); const AnimateEmoji = (UserSettingsModule).AnimateEmoji; if (emoji.id != null) { defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */; getEmojiURL = defaultImport.getEmojiURL; object = {}; object.id = emoji.id; r3 = emoji.animated && !useReducedMotion; r3 = r3 && AnimateEmoji.useSetting(); object.animated = r3; object.size = 48; r13 = Reflect.apply(getEmojiURL, defaultImport, [object]); } else { r13 = undefined; } const viewProps = {style: [styles.tabContainer, selected ? styles.tabContainerSelected : null, selected && value3 ? r9 : null], accessible: true, accessibilityLabel: emoji.name, accessibilityState: {selected: selected}}; const value9 = ((Component) => )(Emoji); const Text = (TextModule).Text; return ( {value9} {reaction.burst_count > 0 ? reaction.burst_count : reaction.count} ); } function RemoveAllButton({reactions, reactionSelectedIndex, channelId, messageId}) { // fn#77106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:6147, offset: 0x01df15d7, size: 776 bytes, params: 2, frame: 28 var r0; var View; var items3; var intl; const styles = useStyles(); const useStateFromStores = FluxModule.useStateFromStores; const value3 = (importDefault(9842) /* metro dependency 9842: useCanRemoveAllReactions */)(Reflect.apply(useStateFromStores, FluxModule, [[ChannelStore], function() { return ChannelStore.getChannel(channelId); }, [channelId]])); const useReducedMotion = AccessibilityStore.useReducedMotion; const useReducedMotion2 = useReducedMotion; let binding = env0_5; var [env0_5, env0_6] = useReducedMotion2(binding.useState(true), 2); const value6 = (ReanimatedRexportModule).useSharedValue(64); let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; let closure = RemoveAllButtonR; object = {useReducedMotion: useReducedMotion, buttonWidth: value6}; object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming; closure.__closure = object; closure.__workletHash = 16499689496895; closure.__initData = env0_20; const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]); const value8 = ReanimatedRexportModule.useSharedValue(0); useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; closure = RemoveAllButtonT; object = {useReducedMotion: useReducedMotion, textOpacity: value8}; object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming; closure.__closure = object; closure.__workletHash = 8698187840986; closure.__initData = env0_21; const value9 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]); env0_5.useEffect(_fun77111, [reactionSelectedIndex, env0_5.useCallback(_fun77110, [value6, value8])]); if (value3) { object = {onPress: onPress_77112}; View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View; var viewProps = {style: [styles.removeAllButton, value7]}; const TrashIcon = (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon; items3 = [ , ]; binding = env0_18; var bindingProps = {'style': null, 'variant': 'text-sm/semibold', 'color': 'white', style: value9}; intl = (require(1244) /* metro dependency 1244: indexNative */).intl; items3[1] = ((Component) => {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['zx/e4P'])})(binding); r0 = ( {items3} ); } else { r0 = null; } return r0; function RemoveAllButtonR() { // fn#77108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:6425, owner: RemoveAllButton.R, offset: 0x01df18df, size: 92 bytes, params: 1, frame: 16 var r1; var value2; var moduleValue; var withTiming; var value; if (useReducedMotion) { r1 = env0_7.get(); } else { value2 = environment.__proto__; moduleValue = require(4504) /* metro dependency 4504: timing */; withTiming = moduleValue.withTiming; value = env0_7.get(); value = Reflect.apply(withTiming, moduleValue, [value, {duration: 200}]); r1 = value; } return {maxWidth: r1}; } function RemoveAllButtonT() { // fn#77109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:6695, owner: RemoveAllButton.T, offset: 0x01df193b, size: 105 bytes, params: 1, frame: 16 var r1; var value2; var moduleValue; var withTiming; var value; if (useReducedMotion) { r1 = env0_8.get(); } else { value2 = environment.__proto__; moduleValue = require(4504) /* metro dependency 4504: timing */; withTiming = moduleValue.withTiming; value = env0_8.get(); value = Reflect.apply(withTiming, moduleValue, [value, {duration: 125}]); r1 = value; } return {'opacity': null, 'color': 'white', 'fontSize': 14, 'marginLeft': 8, 'textAlignVertical': 'center', opacity: r1}; } function _fun77110() { // fn#77110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:6990, offset: 0x01df19a4, size: 51 bytes, params: 1, frame: 13 env0_6(true); env0_7.set(32); env0_8.set(0); } function _fun77111() { // fn#77111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:7049, offset: 0x00e5fe87, size: 15 bytes, params: 1, frame: 9 env0_9(); } function RemoveAllButtonOnPress() { // fn#77112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:7082, owner: RemoveAllButton.onPress, offset: 0x01df19d7, size: 170 bytes, params: 1, frame: 18 var value2; var moduleValue; var binding; var set; var value3; var moduleValue2; if (env0_5) { env0_6(false); binding = env0_7; set = binding.set; value3 = environment.__proto__; moduleValue2 = require(1478) /* metro dependency 1478: useWindowDimensionsNative */; Reflect.apply(set, binding, [moduleValue2.getWindowDimensions().width]); binding = env0_8; binding.set(1); } else { value2 = environment.__proto__; moduleValue = importAll(7151) /* metro dependency 7151: ReactionActionCreators */; moduleValue.removeEmojiReactions(channelId, messageId, reactions[reactionSelectedIndex].emoji); env0_9(); } } } function EmojiOptionsButton({reactions, reactionSelectedIndex, channelId, messageId}) { // fn#77113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:7494, offset: 0x01df1a81, size: 389 bytes, params: 2, frame: 25 const styles = useStyles(); const value4 = ReactModule.useCallback(_fun77115, [channelId, messageId, reactions[reactionSelectedIndex], (importDefault(9842) /* metro dependency 9842: useCanRemoveAllReactions */)((require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(channelId); }, [channelId]))]); const Text = (TextModule).Text; const intl = (IndexNativeModule).intl; const text = ( {intl.string((IndexNativeModule).t.pCaYID)} ); const ChevronSmallRightIcon = (ChevronSmallRightIconModule).ChevronSmallRightIcon; const ICON_SUBTLE = (Native).colors.ICON_SUBTLE; return ( {text} ); function _fun77115() { // fn#77115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:7669, offset: 0x01df1c06, size: 128 bytes, params: 1, frame: 18 let value = environment.__proto__; const defaultImport = importDefault(dependencyMap[42]); const openLazy = defaultImport.openLazy; value = require(dependencyMap[44]); value = value(dependencyMap[43], dependencyMap.paths); Reflect.apply(openLazy, defaultImport, [value, 'ReactionEmojiOptionsActionSheet', {channelId: channelId, messageId: messageId, reaction: env0_3, canRemoveReactions: env0_2}, 'replaceTopSheet']); } } function ReactionTabs(a0) { // fn#77116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:8111, offset: 0x01df1c86, size: 469 bytes, params: 2, frame: 29 const styles = useStyles(); const reactions = a0.reactions; const reactionSelectedIndex = a0.reactionSelectedIndex; const env0_1 = a0.setReactionSelectedIndex; const defaultImport = TidaWebformExperiment; const useExperiment = defaultImport.useExperiment; const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport, [{location: 'ReactionTabs'}, {autoTrackExposure: false}]).tidaWebformEnabled; const defaultImport2Props2 = {tabs: reactions.map(_fun77117), tabStyle: styles.tab, tabStyleActive: styles.tabActive, tabStyleSelected: styles.tabSelected, tabIndexSelected: reactionSelectedIndex, onSelect: function(a0) { require(dependencyMap[48]).triggerHapticFeedback(importDefault(dependencyMap[49]).IMPACT_LIGHT); setReactionSelectedIndex(a0); }}; const MAX_REACTIONS = (ReactionUtilsModule).MAX_REACTIONS; defaultImport2Props2.initialNumTabsToRender = MAX_REACTIONS; const items2 = [ , ]; items2[1] = ((Component) => )(importDefault(7331) /* metro dependency 7331: FormDivider */); const Text = (TextModule).Text; const getReactionEmojiName = ReactionUtilsModule.getReactionEmojiName; items2[2] = ( {Reflect.apply(getReactionEmojiName, ReactionUtilsModule, [reactions[reactionSelectedIndex].emoji])} {((Component) => )(tidaWebformEnabled ? EmojiOptionsButton : RemoveAllButton)} ); return ( {items2} ); function _fun77117(a0, a1) { // fn#77117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:8354, offset: 0x01df1e5b, size: 116 bytes, params: 3, frame: 18 let value = environment.__proto__; value = environment; const reactionSelectedIndexBinding = reactionSelectedIndex; value = value + (a0.emoji.id ?? '') + ':' + a0.emoji.name; return ( ); } } function MessageReactionsEmpty() { // fn#77119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:9204, offset: 0x01df1f1a, size: 307 bytes, params: 1, frame: 25 const styles = useStyles(); const value2 = (UseSafeAreaInsetsNative)(); const value3 = (NoResultsModule).useNoResultsSource(); const BottomSheet = (BottomSheetNativeModule).BottomSheet; const bottom = value2.bottom; const BottomSheetView = (Module06277Module).BottomSheetView; const RefreshEmptyState = (NativeModule).RefreshEmptyState; const intl = (IndexNativeModule).intl; const string = intl.string; const HmPOrp = (IndexNativeModule).t.HmPOrp; return ( ); } function MessageReactionsContent({channelId, messageId, emoji, reactions, isSelectedBurst, disableManage, disableTabs}) { // fn#77120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:9569, offset: 0x01df204d, size: 1041 bytes, params: 2, frame: 36 disableManage = !(disableManage === undefined) && disableManage; disableTabs = !(disableTabs === undefined) && disableTabs; var value; const styles = useStyles(); const {reactionSelected, reactionSelectedIndex, setReactionSelectedIndex} = useReactionSelected({reactions: reactions, emoji: emoji, isSelectedBurst: isSelectedBurst}); const r21 = reactionSelected.me_vote != null ? (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes.VOTE : reactionSelected.burst_count > 0 ? (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes.BURST : (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes.NORMAL; const {reactors, reactorsHasMore} = useReactors({channelId: channelId, messageId: messageId, reaction: reactionSelected, reactionType: r21}); const useStateFromStores = FluxModule.useStateFromStores; const value6 = (require(6860) /* metro dependency 6860: ThreadHooks */).useIsActiveChannelOrUnarchivableThread(Reflect.apply(useStateFromStores, FluxModule, [[ChannelStore], function() { return ChannelStore.getChannel(channelId); }, [channelId]])); const value7 = (UseSafeAreaInsetsNative)(); const r0 = ((a0) => { var env0_0 = a0; return (FluxModule).useStateFromStores([PermissionStore], _fun77126, [a0]); })(channelId) && !disableManage && value6; const r8 = reactionSelected.emoji.id ?? reactionSelected.emoji.name; object = {}; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gHp0C4); object.footerSize = 48; object.insetBottom = value7.bottom; object.onScroll = useReactorsOnScrollNative({channelId: channelId, messageId: messageId, reactionSelected: reactionSelected, reactors: reactors, reactorsHasMore: reactorsHasMore, reactionType: r21}); object.renderFooter = useRenderFooter(reactors, reactorsHasMore); object.renderItem = useRenderItem(reactors, messageId, channelId, reactionSelected, r0); object.renderQuickActions = useRenderQuickActions(channelId, messageId, reactionSelected, reactors); object.itemSize = 48; object.sections = [reactors.length]; object.style = styles.container; const value10 = ReactModule.useCallback(function() { env1_25 = true; var Storage = require(dependencyMap[54]).Storage; Storage.set('MessageReactionsContent_SwipableBounced', true); }, []); let r4 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && r0; const BottomSheet = (BottomSheetNativeModule).BottomSheet; const BACKDROP_OPACITY = (BurstReactionEffectUtilsModule).BACKDROP_OPACITY; const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes; const BURST = ReactionTypes.BURST; const r7 = ( r21 !== BURST ? null : ((Component) => )(importDefault(7213) /* metro dependency 7213: BurstReactionAnimationPreview */) ); const r5 = ( disableTabs === true ? null : ( ) ); if (r4) { r4 = ((Component) => )(importDefault(9845) /* metro dependency 9845: SwipeableFastList */); } else { value = importDefault(8140) /* metro dependency 8140: FastList */; value = ((Component) => )(value); r4 = value; } return ( {r4} ); function useReactionSelected({reactions, emoji, isSelectedBurst}) { // fn#77121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:9687, owner: MessageReactionsContent.useReactionSelected, offset: 0x01df245e, size: 144 bytes, params: 2, frame: 16 var environment; if (isSelectedBurst !== undefined) { } let value = environment.__proto__; value = env1_4(env1_5.useState(_fun77122), 2); const property = value[0]; const property2 = value[1]; const Math = global.Math; value = Math.min(property, reactions.length - 1); return {reactionSelected: reactions[value], reactionSelectedIndex: value, setReactionSelectedIndex: property2}; function _fun77122() { // fn#77122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:9778, offset: 0x01df24ee, size: 55 bytes, params: 1, frame: 11 if (emoji == null) { return 0; } const index = reactions.findIndex(_fun77123); const value2 = 0; return index >= value2 ? index : value2; function _fun77123({emoji, burst_count}) { // fn#77123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:9822, offset: 0x01df2525, size: 108 bytes, params: 2, frame: 15 let value = environment.__proto__.__proto__.__proto__; value = Reflect.apply((require(3795) /* metro dependency 3795: ReactionUtils */).emojiEquals, value, [emoji, emoji]); const value4 = (burst_count ?? 0) > 0; return isSelectedBurst ? value4 && value : !value4 && value; } } } function useCanManageMessages(a0) { // fn#77125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:10539, owner: MessageReactionsContent.useCanManageMessages, offset: 0x01df2591, size: 75 bytes, params: 2, frame: 16 const env0_0 = a0; return (FluxModule).useStateFromStores([PermissionStore], _fun77126, [a0]); function _fun77126() { // fn#77126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10025:10612, offset: 0x01df25dc, size: 44 bytes, params: 1, frame: 14 const permissionStoreBinding = PermissionStore; const canWithPartialContext = permissionStoreBinding.canWithPartialContext; const MANAGE_MESSAGES = Permissions.MANAGE_MESSAGES; return Reflect.apply(canWithPartialContext, permissionStoreBinding, [MANAGE_MESSAGES, {channelId: env0_0}]); } } } } global.__d(_fun77084, 9839, [57, 31, 27, 4502, 1379, 1945, 7150, 3784, 661, 33, 4017, 4573, 4501, 697, 566, 3795, 644, 7152, 7151, 6518, 22, 6771, 4617, 3995, 6746, 1305, 1423, 9210, 477, 5312, 8743, 7331, 9840, 1244, 9841, 4000, 3829, 6739, 9842, 4504, 1478, 4071, 4080, 9843, 1962, 6818, 6796, 9844, 4081, 4082, 1585, 8754, 6275, 6277, 587, 6860, 7172, 7213, 9845, 8140, 2]) /* metro module 9839, dependencies: [57, 31, 27, 4502, 1379, 1945, 7150, 3784, 661, 33, 4017, 4573, 4501, 697, 566, 3795, 644, 7152, 7151, 6518, 22, 6771, 4617, 3995, 6746, 1305, 1423, 9210, 477, 5312, 8743, 7331, 9840, 1244, 9841, 4000, 3829, 6739, 9842, 4504, 1478, 4071, 4080, 9843, 1962, 6818, 6796, 9844, 4081, 4082, 1585, 8754, 6275, 6277, 587, 6860, 7172, 7213, 9845, 8140, 2] */;