/* Metro module 15204; source: stores/WebhooksStore.tsx; dependencies: [6, 7, 15, 17, 18, 15205, 22, 566, 694, 2] */ function _fun116274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15401:6, offset: 0x02483b02, size: 352 bytes, params: 8, frame: 19 const fetchingKey = function(a0, a1) { return '' + a0 + ':' + (a1 ?? 'guild'); }; const closure = WEBHOOK_CREATE; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_2 = importDefault(6) /* metro dependency 6 */; const env0_3 = importDefault(7) /* metro dependency 7 */; const env0_4 = importDefault(15) /* metro dependency 15 */; const env0_5 = importDefault(17) /* metro dependency 17 */; const env0_6 = importDefault(18) /* metro dependency 18 */; const env0_8 = {}; const env0_9 = {}; const Store = (importDefault(566) /* metro dependency 566: flux */).Store; let value = _fun116281(Store); value.displayName = 'WebhooksStore'; value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {WEBHOOKS_UPDATE: WEBHOOKS_UPDATE, WEBHOOKS_FETCHING: WEBHOOKS_FETCHING, WEBHOOK_CREATE: closure, WEBHOOK_UPDATE: closure, WEBHOOK_DELETE: function({guildId, webhookId}) { delete getOrCreateGuild(guildId)[webhookId]; }}); (require(2) /* metro dependency 2 */).fileFinishedImporting('stores/WebhooksStore.tsx'); exports.default = value; } function _isNativeReflectConstruct_116275() { // fn#116275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15401:148, offset: 0x02483c62, size: 98 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_116275_isNativeReflectConstruct = function() { return !!result; })(); } function getOrCreateGuild(a0) { // fn#116279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15401:423, offset: 0x02483cf2, size: 40 bytes, params: 2, frame: 4 if (env0_8[a0] == null) { env0_8[a0] = {}; } return env0_8[a0]; } function WEBHOOK_CREATE({guildId, webhook}) { // fn#116280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15401:486, offset: 0x02483d1a, size: 39 bytes, params: 2, frame: 12 getOrCreateGuild(guildId)[webhook.id] = webhook; } function _fun116281(a0) { // fn#116281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15401:578, offset: 0x02483d41, size: 151 bytes, params: 2, frame: 16 const closure = WebhooksStore; env0_6(closure, a0); return env0_3(closure, [{key: 'isFetching', value: value_116283}, {key: 'getWebhooksForGuild', value: function(a0) { return importDefault(dependencyMap[6]).values(getOrCreateGuild(a0)); }}, {key: 'getWebhooksForChannel', value: value_116285}, {key: 'error', get: get_116287}]); } function WEBHOOKS_UPDATE({guildId, channelId, webhooks, error}) { // fn#116288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15401:1270, offset: 0x02483e9b, size: 293 bytes, params: 2, frame: 19 var r6; var binding; if (webhooks != null) { r6 = channelId == null ? [] : (importDefault(22) /* metro dependency 22 */)(getOrCreateGuild(guildId)).values().filter(function({channel_id}) { return channel_id !== channelId; }).value(); binding = env0_8; binding[guildId] = {}; r6.concat(webhooks).forEach(_fun116290); binding = env0_9; delete binding[fetchingKey(guildId, channelId)]; } else if (error != null) { delete env0_9[fetchingKey(guildId, channelId)]; } else if (channelId != null && env0_8[guildId] != null) { (importDefault(15205) /* metro dependency 15205: WebhooksActionCreators */).fetchForChannel(guildId, channelId); } } function WEBHOOKS_FETCHING({guildId, channelId}) { // fn#116291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15401:1662, offset: 0x02483fea, size: 40 bytes, params: 2, frame: 14 env0_9[fetchingKey(guildId, channelId)] = true; } function value_116283(a0, a1) { // fn#116283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15401:873, offset: 0x02483dd8, size: 37 bytes, params: 3, frame: 14 return env1_9[fetchingKey(a0, a1)] != null; } function value_116285(a0, a1) { // fn#116285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15401:1047, offset: 0x02483e2e, size: 88 bytes, params: 3, frame: 13 var environment; const env0_0 = a1; let value = environment.__proto__; value = (importDefault(22) /* metro dependency 22 */)(getOrCreateGuild(a0)); value = value.values(); value = value.filter(function({channel_id}) { return channel_id === require; }); return value.value(); } function _fun116290(a0) { // fn#116290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15401:1496, offset: 0x02483fd5, size: 21 bytes, params: 2, frame: 3 env0_1[a0.id] = a0; return a0; }