126 lines
5.7 KiB
TypeScript
126 lines
5.7 KiB
TypeScript
/* Metro module 12598; source: stores/PermissionSpeakStore.tsx; dependencies: [6, 7, 15, 17, 18, 1379, 1867, 587, 566, 694, 2] */
|
|
function _fun96573(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:6, offset: 0x02160d9a, size: 357 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
let value = _fun96577(Store);
|
|
value.displayName = 'PermissionSpeakStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function(a0) {
|
|
env0_9 = a0.sessionId;
|
|
env0_11 = false;
|
|
}, CONNECTION_CLOSED: function() {
|
|
env0_9 = null;
|
|
env0_10 = null;
|
|
env0_12 = true;
|
|
}, VOICE_STATE_UPDATES: function({voiceStates}) {
|
|
return voiceStates.reduce(_fun96585, false);
|
|
}, PERMISSION_CLEAR_SUPPRESS_WARNING: function({forever}) {
|
|
env0_12 = true;
|
|
if (forever) {
|
|
require(dependencyMap[7]).Storage.set('hideSuppressWarning', true);
|
|
}
|
|
}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/PermissionSpeakStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_96574() { // fn#96574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:168, offset: 0x02160eff, 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_96574_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun96577(a0) { // fn#96577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:414, offset: 0x02160f61, size: 124 bytes, params: 2, frame: 16
|
|
const closure = PermissionSpeakStore;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: 'initialize', value: value_96579}, {key: 'isAFKChannel', value: value_96580},
|
|
{key: 'shouldShowWarning', value: value_96581}]);
|
|
}
|
|
|
|
function VOICE_STATE_UPDATES_96584({voiceStates}) { // fn#96584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:1303, offset: 0x021610e5, size: 34 bytes, params: 2, frame: 13
|
|
return voiceStates.reduce(_fun96585, false);
|
|
}
|
|
|
|
function value_96579() { // fn#96579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:744, offset: 0x02160fdd, size: 83 bytes, params: 1, frame: 14
|
|
this.waitFor(ChannelStore, GuildStore);
|
|
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
|
env1_13 = Storage.get('hideSuppressWarning') || env1_13;
|
|
}
|
|
|
|
function value_96580() { // fn#96580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:829, offset: 0x02161030, size: 80 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__;
|
|
const channel = ChannelStore.getChannel(env1_10);
|
|
if (channel == null) {
|
|
return false;
|
|
}
|
|
const getGuild = GuildStore.getGuild;
|
|
const getGuildId = channel.getGuildId;
|
|
value = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channel, [])]);
|
|
return value != null && channel.id === value.afkChannelId;
|
|
}
|
|
|
|
function value_96581() { // fn#96581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:986, offset: 0x02161080, size: 52 bytes, params: 1, frame: 12
|
|
const channel = ChannelStore.getChannel(env1_10);
|
|
let r0 = channel != null && channel.isGuildStageVoice();
|
|
r0 = !r0 ? env1_12 : r0;
|
|
return !r0;
|
|
}
|
|
|
|
function _fun96585(a0, a1) { // fn#96585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12788:1370, offset: 0x02161107, size: 120 bytes, params: 3, frame: 5
|
|
var r3;
|
|
var r0;
|
|
var channelId;
|
|
let value = a0;
|
|
let binding = env1_9;
|
|
if (binding !== a1.sessionId) {
|
|
r0 = value;
|
|
} else {
|
|
binding = env1_11;
|
|
env1_11 = binding !== a1.suppress ? a1.suppress : env1_11;
|
|
binding = env1_10;
|
|
channelId = a1.channelId;
|
|
if (binding !== channelId) {
|
|
channelId = a1.channelId;
|
|
env1_12 = !env1_11;
|
|
}
|
|
binding = env1_13;
|
|
r3 = binding || a1.channelId == null;
|
|
value = true;
|
|
r0 = r3 ? value : value;
|
|
}
|
|
return r0;
|
|
}
|
|
|