427 lines
17 KiB
React
427 lines
17 KiB
React
/* Metro module 7480; source: unknown; dependencies: [57, 5, 7367, 7481, 7375, 7370, 7383, 7376] */
|
|
function _fun60323(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:6, offset: 0x01701442, size: 168 bytes, params: 8, frame: 18
|
|
let env0_0 = require;
|
|
const streamHandler_60340 = function(a0) {
|
|
var value;
|
|
var error;
|
|
var env0_0 = a0;
|
|
try {
|
|
value = a0.clone();
|
|
} catch (error) {
|
|
return undefined;
|
|
}
|
|
_fun60341(value, _fun60342);
|
|
};
|
|
const hasProp_60343 = function(a0, a1) {
|
|
return (a0 ? typeof a0 === 'object' : !!a0) && !!a0[a1];
|
|
};
|
|
const closure = parseFetchArgs_60345;
|
|
const env0_2 = require(57) /* metro dependency 57 */;
|
|
const env0_3 = require(5) /* metro dependency 5 */;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.addFetchEndInstrumentationHandler = addFetchEndInstrumentationHandler_60346;
|
|
exports.addFetchInstrumentationHandler = addFetchInstrumentationHandler_60348;
|
|
exports.parseFetchArgs = closure;
|
|
}
|
|
|
|
function instrumentFetch_60324(a0) { // fn#60324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:55, offset: 0x017014ea, size: 148 bytes, params: 2, frame: 17
|
|
let env0_0 = a0;
|
|
let value = arguments.length > 1;
|
|
let r2 = value && arguments[1] !== undefined && arguments[1];
|
|
if (r2) {
|
|
value = require(7481) /* metro dependency 7481 */;
|
|
value = !value.supportsNativeFetch();
|
|
r2 = value;
|
|
}
|
|
if (!r2) {
|
|
value = require(7375) /* metro dependency 7375 */;
|
|
value.fill((require(7370) /* metro dependency 7370 */).GLOBAL_OBJ, 'fetch', function(a0) {
|
|
var env0_0 = a0;
|
|
return _fun60326;
|
|
});
|
|
}
|
|
}
|
|
|
|
function _resolveResponse_60332() { // fn#60332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:1024, offset: 0x017017d6, size: 47 bytes, params: 1, frame: 14
|
|
return env0_3(_fun60334).apply(this, arguments);
|
|
}
|
|
|
|
function streamHandler_60340(a0) { // fn#60340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:1498, offset: 0x01701980, size: 57 bytes, params: 2, frame: 14
|
|
var value;
|
|
var error;
|
|
const env0_0 = a0;
|
|
try {
|
|
value = a0.clone();
|
|
} catch (error) {
|
|
return undefined;
|
|
}
|
|
(function(a0, a1) {
|
|
return _resolveResponse_60332.apply(this, arguments);
|
|
})(value, _fun60342);
|
|
}
|
|
|
|
function parseFetchArgs_60345(a0) { // fn#60345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:1936, offset: 0x017019b9, size: 228 bytes, params: 2, frame: 17
|
|
var r2;
|
|
var r1;
|
|
var property;
|
|
var object2;
|
|
var value;
|
|
var value3;
|
|
var property2;
|
|
if (a0.length === 0) {
|
|
return {'method': 'GET', 'url': ''};
|
|
}
|
|
if (a0.length === 2) {
|
|
value3 = env0_2(a0, 2);
|
|
property = value3[0];
|
|
property2 = value3[1];
|
|
object2 = {};
|
|
object2.url = getUrlFromResource_60344(property);
|
|
value = hasProp_60343(property2, 'method');
|
|
if (value) {
|
|
value = global.String(property2.method);
|
|
value = value.toUpperCase();
|
|
r1 = value;
|
|
} else {
|
|
r1 = 'GET';
|
|
}
|
|
object2.method = r1;
|
|
} else {
|
|
property = a0[0];
|
|
object2 = {};
|
|
object2.url = getUrlFromResource_60344(property);
|
|
value = hasProp_60343(property, 'method');
|
|
if (value) {
|
|
value = global.String(property.method);
|
|
value = value.toUpperCase();
|
|
r2 = value;
|
|
} else {
|
|
r2 = 'GET';
|
|
}
|
|
object2.method = r2;
|
|
}
|
|
return object2;
|
|
}
|
|
|
|
function addFetchEndInstrumentationHandler_60346(a0) { // fn#60346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:2345, offset: 0x01701a9d, size: 76 bytes, params: 2, frame: 17
|
|
(require(7367) /* metro dependency 7367 */).addHandler('fetch-body-resolved', a0);
|
|
(require(7367) /* metro dependency 7367 */).maybeInstrument('fetch-body-resolved', function() {
|
|
instrumentFetch_60324(streamHandler_60340);
|
|
});
|
|
}
|
|
|
|
function addFetchInstrumentationHandler_60348(a0, a1) { // fn#60348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:2557, offset: 0x01701ae9, size: 81 bytes, params: 3, frame: 18
|
|
const env0_0 = a1;
|
|
(require(7367) /* metro dependency 7367 */).addHandler('fetch', a0);
|
|
(require(7367) /* metro dependency 7367 */).maybeInstrument('fetch', function() {
|
|
instrumentFetch_60324(undefined, require);
|
|
});
|
|
}
|
|
|
|
function _fun60325(a0) { // fn#60325, offset: 0x0170157e, size: 16 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return _fun60326;
|
|
}
|
|
|
|
function* _fun60334(a0, a1) { // fn#60334, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:1079, offset: 0x0170180e, size: 288 bytes, params: 3, frame: 25
|
|
var r12;
|
|
var r2;
|
|
var value;
|
|
var value2;
|
|
var body;
|
|
var getReader;
|
|
var value3;
|
|
var setTimeout;
|
|
var value4;
|
|
var value5;
|
|
var closure;
|
|
var value6;
|
|
var read;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var done;
|
|
var clearTimeout;
|
|
var value10;
|
|
var error;
|
|
var value11;
|
|
var releaseLock;
|
|
var cancel;
|
|
var value12;
|
|
var then;
|
|
exceptionLanding29: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = undefined;
|
|
var env0_0 = value;
|
|
if (a0) {
|
|
body = a0.body;
|
|
reducibleJoin28: while (true) {
|
|
if (body) {
|
|
body = a0.body;
|
|
env0_0 = body;
|
|
getReader = body.getReader;
|
|
value3 = Reflect.apply(getReader, body, []);
|
|
setTimeout = global.setTimeout;
|
|
value4 = setTimeout(_fun60335, 90000);
|
|
value5 = true;
|
|
r12 = value5;
|
|
reducibleLoop4: while (true) {
|
|
reducibleJoin6: while (true) {
|
|
reduciblePort26: while (true) {
|
|
exceptionLanding24: while (true) {
|
|
try {
|
|
try {
|
|
setTimeout = global.setTimeout;
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding29;
|
|
}
|
|
break reducibleJoin6;
|
|
}
|
|
value11 = false;
|
|
r12 = value11;
|
|
break reduciblePort26;
|
|
}
|
|
clearTimeout = global.clearTimeout;
|
|
clearTimeout(r2);
|
|
if (r12) {
|
|
continue reducibleLoop4;
|
|
}
|
|
break reducibleLoop4;
|
|
}
|
|
try {
|
|
try {
|
|
closure = _fun60337;
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding29;
|
|
}
|
|
try {
|
|
try {
|
|
value6 = setTimeout(closure, 5000);
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value;
|
|
break exceptionLanding29;
|
|
}
|
|
try {
|
|
try {
|
|
read = value3.read;
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
try {
|
|
try {
|
|
value7 = Reflect.apply(read, value3, []);
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
yield value7;
|
|
try {
|
|
try {
|
|
value8 = undefined;
|
|
value9 = false;
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
if (value9) {
|
|
global.clearTimeout(value6);
|
|
return value8;
|
|
}
|
|
try {
|
|
try {
|
|
done = value8.done;
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
try {
|
|
try {
|
|
clearTimeout = global.clearTimeout;
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
try {
|
|
try {
|
|
clearTimeout(value6);
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
reducibleJoin22: while (true) {
|
|
if (done) {
|
|
try {
|
|
try {
|
|
a1();
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding24;
|
|
}
|
|
} catch (error) {
|
|
r2 = value6;
|
|
break exceptionLanding29;
|
|
}
|
|
value10 = false;
|
|
r12 = value10;
|
|
break reducibleJoin22;
|
|
}
|
|
break reducibleJoin22;
|
|
}
|
|
r2 = value6;
|
|
clearTimeout = global.clearTimeout;
|
|
clearTimeout(r2);
|
|
if (r12) {
|
|
continue reducibleLoop4;
|
|
}
|
|
break reducibleLoop4;
|
|
}
|
|
clearTimeout = global.clearTimeout;
|
|
clearTimeout(value4);
|
|
releaseLock = value3.releaseLock;
|
|
Reflect.apply(releaseLock, value3, []);
|
|
cancel = body.cancel;
|
|
value12 = Reflect.apply(cancel, body, []);
|
|
then = value12.then;
|
|
Reflect.apply(then, value12, [null, function() {
|
|
}]);
|
|
break reducibleJoin28;
|
|
}
|
|
break reducibleJoin28;
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
global.clearTimeout(r2);
|
|
throw error;
|
|
}
|
|
|
|
function _fun60326() { // fn#60326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:232, offset: 0x0170158e, size: 330 bytes, params: 1, frame: 19
|
|
var environment;
|
|
var r1;
|
|
var value6;
|
|
var triggerHandlers;
|
|
var Object;
|
|
var assign;
|
|
var value9;
|
|
const Error = global.Error;
|
|
let error = new Error();
|
|
const env0_0 = error;
|
|
const length = arguments.length;
|
|
const Array = global.Array;
|
|
const array = new Array(length);
|
|
const value5 = 0;
|
|
if (value5 < length) {
|
|
r1 = value5;
|
|
reducibleLoop1: while (true) {
|
|
array[r1] = arguments[r1];
|
|
value6 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
|
|
if (value6 < length) {
|
|
r1 = value6;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
const fetchArgs_60345 = parseFetchArgs_60345(array);
|
|
const object2 = {args: array};
|
|
object2.fetchData = {method: fetchArgs_60345.method, url: fetchArgs_60345.url};
|
|
object2.startTimestamp = 1000 * (require(7383) /* metro dependency 7383 */).timestampInSeconds();
|
|
object2.virtualError = error;
|
|
error = environment.__proto__;
|
|
reducibleJoin4: while (true) {
|
|
if (env1_0) {
|
|
break reducibleJoin4;
|
|
}
|
|
error = require(7367) /* metro dependency 7367 */;
|
|
triggerHandlers = error.triggerHandlers;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
value9 = Reflect.apply(assign, Object, [{}, object2]);
|
|
Reflect.apply(triggerHandlers, error, ['fetch', value9]);
|
|
break reducibleJoin4;
|
|
}
|
|
const binding = env0_0;
|
|
const apply = binding.apply;
|
|
const GLOBAL_OBJ = (require(7370) /* metro dependency 7370 */).GLOBAL_OBJ;
|
|
error = Reflect.apply(apply, binding, [GLOBAL_OBJ, array]);
|
|
return error.then(_fun60327(), _fun60331);
|
|
}
|
|
|
|
function _fun60335() { // fn#60335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:1155, offset: 0x0170192e, size: 41 bytes, params: 1, frame: 13
|
|
body.cancel().then(null, function() {
|
|
});
|
|
}
|
|
|
|
function _fun60337() { // fn#60337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:1250, offset: 0x01701957, size: 41 bytes, params: 1, frame: 13
|
|
body.cancel().then(null, function() {
|
|
});
|
|
}
|
|
|
|
function _fun60327() { // fn#60327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:561, offset: 0x017016d8, size: 32 bytes, params: 1, frame: 12
|
|
const env0_0 = env3_3(_fun60329);
|
|
return _fun60330;
|
|
}
|
|
|
|
function _fun60331(a0) { // fn#60331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7658:780, offset: 0x01701701, size: 213 bytes, params: 2, frame: 24
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
const moduleValue = require(7367) /* metro dependency 7367 */;
|
|
const triggerHandlers = moduleValue.triggerHandlers;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
const binding = env0_1;
|
|
const object2 = {};
|
|
object2.endTimestamp = 1000 * (require(7383) /* metro dependency 7383 */).timestampInSeconds();
|
|
object2.error = a0;
|
|
Reflect.apply(triggerHandlers, moduleValue, ['fetch', Reflect.apply(assign, Object, [{}, binding, object2])]);
|
|
if ((require(7376) /* metro dependency 7376 */).isError(a0) && a0.stack === undefined) {
|
|
a0.stack = env0_0.stack;
|
|
(require(7375) /* metro dependency 7375 */).addNonEnumerableProperty(a0, 'framesToPop', 1);
|
|
}
|
|
throw a0;
|
|
}
|
|
|