255 lines
10 KiB
TypeScript
255 lines
10 KiB
TypeScript
/* Metro module 4295; source: modules/game_console/GameConsoleStore.tsx; dependencies: [6, 7, 15, 17, 18, 4296, 4297, 566, 694, 2] */
|
|
function _fun36480(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:6, offset: 0x0108ce61, size: 488 bytes, params: 8, frame: 19
|
|
const _arrayLikeToArray_36486 = 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;
|
|
};
|
|
let Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
|
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
|
|
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
|
let Set = global.Set;
|
|
let set = new Set();
|
|
const env0_10 = {};
|
|
const env0_11 = {};
|
|
Set = global.Set;
|
|
set = new Set();
|
|
Object = global.Object;
|
|
const env0_13 = Object.freeze({});
|
|
const DeviceSettingsStore = (importDefault(566) /* metro dependency 566: flux */).DeviceSettingsStore;
|
|
set = _fun36487(DeviceSettingsStore);
|
|
set.displayName = 'GameConsoleStore';
|
|
set.persistKey = 'GameConsoleStore';
|
|
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {REMOTE_SESSION_CONNECT: function(a0) {
|
|
env0_7 = a0.sessionId;
|
|
env0_8 = null;
|
|
}, REMOTE_SESSION_DISCONNECT: function() {
|
|
env0_7 = null;
|
|
env0_8 = null;
|
|
}, WAIT_FOR_REMOTE_SESSION: function({sessionType, nonce, channelId, deviceId, commandId}) {
|
|
var object = {type: sessionType, nonce: nonce, channelId: channelId};
|
|
object.startedAt = global.Date.now();
|
|
object.deviceId = deviceId;
|
|
object.commandId = commandId;
|
|
env0_8 = object;
|
|
}, GAME_CONSOLE_FETCH_DEVICES_START: GAME_CONSOLE_FETCH_DEVICES_START,
|
|
GAME_CONSOLE_FETCH_DEVICES_SUCCESS: GAME_CONSOLE_FETCH_DEVICES_SUCCESS,
|
|
GAME_CONSOLE_FETCH_DEVICES_FAIL: GAME_CONSOLE_FETCH_DEVICES_FAIL,
|
|
GAME_CONSOLE_SELECT_DEVICE: GAME_CONSOLE_SELECT_DEVICE});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_console/GameConsoleStore.tsx');
|
|
exports.default = set;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_36481() { // fn#36481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:170, offset: 0x0108d049, 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_36481_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_36484(a0, a1) { // fn#36484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:363, offset: 0x0108d0a7, 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 _fun36485;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_36486(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_36486(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_36486(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun36485;
|
|
}
|
|
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 _fun36487(a0) { // fn#36487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:1347, offset: 0x0108d219, size: 260 bytes, params: 2, frame: 16
|
|
const closure = GameConsoleStore;
|
|
env0_4(closure, a0);
|
|
return env0_1(closure, [{key: 'initialize', value: value_36489}, {key: 'getUserAgnosticState', value: value_36490},
|
|
{key: 'getDevicesForPlatform', value: value_36491}, {key: 'getLastSelectedDeviceByPlatform',
|
|
value: value_36492}, {key: 'getDevice', value: value_36493}, {key: 'getFetchingDevices', value: value_36494},
|
|
{key: 'getPendingDeviceCommands', value: value_36495}, {key: 'getRemoteSessionId', value: value_36496},
|
|
{key: 'getAwaitingRemoteSessionInfo', value: value_36497}]);
|
|
}
|
|
|
|
function GAME_CONSOLE_FETCH_DEVICES_START({platform}) { // fn#36501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:2805, offset: 0x0108d4a3, size: 30 bytes, params: 2, frame: 11
|
|
env0_12.add(platform);
|
|
}
|
|
|
|
function GAME_CONSOLE_FETCH_DEVICES_SUCCESS({platform, devices}) { // fn#36502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:2897, offset: 0x0108d4c1, size: 128 bytes, params: 2, frame: 18
|
|
var r4;
|
|
var value4;
|
|
var id;
|
|
var property;
|
|
var value5;
|
|
let binding = env0_12;
|
|
binding.delete(platform);
|
|
binding = env0_10;
|
|
const object3 = {};
|
|
binding[platform] = object3;
|
|
const object4 = {};
|
|
const value2 = _createForOfIteratorHelperLoose_36484(devices);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r4 = value3;
|
|
while (true) {
|
|
value4 = r4.value;
|
|
id = value4.id;
|
|
object3[id] = value4;
|
|
property = env0_11[platform];
|
|
id = value4.id;
|
|
if (property === id) {
|
|
id = value4.id;
|
|
object4[platform] = id;
|
|
}
|
|
value5 = value2();
|
|
done = value5.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r4 = value5;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
|
|
function GAME_CONSOLE_FETCH_DEVICES_FAIL({platform}) { // fn#36503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:3132, offset: 0x0108d541, size: 30 bytes, params: 2, frame: 11
|
|
env0_12.delete(platform);
|
|
}
|
|
|
|
function GAME_CONSOLE_SELECT_DEVICE({platform, deviceId}) { // fn#36504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:3218, offset: 0x0108d55f, size: 30 bytes, params: 2, frame: 3
|
|
env0_11[platform] = deviceId;
|
|
}
|
|
|
|
function value_36489(a0) { // fn#36489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:1657, offset: 0x0108d38e, size: 52 bytes, params: 2, frame: 13
|
|
var lastSelectedDeviceByPlatform;
|
|
var value;
|
|
if (a0 != null) {
|
|
lastSelectedDeviceByPlatform = a0.lastSelectedDeviceByPlatform;
|
|
value = environment.__proto__;
|
|
}
|
|
this.waitFor(SessionsStore, VoiceStateStore);
|
|
}
|
|
|
|
function value_36490() { // fn#36490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:1767, offset: 0x0108d3c2, size: 16 bytes, params: 1, frame: 2
|
|
return {lastSelectedDeviceByPlatform: env1_11};
|
|
}
|
|
|
|
function value_36491(a0) { // fn#36491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:1854, offset: 0x0108d3d2, size: 26 bytes, params: 2, frame: 3
|
|
return env1_10[a0] ?? env1_13;
|
|
}
|
|
|