161 lines
7.5 KiB
TypeScript
161 lines
7.5 KiB
TypeScript
/* Metro module 12370; source: modules/network/networkAwareRetry.tsx; dependencies: [5, 1226, 4041, 1458, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun94298(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12556:6, offset: 0x0211314b, size: 145 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/network/networkAwareRetry.tsx');
|
|
exports.default = function() {
|
|
return _networkAwareRetry.apply(this, arguments);
|
|
};
|
|
function _networkAwareRetry() { // fn#94299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12556:121, offset: 0x021131dc, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun94301).apply(this, arguments);
|
|
async function _fun94301(a0) { // fn#94301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12556:180, offset: 0x02113222, size: 348 bytes, params: 2, frame: 26
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var error;
|
|
var value10;
|
|
var timeoutPromise;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var awaitOnline;
|
|
var value14;
|
|
var value15;
|
|
var value16;
|
|
var Error;
|
|
var prototype;
|
|
let value = a1;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
const r1 = value !== undefined ? value : 3;
|
|
await undefined;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_4;
|
|
let getId = binding.getId;
|
|
const value5 = Reflect.apply(getId, binding, []);
|
|
const value6 = 0;
|
|
if (!(value6 < r1)) {
|
|
throw new global.Error('Unreachable code in networkAwareRetry');
|
|
}
|
|
let r16 = value6;
|
|
exceptionMain6: while (true) {
|
|
try {
|
|
value7 = a0();
|
|
} catch (error) {
|
|
while (true) {
|
|
if (r16 + 1 >= r1) {
|
|
throw error;
|
|
}
|
|
binding = env2_0;
|
|
value10 = binding(env2_2[2]);
|
|
timeoutPromise = value10.timeoutPromise;
|
|
await Reflect.apply(timeoutPromise, value10, [2000 * (r16 + 1)]);
|
|
value11 = undefined;
|
|
value12 = false;
|
|
if (value12) {
|
|
return value11;
|
|
}
|
|
binding = env2_1;
|
|
value13 = binding(env2_2[3]);
|
|
awaitOnline = value13.awaitOnline;
|
|
await Reflect.apply(awaitOnline, value13, []);
|
|
value14 = undefined;
|
|
value15 = false;
|
|
if (value15) {
|
|
return value14;
|
|
}
|
|
binding = env2_4;
|
|
getId = binding.getId;
|
|
if (value5 !== Reflect.apply(getId, binding, [])) {
|
|
Error = global.Error;
|
|
prototype = Error.prototype;
|
|
value = Object.create(prototype, {constructor: {value: Error}});
|
|
error = new Error('User changed.');
|
|
value = error instanceof Object ? error : value;
|
|
throw value;
|
|
}
|
|
value16 = typeof r16 === 'bigint' ? r16 + 1n : +r16 + 1;
|
|
if (!(value16 < r1)) {
|
|
Error = global.Error;
|
|
prototype = Error.prototype;
|
|
value = Object.create(prototype, {constructor: {value: Error}});
|
|
error = new Error('Unreachable code in networkAwareRetry');
|
|
value = error instanceof Object ? error : value;
|
|
throw value;
|
|
}
|
|
r16 = value16;
|
|
break;
|
|
continue exceptionMain6;
|
|
}
|
|
}
|
|
await value7;
|
|
try {
|
|
value8 = undefined;
|
|
value9 = false;
|
|
} catch (error) {
|
|
while (true) {
|
|
if (r16 + 1 >= r1) {
|
|
throw error;
|
|
}
|
|
binding = env2_0;
|
|
value10 = binding(env2_2[2]);
|
|
timeoutPromise = value10.timeoutPromise;
|
|
await Reflect.apply(timeoutPromise, value10, [2000 * (r16 + 1)]);
|
|
value11 = undefined;
|
|
value12 = false;
|
|
if (value12) {
|
|
return value11;
|
|
}
|
|
binding = env2_1;
|
|
value13 = binding(env2_2[3]);
|
|
awaitOnline = value13.awaitOnline;
|
|
await Reflect.apply(awaitOnline, value13, []);
|
|
value14 = undefined;
|
|
value15 = false;
|
|
if (value15) {
|
|
return value14;
|
|
}
|
|
binding = env2_4;
|
|
getId = binding.getId;
|
|
if (value5 !== Reflect.apply(getId, binding, [])) {
|
|
Error = global.Error;
|
|
prototype = Error.prototype;
|
|
value = Object.create(prototype, {constructor: {value: Error}});
|
|
error = new Error('User changed.');
|
|
value = error instanceof Object ? error : value;
|
|
throw value;
|
|
}
|
|
value16 = typeof r16 === 'bigint' ? r16 + 1n : +r16 + 1;
|
|
if (!(value16 < r1)) {
|
|
Error = global.Error;
|
|
prototype = Error.prototype;
|
|
value = Object.create(prototype, {constructor: {value: Error}});
|
|
error = new Error('Unreachable code in networkAwareRetry');
|
|
value = error instanceof Object ? error : value;
|
|
throw value;
|
|
}
|
|
r16 = value16;
|
|
break;
|
|
continue exceptionMain6;
|
|
}
|
|
}
|
|
return value9 ? value8 : value8;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun94298, 12370, [5, 1226, 4041, 1458,
|
|
2]) /* metro module 12370, dependencies: [5, 1226, 4041, 1458, 2] */;
|