298 lines
14 KiB
TypeScript
298 lines
14 KiB
TypeScript
/* Metro module 4295; source: modules/game_console/GameConsoleStore.tsx; dependencies: [6, 7, 15, 17, 18, 4296, 4297, 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 Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import SessionsStore from '../../stores/SessionsStore.tsx'; /* Metro dependency 4296 */
|
|
import VoiceStateStore from '../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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});
|
|
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 = (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});
|
|
(FileImportTrackerModule).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 _fun36485() { // fn#36485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:934, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return CreateClass >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof CreateClass === 'bigint' ? CreateClass : +CreateClass]};
|
|
}
|
|
|
|
}
|
|
|
|
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 GameConsoleStore2 = GameConsoleStore;
|
|
Inherits(GameConsoleStore2, a0);
|
|
return CreateClass(GameConsoleStore2, [{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 GameConsoleStore() { // fn#36488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:1359, offset: 0x0108d31d, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_0(this, GameConsoleStore);
|
|
const value3 = env1_3(GameConsoleStore);
|
|
return env1_2(this, _isNativeReflectConstruct_36481() ? global.Reflect.construct(value3, arguments,
|
|
env1_3(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
function value_36492(a0) { // fn#36492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:1945, offset: 0x0108d3ec, size: 16 bytes, params: 2, frame: 2
|
|
return env1_11[a0];
|
|
}
|
|
|
|
function value_36493(a0, a1) { // fn#36493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:1994, offset: 0x0108d3fc, size: 34 bytes, params: 3, frame: 3
|
|
const value = environment.__proto__;
|
|
return env1_10[a0]?.[a1];
|
|
}
|
|
|
|
function value_36494(a0) { // fn#36494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4467:2082, offset: 0x00f7ebbb, size: 22 bytes, params: 2, frame: 11
|
|
return env1_12.has(a0);
|
|
}
|
|
|
|
function value_36495() { // fn#36495, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
|
|
return env1_9;
|
|
}
|
|
|
|
function value_36496() { // fn#36496, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
|
|
return env1_7;
|
|
}
|
|
|
|
function value_36497() { // fn#36497, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
|
|
return env1_8;
|
|
}
|
|
|
|
}
|
|
|
|
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 object = {};
|
|
binding[platform] = object;
|
|
const object2 = {};
|
|
const value2 = _createForOfIteratorHelperLoose_36484(devices);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r4 = value3;
|
|
while (true) {
|
|
value4 = r4.value;
|
|
id = value4.id;
|
|
object[id] = value4;
|
|
property = env0_11[platform];
|
|
id = value4.id;
|
|
if (property === id) {
|
|
id = value4.id;
|
|
object2[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;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun36480, 4295, [6, 7, 15, 17, 18, 4296, 4297, 566, 694,
|
|
2]) /* metro module 4295, dependencies: [6, 7, 15, 17, 18, 4296, 4297, 566, 694, 2] */;
|