/* Metro module 11608; source: modules/app_launcher/utils/AppLauncherSearchUtils.tsx; dependencies: [57, 31, 7863, 7861, 7862, 11609, 5066, 6625, 7866, 1909, 8046, 8039, 11580, 11611, 22, 8048, 566, 8042, 11610, 11612, 2] */ function _fun88877(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:6, offset: 0x01ff7b68, size: 745 bytes, params: 8, frame: 40 let env0_0 = require; const _arrayLikeToArray_88880 = 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 closure = useApplicationsInContext; const closure2 = useApplicationCommandsInContext; const closure3 = filterApplicationAllowed; const closure4 = function(a0) { var items = [bucketApplicationNameStartsWith(a0)]; items[1] = bucketApplicationNameContains(a0); items[2] = bucketApplicationDescriptionStartsWith(a0); items[3] = bucketApplicationDescriptionContains(a0); return items; }; const closure5 = function(a0) { var env0_0 = a0; return _fun88893; }; const closure6 = function(a0) { var env0_0 = a0; return _fun88895; }; const closure7 = function(a0) { var env0_0 = a0; return _fun88897; }; const closure8 = function(a0) { var env0_0 = a0; return _fun88899; }; const closure9 = function(a0, a1) { return ApplicationFrecencyStore.getScoreWithoutLoadingLatest(a1.id) - ApplicationFrecencyStore.getScoreWithoutLoadingLatest(a0.id); }; const closure10 = function(a0, a1) { return appLauncherOnlyCompareNames(require(dependencyMap[10]).getSectionName(a0), require(dependencyMap[10]).getSectionName(a1)); }; const closure11 = function(a0) { var r2; var env0_0 = a0; var value2 = undefined; var moduleValue = require(dependencyMap[8]); var buildPermissionContext = moduleValue.buildPermissionContext; r2 = a0.type !== 'channel' ? value2 : a0.channel; var CHAT = require(dependencyMap[9]).ApplicationCommandType.CHAT; var env0_1 = Reflect.apply(buildPermissionContext, moduleValue, [r2, [CHAT]]); var env0_2 = {}; return _fun88903; }; const closure12 = function(a0) { var items = [bucketRootCommandNameStartsWith(a0)]; items[1] = bucketFullCommandNameStartsWith(a0); items[2] = bucketCommandNameContains(a0); items[3] = bucketOptionNameStartsWithOrCommandAndOptionStartsWith(a0); items[4] = bucketCommandOptionNameContains(a0); return items; }; const closure13 = function(a0) { var env0_0 = a0; return _fun88906; }; const closure14 = function(a0) { var r3; r3 = a0?.split(' '); var env0_0 = r3[0]; var env0_1 = r3.slice(1).join(' '); return _fun88908; }; const closure15 = function(a0) { var env0_0 = a0; return _fun88910; }; const closure16 = function(a0) { var env0_0 = a0; return _fun88912; }; const closure17 = function(a0) { var env0_0 = a0; return _fun88914; }; const closure18 = function(a0) { var items = [sortCommandsByFreceny(a0)]; items[1] = sortCommandsAlpha; return items; }; const closure19 = function(a0) { var env0_0 = a0; return _fun88917; }; const closure20 = function(a0, a1) { return appLauncherOnlyCompareNames(a0.displayName, a1.displayName); }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_4 = importDefault(57) /* metro dependency 57 */; const env0_5 = importAll(31) /* metro dependency 31 */; const applicationCommandFrecencyStore = importDefault(7863) /* metro dependency 7863: ApplicationCommandFrecencyStore */; const applicationCommandIndexStoreModule = require(7861) /* metro dependency 7861: ApplicationCommandIndexStore */; const env0_7 = applicationCommandIndexStoreModule.appLauncherOnlyCompareNames; const env0_8 = applicationCommandIndexStoreModule.getSection; const env0_9 = applicationCommandIndexStoreModule.useContextIndexState; const env0_10 = applicationCommandIndexStoreModule.useUserIndexState; const applicationFrecencyStore = importDefault(7862) /* metro dependency 7862: ApplicationFrecencyStore */; const applicationDirectorySearchStore = importDefault(11609) /* metro dependency 11609: ApplicationDirectorySearchStore */; const env0_13 = (require(11609) /* metro dependency 11609: ApplicationDirectorySearchStore */).FetchState; const env0_14 = (require(5066) /* metro dependency 5066: ApplicationCommandConstants */).BuiltInSectionId; const env0_15 = (require(6625) /* metro dependency 6625: ChannelAutocompleteConstants */).COMMAND_SENTINEL; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/app_launcher/utils/AppLauncherSearchUtils.tsx'); exports.useApplicationsInContext = closure; exports.useApplicationCommandsInContext = closure2; exports.filterApplicationAllowed = closure3; exports.defaultApplicationBucketing = closure4; exports.bucketApplicationNameStartsWith = closure5; exports.bucketApplicationNameContains = closure6; exports.bucketApplicationDescriptionStartsWith = closure7; exports.bucketApplicationDescriptionContains = closure8; exports.sortApplicationFreceny = closure9; exports.sortApplicationAlpha = closure10; exports.filterCommandAllowed = closure11; exports.defaultCommandBucketing = closure12; exports.bucketRootCommandNameStartsWith = closure13; exports.bucketFullCommandNameStartsWith = closure14; exports.bucketCommandNameContains = closure15; exports.bucketOptionNameStartsWithOrCommandAndOptionStartsWith = closure16; exports.bucketCommandOptionNameContains = closure17; exports.bucketCommandSectionNameStartsWith = function(a0, a1) { var env0_0 = a0; var env0_1 = a1; var env0_2 = {}; return _fun88920; }; exports.bucketCommandSectionNameContains = function(a0, a1) { var env0_0 = a0; var env0_1 = a1; var env0_2 = {}; return _fun88923; }; exports.defaultCommandsSort = closure18; exports.sortCommandsByFreceny = closure19; exports.sortCommandsAlpha = closure20; exports.useLocalSearchResults = useLocalSearchResults; exports.useGlobalSearchResults = useGlobalSearchResults; } function _createForOfIteratorHelperLoose_88878(a0, a1) { // fn#88878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:334, offset: 0x01ff7e51, size: 372 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 _fun88879; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_88880(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_88880(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_88880(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun88879; } 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 useApplicationsInContext({context, onlyWithCommands, includeBuiltIn, allowFetch, includeEmbeddedApps, includeNonEmbeddedApps}) { // fn#88881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:1244, offset: 0x01ff7fc5, size: 604 bytes, params: 2, frame: 27 var r10; var r14; var r9; var r8; var Object; var value9; var length; var value10; var property; var descriptor; var application; var value11; var value12; var add; var id; var value13; var value14; var value15; var value16; var has; var value17; var value18; var value19; allowFetch = allowFetch === undefined || allowFetch; const channel = context.type !== 'channel' ? undefined : context.channel; const commandPermissionContextModule = require(7866) /* metro dependency 7866: CommandPermissionContext */; const usePermissionContext = commandPermissionContextModule.usePermissionContext; const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType; const CHAT = ApplicationCommandType.CHAT; const hasBaseAccessPermissions = Reflect.apply(usePermissionContext, commandPermissionContextModule, [channel, [CHAT]]).hasBaseAccessPermissions; const value4 = useContextIndexState(context, hasBaseAccessPermissions, allowFetch); const value5 = useUserIndexState(hasBaseAccessPermissions, allowFetch); const value6 = env0_5.useCallback(_fun88882, [includeEmbeddedApps, includeNonEmbeddedApps, onlyWithCommands]); items2 = []; const Set = global.Set; const set = new Set(); if (value4.result != null) { Object = global.Object; value9 = Object.values(value4.result.sections); length = value9.length; value10 = 0; if (value10 < length) { r10 = value10; while (true) { property = value9[r10]; descriptor = property.descriptor; application = descriptor.application; value11 = application != null; if (value11) { value12 = value6(property); r14 = value12; } else { r14 = value11; } if (!r14) { continue; } items2.push(application); add = set.add; id = application.id; Reflect.apply(add, set, [id]); value13 = typeof r10 === 'bigint' ? r10 + 1n : +r10 + 1; length = value9.length; if (value13 < length) { r10 = value13; continue; } break; } } } if (value5.result != null) { Object = global.Object; value14 = Object.values(value5.result.sections); length = value14.length; value15 = 0; if (value15 < length) { r9 = value15; while (true) { property = value14[r9]; descriptor = property.descriptor; application = descriptor.application; value16 = application != null; if (value16) { has = set.has; id = application.id; value17 = !Reflect.apply(has, set, [id]); r8 = value17; } else { r8 = value16; } if (!r8) { continue; } value18 = value6(property); r8 = value18; if (!r8) { continue; } items2.push(application); value19 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1; length = value14.length; if (value19 < length) { r9 = value19; continue; } break; } } } if (includeNonEmbeddedApps && includeBuiltIn) { items2.push((require(8046) /* metro dependency 8046: AppLauncherUtils */).FAKE_BUILT_IN_APP); } return {apps: items2, loading: (value4 == null ? undefined : value4.fetchState.fetching) === true || (value5 == null ? undefined : value5.fetchState.fetching) === true}; } function useApplicationCommandsInContext({context, includeBuiltIn, allowFetch}) { // fn#88883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:2234, offset: 0x01ff82e5, size: 206 bytes, params: 2, frame: 20 includeBuiltIn = includeBuiltIn === undefined || includeBuiltIn; allowFetch = allowFetch === undefined || allowFetch; const value5 = useContextIndexState(context, true, allowFetch); const value6 = useUserIndexState(true, allowFetch); return env0_5.useMemo(_fun88884, [context, includeBuiltIn, value5.fetchState.fetching, value5.result?.sections, value6.fetchState.fetching, value6.result?.sections]); } function filterApplicationAllowed(a0) { // fn#88888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:3014, offset: 0x01ff8593, size: 144 bytes, params: 2, frame: 19 const env0_0 = a0; const value2 = undefined; const commandPermissionContextModule = require(7866) /* metro dependency 7866: CommandPermissionContext */; const buildPermissionContext = commandPermissionContextModule.buildPermissionContext; const channel = a0.type !== 'channel' ? value2 : a0.channel; const {CHAT, PRIMARY_ENTRY_POINT} = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType; const env0_1 = Reflect.apply(buildPermissionContext, commandPermissionContextModule, [channel, [CHAT, PRIMARY_ENTRY_POINT]]); return _fun88889; } function bucketApplicationNameStartsWith(a0) { // fn#88892, offset: 0x01ff8843, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun88893; } function bucketApplicationNameContains(a0) { // fn#88894, offset: 0x01ff88a4, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun88895; } function bucketApplicationDescriptionStartsWith(a0) { // fn#88896, offset: 0x01ff8904, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun88897; } function bucketApplicationDescriptionContains(a0) { // fn#88898, offset: 0x01ff8983, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun88899; } function filterCommandAllowed(a0) { // fn#88902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:4990, offset: 0x01ff8a82, size: 125 bytes, params: 2, frame: 18 const env0_0 = a0; const value2 = undefined; const commandPermissionContextModule = require(7866) /* metro dependency 7866: CommandPermissionContext */; const buildPermissionContext = commandPermissionContextModule.buildPermissionContext; const channel = a0.type !== 'channel' ? value2 : a0.channel; const ApplicationCommandType = (require(1909) /* metro dependency 1909: Server */).ApplicationCommandType; const CHAT = ApplicationCommandType.CHAT; const env0_1 = Reflect.apply(buildPermissionContext, commandPermissionContextModule, [channel, [CHAT]]); const env0_2 = {}; return _fun88903; } function bucketRootCommandNameStartsWith(a0) { // fn#88905, offset: 0x01ff8d29, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun88906; } function bucketFullCommandNameStartsWith(a0) { // fn#88907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:6412, offset: 0x01ff8d6f, size: 84 bytes, params: 2, frame: 13 const r3 = a0?.split(' '); const env0_0 = r3[0]; const env0_1 = r3.slice(1).join(' '); return _fun88908; } function bucketCommandNameContains(a0) { // fn#88909, offset: 0x01ff8e76, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun88910; } function bucketOptionNameStartsWithOrCommandAndOptionStartsWith(a0) { // fn#88911, offset: 0x01ff8eba, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun88912; } function bucketCommandOptionNameContains(a0) { // fn#88913, offset: 0x01ff9023, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun88914; } function sortCommandsByFreceny(a0) { // fn#88916, offset: 0x01ff90d6, size: 18 bytes, params: 2, frame: 2 const env0_0 = a0; return _fun88917; } function bucketCommandSectionNameStartsWith(a0, a1) { // fn#88919, offset: 0x01ff913f, size: 31 bytes, params: 3, frame: 2 const env0_0 = a0; const env0_1 = a1; const env0_2 = {}; return _fun88920; } function bucketCommandSectionNameContains(a0, a1) { // fn#88922, offset: 0x01ff9215, size: 31 bytes, params: 3, frame: 2 const env0_0 = a0; const env0_1 = a1; const env0_2 = {}; return _fun88923; } function useLocalSearchResults({context, query, commandLimit, applicationLimit, searchesCommands, searchesBots, searchesActivities}) { // fn#88925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:9914, offset: 0x01ff92ea, size: 555 bytes, params: 2, frame: 28 searchesCommands = searchesCommands === undefined || searchesCommands; searchesBots = searchesBots === undefined || searchesBots; const env0_5 = searchesBots; searchesActivities = searchesActivities === undefined || searchesActivities; const r9 = query.startsWith('' + COMMAND_SENTINEL) ? query.substring(1) : query; const {commands, commandSectionMap, loading} = useApplicationCommandsInContext({context: context, includeBuiltIn: true}); const apps = useApplicationsInContext({'context': null, 'onlyWithCommands': true, 'includeBuiltIn': true, context: context, includeEmbeddedApps: searchesActivities, includeNonEmbeddedApps: searchesBots}).apps; const value5 = (importDefault(11580) /* metro dependency 11580: useActivityShelfItems */)({guildId: context.type !== 'channel' ? null : context.channel.guild_id}); const value7 = env0_5.useMemo(_fun88927, [apps, env0_5.useMemo(_fun88926, [searchesCommands, commands, commandLimit, context, r9]), commandSectionMap]); const value = env0_5.useMemo(_fun88930, [searchesBots, searchesActivities, applicationLimit, context, r9, apps, value5]); const value8 = value7.length > 0; const value9 = value.length > 0; return {commandResults: value7, hasCommandResults: value8, applicationResults: value, hasApplicationResults: value9, isEmptyState: !value8 && !value9, loading: loading && searchesCommands}; } function useGlobalSearchResults({context, query, fetches, pageLimit, entrypoint}) { // fn#88934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:11463, offset: 0x01ff97f3, size: 641 bytes, params: 2, frame: 25 var object2; let value = undefined; fetches = fetches === value || fetches; pageLimit = pageLimit === value ? Infinity : pageLimit; let env0_5 = value; const r7 = query.startsWith('' + COMMAND_SENTINEL) ? query.substring(1) : query; const AppLauncherEntrypoint = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint; const VOICE = AppLauncherEntrypoint.VOICE; const value6 = entrypoint === VOICE; const guild_id = context.type !== 'channel' ? value : context.channel.guild_id; const value8 = guild_id(env0_5.useState(1), 2); const property = value8[0]; env0_5 = property; const env0_6 = value8[1]; env0_5.useRef(property).current = property; const useStateFromStoresObject = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject; value = Reflect.apply(useStateFromStoresObject, value, [[ApplicationDirectorySearchStore], _fun88935, [r7, guild_id, property, value6]]); const fetchState = value.fetchState; const totalPages = value.totalPages; value = env0_5.useMemo(_fun88936, [fetchState, guild_id, r7, property, value6]); const value10 = env0_5.useCallback(_fun88938, [fetchState, pageLimit, value, totalPages]); env0_5.useEffect(_fun88941, [r7, guild_id, env0_5.useCallback(_fun88940, [value6]), property, fetches]); env0_5.useEffect(_fun88942, [guild_id, r7]); object2 = {fetchState: fetchState}; object2.applicationResults = value.flat(); object2.fetchNextPage = value10; return object2; } function _fun88882(a0) { // fn#88882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:1568, offset: 0x01ff8221, size: 196 bytes, params: 2, frame: 17 var r5; var r2; var r1; var r0; var includeEmbeddedAppsBinding; var value3; var moduleValue; var value7; var moduleValue2; const application = a0.descriptor.application; const value = application != null; if (value) { includeEmbeddedAppsBinding = includeEmbeddedApps; if (includeEmbeddedAppsBinding) { value3 = environment.__proto__; moduleValue = require(8046) /* metro dependency 8046: AppLauncherUtils */; r5 = !moduleValue.isEmbeddedApp(application); } else { r5 = !includeEmbeddedAppsBinding; } if (r5) { r2 = application != null && includeNonEmbeddedApps; if (r2) { value7 = environment.__proto__; moduleValue2 = require(8046) /* metro dependency 8046: AppLauncherUtils */; r2 = !moduleValue2.isEmbeddedApp(application); } r2 = r2 && (onlyWithCommands ? global.Object.keys(a0.commands).length > 0 : !onlyWithCommands); r1 = r2; } else { r1 = !r5; } r0 = r1; } else { r0 = value; } return r0; } function _fun88884() { // fn#88884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:2372, offset: 0x01ff83b3, size: 301 bytes, params: 1, frame: 19 var environment; var sections; var r4; var r5; var r1; var push; var value8; var BUILT_IN; var value9; let value = Object.create(environment); let result = env0_2.result; const value3 = undefined; reducibleJoin2: while (true) { if (result == null) { sections = value3; break reducibleJoin2; } sections = result.sections; break reducibleJoin2; } reducibleJoin4: while (true) { if (sections != null) { r4 = sections; break reducibleJoin4; } r4 = {}; break reducibleJoin4; } result = env0_3.result; reducibleJoin6: while (true) { if (result == null) { sections = value3; break reducibleJoin6; } sections = result.sections; break reducibleJoin6; } reducibleJoin8: while (true) { if (sections != null) { r5 = sections; break reducibleJoin8; } r5 = {}; break reducibleJoin8; } let Object = global.Object; const value4 = Object.keys(r4); const items = []; const value5 = 0; const value6 = arraySpread(items, value4, value5, value); Object = global.Object; const value7 = Object.keys(r5); arraySpread(items, value7.filter(_fun88885), value6, value); reducibleJoin10: while (true) { if (includeBuiltIn) { push = items.push; value8 = environment.__proto__; BUILT_IN = BuiltInSectionId.BUILT_IN; Reflect.apply(push, items, [BUILT_IN]); break reducibleJoin10; } break reducibleJoin10; } const object3 = {}; var env0_2 = object3; const closure = _loop_88886; let length = items.length; if (value5 < length) { r4 = value5; reducibleLoop11: while (true) { var env0_3 = items[r4]; closure(); value9 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1; length = items.length; if (value9 < length) { r4 = value9; continue reducibleLoop11; } break reducibleLoop11; } } let fetchState = env0_2.fetchState; let fetching = fetchState.fetching; value = fetching === true; reducibleJoin14: while (true) { if (value) { r1 = value; break reducibleJoin14; } fetchState = env0_3.fetchState; fetching = fetchState.fetching; value = fetching === true; r1 = value; break reducibleJoin14; } return {commands: [], commandSectionMap: object3, loading: r1}; } function _fun88889({id}) { // fn#88889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:3224, offset: 0x01ff8623, size: 324 bytes, params: 2, frame: 27 var moduleValue; var allowedForUser; var moduleValue2; const context = env0_1.context; const userId = env0_1.userId; const roleIds = env0_1.roleIds; const isImpersonating = env0_1.isImpersonating; const getSectionBinding = getSection; const binding = env0_0; let value = undefined; const sectionBinding = getSectionBinding(binding, id); const descriptor = sectionBinding.descriptor; const sectionCommands = sectionBinding.sectionCommands; var env0_1 = sectionBinding.isGuildInstalled; const env0_2 = sectionBinding.isUserInstalled; if ((context == null ? value : context.guild_id) != null) { moduleValue = importAll(8039) /* metro dependency 8039: CommandPermissionUtils */; allowedForUser = moduleValue.computeAllowedForUser(descriptor == null ? value : descriptor.permissions, context.guild_id, userId, roleIds, isImpersonating); } if ((context == null ? value : context.guild_id) != null) { moduleValue2 = importAll(8039) /* metro dependency 8039: CommandPermissionUtils */; value = moduleValue2.computeAllowedForChannel(descriptor == null ? value : descriptor.permissions, context, context.guild_id); } const r2 = sectionCommands != null && sectionCommands.length > 0; return r2 ? sectionCommands.some(_fun88890) : !r2; } function _fun88893(a0) { // fn#88893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:4102, offset: 0x01ff8855, size: 79 bytes, params: 2, frame: 12 let value = environment.__proto__; value = require(8046) /* metro dependency 8046: AppLauncherUtils */; value = value.getSectionName(a0); value = value.toLocaleLowerCase(); const startsWith = value.startsWith; const binding = env0_0; return Reflect.apply(startsWith, value, [binding.toLocaleLowerCase()]); } function _fun88895(a0) { // fn#88895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:4236, offset: 0x01ff88b6, size: 78 bytes, params: 2, frame: 12 let value = environment.__proto__; value = require(8046) /* metro dependency 8046: AppLauncherUtils */; value = value.getSectionName(a0); value = value.toLocaleLowerCase(); const includes = value.includes; const binding = env0_0; return Reflect.apply(includes, value, [binding.toLocaleLowerCase()]); } function _fun88897(a0) { // fn#88897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:4377, offset: 0x01ff8916, size: 109 bytes, params: 2, frame: 14 let value = environment.__proto__; value = undefined; const sectionDescription = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getSectionDescription(a0); const r4 = sectionDescription == null ? value : sectionDescription.toLocaleLowerCase(); const r1 = r4 == null ? value : r4.startsWith(env0_0.toLocaleLowerCase()); return r1 != null && r1; } function _fun88899(a0) { // fn#88899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:4593, offset: 0x01ff8995, size: 108 bytes, params: 2, frame: 14 let value = environment.__proto__; value = undefined; const sectionDescription = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getSectionDescription(a0); const r4 = sectionDescription == null ? value : sectionDescription.toLocaleLowerCase(); const r1 = r4 == null ? value : r4.includes(env0_0.toLocaleLowerCase()); return r1 != null && r1; } function _fun88903(a0) { // fn#88903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:5149, offset: 0x01ff8aff, size: 475 bytes, params: 2, frame: 29 var guild_id; var r8; var r6; var value2; var getSectionBinding; var binding; var value3; var sectionBinding; var value5; var moduleValue; var moduleValue2; const context = env0_1.context; const userId = env0_1.userId; const roleIds = env0_1.roleIds; const isImpersonating = env0_1.isImpersonating; let applicationId = a0.applicationId; if (!(applicationId in env0_2)) { value2 = environment.__proto__; getSectionBinding = getSection; binding = env0_0; applicationId = a0.applicationId; value3 = undefined; sectionBinding = getSectionBinding(binding, applicationId); descriptor = sectionBinding.descriptor; isGuildInstalled = sectionBinding.isGuildInstalled; isUserInstalled = sectionBinding.isUserInstalled; value5 = null; guild_id = value5 == context ? value3 : context.guild_id; if (value5 != guild_id) { moduleValue = importAll(8039) /* metro dependency 8039: CommandPermissionUtils */; r8 = moduleValue.computeAllowedForUser(value5 == descriptor ? value3 : descriptor.permissions, context.guild_id, userId, roleIds, isImpersonating); } else { r8 = value5; } guild_id = value5 == context ? value3 : context.guild_id; if (value5 != guild_id) { moduleValue2 = importAll(8039) /* metro dependency 8039: CommandPermissionUtils */; r6 = moduleValue2.computeAllowedForChannel(value5 == descriptor ? value3 : descriptor.permissions, context, context.guild_id); } else { r6 = value5; } binding = env0_2; applicationId = a0.applicationId; binding[applicationId] = {descriptor: descriptor, applicationAllowedForUser: r8, applicationAllowedForChannel: r6, isGuildInstalled: isGuildInstalled, isUserInstalled: isUserInstalled}; } var {descriptor, applicationAllowedForChannel, applicationAllowedForUser, isGuildInstalled, isUserInstalled} = env0_2[a0.applicationId]; const value7 = undefined; const commandPermissionUtilsModule = importAll(8039) /* metro dependency 8039: CommandPermissionUtils */; const value = commandPermissionUtilsModule.hasAccess(a0, env0_1, {applicationAllowedForUser: applicationAllowedForUser, applicationAllowedForChannel: applicationAllowedForChannel, commandBotId: descriptor == null ? value7 : descriptor.botId, isGuildInstalled: isGuildInstalled, isUserInstalled: isUserInstalled}); const HasAccessResult = (require(8039) /* metro dependency 8039: CommandPermissionUtils */).HasAccessResult; const ALLOWED = HasAccessResult.ALLOWED; return value === ALLOWED; } function _fun88906({untranslatedName, displayName}) { // fn#88906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:6326, offset: 0x01ff8d3b, size: 52 bytes, params: 2, frame: 13 return untranslatedName.startsWith(env0_0) || displayName.startsWith(env0_0); } function _fun88908({untranslatedName, displayName}) { // fn#88908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:6527, offset: 0x01ff8dc3, size: 179 bytes, params: 2, frame: 14 var value4; var value7; let startsWith = untranslatedName.startsWith; if (Reflect.apply(startsWith, untranslatedName, [env0_0])) { value4 = untranslatedName.split(' ').slice(1).join(' '); startsWith = value4.startsWith; if (Reflect.apply(startsWith, value4, [env0_1])) { return true; } startsWith = displayName.startsWith; if (Reflect.apply(startsWith, displayName, [env0_0])) { value7 = displayName.split(' ').slice(1).join(' '); if (value7.startsWith(env0_1)) { return true; } return false; } } else if (displayName.startsWith(env0_0)) { value7 = displayName.split(' ').slice(1).join(' '); if (value7.startsWith(env0_1)) { return true; } return false; } return false; } function _fun88910({untranslatedName, displayName}) { // fn#88910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:6777, offset: 0x01ff8e88, size: 50 bytes, params: 2, frame: 13 return untranslatedName.includes(env0_0) || displayName.includes(env0_0); } function _fun88912(a0) { // fn#88912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:6933, offset: 0x01ff8ecc, size: 343 bytes, params: 2, frame: 24 var r0; var r1; var value4; var name; var serverLocalizedName; var startsWith; var untranslatedName; var HermesInternal; var concat; var value5; var displayName; var value6; var value7; var value8; var value9; let value = environment.__proto__; const _createForOfIteratorHelperLoose_88878Binding = _createForOfIteratorHelperLoose_88878; const options = a0.options; reducibleJoin2: while (true) { if (options != null) { r0 = options; break reducibleJoin2; } r0 = []; break reducibleJoin2; } value = _createForOfIteratorHelperLoose_88878Binding(r0); const value2 = value(); let done = value2.done; if (!done) { r1 = value2; reducibleLoop3: while (true) { value4 = r1.value; name = value4.name; serverLocalizedName = value4.serverLocalizedName; startsWith = name.startsWith; if (Reflect.apply(startsWith, name, [env0_0])) { return true; } untranslatedName = a0.untranslatedName; HermesInternal = global.HermesInternal; concat = HermesInternal.concat; value5 = '' + untranslatedName + ' ' + name; startsWith = value5.startsWith; if (Reflect.apply(startsWith, value5, [env0_0])) { return true; } displayName = a0.displayName; if (displayName != null) { displayName = a0.displayName; HermesInternal = global.HermesInternal; concat = HermesInternal.concat; value6 = '' + displayName + ' ' + name; startsWith = value6.startsWith; reducibleJoin7: while (true) { if (Reflect.apply(startsWith, value6, [env0_0])) { return true; } break reducibleJoin7; } } if (serverLocalizedName != null) { startsWith = serverLocalizedName.startsWith; reducibleJoin12: while (true) { reducibleJoin13: while (true) { if (Reflect.apply(startsWith, serverLocalizedName, [env0_0])) { break reducibleJoin13; } untranslatedName = a0.untranslatedName; HermesInternal = global.HermesInternal; concat = HermesInternal.concat; value7 = '' + untranslatedName + ' ' + serverLocalizedName; startsWith = value7.startsWith; if (Reflect.apply(startsWith, value7, [env0_0])) { break reducibleJoin13; } displayName = a0.displayName; if (displayName == null) { break reducibleJoin12; } displayName = a0.displayName; HermesInternal = global.HermesInternal; concat = HermesInternal.concat; value8 = '' + displayName + ' ' + serverLocalizedName; startsWith = value8.startsWith; if (Reflect.apply(startsWith, value8, [env0_0])) { break reducibleJoin13; } break reducibleJoin12; } return true; } } value9 = value(); done = value9.done; if (done) { return false; } r1 = value9; continue reducibleLoop3; } } return false; } function _fun88914({options}) { // fn#88914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:7408, offset: 0x01ff9035, size: 126 bytes, params: 2, frame: 17 var r0; var r1; var value4; var name; var serverLocalizedName; var includes; var value5; let value = environment.__proto__; const _createForOfIteratorHelperLoose_88878Binding = _createForOfIteratorHelperLoose_88878; reducibleJoin2: while (true) { if (options != null) { r0 = options; break reducibleJoin2; } r0 = []; break reducibleJoin2; } value = _createForOfIteratorHelperLoose_88878Binding(r0); const value2 = value(); let done = value2.done; if (!done) { r1 = value2; reducibleLoop3: while (true) { value4 = r1.value; name = value4.name; serverLocalizedName = value4.serverLocalizedName; includes = name.includes; if (Reflect.apply(includes, name, [env0_0])) { return true; } if (serverLocalizedName != null) { includes = serverLocalizedName.includes; reducibleJoin6: while (true) { if (Reflect.apply(includes, serverLocalizedName, [env0_0])) { return true; } break reducibleJoin6; } } value5 = value(); done = value5.done; if (done) { return false; } r1 = value5; continue reducibleLoop3; } } return false; } function _fun88917(a0, a1) { // fn#88917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:7730, offset: 0x01ff90e8, size: 54 bytes, params: 3, frame: 14 let getScoreWithoutLoadingLatest = ApplicationCommandFrecencyStore.getScoreWithoutLoadingLatest; const binding = env0_0; const value3 = Reflect.apply(getScoreWithoutLoadingLatest, ApplicationCommandFrecencyStore, [binding, a0]); getScoreWithoutLoadingLatest = ApplicationCommandFrecencyStore.getScoreWithoutLoadingLatest; return Reflect.apply(getScoreWithoutLoadingLatest, ApplicationCommandFrecencyStore, [binding, a1]) - value3; } function _fun88920(a0) { // fn#88920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:9167, offset: 0x01ff915e, size: 183 bytes, params: 2, frame: 17 const env0_0 = a0; if (a0.applicationId in env0_2) { return env0_2[a0.applicationId]; } const sectionName = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getSectionName(env0_0.find(_fun88921) ?? (require(8046) /* metro dependency 8046: AppLauncherUtils */).FAKE_BUILT_IN_APP); const value5 = sectionName.toLocaleLowerCase(); const value6 = value5.startsWith(require.toLocaleLowerCase()); env0_2[a0.applicationId] = value6; return value6; } function _fun88923(a0) { // fn#88923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:9514, offset: 0x01ff9234, size: 182 bytes, params: 2, frame: 17 const env0_0 = a0; if (a0.applicationId in env0_2) { return env0_2[a0.applicationId]; } const sectionName = (require(8046) /* metro dependency 8046: AppLauncherUtils */).getSectionName(env0_0.find(_fun88924) ?? (require(8046) /* metro dependency 8046: AppLauncherUtils */).FAKE_BUILT_IN_APP); const value5 = sectionName.toLocaleLowerCase(); const value6 = value5.includes(require.toLocaleLowerCase()); env0_2[a0.applicationId] = value6; return value6; } function _fun88926() { // fn#88926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:10429, offset: 0x01ff9515, size: 160 bytes, params: 1, frame: 21 var r0; var object2; var value2; var value3; var moduleValue; var queryData; var commandsBinding; var filterCommandAllowedBinding; var contextBinding; if (searchesCommands) { value2 = environment.__proto__; value3 = undefined; moduleValue = require(11611) /* metro dependency 11611: ArraySearch */; queryData = moduleValue.queryData; commandsBinding = commands; object2 = {}; object2.limit = commandLimit; filterCommandAllowedBinding = filterCommandAllowed; contextBinding = context; object2.filterPredicates = [filterCommandAllowedBinding(contextBinding)]; object2.bucketPredicates = defaultCommandBucketing(query); object2.sortComparers = defaultCommandsSort({channel: contextBinding.type !== 'channel' ? value3 : context.channel}); r0 = Reflect.apply(queryData, moduleValue, [commandsBinding, object2]); } else { r0 = []; } return r0; } function _fun88927() { // fn#88927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:10666, offset: 0x01ff95b5, size: 138 bytes, params: 1, frame: 14 if (env0_11.length === 0) { return []; } const Map = global.Map; const appsBinding = apps; let map = appsBinding.map; map = new Map(Reflect.apply(map, appsBinding, [function(a0) { return [a0.id, a0]; }])); const defaultImport = importDefault(22) /* metro dependency 22 */; const compact = defaultImport.compact; const binding = env0_11; return Reflect.apply(compact, defaultImport, [binding.map(_fun88929)]); } function _fun88930() { // fn#88930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:10905, offset: 0x01ff9694, size: 316 bytes, params: 1, frame: 19 var r3; var appsBinding; var Set; var value2; var set; var push; var items3; var binding; var value6; var items2; let object = []; if (searchesActivities) { Set = global.Set; value2 = apps.map(function(a0) { return a0.id; }); set = new Set(); push = object.push; appsBinding = apps; items3 = []; arraySpread(items3, appsBinding, 0, undefined); apply(push, items3, object, undefined); push = object.push; binding = env0_10; value6 = binding.filter(_fun88932).map(_fun88933); items2 = []; arraySpread(items2, value6, 0, binding); apply(push, items2, object, binding); r3 = object; } else { r3 = searchesBots ? apps : object; } const arraySearchModule = require(11611) /* metro dependency 11611: ArraySearch */; const queryData = arraySearchModule.queryData; object = {}; object.limit = applicationLimit; object.filterPredicates = [filterApplicationAllowed(context)]; object.bucketPredicates = defaultApplicationBucketing(query); object.sortComparers = [sortApplicationFreceny, sortApplicationAlpha]; return Reflect.apply(queryData, arraySearchModule, [r3, object]); } function _fun88935() { // fn#88935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:11805, offset: 0x01ff9a74, size: 300 bytes, params: 1, frame: 21 const object3 = {}; let value = environment.__proto__; const getFetchState = ApplicationDirectorySearchStore.getFetchState; const object4 = {}; object4.query = query; object4.guildId = guild_id; object4.page = env0_5; value = undefined; const ApplicationIntegrationType = (require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType; let USER_INSTALL = ApplicationIntegrationType.USER_INSTALL; object4.integrationType = USER_INSTALL; object4.minUserInstallCommandCount = 1; object4.excludeAppsWithCustomInstallUrl = true; object4.excludeNonEmbeddedApps = env0_3; object4.excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand = true; const SearchAppsRequestSource = (require(11610) /* metro dependency 11610: SearchAppsRequestSource */).SearchAppsRequestSource; let APP_LAUNCHER = SearchAppsRequestSource.APP_LAUNCHER; object4.source = APP_LAUNCHER; object3.fetchState = Reflect.apply(getFetchState, ApplicationDirectorySearchStore, [object4]); const getSearchResults = ApplicationDirectorySearchStore.getSearchResults; USER_INSTALL = ApplicationIntegrationType.USER_INSTALL; APP_LAUNCHER = SearchAppsRequestSource.APP_LAUNCHER; const value3 = Reflect.apply(getSearchResults, ApplicationDirectorySearchStore, [{query: query, guildId: guild_id, page: env0_5, integrationType: USER_INSTALL, minUserInstallCommandCount: 1, excludeAppsWithCustomInstallUrl: true, excludeNonEmbeddedApps: env0_3, excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand: true, source: APP_LAUNCHER}]); object3.totalPages = (value3 == null ? value : value3.totalPages) ?? 0; return object3; } function _fun88936() { // fn#88936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:12571, offset: 0x01ff9ba0, size: 95 bytes, params: 1, frame: 16 const Array = global.Array; const from = Array.from; const fetchStateBinding = fetchState; const FETCHED = FetchState.FETCHED; return Reflect.apply(from, Array, [{length: fetchStateBinding === FETCHED || fetchState === FetchState.ERROR ? env0_5 : env0_5 - 1}, _fun88937]); } function _fun88938() { // fn#88938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:13043, offset: 0x01ff9cac, size: 154 bytes, params: 1, frame: 13 var current; var binding; const length = env0_10.length; const fetchStateBinding = fetchState; const FETCHED = FetchState.FETCHED; let r1 = fetchStateBinding === FETCHED && length === env0_7.current && length > 0; r1 = r1 && length < totalPages && length < pageLimit && env0_10[length - 1].length > 0; if (r1) { binding = env0_7; current = binding.current; binding.current = typeof current === 'bigint' ? current + 1n : +current + 1; binding = env0_6; binding(function(a0) { return a0 + 1; }); } } function _fun88940({query, page, guildId}) { // fn#88940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:13181, offset: 0x01ff9d46, size: 168 bytes, params: 2, frame: 17 const applicationDirectoryActionCreatorsModule = importAll(11612) /* metro dependency 11612: ApplicationDirectoryActionCreators */; const search = applicationDirectoryActionCreatorsModule.search; const object3 = {query: query, guildId: guildId}; const object4 = {'page': null, 'integrationType': null, 'minUserInstallCommandCount': 1, 'excludeAppsWithCustomInstallUrl': true, 'excludeNonEmbeddedApps': null, 'excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand': true}; object4.page = page; const ApplicationIntegrationType = (require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType; const USER_INSTALL = ApplicationIntegrationType.USER_INSTALL; object4.integrationType = USER_INSTALL; object4.excludeNonEmbeddedApps = env0_3; const SearchAppsRequestSource = (require(11610) /* metro dependency 11610: SearchAppsRequestSource */).SearchAppsRequestSource; const APP_LAUNCHER = SearchAppsRequestSource.APP_LAUNCHER; object4.source = APP_LAUNCHER; object3.options = object4; Reflect.apply(search, applicationDirectoryActionCreatorsModule, [object3]); } function _fun88941() { // fn#88941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:13560, offset: 0x01ff9dee, size: 53 bytes, params: 1, frame: 12 if (fetches) { env0_11({query: query, page: env0_5, guildId: guild_id}); } } function _fun88885(a0) { // fn#88885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:2544, offset: 0x01ff84e0, size: 19 bytes, params: 2, frame: 2 return !(a0 in env0_0); } function _loop_88886() { // fn#88886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:2606, offset: 0x01ff84f3, size: 108 bytes, params: 1, frame: 17 const r3 = getSection(context, env0_3).sectionCommands ?? []; const binding = env0_1; const push = binding.push; const items2 = []; apply(push, items2, binding, arraySpread(items2, r3, 0, undefined)); r3.forEach(_fun88887); } function _fun88890(a0) { // fn#88890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:3652, offset: 0x01ff8767, size: 154 bytes, params: 2, frame: 20 const value2 = undefined; const commandPermissionUtilsModule = importAll(8039) /* metro dependency 8039: CommandPermissionUtils */; const hasAccess2 = commandPermissionUtilsModule.hasAccess(a0, env1_1, {applicationAllowedForUser: env0_3, applicationAllowedForChannel: env0_4, commandBotId: descriptor == null ? value2 : descriptor.botId, isGuildInstalled: isGuildInstalled, isUserInstalled: isUserInstalled}); const HasAccessResult = (require(8039) /* metro dependency 8039: CommandPermissionUtils */).HasAccessResult; const ALLOWED = HasAccessResult.ALLOWED; return hasAccess2 === ALLOWED; } function _fun88929(a0) { // fn#88929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:10763, offset: 0x01ff963f, size: 85 bytes, params: 2, frame: 14 var r0; var object2; var property; let value = env0_0.get(a0.applicationId); const value2 = null; if (value2 == value) { r0 = value2; } else { object2 = {command: a0, application: value}; value = environment.__proto__; property = commandSectionMap[a0.id]; object2.section = value2 != property ? property : value2; r0 = object2; } return r0; } function _fun88932({application}) { // fn#88932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:10994, offset: 0x01ff97d0, size: 35 bytes, params: 2, frame: 11 const id = application.id; const binding = env0_0; return !binding.has(id); } function _fun88937(a0, a1) { // fn#88937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:12629, offset: 0x01ff9bff, size: 173 bytes, params: 3, frame: 17 let value = environment.__proto__.__proto__; const getSearchResults = ApplicationDirectorySearchStore.getSearchResults; const object2 = {}; object2.query = query; object2.guildId = guild_id; object2.page = a1 + 1; value = undefined; const ApplicationIntegrationType = (require(8042) /* metro dependency 8042: ApplicationIntegrationType */).ApplicationIntegrationType; const USER_INSTALL = ApplicationIntegrationType.USER_INSTALL; object2.integrationType = USER_INSTALL; object2.minUserInstallCommandCount = 1; object2.excludeAppsWithCustomInstallUrl = true; object2.excludeNonEmbeddedApps = env1_3; object2.excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand = true; const SearchAppsRequestSource = (require(11610) /* metro dependency 11610: SearchAppsRequestSource */).SearchAppsRequestSource; const APP_LAUNCHER = SearchAppsRequestSource.APP_LAUNCHER; object2.source = APP_LAUNCHER; const value3 = Reflect.apply(getSearchResults, ApplicationDirectorySearchStore, [object2]); return (value3 == null ? value : value3.results) ?? []; } function _fun88887(a0) { // fn#88887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11794:2691, offset: 0x01ff855f, size: 52 bytes, params: 2, frame: 3 var value2; if (env0_0.descriptor != null) { value2 = environment.__proto__; env1_2[a0.id] = env0_0.descriptor; } }