134 lines
7.2 KiB
TypeScript
134 lines
7.2 KiB
TypeScript
/* Metro module 13084; source: modules/soundboard/BaseSoundboardManager.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 4259, 694, 4561, 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});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
|
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
|
|
value = _fun99970(value);
|
|
(require(2) /* metro dependency 2 */).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 closure = BaseSoundboardManager;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{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 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);
|
|
}
|
|
|
|
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
|
|
if (MediaEngineStore.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 getId = AuthenticationStore.getId;
|
|
if (userId !== Reflect.apply(getId, AuthenticationStore, [])) {
|
|
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();
|
|
}
|
|
|