/* Metro module 4234; source: modules/applications/ApplicationStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 4235, 566, 694, 2] */ 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 PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */ import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */ import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */ import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */ import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import ApplicationRecord from '../../records/ApplicationRecord.tsx'; /* Metro dependency 4235 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ function _fun34946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#34946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:6, offset: 0x01066bcf, size: 847 bytes, params: 8, frame: 22 const _arrayLikeToArray_34952 = function(a0, a1) { var r0; var r1; var r2; var value3; var length; var value5; var value = undefined; var value2 = value == null; reducibleJoin2: while (true) { if (value2) { r0 = value2; break reducibleJoin2; } value3 = value > a0.length; r0 = value3; break reducibleJoin2; } reducibleJoin4: while (true) { if (r0) { length = a0.length; r1 = length; break reducibleJoin4; } r1 = value; break reducibleJoin4; } value = (0, global.Array)(r1); var value4 = 0; if (value4 < r1) { r2 = value4; reducibleLoop5: while (true) { value[r2] = a0[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (value5 < r1) { r2 = value5; continue reducibleLoop5; } break reducibleLoop5; } } return value; }; const WISHLIST_FETCH_SUCCESS2 = WISHLIST_FETCH_SUCCESS; const closure2 = function({applications}) { var r1; var value4; if (applications.length === 0) { return false; } var value2 = _createForOfIteratorHelperLoose_34950(applications); var value3 = value2(); if (!value3.done) { r1 = value3; reducibleLoop2: while (true) { applications = r1.value; addApplication(ApplicationRecord.createFromServer(applications)); value4 = value2(); if (value4.done) { break reducibleLoop2; } r1 = value4; continue reducibleLoop2; } } return true; }; const closure3 = function({entitlements}) { var r2; var r3; var r9; var r0; var application; var value6; var value7; var _createForOfIteratorHelperLoose_34950Binding = _createForOfIteratorHelperLoose_34950; var value2 = undefined; var value3 = _createForOfIteratorHelperLoose_34950Binding(entitlements); var value4 = value3(); var value5 = false; if (value4.done) { r0 = value5; } else { r2 = value5; r3 = value4; while (true) { entitlements = r3.value.sku; if (entitlements == null) { r9 = value2; } else { application = entitlements.application; r9 = application; } if (r9 == null) { continue; } addApplication(ApplicationRecord.createFromServer(entitlements.application)); value6 = true; r2 = value6; value7 = value3(); if (value7.done) { r0 = r2; break; } r3 = value7; continue; } } return r0; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_7 = []; let Map = global.Map; let map = new Map(); Map = global.Map; map = new Map(); Map = global.Map; map = new Map(); Map = global.Map; map = new Map(); Map = global.Map; map = new Map(); const Set = global.Set; let set = new Set(); object = {botUserIdToAppUsage: {}}; const PersistedStore = (Flux).PersistedStore; set = _fun34960(PersistedStore); set.displayName = 'ApplicationStore'; set.persistKey = 'ApplicationStore'; set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_34975, OVERLAY_INITIALIZE: function({applications}) { var r2; var addApplicationBinding; var value5; var value7; var value2 = _createForOfIteratorHelperLoose_34950(applications); var value3 = value2(); if (!value3.done) { for (r2 = value3; true; r2 = value7) { applications = r2.value; addApplicationBinding = addApplication; value5 = new ApplicationRecord(applications); addApplicationBinding(value5); value7 = value2(); if (value7.done) { break; } } } }, APPLICATION_FETCH: APPLICATION_FETCH, APPLICATION_FETCH_SUCCESS: APPLICATION_FETCH_SUCCESS, APPLICATION_FETCH_FAIL: APPLICATION_FETCH_FAIL, APPLICATIONS_FETCH: APPLICATIONS_FETCH, APPLICATIONS_FETCH_SUCCESS: APPLICATIONS_FETCH_SUCCESS, APPLICATIONS_FETCH_FAIL: APPLICATIONS_FETCH_FAIL, APPLICATION_UPDATE: function({application}) { updateApplication(application); }, APPLICATION_SUBSCRIPTIONS_FETCH_ENTITLEMENTS_SUCCESS: closure3, ENTITLEMENTS_FETCH_FOR_USER_SUCCESS: closure3, ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS: closure3, GUILD_APPLICATIONS_FETCH_SUCCESS: GUILD_APPLICATIONS_FETCH_SUCCESS, BILLING_PAYMENTS_FETCH_SUCCESS: BILLING_PAYMENTS_FETCH_SUCCESS, PAYMENT_UPDATE: function({payment}) { var sku = payment.sku; var value = undefined; if ((sku == null ? value : sku.application) == null) { return false; } addApplication(ApplicationRecord.createFromServer(payment.sku.application)); return value; }, INVITE_RESOLVE_SUCCESS: INVITE_RESOLVE_SUCCESS_34987, GIFT_CODE_RESOLVE_SUCCESS: function({giftCode}) { var store_listing = giftCode.store_listing; var value = undefined; if ((store_listing == null ? value : store_listing.sku.application) == null) { return false; } addApplication(ApplicationRecord.createFromServer(giftCode.store_listing.sku.application)); return value; }, LIBRARY_FETCH_SUCCESS: function({libraryApplications}) { var r2; var value4; var value2 = _createForOfIteratorHelperLoose_34950(libraryApplications); var value3 = value2(); if (!value3.done) { for (r2 = value3; true; r2 = value4) { libraryApplications = r2.value; addApplication(ApplicationRecord.createFromServer(libraryApplications.application)); value4 = value2(); if (value4.done) { break; } } } }, STORE_LISTING_FETCH_SUCCESS: STORE_LISTING_FETCH_SUCCESS, LOAD_MESSAGES_SUCCESS: function({messages}) { messages.forEach(_fun34992); }, USER_PROFILE_FETCH_SUCCESS: USER_PROFILE_FETCH_SUCCESS, APP_DM_OPEN: APP_DM_OPEN, USER_AUTHORIZED_APPS_UPDATE: USER_AUTHORIZED_APPS_UPDATE, LOAD_NOTIFICATION_CENTER_ITEMS_SUCCESS: function({items}) { items.forEach(_fun34999); }, OAUTH2_TOKEN_CREATE: OAUTH2_TOKEN_CREATE, WISHLIST_FETCH_SUCCESS: WISHLIST_FETCH_SUCCESS2, WISHLIST_ADD_SKU_SUCCESS: WISHLIST_FETCH_SUCCESS2, WISHLIST_REMOVE_SKU_SUCCESS: WISHLIST_FETCH_SUCCESS2, SOCIAL_LAYER_STOREFRONT_LOAD_SUCCESS: function(a0) { var application = a0.storefront.application; if (application == null) { return false; } addApplication(application); }, WISHLIST_RECOMMENDATIONS_FETCH_SUCCESS: WISHLIST_RECOMMENDATIONS_FETCH_SUCCESS, APPLICATION_WIDGET_CONFIG_FEATURED_FETCH_SUCCESS: closure2, APPLICATION_WIDGET_CONFIG_DEVELOPER_FETCH_SUCCESS: closure2, APPLICATION_WIDGET_CONFIG_FETCH_SUCCESS: closure2}); (FileImportTrackerModule).fileFinishedImporting('modules/applications/ApplicationStore.tsx'); exports.default = set; function _isNativeReflectConstruct_34947() { // fn#34947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:186, offset: 0x01066f1e, size: 94 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_34947_isNativeReflectConstruct = function() { return !!result; })(); } function _createForOfIteratorHelperLoose_34950(a0, a1) { // fn#34950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:379, offset: 0x01066f7c, size: 370 bytes, params: 3, frame: 20 var r6; var r9; var r5; var value3; var regexp; const env0_0 = a0; const Symbol = global.Symbol; let value = typeof Symbol !== 'undefined'; let r1 = value && a0[global.Symbol.iterator]; r1 = !r1 ? a0['@@iterator'] : r1; if (r1) { value = r1.call(a0); return value.next.bind(value); } const Array = global.Array; if (Array.isArray(a0)) { if (r1) { } return _fun34951; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_34952(a0, value); r5 = value; } else { value3 = ({}).toString.call(a0).slice(8, -1); r6 = value3 === 'Object' && a0.constructor; r9 = r6 ? a0.constructor.name : value3; if (r9 === 'Map') { r6 = global.Array.from(a0); } else if (r9 === 'Set') { r6 = global.Array.from(a0); } else if (r9 === 'Arguments') { value = _arrayLikeToArray_34952(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_34952(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun34951; } const TypeError = global.TypeError; throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); function _fun34951() { // fn#34951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:950, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5 return CreateClass >= env0_0.length ? {done: true} : {done: false, value: env0_0[typeof CreateClass === 'bigint' ? CreateClass : +CreateClass]}; } } function addApplication(a0) { // fn#34953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:1385, offset: 0x010670ee, size: 347 bytes, params: 2, frame: 20 var r5; var r4; var r3; var mergeFromApplicationUpdate; var value4; var value7; var value8; var value9; var value10; var value11; var application; var addApplicationBinding; var applicationRecordBinding; var createFromServer; var fromServer; var value12; const value = a0; let binding = env0_8; const get = binding.get; let id = value.id; const value3 = Reflect.apply(get, binding, [id]); binding = env0_11; let set = binding.set; id = value.id; const Date = global.Date; Reflect.apply(set, binding, [id, Date.now()]); reducibleJoin2: while (true) { if (value3 == null) { r5 = value; break reducibleJoin2; } mergeFromApplicationUpdate = value3.mergeFromApplicationUpdate; value4 = Reflect.apply(mergeFromApplicationUpdate, value3, [value]); r5 = value4; break reducibleJoin2; } binding = env0_8; binding.set(value.id, r5); binding = env0_10; set = binding.set; const name = value.name; let toLowerCase = name.toLowerCase; Reflect.apply(set, binding, [Reflect.apply(toLowerCase, name, []), r5]); const value5 = _createForOfIteratorHelperLoose_34950(value.aliases); const value6 = value5(); let done = value6.done; if (!done) { r4 = value6; reducibleLoop3: while (true) { value7 = r4.value; binding = env0_10; set = binding.set; toLowerCase = value7.toLowerCase; Reflect.apply(set, binding, [Reflect.apply(toLowerCase, value7, []), r5]); value8 = value5(); done = value8.done; if (done) { break reducibleLoop3; } r4 = value8; continue reducibleLoop3; } } let linkedGames = value.linkedGames; reducibleJoin12: while (true) { if (linkedGames == null) { break reducibleJoin12; } _createForOfIteratorHelperLoose_34950Binding = _createForOfIteratorHelperLoose_34950; linkedGames = value.linkedGames; value9 = _createForOfIteratorHelperLoose_34950Binding(linkedGames); value10 = value9(); done = value10.done; if (done) { break reducibleJoin12; } r4 = value10; reducibleLoop6: while (true) { value11 = r4.value; application = value11.application; reducibleJoin11: while (true) { if (application == null) { break reducibleJoin11; } addApplicationBinding = addApplication; application = value11.application; applicationRecordBinding = ApplicationRecord; if (application instanceof applicationRecordBinding) { application = value11.application; r3 = application; } else { applicationRecordBinding = ApplicationRecord; createFromServer = applicationRecordBinding.createFromServer; application = value11.application; fromServer = Reflect.apply(createFromServer, applicationRecordBinding, [application]); r3 = fromServer; } addApplicationBinding(r3); break reducibleJoin11; } value12 = value9(); done = value12.done; if (done) { break reducibleJoin12; } r4 = value12; continue reducibleLoop6; } } env0_12.delete(value.id); } function WISHLIST_ADD_SKU_SUCCESS({wishlistData}) { // fn#34954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:1899, offset: 0x01067249, size: 93 bytes, params: 2, frame: 14 var r2; var value; var value2; var value3; var done; var addApplicationBinding; var value4; var value5; const applications = wishlistData.applications; if (applications != null) { reducibleJoin5: while (true) { if (applications.length !== 0) { value = environment; value2 = _createForOfIteratorHelperLoose_34950(applications); value3 = value2(); done = value3.done; if (!done) { r2 = value3; reducibleLoop3: while (true) { addApplicationBinding = addApplication; value4 = r2.value; addApplicationBinding(value4); value5 = value2(); done = value5.done; if (done) { break reducibleLoop3; } r2 = value5; continue reducibleLoop3; } } return undefined; } break reducibleJoin5; } } return false; } function updateApplication(a0) { // fn#34955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:2084, offset: 0x010672a6, size: 34 bytes, params: 2, frame: 12 addApplication(ApplicationRecord.createFromServer(a0)); } function handleAppWithBot({userId, applicationId}) { // fn#34956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:2152, offset: 0x010672c8, size: 325 bytes, params: 2, frame: 21 var r0; var r3; var r2; var object; var value6; var property2; var value7; var value10; let botUserIdToAppUsage = env0_14.botUserIdToAppUsage; let property = botUserIdToAppUsage[userId]; botUserIdToAppUsage = env0_14.botUserIdToAppUsage; if (property == null) { object = {applicationId: applicationId}; object.lastUsedMs = global.Date.now(); r0 = object; } else { r0 = {applicationId: applicationId, lastUsedMs: property.lastUsedMs}; } botUserIdToAppUsage[userId] = r0; const Map = global.Map; const map = new Map(); const Object = global.Object; const value4 = Object.entries(env0_14.botUserIdToAppUsage); let length = value4.length; if (0 < length) { for (r3 = 0; true; r3 = value7) { property = value4[r3]; value6 = Module00057(property, 2); property = value6[0]; property2 = value6[1]; map.set(property, property2); value7 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1; length = value4.length; if (!(value7 < length)) { break; } } } const Array = global.Array; const value9 = Array.from(map.entries()).sort(function(a0, a1) { return a1[1].lastUsedMs - a0[1].lastUsedMs; }); length = value9.length; if (0 < length) { r2 = 0; while (true) { if (r2 >= 10) { property = value9[r2][0]; botUserIdToAppUsage = env0_14.botUserIdToAppUsage; delete botUserIdToAppUsage[property]; } value10 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; length = value9.length; if (value10 < length) { r2 = value10; continue; } break; } } } function _fun34960(a0) { // fn#34960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:3099, offset: 0x0106750e, size: 354 bytes, params: 2, frame: 16 const ApplicationStore2 = ApplicationStore; Inherits(ApplicationStore2, a0); return CreateClass(ApplicationStore2, [{key: 'initialize', value: value_34962}, {key: 'getState', value: value_34963}, {key: '_getAllApplications', value: value_34964}, {key: 'getGuildApplication', value: value_34965}, {key: 'getGuildApplicationIds', value: value_34966}, {key: 'getApplication', value: value_34967}, {key: 'getApplicationByName', value: value_34968}, {key: 'getApplicationLastUpdated', value: value_34969}, {key: 'isFetchingApplication', value: value_34970}, {key: 'isHydrated', value: value_34971}, {key: 'didFetchingApplicationFail', value: value_34972}, {key: 'getFetchingOrFailedFetchingIds', value: value_34973}, {key: 'getAppIdForBotUserId', value: value_34974}]); function ApplicationStore() { // fn#34961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:3111, offset: 0x00f81779, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_0(this, ApplicationStore); const value3 = env1_3(ApplicationStore); return env1_2(this, _isNativeReflectConstruct_34947() ? global.Reflect.construct(value3, arguments, env1_3(this).constructor) : value3.apply(this, arguments)); } function value_34962(a0) { // fn#34962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:3409, offset: 0x01067670, size: 162 bytes, params: 2, frame: 15 var r6; var r10; var botUserIdToAppUsage; var value; var propertyName; var propertyName2; var botUserIdToAppUsage2; var property; var applicationId; var lastUsedMs; var value2; var length; var value3; var value4; var value5; var botUserIdToAppUsage3; if (a0 != null) { botUserIdToAppUsage = a0.botUserIdToAppUsage; if (typeof botUserIdToAppUsage === 'object') { botUserIdToAppUsage = a0.botUserIdToAppUsage; value = environment.__proto__; for (propertyName in botUserIdToAppUsage) { botUserIdToAppUsage2 = a0.botUserIdToAppUsage; property = botUserIdToAppUsage2[propertyName]; applicationId = property.applicationId; lastUsedMs = property.lastUsedMs; value2 = typeof applicationId === 'string'; if (!value2) { r10 = value2; continue; } length = applicationId.length; value3 = length > 0; r10 = value3; if (!r10) { continue; } value4 = typeof lastUsedMs === 'number'; r10 = value4; if (!r10) { continue; } value5 = lastUsedMs > 0; r10 = value5; if (!r10) { r6 = propertyName2; continue; } botUserIdToAppUsage3 = env1_14.botUserIdToAppUsage; botUserIdToAppUsage3[propertyName] = {applicationId: applicationId, lastUsedMs: lastUsedMs}; r6 = propertyName2; } } } } function value_34963() { // fn#34963, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1 return env1_14; } function value_34964() { // fn#34964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:3767, offset: 0x01067712, size: 36 bytes, params: 1, frame: 12 const Array = global.Array; const from = Array.from; const binding = env1_8; return Reflect.apply(from, Array, [binding.values()]); } function value_34965(a0, a1) { // fn#34965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:3843, offset: 0x01067736, size: 100 bytes, params: 3, frame: 16 var r2; var value; var _createForOfIteratorHelperLoose_34950Binding; var value2; var done; var value3; var guildId; var type; var value4; if (a0 != null) { value = environment.__proto__; _createForOfIteratorHelperLoose_34950Binding = _createForOfIteratorHelperLoose_34950; value = env1_8.values(); value = _createForOfIteratorHelperLoose_34950Binding(value); value2 = value(); done = value2.done; reducibleJoin6: while (true) { if (done) { break reducibleJoin6; } r2 = value2; reducibleLoop2: while (true) { value3 = r2.value; guildId = value3.guildId; if (guildId === a0) { type = value3.type; reducibleJoin4: while (true) { if (type === a1) { return value3; } break reducibleJoin4; } } value4 = value(); done = value4.done; if (done) { break reducibleJoin6; } r2 = value4; continue reducibleLoop2; } } } } function value_34966(a0) { // fn#34966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:4031, offset: 0x0106779a, size: 45 bytes, params: 2, frame: 13 return a0 == null ? env1_7 : env1_9.get(a0) ?? env1_7; } function value_34967(a0) { // fn#34967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:4119, offset: 0x010677c7, size: 32 bytes, params: 2, frame: 11 var value; if (a0 != null) { value = environment.__proto__; return env1_8.get(a0); } } function value_34968(a0) { // fn#34968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:4194, offset: 0x010677e7, size: 61 bytes, params: 2, frame: 12 var r0; var value; var value2; if (a0 != null) { value = a0.toLowerCase(); value2 = environment.__proto__; if (env1_10.has(value)) { value = env1_10.get(value); r0 = value; } else { r0 = undefined; } return r0; } } function value_34969(a0) { // fn#34969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:4314, offset: 0x010353f1, size: 22 bytes, params: 2, frame: 11 return env1_11.get(a0); } function value_34970(a0) { // fn#34970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:4379, offset: 0x01067824, size: 28 bytes, params: 2, frame: 11 const value = environment.__proto__; return env1_12.get(a0) === true; } function value_34971(a0) { // fn#34971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:4437, offset: 0x01067840, size: 22 bytes, params: 2, frame: 11 return env1_13.has(a0); } function value_34972(a0) { // fn#34972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:4507, offset: 0x01067856, size: 28 bytes, params: 2, frame: 11 const value = environment.__proto__; return env1_12.get(a0) === false; } function value_34973() { // fn#34973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:4585, offset: 0x01067872, size: 36 bytes, params: 1, frame: 12 const Array = global.Array; const from = Array.from; const binding = env1_12; return Reflect.apply(from, Array, [binding.keys()]); } function value_34974(a0) { // fn#34974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:4660, offset: 0x01067896, size: 46 bytes, params: 2, frame: 3 var value; var property; if (a0 != null) { value = environment.__proto__; property = env1_14.botUserIdToAppUsage[a0]; value = undefined; return property == null ? value : property.applicationId; } } } function LOGOUT_34975() { // fn#34975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:4880, offset: 0x010678c4, size: 91 bytes, params: 1, frame: 10 env0_8.clear(); env0_9.clear(); env0_10.clear(); env0_11.clear(); env0_12.clear(); env0_13.clear(); } function APPLICATION_FETCH({applicationId}) { // fn#34977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:5157, offset: 0x01067979, size: 48 bytes, params: 2, frame: 14 const value2 = env0_12.get(applicationId); env0_12.set(applicationId, true); return value2 !== true; } function APPLICATION_FETCH_SUCCESS({application, isHydrated}) { // fn#34978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:5276, offset: 0x010679a9, size: 58 bytes, params: 2, frame: 12 var binding; if (isHydrated === true) { binding = env0_13; binding.add(application.id); } updateApplication(application); } function APPLICATION_FETCH_FAIL({applicationId}) { // fn#34979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:5410, offset: 0x010679e3, size: 48 bytes, params: 2, frame: 14 const value2 = env0_12.get(applicationId); env0_12.set(applicationId, false); return value2 !== false; } function APPLICATIONS_FETCH({applicationIds}) { // fn#34980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:5526, offset: 0x01067a13, size: 94 bytes, params: 2, frame: 19 var r2; var r0; var value5; var binding; var value6; var value7; var value8; const value2 = _createForOfIteratorHelperLoose_34950(applicationIds); const value3 = value2(); let done = value3.done; if (done) { r0 = false; } else { for (r2 = value3; true; r2 = value8) { value5 = r2.value; binding = env0_12; value6 = binding.get(value5); binding = env0_12; binding.set(value5, true); value7 = value6 !== true; value8 = value2(); done = value8.done; if (done) { r0 = value7; break; } } } return r0; } function APPLICATIONS_FETCH_SUCCESS({applications, isHydrated}) { // fn#34981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:5730, offset: 0x01067a71, size: 112 bytes, params: 2, frame: 18 var r2; var value4; var binding; var add; var id; var addApplicationBinding; var applicationRecordBinding; var createFromServer; var value5; const value2 = _createForOfIteratorHelperLoose_34950(applications); const value3 = value2(); let done = value3.done; if (!done) { r2 = value3; while (true) { value4 = r2.value; if (isHydrated === true) { binding = env0_13; add = binding.add; id = value4.id; Reflect.apply(add, binding, [id]); } addApplicationBinding = addApplication; applicationRecordBinding = ApplicationRecord; createFromServer = applicationRecordBinding.createFromServer; addApplicationBinding(Reflect.apply(createFromServer, applicationRecordBinding, [value4])); value5 = value2(); done = value5.done; if (done) { break; } r2 = value5; continue; } } } function APPLICATIONS_FETCH_FAIL({applicationIds}) { // fn#34982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:5962, offset: 0x01067ae1, size: 97 bytes, params: 2, frame: 19 var r2; var r0; var value5; var binding; var value6; var value7; var value8; const value2 = _createForOfIteratorHelperLoose_34950(applicationIds); const value3 = value2(); let done = value3.done; if (done) { r0 = false; } else { for (r2 = value3; true; r2 = value8) { value5 = r2.value; binding = env0_12; value6 = binding.get(value5); binding = env0_12; binding.set(value5, false); value7 = value6 !== false; value8 = value2(); done = value8.done; if (done) { r0 = value7; break; } } } return r0; } function GUILD_APPLICATIONS_FETCH_SUCCESS({guildId, applications}) { // fn#34984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:6470, offset: 0x01067b5a, size: 120 bytes, params: 2, frame: 19 var r5; var value4; var push; var id; var addApplicationBinding; var applicationRecordBinding; var createFromServer; var value5; const items2 = []; const value2 = _createForOfIteratorHelperLoose_34950(applications); const value3 = value2(); let done = value3.done; if (!done) { for (r5 = value3; true; r5 = value5) { value4 = r5.value; push = items2.push; id = value4.id; Reflect.apply(push, items2, [id]); addApplicationBinding = addApplication; applicationRecordBinding = ApplicationRecord; createFromServer = applicationRecordBinding.createFromServer; addApplicationBinding(Reflect.apply(createFromServer, applicationRecordBinding, [value4])); value5 = value2(); done = value5.done; if (done) { break; } } } env0_9.set(guildId, items2); } function BILLING_PAYMENTS_FETCH_SUCCESS({payments}) { // fn#34985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:6719, offset: 0x01067bd2, size: 167 bytes, params: 2, frame: 18 var r2; var application; var r1; var value6; var sku; var value7; var has; var id; var value8; var addApplicationBinding; var applicationRecordBinding; var createFromServer; var value9; const Set = global.Set; const set = new Set(); const value4 = _createForOfIteratorHelperLoose_34950(payments); const value5 = value4(); let done = value5.done; if (!done) { r2 = value5; while (true) { value6 = r2.value; sku = value6.sku; application = sku?.application; value7 = application == null; if (value7) { r1 = value7; continue; } has = set.has; id = application.id; value8 = Reflect.apply(has, set, [id]); r1 = value8; if (r1) { continue; } addApplicationBinding = addApplication; applicationRecordBinding = ApplicationRecord; createFromServer = applicationRecordBinding.createFromServer; addApplicationBinding(Reflect.apply(createFromServer, applicationRecordBinding, [application])); value9 = value4(); done = value9.done; if (done) { break; } r2 = value9; continue; } } return set.size > 0; } function INVITE_RESOLVE_SUCCESS_34987({invite}) { // fn#34987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:7161, offset: 0x01067cca, size: 62 bytes, params: 2, frame: 12 if (invite.target_application == null) { return false; } const addApplicationBinding = addApplication; const applicationRecordBinding = ApplicationRecord; addApplicationBinding(applicationRecordBinding.createFromServer(invite.target_application)); } function STORE_LISTING_FETCH_SUCCESS({storeListing}) { // fn#34990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:7767, offset: 0x01067dbb, size: 72 bytes, params: 2, frame: 12 if (storeListing.sku.application == null) { return false; } const addApplicationBinding = addApplication; const applicationRecordBinding = ApplicationRecord; addApplicationBinding(applicationRecordBinding.createFromServer(storeListing.sku.application)); } function LOAD_MESSAGES_SUCCESS_34991({messages}) { // fn#34991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:7931, offset: 0x01067e03, size: 30 bytes, params: 2, frame: 11 messages.forEach(function(a0) { _fun34993(a0); }); function _fun34992(a0) { // fn#34992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:7984, offset: 0x01067e21, size: 19 bytes, params: 2, frame: 11 (({attachments}) => { if (attachments != null) { attachments.forEach(_fun34994); } })(a0); function mergeApplicationsFromMessage({attachments}) { // fn#34993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:7987, offset: 0x01067e34, size: 36 bytes, params: 2, frame: 11 if (attachments != null) { attachments.forEach(_fun34994); } function _fun34994(a0) { // fn#34994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:8070, offset: 0x01067e58, size: 52 bytes, params: 2, frame: 12 var value; var addApplicationBinding; var applicationRecordBinding; if (a0.application != null) { value = environment.__proto__.__proto__.__proto__; addApplicationBinding = addApplication; applicationRecordBinding = ApplicationRecord; value = applicationRecordBinding.createFromServer(a0.application); addApplicationBinding(value); } } } } } function USER_PROFILE_FETCH_SUCCESS({userProfile}) { // fn#34995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:8182, offset: 0x01067e8c, size: 75 bytes, params: 2, frame: 12 var handleAppWithBotBinding; var object; var id; const user = userProfile.user; const application = userProfile.application; if (user.bot && application != null) { handleAppWithBotBinding = handleAppWithBot; object = {}; id = user.id; object.userId = id; id = application.id; object.applicationId = id; handleAppWithBotBinding(object); } } function APP_DM_OPEN({botUserId}) { // fn#34996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:8343, offset: 0x01067ed7, size: 88 bytes, params: 2, frame: 14 var object; let botUserIdToAppUsage = env0_14.botUserIdToAppUsage; const property = botUserIdToAppUsage[botUserId]; if (property != null) { botUserIdToAppUsage = env0_14.botUserIdToAppUsage; object = {}; copyDataProperties(object, property, undefined); object['lastUsedMs'] = global.Date.now(); botUserIdToAppUsage[botUserId] = object; } } function USER_AUTHORIZED_APPS_UPDATE({tokens}) { // fn#34997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:8508, offset: 0x01067f2f, size: 156 bytes, params: 2, frame: 19 var r5; var property; var addApplicationBinding; var applicationRecordBinding; var createFromServer; var application; var bot; var handleAppWithBotBinding; var object; var id; var value4; const Object = global.Object; const value = Object.values(tokens); let length = value.length; if (0 < length) { r5 = 0; while (true) { property = value[r5]; if (property != null) { addApplicationBinding = addApplication; applicationRecordBinding = ApplicationRecord; createFromServer = applicationRecordBinding.createFromServer; application = property.application; addApplicationBinding(Reflect.apply(createFromServer, applicationRecordBinding, [application])); application = property.application; bot = application.bot; if (bot == null) { break; } handleAppWithBotBinding = handleAppWithBot; object = {}; id = bot.id; object.userId = id; application = property.application; id = application.id; object.applicationId = id; handleAppWithBotBinding(object); break; } value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1; length = value.length; if (value4 < length) { r5 = value4; continue; } break; } } } function LOAD_NOTIFICATION_CENTER_ITEMS_SUCCESS({items}) { // fn#34998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:8812, offset: 0x01067fcb, size: 30 bytes, params: 2, frame: 11 items.forEach(_fun34999); function _fun34999(a0) { // fn#34999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:8878, offset: 0x01067fe9, size: 52 bytes, params: 2, frame: 12 var value; var addApplicationBinding; var applicationRecordBinding; if (a0.application != null) { value = environment.__proto__; addApplicationBinding = addApplication; applicationRecordBinding = ApplicationRecord; value = applicationRecordBinding.createFromServer(a0.application); addApplicationBinding(value); } } } function OAUTH2_TOKEN_CREATE({application}) { // fn#35000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:8977, offset: 0x0106801d, size: 39 bytes, params: 2, frame: 12 addApplication(ApplicationRecord.createFromServer(application)); } function WISHLIST_RECOMMENDATIONS_FETCH_SUCCESS({data}) { // fn#35002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4405:9398, offset: 0x0106806c, size: 92 bytes, params: 2, frame: 14 var r2; var value; var value2; var value3; var done; var addApplicationBinding; var value4; var value5; const applications = data.applications; if (applications != null) { reducibleJoin5: while (true) { if (applications.length !== 0) { value = environment; value2 = _createForOfIteratorHelperLoose_34950(applications); value3 = value2(); done = value3.done; if (!done) { r2 = value3; reducibleLoop3: while (true) { addApplicationBinding = addApplication; value4 = r2.value; addApplicationBinding(value4); value5 = value2(); done = value5.done; if (done) { break reducibleLoop3; } r2 = value5; continue reducibleLoop3; } } return undefined; } break reducibleJoin5; } } return false; } } global.__d(_fun34946, 4234, [6, 7, 15, 17, 18, 57, 4235, 566, 694, 2]) /* metro module 4234, dependencies: [6, 7, 15, 17, 18, 57, 4235, 566, 694, 2] */;