/* Metro module 8185; source: modules/media_channel/MediaPostSharePromptStore.tsx; dependencies: [6, 7, 15, 17, 18, 1936, 1226, 1379, 8186, 21, 566, 694, 2] */ import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */ import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */ import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */ import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */ import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */ import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import GatedChannelStore from '../channel/GatedChannelStore.tsx'; /* Metro dependency 1936 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ function _fun65654(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:6, offset: 0x01bd8a72, size: 393 bytes, params: 8, frame: 20 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let Set = global.Set; let set = new Set(); const Store = (Flux).Store; _fun65658(Store).displayName = 'MediaPostSharePromptStore'; set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() { var Set = global.Set; env0_11 = new Set(); }, MESSAGE_CREATE: MESSAGE_CREATE_65663, DISMISS_MEDIA_POST_SHARE_PROMPT: DISMISS_MEDIA_POST_SHARE_PROMPT, LOGOUT: LOGOUT_65665}); (FileImportTrackerModule).fileFinishedImporting('modules/media_channel/MediaPostSharePromptStore.tsx'); exports.default = set; function _isNativeReflectConstruct_65655() { // fn#65655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:178, offset: 0x01bd8bfb, 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_65655_isNativeReflectConstruct = function() { return !!result; })(); } function _fun65658(a0) { // fn#65658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:391, offset: 0x01bd8c5d, size: 97 bytes, params: 2, frame: 16 const MediaPostSharePromptStore2 = MediaPostSharePromptStore; Inherits(MediaPostSharePromptStore2, a0); return CreateClass(MediaPostSharePromptStore2, [{key: 'initialize', value: function() { this.waitFor(AuthenticationStore, ChannelStore, GatedChannelStore); }}, {key: 'shouldDisplayPrompt', value: value_65661}]); function MediaPostSharePromptStore() { // fn#65659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:403, offset: 0x0108afcb, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_3(this, MediaPostSharePromptStore); const value3 = env1_6(MediaPostSharePromptStore); return env1_5(this, _isNativeReflectConstruct_65655() ? global.Reflect.construct(value3, arguments, env1_6(this).constructor) : value3.apply(this, arguments)); } function value_65661(a0) { // fn#65661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:812, offset: 0x00f82460, size: 22 bytes, params: 2, frame: 11 return env1_11.has(a0); } } function MESSAGE_CREATE_65663(a0) { // fn#65663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:999, offset: 0x01bd8ce5, size: 235 bytes, params: 2, frame: 18 var message; var value; var moduleValue; var channelStoreBinding; var value4; var gatedChannelStoreBinding; var binding; var add; if (!a0.isPushNotification) { message = a0.message; if (AuthenticationStore.getId() === message.author?.id) { moduleValue = require(8186) /* metro dependency 8186: useIsFirstMessageInMediaPost */; if (moduleValue.isFirstMessageIdInMediaPost(message.id, message.channel_id)) { channelStoreBinding = ChannelStore; value4 = channelStoreBinding.getChannel(message.channel_id); if (value4 != null) { if (value4.parent_id != null) { gatedChannelStoreBinding = GatedChannelStore; if (gatedChannelStoreBinding.isChannelGated(value4.guild_id, value4.parent_id)) { binding = env0_11; add = binding.add; value = importDefault(21) /* metro dependency 21: SnowflakeUtils */; Reflect.apply(add, binding, [value.castMessageIdAsChannelId(a0.message.id)]); } } } } } } } function DISMISS_MEDIA_POST_SHARE_PROMPT({threadId}) { // fn#65664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:1378, offset: 0x01bd8dd0, size: 30 bytes, params: 2, frame: 11 env0_11.delete(threadId); } function LOGOUT_65665() { // fn#65665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8370:1455, offset: 0x01bd8dee, size: 21 bytes, params: 1, frame: 9 env0_11.clear(); } } global.__d(_fun65654, 8185, [6, 7, 15, 17, 18, 1936, 1226, 1379, 8186, 21, 566, 694, 2]) /* metro module 8185, dependencies: [6, 7, 15, 17, 18, 1936, 1226, 1379, 8186, 21, 566, 694, 2] */;