/* Metro module 7225; source: lib/uploader/UploaderQueue.tsx; dependencies: [5, 6, 7, 3, 2] */ import Logger from '../../modules/debug/Logger.tsx'; /* Metro dependency 3 */ import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */ 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 */ 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}); let value = Logger; value = new value('UploaderQueue.tsx'); value = _fun57839(); value = new value(); (FileImportTrackerModule).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 UploaderQueue2 = UploaderQueue; const items2 = [{key: 'enqueue', value: value_57841}]; const env0_0Binding = Module00005(_fun57843); items2[1] = {key: 'drainQueue', value: value_57847}; return CreateClass(UploaderQueue2, 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); function _fun57845() { // fn#57845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:849, offset: 0x00cefeb4, size: 15 bytes, params: 1, frame: 9 return env0_0(); } function _fun57846() { // fn#57846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:882, offset: 0x00cefeb4, size: 15 bytes, params: 1, frame: 9 return env0_0(); } } } function value_57847() { // fn#57847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7403:986, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13 return Module00005.apply(this, arguments); } } } global.__d(_fun57838, 7225, [5, 6, 7, 3, 2]) /* metro module 7225, dependencies: [5, 6, 7, 3, 2] */;