/* Metro module 15918; source: modules/stickers/useLoadGuildStickerWithCreator.tsx; dependencies: [5, 57, 31, 1878, 6584, 566, 11050, 2] */ function _fun122789(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:6, offset: 0x02575160, size: 181 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_2 = importDefault(5) /* metro dependency 5 */; const env0_3 = importDefault(57) /* metro dependency 57 */; const env0_4 = importAll(31) /* metro dependency 31 */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const guildStickersStore = importDefault(6584) /* metro dependency 6584: GuildStickersStore */; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/useLoadGuildStickerWithCreator.tsx'); exports.default = useLoadGuildStickersWithCreator; } function useLoadGuildStickersWithCreator(a0) { // fn#122790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:241, offset: 0x02575215, size: 187 bytes, params: 2, frame: 18 var r0; let env0_0 = a0; const binding = env0_4; let [property, env0_1] = env0_3(binding.useState('loading'), 2); const fluxModule = require(566) /* metro dependency 566: flux */; const useStateFromStores = fluxModule.useStateFromStores; let object = [GuildStickersStore]; const stickersByGuildId = Reflect.apply(useStateFromStores, fluxModule, [object, _fun122791]); binding.useEffect(function() { var AbortController = global.AbortController; var value2 = new AbortController(); var env0_0 = value2; var env0_1 = value2.signal; _fun122793()(); return _fun122797; }, [a0]); if (property === 'success') { object = {status: property}; object.stickers = stickersByGuildId.map(function(a0) { var r0; var object; var value = a0; var value3 = UserStore.getUser(value.user_id); if (value3 == null) { r0 = value; } else { object = {}; copyDataProperties(object, value, value3); object['user'] = value3; r0 = object; } return r0; }); r0 = object; } else { r0 = {status: property}; } return r0; } function _fun122791() { // fn#122791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:370, offset: 0x025752d0, size: 27 bytes, params: 1, frame: 11 return GuildStickersStore.getStickersByGuildId(env0_0); } function _fun122792() { // fn#122792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:422, offset: 0x025752eb, size: 70 bytes, params: 1, frame: 10 const AbortController = global.AbortController; const env0_1 = new AbortController().signal; _fun122793()(); return _fun122797; } function _fun122793() { // fn#122793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:466, offset: 0x02575331, size: 36 bytes, params: 1, frame: 12 const env0_0 = env2_2(_fun122795); return _fun122796; } function _fun122797() { // fn#122797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:666, offset: 0x025753e1, size: 43 bytes, params: 1, frame: 11 env1_1('loading'); const binding = env0_0; if (binding != null) { binding.abort(); } } function* _fun122795() { // fn#122795, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:486, offset: 0x02575360, size: 129 bytes, params: 1, frame: 17 var binding; var binding2; var property; var fetchGuildStickersWithCreator; var value5; var error; if (true) { value = environment.__proto__.__proto__.__proto__.__proto__; try { binding = env4_0; } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } try { binding2 = env4_1; } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } try { property = binding2[6]; } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } try { value = binding(property); } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } try { fetchGuildStickersWithCreator = value.fetchGuildStickersWithCreator; } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } try { } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } try { binding = env2_1; } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } try { value = Reflect.apply(fetchGuildStickersWithCreator, value, [require, binding]); } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } yield value; try { value = undefined; value5 = false; } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } if (value5) { return value; } try { } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } try { dependencyMap('success'); } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; return undefined; } try { env2_0 = null; } catch (error) { value = environment.__proto__.__proto__.__proto__; dependencyMap('error'); value = environment.__proto__.__proto__; env2_0 = null; } } }