/* Metro module 9047; source: utils/LazyAPIPromise.tsx; dependencies: [5, 57, 31, 4131, 2] */ import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */ import Module00057 from '../by-id/module-00057.js'; /* Metro dependency 57 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */ function _fun70686(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:6, offset: 0x01d034a3, size: 149 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('utils/LazyAPIPromise.tsx'); exports.default = useLazyAPIPromise; function useLazyAPIPromise(a0, a1) { // fn#70687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:197, offset: 0x01d03538, size: 140 bytes, params: 3, frame: 19 const env0_0 = a0; const env0_1 = a1; let useState = ReactModule.useState; const value2 = Reflect.apply(useState, ReactModule, [false]); const binding2 = env0_3; let value = binding2(value2, 2); const property = value[0]; const env0_2 = value[1]; useState = ReactModule.useState; value = binding2(Reflect.apply(useState, ReactModule, [null]), 2); const property2 = value[0]; var env0_3 = value[1]; return [function() { return _execFn.apply(this, arguments); }, {loading: property, error: property2}]; function _execFn() { // fn#70688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:315, owner: useLazyAPIPromise._execFn, offset: 0x01d035c4, size: 53 bytes, params: 1, frame: 13 var environment; const value = environment.__proto__; return env1_2(_fun70690).apply(this, arguments); function* _fun70690() { // fn#70690, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9232:352, offset: 0x01d03604, size: 183 bytes, params: 1, frame: 17 var moduleValue; var value3; var value4; var binding; var error; var value5; var APIError; var prototype; var value6; var aPIError; var value7; if (false) { return undefined; } value = environment.__proto__.__proto__; env2_2(true); env2_3(null); try { } catch (error) { value5 = environment.__proto__.__proto__.__proto__; binding = env3_0; APIError = binding(env3_1[3]).APIError; prototype = APIError.prototype; value6 = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value7 = aPIError instanceof Object ? aPIError : value6; if (dependencyMap == null) { env2_3(value7); env2_2(false); return null; } dependencyMap(value7); env2_3(value7); env2_2(false); return null; } try { moduleValue = require(); } catch (error) { value5 = environment.__proto__.__proto__.__proto__; binding = env3_0; APIError = binding(env3_1[3]).APIError; prototype = APIError.prototype; value6 = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value7 = aPIError instanceof Object ? aPIError : value6; if (dependencyMap == null) { env2_3(value7); env2_2(false); return null; } dependencyMap(value7); env2_3(value7); env2_2(false); return null; } yield moduleValue; try { value3 = undefined; value4 = false; } catch (error) { value5 = environment.__proto__.__proto__.__proto__; binding = env3_0; APIError = binding(env3_1[3]).APIError; prototype = APIError.prototype; value6 = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value7 = aPIError instanceof Object ? aPIError : value6; if (dependencyMap == null) { env2_3(value7); env2_2(false); return null; } dependencyMap(value7); env2_3(value7); env2_2(false); return null; } if (!value4) { try { binding = env2_2; } catch (error) { value5 = environment.__proto__.__proto__.__proto__; binding = env3_0; APIError = binding(env3_1[3]).APIError; prototype = APIError.prototype; value6 = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value7 = aPIError instanceof Object ? aPIError : value6; if (dependencyMap == null) { env2_3(value7); env2_2(false); return null; } dependencyMap(value7); env2_3(value7); env2_2(false); return null; } try { binding(false); } catch (error) { value5 = environment.__proto__.__proto__.__proto__; binding = env3_0; APIError = binding(env3_1[3]).APIError; prototype = APIError.prototype; value6 = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value7 = aPIError instanceof Object ? aPIError : value6; if (dependencyMap == null) { env2_3(value7); env2_2(false); return null; } dependencyMap(value7); env2_3(value7); env2_2(false); return null; } try { binding = env2_3; } catch (error) { value5 = environment.__proto__.__proto__.__proto__; binding = env3_0; APIError = binding(env3_1[3]).APIError; prototype = APIError.prototype; value6 = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value7 = aPIError instanceof Object ? aPIError : value6; if (dependencyMap == null) { env2_3(value7); env2_2(false); return null; } dependencyMap(value7); env2_3(value7); env2_2(false); return null; } try { binding(null); } catch (error) { value5 = environment.__proto__.__proto__.__proto__; binding = env3_0; APIError = binding(env3_1[3]).APIError; prototype = APIError.prototype; value6 = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value7 = aPIError instanceof Object ? aPIError : value6; if (dependencyMap == null) { env2_3(value7); env2_2(false); return null; } dependencyMap(value7); env2_3(value7); env2_2(false); return null; } } return value3; } } } } global.__d(_fun70686, 9047, [5, 57, 31, 4131, 2]) /* metro module 9047, dependencies: [5, 57, 31, 4131, 2] */;