70 lines
3.8 KiB
TypeScript
70 lines
3.8 KiB
TypeScript
/* Metro module 8086; source: modules/rpc/transports/BaseSocket.tsx; dependencies: [6, 7, 661, 22, 8076, 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 * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun64817(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8271:6, offset: 0x01bb620d, size: 164 bytes, params: 8, frame: 19
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
const env0_4 = value.RPC_VERSION;
|
|
const env0_5 = value.RPCCloseCodes;
|
|
value = _fun64818();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/rpc/transports/BaseSocket.tsx');
|
|
exports.default = value;
|
|
function _fun64818() { // fn#64818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8271:162, offset: 0x01bb62b1, size: 57 bytes, params: 1, frame: 14
|
|
return CreateClass(BaseSocket, [{key: 'checkRpcVersion', value: value_64820}]);
|
|
function BaseSocket(a0, a1, a2) { // fn#64819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8271:183, offset: 0x01bb62ea, size: 220 bytes, params: 4, frame: 17
|
|
let value = environment.__proto__;
|
|
env1_2(this, BaseSocket);
|
|
this.transport = a0;
|
|
this.version = a1;
|
|
this.encoding = a2;
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
this.id = value.uniqueId();
|
|
const Date = global.Date;
|
|
this.authorization = {'authing': false, 'scopes': null, 'accessToken': null, scopes: [], expires: new Date(0)};
|
|
this.application = {'id': null, 'name': null, 'icon': null};
|
|
const AbortController = global.AbortController;
|
|
this.abortController = new AbortController();
|
|
this.checkRpcVersion(a1);
|
|
}
|
|
|
|
function value_64820(a0) { // fn#64820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8271:527, offset: 0x01bb63c6, size: 122 bytes, params: 2, frame: 14
|
|
var value;
|
|
var defaultImport;
|
|
if (a0 == null) {
|
|
value = environment.__proto__;
|
|
defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
|
({}).closeCode = RPCCloseCodes.INVALID_VERSION;
|
|
value = 'Invalid Version: ' + a0;
|
|
value = new defaultImport();
|
|
throw value;
|
|
}
|
|
value = environment.__proto__;
|
|
if (a0 > RPC_VERSION) {
|
|
value = environment.__proto__;
|
|
defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
|
({}).closeCode = RPCCloseCodes.INVALID_VERSION;
|
|
value = 'Invalid Version: ' + a0;
|
|
value = new defaultImport();
|
|
throw value;
|
|
}
|
|
if (a0 < 1) {
|
|
value = environment.__proto__;
|
|
defaultImport = importDefault(8076) /* metro dependency 8076: RPCError */;
|
|
({}).closeCode = RPCCloseCodes.INVALID_VERSION;
|
|
value = 'Invalid Version: ' + a0;
|
|
value = new defaultImport();
|
|
throw value;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun64817, 8086, [6, 7, 661, 22, 8076,
|
|
2]) /* metro module 8086, dependencies: [6, 7, 661, 22, 8076, 2] */;
|