/* Metro module 15182; source: components_native/common/ChatPreview.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 4502, 3849, 1379, 1878, 9590, 661, 8178, 33, 4501, 697, 11342, 8177, 11519, 3826, 1244, 9849, 9850, 22, 4601, 9874, 9862, 9834, 9835, 4633, 1848, 11401, 9837, 11348, 11349, 11379, 15038, 11982, 11984, 9869, 6618, 5278, 4573, 3868, 3829, 566, 1478, 5087, 5072, 2] */ function _fun115962(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:6, offset: 0x02475f02, size: 674 bytes, params: 8, frame: 26 var object2; const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_4 = importDefault(6) /* metro dependency 6 */; const env0_5 = importDefault(7) /* metro dependency 7 */; const env0_6 = importDefault(15) /* metro dependency 15 */; const env0_7 = importDefault(17) /* metro dependency 17 */; const env0_8 = importDefault(18) /* metro dependency 18 */; let value = importAll(31) /* metro dependency 31 */; const value2 = require(27) /* metro dependency 27 */; const StyleSheet = value2.StyleSheet; const env0_10 = value2.View; const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */; const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const messagePreviewStore = importDefault(9590) /* metro dependency 9590: MessagePreviewStore */; const constantsModule = require(661) /* metro dependency 661: Constants */; const env0_16 = constantsModule.AnalyticsObjects; const env0_17 = constantsModule.AnalyticsSections; const rowGeneratorConstantsModule = require(8178) /* metro dependency 8178: RowGeneratorConstants */; const env0_18 = rowGeneratorConstantsModule.Changeset; const env0_19 = rowGeneratorConstantsModule.RowType; const env0_20 = rowGeneratorConstantsModule.SeparatorType; const value5 = require(33) /* metro dependency 33 */; const env0_21 = value5.jsx; const env0_22 = value5.jsxs; const createStylesModule = require(4501) /* metro dependency 4501: createStyles */; const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles; object2 = {chat: {'flex': 1, 'overflow': 'hidden'}}; const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW; object2.containerInner = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW}; const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH; object2.jumpToChatButtonContainer = {flexShrink: 0, backgroundColor: BACKGROUND_SURFACE_HIGH}; const object3 = {height: 44}; object3.borderTopWidth = StyleSheet.hairlineWidth; const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE; object3.borderTopColor = BORDER_SUBTLE; object2.jumpToChatButton = object3; object2.jumpToChatText = {'textAlign': 'center', 'flex': 1, 'lineHeight': 44}; const env0_23 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]); const PureComponent = value.PureComponent; value = _fun115966(PureComponent); const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext; value.contextType = ThemeContext; value.defaultProps = {withSafeArea: true}; (require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/ChatPreview.tsx'); exports.default = ChatPreviewConnected; } function _isNativeReflectConstruct_115963() { // fn#115963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:403, offset: 0x024761a4, 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_115963_isNativeReflectConstruct = function() { return !!result; })(); } function _fun115966(a0) { // fn#115966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:1022, offset: 0x02476206, size: 147 bytes, params: 2, frame: 16 const closure = ChatPreview_115967; env0_8(closure, a0); return env0_5(closure, [{key: 'componentDidMount', value: function() { if (this.props.messages != null && this.props.canAccessChannel !== false) { this.setup(); } }}, {key: 'componentWillUnmount', value: value_115988}, {key: 'componentDidUpdate', value: value_115989}, {key: 'render', value: value_115990}]); } function ChatPreviewConnected(a0) { // fn#115991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:7792, offset: 0x0247745f, size: 497 bytes, params: 2, frame: 27 const env0_0 = a0.channelId; const InlineAttachmentMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineAttachmentMedia; const value2 = InlineAttachmentMedia.useSetting(); const InlineEmbedMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineEmbedMedia; const value3 = InlineEmbedMedia.useSetting(); const RenderEmbeds = (require(3829) /* metro dependency 3829: UserSettings */).RenderEmbeds; const value4 = RenderEmbeds.useSetting(); const {messages, jumpTargetId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MessagePreviewStore], function() { return {messages: MessagePreviewStore.messages, jumpTargetId: MessagePreviewStore.jumpTargetId}; }); const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.roleStyle; }); const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(channelId); }); const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width; const value6 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel); const value7 = (require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel); return ((Component) => )(env0_24); } function ChatPreview_115967(a0) { // fn#115967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:1034, offset: 0x02476299, size: 379 bytes, params: 2, frame: 21 var r0; var Reflect; let value = copyRestArgs(0, undefined); let binding = env1_4; binding(this, ChatPreview_115967); const items2 = []; arraySpread(items2, value, 0, items2); value = env1_7(ChatPreview_115967); binding = env1_6; if (_isNativeReflectConstruct_115963()) { Reflect = global.Reflect; value = Reflect.construct(value, items2, env1_7(this).constructor); r0 = value; } else { value = value.apply(this, items2); r0 = value; } value = binding(this, r0); const defaultImport = importDefault(11342) /* metro dependency 11342: ChatManager */; const value4 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}}); const defaultImport3 = new defaultImport(); value.chatManager = defaultImport3 instanceof Object ? defaultImport3 : value4; const defaultImport2 = importDefault(8177) /* metro dependency 8177: RowGenerator */; const value7 = Object.create(defaultImport2.prototype, {constructor: {value: defaultImport2}}); const defaultImport22 = new defaultImport2(); value.rowGenerator = defaultImport22 instanceof Object ? defaultImport22 : value7; value.chatRef = env1_9.createRef(); value.setup = setup_115968; value.updateContent = updateContent; value.getMessage = getMessage_115975; value.handleJumpToChat = handleJumpToChat; value.handleTapLink = handleTapLink; value.handleLongPressLink = handleLongPressLink; value.handleLongPressMessage = handleLongPressMessage; value.handleLongPressReaction = handleLongPressReaction; value.handleTapImage = handleTapImage; value.handleTapChannel = handleTapChannel; value.handleLongPressChannel = handleLongPressChannel; return value; } function value_115988() { // fn#115988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:6201, offset: 0x02477121, size: 75 bytes, params: 1, frame: 11 var value; if (this.chatRef.current != null) { this.chatManager.clear(); value = environment.__proto__; value = importDefault(15038) /* metro dependency 15038: MessagePreviewActionCreators */; value.clearMessages(); } } function value_115989(a0) { // fn#115989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:6328, offset: 0x0247716c, size: 158 bytes, params: 2, frame: 13 if (!(a0.messages === this.props.messages && a0.width === this.props.width)) { this.setup(a0.width !== this.props.width); } if (a0.canAccessChannel !== this.props.canAccessChannel && this.props.messages != null) { this.setup(!!this.props.canAccessChannel); } } function value_115990() { // fn#115990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:6582, offset: 0x0247720a, size: 597 bytes, params: 1, frame: 26 var r5; var r6; var value4; const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView; const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; const Text = (require(4573) /* metro dependency 4573: Text */).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var value6; var value7; const binding = env1_23; const context = this.context; const value2 = undefined; const value3 = binding(context); const {channel, isNSFWHidden, isSpoilerHidden} = this.props; if (isNSFWHidden) { if ((channel == null ? value2 : channel.guild_id) != null) { value7 = ((Component) => )(importDefault(11982) /* metro dependency 11982: GuildNSFW */); r5 = value2; r6 = value7; } else if (isSpoilerHidden) { if ((channel == null ? value2 : channel.guild_id) != null) { value6 = ((Component) => )(importDefault(11984) /* metro dependency 11984: ChannelSpoiler */); r5 = value2; r6 = value6; } else { value4 = ((Component) => )(importDefault(9869) /* metro dependency 9869: ChatAndroid */); r5 = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+TSRGD'])}; r6 = value4; } } else { value4 = ((Component) => )(importDefault(9869) /* metro dependency 9869: ChatAndroid */); r5 = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+TSRGD'])}; r6 = value4; } } else if (isSpoilerHidden) { if ((channel == null ? value2 : channel.guild_id) != null) { value6 = ((Component) => )(importDefault(11984) /* metro dependency 11984: ChannelSpoiler */); r5 = value2; r6 = value6; } else { value4 = ((Component) => )(importDefault(9869) /* metro dependency 9869: ChatAndroid */); r5 = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+TSRGD'])}; r6 = value4; } } else { value4 = ((Component) => )(importDefault(9869) /* metro dependency 9869: ChatAndroid */); r5 = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+TSRGD'])}; r6 = value4; } return ( {r6} {r5} ); } function _fun115995() { // fn#115995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:8340, offset: 0x02477680, size: 25 bytes, params: 1, frame: 9 const value = environment.__proto__; return ActionSheetStore.getContent() != null; } function ChatPreview_115967Setup() { // fn#115968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:1346, owner: ChatPreview_115967.setup, offset: 0x02476414, size: 446 bytes, params: 1, frame: 23 var environment; var r4; var binding; var rowGenerator; var setOptions; var object; var width; var chatManager; var setup; var value2; var NOOP; var UPDATE; var forEach; var items2; var length; var value3; var property; var createRow; var generate; var value4; var createChangeset; var defaultImport; var getPreviousRows; var value5; var updateContent; let value = a0; reducibleJoin2: while (true) { if (value !== undefined) { r4 = value; break reducibleJoin2; } value = false; r4 = value; break reducibleJoin2; } let env0_0 = undefined; var env0_3; var env0_4; var env0_5; value = environment; let props = env0_0.props; env0_0 = props.channel; const messages = props.messages; const env0_2 = props.roleStyle; const jumpTargetId = props.jumpTargetId; reducibleJoin9: while (true) { if (messages == null) { break reducibleJoin9; } binding = env0_0; rowGenerator = binding.rowGenerator; setOptions = rowGenerator.setOptions; object = {renderEmbeds: props.renderEmbeds, inlineEmbedMedia: props.inlineEmbedMedia, inlineAttachmentMedia: props.inlineAttachmentMedia}; props = binding.props; width = props.width; object.constrainedWidth = width; Reflect.apply(setOptions, rowGenerator, [object]); chatManager = binding.chatManager; setup = chatManager.setup; Reflect.apply(setup, chatManager, [messages]); value2 = environment.__proto__.__proto__; if (r4) { UPDATE = Changeset.UPDATE; r4 = UPDATE; } else { NOOP = Changeset.NOOP; r4 = NOOP; } env0_3 = r4; object = []; env0_4 = object; forEach = messages.forEach; Reflect.apply(forEach, messages, [_fun115969]); items2 = []; env0_5 = items2; forEach = object.forEach; Reflect.apply(forEach, object, [_fun115970]); length = items2.length; value3 = 0; if (value3 < length) { r4 = value3; reducibleLoop7: while (true) { property = items2[r4]; binding = env0_0; chatManager = binding.chatManager; createRow = chatManager.createRow; rowGenerator = binding.rowGenerator; generate = rowGenerator.generate; Reflect.apply(createRow, chatManager, [Reflect.apply(generate, rowGenerator, [property])]); value4 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1; length = items2.length; if (value4 < length) { r4 = value4; continue reducibleLoop7; } break reducibleLoop7; } } binding = env0_0; chatManager = binding.chatManager; createChangeset = chatManager.createChangeset; value = Reflect.apply(createChangeset, chatManager, []); defaultImport = importDefault(9849) /* metro dependency 9849: computeScrollData */; chatManager = binding.chatManager; getPreviousRows = chatManager.getPreviousRows; value5 = defaultImport({rows: Reflect.apply(getPreviousRows, chatManager, []), scrollToMessageId: jumpTargetId, jumpTargetId: jumpTargetId, jumpType: undefined, shouldInitialScroll: false, animated: false, scrollPosition: undefined, focusTargetId: null}); updateContent = binding.updateContent; Reflect.apply(updateContent, binding, [value, value5]); break reducibleJoin9; } } function updateContent(a0, a1) { // fn#115974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:3321, owner: ChatPreview_115967.updateContent, offset: 0x02476a59, size: 90 bytes, params: 3, frame: 14 var value; const current = env0_0.chatRef.current; if (current != null) { value = environment.__proto__.__proto__; value = importDefault(9850) /* metro dependency 9850: NativeChatUtils */; value.updateRows(current, {rows: a0, isLoadingAtTop: false, scrollData: a1}); } } function ChatPreview_115967GetMessage(a0) { // fn#115975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:3441, owner: ChatPreview_115967.getMessage, offset: 0x02476ab3, size: 73 bytes, params: 2, frame: 13 var environment; const env0_0 = a0; let value = environment.__proto__.__proto__; value = importDefault(22) /* metro dependency 22 */; return value.find(env0_0.props.messages, _fun115976); } function handleJumpToChat() { // fn#115977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:3530, owner: ChatPreview_115967.handleJumpToChat, offset: 0x02476afc, size: 115 bytes, params: 1, frame: 13 let props = env0_0.props; if (props.onBeforeJumpToMessage != null) { env0_0.props.onBeforeJumpToMessage(); } props = env0_0.props; var env0_0 = props.channelId; if (props.jumpTargetId != null) { global.Promise.resolve().then(_fun115978); } } function ChatPreview_115967HandleTapLink({nativeEvent}) { // fn#115979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:3764, owner: ChatPreview_115967.handleTapLink, offset: 0x02476bab, size: 294 bytes, params: 2, frame: 20 var environment; var value; var value2; var moduleValue; const data = nativeEvent.data; if (data.action === 'bindJumpToMessage') { if (data.targetChannelId == null) { value = environment.__proto__.__proto__; value2 = undefined; moduleValue = require(9874) /* metro dependency 9874: handleMessagesTapLink */; moduleValue.handleMessagesTapLink({allowWithinModal: true, chatInputRef: value2, handleTransitionToThread: handleTransitionToThread, message: MessagePreviewStore.getMessage(data.messageId), messageChannel: env0_0.props.channel ?? value2, selectedChannelId: value2, tapLinkData: nativeEvent}); return value2; } if (data.targetMessageId != null) { if (env0_0.props.onBeforeJumpToMessage != null) { env0_0.props.onBeforeJumpToMessage(); } value = environment.__proto__.__proto__; value = require(4601) /* metro dependency 4601: transitionToChannel */; value.transitionToMessage(data.targetChannelId, data.targetMessageId, {navigationReplace: true}); return undefined; } } value = environment.__proto__.__proto__; value2 = undefined; moduleValue = require(9874) /* metro dependency 9874: handleMessagesTapLink */; const handleMessagesTapLink = moduleValue.handleMessagesTapLink; const getMessage = MessagePreviewStore.getMessage; Reflect.apply(handleMessagesTapLink, moduleValue, [{allowWithinModal: true, chatInputRef: value2, handleTransitionToThread: handleTransitionToThread, message: Reflect.apply(getMessage, MessagePreviewStore, [data.messageId]), messageChannel: env0_0.props.channel ?? value2, selectedChannelId: value2, tapLinkData: nativeEvent}]); return value2; } function ChatPreview_115967HandleLongPressLink({nativeEvent}) { // fn#115981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:4476, owner: ChatPreview_115967.handleLongPressLink, offset: 0x02476d4a, size: 96 bytes, params: 2, frame: 12 const url = nativeEvent.url; var value; let r0 = env0_0.props.hasActionSheetOpen || url == null; r0 = !r0 ? url === '' : r0; if (!r0) { value = environment.__proto__.__proto__; value = importDefault(9862) /* metro dependency 9862: showLongPressURLActionSheet */; value({urlString: url}); } } function ChatPreview_115967HandleLongPressMessage(a0) { // fn#115982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:4599, owner: ChatPreview_115967.handleLongPressMessage, offset: 0x02476daa, size: 354 bytes, params: 2, frame: 28 var message; var value6; var moduleValue2; var getLongPressSelectedMedia; var moduleValue3; var value7; var moduleValue5; var showLongPressMessageActionSheet; var object; var CHANNEL_SEARCH; const value2 = undefined; const {messageId, mediaIndex, mediaType, componentId, componentMediaIndex} = (require(9834) /* metro dependency 9834: MessageDataSnowflakeUtils */).getNativeSyntheticEventData(a0); const props = env0_0.props; if (!props.hasActionSheetOpen) { message = MessagePreviewStore.getMessage(messageId); if (message != null) { value6 = UserStore.getUser(message.author.id); if (value6 != null) { moduleValue2 = require(9835) /* metro dependency 9835: MessagesUtils */; getLongPressSelectedMedia = moduleValue2.getLongPressSelectedMedia; moduleValue3 = require(4633) /* metro dependency 4633: InteractionComponentTypes */; value7 = Reflect.apply(getLongPressSelectedMedia, moduleValue2, [message, mediaIndex, mediaType, moduleValue3.asComponentId(componentId), componentMediaIndex]); (importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard(); moduleValue5 = require(11401) /* metro dependency 11401: showLongPressMessageActionSheet */; showLongPressMessageActionSheet = moduleValue5.showLongPressMessageActionSheet; object = {}; CHANNEL_SEARCH = AnalyticsSections.CHANNEL_SEARCH; object.section = CHANNEL_SEARCH; CHANNEL_SEARCH = AnalyticsObjects.CHANNEL_SEARCH; object.object = CHANNEL_SEARCH; Reflect.apply(showLongPressMessageActionSheet, moduleValue5, [{'actionSheetSource': 'Preview', 'analyticsLocation': null, 'canAddNewReactions': false, analyticsLocation: object, channel: props.channel, message: message, selectedMedia: value7 ?? value2, user: value6}]); } } } return value2; } function ChatPreview_115967HandleLongPressReaction(a0) { // fn#115983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:5215, owner: ChatPreview_115967.handleLongPressReaction, offset: 0x02476f0c, size: 128 bytes, params: 2, frame: 18 let value = environment.__proto__.__proto__; const value2 = undefined; const nativeSyntheticEventData = (require(9834) /* metro dependency 9834: MessageDataSnowflakeUtils */).getNativeSyntheticEventData(a0); const reaction = nativeSyntheticEventData.reaction; if (!env0_0.props.hasActionSheetOpen) { value = require(9837) /* metro dependency 9837: ReactionUtils */; value.handleViewPreviewReactions(nativeSyntheticEventData.messageId, nativeSyntheticEventData.channelId, reaction != null ? reaction.emoji : value2); } return value2; } function ChatPreview_115967HandleTapImage({nativeEvent}) { // fn#115984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:5416, owner: ChatPreview_115967.handleTapImage, offset: 0x02476f8c, size: 139 bytes, params: 2, frame: 16 var value2; var value3; var moduleValue; const message = env0_0.getMessage(nativeEvent.id); if (message != null) { value2 = environment.__proto__.__proto__; value3 = ChannelStore.getChannel(message.getChannelId()); if (value3 != null) { moduleValue = require(11348) /* metro dependency 11348: handleMessagesTapImage */; moduleValue.handleMessagesTapImage({tapImageData: nativeEvent, allowWithinModal: true, message: message, messageChannel: value3, selectedChannelId: undefined, showContextName: true}); } } } function ChatPreview_115967HandleTapChannel(a0) { // fn#115985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:5681, owner: ChatPreview_115967.handleTapChannel, offset: 0x02477017, size: 105 bytes, params: 2, frame: 14 let value = environment.__proto__.__proto__; value = require(9834) /* metro dependency 9834: MessageDataSnowflakeUtils */; const getNativeSyntheticEventData = value.getNativeSyntheticEventData; (require(11349) /* metro dependency 11349: handleMessagesTapChannel */).handleMessagesTapChannel({data: Reflect.apply(getNativeSyntheticEventData, value, [a0]).data, navigationReplace: true, onBeforeNavigate: env0_0.props.onBeforeJumpToMessage}); } function ChatPreview_115967HandleLongPressChannel(a0) { // fn#115986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:5874, owner: ChatPreview_115967.handleLongPressChannel, offset: 0x02477080, size: 104 bytes, params: 2, frame: 13 let value = environment.__proto__.__proto__; const messageDataSnowflakeUtilsModule = require(9834) /* metro dependency 9834: MessageDataSnowflakeUtils */; const getNativeSyntheticEventData = messageDataSnowflakeUtilsModule.getNativeSyntheticEventData; if (!env0_0.props.hasActionSheetOpen) { value = require(11379) /* metro dependency 11379: handleMessagesLongPressChannel */; value.handleMessagesLongPressChannel({data: Reflect.apply(getNativeSyntheticEventData, messageDataSnowflakeUtilsModule, [a0]).data}); } } function _fun115969(a0) { // fn#115969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:1682, offset: 0x024765d2, size: 142 bytes, params: 2, frame: 17 var property2; var value2; const property = env0_4[0]; if (property != null) { property2 = property[property.length - 1]; value2 = environment.__proto__.__proto__.__proto__; if ((importDefault(11519) /* metro dependency 11519: isNewMessageGroup */)(channel, property2, a0)) { env0_4.unshift([a0]); } else { property.unshift(a0); } } else { env0_4.unshift([a0]); } } function _fun115970(a0, a1) { // fn#115970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:1818, offset: 0x02476660, size: 734 bytes, params: 3, frame: 24 var environment; var r9; var r2; var value6; var moduleValue; var object4; var push; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const t = (require(1244) /* metro dependency 1244: indexNative */).t; var object5; const env0_0 = a0; const property = a0[a0.length - 1]; var value; let binding = env0_4; const value2 = binding[binding.length - 1] === a0; const value3 = false; const value4 = null; const timestamp = value2 ? value4 : env0_4[a1 + 1][0].timestamp; let r1 = value2 || value4 == timestamp; if (!r1) { value6 = environment.__proto__.__proto__.__proto__; moduleValue = require(3826) /* metro dependency 3826: DateUtils */; r1 = moduleValue.isSameDay(property.timestamp, timestamp); } const r0 = !r1 || value3; const closure = processHiddenMessageRow_115971; binding = env0_5; const property2 = binding[binding.length - 1]; let object6 = {}; object6.roleStyle = roleStyle; const BLOCKED_GROUP = RowType.BLOCKED_GROUP; object6.rowType = BLOCKED_GROUP; object6.changeType = env0_3; object6.message = property; object6.isFirst = true; object6.content = []; object6.text = ''; object6.revealed = value3; if (property.blocked) { if (value4 != property2 && property2.rowType === RowType.BLOCKED_GROUP) { r2 = property2; } else { object5 = {}; copyDataProperties(object5, object6, undefined); object5['rowType'] = RowType.BLOCKED_GROUP; env0_5.push(object5); r2 = object5; } closure(r2); r2.text = intl.formatToPlainString(t['+FcYM/'], {count: r2.content.length}); } else if (property.ignored) { if (value4 != property2 && property2.rowType === RowType.IGNORED_GROUP) { r9 = property2; } else { object4 = {}; copyDataProperties(object4, object6, undefined); object4['rowType'] = RowType.IGNORED_GROUP; env0_5.push(object4); r9 = object4; } closure(r9); r9.text = intl.formatToPlainString(t['VFWjc+'], {count: r9.content.length}); } else { a0.forEach(_fun115973); } if (r0) { binding = env0_5; push = binding.push; object6 = {}; object6.roleStyle = roleStyle; object6.rowType = SeparatorType.DAY; object6.changeType = env0_3; value = require(3826) /* metro dependency 3826: DateUtils */; object6.text = value.dateFormat(property.timestamp, 'LL'); Reflect.apply(push, binding, [object6]); } } function _fun115978() { // fn#115978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:3682, offset: 0x02476b6f, size: 60 bytes, params: 1, frame: 17 let value = environment.__proto__.__proto__.__proto__; value = require(4601) /* metro dependency 4601: transitionToChannel */; value.transitionToMessage(channelId, jumpTargetId, {navigationReplace: true}); } function handleTransitionToThread(a0, a1, a2) { // fn#115980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:4154, owner: ChatPreview_115967.handleTapLink.handleTransitionToThread, offset: 0x02476cd1, size: 121 bytes, params: 4, frame: 14 let value = environment.__proto__; if (env1_0.props.onBeforeJumpToMessage != null) { env1_0.props.onBeforeJumpToMessage(); } value = environment.__proto__.__proto__.__proto__; const channel = ChannelStore.getChannel(a1); if (channel != null) { (require(4601) /* metro dependency 4601: transitionToChannel */).transitionToThread(channel, {source: a2, navigationReplace: true}); } } function processHiddenMessageRow_115971(a0) { // fn#115971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:1982, offset: 0x0247693e, size: 78 bytes, params: 2, frame: 13 let binding = a0; binding.forEach(_fun115972); binding = env0_1; a0.revealed = binding.id === messages.revealedMessageId; a0.context = binding.id; return a0; } function _fun115973(a0) { // fn#115973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:2746, offset: 0x024769ed, size: 108 bytes, params: 2, frame: 15 const binding = env1_5; const push = binding.push; const MESSAGE = RowType.MESSAGE; const binding2 = env0_1; Reflect.apply(push, binding, [{roleStyle: roleStyle, rowType: MESSAGE, changeType: env1_3, message: a0, isFirst: a0 === binding2, isEditing: false, separatorBefore: !(a0 !== binding2) && env0_2}]); } function _fun115972(a0) { // fn#115972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15379:2012, offset: 0x0247698c, size: 97 bytes, params: 2, frame: 14 const content = env0_0.content; const unshift = content.unshift; const MESSAGE = RowType.MESSAGE; const NOOP = Changeset.NOOP; Reflect.apply(unshift, content, [{rowType: MESSAGE, changeType: NOOP, roleStyle: roleStyle, message: a0, isFirst: a0 === env1_1}]); }