/* Metro module 6944; source: modules/soundboard/SoundboardActionCreators.tsx; dependencies: [5, 4613, 4614, 661, 670, 507, 6639, 694, 4132, 6945, 683, 1362, 22, 4647, 1244, 6946, 2] */ function _fun55188(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:6, offset: 0x01378702, size: 433 bytes, params: 8, frame: 19 let env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(5) /* metro dependency 5 */; const soundboardStore = importDefault(4613) /* metro dependency 4613: SoundboardStore */; const env0_5 = (require(4614) /* metro dependency 4614: SoundboardConstants */).DEFAULT_SOUND_GUILD_ID; let value = require(661) /* metro dependency 661: Constants */; const env0_6 = value.Endpoints; const env0_7 = value.AnalyticEvents; value = require(670) /* metro dependency 670: UserSettingsConstants */; const env0_8 = value.MAX_FAVORITES; const env0_9 = value.UserSettingsDelay; const env0_11 = _fun55201(); const _resolveOnActionCompleted = function(a0) { var env0_0 = a0; var Promise = global.Promise; var value = Object.create(Promise.prototype, {constructor: {value: Promise}}); var value2 = new Promise(_fun55207); return value2 instanceof Object ? value2 : value; }; value = _fun55211(); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/SoundboardActionCreators.tsx'); exports.maybeFetchSoundboardSounds = value; exports.uploadSound = function() { return _uploadSound.apply(this, arguments); }; exports.updateSound = function() { return _updateSound.apply(this, arguments); }; exports.deleteSound = function() { return _deleteSound.apply(this, arguments); }; exports.addFavoriteSound = function(a0) { var env0_0 = a0; var FrecencyUserSettingsActionCreators = require(dependencyMap[11]).FrecencyUserSettingsActionCreators; var INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION; FrecencyUserSettingsActionCreators.updateAsync('favoriteSoundboardSounds', _fun55219, INFREQUENT_USER_ACTION); }; exports.removeFavoriteSound = function(a0) { var env0_0 = a0; var FrecencyUserSettingsActionCreators = require(dependencyMap[11]).FrecencyUserSettingsActionCreators; var INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION; FrecencyUserSettingsActionCreators.updateAsync('favoriteSoundboardSounds', _fun55221, INFREQUENT_USER_ACTION); }; exports.fetchSoundGuildData = function() { return _fetchSoundGuildData.apply(this, arguments); }; exports.playSoundLocally = playSoundLocally; exports.reportSoundStartedPlaying = reportSoundStartedPlaying; exports.reportSoundFinishedPlaying = reportSoundFinishedPlaying; exports.updateUserSoundboardVolume = updateUserSoundboardVolume; exports.muteCustomJoinSound = muteCustomJoinSound; } function _uploadSound() { // fn#55189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:1803, offset: 0x013788b3, size: 48 bytes, params: 1, frame: 14 return env0_3(_fun55191).apply(this, arguments); } function _updateSound() { // fn#55192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:2133, offset: 0x013789ce, size: 48 bytes, params: 1, frame: 14 return env0_3(_fun55194).apply(this, arguments); } function _deleteSound() { // fn#55195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:2459, offset: 0x01378ae5, size: 48 bytes, params: 1, frame: 14 return env0_3(_fun55197).apply(this, arguments); } function _fetchSoundGuildData() { // fn#55198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:2643, offset: 0x01378b87, size: 48 bytes, params: 1, frame: 14 return env0_3(_fun55200).apply(this, arguments); } function _fun55201() { // fn#55201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:251, offset: 0x01378c90, size: 32 bytes, params: 1, frame: 12 const env0_0 = env0_3(_fun55203); return _fun55205; } function _resolveOnActionCompleted(a0) { // fn#55206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:690, offset: 0x01378ddd, size: 44 bytes, params: 2, frame: 11 const env0_0 = a0; const Promise = global.Promise; const value = Object.create(Promise.prototype, {constructor: {value: Promise}}); const promise = new Promise(_fun55207); return promise instanceof Object ? promise : value; } function _maybeFetchDefaultSounds() { // fn#55209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:892, offset: 0x01378e92, size: 110 bytes, params: 1, frame: 14 var value2; if (SoundboardStore.shouldFetchDefaultSounds()) { (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS'}); value2 = _resolveOnActionCompleted('SOUNDBOARD_FETCH_DEFAULT_SOUNDS_SUCCESS'); env0_11(); return value2; } const Promise = global.Promise; return Promise.resolve(); } function _maybeFetchGuildSoundboardSounds() { // fn#55210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:1136, offset: 0x01378f00, size: 158 bytes, params: 1, frame: 18 const guildIdsToFetchSoundsFor = (require(6945) /* metro dependency 6945: useGuildIdsToFetchSoundsFor */).getGuildIdsToFetchSoundsFor(); if (guildIdsToFetchSoundsFor.length === 0) { return global.Promise.resolve(); } const value3 = _resolveOnActionCompleted('SOUNDBOARD_SOUNDS_RECEIVED'); let value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'GUILD_SOUNDBOARD_FETCH'}); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'REQUEST_SOUNDBOARD_SOUNDS', guildIds: guildIdsToFetchSoundsFor}); return value3; } function _fun55211() { // fn#55211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:1414, offset: 0x01378f9e, size: 32 bytes, params: 1, frame: 12 const env0_0 = env0_3(_fun55213); return _fun55214; } function addFavoriteSound(a0) { // fn#55218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:3314, offset: 0x013790a5, size: 74 bytes, params: 2, frame: 16 const env0_0 = a0; const FrecencyUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators; const updateAsync = FrecencyUserSettingsActionCreators.updateAsync; const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION; Reflect.apply(updateAsync, FrecencyUserSettingsActionCreators, ['favoriteSoundboardSounds', _fun55219, INFREQUENT_USER_ACTION]); } function removeFavoriteSound(a0) { // fn#55220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:3698, offset: 0x013791f2, size: 74 bytes, params: 2, frame: 16 const env0_0 = a0; const FrecencyUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators; const updateAsync = FrecencyUserSettingsActionCreators.updateAsync; const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION; Reflect.apply(updateAsync, FrecencyUserSettingsActionCreators, ['favoriteSoundboardSounds', function(a0) { a0.soundIds = a0.soundIds.filter(_fun55222); }, INFREQUENT_USER_ACTION]); } function playSoundLocally(a0, a1, a2) { // fn#55224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:4013, offset: 0x01379270, size: 72 bytes, params: 4, frame: 13 (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SOUNDBOARD_SOUND_PLAY_LOCALLY', sound: a1, channelId: a0, trigger: a2}); } function reportSoundStartedPlaying(a0, a1) { // fn#55225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:4169, offset: 0x013792b8, size: 62 bytes, params: 3, frame: 13 (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SOUNDBOARD_SOUND_PLAY_START', soundId: a0, userId: a1}); } function reportSoundFinishedPlaying(a0, a1) { // fn#55226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:4320, offset: 0x013792f6, size: 62 bytes, params: 3, frame: 13 (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_SOUNDBOARD_SOUND_PLAY_END', soundId: a0, userId: a1}); } function updateUserSoundboardVolume(a0, a1) { // fn#55227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:4470, offset: 0x01379334, size: 64 bytes, params: 3, frame: 13 (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'USER_SOUNDBOARD_SET_VOLUME', volume: a0, location: a1}); } function muteCustomJoinSound(a0) { // fn#55228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:4609, offset: 0x01379374, size: 56 bytes, params: 2, frame: 13 (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SOUNDBOARD_MUTE_JOIN_SOUND', channelId: a0}); } async function _fun55191({guildId, name, sound, volume, emojiId, emojiName}) { // fn#55191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:1850, offset: 0x013788f5, size: 217 bytes, params: 2, frame: 24 if (false) { return undefined; } await undefined; if (false) { return undefined; } value = environment.__proto__.__proto__; const HTTP = env2_0(env2_2[5]).HTTP; const post = HTTP.post; const object2 = {}; object2.url = env2_6.GUILD_SOUNDBOARD_SOUNDS(guildId); object2.body = {name: name, sound: sound, volume: volume, emoji_id: emojiId, emoji_name: emojiName}; object2.rejectWithError = false; await Reflect.apply(post, HTTP, [object2]); if (false) { return undefined; } value = env2_0(env2_2[6]); return value.soundboardSoundFromAPI(undefined.body, guildId); } async function _fun55194({guildId, soundId, name, volume, emojiId, emojiName}) { // fn#55194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:2180, offset: 0x01378a10, size: 213 bytes, params: 2, frame: 24 if (false) { return undefined; } await undefined; if (false) { return undefined; } value = environment.__proto__.__proto__; const HTTP = env2_0(env2_2[5]).HTTP; const patch = HTTP.patch; const object2 = {}; object2.url = env2_6.GUILD_SOUNDBOARD_SOUND(guildId, soundId); object2.body = {name: name, volume: volume, emoji_id: emojiId, emoji_name: emojiName}; object2.rejectWithError = false; await Reflect.apply(patch, HTTP, [object2]); if (false) { return undefined; } value = env2_0(env2_2[6]); return value.soundboardSoundFromAPI(undefined.body, guildId); } function* _fun55197(a0, a1) { // fn#55197, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:2506, offset: 0x01378b1e, size: 105 bytes, params: 3, frame: 18 if (true) { value = environment.__proto__.__proto__; var HTTP = env2_0(env2_2[5]).HTTP; var del = HTTP.del; var object2 = {'url': null, 'oldFormErrors': true, 'rejectWithError': false}; object2.url = env2_6.GUILD_SOUNDBOARD_SOUND(a0, a1); yield Reflect.apply(del, HTTP, [object2]); } } function* _fun55200(a0, a1) { // fn#55200, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:2706, offset: 0x01378bc0, size: 208 bytes, params: 3, frame: 20 var r2; var binding; var binding2; var property; var value3; var HTTP; var get; var object2; var SOUNDBOARD_SOUND_GUILD_DATA; var value4; var value5; var value6; var value7; var body; var value9; var binding3; var value10; var makeDiscoverableGuild; var discoverableGuild; var error; var prototype; var value11; if (false) { return undefined; } value = environment.__proto__.__proto__; try { binding = env2_0; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { binding2 = env2_2; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { property = binding2[5]; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { value3 = binding(property); } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { HTTP = value3.HTTP; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { get = HTTP.get; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { object2 = {}; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { binding = env2_6; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { SOUNDBOARD_SOUND_GUILD_DATA = binding.SOUNDBOARD_SOUND_GUILD_DATA; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { value4 = Reflect.apply(SOUNDBOARD_SOUND_GUILD_DATA, binding, [a0, a1]); } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { object2.url = value4; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { object2.rejectWithError = false; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { value5 = Reflect.apply(get, HTTP, [object2]); } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } yield value5; try { value6 = undefined; value7 = false; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } if (value7) { return value6; } try { body = value6.body; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } const value8 = null; try { value9 = value8 != body; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } if (value9) { try { binding = env2_0; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { binding3 = env2_2; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { property = binding3[15]; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { value10 = binding(property); } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { makeDiscoverableGuild = value10.makeDiscoverableGuild; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { body = value6.body; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } try { discoverableGuild = Reflect.apply(makeDiscoverableGuild, value10, [body]); r2 = discoverableGuild; } catch (error) { binding = env2_1; value = binding(env2_2[8]); prototype = value.prototype; value11 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value11; throw value; } return r2; } return value8; } function* _fun55203() { // fn#55203, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:271, offset: 0x01378cb9, size: 246 bytes, params: 1, frame: 17 var environment; var binding; var binding2; var property; var value3; var HTTP; var get; var object2; var SOUNDBOARD_DEFAULT_SOUNDS; var value4; var value5; var value6; var body; var map; var closure; var value7; var binding3; var value8; var dispatch; var error; var binding4; var prototype; var value9; if (true) { value = environment.__proto__.__proto__; try { binding = env2_0; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { binding2 = env2_2; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { property = binding2[5]; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { value3 = binding(property); } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { HTTP = value3.HTTP; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { get = HTTP.get; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { object2 = {}; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { binding = env2_6; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { SOUNDBOARD_DEFAULT_SOUNDS = binding.SOUNDBOARD_DEFAULT_SOUNDS; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { object2.url = SOUNDBOARD_DEFAULT_SOUNDS; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { object2.rejectWithError = false; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { value4 = Reflect.apply(get, HTTP, [object2]); } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } yield value4; try { value5 = undefined; value6 = false; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } if (value6) { return value5; } try { body = value5.body; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { map = body.map; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { closure = _fun55204; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { value7 = Reflect.apply(map, body, [closure]); } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { binding = env2_1; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { binding3 = env2_2; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { property = binding3[7]; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { value8 = binding(property); } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { dispatch = value8.dispatch; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { object2 = {}; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { object2.type = 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_SUCCESS'; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { object2.soundboardSounds = value7; } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } try { Reflect.apply(dispatch, value8, [object2]); } catch (error) { binding = env2_1; binding4 = env2_2; value = binding(binding4[7]); value.dispatch({type: 'SOUNDBOARD_FETCH_DEFAULT_SOUNDS_FAILURE'}); value = binding(binding4[8]); prototype = value.prototype; value9 = Object.create(prototype, {constructor: {value: value}}); value = new value(); value = value instanceof Object ? value : value9; throw value; } } } function _fun55207(a0) { // fn#55207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:706, offset: 0x01378e09, size: 64 bytes, params: 2, frame: 14 var environment; const env0_0 = a0; const closure = onSoundboardActionCompleted; const value = environment.__proto__; (importDefault(694) /* metro dependency 694: Dispatcher */).subscribe(env0_0, closure); } function* _fun55213(a0) { // fn#55213, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:1434, offset: 0x01378fc7, size: 222 bytes, params: 2, frame: 19 var value11; var value12; if (false) { return undefined; } value = global.performance.now(); const disableAnalytics = a0?.disableAnalytics; const r4 = !env2_10 && !(disableAnalytics != null && disableAnalytics); if (r4) { } const Promise = global.Promise; yield Promise.all([env2_13(), env2_14()]); const value9 = undefined; if (true) { if (r4) { value11 = global.performance.now(); value12 = env2_1(env2_2[10]); value12.track(env2_7.EXPRESSION_PICKER_SOUNDBOARD_SOUNDS_LOADED, {elapsed_ms: value11 - value}); } } return value9; } function _fun55219(a0) { // fn#55219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:3427, offset: 0x013790ef, size: 259 bytes, params: 2, frame: 21 var r0; var value4; var defaultImport2; var show; var object2; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const t = (require(1244) /* metro dependency 1244: indexNative */).t; const value = environment.__proto__; const value2 = undefined; const defaultImport = importDefault(22) /* metro dependency 22 */; if (defaultImport.size(a0.soundIds) >= MAX_FAVORITES) { defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */; show = defaultImport2.show; object2 = {}; object2.title = intl.string(t['+XYXtZ']); object2.body = intl.formatToPlainString(t.JaIyFi, {count: MAX_FAVORITES}); Reflect.apply(show, defaultImport2, [object2]); r0 = false; } else { value4 = a0.soundIds.includes(env0_0); if (value4) { r0 = !value4; } else { a0.soundIds.push(env0_0); r0 = value2; } } return r0; } function _fun55221(a0) { // fn#55221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:3814, offset: 0x0137923c, size: 36 bytes, params: 2, frame: 12 const soundIds = a0.soundIds; a0.soundIds = soundIds.filter(_fun55222); } function _fun55204(a0) { // fn#55204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:382, offset: 0x01378daf, size: 46 bytes, params: 2, frame: 13 return env3_0(env3_2[6]).soundboardSoundFromAPI(a0, env3_5); } function onSoundboardActionCompleted() { // fn#55208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7122:742, offset: 0x01378e49, size: 73 bytes, params: 1, frame: 15 let value = environment.__proto__.__proto__; value = importDefault(694) /* metro dependency 694: Dispatcher */; value.unsubscribe(env1_0, onSoundboardActionCompleted); global.setTimeout(env0_0, 0); }