142 lines
8.7 KiB
TypeScript
142 lines
8.7 KiB
TypeScript
/* Metro module 13084; source: modules/soundboard/BaseSoundboardManager.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 4259, 694, 4561, 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 AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
|
|
import LifecycleManager from '../../lib/LifecycleManager.tsx'; /* Metro dependency 4561 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun99966(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13274:6, offset: 0x021dabe4, size: 238 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = LifecycleManager;
|
|
value = _fun99970(value);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/soundboard/BaseSoundboardManager.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_99967() { // fn#99967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13274:168, offset: 0x021dacd2, 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_99967_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun99970(a0) { // fn#99970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13274:367, offset: 0x021dad34, size: 97 bytes, params: 2, frame: 16
|
|
const BaseSoundboardManager2 = BaseSoundboardManager;
|
|
Inherits(BaseSoundboardManager2, a0);
|
|
return CreateClass(BaseSoundboardManager2, [{key: '_initialize', value: value_99978}, {key: '_terminate',
|
|
value: value_99979}]);
|
|
function BaseSoundboardManager(a0) { // fn#99971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13274:379, offset: 0x021dad95, size: 210 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_2;
|
|
binding(this, BaseSoundboardManager);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_5(BaseSoundboardManager);
|
|
binding = env1_4;
|
|
if (_isNativeReflectConstruct_99967()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_5(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value._playSound = function() {
|
|
};
|
|
value._stopAndClearSounds = function() {
|
|
};
|
|
value._handleToggleSelfDeafened = _handleToggleSelfDeafened;
|
|
value._handleSoundboardSoundReceived = _handleSoundboardSoundReceived;
|
|
value._handleSoundboardSoundPlayLocally = _handleSoundboardSoundPlayLocally;
|
|
value._handleVoiceChannelSelect = _handleVoiceChannelSelect;
|
|
return value;
|
|
function _handleToggleSelfDeafened() { // fn#99974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13274:708, owner: BaseSoundboardManager._handleToggleSelfDeafened, offset: 0x021dae67, size: 41 bytes, params: 1, frame: 9
|
|
const mediaEngineStoreBinding = MediaEngineStore;
|
|
if (mediaEngineStoreBinding.isDeaf()) {
|
|
env0_0._stopAndClearSounds();
|
|
}
|
|
}
|
|
|
|
function _handleSoundboardSoundReceived({soundId, soundVolume, userId, channelId}) { // fn#99975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13274:783, owner: BaseSoundboardManager._handleSoundboardSoundReceived, offset: 0x021dae90, size: 90 bytes, params: 2, frame: 17
|
|
if (soundId != null) {
|
|
var authenticationStoreBinding = AuthenticationStore;
|
|
var getId = authenticationStoreBinding.getId;
|
|
if (userId !== Reflect.apply(getId, authenticationStoreBinding, [])) {
|
|
return env0_0._playSound(soundId, soundVolume, userId, channelId);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _handleSoundboardSoundPlayLocally({sound, channelId}) { // fn#99976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13274:926, owner: BaseSoundboardManager._handleSoundboardSoundPlayLocally, offset: 0x021daeea, size: 65 bytes, params: 2, frame: 17
|
|
let value = environment.__proto__.__proto__;
|
|
value = AuthenticationStore.getId();
|
|
const binding = env0_0;
|
|
return binding._playSound(sound.soundId, sound.volume, value, channelId);
|
|
}
|
|
|
|
function _handleVoiceChannelSelect() { // fn#99977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13274:1041, owner: BaseSoundboardManager._handleVoiceChannelSelect, offset: 0x021daf2b, size: 21 bytes, params: 1, frame: 9
|
|
env0_0._stopAndClearSounds();
|
|
}
|
|
|
|
}
|
|
|
|
function value_99978() { // fn#99978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13274:1157, offset: 0x021daf40, size: 147 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__;
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.subscribe('VOICE_CHANNEL_EFFECT_SEND', this._handleSoundboardSoundReceived);
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.subscribe('GUILD_SOUNDBOARD_SOUND_PLAY_LOCALLY', this._handleSoundboardSoundPlayLocally);
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.subscribe('VOICE_CHANNEL_SELECT', this._handleVoiceChannelSelect);
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.subscribe('AUDIO_TOGGLE_SELF_DEAF', this._handleToggleSelfDeafened);
|
|
}
|
|
|
|
function value_99979() { // fn#99979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13274:1521, offset: 0x021dafd3, size: 147 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__;
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.unsubscribe('VOICE_CHANNEL_EFFECT_SEND', this._handleSoundboardSoundReceived);
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.unsubscribe('GUILD_SOUNDBOARD_SOUND_PLAY_LOCALLY', this._handleSoundboardSoundPlayLocally);
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.unsubscribe('VOICE_CHANNEL_SELECT', this._handleVoiceChannelSelect);
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.unsubscribe('AUDIO_TOGGLE_SELF_DEAF', this._handleToggleSelfDeafened);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun99966, 13084, [6, 7, 15, 17, 18, 1226, 4259, 694, 4561,
|
|
2]) /* metro module 13084, dependencies: [6, 7, 15, 17, 18, 1226, 4259, 694, 4561, 2] */;
|