193 lines
6.9 KiB
TypeScript
193 lines
6.9 KiB
TypeScript
/* Metro module 7225; source: lib/uploader/UploaderQueue.tsx; dependencies: [5, 6, 7, 3, 2] */
|
|
function _fun57838(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:6, offset: 0x016b7650, size: 202 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_0 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_1 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_2 = importDefault(7) /* metro dependency 7 */;
|
|
let value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('UploaderQueue.tsx');
|
|
value = _fun57839();
|
|
value = new value();
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('lib/uploader/UploaderQueue.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _fun57839() { // fn#57839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:166, offset: 0x016b771a, size: 96 bytes, params: 1, frame: 17
|
|
const binding = env0_2;
|
|
const closure = UploaderQueue;
|
|
const items2 = [{key: 'enqueue', value: value_57841}];
|
|
const env0_0Binding = env0_0(_fun57843);
|
|
items2[1] = {key: 'drainQueue', value: value_57847};
|
|
return binding(closure, items2);
|
|
}
|
|
|
|
function UploaderQueue() { // fn#57840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:187, offset: 0x016b777a, size: 45 bytes, params: 1, frame: 13
|
|
env1_1(this, UploaderQueue);
|
|
this.queue = [];
|
|
this.drainingQueue = false;
|
|
}
|
|
|
|
function value_57841(a0) { // fn#57841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:294, offset: 0x016b77a7, size: 93 bytes, params: 2, frame: 13
|
|
this.queue.unshift(a0);
|
|
const value = environment.__proto__;
|
|
const binding = env1_3;
|
|
binding.log('enqueue() - alreadying draining? ' + (this.drainingQueue ? 'yes' : 'no'));
|
|
if (!this.drainingQueue) {
|
|
this.drainQueue();
|
|
}
|
|
}
|
|
|
|
function* _fun57843() { // fn#57843, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:473, offset: 0x016b780d, size: 298 bytes, params: 1, frame: 21
|
|
var environment;
|
|
var value4;
|
|
var Promise;
|
|
var prototype;
|
|
var closure;
|
|
var promise;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var id;
|
|
var value9;
|
|
var error;
|
|
var error2;
|
|
var drainQueue;
|
|
if (true) {
|
|
var env0_0;
|
|
this.drainingQueue = true;
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_3;
|
|
var log = binding.log;
|
|
Reflect.apply(log, binding, ['drainQueue() - starting, queue length: ' + this.queue.length]);
|
|
var value3 = this.queue.pop();
|
|
if (value3 == null) {
|
|
env2_3.log('drainQueue() - No uploads left, setting drainingQueue to false');
|
|
this.drainingQueue = false;
|
|
} else {
|
|
reducibleJoin3: while (true) {
|
|
reduciblePort29: while (true) {
|
|
exceptionLanding28: while (true) {
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
break reducibleJoin3;
|
|
}
|
|
binding = env2_3;
|
|
error2 = binding.error;
|
|
Reflect.apply(error2, binding, [error]);
|
|
break reduciblePort29;
|
|
}
|
|
drainQueue = this.drainQueue;
|
|
Reflect.apply(drainQueue, this, []);
|
|
return undefined;
|
|
}
|
|
try {
|
|
log = binding.log;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
Reflect.apply(log, binding, ['drainQueue() - start uploader']);
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
value4 = value3();
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
env0_0 = value4;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
Promise = global.Promise;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
prototype = Promise.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
closure = _fun57844;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
promise = new Promise();
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
value6 = promise instanceof Object ? promise : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
yield value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
log = binding.log;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
id = value4.id;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
value9 = 'drainQueue() Uploader complete - ' + id;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
Reflect.apply(log, binding, [value9]);
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
this.drainQueue();
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun57844(a0) { // fn#57844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:789, offset: 0x016b7937, size: 98 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
if (env0_0._aborted || env0_0._errored) {
|
|
a0();
|
|
}
|
|
env0_0.addListener('complete', _fun57845);
|
|
env0_0.addListener('error', _fun57846);
|
|
}
|
|
|