626 lines
30 KiB
TypeScript
626 lines
30 KiB
TypeScript
/* Metro module 4613; source: modules/soundboard/SoundboardStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 1348, 1878, 4614, 661, 670, 22, 683, 4615, 3829, 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 SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
|
|
import Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
|
|
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import AnalyticsUtils from '../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
|
|
import UserSettingsProtoStore from '../user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
|
|
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as UserSettingsConstantsModule from '../user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
|
|
import * as UserSettingsModule from '../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
|
|
import * as SoundboardConstantsModule from './SoundboardConstants.tsx'; /* Metro dependency 4614 */
|
|
import * as PerceptualVolumeUtilsModule from '../../utils/PerceptualVolumeUtils.tsx'; /* Metro dependency 4615 */
|
|
|
|
function _fun39582(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:6, offset: 0x010e5f13, size: 867 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_39588 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const GUILD_SOUNDBOARD_SOUND_CREATE2 = GUILD_SOUNDBOARD_SOUND_CREATE;
|
|
const syncIsSoundboardVolumeMutedFromUserSettings = function() {
|
|
var value2 = undefined;
|
|
var value3 = require(dependencyMap[14]).SoundboardSettings.getSetting();
|
|
env0_23 = (value3 == null ? value2 : value3.volume) === 0;
|
|
return value2;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object = {NOT_FETCHED: 0};
|
|
object[0] = 'NOT_FETCHED';
|
|
object.FETCHING = 1;
|
|
object[1] = 'FETCHING';
|
|
object.FETCHED = 2;
|
|
object[2] = 'FETCHED';
|
|
let Map = global.Map;
|
|
let map = new Map();
|
|
Map = global.Map;
|
|
map = new Map();
|
|
let Set = global.Set;
|
|
let set = new Set();
|
|
let NOT_FETCHED = object.NOT_FETCHED;
|
|
NOT_FETCHED = object.NOT_FETCHED;
|
|
Set = global.Set;
|
|
set = new Set();
|
|
Map = global.Map;
|
|
set = new Map();
|
|
const env0_24 = (Module00022).debounce(_fun39593, 1000);
|
|
const Store = (Flux).Store;
|
|
_fun39594(Store).displayName = 'SoundboardStore';
|
|
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_39618,
|
|
GUILD_SOUNDBOARD_FETCH: GUILD_SOUNDBOARD_FETCH, GUILD_SOUNDBOARD_SOUND_CREATE: GUILD_SOUNDBOARD_SOUND_CREATE2,
|
|
GUILD_SOUNDBOARD_SOUND_UPDATE: GUILD_SOUNDBOARD_SOUND_CREATE2,
|
|
GUILD_SOUNDBOARD_SOUND_DELETE: GUILD_SOUNDBOARD_SOUND_DELETE,
|
|
GUILD_SOUNDBOARD_SOUND_PLAY_START: GUILD_SOUNDBOARD_SOUND_PLAY_START,
|
|
GUILD_SOUNDBOARD_SOUND_PLAY_END: GUILD_SOUNDBOARD_SOUND_PLAY_END_39623,
|
|
GUILD_SOUNDBOARD_SOUNDS_UPDATE: GUILD_SOUNDBOARD_SOUNDS_UPDATE,
|
|
USER_SOUNDBOARD_SET_VOLUME: USER_SOUNDBOARD_SET_VOLUME, VOICE_CHANNEL_SELECT: VOICE_CHANNEL_SELECT_39626,
|
|
USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_39627,
|
|
SOUNDBOARD_FETCH_DEFAULT_SOUNDS: SOUNDBOARD_FETCH_DEFAULT_SOUNDS,
|
|
SOUNDBOARD_FETCH_DEFAULT_SOUNDS_SUCCESS: SOUNDBOARD_FETCH_DEFAULT_SOUNDS_SUCCESS,
|
|
SOUNDBOARD_SOUNDS_RECEIVED: SOUNDBOARD_SOUNDS_RECEIVED, GUILD_DELETE: GUILD_DELETE_39632,
|
|
AUDIO_TOGGLE_LOCAL_SOUNDBOARD_MUTE: AUDIO_TOGGLE_LOCAL_SOUNDBOARD_MUTE,
|
|
OVERLAY_INITIALIZE: OVERLAY_INITIALIZE_39634});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/soundboard/SoundboardStore.tsx');
|
|
exports.default = set;
|
|
exports.FetchState = object;
|
|
function _isNativeReflectConstruct_39583() { // fn#39583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:270, offset: 0x010e6276, size: 94 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_39583_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_39586(a0, a1) { // fn#39586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:463, offset: 0x010e62d4, size: 370 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun39587;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_39588(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_39588(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_39588(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun39587;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
function _fun39587() { // fn#39587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:1034, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function GUILD_SOUNDBOARD_SOUND_CREATE({sound}) { // fn#39589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:1582, offset: 0x010e6446, size: 182 bytes, params: 2, frame: 20
|
|
var set;
|
|
var items2;
|
|
let binding = env0_15;
|
|
const get = binding.get;
|
|
let guildId = sound.guildId;
|
|
const value2 = Reflect.apply(get, binding, [guildId]);
|
|
const index = value2?.findIndex(function({soundId}) {
|
|
return soundId === sound.soundId;
|
|
});
|
|
if (value2 == null) {
|
|
if (value2 != null) {
|
|
if (value2 != null) {
|
|
value2.push(sound);
|
|
}
|
|
binding = env0_15;
|
|
set = binding.set;
|
|
guildId = sound.guildId;
|
|
items2 = [];
|
|
arraySpread(items2, value2, 0, undefined);
|
|
Reflect.apply(set, binding, [guildId, items2]);
|
|
}
|
|
} else if (index == null) {
|
|
if (value2 != null) {
|
|
if (value2 != null) {
|
|
value2.push(sound);
|
|
}
|
|
binding = env0_15;
|
|
set = binding.set;
|
|
guildId = sound.guildId;
|
|
items2 = [];
|
|
arraySpread(items2, value2, 0, undefined);
|
|
Reflect.apply(set, binding, [guildId, items2]);
|
|
}
|
|
} else if (index !== -1) {
|
|
value2[index] = sound;
|
|
binding = env0_15;
|
|
set = binding.set;
|
|
guildId = sound.guildId;
|
|
items2 = [];
|
|
arraySpread(items2, value2, 0, undefined);
|
|
Reflect.apply(set, binding, [guildId, items2]);
|
|
} else if (value2 != null) {
|
|
if (value2 != null) {
|
|
value2.push(sound);
|
|
}
|
|
binding = env0_15;
|
|
set = binding.set;
|
|
guildId = sound.guildId;
|
|
items2 = [];
|
|
arraySpread(items2, value2, 0, undefined);
|
|
Reflect.apply(set, binding, [guildId, items2]);
|
|
}
|
|
}
|
|
|
|
function syncLocalSoundboardMutesFromUserSettings(a0) { // fn#39592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:2170, offset: 0x010e655e, size: 236 bytes, params: 2, frame: 21
|
|
var r22;
|
|
var r23;
|
|
var property;
|
|
var value5;
|
|
var soundboardMuted;
|
|
var binding;
|
|
var value6;
|
|
var value9;
|
|
var value10;
|
|
const value = undefined;
|
|
const user = a0 == null || a0.audioContextSettings == null ? value : a0.audioContextSettings.user;
|
|
const r2 = user ?? ({});
|
|
const Object = global.Object;
|
|
const value2 = Object.entries(r2);
|
|
let length = value2.length;
|
|
const value3 = 0;
|
|
if (value3 < length) {
|
|
r22 = value3;
|
|
while (true) {
|
|
property = value2[r22];
|
|
value5 = Module00057(property, 2);
|
|
property = value5[value3];
|
|
soundboardMuted = value5[1].soundboardMuted;
|
|
binding = env0_17;
|
|
if (soundboardMuted) {
|
|
binding.add(property);
|
|
} else {
|
|
binding.delete(property);
|
|
}
|
|
value6 = typeof r22 === 'bigint' ? r22 + 1n : +r22 + 1;
|
|
length = value2.length;
|
|
if (value6 < length) {
|
|
r22 = value6;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
const _createForOfIteratorHelperLoose_39586Binding = _createForOfIteratorHelperLoose_39586;
|
|
binding = env0_17;
|
|
const value7 = _createForOfIteratorHelperLoose_39586Binding(binding.keys());
|
|
const value8 = value7();
|
|
let done = value8.done;
|
|
if (!done) {
|
|
r23 = value8;
|
|
while (true) {
|
|
value9 = r23.value;
|
|
if (r2[value9] == null) {
|
|
binding = env0_17;
|
|
binding.delete(value9);
|
|
}
|
|
value10 = value7();
|
|
done = value10.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r23 = value10;
|
|
continue;
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function _fun39593(a0, a1) { // fn#39593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:1845, offset: 0x010e664a, size: 147 bytes, params: 3, frame: 21
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const UPDATE_SOUNDBOARD_SETTINGS = AnalyticEvents.UPDATE_SOUNDBOARD_SETTINGS;
|
|
const Math = global.Math;
|
|
const round = Math.round;
|
|
Reflect.apply(track, defaultImport, [UPDATE_SOUNDBOARD_SETTINGS, {volume: Reflect.apply(round, Math,
|
|
[PerceptualVolumeUtilsModule.amplitudeToPerceptual(a0)]), location_stack: a1}]);
|
|
const SoundboardSettings = (UserSettingsModule).SoundboardSettings;
|
|
SoundboardSettings.updateSetting({volume: a0});
|
|
}
|
|
|
|
function _fun39594(a0) { // fn#39594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:2532, offset: 0x010e66dd, size: 531 bytes, params: 2, frame: 16
|
|
const SoundboardStore2 = SoundboardStore;
|
|
Inherits(SoundboardStore2, a0);
|
|
return CreateClass(SoundboardStore2, [{key: 'initialize', value: function() {
|
|
var userSettingsProtoStoreBinding = UserSettingsProtoStore;
|
|
this.waitFor(userSettingsProtoStoreBinding, UserStore);
|
|
syncLocalSoundboardMutesFromUserSettings(userSettingsProtoStoreBinding.settings);
|
|
syncIsSoundboardVolumeMutedFromUserSettings();
|
|
}}, {key: 'getOverlaySerializedState', value: value_39597}, {key: 'getSounds', value: value_39598},
|
|
{key: 'getSoundsForGuild', value: value_39599}, {key: 'getSound', value: value_39600}, {key: 'getSoundById',
|
|
value: value_39602}, {key: 'isFetchingSounds', value: value_39604}, {key: 'isFetchingDefaultSounds',
|
|
value: value_39605}, {key: 'isFetching', value: function() {
|
|
return this.isFetchingSounds() || this.isFetchingDefaultSounds();
|
|
}}, {key: 'shouldFetchDefaultSounds', value: value_39607}, {key: 'hasFetchedDefaultSounds', value: value_39608},
|
|
{key: 'isUserPlayingSounds', value: value_39609}, {key: 'isPlayingSound', value: value_39610},
|
|
{key: 'isFavoriteSound', value: value_39611}, {key: 'getFavorites', value: value_39612},
|
|
{key: 'isLocalSoundboardMuted', value: value_39613}, {key: 'isSoundboardVolumeMuted', value: value_39614},
|
|
{key: 'hasHadOtherUserPlaySoundInSession', value: value_39615}, {key: 'hasFetchedAllSounds',
|
|
value: value_39616}, {key: 'isFetchingAnySounds', value: value_39617}]);
|
|
function SoundboardStore() { // fn#39595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:2544, offset: 0x010e68f0, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_3(this, SoundboardStore);
|
|
const value3 = env1_6(SoundboardStore);
|
|
return env1_5(this, _isNativeReflectConstruct_39583() ? global.Reflect.construct(value3, arguments,
|
|
env1_6(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_39597() { // fn#39597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3006, offset: 0x010e6996, size: 85 bytes, params: 1, frame: 14
|
|
const object = {};
|
|
const Object = global.Object;
|
|
object.soundboardSounds = Object.fromEntries(env1_15);
|
|
let Array = global.Array;
|
|
object.favoritedSoundIds = Array.from(env1_20);
|
|
Array = global.Array;
|
|
object.localSoundboardMutes = Array.from(env1_17);
|
|
return object;
|
|
}
|
|
|
|
function value_39598() { // fn#39598, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
|
|
return env1_15;
|
|
}
|
|
|
|
function value_39599(a0) { // fn#39599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3209, offset: 0x010e69eb, size: 22 bytes, params: 2, frame: 11
|
|
return env1_15.get(a0);
|
|
}
|
|
|
|
function value_39600(a0, a1) { // fn#39600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3261, offset: 0x010e6a01, size: 57 bytes, params: 3, frame: 12
|
|
var environment;
|
|
const env0_0 = a1;
|
|
const value = environment.__proto__;
|
|
return (env1_15.get(a0) ?? []).find(function({soundId}) {
|
|
return soundId === require;
|
|
});
|
|
}
|
|
|
|
function value_39602(a0) { // fn#39602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3366, offset: 0x010e6a50, size: 71 bytes, params: 2, frame: 13
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const Array = global.Array;
|
|
const from = Array.from;
|
|
let value = environment.__proto__;
|
|
const binding = env1_15;
|
|
value = Reflect.apply(from, Array, [binding.values()]);
|
|
value = value.flat();
|
|
return value.find(_fun39603);
|
|
function _fun39603({soundId}) { // fn#39603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3421, offset: 0x010e6a3a, size: 22 bytes, params: 2, frame: 2
|
|
return soundId === env0_0;
|
|
}
|
|
|
|
}
|
|
|
|
function value_39604() { // fn#39604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3472, offset: 0x010e6a97, size: 23 bytes, params: 1, frame: 2
|
|
const FETCHING = env1_14.FETCHING;
|
|
return NOT_FETCHED === FETCHING;
|
|
}
|
|
|
|
function value_39605() { // fn#39605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3544, offset: 0x010e6aae, size: 23 bytes, params: 1, frame: 2
|
|
const FETCHING = env1_14.FETCHING;
|
|
return NOT_FETCHED === FETCHING;
|
|
}
|
|
|
|
function value_39607() { // fn#39607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3717, offset: 0x010e6ae5, size: 23 bytes, params: 1, frame: 2
|
|
const NOT_FETCHED2 = env1_14.NOT_FETCHED;
|
|
return NOT_FETCHED === NOT_FETCHED2;
|
|
}
|
|
|
|
function value_39608() { // fn#39608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3792, offset: 0x010e6afc, size: 23 bytes, params: 1, frame: 2
|
|
const FETCHED = env1_14.FETCHED;
|
|
return NOT_FETCHED === FETCHED;
|
|
}
|
|
|
|
function value_39609(a0) { // fn#39609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3859, offset: 0x010e6b13, size: 37 bytes, params: 2, frame: 11
|
|
let value = environment.__proto__;
|
|
value = env1_21.get(a0);
|
|
return value != null && value > 0;
|
|
}
|
|
|
|
function value_39610(a0) { // fn#39610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:3936, offset: 0x010e6b38, size: 28 bytes, params: 2, frame: 11
|
|
const value = environment.__proto__;
|
|
return env1_16.get(a0) != null;
|
|
}
|
|
|
|
function value_39611(a0) { // fn#39611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:4001, offset: 0x00df1b0a, size: 22 bytes, params: 2, frame: 11
|
|
return env1_20.has(a0);
|
|
}
|
|
|
|
function value_39612() { // fn#39612, offset: 0x00e4253a, size: 9 bytes, params: 1, frame: 1
|
|
return env1_20;
|
|
}
|
|
|
|
function value_39613(a0) { // fn#39613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:4115, offset: 0x00fc0a0f, size: 22 bytes, params: 2, frame: 11
|
|
return env1_17.has(a0);
|
|
}
|
|
|
|
function value_39614() { // fn#39614, offset: 0x00df3ac4, size: 9 bytes, params: 1, frame: 1
|
|
return env1_23;
|
|
}
|
|
|
|
function value_39615() { // fn#39615, offset: 0x00e425c8, size: 9 bytes, params: 1, frame: 1
|
|
return env1_22;
|
|
}
|
|
|
|
function value_39616() { // fn#39616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:4306, offset: 0x010e6b54, size: 44 bytes, params: 1, frame: 3
|
|
const value = environment.__proto__;
|
|
const FETCHED = env1_14.FETCHED;
|
|
return NOT_FETCHED === FETCHED && NOT_FETCHED === env1_14.FETCHED;
|
|
}
|
|
|
|
function value_39617() { // fn#39617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:4388, offset: 0x010e6b80, size: 44 bytes, params: 1, frame: 3
|
|
const value = environment.__proto__;
|
|
const FETCHING = env1_14.FETCHING;
|
|
return NOT_FETCHED === FETCHING || NOT_FETCHED === env1_14.FETCHING;
|
|
}
|
|
|
|
}
|
|
|
|
function LOGOUT_39618() { // fn#39618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:4519, offset: 0x010e6bac, size: 83 bytes, params: 1, frame: 11
|
|
let binding = env0_15;
|
|
binding.clear();
|
|
env0_16.clear();
|
|
env0_21.clear();
|
|
binding = env0_14;
|
|
let NOT_FETCHED = binding.NOT_FETCHED;
|
|
NOT_FETCHED = binding.NOT_FETCHED;
|
|
}
|
|
|
|
function GUILD_SOUNDBOARD_FETCH() { // fn#39619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:4638, offset: 0x010e6bff, size: 21 bytes, params: 1, frame: 2
|
|
env0_19 = env0_14.FETCHING;
|
|
}
|
|
|
|
function GUILD_SOUNDBOARD_SOUND_DELETE({soundId, guildId}) { // fn#39620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:4827, offset: 0x010e6c14, size: 137 bytes, params: 2, frame: 18
|
|
var r5;
|
|
var r7;
|
|
var findIndex;
|
|
var set;
|
|
var items2;
|
|
let binding = env0_15;
|
|
const value2 = binding.get(guildId);
|
|
const value3 = value2 == null;
|
|
if (value3) {
|
|
r5 = undefined;
|
|
r7 = value3;
|
|
} else {
|
|
findIndex = value2.findIndex;
|
|
r5 = Reflect.apply(findIndex, value2, [function({soundId}) {
|
|
return soundId === soundId;
|
|
}]);
|
|
r7 = findIndex;
|
|
}
|
|
let r2 = value2 == null || r5 == null;
|
|
r2 = !r2 ? r5 < 0 : r2;
|
|
if (!r2) {
|
|
value2.splice(r5, 1);
|
|
binding = env0_15;
|
|
set = binding.set;
|
|
items2 = [];
|
|
arraySpread(items2, value2, 0, r7);
|
|
Reflect.apply(set, binding, [guildId, items2]);
|
|
}
|
|
}
|
|
|
|
function GUILD_SOUNDBOARD_SOUND_PLAY_START({soundId, userId}) { // fn#39622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:5031, offset: 0x010e6c9d, size: 153 bytes, params: 2, frame: 18
|
|
const value4 = (env0_16.get(soundId) ?? 0) + 1;
|
|
const value6 = (env0_21.get(userId) ?? 0) + 1;
|
|
env0_16.set(soundId, value4);
|
|
env0_21.set(userId, value6);
|
|
if (userId === UserStore.getCurrentUser()?.id) {
|
|
}
|
|
}
|
|
|
|
function GUILD_SOUNDBOARD_SOUND_PLAY_END_39623({soundId, userId}) { // fn#39623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:5261, offset: 0x010e6d36, size: 158 bytes, params: 2, frame: 18
|
|
const value4 = (env0_16.get(soundId) ?? 0) - 1;
|
|
const value6 = (env0_21.get(userId) ?? 0) - 1;
|
|
if (value4 <= 0) {
|
|
env0_16.delete(soundId);
|
|
} else {
|
|
env0_16.set(soundId, value4);
|
|
}
|
|
if (value6 <= 0) {
|
|
env0_21.delete(userId);
|
|
} else {
|
|
env0_21.set(userId, value6);
|
|
}
|
|
}
|
|
|
|
function GUILD_SOUNDBOARD_SOUNDS_UPDATE({guildId, soundboardSounds}) { // fn#39624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:5465, offset: 0x010e6dd4, size: 36 bytes, params: 2, frame: 13
|
|
env0_15.set(guildId, soundboardSounds);
|
|
}
|
|
|
|
function USER_SOUNDBOARD_SET_VOLUME({volume, location}) { // fn#39625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:5564, offset: 0x010e6df8, size: 67 bytes, params: 2, frame: 15
|
|
const resultBinding = result;
|
|
result = volume === 0;
|
|
env0_24(volume, location);
|
|
if (resultBinding !== env0_23) {
|
|
env0_24.flush();
|
|
}
|
|
}
|
|
|
|
function VOICE_CHANNEL_SELECT_39626() { // fn#39626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:5679, offset: 0x010e6e3b, size: 35 bytes, params: 1, frame: 10
|
|
env0_16.clear();
|
|
env0_21.clear();
|
|
}
|
|
|
|
function USER_SETTINGS_PROTO_UPDATE_39627({settings}) { // fn#39627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:5763, offset: 0x010e6e5e, size: 151 bytes, params: 2, frame: 15
|
|
var r0;
|
|
var Set;
|
|
var set;
|
|
const type = settings.type;
|
|
const proto = settings.proto;
|
|
const FRECENCY_AND_FAVORITES_SETTINGS = UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS;
|
|
if (FRECENCY_AND_FAVORITES_SETTINGS === type) {
|
|
Set = global.Set;
|
|
r0 = (proto == null || proto.favoriteSoundboardSounds == null ? undefined : proto.favoriteSoundboardSounds.soundIds) ?? [];
|
|
set = new Set();
|
|
} else if (UserSettingsTypes.PRELOADED_USER_SETTINGS === type) {
|
|
syncLocalSoundboardMutesFromUserSettings(proto);
|
|
syncIsSoundboardVolumeMutedFromUserSettings();
|
|
}
|
|
}
|
|
|
|
function SOUNDBOARD_FETCH_DEFAULT_SOUNDS() { // fn#39628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:6143, offset: 0x010e6ef5, size: 21 bytes, params: 1, frame: 2
|
|
env0_18 = env0_14.FETCHING;
|
|
}
|
|
|
|
function SOUNDBOARD_FETCH_DEFAULT_SOUNDS_SUCCESS({soundboardSounds}) { // fn#39629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:6233, offset: 0x010e6f0a, size: 49 bytes, params: 2, frame: 14
|
|
env0_15.set(DEFAULT_SOUND_GUILD_ID, soundboardSounds);
|
|
env0_18 = env0_14.FETCHED;
|
|
}
|
|
|
|
function SOUNDBOARD_SOUNDS_RECEIVED({updates}) { // fn#39630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:6347, offset: 0x010e6f3b, size: 47 bytes, params: 2, frame: 11
|
|
updates.forEach(_fun39631);
|
|
env0_19 = env0_14.FETCHED;
|
|
function _fun39631({guildId, sounds}) { // fn#39631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:6411, offset: 0x010e6f6a, size: 36 bytes, params: 2, frame: 13
|
|
env1_15.set(guildId, sounds);
|
|
}
|
|
|
|
}
|
|
|
|
function GUILD_DELETE_39632({guild}) { // fn#39632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:6482, offset: 0x010e6f8e, size: 34 bytes, params: 2, frame: 11
|
|
env0_15.delete(guild.id);
|
|
}
|
|
|
|
function AUDIO_TOGGLE_LOCAL_SOUNDBOARD_MUTE({userId}) { // fn#39633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:6571, offset: 0x010e6fb0, size: 58 bytes, params: 2, frame: 12
|
|
let binding = env0_17;
|
|
const value2 = binding.has(userId);
|
|
binding = env0_17;
|
|
if (value2) {
|
|
binding.delete(userId);
|
|
} else {
|
|
binding.add(userId);
|
|
}
|
|
}
|
|
|
|
function OVERLAY_INITIALIZE_39634({soundboardStoreState}) { // fn#39634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4791:6674, offset: 0x010e6fea, size: 159 bytes, params: 2, frame: 16
|
|
const Map = global.Map;
|
|
const defaultImport = SnowflakeUtils;
|
|
const map = new Map(defaultImport.entries(soundboardStoreState.soundboardSounds));
|
|
let Set = global.Set;
|
|
let set = new Set(soundboardStoreState.favoritedSoundIds);
|
|
Set = global.Set;
|
|
set = new Set(soundboardStoreState.localSoundboardMutes);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun39582, 4613, [6, 7, 15, 17, 18, 57, 1348, 1878, 4614, 661, 670, 22, 683, 4615, 3829, 21, 566, 694,
|
|
2]) /* metro module 4613, dependencies: [6, 7, 15, 17, 18, 57, 1348, 1878, 4614, 661, 670, 22, 683, 4615, 3829, 21, 566, 694, 2] */;
|