/* Metro module 1027; source: unknown; dependencies: [] */ function _fun10710(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#10710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1154:6, offset: 0x00d9432c, size: 133 bytes, params: 8, frame: 5 const closure = function() { }; const closure2 = exports_10712; const reject_10717 = function(a0, a1) { a0._65 = 2; a0._55 = a1; if (exports_10712._87) { exports_10712._87(a0, a1); } finale_10718(a0); }; const Handler_10719 = function(a0, a1, a2) { var value = a0; var value2 = a1; var value3 = null; this.onFulfilled = typeof value !== 'function' ? value3 : value; this.onRejected = typeof value2 !== 'function' ? value3 : value2; this.promise = a2; }; const env0_1 = {}; module.exports = closure2; closure2._37 = null; closure2._87 = null; closure2._61 = closure; closure2.prototype.then = then_10723; } function exports_10712(a0) { // fn#10712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1154:78, offset: 0x00d943b1, size: 155 bytes, params: 2, frame: 13 if (typeof this !== 'object') { throw new global.TypeError('Promises must be constructed via new'); } if (typeof a0 !== 'function') { throw new global.TypeError("Promise constructor's argument is not a function"); } this._40 = 0; this._65 = 0; this._55 = null; this._72 = null; if (a0 !== _61) { doResolve_10720(a0, this); } } function handle_10713(a0, a1) { // fn#10713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1154:357, offset: 0x00d9444c, size: 206 bytes, params: 3, frame: 15 var r3; var r2; var r0; var _55; const value = a0; let _65 = value._65; if (_65 !== 3) { r2 = value; } else { r3 = value; reducibleLoop1: while (true) { _55 = r3._55; _65 = _55._65; if (_65 === 3) { r3 = _55; continue reducibleLoop1; } r2 = _55; break reducibleLoop1; } } let _37 = exports_10712._37; reducibleJoin4: while (true) { if (_37) { exports_10712Binding = exports_10712; _37 = exports_10712Binding._37; Reflect.apply(_37, exports_10712Binding, [r2]); break reducibleJoin4; } break reducibleJoin4; } if (r2._65 === 0) { if (r2._40 === 0) { r2._40 = 1; r2._72 = a1; r0 = undefined; } else if (r2._40 === 1) { r2._40 = 2; r2._72 = [r2._72, a1]; r0 = undefined; } else { r2._72.push(a1); r0 = undefined; } return r0; } ((a0, a1) => { var env0_0 = a0; var env0_1 = a1; global.setImmediate(_fun10715); })(r2, a1); } function resolve_10716(a0, a1) { // fn#10716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1154:856, offset: 0x00d9463b, size: 252 bytes, params: 3, frame: 15 var r4; var value; var then; var error; var binding; if (a1 === a0) { reject_10717(a0, new global.TypeError('A promise cannot be resolved with itself.')); } else { if (a1) { value = typeof a1; if (value === 'object') { try { then = a1.then; r4 = then; } catch (error) { value = environment; env0_0 = error; binding = env0_1; r4 = binding; } if (r4 === env0_1) { reject_10717(a0, env0_0); return undefined; } then = a0.then; if (r4 !== then) { if (typeof r4 === 'function') { doResolve_10720(r4.bind(a1), a0); return undefined; } a0._65 = 1; a0._55 = a1; finale_10718(a0); return undefined; } if (a1 instanceof exports_10712) { a0._65 = 3; a0._55 = a1; finale_10718(a0); return undefined; } if (typeof r4 === 'function') { doResolve_10720(r4.bind(a1), a0); return undefined; } a0._65 = 1; a0._55 = a1; value = environment; finale_10718(a0); return undefined; } if (value !== 'function') { a0._65 = 1; a0._55 = a1; finale_10718(a0); return undefined; } try { then = a1.then; r4 = then; } catch (error) { value = environment; env0_0 = error; binding = env0_1; r4 = binding; } if (r4 === env0_1) { reject_10717(a0, env0_0); return undefined; } then = a0.then; if (r4 !== then) { if (typeof r4 === 'function') { doResolve_10720(r4.bind(a1), a0); return undefined; } a0._65 = 1; a0._55 = a1; finale_10718(a0); return undefined; } if (a1 instanceof exports_10712) { a0._65 = 3; a0._55 = a1; finale_10718(a0); return undefined; } if (typeof r4 === 'function') { doResolve_10720(r4.bind(a1), a0); return undefined; } a0._65 = 1; a0._55 = a1; finale_10718(a0); return undefined; } a0._65 = 1; a0._55 = a1; finale_10718(a0); } } function finale_10718(a0) { // fn#10718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1154:1348, offset: 0x00d94779, size: 133 bytes, params: 2, frame: 15 var r4; var value; var handle_10713Binding; var _72; var length; var value2; reducibleJoin2: while (true) { if (a0._40 !== 1) { break reducibleJoin2; } value = environment; handle_10713Binding = handle_10713; _72 = a0._72; handle_10713Binding(a0, _72); a0._72 = null; break reducibleJoin2; } reducibleJoin6: while (true) { if (a0._40 !== 2) { break reducibleJoin6; } _72 = a0._72; length = _72.length; value = 0; value2 = environment; if (value < length) { r4 = value; reducibleLoop4: while (true) { handle_10713Binding = handle_10713; _72 = a0._72; handle_10713Binding(a0, _72[r4]); value = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1; _72 = a0._72; length = _72.length; if (value < length) { r4 = value; continue reducibleLoop4; } break reducibleLoop4; } } a0._72 = null; break reducibleJoin6; } } function doResolve_10720(a0, a1) { // fn#10720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1154:1611, offset: 0x00d947fe, size: 112 bytes, params: 3, frame: 15 var environment; var r4; var value; var error; var value2; var binding; let env0_0 = a1; const env0_1 = false; try { value = undefined; a0(_fun10721, _fun10722); r4 = value; } catch (error) { value2 = environment; env0_0 = error; binding = env0_1; r4 = binding; } if (!(env0_1 || r4 !== env0_1)) { reject_10717(a1, env0_0); } return value; } function then_10723(a0, a1) { // fn#10723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1154:1907, offset: 0x00d9486e, size: 118 bytes, params: 3, frame: 17 if (this.constructor !== exports_10712) { return ((a0, a1, a2) => { var env0_0 = a0; var env0_1 = a1; var env0_2 = a2; var constructor = a0.constructor; var value = Object.create(constructor.prototype, {constructor: {value: constructor}}); var value2 = new constructor(_fun10725); return value2 instanceof Object ? value2 : value; })(this, a0, a1); } const exports_107122 = new exports_10712(_61); handle_10713(this, new Handler_10719(a0, a1, exports_107122)); return exports_107122; } function handle_10713HandleResolved(a0, a1) { // fn#10714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1154:546, owner: handle_10713.handleResolved, offset: 0x00d9451a, size: 38 bytes, params: 3, frame: 11 const env0_0 = a0; const env0_1 = a1; global.setImmediate(_fun10715); } function then_10723SafeThen(a0, a1, a2) { // fn#10724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1154:1958, owner: then_10723.safeThen, offset: 0x00d948e4, size: 55 bytes, params: 4, frame: 11 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; let constructor = a0.constructor; const value = Object.create(constructor.prototype, {constructor: {value: constructor}}); constructor = new constructor(_fun10725); return constructor instanceof Object ? constructor : value; } function _fun10715() { // fn#10715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1154:589, offset: 0x00d94540, size: 251 bytes, params: 1, frame: 15 var r5; var value2; var value3; var value4; var error; var value5; var binding; var value6; const r4 = env0_0._65 === 1 ? require.onFulfilled : require.onRejected; if (r4 !== null) { try { value4 = r4(env0_0._55); r5 = value4; } catch (error) { value5 = environment.__proto__.__proto__; env2_0 = error; binding = env2_1; r5 = binding; } value6 = environment.__proto__.__proto__; if (r5 === env2_1) { reject_10717(require.promise, env2_0); } else { resolve_10716(require.promise, r5); } } else if (env0_0._65 === 1) { value3 = environment.__proto__.__proto__; resolve_10716(require.promise, env0_0._55); } else { value2 = environment.__proto__.__proto__; reject_10717(require.promise, env0_0._55); } }