40 lines
2.0 KiB
TypeScript
40 lines
2.0 KiB
TypeScript
/* Metro module 12492; source: modules/gateway/GatewayEncoding.tsx; dependencies: [6, 7, 12493, 4664, 2] */
|
|
function _fun95136(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12682:6, offset: 0x0213328c, size: 192 bytes, params: 8, frame: 19
|
|
const 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 */;
|
|
let value = require(12493) /* metro dependency 12493: GatewayEncodingErlpackEncodingNative */;
|
|
value = value.getErlpackEncoding();
|
|
const value2 = _fun95137();
|
|
let r1 = value === undefined ? value2 : value;
|
|
const ProcessArgs = (require(4664) /* metro dependency 4664: ProcessArgs */).ProcessArgs;
|
|
r1 = ProcessArgs.isDiscordGatewayPlaintextSet() ? value2 : r1;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewayEncoding.tsx');
|
|
exports.default = r1;
|
|
}
|
|
|
|
function _fun95137() { // fn#95137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12682:149, offset: 0x0213334c, size: 134 bytes, params: 1, frame: 15
|
|
return env0_1(JSONEncoding, [{key: 'pack', value: function(a0) {
|
|
var JSON = global.JSON;
|
|
return JSON.stringify(a0);
|
|
}}, {key: 'unpack', value: function(a0) {
|
|
var property;
|
|
var value2;
|
|
var value = typeof a0;
|
|
if (value !== 'string') {
|
|
property = global.Error;
|
|
value2 = null;
|
|
value = 'Expected a string to be passed to JSONEncoding.unpack, got ' + (value2 == a0 ? value2 : value);
|
|
value = new property(value);
|
|
throw value;
|
|
}
|
|
return global.JSON.parse(a0);
|
|
}}, {key: 'getName', value: function() {
|
|
return 'json';
|
|
}}, {key: 'wantsString', value: function() {
|
|
return true;
|
|
}}]);
|
|
}
|
|
|