Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,31 @@
/* Metro module 15110; source: modules/search/native/components/tabs/SearchTabsGradient.tsx; dependencies: [31, 33, 3860, 697, 4000, 12055, 2] */
function _fun115160(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:6, offset: 0x02456087, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsGradient.tsx');
exports.default = SearchTabsGradient;
}
function SearchTabsGradient({state}) { // fn#115161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:224, offset: 0x02456115, size: 68 bytes, params: 2, frame: 16
return ((Component) => <Component state={state} colors={SearchTabsGradientUseGradientColors()} />)(importDefault(12055) /* metro dependency 12055: TabsGradientNative */);
}
function SearchTabsGradientUseGradientColors() { // fn#115162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:269, owner: SearchTabsGradient.useGradientColors, offset: 0x02456159, size: 101 bytes, params: 1, frame: 17
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
return env1_3.useMemo(_fun115163, [Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW])]);
}
function _fun115163() { // fn#115163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15307:375, offset: 0x024561be, size: 60 bytes, params: 1, frame: 14
const binding = env0_0;
const items2 = [binding];
let value = environment.__proto__.__proto__;
value = require(4000) /* metro dependency 4000: ColorUtils */;
items2[1] = value.hexWithOpacity(binding, 0);
return items2;
}
@@ -0,0 +1,323 @@
/* Metro module 15031; source: modules/search/native/components/tabs/SearchTabsLayout.tsx; dependencies: [31, 27, 4792, 9674, 11829, 9615, 661, 33, 4501, 22, 9673, 15032, 1244, 9675, 15033, 9688, 11822, 15108, 15015, 5321, 4017, 11828, 9682, 9683, 1239, 15109, 15110, 8861, 566, 15111, 15112, 15113, 15114, 2] */
function _fun113670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:6, offset: 0x02402dd2, size: 473 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchTabsLayoutStore = importDefault(11829) /* metro dependency 11829: SearchTabsLayoutStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_8 = searchConstantsModule.MESSAGE_SEARCH_RESULT_TABS_SET;
const env0_9 = searchConstantsModule.SEARCH_MESSAGE_TAB_SENTINEL;
const env0_10 = searchConstantsModule.SearchTabs;
const env0_11 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
const value3 = require(33) /* metro dependency 33 */;
const env0_12 = value3.jsx;
const env0_13 = value3.jsxs;
const env0_14 = value3.Fragment;
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({controls: {'flex': 0,
'minHeight': 32}, pages: {flex: 1}});
const env0_16 = (require(22) /* metro dependency 22 */).debounce(_fun113673, 500);
object = {code: 'function SearchTabsLayoutTsx1({contentOffset:contentOffset}){const{isDragging,disallowMemberListGesture}=this.__closure;var _disallowMemberListGe;isDragging.set(true);(_disallowMemberListGe=disallowMemberListGesture)===null||_disallowMemberListGe===void 0||_disallowMemberListGe.set(contentOffset.x>0);}'};
object = {code: 'function SearchTabsLayoutTsx2(){const{isDragging,disallowMemberListGesture}=this.__closure;var _disallowMemberListGe;isDragging.set(false);(_disallowMemberListGe=disallowMemberListGesture)===null||_disallowMemberListGe===void 0||_disallowMemberListGe.set(false);}'};
object = {code: 'function SearchTabsLayoutTsx3({contentOffset:contentOffset}){const{isDragging,disallowMemberListGesture}=this.__closure;if(isDragging.get()){var _disallowMemberListGe;(_disallowMemberListGe=disallowMemberListGesture)===null||_disallowMemberListGe===void 0||_disallowMemberListGe.set(contentOffset.x>0);}}'};
const env0_20 = value.memo(_fun113674);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsLayout.tsx');
exports.default = ConnectedSearchTabsLayout;
}
function NoSearchResultsScreen({searchContext}) { // fn#113671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:462, offset: 0x02402fab, size: 139 bytes, params: 2, frame: 18
env0_3.useEffect(_fun113672, [searchContext]);
const ErrorScreen = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const V6nAfF = (require(1244) /* metro dependency 1244: indexNative */).t.V6nAfF;
return <ErrorScreen text={Reflect.apply(string, intl, [V6nAfF])} />;
}
function _fun113673(a0) { // fn#113673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:402, offset: 0x0240306a, size: 48 bytes, params: 2, frame: 12
return (importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchTabSelected({searchContext: a0});
}
function _fun113674({searchContext, visibleTabs, visibleTabCounts, width}) { // fn#113674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1574, offset: 0x0240309a, size: 1147 bytes, params: 2, frame: 33
var r19;
var r0;
var jsxRuntimeEnv0_14Binding;
var items3;
var Provider;
var object;
var SegmentedControlPages;
var object2;
const env0_3 = width;
let value = undefined;
const styles = useStyles();
let binding = env0_3;
const value3 = binding.useMemo(function() {
visibleTabs.forEach(_fun113676);
return [];
}, [visibleTabCounts, visibleTabs, searchContext, width]);
binding = env0_3;
let useCallback = binding.useCallback;
const {segmentedControlState,
selectedTab} = (require(15108) /* metro dependency 15108: useSearchSegmentedControlState */).useSearchSegmentedControlState({items: value3,
visibleTabs: visibleTabs, onSelectedTabChange: Reflect.apply(useCallback, binding, [_fun113677,
[searchContext]]), width: width});
const setActiveIndex = segmentedControlState.setActiveIndex;
const value7 = env0_3.useMemo(_fun113685, [useSelectMediaTab({searchTabs: visibleTabs,
setActiveIndex: setActiveIndex}), selectedTab]);
binding = env0_3;
const useContext = binding.useContext;
const SwipeForMemberListContext = (require(15015) /* metro dependency 15015: SwipeForMemberListWrapper */).SwipeForMemberListContext;
const value8 = Reflect.apply(useContext, binding, [SwipeForMemberListContext]);
const {gesture, disallowGesture, channelId, screenIndex} = value8 ?? ({});
const value9 = env0_3.useMemo(_fun113686, [gesture]);
const value10 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
binding = env0_3;
useCallback = binding.useCallback;
let closure = D_113687;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 766628353255;
closure.__initData = env0_17;
const value11 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
binding = env0_3;
useCallback = binding.useCallback;
closure = G_113688;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 5683301645106;
closure.__initData = env0_18;
const value12 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
binding = env0_3;
useCallback = binding.useCallback;
closure = A_113689;
closure.__closure = {isDragging: value10, disallowMemberListGesture: disallowGesture};
closure.__workletHash = 229712012692;
closure.__initData = env0_19;
const value13 = Reflect.apply(useCallback, binding, [closure, [disallowGesture, value10]]);
const value14 = env0_3.useCallback(_fun113690, [searchContext]);
env0_3.useEffect(_fun113691, [value8, value14]);
env0_3.useEffect(_fun113693, [channelId, screenIndex, setActiveIndex, value8, value14]);
if (segmentedControlState.items.length === 0) {
r0 = <NoSearchResultsScreen searchContext={searchContext} />;
} else {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
items3 = [<View style={styles.controls}>{((Component) => <Component state={segmentedControlState} />)(importDefault(15109) /* metro dependency 15109: SearchTabsTransitionGroup */)}{((Component) => <Component state={segmentedControlState} />)(importDefault(15110) /* metro dependency 15110: SearchTabsGradient */)}</View>];
var viewBindingProps2 = {style: styles.pages};
Provider = (require(15033) /* metro dependency 15033: SearchTabsPage */).SearchTabsPageContext.Provider;
object = {value: value7};
SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
object2 = {state: segmentedControlState, bounces: value8 == null, nativeGesture: value9};
r19 = value8 != null ? value11 : value;
object2.onBeginDragWorklet = r19;
r19 = value8 != null ? value12 : value;
object2.onEndDragWorklet = r19;
object2.onScrollWorklet = value8 != null ? value13 : value;
items3[1] = <View {...viewBindingProps2}><Provider {...object}><SegmentedControlPages {...object2} /></Provider></View>;
value = <>{items3}</>;
r0 = value;
}
return r0;
}
function ConnectedSearchTabsLayout({searchContext, width}) { // fn#113696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:4546, offset: 0x02403a5f, size: 347 bytes, params: 2, frame: 24
const {visibleTabs, visibleTabCounts,
candidateTabs} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchTabsLayoutStore],
function() {
var object = {};
var searchContextBinding = searchContext;
object.visibleTabs = SearchTabsLayoutStore.getVisibleTabs(searchContextBinding);
object.visibleTabCounts = SearchTabsLayoutStore.getVisibleTabCounts(searchContextBinding);
object.candidateTabs = SearchTabsLayoutStore.getCandidateTabs(searchContextBinding);
return object;
}, [searchContext]);
const value3 = env0_3.useMemo(_fun113698, [candidateTabs]);
const useAutoSearchGuildChannelTabModule = require(15111) /* metro dependency 15111: useAutoSearchGuildChannelTab */;
const useAutoSearchGuildChannelTab = useAutoSearchGuildChannelTabModule.useAutoSearchGuildChannelTab;
let has = value3.has;
const GUILD_CHANNELS = SearchTabs.GUILD_CHANNELS;
Reflect.apply(useAutoSearchGuildChannelTab, useAutoSearchGuildChannelTabModule, [searchContext, !Reflect.apply(has,
value3, [GUILD_CHANNELS])]);
const useAutoSearchMembersTabModule = require(15112) /* metro dependency 15112: useAutoSearchMembersTab */;
const useAutoSearchMembersTab = useAutoSearchMembersTabModule.useAutoSearchMembersTab;
has = value3.has;
const MEMBERS = SearchTabs.MEMBERS;
Reflect.apply(useAutoSearchMembersTab, useAutoSearchMembersTabModule, [searchContext, !Reflect.apply(has, value3,
[MEMBERS])]);
const useAutoSearchPeopleTabModule = require(15113) /* metro dependency 15113: useAutoSearchPeopleTab */;
const useAutoSearchPeopleTab = useAutoSearchPeopleTabModule.useAutoSearchPeopleTab;
has = value3.has;
const PEOPLE = SearchTabs.PEOPLE;
Reflect.apply(useAutoSearchPeopleTab, useAutoSearchPeopleTabModule, [searchContext, !Reflect.apply(has, value3,
[PEOPLE])]);
(require(15114) /* metro dependency 15114: useAutoTrackSearchTabCountsViewedAnalytics */).useAutoTrackSearchTabCountsViewedAnalytics({searchContext: searchContext,
visibleTabCounts: visibleTabCounts, visibleTabs: visibleTabs});
return ((Component) => <Component searchContext={searchContext} visibleTabs={visibleTabs} visibleTabCounts={visibleTabCounts} width={width} />)(env0_20);
}
function _fun113672() { // fn#113672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:532, offset: 0x02403036, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchEmptyResult({searchContext: searchContext});
}
function _fun113675() { // fn#113675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1672, offset: 0x02403515, size: 36 bytes, params: 1, frame: 12
visibleTabs.forEach(_fun113676);
return [];
}
function _fun113677(a0) { // fn#113677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1888, offset: 0x024035de, size: 201 bytes, params: 2, frame: 19
let value = environment.__proto__;
const defaultImport = importDefault(9688) /* metro dependency 9688: SearchSessionAnalyticsManager */;
const setSelectedTab = defaultImport.setSelectedTab;
const searchContextBinding = searchContext;
Reflect.apply(setSelectedTab, defaultImport, [searchContextBinding, a0]);
env1_16(searchContextBinding);
const searchTabFetchId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(searchContextBinding,
SEARCH_MESSAGE_TAB_SENTINEL, SearchQueryStore.getQueryString(searchContextBinding));
const isFetching = SearchMessageStore.getIsFetching(searchTabFetchId);
const isInitialFetchComplete = SearchMessageStore.getIsInitialFetchComplete(searchTabFetchId);
const value7 = MESSAGE_SEARCH_RESULT_TABS_SET.has(a0);
let r3 = value7 ? isInitialFetchComplete : !value7;
r3 = !r3 ? isFetching : r3;
if (!r3) {
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
value.fetchInitialMessagesDebounced(searchContext);
}
}
function useSelectMediaTab({searchTabs, setActiveIndex}) { // fn#113678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2270, offset: 0x024036a7, size: 115 bytes, params: 2, frame: 16
const env0_2 = env1_3.useRef(function() {
setActiveIndex(searchTabs.findIndex(_fun113680));
});
env1_3.useEffect(_fun113681, [searchTabs, setActiveIndex]);
return env1_3.useCallback(_fun113684, []);
}
function _fun113685() { // fn#113685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2569, offset: 0x024037c2, size: 25 bytes, params: 1, frame: 3
return {selectedTab: selectedTab, selectMediaTab: env0_6};
}
function _fun113686() { // fn#113686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2757, offset: 0x024037db, size: 75 bytes, params: 1, frame: 12
var value2;
var value3;
if (gesture != null) {
value2 = environment.__proto__;
value3 = (require(5321) /* metro dependency 5321 */).Gesture.Native();
return value3.simultaneousWithExternalGesture(gesture);
}
}
function D_113687({contentOffset}) { // fn#113687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2898, offset: 0x02403826, size: 67 bytes, params: 2, frame: 13
env0_12.set(true);
let disallowGestureBinding = disallowGesture;
if (disallowGestureBinding != null) {
disallowGestureBinding = disallowGesture;
disallowGestureBinding.set(contentOffset.x > 0);
}
}
function G_113688() { // fn#113688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3087, offset: 0x02403869, size: 47 bytes, params: 1, frame: 12
env0_12.set(false);
if (disallowGesture != null) {
disallowGesture.set(false);
}
}
function A_113689({contentOffset}) { // fn#113689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3257, offset: 0x02403898, size: 67 bytes, params: 2, frame: 12
var disallowGestureBinding;
const binding = env0_12;
const get = binding.get;
if (Reflect.apply(get, binding, [])) {
disallowGestureBinding = disallowGesture;
if (disallowGestureBinding != null) {
disallowGestureBinding = disallowGesture;
disallowGestureBinding.set(contentOffset.x > 0);
}
}
}
function _fun113690() { // fn#113690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3444, offset: 0x024038db, size: 136 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
const deleteSearchQuery = defaultImport.deleteSearchQuery;
const searchContextBinding = searchContext;
Reflect.apply(deleteSearchQuery, defaultImport, [searchContextBinding]);
(importDefault(9682) /* metro dependency 9682: SearchActionCreators */).clearAllSearchMesssages();
(importDefault(9682) /* metro dependency 9682: SearchActionCreators */).clearSearchRecentMessages();
value = require(9675) /* metro dependency 9675: SearchUtils */;
value = value.getSearchContextId(searchContextBinding);
(importDefault(9683) /* metro dependency 9683: SearchTabsFetchManager */).cleanUp(value);
}
function _fun113691() { // fn#113691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3635, offset: 0x02403963, size: 28 bytes, params: 1, frame: 2
if (env0_7 == null) {
return _fun113692;
}
}
function _fun113693() { // fn#113693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3687, offset: 0x0240397f, size: 92 bytes, params: 1, frame: 15
var environment;
var ComponentDispatch;
if (env0_7 != null) {
value = environment.__proto__;
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.CHANNEL_DETAILS_HIDDEN, handleChannelDetailsHidden);
return function() {
var ComponentDispatch = require(dependencyMap[24]).ComponentDispatch;
var CHANNEL_DETAILS_HIDDEN = ComponentActions.CHANNEL_DETAILS_HIDDEN;
ComponentDispatch.unsubscribe(CHANNEL_DETAILS_HIDDEN, handleChannelDetailsHidden);
};
}
}
function _fun113698() { // fn#113698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:4845, offset: 0x02403c02, size: 37 bytes, params: 1, frame: 11
const Set = global.Set;
const candidateTabsBinding = candidateTabs;
const value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(candidateTabsBinding);
return set instanceof Object ? set : value;
}
function _fun113676(a0) { // fn#113676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:1704, offset: 0x02403539, size: 165 bytes, params: 2, frame: 19
const binding = env0_0;
const push = binding.push;
const object2 = {};
const value = environment.__proto__.__proto__;
const value2 = undefined;
object2.label = (require(9675) /* metro dependency 9675: SearchUtils */).getTabTitle(a0);
object2.id = a0;
object2.page = ((Component) => <Component tab={a0} searchContext={searchContext} width={width} />)(importDefault(15033) /* metro dependency 15033: SearchTabsPage */);
object2.count = (visibleTabCounts == null ? value2 : visibleTabCounts[a0]) ?? value2;
Reflect.apply(push, binding, [object2]);
return value2;
}
function _fun113679() { // fn#113679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2346, offset: 0x0240371a, size: 40 bytes, params: 1, frame: 12
setActiveIndex(searchTabs.findIndex(function(a0) {
return a0 === SearchTabs.MEDIA;
}));
}
function _fun113681() { // fn#113681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2415, offset: 0x02403758, size: 26 bytes, params: 1, frame: 2
env0_2.current = function() {
setActiveIndex(searchTabs.findIndex(_fun113683));
};
}
function _fun113684() { // fn#113684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2501, offset: 0x024037b0, size: 18 bytes, params: 1, frame: 9
return env0_2.current();
}
function handleChannelDetailsHidden({channelId, screenIndex}) { // fn#113694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:3898, offset: 0x024039db, size: 70 bytes, params: 2, frame: 16
if (channelId === channelId && screenIndex === screenIndex) {
setActiveIndex(0, false, true);
env1_13();
}
}
function current_113682() { // fn#113682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15228:2430, offset: 0x02403772, size: 40 bytes, params: 1, frame: 12
setActiveIndex(searchTabs.findIndex(function(a0) {
return a0 === SearchTabs.MEDIA;
}));
}
@@ -0,0 +1,213 @@
/* Metro module 15033; source: modules/search/native/components/tabs/SearchTabsPage.tsx; dependencies: [57, 31, 27, 1379, 9615, 661, 33, 4501, 566, 5087, 5072, 11982, 11984, 15034, 15076, 15078, 15082, 15083, 15091, 15093, 15094, 15100, 15107, 44, 8621, 2] */
function _fun113702(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:6, offset: 0x02403e1c, size: 309 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_7 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchTabs;
const env0_8 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
value = value.createContext(undefined);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsPage.tsx');
exports.default = ConnectedSearchTabsPage;
exports.SearchTabsPageContext = value;
}
function SearchTabsPage({tab, searchContext, isFocused, selectMediaTab, width}) { // fn#113703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:269, offset: 0x02403f51, size: 1019 bytes, params: 2, frame: 24
var MEMBERS;
var type;
const [property, env0_1] = env0_3(env0_4.useState(isFocused), 2);
env0_4.useEffect(function() {
global.setTimeout(_fun113705, 10);
}, []);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun113706);
const value4 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel);
const value5 = (require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel);
if (property) {
MEMBERS = SearchTabs.MEMBERS;
if (tab === MEMBERS) {
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
type = searchContext.type;
if (type === SearchTypes.GUILD_CHANNEL) {
if (value5) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11982) /* metro dependency 11982: GuildNSFW */);
}
if (value4) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11984) /* metro dependency 11984: ChannelSpoiler */);
}
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen2 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen2 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
type = searchContext.type;
if (type !== SearchTypes.THREAD) {
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
if (SearchTabs.MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen3 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen3 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
return null;
}
if (value5) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11982) /* metro dependency 11982: GuildNSFW */);
}
if (value4) {
return ((Component) => <Component guildId={searchContext.guildId} channelId={searchContext.channelId} />)(importDefault(11984) /* metro dependency 11984: ChannelSpoiler */);
}
if (SearchTabs.RECENT === tab) {
return ((Component) => <Component onJumpToMedia={selectMediaTab} searchContext={searchContext} width={width} />)(importDefault(15034) /* metro dependency 15034: RecentScreen */);
}
if (SearchTabs.PEOPLE === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15076) /* metro dependency 15076: PeopleScreen */);
}
MEMBERS = SearchTabs.MEMBERS;
if (MEMBERS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15078) /* metro dependency 15078: MembersScreen */);
}
if (SearchTabs.GUILD_CHANNELS === tab) {
return ((Component) => <Component searchContext={searchContext} />)(importDefault(15082) /* metro dependency 15082: ChannelsScreen */);
}
if (SearchTabs.MEDIA === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15083) /* metro dependency 15083: MediaScreen */);
}
if (SearchTabs.FILES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15091) /* metro dependency 15091: FilesScreen */);
}
if (SearchTabs.LINKS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} width={width} />)(importDefault(15093) /* metro dependency 15093: LinksScreen */);
}
if (SearchTabs.THREADS === tab) {
const SearchTabsThreadScreen4 = (require(15094) /* metro dependency 15094: ThreadsScreen */).SearchTabsThreadScreen;
return <SearchTabsThreadScreen4 searchContext={searchContext} />;
}
if (SearchTabs.MESSAGES === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15100) /* metro dependency 15100: MessagesScreen */);
}
if (SearchTabs.PINS === tab) {
return ((Component) => <Component tab={tab} searchContext={searchContext} isFocused={isFocused} />)(importDefault(15107) /* metro dependency 15107: PinsScreen */);
}
}
return null;
}
function ConnectedSearchTabsPage({tab, searchContext, width}) { // fn#113707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:1674, offset: 0x024043b9, size: 194 bytes, params: 2, frame: 21
const value2 = env0_4.useContext(env0_11);
(importDefault(44) /* metro dependency 44 */)(value2 != null, '[SearchTabsPageContext] Context should not be null.');
const styles = useStyles();
return (
<View style={styles.container}>
<SearchTabsPage
isFocused={(importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(value2.selectedTab) === tab}
selectMediaTab={value2.selectMediaTab}
tab={tab}
searchContext={searchContext}
width={width}
/>
</View>
);
}
function _fun113704() { // fn#113704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:411, offset: 0x0240434c, size: 30 bytes, params: 1, frame: 13
global.setTimeout(_fun113705, 10);
}
function _fun113706() { // fn#113706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15230:489, offset: 0x0240436a, size: 79 bytes, params: 1, frame: 14
const value = environment.__proto__;
const getChannel = ChannelStore.getChannel;
const type = searchContext.type;
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
return Reflect.apply(getChannel, ChannelStore,
[type === GUILD_CHANNEL ? searchContext.channelId : searchContext.type !== SearchTypes.THREAD ? undefined : searchContext.channelId]);
}
@@ -0,0 +1,215 @@
/* Metro module 15109; source: modules/search/native/components/tabs/SearchTabsTransitionGroup.tsx; dependencies: [31, 33, 3829, 8859, 4017, 4508, 4577, 4581, 15015, 8859, 2] */
function _fun115146(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:6, offset: 0x02455946, size: 255 bytes, params: 8, frame: 18
const env0_0 = require;
const getItemKey_115147 = function({items}) {
return items.map(_fun115148).join('-');
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
object = {code: "function SearchTabsTransitionGroupTsx1(){const{withSpring,opacity,springStandard,transitionState,TransitionStates,runOnJS,cleanUp}=this.__closure;return{opacity:withSpring(opacity.get(),springStandard,'respect-motion-settings',function(finished){if(finished&&transitionState===TransitionStates.YEETED){runOnJS(cleanUp)();}}),position:opacity.get()===1?'relative':'absolute'};}"};
object = {code: 'function SearchTabsTransitionGroupTsx2(finished){const{transitionState,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&transitionState===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
object = {code: 'function SearchTabsTransitionGroupTsx3(){const{swipeForMemberListContext}=this.__closure;var _swipeForMemberListCo;(_swipeForMemberListCo=swipeForMemberListContext)===null||_swipeForMemberListCo===void 0||_swipeForMemberListCo.disallowGesture.set(false);}'};
object = {code: 'function SearchTabsTransitionGroupTsx4(){const{state}=this.__closure;return state.scrollOffset.get()>0;}'};
object = {code: 'function SearchTabsTransitionGroupTsx5(isOffsetFromStart,prevIsOffsetFromStart){const{swipeForMemberListContext}=this.__closure;if(isOffsetFromStart!==prevIsOffsetFromStart){var _swipeForMemberListCo;(_swipeForMemberListCo=swipeForMemberListContext)===null||_swipeForMemberListCo===void 0||_swipeForMemberListCo.disallowGesture.set(isOffsetFromStart);}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/SearchTabsTransitionGroup.tsx');
exports.default = SearchTabsTransitionGroup;
}
function getItemKey_115147({items}) { // fn#115147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:120, offset: 0x02455a45, size: 44 bytes, params: 2, frame: 11
return items.map(function(a0) {
return a0.id;
}).join('-');
}
function AnimatedTabs({state, transitionState, cleanUp}) { // fn#115149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1532, offset: 0x02455a71, size: 668 bytes, params: 2, frame: 25
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useSharedValue = reanimatedRexportModule.useSharedValue;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const MOUNTED = TransitionStates.MOUNTED;
const value5 = Reflect.apply(useSharedValue, reanimatedRexportModule, [transitionState !== MOUNTED ? 0 : 1]);
const env0_3 = value5;
const moduleValue2 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
let closure = AnimatedTabsF;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.opacity = value5;
object2.springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
object2.transitionState = transitionState;
object2.TransitionStates = TransitionStates;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 10740262883803;
closure.__initData = env0_5;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
let binding = env0_3;
binding.useEffect(_fun115152, [value5, transitionState]);
const value7 = useCountFormatter();
binding = env0_3;
const useContext = binding.useContext;
const SwipeForMemberListContext = (require(15015) /* metro dependency 15015: SwipeForMemberListWrapper */).SwipeForMemberListContext;
const value8 = Reflect.apply(useContext, binding, [SwipeForMemberListContext]);
binding = env0_3;
const useCallback = binding.useCallback;
closure = AnimatedTabsH;
closure.__closure = {swipeForMemberListContext: value8};
closure.__workletHash = 5080152010224;
closure.__initData = env0_7;
const value9 = Reflect.apply(useCallback, binding, [closure, [value8]]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedReaction = moduleValue3.useAnimatedReaction;
closure = AnimatedTabsF_115156;
closure.__closure = {state: state};
closure.__workletHash = 7791091456487;
closure.__initData = env0_8;
const closure2 = AnimatedTabsW;
closure2.__closure = {swipeForMemberListContext: value8};
closure2.__workletHash = 15386779064911;
closure2.__initData = env0_9;
Reflect.apply(useAnimatedReaction, moduleValue3, [closure, closure2]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const Tabs = (require(8859) /* metro dependency 8859: TabsNative */).Tabs;
return (
<View style={value6}>
<Tabs
state={state}
grow={false}
formatCount={value7}
simultaneousHandlers={value8?.gesture}
onEndDrag={value8 != null ? value9 : undefined}
/>
</View>
);
}
function renderItem_115158(a0, a1, a2, a3) { // fn#115158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:3265, offset: 0x02456001, size: 50 bytes, params: 5, frame: 15
return (
<AnimatedTabs
state={a1}
transitionState={a2}
cleanUp={a3}
key={a0}
/>
);
}
function SearchTabsTransitionGroup({state}) { // fn#115159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:3469, offset: 0x02456033, size: 84 bytes, params: 2, frame: 16
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup
items={[state]}
getItemKey={getItemKey_115147}
renderItem={renderItem_115158}
/>
);
}
function AnimatedTabsF() { // fn#115150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1697, owner: AnimatedTabs.f, offset: 0x02455d0d, size: 228 bytes, params: 1, frame: 24
var environment;
const object3 = {};
const value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const value3 = env0_3.get();
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
const closure = fT;
const object4 = {};
object4.transitionState = transitionState;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object4.TransitionStates = TransitionStates;
object4.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object4.cleanUp = cleanUp;
closure.__closure = object4;
closure.__workletHash = 15209468679721;
closure.__initData = env1_6;
object3.opacity = Reflect.apply(withSpring, springModule, [value3, springStandard, 'respect-motion-settings',
closure]);
object3.position = env0_3.get() !== 1 ? 'absolute' : 'relative';
return object3;
}
function _fun115152() { // fn#115152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2325, offset: 0x02455e5c, size: 69 bytes, params: 1, frame: 14
const binding = env0_3;
const set = binding.set;
const transitionStateBinding = transitionState;
const value = environment.__proto__;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [transitionStateBinding !== YEETED ? 1 : 0]);
}
function useCountFormatter() { // fn#115153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2398, owner: AnimatedTabs.useCountFormatter, offset: 0x02455ea1, size: 79 bytes, params: 1, frame: 14
const SearchResultExactCountEnabled = (require(3829) /* metro dependency 3829: UserSettings */).SearchResultExactCountEnabled;
return env1_3.useCallback(_fun115154, [SearchResultExactCountEnabled.useSetting()]);
}
function AnimatedTabsH() { // fn#115155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2681, owner: AnimatedTabs.h, offset: 0x02455f8d, size: 39 bytes, params: 1, frame: 11
if (env0_4 != null) {
env0_4.disallowGesture.set(false);
}
}
function AnimatedTabsF_115156() { // fn#115156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2861, owner: AnimatedTabs.F, offset: 0x02455fb4, size: 30 bytes, params: 1, frame: 9
return state.scrollOffset.get() > 0;
}
function AnimatedTabsW(a0, a1) { // fn#115157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2961, owner: AnimatedTabs.w, offset: 0x02455fd2, size: 47 bytes, params: 3, frame: 12
if (a0 !== a1) {
if (env0_4 != null) {
env0_4.disallowGesture.set(a0);
}
}
}
function fT(a0) { // fn#115151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:1796, owner: AnimatedTabs.f.t, offset: 0x02455df1, size: 107 bytes, params: 2, frame: 13
var r0;
var transitionStateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
transitionStateBinding = transitionState;
value = environment.__proto__.__proto__;
value = transitionStateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
function _fun115154(a0) { // fn#115154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15306:2506, offset: 0x02455ef0, size: 157 bytes, params: 2, frame: 14
var r0;
var value;
if (env0_0) {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(a0);
value = '(' + value + ')';
r0 = value;
} else if (a0 > 1000) {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(1000);
value = '(' + value + '+)';
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = require(8859) /* metro dependency 8859: TabsNative */;
value = value.defaultCountFormatter(a0);
value = '(' + value + ')';
r0 = value;
}
return r0;
}
@@ -0,0 +1,20 @@
/* Metro module 15079; source: modules/search/native/components/tabs/hooks/useContentContainerStyles.tsx; dependencies: [9615, 4501, 2] */
function _fun114083(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15276:6, offset: 0x024137b3, size: 196 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(9615) /* metro dependency 9615: SearchConstants */;
const SEARCH_LIST_SECTION_TOP_PADDING = value.SEARCH_LIST_SECTION_TOP_PADDING;
const SEARCH_ROW_TAP_STATE_PADDING = value.SEARCH_ROW_TAP_STATE_PADDING;
const SEARCH_LIST_HORIZONTAL_PADDING = value.SEARCH_LIST_HORIZONTAL_PADDING;
value = Reflect.apply((require(4501) /* metro dependency 4501: createStyles */).createStyles, value,
[{filesOrLinksContentContainer: {paddingTop: SEARCH_LIST_HORIZONTAL_PADDING,
paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING},
mediaContentContainer: {paddingTop: SEARCH_LIST_SECTION_TOP_PADDING,
paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING},
messagesContentContainer: {paddingTop: SEARCH_LIST_SECTION_TOP_PADDING - SEARCH_ROW_TAP_STATE_PADDING},
membersContentContainer: {paddingTop: SEARCH_LIST_SECTION_TOP_PADDING,
paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useContentContainerStyles.tsx');
exports.useContentContainerStyles = value;
}
@@ -0,0 +1,30 @@
/* Metro module 15084; source: modules/search/native/components/tabs/hooks/useSearchMessages.tsx; dependencies: [4792, 9674, 566, 9675, 2] */
function _fun114134(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:6, offset: 0x02415351, size: 130 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchMessages.tsx');
exports.useSearchMessages = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[2]).useStateFromStores([SearchQueryStore, SearchMessageStore], _fun114136, [a0,
a1]);
};
}
function useSearchMessages(a0, a1) { // fn#114135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:235, offset: 0x024153d3, size: 94 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore, SearchMessageStore],
_fun114136, [a0, a1]);
}
function _fun114136() { // fn#114136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15281:308, offset: 0x02415431, size: 81 bytes, params: 1, frame: 17
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const binding = env0_0;
return SearchMessageStore.getMessages((require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(binding,
require, Reflect.apply(getSearchResultsQuery, SearchQueryStore, [binding])));
}
@@ -0,0 +1,35 @@
/* Metro module 15085; source: modules/search/native/components/tabs/hooks/useSearchMessagesLoadingState.tsx; dependencies: [4792, 9674, 9615, 15040, 566, 9675, 2] */
function _fun114137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:6, offset: 0x02415482, size: 152 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_4 = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_TABS_TO_SEARCH_QUERY_LIMITS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchMessagesLoadingState.tsx');
exports.useSearchMessagesLoadingState = useSearchMessagesLoadingState;
}
function useSearchMessagesLoadingState({searchContext, tab, placeholderHeight, numColumns}) { // fn#114138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:304, offset: 0x0241551a, size: 142 bytes, params: 2, frame: 19
const env0_2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: placeholderHeight,
numColumns: numColumns});
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchQueryStore,
SearchMessageStore], _fun114139);
}
function _fun114139() { // fn#114139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15282:528, offset: 0x024155a8, size: 167 bytes, params: 1, frame: 17
let value = environment.__proto__;
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const searchContextBinding = searchContext;
const searchTabFetchId = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchTabFetchId(searchContextBinding,
tab, Reflect.apply(getSearchResultsQuery, SearchQueryStore, [searchContextBinding]));
const isInitialFetchComplete = SearchMessageStore.getIsInitialFetchComplete(searchTabFetchId);
const isFetching = SearchMessageStore.getIsFetching(searchTabFetchId);
const value7 = !isInitialFetchComplete;
const r3 = isInitialFetchComplete ? isFetching : !value7;
const Math = global.Math;
value = Math.max(env0_2, SEARCH_TABS_TO_SEARCH_QUERY_LIMITS[tab]);
return {isFirstPageLoading: value7, isNextPageLoading: r3,
placeholderCount: isInitialFetchComplete ? r3 ? value : 0 : value};
}
@@ -0,0 +1,123 @@
/* Metro module 15108; source: modules/search/native/components/tabs/hooks/useSearchSegmentedControlState.tsx; dependencies: [31, 4017, 8853, 2] */
function _fun115137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:6, offset: 0x024554f8, size: 210 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
object = {code: 'function useSearchSegmentedControlStateTsx1(){const{visibleTabsStateful}=this.__closure;return visibleTabsStateful;}'};
object = {code: 'function useSearchSegmentedControlStateTsx2(){const{visibleTabs,activeIndex}=this.__closure;return visibleTabs.get()[activeIndex.get()];}'};
object = {code: 'function useSearchSegmentedControlStateTsx3(){const{visibleTabs}=this.__closure;return visibleTabs.get();}'};
object = {code: 'function useSearchSegmentedControlStateTsx4(visibleTabs){const{lastSelectedTab,runOnJS,setActiveIndex}=this.__closure;if(visibleTabs.length===0)return;const lastSelectedTabIndex=visibleTabs.indexOf(lastSelectedTab.get());const targetIndex=Math.max(0,lastSelectedTabIndex);const maxIndex=Math.max(0,visibleTabs.length-1);const nextActiveIndex=Math.min(targetIndex,maxIndex);runOnJS(setActiveIndex)(nextActiveIndex,false);}'};
object = {code: 'function useSearchSegmentedControlStateTsx5(){const{selectedTab}=this.__closure;return selectedTab.get();}'};
object = {code: 'function useSearchSegmentedControlStateTsx6(selectedTab){const{lastSelectedTab,runOnJS,onSelectedTabChange}=this.__closure;if(selectedTab==null)return;lastSelectedTab.set(selectedTab);runOnJS(onSelectedTabChange)(selectedTab);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/hooks/useSearchSegmentedControlState.tsx');
exports.useSearchSegmentedControlState = useSearchSegmentedControlState;
}
function useSearchSegmentedControlState({items, visibleTabs, onSelectedTabChange, width}) { // fn#115138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:1436, offset: 0x024555ca, size: 601 bytes, params: 2, frame: 26
var object2;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(visibleTabs[0]);
const env0_2 = value2;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = function() {
return visibleTabs;
};
closure.__closure = {visibleTabsStateful: visibleTabs};
closure.__workletHash = 17125959946782;
closure.__initData = env0_3;
const value3 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const value4 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({items: items,
defaultIndex: 0, pageWidth: width});
const env0_4 = value4;
const activeIndex = value4.activeIndex;
const env0_5 = activeIndex;
const setActiveIndex = value4.setActiveIndex;
const env0_6 = setActiveIndex;
const moduleValue4 = reanimatedRexportModule;
useDerivedValue = moduleValue4.useDerivedValue;
closure = useSearchSegmentedControlStateX;
closure.__closure = {visibleTabs: value3, activeIndex: activeIndex};
closure.__workletHash = 6189329624535;
closure.__initData = env0_4;
const value5 = Reflect.apply(useDerivedValue, moduleValue4, [closure]);
const env0_7 = value5;
const moduleValue5 = reanimatedRexportModule;
let useAnimatedReaction = moduleValue5.useAnimatedReaction;
closure = useSearchSegmentedControlStateF;
closure.__closure = {visibleTabs: value3};
closure.__workletHash = 9222891018885;
closure.__initData = env0_5;
const closure2 = useSearchSegmentedControlStateV;
object2 = {lastSelectedTab: value2};
const runOnJS = reanimatedRexportModule.runOnJS;
object2.runOnJS = runOnJS;
object2.setActiveIndex = setActiveIndex;
closure2.__closure = object2;
closure2.__workletHash = 13456384876758;
closure2.__initData = env0_6;
Reflect.apply(useAnimatedReaction, moduleValue5, [closure, closure2]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedReaction = moduleValue6.useAnimatedReaction;
closure = useSearchSegmentedControlStateC;
closure.__closure = {selectedTab: value5};
closure.__workletHash = 2491149576387;
closure.__initData = env0_7;
const closure3 = useSearchSegmentedControlStateI;
closure3.__closure = {lastSelectedTab: value2, runOnJS: runOnJS, onSelectedTabChange: onSelectedTabChange};
closure3.__workletHash = 8452224388929;
closure3.__initData = env0_8;
Reflect.apply(useAnimatedReaction, moduleValue6, [closure, closure3]);
return env0_2.useMemo(_fun115145, [value4, value5]);
}
function useSearchSegmentedControlStateX() { // fn#115140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:1836, owner: useSearchSegmentedControlState.x, offset: 0x02455823, size: 35 bytes, params: 1, frame: 10
const binding = env0_3;
let get = binding.get;
const value2 = Reflect.apply(get, binding, []);
const activeIndexBinding = activeIndex;
get = activeIndexBinding.get;
return value2[Reflect.apply(get, activeIndexBinding, [])];
}
function useSearchSegmentedControlStateV(a0) { // fn#115142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2077, owner: useSearchSegmentedControlState.v, offset: 0x02455846, size: 157 bytes, params: 2, frame: 17
var indexOf;
var binding;
var value2;
var Math;
var value3;
var value4;
var value5;
var value6;
var moduleValue;
if (a0.length !== 0) {
indexOf = a0.indexOf;
binding = env0_2;
value2 = Reflect.apply(indexOf, a0, [binding.get()]);
Math = global.Math;
value3 = Math.max(0, value2);
Math = global.Math;
value4 = Math.max(0, a0.length - 1);
Math = global.Math;
value5 = Math.min(value3, value4);
value6 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(setActiveIndex)(value5, false);
}
}
function useSearchSegmentedControlStateI(a0) { // fn#115144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2459, owner: useSearchSegmentedControlState.I, offset: 0x024558e3, size: 74 bytes, params: 2, frame: 13
var value2;
var moduleValue;
if (a0 != null) {
env0_2.set(a0);
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(onSelectedTabChange)(a0);
}
}
function _fun115145() { // fn#115145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15305:2651, offset: 0x0245592d, size: 25 bytes, params: 1, frame: 3
return {segmentedControlState: env0_4, selectedTab: env0_7};
}
@@ -0,0 +1,245 @@
/* Metro module 15082; source: modules/search/native/components/tabs/pages/ChannelsScreen.tsx; dependencies: [31, 11830, 9674, 9615, 9614, 33, 9675, 566, 14549, 14705, 15036, 1244, 3869, 15040, 9673, 15077, 15032, 15044, 2] */
function _fun114106(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:6, offset: 0x0241426e, size: 259 bytes, params: 8, frame: 19
const env0_0 = require;
const getVoiceStates = function(a0, a1, a2) {
return (a0.isGuildStageVoice() ? a2 : a1)[a0.id] ?? EMPTY_VOICE_STATES;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchGuildChannelTabStore = importDefault(11830) /* metro dependency 11830: SearchGuildChannelTabStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_6 = searchConstantsModule.EMPTY_VOICE_STATES;
const env0_7 = searchConstantsModule.SearchListItemTypes;
const env0_8 = searchConstantsModule.CHANNELS_ESTIMATED_ITEM_SIZE;
const env0_9 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(ChannelsScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/ChannelsScreen.tsx');
exports.default = value;
}
function ChannelsScreen({searchContext}) { // fn#114108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:382, offset: 0x024143a2, size: 679 bytes, params: 2, frame: 28
var r0;
var value;
const env0_1 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const textChannels = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchGuildChannelTabStore],
_fun114109);
const voiceChannels = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchGuildChannelTabStore],
_fun114110);
const env0_3 = voiceChannels;
const value2 = (importDefault(14549) /* metro dependency 14549: useVoiceStatesForChannelList */)(searchContext.guildId);
const value3 = (importDefault(14705) /* metro dependency 14705: useStageChannelSpeakerVoiceStates */)(searchContext.guildId);
const value4 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildTextChannel({searchContext: searchContext});
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildVoiceChannel({searchContext: searchContext});
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
});
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.getQueryString(searchContext);
}, [searchContext]);
const binding = env0_3;
binding.useEffect(_fun114113, [textChannels, voiceChannels, value7]);
const usePlaceholderStylesModule = require(15040) /* metro dependency 15040: usePlaceholderStyles */;
const useFullscreenPlaceholderCount = usePlaceholderStylesModule.useFullscreenPlaceholderCount;
const value11 = binding.useMemo(_fun114116, [Reflect.apply(useFullscreenPlaceholderCount,
usePlaceholderStylesModule, [{placeholderHeight: CHANNELS_ESTIMATED_ITEM_SIZE, numColumns: 1}]),
binding.useCallback(_fun114114, [value4, searchContext]), binding.useCallback(_fun114115, [value5,
searchContext]), value6, value3, textChannels, voiceChannels, value2]);
const value12 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else {
r0 = ((Component) => <Component estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value11} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
return r0;
}
function _fun114109() { // fn#114109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:495, offset: 0x02414649, size: 27 bytes, params: 1, frame: 11
return SearchGuildChannelTabStore.getTextChannels(env0_1);
}
function _fun114110() { // fn#114110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:556, offset: 0x02414664, size: 27 bytes, params: 1, frame: 11
return SearchGuildChannelTabStore.getVoiceChannels(env0_1);
}
function _fun114113() { // fn#114113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:886, offset: 0x024146b5, size: 231 bytes, params: 1, frame: 17
var r2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value3;
var value;
if (env0_9.trim() !== '') {
value = textChannels.length + voiceChannels.length;
if (value > 0) {
value3 = environment.__proto__;
value = intl.formatToPlainString(t.ZGVL3g, {count: value});
r2 = value;
} else {
value = environment.__proto__;
value = intl.string(t.f5cMAg);
r2 = value;
}
value = environment.__proto__;
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(r2);
}
}
function _fun114114(a0, a1) { // fn#114114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1196, offset: 0x0241479c, size: 90 bytes, params: 3, frame: 15
env0_6(a0);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
}
function _fun114115(a0, a1) { // fn#114115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1330, offset: 0x024147f6, size: 90 bytes, params: 3, frame: 15
env0_7(a0);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
}
function _fun114116() { // fn#114116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1460, offset: 0x02414850, size: 429 bytes, params: 1, frame: 22
var environment;
var r6;
var push;
var value3;
var SECTION;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var nIfr0Y;
var forEach;
var value4;
var CYnO4s;
var binding;
var binding2;
var value5;
var sort;
var value6;
var value7;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
const items2 = [];
let value = 0;
var env0_1;
let length = textChannels.length;
reducibleJoin2: while (true) {
if (length > value) {
push = items2.push;
value3 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
string = intl.string;
nIfr0Y = t.nIfr0Y;
Reflect.apply(push, items2, [{type: SECTION, props: {title: Reflect.apply(string, intl, [nIfr0Y])}}]);
textChannelsBinding = textChannels;
forEach = textChannelsBinding.forEach;
Reflect.apply(forEach, textChannelsBinding, [_fun114117]);
length = textChannelsBinding.length;
env0_1 = value + length;
break reducibleJoin2;
}
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (voiceChannels.length > value) {
push = items2.push;
value4 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
string = intl.string;
CYnO4s = t.CYnO4s;
Reflect.apply(push, items2, [{type: SECTION, props: {title: Reflect.apply(string, intl, [CYnO4s])}}]);
binding = env0_4;
binding2 = env0_5;
value5 = ((a0, a1) => {
var env0_0 = a0;
var env0_1 = a1;
return _fun114120;
})(binding, binding2);
voiceChannelsBinding = voiceChannels;
sort = voiceChannelsBinding.sort;
value6 = Reflect.apply(sort, voiceChannelsBinding, [value5]);
forEach = value6.forEach;
Reflect.apply(forEach, value6, [_fun114121]);
break reducibleJoin4;
}
break reducibleJoin4;
}
reducibleJoin8: while (true) {
if (env0_8) {
break reducibleJoin8;
}
length = items2.length;
if (value !== length) {
break reducibleJoin8;
}
value7 = environment.__proto__;
if (!(value < env0_10)) {
break reducibleJoin8;
}
r6 = value;
reducibleLoop7: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r6}]);
value = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
if (value < env0_10) {
r6 = value;
continue reducibleLoop7;
}
break reducibleJoin8;
}
}
return items2;
}
function _fun114117({channel, lastMessageId}, a1) { // fn#114117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1584, offset: 0x024149fd, size: 97 bytes, params: 3, frame: 15
const binding = env0_1 + a1;
const push = binding.push;
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
Reflect.apply(push, binding, [{type: GUILD_TEXT_CHANNEL, props: {channel: channel, lastMessageId: lastMessageId,
onPress: onPress_114118}}]);
}
function createSorter(a0, a1) { // fn#114119, offset: 0x02414a79, size: 25 bytes, params: 3, frame: 2
const env0_0 = a0;
const env0_1 = a1;
return _fun114120;
}
function _fun114121(a0, a1) { // fn#114121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:2017, offset: 0x02414af6, size: 153 bytes, params: 3, frame: 19
const binding = env0_1 + a1;
const push = binding.push;
const GUILD_VOICE_CHANNEL = SearchListItemTypes.GUILD_VOICE_CHANNEL;
Reflect.apply(push, binding, [{type: GUILD_VOICE_CHANNEL, props: {channel: a0.channel,
voiceStates: env1_4[a0.channel.id] ?? EMPTY_VOICE_STATES,
speakerVoiceStates: env1_5[a0.channel.id] ?? EMPTY_VOICE_STATES, onPress: onPress_114122}}]);
}
function onPress_114118(a0) { // fn#114118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1699, offset: 0x02414a5e, size: 27 bytes, params: 2, frame: 13
return env2_11(a0, env0_0);
}
function _fun114120({channel}, {channel}) { // fn#114120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:1859, offset: 0x02414a92, size: 100 bytes, params: 3, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const getVoiceStatesBinding = getVoiceStates;
const binding = env0_0;
value = getVoiceStatesBinding(channel, binding, require);
const voiceStatesBinding = getVoiceStatesBinding(channel, binding, require);
return value.length < voiceStatesBinding.length ? 1 : value.length > voiceStatesBinding.length ? -1 : 0;
}
function onPress_114122(a0) { // fn#114122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15279:2198, offset: 0x02414b8f, size: 27 bytes, params: 2, frame: 13
return env2_12(a0, env0_0);
}
@@ -0,0 +1,38 @@
/* Metro module 15032; source: modules/search/native/components/tabs/pages/ErrorScreen.tsx; dependencies: [31, 27, 33, 4501, 5463, 3869, 4573, 2] */
function _fun113699(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15229:6, offset: 0x02403c27, size: 237 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'justifyContent': 'center',
'alignItems': 'center', 'height': '100%', 'display': 'flex'}, text: {'textAlign': 'center', 'width': '75%'}});
value = value.memo(_fun113700);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/ErrorScreen.tsx');
exports.default = value;
}
function _fun113700({text}) { // fn#113700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15229:294, offset: 0x02403d14, size: 206 bytes, params: 2, frame: 20
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
env0_3.useEffect(function() {
var AccessibilityAnnouncer = require(dependencyMap[5]).AccessibilityAnnouncer;
AccessibilityAnnouncer.announce(text, 'polite');
}, [text]);
const items2 = [styles.container];
items2[1] = {paddingBottom: insets.bottom};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={items2}>
<Text
variant="text-sm/medium"
color="text-muted"
style={styles.text}
>
{text}
</Text>
</View>
);
}
@@ -0,0 +1,327 @@
/* Metro module 15078; source: modules/search/native/components/tabs/pages/MembersScreen.tsx; dependencies: [31, 27, 6875, 1379, 1945, 1867, 1934, 11831, 9674, 9615, 9614, 661, 33, 4501, 632, 6771, 9675, 15040, 3789, 1848, 9673, 8743, 1244, 3869, 15079, 15077, 15032, 11382, 15044, 15080, 6789, 11725, 2] */
function _fun114061(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:6, offset: 0x024129c1, size: 470 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(6875) /* metro dependency 6875: ChannelMemberStore */).EVERYONE_CHANNEL_ID;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const searchMemberTabStore = importDefault(11831) /* metro dependency 11831: SearchMemberTabStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_13 = searchConstantsModule.CHANNELS_ESTIMATED_ITEM_SIZE;
const env0_14 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_15 = searchConstantsModule.SearchListItemTypes;
const env0_16 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_17 = constantsModule.RelationshipTypes;
const env0_18 = constantsModule.SearchTypes;
const env0_19 = (require(33) /* metro dependency 33 */).jsx;
const env0_20 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
'flexGrow': 1}, userList: {backgroundColor: 'transparent'}});
value = value.memo(MembersScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/MembersScreen.tsx');
exports.default = value;
}
function SearchableMembersScreen({searchContext, guildId}) { // fn#114062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:523, offset: 0x02412b97, size: 872 bytes, params: 2, frame: 31
var r0;
var value;
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const env0_3 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const results = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchMemberTabStore],
_fun114063);
const env0_4 = results;
const value2 = useMemberScreenChannelId(searchContext);
const channelId = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getChannelId();
});
const value3 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE,
numColumns: 1});
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore],
_fun114067);
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
_fun114068);
const value6 = env0_4.useCallback(_fun114069, [searchContext, value2, channelId, analyticsLocations]);
const value7 = env0_4.useCallback(_fun114070, [searchContext]);
const value8 = env0_4.useCallback(_fun114071, [value6]);
const value9 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchQueryStore],
function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]);
const isFetching = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchMemberTabStore],
_fun114073);
env0_4.useEffect(_fun114074, [results, value9, isFetching]);
const value10 = env0_4.useMemo(_fun114075, [results, isFetching, value9, guildId, value4, value6, value3]);
const value11 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value12 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value12 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value12} />)(value);
r0 = value;
} else if (value9) {
if (value5 != null) {
value = importDefault(11382) /* metro dependency 11382: GuildChannelUserList */;
value = ((Component) => <Component onUserPress={value7} onUserLongPress={value8} channelId={value5} guildId={guildId} disableStickySections listStyleOverride={styles.userList} isNameplatedList canShowDisplayNameStylesFont />)(value);
r0 = value;
} else {
r0 = ((Component) => <Component contentContainerStyle={value11.membersContentContainer} estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value10} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
} else {
r0 = ((Component) => <Component contentContainerStyle={value11.membersContentContainer} estimatedItemSize={CHANNELS_ESTIMATED_ITEM_SIZE} data={value10} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
return r0;
}
function ThreadMembersScreen({searchContext, channelId, guildId}) { // fn#114079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3160, offset: 0x02413486, size: 241 bytes, params: 2, frame: 23
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
let useStateFromStores = useStateFromStoresModule.useStateFromStores;
const value2 = Reflect.apply(useStateFromStores, useStateFromStoresModule, [[ChannelStore], _fun114080]);
const moduleValue2 = useStateFromStoresModule;
useStateFromStores = moduleValue2.useStateFromStores;
return value2 ? <SearchableMembersScreen searchContext={searchContext} guildId={guildId} /> : Reflect.apply(useStateFromStores,
moduleValue2, [[SearchQueryStore], _fun114081,
[searchContext]]) ? ((Component) => <Component channelId={channelId} guildId={guildId} onUserPress={(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard} disableStickySections />)(importDefault(15080) /* metro dependency 15080: ThreadChannelUserList */) : <SearchableMembersScreen searchContext={searchContext} guildId={guildId} />;
}
function MembersScreen({searchContext}) { // fn#114082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3640, offset: 0x024135e4, size: 463 bytes, params: 2, frame: 23
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const SEARCH_MEMBERS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SEARCH_MEMBERS;
const analyticsLocations = defaultImport(SEARCH_MEMBERS).analyticsLocations;
const type = searchContext.type;
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.container}>
{((Component) => <Component channelId={searchContext.channelId} disableStickySections listStyleOverride={styles.userList} onUserPress={(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard} />)(importDefault(11725) /* metro dependency 11725: PrivateChannelUserList */)}
</View>
</AnalyticsLocationProvider>
);
}
const THREAD = SearchTypes.THREAD;
if (THREAD === type) {
return (
<ThreadMembersScreen
searchContext={searchContext}
channelId={searchContext.channelId}
guildId={searchContext.guildId}
/>
);
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<SearchableMembersScreen searchContext={searchContext} guildId={searchContext.guildId} />
</AnalyticsLocationProvider>
);
}
const GUILD = SearchTypes.GUILD;
if (GUILD === type) {
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<SearchableMembersScreen searchContext={searchContext} guildId={searchContext.guildId} />
</AnalyticsLocationProvider>
);
}
const Error = global.Error;
const value = '[MembersScreen] Unsupported search context type: ' + searchContext.type;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function _fun114063() { // fn#114063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:696, offset: 0x02412eff, size: 27 bytes, params: 1, frame: 11
return SearchMemberTabStore.getResults(env0_3);
}
function useMemberScreenChannelId(a0) { // fn#114064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:720, owner: SearchableMembersScreen.useMemberScreenChannelId, offset: 0x02412f1a, size: 128 bytes, params: 2, frame: 17
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SearchQueryStore],
_fun114065, [a0]);
return value2.size === 0 ? EVERYONE_CHANNEL_ID : value2.size !== 1 ? null : global.Array.from(value2)[0];
}
function _fun114067() { // fn#114067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1052, offset: 0x02412fb5, size: 71 bytes, params: 1, frame: 14
var r0;
let value = environment.__proto__;
const guild = GuildStore.getGuild(guildId);
if (guild != null) {
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
value = value.getGuildVisualOwnerId(guild);
r0 = value;
} else {
r0 = undefined;
}
return r0;
}
function _fun114068() { // fn#114068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1171, offset: 0x02412ffc, size: 91 bytes, params: 1, frame: 12
if (env0_5 === EVERYONE_CHANNEL_ID) {
return env0_5;
}
const channel = ChannelStore.getChannel(env0_5);
return channel == null ? env0_5 : channel.isAnnouncementThread() && channel.parent_id != null ? channel.parent_id : env0_5;
}
function _fun114069(a0, a1) { // fn#114069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1311, offset: 0x02413057, size: 175 bytes, params: 3, frame: 18
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const USER = SearchResultContentEntityTypes.USER;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, userId: a0.id, index: a1,
entityType: USER}]);
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id,
channelId: env0_5 !== EVERYONE_CHANNEL_ID ? env0_5 : channelId, sourceAnalyticsLocations: analyticsLocations});
}
function _fun114070({user, index}) { // fn#114070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1546, offset: 0x02413106, size: 119 bytes, params: 2, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const USER = SearchResultContentEntityTypes.USER;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, userId: user.id,
index: index, entityType: USER}]);
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
}
function _fun114071({user, index}) { // fn#114071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1716, offset: 0x0241317d, size: 30 bytes, params: 2, frame: 13
env0_9(user, index);
}
function _fun114073() { // fn#114073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1857, offset: 0x024131b6, size: 27 bytes, params: 1, frame: 11
return SearchMemberTabStore.getIsFetching(env0_3);
}
function _fun114074() { // fn#114074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:1895, offset: 0x024131d1, size: 213 bytes, params: 1, frame: 17
var r2;
var length;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value;
if (!env0_10) {
if (!isFetching) {
length = results.length;
if (length > 0) {
value = environment.__proto__;
value = intl.formatToPlainString(t.ZGVL3g, {count: length});
r2 = value;
} else {
value = environment.__proto__;
value = intl.string(t.tuL9TW);
r2 = value;
}
value = environment.__proto__;
(require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer.announce(r2);
}
}
}
function _fun114075() { // fn#114075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2108, offset: 0x024132a6, size: 142 bytes, params: 1, frame: 17
var environment;
var r5;
var length;
var value2;
var value3;
var push;
var GUILD_CHANNEL_MEMBER_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
results.forEach(_fun114076);
reducibleJoin5: while (true) {
reducibleJoin3: while (true) {
if (isFetching) {
break reducibleJoin3;
}
if (env0_10) {
break reducibleJoin5;
}
length = items2.length;
if (length !== 0) {
break reducibleJoin5;
}
break reducibleJoin3;
}
value2 = 0;
value3 = environment.__proto__;
if (!(value2 < env0_7)) {
break reducibleJoin5;
}
r5 = value2;
reducibleLoop4: while (true) {
push = items2.push;
GUILD_CHANNEL_MEMBER_PLACEHOLDER = SearchListItemTypes.GUILD_CHANNEL_MEMBER_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: GUILD_CHANNEL_MEMBER_PLACEHOLDER,
key: 'guild-channel-member-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_7) {
r5 = value4;
continue reducibleLoop4;
}
break reducibleJoin5;
}
break reducibleJoin5;
}
return items2;
}
function _fun114080() { // fn#114080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3269, offset: 0x02413577, size: 57 bytes, params: 1, frame: 12
var r1;
let value = environment.__proto__;
value = ChannelStore.getChannel(channelId);
if (value == null) {
r1 = undefined;
} else {
value = value.isAnnouncementThread();
r1 = value;
}
return r1 != null && r1;
}
function _fun114081() { // fn#114081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:3398, offset: 0x024135b0, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
return SearchQueryStore.isInitialSearchQuery(searchContext) && !SearchQueryStore.isTagsEmpty(searchContext);
}
function _fun114065() { // fn#114065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:796, offset: 0x02412f9a, size: 27 bytes, params: 1, frame: 11
return SearchQueryStore.getChannelIds(env0_0);
}
function _fun114076(a0, a1) { // fn#114076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2136, offset: 0x02413334, size: 311 bytes, params: 3, frame: 23
var environment;
const env0_0 = a1;
let value = environment.__proto__.__proto__;
const member = GuildMemberStore.getMember(guildId, a0.record.id);
const binding = env0_0;
const push = binding.push;
const GUILD_CHANNEL_MEMBER = SearchListItemTypes.GUILD_CHANNEL_MEMBER;
const NONE = RelationshipTypes.NONE;
value = undefined;
Reflect.apply(push, binding, [{type: GUILD_CHANNEL_MEMBER, props: {type: NONE, user: a0.record,
nickname: member == null ? value : member.nick, usernameColor: member == null ? value : member.colorString,
roleColors: member == null ? value : member.colorStrings, isNameplatedRow: true,
premiumSince: (member == null ? value : member.premiumSince) ?? value, isOwner: env1_8 === a0.record.id,
guildId: guildId, onLongPress: onLongPress_114077, onPress: onPress_114078, start: a1 === 0,
end: a1 === results.length - 1, canShowDisplayNameStylesFont: true}}]);
return value;
}
function onLongPress_114077(a0) { // fn#114077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15275:2490, offset: 0x0241346b, size: 27 bytes, params: 2, frame: 13
return env2_9(a0, require);
}
@@ -0,0 +1,171 @@
/* Metro module 15076; source: modules/search/native/components/tabs/pages/PeopleScreen.tsx; dependencies: [5, 31, 11832, 9674, 9615, 9614, 33, 9675, 566, 15040, 15036, 4603, 9673, 15077, 15032, 15044, 2] */
function _fun114041(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:6, offset: 0x02411fd1, size: 254 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const searchPeopleTabStore = importDefault(11832) /* metro dependency 11832: SearchPeopleTabStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_7 = searchConstantsModule.SearchListItemTypes;
const env0_8 = searchConstantsModule.USER_ESTIMATED_ITEM_SIZE;
const env0_9 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(PeopleScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/PeopleScreen.tsx');
exports.default = value;
}
function PeopleScreen({searchContext}) { // fn#114042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:272, offset: 0x024120cf, size: 494 bytes, params: 2, frame: 24
var r0;
var value;
const env0_1 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const results = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchPeopleTabStore],
_fun114043);
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
});
const value3 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: USER_ESTIMATED_ITEM_SIZE,
numColumns: 1});
const env0_4 = value3;
const value4 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGroupDMItem({searchContext: searchContext});
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressDMItem({searchContext: searchContext});
const binding = env0_4;
const value9 = binding.useMemo(_fun114050, [binding.useCallback(_fun114045(), [value5, searchContext]),
binding.useCallback(_fun114049, [value4, searchContext]), value2, value3, results]);
const value10 = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageTabCountsErrorText({searchContext: searchContext});
if (value10 != null) {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={value10} />)(value);
r0 = value;
} else {
r0 = ((Component) => <Component estimatedItemSize={USER_ESTIMATED_ITEM_SIZE} data={value9} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
return r0;
}
function _fun114043() { // fn#114043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:383, offset: 0x024122bd, size: 27 bytes, params: 1, frame: 11
return SearchPeopleTabStore.getResults(env0_1);
}
function _fun114045() { // fn#114045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:662, offset: 0x024122f3, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun114047);
return _fun114048;
}
function _fun114049(a0, a1) { // fn#114049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:939, offset: 0x024123bb, size: 90 bytes, params: 3, frame: 16
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const CHANNEL = SearchResultContentEntityTypes.CHANNEL;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: a0, index: a1,
entityType: CHANNEL}]);
env0_5(a0);
}
function _fun114050() { // fn#114050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1069, offset: 0x02412415, size: 135 bytes, params: 1, frame: 17
var environment;
var r5;
var length;
var value2;
var value3;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
results.forEach(_fun114051);
reducibleJoin4: while (true) {
if (env0_3) {
break reducibleJoin4;
}
length = items2.length;
value2 = 0;
if (value2 !== length) {
break reducibleJoin4;
}
value3 = environment.__proto__;
if (!(value2 < env0_4)) {
break reducibleJoin4;
}
r5 = value2;
reducibleLoop3: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_4) {
r5 = value4;
continue reducibleLoop3;
}
break reducibleJoin4;
}
}
return items2;
}
function* _fun114047(a0, a1) { // fn#114047, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:682, offset: 0x02412322, size: 153 bytes, params: 3, frame: 19
if (true) {
value = environment.__proto__.__proto__.__proto__;
var value3 = env3_1(env3_2[11]);
var getOrEnsurePrivateChannel = value3.getOrEnsurePrivateChannel;
yield Reflect.apply(getOrEnsurePrivateChannel, value3, [a0]);
var value4 = undefined;
if (false) {
return value4;
}
var value6 = env3_1(env3_2[12]);
var trackSearchResultClicked = value6.trackSearchResultClicked;
var CHANNEL = env3_9.CHANNEL;
Reflect.apply(trackSearchResultClicked, value6, [{searchContext: require, userId: a0, channelId: value4,
index: a1,
entityType: CHANNEL}]);
SearchQueryStore(a0, value4);
}
}
function _fun114051({title, items}) { // fn#114051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1097, offset: 0x0241249c, size: 104 bytes, params: 2, frame: 13
var environment;
var value;
if (title != null) {
if (items.length > 0) {
value = environment.__proto__.__proto__;
title.push({type: SearchListItemTypes.SECTION, props: {title: title}});
}
}
items.forEach(_fun114052);
}
function _fun114052(a0, a1) { // fn#114052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15273:1203, offset: 0x02412504, size: 204 bytes, params: 3, frame: 16
var environment;
var binding;
var push;
var type;
var user;
var firstMatch;
var username;
const env0_0 = a1;
let value = environment.__proto__;
if ('user' in a0) {
type = a0.type;
user = a0.user;
firstMatch = a0.firstMatch;
binding = env1_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
username = user.username;
value = undefined;
Reflect.apply(push, binding, [{type: SearchListItemTypes.DM, section: title, props: {type: type, user: user,
nickname: username === firstMatch ? value : firstMatch, onPress: onPress_114053}}]);
} else {
binding = env1_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [{type: SearchListItemTypes.GROUP_DM, section: title, props: {channel: a0,
onPress: onPress_114054}}]);
}
}
@@ -0,0 +1,602 @@
/* Metro module 15034; source: modules/search/native/components/tabs/pages/RecentScreen.tsx; dependencies: [57, 5, 31, 4792, 11830, 15035, 9674, 9615, 11823, 661, 33, 5278, 11828, 1244, 4573, 7692, 15036, 4603, 9673, 9675, 566, 1485, 15039, 11822, 13344, 5263, 5074, 15040, 15041, 15044, 2] */
function _fun113708(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:6, offset: 0x0240447b, size: 461 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_113711 = 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 Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchGuildChannelTabStore = importDefault(11830) /* metro dependency 11830: SearchGuildChannelTabStore */;
const searchHistoryStore = importDefault(15035) /* metro dependency 15035: SearchHistoryStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_10 = searchConstantsModule.EMPTY_SEARCH_QUERY_STRING;
const env0_11 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_12 = searchConstantsModule.RECENTS_ESTIMATED_ITEM_SIZE;
const env0_13 = searchConstantsModule.SearchListItemTypes;
const env0_14 = searchConstantsModule.SearchTabs;
const env0_15 = (require(11823) /* metro dependency 11823: SearchPlatformConstants */).EMPTY_MEDIA_RESULTS;
const env0_16 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const env0_17 = (require(33) /* metro dependency 33 */).jsx;
const env0_20 = value.memo(_fun113715);
const env0_21 = value.memo(_fun113731);
const env0_22 = value.memo(_fun113740);
value = value.memo(RecentScreenContainer);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/RecentScreen.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_113709(a0, a1) { // fn#113709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:395, offset: 0x02404648, 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 _fun113710;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_113711(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_113711(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_113711(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun113710;
}
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 ClearAllHistory({searchContext}) { // fn#113712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:1325, offset: 0x024047bc, size: 225 bytes, params: 2, frame: 20
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const pressableHighlightProps = {'onPress': null, 'accessibilityRole': 'button', 'unstable_pressDelay': 130,
onPress: onPress_113713};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let LFTAUp = (require(1244) /* metro dependency 1244: indexNative */).t.LFTAUp;
pressableHighlightProps.accessibilityLabel = Reflect.apply(string, intl, [LFTAUp]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
LFTAUp = (require(1244) /* metro dependency 1244: indexNative */).t.LFTAUp;
return (
<PressableHighlight {...pressableHighlightProps}>
<Text variant="text-sm/semibold" color="text-brand">
{Reflect.apply(string, intl, [LFTAUp])}
</Text>
</PressableHighlight>
);
}
function ViewAll({onJumpToMedia}) { // fn#113714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:1670, offset: 0x024048ca, size: 212 bytes, params: 2, frame: 20
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const pressableHighlightProps = {'onPress': null, 'accessibilityRole': 'button', 'unstable_pressDelay': 130,
onPress: onJumpToMedia};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let Ofpgwh = (require(1244) /* metro dependency 1244: indexNative */).t.Ofpgwh;
pressableHighlightProps.accessibilityLabel = Reflect.apply(string, intl, [Ofpgwh]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
Ofpgwh = (require(1244) /* metro dependency 1244: indexNative */).t.Ofpgwh;
return (
<PressableHighlight {...pressableHighlightProps}>
<Text variant="text-sm/semibold" color="text-brand">
{Reflect.apply(string, intl, [Ofpgwh])}
</Text>
</PressableHighlight>
);
}
function _fun113715({searchContext, onJumpToMedia, width, suggestedData}) { // fn#113715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:1987, offset: 0x0240499e, size: 489 bytes, params: 2, frame: 29
const {messages, isLoadingMediaGrid,
isInitialSearchQuery} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchQueryStore,
SearchMessageStore], _fun113716);
const env0_5 = isInitialSearchQuery;
const value4 = useSearchHistory((require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext));
const value5 = (importDefault(15039) /* metro dependency 15039: useSearchMediaSize */)(width);
const binding = env0_5;
const value6 = binding.useMemo(_fun113722, [messages, searchContext]);
const value8 = binding.useCallback(_fun113724, [messages,
(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMediaItem({searchContext: searchContext,
allMediaResults: value6})]);
const usePlaceholderStylesModule = require(15040) /* metro dependency 15040: usePlaceholderStyles */;
const useFullscreenPlaceholderCount = usePlaceholderStylesModule.useFullscreenPlaceholderCount;
return ((Component) => <Component estimatedItemSize={RECENTS_ESTIMATED_ITEM_SIZE} data={binding.useMemo(_fun113726,
[value8, isInitialSearchQuery, value6, value5, onJumpToMedia, Reflect.apply(useFullscreenPlaceholderCount,
usePlaceholderStylesModule, [{placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE, numColumns: 1}]), searchContext,
value4, suggestedData])} ListFooterComponent={binding.useMemo(_fun113729, [isLoadingMediaGrid,
value5])} />)(importDefault(15044) /* metro dependency 15044: SearchList */);
}
function _fun113731(a0) { // fn#113731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4264, offset: 0x02405141, size: 74 bytes, params: 2, frame: 15
return ((Component) => <Component {...a0} {...{['suggestedData']: useSuggestedUsersData({searchContext: a0.searchContext})}} />)(env0_20);
}
function _fun113740(a0) { // fn#113740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5180, offset: 0x024053d1, size: 74 bytes, params: 2, frame: 15
return ((Component) => <Component {...a0} {...{['suggestedData']: useSuggestedChannelsData({searchContext: a0.searchContext})}} />)(env0_20);
}
function RecentScreenContainer({searchContext, onJumpToMedia, width}) { // fn#113747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5903, offset: 0x02405661, size: 190 bytes, params: 2, frame: 17
const type = searchContext.type;
const DMS = SearchTypes.DMS;
if (DMS === type) {
return ((Component) => <Component searchContext={searchContext} onJumpToMedia={onJumpToMedia} width={width} />)(env0_21);
}
const GUILD = SearchTypes.GUILD;
if (GUILD === type) {
return ((Component) => <Component searchContext={searchContext} onJumpToMedia={onJumpToMedia} width={width} />)(env0_22);
}
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
if (GUILD_CHANNEL === type) {
return ((Component) => <Component searchContext={searchContext} onJumpToMedia={onJumpToMedia} width={width} />)(env0_20);
}
const CHANNEL = SearchTypes.CHANNEL;
if (CHANNEL === type) {
return ((Component) => <Component searchContext={searchContext} onJumpToMedia={onJumpToMedia} width={width} />)(env0_20);
}
return null;
}
function ClearAllHistoryOnPress() { // fn#113713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:1386, owner: ClearAllHistory.onPress, offset: 0x0240489d, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
return value.clearSearchHistory(searchContext);
}
function _fun113716() { // fn#113716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2103, offset: 0x02404b87, size: 129 bytes, params: 1, frame: 17
const getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
const searchContextBinding = searchContext;
const value3 = Reflect.apply(getSearchResultsQuery, SearchQueryStore, [searchContextBinding]);
const searchUtilsModule = require(9675) /* metro dependency 9675: SearchUtils */;
const getSearchTabFetchId = searchUtilsModule.getSearchTabFetchId;
const MEDIA = SearchTabs.MEDIA;
const value4 = Reflect.apply(getSearchTabFetchId, searchUtilsModule, [searchContextBinding, MEDIA, value3]);
const object2 = {};
object2.messages = SearchMessageStore.getMessages(value4);
const getIsInitialFetchComplete = SearchMessageStore.getIsInitialFetchComplete;
object2.isLoadingMediaGrid = !Reflect.apply(getIsInitialFetchComplete, SearchMessageStore, [value4]);
object2.isInitialSearchQuery = SearchQueryStore.isInitialSearchQuery(searchContextBinding);
return object2;
}
function useSearchHistory(a0) { // fn#113717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2384, offset: 0x02404c08, size: 124 bytes, params: 2, frame: 17
var environment;
let env0_0 = a0;
let value = environment.__proto__;
const binding = env1_5;
const [property, env0_1] = env1_3(binding.useState(_fun113718), 2);
value = require(1485) /* metro dependency 1485 */;
const useFocusEffect = value.useFocusEffect;
const useCallback = binding.useCallback;
Reflect.apply(useFocusEffect, value, [Reflect.apply(useCallback, binding, [function() {
var closure = _fun113720;
var env0_0 = closure;
closure();
SearchHistoryStore.addReactChangeListener(closure);
return _fun113721;
}, [a0]])]);
return property;
}
function _fun113722() { // fn#113722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2764, offset: 0x02404d10, size: 178 bytes, params: 1, frame: 23
var environment;
var r2;
var value5;
var moduleValue;
var media;
var value7;
if (messages == null) {
value = environment.__proto__;
return EMPTY_MEDIA_RESULTS;
}
let length = messages.length;
if (length === 0) {
value = environment.__proto__;
return EMPTY_MEDIA_RESULTS;
}
const items2 = [];
const value3 = _createForOfIteratorHelperLoose_113709(messages);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
while (true) {
value5 = r2.value;
moduleValue = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
media = moduleValue.getMedia(searchContext, [value5]);
media.forEach(_fun113723);
length = items2.length;
if (length >= 9) {
break;
}
value7 = value3();
done = value7.done;
if (done) {
break;
}
r2 = value7;
continue;
}
}
return items2;
}
function _fun113724({media, originView}) { // fn#113724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:3060, offset: 0x02404dc2, size: 181 bytes, params: 2, frame: 18
var showAgeVerificationGetStartedModal;
var object2;
var value;
const r7 = messages?.find(function({id}) {
return id === media.messageId;
});
const explicitMediaRedactionNativeUtilsModule = require(13344) /* metro dependency 13344: ExplicitMediaRedactionNativeUtils */;
if (explicitMediaRedactionNativeUtilsModule.shouldAgeVerifyForSearchMedia(media, r7)) {
value = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
showAgeVerificationGetStartedModal = value.showAgeVerificationGetStartedModal;
object2 = {};
object2.entryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint.SEARCH_MEDIA_PREVIEW;
Reflect.apply(showAgeVerificationGetStartedModal, value, [object2]);
} else {
env0_9(media, originView);
}
}
function _fun113726() { // fn#113726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:3413, offset: 0x02404e91, size: 531 bytes, params: 1, frame: 23
var environment;
var r7;
var length;
var value2;
var value3;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
var object;
var value5;
var SECTION;
var object4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var ZZpBr4;
var jsxRuntimeEnv1_17Binding;
var binding;
var forEach;
var object7;
var value6;
var object8;
var LBYpDH;
var MEDIA_GRID;
var slice;
const items2 = [];
if (!isInitialSearchQuery) {
length = items2.length;
value2 = 0;
reducibleJoin5: while (true) {
if (value2 === length) {
value3 = environment.__proto__;
if (value2 < env0_11) {
r7 = value2;
reducibleLoop3: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r7}]);
value4 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
if (value4 < env0_11) {
r7 = value4;
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
return items2;
}
break reducibleJoin5;
}
}
reducibleJoin7: while (true) {
if (env0_6.length > 0) {
push = items2.push;
object = {};
value5 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
object.type = SECTION;
object4 = {};
string = intl.string;
ZZpBr4 = t.ZZpBr4;
object4.title = Reflect.apply(string, intl, [ZZpBr4]);
jsxRuntimeEnv1_17Binding = jsxRuntimeEnv1_17;
object4.trailing = <ClearAllHistory searchContext={searchContext} />;
object.props = object4;
Reflect.apply(push, items2, [object]);
binding = env0_6;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun113727]);
break reducibleJoin7;
}
break reducibleJoin7;
}
let suggestedDataBinding = suggestedData;
reducibleJoin9: while (true) {
if (suggestedDataBinding == null) {
break reducibleJoin9;
}
suggestedDataBinding = suggestedData;
forEach = suggestedDataBinding.forEach;
Reflect.apply(forEach, suggestedDataBinding, [_fun113728]);
break reducibleJoin9;
}
reducibleJoin11: while (true) {
if (env0_8.length > 0) {
push = items2.push;
object7 = {};
value6 = environment.__proto__;
SECTION = SearchListItemTypes.SECTION;
object7.type = SECTION;
object8 = {};
string = intl.string;
LBYpDH = t.LBYpDH;
object8.title = Reflect.apply(string, intl, [LBYpDH]);
jsxRuntimeEnv1_17Binding = jsxRuntimeEnv1_17;
object8.trailing = <ViewAll onJumpToMedia={onJumpToMedia} />;
object7.props = object8;
Reflect.apply(push, items2, [object7]);
push = items2.push;
MEDIA_GRID = SearchListItemTypes.MEDIA_GRID;
binding = env0_8;
slice = binding.slice;
Reflect.apply(push, items2, [{type: MEDIA_GRID, props: {media: Reflect.apply(slice, binding, [0, 9]),
mediaSize: env0_7, onPress: env0_10, animate: true}}]);
break reducibleJoin11;
}
break reducibleJoin11;
}
return items2;
}
function _fun113729() { // fn#113729, offset: 0x024050e6, size: 23 bytes, params: 1, frame: 2
return isLoadingMediaGrid ? _fun113730 : null;
}
function useSuggestedUsersData({searchContext}) { // fn#113732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4282, offset: 0x0240518b, size: 185 bytes, params: 2, frame: 18
var environment;
let value = environment.__proto__;
const value2 = (importDefault(7692) /* metro dependency 7692: useUserListData */)({'query': null,
'withGuildMembers': false, 'withAffinitySuggestions': true, 'affinitySuggestionsLimit': 3, 'withFriends': false,
'withFriendSuggestions': false, 'withFriendRequests': false, 'withFriendRequestsIncoming': false,
'withFriendRequestsOutgoing': false, 'excludeCurrentUser': true, query: EMPTY_SEARCH_QUERY_STRING});
const value3 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressDMItem({searchContext: searchContext});
const binding = env1_5;
const useCallback = binding.useCallback;
value = _fun113733();
value = Reflect.apply(useCallback, binding, [value, [value3, searchContext]]);
return binding.useMemo(_fun113737, [value, value2]);
}
function useSuggestedChannelsData({searchContext}) { // fn#113741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5198, offset: 0x0240541b, size: 235 bytes, params: 2, frame: 19
var environment;
const value = environment.__proto__;
const env0_1 = (require(9675) /* metro dependency 9675: SearchUtils */).getSearchContextId(searchContext);
const textChannels = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchGuildChannelTabStore],
_fun113742);
const value2 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildTextChannel({searchContext: searchContext});
const binding = env1_5;
return binding.useMemo(_fun113745, [binding.useCallback(_fun113744, [value2, searchContext]),
binding.useMemo(function() {
return textChannels.slice(0, 3);
}, [textChannels])]);
}
function _fun113718() { // fn#113718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2431, offset: 0x02404c84, size: 27 bytes, params: 1, frame: 11
return SearchHistoryStore.getSearchHistory(env0_0);
}
function _fun113719() { // fn#113719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2529, offset: 0x02404c9f, size: 46 bytes, params: 1, frame: 12
const closure = handleChange_113720;
closure();
SearchHistoryStore.addReactChangeListener(closure);
return function() {
SearchHistoryStore.removeReactChangeListener(handleChange_113720);
};
}
function _fun113727(a0) { // fn#113727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:3703, offset: 0x024050a4, size: 66 bytes, params: 2, frame: 13
const binding = env0_0;
const push = binding.push;
const SEARCH_HISTORY_ITEM = SearchListItemTypes.SEARCH_HISTORY_ITEM;
Reflect.apply(push, binding, [{type: SEARCH_HISTORY_ITEM, props: {searchHistoryItem: a0,
searchContext: searchContext}}]);
}
function _fun113730() { // fn#113730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4092, offset: 0x024050fd, size: 68 bytes, params: 1, frame: 14
const RecentsMediaGridPlaceholder = (require(15041) /* metro dependency 15041: MediaGridPlaceholder */).RecentsMediaGridPlaceholder;
return (
<RecentsMediaGridPlaceholder
numRows={3}
visible
size={env1_7}
/>
);
}
function _fun113733() { // fn#113733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4641, offset: 0x02405244, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun113735);
return _fun113736;
}
function _fun113737() { // fn#113737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4882, offset: 0x024052ef, size: 51 bytes, params: 1, frame: 13
if (env0_1.length !== 0) {
env0_1.forEach(_fun113738);
}
return [];
}
function _fun113742() { // fn#113742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5325, offset: 0x02405506, size: 27 bytes, params: 1, frame: 11
return SearchGuildChannelTabStore.getTextChannels(env0_1);
}
function _fun113744(a0) { // fn#113744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5463, offset: 0x0240553a, size: 68 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSuggestedSearchClicked({searchContext: searchContext,
channelId: a0});
env0_3(a0);
}
function _fun113745() { // fn#113745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5568, offset: 0x0240557e, size: 147 bytes, params: 1, frame: 20
var environment;
var push;
var object3;
var value2;
var object4;
var intl;
const items2 = [];
if (env0_4.length !== 0) {
push = items2.push;
object3 = {};
value2 = environment.__proto__.__proto__;
object3.type = SearchListItemTypes.SECTION;
object4 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object4.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HbJ7eD);
object3.props = object4;
Reflect.apply(push, items2, [object3]);
env0_4.forEach(_fun113746);
}
return items2;
}
function handleChange_113720() { // fn#113720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:2534, offset: 0x02404ccd, size: 38 bytes, params: 1, frame: 12
const value = environment.__proto__;
env1_1(SearchHistoryStore.getSearchHistory(env1_0));
}
function* _fun113735(a0) { // fn#113735, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4661, offset: 0x02405273, size: 124 bytes, params: 2, frame: 18
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var value3 = env4_1(env4_2[17]);
var getOrEnsurePrivateChannel = value3.getOrEnsurePrivateChannel;
yield Reflect.apply(getOrEnsurePrivateChannel, value3, [a0]);
var value4 = undefined;
if (false) {
return value4;
}
value = env4_1(env4_2[18]);
value.trackSuggestedSearchClicked({searchContext: env2_0, channelId: value4});
env2_2(a0, value4);
}
}
function _fun113738({title, items}) { // fn#113738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:4928, offset: 0x02405322, size: 106 bytes, params: 2, frame: 14
var environment;
var binding;
var push;
let value = items.length !== 0;
if (value && title != null) {
binding = env0_0;
push = binding.push;
value = environment.__proto__.__proto__.__proto__;
Reflect.apply(push, binding, [{type: SearchListItemTypes.SECTION, props: {title: title}}]);
items.forEach(_fun113739);
}
}
function _fun113746({channel, lastMessageId}) { // fn#113746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5696, offset: 0x02405611, size: 80 bytes, params: 2, frame: 14
const binding = env0_0;
const push = binding.push;
const GUILD_TEXT_CHANNEL = SearchListItemTypes.GUILD_TEXT_CHANNEL;
Reflect.apply(push, binding, [{type: GUILD_TEXT_CHANNEL, props: {channel: channel, lastMessageId: lastMessageId,
onPress: env1_5}}]);
}
function _fun113739({user}) { // fn#113739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15231:5026, offset: 0x0240538c, size: 69 bytes, params: 2, frame: 13
const binding = env1_0;
const push = binding.push;
const DM = SearchListItemTypes.DM;
Reflect.apply(push, binding, [{type: DM, props: {user: user, onPress: env2_3}}]);
}
@@ -0,0 +1,116 @@
/* Metro module 15086; source: modules/search/native/components/tabs/pages/messages/BaseMessagesScreen.tsx; dependencies: [31, 4792, 9674, 9614, 33, 9673, 566, 9675, 15077, 15087, 11822, 15088, 15089, 15032, 15044, 2] */
function _fun114140(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:6, offset: 0x0241564f, size: 209 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const env0_6 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/BaseMessagesScreen.tsx');
exports.default = BaseMessagesScreen;
exports.trackMessageItemPress = trackMessageItemPress;
}
function BaseMessagesScreen({data, searchContext, tab, isFocused, isFirstPageLoading, isNextPageLoading, estimatedItemSize, contentContainerStyle, ItemSeparatorComponent, numColumns}) { // fn#114141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:187, offset: 0x02415720, size: 659 bytes, params: 2, frame: 34
const env0_3 = isFocused;
let r0 = isFirstPageLoading || isNextPageLoading;
var value;
const {isIndexing, isHistoricalIndexing,
documentsIndexed} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SearchQueryStore,
SearchMessageStore], function() {
var searchContextBinding = searchContext;
var value4 = require(dependencyMap[7]).getSearchTabFetchId(searchContextBinding, tab,
SearchQueryStore.getSearchResultsQuery(searchContextBinding));
var object = {};
object.isIndexing = SearchMessageStore.getIsIndexing(value4);
object.isHistoricalIndexing = SearchMessageStore.getIsHistoricalIndexing(value4);
object.documentsIndexed = SearchMessageStore.getDocumentsIndexed(value4);
return object;
});
const {hasError, errorText, isErrorFullscreen, isErrorToast,
showErrorToast} = (require(15077) /* metro dependency 15077: useSearchScreenError */).useMessageSearchErrorScreen({searchContext: searchContext,
tab: tab, hasListItems: data.length > 0});
let value4 = (require(15087) /* metro dependency 15087: SearchFetchPendingManager */).useSearchFetchPendingManager(searchContext);
const binding = env0_3;
const value5 = binding.useCallback(_fun114143, [data.length, r0, isFocused, hasError, searchContext, tab, value4]);
binding.useEffect(_fun114144, [isFocused, r0, searchContext, value4, tab]);
binding.useEffect(_fun114145, [isErrorToast, r0, isFocused, showErrorToast]);
const value6 = binding.useMemo(_fun114146, [documentsIndexed, isHistoricalIndexing, searchContext, tab]);
if (isIndexing) {
value = importDefault(15089) /* metro dependency 15089: SearchIndexingScreen */;
value = ((Component) => <Component searchContext={searchContext} />)(value);
r0 = value;
} else if (isErrorFullscreen) {
if (r0) {
value = importDefault(15044) /* metro dependency 15044: SearchList */;
value = ((Component) => <Component contentContainerStyle={contentContainerStyle} data={data} estimatedItemSize={estimatedItemSize} onEndReached={value5} ListHeaderComponent={value6} ItemSeparatorComponent={ItemSeparatorComponent} numColumns={numColumns} />)(value);
r0 = value;
} else {
value = importDefault(15032) /* metro dependency 15032: ErrorScreen */;
value = ((Component) => <Component text={errorText} />)(value);
r0 = value;
}
} else {
value = importDefault(15044) /* metro dependency 15044: SearchList */;
value = ((Component) => <Component contentContainerStyle={contentContainerStyle} data={data} estimatedItemSize={estimatedItemSize} onEndReached={value5} ListHeaderComponent={value6} ItemSeparatorComponent={ItemSeparatorComponent} numColumns={numColumns} />)(value);
r0 = value;
}
return r0;
}
function trackMessageItemPress({searchContext, channelId, messageId, index}) { // fn#114147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1607, offset: 0x02415b8d, size: 146 bytes, params: 2, frame: 18
const message = SearchMessageStore.getMessage(messageId);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const MESSAGE = SearchResultContentEntityTypes.MESSAGE;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: channelId,
messageId: messageId, userId: message == null || message.author == null ? undefined : message.author.id,
index: index, entityType: MESSAGE}]);
}
function _fun114143() { // fn#114143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:935, offset: 0x02415a31, size: 151 bytes, params: 1, frame: 14
var binding;
var value2;
var defaultImport;
if (data.length !== 0) {
if (env0_4) {
binding = env0_10;
binding.add(tab);
} else if (isFocused) {
if (hasError) {
binding = env0_10;
binding.add(tab);
} else {
value2 = environment.__proto__;
defaultImport = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
defaultImport.fetchNextMessages(searchContext, tab);
}
} else {
binding = env0_10;
binding.add(tab);
}
}
}
function _fun114144() { // fn#114144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1060, offset: 0x02415ac8, size: 48 bytes, params: 1, frame: 13
var binding;
if (isFocused && !env0_4) {
binding = env0_10;
binding.flush(searchContext, tab);
}
}
function _fun114145() { // fn#114145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1113, offset: 0x02415af8, size: 41 bytes, params: 1, frame: 10
if (isErrorToast && !env0_4 && isFocused) {
showErrorToast();
}
}
function _fun114146() { // fn#114146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15283:1162, offset: 0x02415b21, size: 108 bytes, params: 1, frame: 16
const isHistoricalIndexingBinding = isHistoricalIndexing;
const value2 = null;
return isHistoricalIndexingBinding && value2 != documentsIndexed && documentsIndexed > 0 ? ((Component) => <Component searchContext={searchContext} documentsIndexed={documentsIndexed} tab={tab} />)(importDefault(15088) /* metro dependency 15088: SearchHistoricalIndexingHeader */) : value2;
}
@@ -0,0 +1,132 @@
/* Metro module 15091; source: modules/search/native/components/tabs/pages/messages/FilesScreen.tsx; dependencies: [31, 9615, 33, 15079, 15084, 15092, 15036, 15086, 15085, 11822, 15090, 15043, 2] */
function _fun114169(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:6, offset: 0x02416384, size: 204 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_4 = searchConstantsModule.SearchListItemTypes;
const env0_5 = searchConstantsModule.CARD_ESTIMATED_ITEM_SIZE;
const env0_6 = searchConstantsModule.FILES_OR_LINKS_NUM_COLUMNS;
const env0_7 = searchConstantsModule.FILES_OR_LINKS_GAP_WIDTH;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(FilesScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/FilesScreen.tsx');
exports.default = value;
}
function FilesScreen({searchContext, tab, isFocused, width}) { // fn#114170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:258, offset: 0x02416450, size: 410 bytes, params: 2, frame: 29
const value2 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value3 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const value4 = (require(15092) /* metro dependency 15092: useFileOrLinkImageDimensions */).useFileOrLinkImageDimensions(width);
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext});
const binding = value5;
const value6 = binding.useCallback(_fun114171, [value5, searchContext]);
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: CARD_ESTIMATED_ITEM_SIZE, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
const value8 = binding.useMemo(_fun114172, [value6, value4, value3, placeholderCount]);
const baseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const filesOrLinksContentContainer = value2.filesOrLinksContentContainer;
const CardVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).CardVerticalSeparator;
return ((Component) => <Component data={value8} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={CARD_ESTIMATED_ITEM_SIZE} contentContainerStyle={filesOrLinksContentContainer} ItemSeparatorComponent={CardVerticalSeparator} numColumns={FILES_OR_LINKS_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(baseMessagesScreen);
}
function _fun114172() { // fn#114172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:815, offset: 0x02416644, size: 282 bytes, params: 1, frame: 25
var environment;
var r9;
var binding;
var forEach;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object;
var FILE_OR_LINK_PLACEHOLDER;
var HermesInternal;
var concat;
var object4;
var getGridItemSpacingStyles;
const items2 = [];
let value = 0;
const env0_1 = value;
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114173]);
break reducibleJoin2;
}
reducibleJoin5: while (true) {
if (!(placeholderCount > value)) {
break reducibleJoin5;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: FILES_OR_LINKS_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value < value4)) {
break reducibleJoin5;
}
r9 = value;
reducibleLoop4: while (true) {
push = items2.push;
object = {};
FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
object.type = FILE_OR_LINK_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object.key = 'file-or-link-placeholder-' + r9;
object4 = {imageStyle: env0_2};
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getGridItemSpacingStyles = value.getGridItemSpacingStyles;
object4.containerStyle = Reflect.apply(getGridItemSpacingStyles, value, [{itemIndex: length + r9,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS}]);
object.props = object4;
Reflect.apply(push, items2, [object]);
value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value < value4) {
r9 = value;
continue reducibleLoop4;
}
break reducibleJoin5;
}
}
return items2;
}
function _fun114173(a0) { // fn#114173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:856, offset: 0x0241675e, size: 80 bytes, params: 2, frame: 12
var environment;
let value = environment.__proto__.__proto__;
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
value = value.getFiles(a0);
value.forEach(_fun114174);
env0_1 = env0_1 + value.length;
}
function _fun114174(a0, a1) { // fn#114174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:897, offset: 0x024167ae, size: 154 bytes, params: 3, frame: 18
const value2 = env1_1 + a1;
const binding = env1_0;
const push = binding.push;
const object3 = {};
const FILE = SearchListItemTypes.FILE;
object3.type = FILE;
const object4 = {data: a0, onPress: onPress_114175};
object4.imageStyle = env2_2;
object4.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getGridItemSpacingStyles({itemIndex: value2,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function onPress_114175(a0) { // fn#114175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15288:957, offset: 0x02416848, size: 27 bytes, params: 2, frame: 13
return env3_4(a0, env0_0);
}
@@ -0,0 +1,158 @@
/* Metro module 15093; source: modules/search/native/components/tabs/pages/messages/LinksScreen.tsx; dependencies: [31, 9615, 33, 15079, 15084, 15092, 15036, 15085, 15086, 11822, 15090, 15043, 2] */
function _fun114179(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:6, offset: 0x0241696b, size: 204 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_4 = searchConstantsModule.SearchListItemTypes;
const env0_5 = searchConstantsModule.CARD_ESTIMATED_ITEM_SIZE;
const env0_6 = searchConstantsModule.FILES_OR_LINKS_NUM_COLUMNS;
const env0_7 = searchConstantsModule.FILES_OR_LINKS_GAP_WIDTH;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(LinksScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/LinksScreen.tsx');
exports.default = value;
}
function LinksScreen({searchContext, tab, isFocused, width}) { // fn#114180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:258, offset: 0x02416a37, size: 545 bytes, params: 2, frame: 31
const value2 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value3 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const value4 = (require(15092) /* metro dependency 15092: useFileOrLinkImageDimensions */).useFileOrLinkImageDimensions(width);
const value5 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext});
const env0_3 = value5;
const value6 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressSearchLink(searchContext);
const value7 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressGuildVoiceChannel({searchContext: searchContext});
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: CARD_ESTIMATED_ITEM_SIZE, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
const binding = env0_3;
const value12 = binding.useMemo(_fun114184, [binding.useCallback(_fun114183, [value7, searchContext]),
binding.useCallback(_fun114182, [value6, searchContext]), binding.useCallback(_fun114181, [value5,
searchContext]), value4, value3, placeholderCount, searchContext]);
const baseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const filesOrLinksContentContainer = value2.filesOrLinksContentContainer;
const CardVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).CardVerticalSeparator;
return ((Component) => <Component data={value12} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={CARD_ESTIMATED_ITEM_SIZE} contentContainerStyle={filesOrLinksContentContainer} ItemSeparatorComponent={CardVerticalSeparator} numColumns={FILES_OR_LINKS_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(baseMessagesScreen);
}
function _fun114181({channelId, messageId}, a1) { // fn#114181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:764, offset: 0x02416c58, size: 90 bytes, params: 3, frame: 17
const value = environment.__proto__;
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_3(channelId, messageId);
}
function _fun114182({channelId, messageId, url, trusted}, a1) { // fn#114182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:910, offset: 0x02416cb2, size: 101 bytes, params: 3, frame: 19
const value = environment.__proto__;
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_4(url, trusted);
}
function _fun114183({channelId, messageId, mentionedChannelId}, a1) { // fn#114183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1072, offset: 0x02416d17, size: 95 bytes, params: 3, frame: 17
const value = environment.__proto__;
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: channelId, messageId: messageId, index: a1});
env0_5(mentionedChannelId);
}
function _fun114184() { // fn#114184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1233, offset: 0x02416d76, size: 282 bytes, params: 1, frame: 25
var environment;
var r9;
var binding;
var forEach;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object;
var FILE_OR_LINK_PLACEHOLDER;
var HermesInternal;
var concat;
var object4;
var getGridItemSpacingStyles;
const items2 = [];
let value = 0;
const env0_1 = value;
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114185]);
break reducibleJoin2;
}
reducibleJoin5: while (true) {
if (!(placeholderCount > value)) {
break reducibleJoin5;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: FILES_OR_LINKS_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value < value4)) {
break reducibleJoin5;
}
r9 = value;
reducibleLoop4: while (true) {
push = items2.push;
object = {};
FILE_OR_LINK_PLACEHOLDER = SearchListItemTypes.FILE_OR_LINK_PLACEHOLDER;
object.type = FILE_OR_LINK_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object.key = 'file-or-link-placeholder-' + r9;
object4 = {imageStyle: env0_2};
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getGridItemSpacingStyles = value.getGridItemSpacingStyles;
object4.containerStyle = Reflect.apply(getGridItemSpacingStyles, value, [{itemIndex: length + r9,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS}]);
object.props = object4;
Reflect.apply(push, items2, [object]);
value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value < value4) {
r9 = value;
continue reducibleLoop4;
}
break reducibleJoin5;
}
}
return items2;
}
function _fun114185(a0) { // fn#114185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1274, offset: 0x02416e90, size: 88 bytes, params: 2, frame: 14
var environment;
let value = environment.__proto__.__proto__;
const getLinks = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getLinks;
value = Reflect.apply(getLinks, value, [searchContext, a0]);
value.forEach(_fun114186);
env0_1 = env0_1 + value.length;
}
function _fun114186(a0, a1) { // fn#114186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1317, offset: 0x02416ee8, size: 178 bytes, params: 3, frame: 18
const value2 = env1_1 + a1;
const binding = env1_0;
const push = binding.push;
const object3 = {};
const LINK = SearchListItemTypes.LINK;
object3.type = LINK;
const object4 = {data: a0, onPress: onPress_114187, onPressSearchLink: onPressSearchLink,
onPressGuildVoiceChannelMention: onPressGuildVoiceChannelMention};
object4.imageStyle = env2_2;
object4.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getGridItemSpacingStyles({itemIndex: value2,
spacing: FILES_OR_LINKS_GAP_WIDTH, numColumns: FILES_OR_LINKS_NUM_COLUMNS});
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function onPressGuildVoiceChannelMention(a0) { // fn#114189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15290:1447, offset: 0x02416f9a, size: 27 bytes, params: 2, frame: 13
return env3_9(a0, env0_0);
}
@@ -0,0 +1,209 @@
/* Metro module 15083; source: modules/search/native/components/tabs/pages/messages/MediaScreen.tsx; dependencies: [31, 4792, 9674, 9615, 11823, 661, 33, 15079, 15039, 15084, 15085, 11822, 4007, 9675, 9545, 15036, 13344, 5263, 5074, 15086, 15090, 15043, 2] */
function _fun114123(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:6, offset: 0x02414baa, size: 280 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_6 = searchConstantsModule.SearchListItemTypes;
const env0_7 = searchConstantsModule.MEDIA_NUM_COLUMNS;
const env0_8 = searchConstantsModule.MEDIA_ITEM_GAP_WIDTH;
const env0_9 = searchConstantsModule.SearchMediaTypes;
const env0_10 = (require(11823) /* metro dependency 11823: SearchPlatformConstants */).EMPTY_MEDIA_RESULTS;
const env0_11 = (require(661) /* metro dependency 661: Constants */).MEDIA_MODAL_KEY;
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(MediaScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/MediaScreen.tsx');
exports.default = value;
}
function MediaScreen({searchContext, tab, isFocused, width}) { // fn#114124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:315, offset: 0x02414cc2, size: 493 bytes, params: 2, frame: 32
const value2 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const value3 = (importDefault(15039) /* metro dependency 15039: useSearchMediaSize */)(width);
const value4 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const env0_3 = value4;
const {isFirstPageLoading, isNextPageLoading,
placeholderCount} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: value3, numColumns: MEDIA_NUM_COLUMNS});
const binding = env0_3;
const value6 = binding.useMemo(_fun114125, [value4, searchContext]);
const value10 = binding.useMemo(_fun114131, [binding.useCallback(_fun114129,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMediaItem({searchContext: searchContext,
allMediaResults: value6, onEndReached: binding.useCallback(_fun114126, [searchContext, tab]),
onEndReachedThreshold: 500}), searchContext, value4]), value6, value3, placeholderCount]);
const baseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const mediaContentContainer = value2.mediaContentContainer;
const MediaVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MediaVerticalSeparator;
return ((Component) => <Component data={value10} searchContext={searchContext} tab={tab} isFocused={isFocused} estimatedItemSize={value3} contentContainerStyle={mediaContentContainer} ItemSeparatorComponent={MediaVerticalSeparator} numColumns={MEDIA_NUM_COLUMNS} isFirstPageLoading={isFirstPageLoading} isNextPageLoading={isNextPageLoading} />)(baseMessagesScreen);
}
function _fun114125() { // fn#114125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:648, offset: 0x02414eaf, size: 69 bytes, params: 1, frame: 14
var r0;
var value2;
var moduleValue;
var value;
if (env0_3 != null) {
value2 = environment.__proto__;
moduleValue = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
r0 = moduleValue.getMedia(searchContext, env0_3);
} else {
value = environment.__proto__;
r0 = EMPTY_MEDIA_RESULTS;
}
return r0;
}
function _fun114126() { // fn#114126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:710, offset: 0x02414ef4, size: 60 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
value.fetchNextMessages(searchContext, tab, _fun114127);
}
function _fun114129({media, originView}, a1) { // fn#114129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1200, offset: 0x02415070, size: 248 bytes, params: 3, frame: 18
var object2;
var showAgeVerificationGetStartedModal;
var value;
const r7 = env0_3?.find(function({id}) {
return id === media.messageId;
});
const explicitMediaRedactionNativeUtilsModule = require(13344) /* metro dependency 13344: ExplicitMediaRedactionNativeUtils */;
if (explicitMediaRedactionNativeUtilsModule.shouldAgeVerifyForSearchMedia(media, r7)) {
value = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
showAgeVerificationGetStartedModal = value.showAgeVerificationGetStartedModal;
object2 = {};
object2.entryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint.SEARCH_MEDIA_PREVIEW;
Reflect.apply(showAgeVerificationGetStartedModal, value, [object2]);
} else {
(require(15086) /* metro dependency 15086: BaseMessagesScreen */).trackMessageItemPress({searchContext: searchContext,
channelId: media.channelId, messageId: media.messageId, index: a1});
env0_6(media, originView);
}
}
function _fun114131() { // fn#114131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1581, offset: 0x02415168, size: 295 bytes, params: 1, frame: 26
var environment;
var r9;
var length;
var value3;
var moduleValue;
var getAdjustedPlaceholderCount;
var value4;
var push;
var object;
var MEDIA_PLACEHOLDER;
var value5;
var HermesInternal;
var concat;
var object4;
var moduleValue2;
var getMediaGridItemStyles;
var length2;
var value6;
const items2 = [];
env0_5.forEach(_fun114132);
const placeholderCountBinding = placeholderCount;
const value2 = 0;
reducibleJoin3: while (true) {
if (!(placeholderCountBinding > value2)) {
break reducibleJoin3;
}
length = items2.length;
value3 = environment.__proto__;
moduleValue = require(15090) /* metro dependency 15090: PlaceholderUtils */;
getAdjustedPlaceholderCount = moduleValue.getAdjustedPlaceholderCount;
value4 = Reflect.apply(getAdjustedPlaceholderCount, moduleValue, [{numColumns: MEDIA_NUM_COLUMNS,
numResults: length, placeholderCount: placeholderCount}]);
if (!(value2 < value4)) {
break reducibleJoin3;
}
r9 = value2;
reducibleLoop2: while (true) {
push = items2.push;
object = {};
MEDIA_PLACEHOLDER = SearchListItemTypes.MEDIA_PLACEHOLDER;
object.type = MEDIA_PLACEHOLDER;
value5 = length + r9;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
object.key = 'media-placeholder-' + value5;
object4 = {size: env0_2};
moduleValue2 = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
getMediaGridItemStyles = moduleValue2.getMediaGridItemStyles;
length2 = env0_5.length;
object4.containerStyle = Reflect.apply(getMediaGridItemStyles, moduleValue2, [{itemIndex: length + r9,
numItems: length2, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH - 2}]);
object.props = object4;
Reflect.apply(push, items2, [object]);
value6 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
if (value6 < value4) {
r9 = value6;
continue reducibleLoop2;
}
break reducibleJoin3;
}
}
return items2;
}
function _fun114127() { // fn#114127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:748, offset: 0x02414f30, size: 221 bytes, params: 1, frame: 19
var environment;
var getSearchResultsQuery;
var value2;
var searchContextBinding;
var value3;
var moduleValue2;
var messages;
let value = environment.__proto__.__proto__;
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (navigationRouteUtilsNativeModule.isModalOpen(MEDIA_MODAL_KEY)) {
getSearchResultsQuery = SearchQueryStore.getSearchResultsQuery;
value2 = environment.__proto__;
searchContextBinding = searchContext;
value3 = Reflect.apply(getSearchResultsQuery, SearchQueryStore, [searchContextBinding]);
moduleValue2 = require(9675) /* metro dependency 9675: SearchUtils */;
messages = SearchMessageStore.getMessages(moduleValue2.getSearchTabFetchId(searchContextBinding, tab, value3));
if (messages != null) {
value = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
value = value.getMedia(searchContext, messages);
value.forEach(_fun114128);
value = require(9545) /* metro dependency 9545: useMediaViewerSources */;
value.setMediaViewerSources({sources: []});
}
}
}
function _fun114132(a0, a1) { // fn#114132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1609, offset: 0x0241528f, size: 167 bytes, params: 3, frame: 19
const binding = a1;
const push = binding.push;
const object3 = {};
const MEDIA = SearchListItemTypes.MEDIA;
object3.type = MEDIA;
const object4 = {media: a0};
object4.size = env1_2;
object4.onPress = onPress_114133;
object4.containerStyle = (require(11822) /* metro dependency 11822: SearchPlatformUtils */).getMediaGridItemStyles({itemIndex: a1,
numItems: env1_5.length, numColumns: MEDIA_NUM_COLUMNS, spacing: MEDIA_ITEM_GAP_WIDTH - 2});
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function _fun114128(a0) { // fn#114128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:928, offset: 0x0241500d, size: 99 bytes, params: 2, frame: 13
var binding;
const type = a0.type;
const value = environment.__proto__.__proto__.__proto__;
const ATTACHMENT = SearchMediaTypes.ATTACHMENT;
if (!(type !== ATTACHMENT && a0.type !== SearchMediaTypes.EMBED && a0.type !== SearchMediaTypes.COMPONENT)) {
binding = env0_0;
binding.push(a0.sources);
}
}
function onPress_114133(a0) { // fn#114133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15280:1668, offset: 0x02415336, size: 27 bytes, params: 2, frame: 13
return env2_7(a0, require);
}
@@ -0,0 +1,130 @@
/* Metro module 15100; source: modules/search/native/components/tabs/pages/messages/MessagesScreen.tsx; dependencies: [31, 9674, 9615, 33, 15084, 566, 15036, 15086, 15101, 15085, 15090, 15079, 15043, 2] */
function _fun114244(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:6, offset: 0x0241952b, size: 250 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_5 = searchConstantsModule.SEARCH_FILTERS_BY_TAB;
const env0_6 = searchConstantsModule.SearchFilter;
const env0_7 = searchConstantsModule.SEARCH_PINNED_MESSAGES_LINE_CLAMP;
const env0_8 = searchConstantsModule.SEARCH_MESSAGES_DEFAULT_LINE_CLAMP;
const env0_9 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_10 = searchConstantsModule.SearchListItemTypes;
const env0_11 = searchConstantsModule.MESSAGE_ESTIMATED_ITEM_SIZE;
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(MessagesScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/MessagesScreen.tsx');
exports.default = value;
}
function MessagesScreen({searchContext, tab, isFocused}) { // fn#114245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:366, offset: 0x02419625, size: 545 bytes, params: 2, frame: 28
const value2 = (require(15084) /* metro dependency 15084: useSearchMessages */).useSearchMessages(searchContext,
tab);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.getSearchResultsQuery(searchContext);
}, [searchContext]);
const value4 = (require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext});
const env0_3 = value4;
let binding = env0_3;
const value5 = binding.useCallback(_fun114247, [value4, searchContext]);
const env0_5 = binding.useRef({});
const property = SEARCH_FILTERS_BY_TAB[tab];
const Pins = SearchFilter.Pins;
const r16 = property === Pins ? SEARCH_PINNED_MESSAGES_LINE_CLAMP : SEARCH_MESSAGES_DEFAULT_LINE_CLAMP;
binding = env0_3;
const value6 = binding.useMemo(_fun114248, [r16, value3]);
const {placeholderCount, isFirstPageLoading,
isNextPageLoading} = (require(15085) /* metro dependency 15085: useSearchMessagesLoadingState */).useSearchMessagesLoadingState({searchContext: searchContext,
tab: tab, placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE, numColumns: 1});
const value8 = binding.useMemo(_fun114249, [value5, r16, value2, value6, placeholderCount]);
const value9 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const BaseMessagesScreen = importDefault(15086) /* metro dependency 15086: BaseMessagesScreen */;
const messagesContentContainer = value9.messagesContentContainer;
const MessageVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MessageVerticalSeparator;
return (
<BaseMessagesScreen
data={value8}
searchContext={searchContext}
tab={tab}
isFocused={isFocused}
estimatedItemSize={MESSAGE_ESTIMATED_ITEM_SIZE}
contentContainerStyle={messagesContentContainer}
ItemSeparatorComponent={MessageVerticalSeparator}
isFirstPageLoading={isFirstPageLoading}
isNextPageLoading={isNextPageLoading}
/>
);
}
function _fun114248() { // fn#114248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:780, offset: 0x02419861, size: 58 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(15101) /* metro dependency 15101: MessageSearchResultParser */;
const binding = env0_2;
const binding2 = env0_6;
const value3 = Object.create(value.prototype, {constructor: {value: value}});
value = new value(binding, binding2);
return value instanceof Object ? value : value3;
}
function _fun114249() { // fn#114249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:988, offset: 0x0241989b, size: 181 bytes, params: 1, frame: 17
var r3;
var binding;
var forEach;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
reducibleJoin2: while (true) {
if (env0_1 == null) {
break reducibleJoin2;
}
binding = env0_1;
forEach = binding.forEach;
Reflect.apply(forEach, binding, [_fun114250]);
break reducibleJoin2;
}
const adjustedPlaceholderCount = (require(15090) /* metro dependency 15090: PlaceholderUtils */).getAdjustedPlaceholderCount({numColumns: 1,
numResults: items2.length, placeholderCount: placeholderCount});
const value3 = 0;
if (value3 < adjustedPlaceholderCount) {
r3 = value3;
reducibleLoop3: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r3}]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (value4 < adjustedPlaceholderCount) {
r3 = value4;
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
return items2;
}
function _fun114250(a0, a1) { // fn#114250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:1022, offset: 0x02419950, size: 109 bytes, params: 3, frame: 17
const binding = a1;
const push = binding.push;
const object3 = {};
const MESSAGE = SearchListItemTypes.MESSAGE;
object3.type = MESSAGE;
const object4 = {};
object4.message = env1_7.parse(a0);
object4.onPress = onPress_114251;
object4.lineClamp = env1_6;
object4.messageSizeCacheRef = env1_5;
object3.props = object4;
Reflect.apply(push, binding, [object3]);
}
function onPress_114251(a0) { // fn#114251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15297:1087, offset: 0x024199bd, size: 27 bytes, params: 2, frame: 13
return env2_4(a0, require);
}
@@ -0,0 +1,183 @@
/* Metro module 15107; source: modules/search/native/components/tabs/pages/messages/PinsScreen.tsx; dependencies: [31, 11169, 4792, 9674, 9615, 9614, 661, 33, 566, 15040, 11168, 15036, 9673, 15079, 15044, 15043, 15100, 2] */
function _fun115125(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:6, offset: 0x02454e0e, size: 326 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelPinsStore = importDefault(11169) /* metro dependency 11169: ChannelPinsStore */;
const env0_5 = (require(11169) /* metro dependency 11169: ChannelPinsStore */).FetchState;
const searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_8 = searchConstantsModule.MESSAGE_PLACEHOLDER_ITEM_SIZE;
const env0_9 = searchConstantsModule.SearchListItemTypes;
const env0_10 = searchConstantsModule.SEARCH_PINNED_MESSAGES_LINE_CLAMP;
const env0_11 = searchConstantsModule.MESSAGE_ESTIMATED_ITEM_SIZE;
const env0_12 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchResultContentEntityTypes;
const env0_13 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(PinsScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/PinsScreen.tsx');
exports.default = value;
}
function InitialPinsScreen({searchContext, isFocused}) { // fn#115126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:376, offset: 0x02454f54, size: 487 bytes, params: 2, frame: 23
var object2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]);
const value3 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).useFullscreenPlaceholderCount({placeholderHeight: MESSAGE_PLACEHOLDER_ITEM_SIZE,
numColumns: 1});
const env0_3 = value3;
env0_3.useEffect(_fun115128, [isFocused, value2, searchContext.channelId]);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelPinsStore],
_fun115129);
const items2 = value4.items;
const showLoading = value4.showLoading;
const value6 = env0_3.useCallback(_fun115130,
[(require(15036) /* metro dependency 15036: useOnPressSearchItem */).useOnPressMessageItem({searchContext: searchContext}),
searchContext]);
const env0_8 = env0_3.useRef({});
const value7 = env0_3.useMemo(_fun115131, [value3, value6, showLoading, items2]);
const value8 = (require(15079) /* metro dependency 15079: useContentContainerStyles */).useContentContainerStyles();
const SearchList = importDefault(15044) /* metro dependency 15044: SearchList */;
object2 = {contentContainerStyle: value8.messagesContentContainer, data: value7, onEndReached: onEndReached,
estimatedItemSize: MESSAGE_ESTIMATED_ITEM_SIZE};
const MessageVerticalSeparator = (require(15043) /* metro dependency 15043: Separators */).MessageVerticalSeparator;
object2.ItemSeparatorComponent = MessageVerticalSeparator;
return <SearchList {...object2} />;
}
function PinsScreen({searchContext, tab, isFocused}) { // fn#115135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1806, offset: 0x0245540f, size: 233 bytes, params: 2, frame: 21
var r0;
var value;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
if (Reflect.apply(useStateFromStores, fluxModule, [[SearchQueryStore], function() {
return SearchQueryStore.isInitialSearchQuery(searchContext);
}, [searchContext]])) {
if (searchContext.type === SearchTypes.CHANNEL) {
r0 = <InitialPinsScreen searchContext={searchContext} tab={tab} isFocused={isFocused} />;
} else if (searchContext.type === SearchTypes.GUILD_CHANNEL) {
r0 = <InitialPinsScreen searchContext={searchContext} tab={tab} isFocused={isFocused} />;
} else if (searchContext.type !== SearchTypes.THREAD) {
value = importDefault(15100) /* metro dependency 15100: MessagesScreen */;
value = ((Component) => <Component searchContext={searchContext} tab={tab} isFocused={isFocused} />)(value);
r0 = value;
} else {
r0 = <InitialPinsScreen searchContext={searchContext} tab={tab} isFocused={isFocused} />;
}
} else {
value = importDefault(15100) /* metro dependency 15100: MessagesScreen */;
value = ((Component) => <Component searchContext={searchContext} tab={tab} isFocused={isFocused} />)(value);
r0 = value;
}
return r0;
}
function _fun115128() { // fn#115128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:597, offset: 0x02455156, size: 66 bytes, params: 1, frame: 12
var value2;
var defaultImport;
if (env0_2 && isFocused) {
value2 = environment.__proto__;
defaultImport = importDefault(11168) /* metro dependency 11168: ChannelPinActionCreators */;
defaultImport.fetchPins(searchContext.channelId);
}
}
function _fun115129() { // fn#115129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:706, offset: 0x02455198, size: 87 bytes, params: 1, frame: 14
const value = environment.__proto__;
const pins = ChannelPinsStore.getPins(searchContext.channelId);
return {items: pins?.items, showLoading: pins == null || pins.state === FetchState.LOADING};
}
function _fun115130({channelId, messageId}, a1) { // fn#115130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:916, offset: 0x024551ef, size: 155 bytes, params: 3, frame: 21
const message = SearchMessageStore.getMessage(messageId);
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
const trackSearchResultClicked = defaultImport.trackSearchResultClicked;
const MESSAGE = SearchResultContentEntityTypes.MESSAGE;
Reflect.apply(trackSearchResultClicked, defaultImport, [{searchContext: searchContext, channelId: channelId,
messageId: messageId, userId: message == null || message.author == null ? undefined : message.author.id,
index: a1, entityType: MESSAGE}]);
env0_6(channelId, messageId);
}
function _fun115131() { // fn#115131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1170, offset: 0x0245528a, size: 134 bytes, params: 1, frame: 17
var environment;
var r5;
var forEach;
var value2;
var value3;
var push;
var MESSAGE_PLACEHOLDER;
var HermesInternal;
var concat;
var value4;
const items2 = [];
let itemsBinding = items;
reducibleJoin2: while (true) {
if (itemsBinding == null) {
break reducibleJoin2;
}
itemsBinding = items;
forEach = itemsBinding.forEach;
Reflect.apply(forEach, itemsBinding, [_fun115132]);
break reducibleJoin2;
}
reducibleJoin5: while (true) {
if (!showLoading) {
break reducibleJoin5;
}
value2 = 0;
value3 = environment.__proto__;
if (!(value2 < env0_3)) {
break reducibleJoin5;
}
r5 = value2;
reducibleLoop4: while (true) {
push = items2.push;
MESSAGE_PLACEHOLDER = SearchListItemTypes.MESSAGE_PLACEHOLDER;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(push, items2, [{type: MESSAGE_PLACEHOLDER, key: 'message-placeholder-' + r5}]);
value4 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
if (value4 < env0_3) {
r5 = value4;
continue reducibleLoop4;
}
break reducibleJoin5;
}
}
return items2;
}
function InitialPinsScreenOnEndReached() { // fn#115134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1613, owner: InitialPinsScreen.onEndReached, offset: 0x024553a2, size: 109 bytes, params: 1, frame: 19
var pinnedAt;
var value3;
let value = environment.__proto__;
value = undefined;
const defaultImport = importDefault(11168) /* metro dependency 11168: ChannelPinActionCreators */;
const fetchPins = defaultImport.fetchPins;
const channelId = searchContext.channelId;
if (items == null) {
pinnedAt = value;
} else {
value3 = items.at(-1);
pinnedAt = value3 == null ? value : value3.pinnedAt;
}
Reflect.apply(fetchPins, defaultImport, [channelId, {before: pinnedAt}]);
return value;
}
function _fun115132({message}, a1) { // fn#115132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1207, offset: 0x02455310, size: 99 bytes, params: 3, frame: 15
const binding = a1;
const push = binding.push;
const MESSAGE = SearchListItemTypes.MESSAGE;
Reflect.apply(push, binding, [{type: MESSAGE, props: {message: message, onPress: onPress_115133,
lineClamp: SEARCH_PINNED_MESSAGES_LINE_CLAMP, messageSizeCacheRef: env1_8}}]);
}
function onPress_115133({channelId, messageId}) { // fn#115133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15304:1273, offset: 0x02455373, size: 47 bytes, params: 2, frame: 13
return env2_7({channelId: channelId, messageId: messageId}, require);
}
@@ -0,0 +1,84 @@
/* Metro module 15087; source: modules/search/native/components/tabs/pages/messages/SearchFetchPendingManager.tsx; dependencies: [7, 6, 31, 11822, 6518, 2] */
function _fun114148(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:6, offset: 0x02415c1f, size: 165 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = value(SearchFetchPendingManager);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchFetchPendingManager.tsx');
exports.useSearchFetchPendingManager = useSearchFetchPendingManager;
}
function SearchFetchPendingManager() { // fn#114149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:131, offset: 0x02415cc4, size: 129 bytes, params: 1, frame: 14
env0_2(this, SearchFetchPendingManager);
const Set = global.Set;
this.pending = new Set();
this.add = add_114150;
this.remove = remove_114151;
this.has = has_114152;
this.flush = flush_114153;
this.reset = reset_114154;
}
function useSearchFetchPendingManager(a0) { // fn#114155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:599, offset: 0x02415e1f, size: 86 bytes, params: 2, frame: 15
const env0_0 = a0;
const value2 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun114156);
env0_3.useEffect(_fun114157, [a0, value2]);
return value2;
}
function SearchFetchPendingManagerAdd(a0) { // fn#114150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:232, owner: SearchFetchPendingManager.add, offset: 0x02415d45, size: 30 bytes, params: 2, frame: 11
env0_0.pending.add(a0);
}
function SearchFetchPendingManagerRemove(a0) { // fn#114151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:269, owner: SearchFetchPendingManager.remove, offset: 0x02415d63, size: 30 bytes, params: 2, frame: 11
env0_0.pending.delete(a0);
}
function SearchFetchPendingManagerHas(a0) { // fn#114152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:306, owner: SearchFetchPendingManager.has, offset: 0x02415d81, size: 28 bytes, params: 2, frame: 11
return env0_0.pending.has(a0);
}
function SearchFetchPendingManagerFlush(a0, a1) { // fn#114153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:340, owner: SearchFetchPendingManager.flush, offset: 0x02415d9d, size: 85 bytes, params: 3, frame: 14
var value2;
var defaultImport;
const binding = env0_0;
if (binding.has(a1)) {
value2 = environment.__proto__;
defaultImport = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
if (defaultImport.fetchNextMessages(a0, a1)) {
env0_0.remove(a1);
}
}
}
function SearchFetchPendingManagerReset() { // fn#114154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:422, owner: SearchFetchPendingManager.reset, offset: 0x02415df2, size: 45 bytes, params: 1, frame: 10
const binding = env0_0;
const Set = global.Set;
binding.pending = new Set();
}
function _fun114156() { // fn#114156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:655, offset: 0x02415e75, size: 29 bytes, params: 1, frame: 9
let value = environment.__proto__;
const binding = env1_4;
value = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding();
return binding2 instanceof Object ? binding2 : value;
}
function _fun114157() { // fn#114157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:687, offset: 0x02415e92, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */;
return value.subscribeTextInputValue(env0_0, _fun114158);
}
function _fun114158(a0, a1) { // fn#114158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15284:726, offset: 0x02415ec9, size: 31 bytes, params: 3, frame: 9
var value;
if (a1 !== a0) {
value = environment.__proto__;
env1_1.reset();
}
}
@@ -0,0 +1,55 @@
/* Metro module 15088; source: modules/search/native/components/tabs/pages/messages/SearchHistoricalIndexingHeader.tsx; dependencies: [31, 1949, 9615, 33, 4501, 9673, 6239, 4573, 1244, 2] */
function _fun114159(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:6, offset: 0x02415ee8, size: 249 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const searchConstantsModule = require(9615) /* metro dependency 9615: SearchConstants */;
const SEARCH_LIST_HORIZONTAL_PADDING = searchConstantsModule.SEARCH_LIST_HORIZONTAL_PADDING;
const SEARCH_ROW_TAP_STATE_PADDING = searchConstantsModule.SEARCH_ROW_TAP_STATE_PADDING;
const env0_5 = searchConstantsModule.SearchTabs;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {marginBottom: 16},
headerMessages: {marginHorizontal: SEARCH_LIST_HORIZONTAL_PADDING, marginTop: SEARCH_ROW_TAP_STATE_PADDING}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchHistoricalIndexingHeader.tsx');
exports.default = HistoricalIndexingHeader;
}
function HistoricalIndexingHeader({searchContext, documentsIndexed, tab}) { // fn#114160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:328, offset: 0x02415fe1, size: 322 bytes, params: 2, frame: 21
const styles = useStyles();
const binding = styles;
const value2 = binding.useMemo(_fun114161, [documentsIndexed]);
const value3 = binding.useMemo(function() {
return tab === SearchTabs.MESSAGES ? styles.headerMessages : tab !== SearchTabs.PINS ? undefined : styles.headerMessages;
}, [styles.headerMessages, tab]);
binding.useEffect(_fun114163, [documentsIndexed, searchContext]);
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const items2 = [styles.header, value3];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Card
variant="primary"
border="subtle"
style={items2}
>
<Text variant="heading-sm/normal" color="interactive-text-default">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['4Y3O+O'], {count: value2})}
</Text>
</Card>
);
}
function _fun114161() { // fn#114161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:429, offset: 0x02416123, size: 48 bytes, params: 1, frame: 11
const Number = global.Number;
const value = Number(documentsIndexed);
return value.toLocaleString(LocaleStore.locale);
}
function _fun114163() { // fn#114163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15285:585, offset: 0x0241618b, size: 68 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchIndexing({searchContext: searchContext,
isHistoricalIndexing: true, documentsIndexed: documentsIndexed});
}
@@ -0,0 +1,21 @@
/* Metro module 15089; source: modules/search/native/components/tabs/pages/messages/SearchIndexingScreen.tsx; dependencies: [31, 33, 9673, 9675, 15032, 2] */
function _fun114164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:6, offset: 0x024161cf, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/messages/SearchIndexingScreen.tsx');
exports.default = SearchIndexingScreen;
}
function SearchIndexingScreen({searchContext}) { // fn#114165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:126, offset: 0x0241625d, size: 115 bytes, params: 2, frame: 16
env0_3.useEffect(_fun114166, [searchContext]);
return ((Component) => <Component text={(require(9675) /* metro dependency 9675: SearchUtils */).getIndexingErrorText(searchContext)} />)(importDefault(15032) /* metro dependency 15032: ErrorScreen */);
}
function _fun114166() { // fn#114166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15286:188, offset: 0x024162d0, size: 52 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchIndexing({searchContext: searchContext});
}
@@ -0,0 +1,25 @@
/* Metro module 15060; source: modules/search/native/components/tabs/pages/placeholders/FileOrLinkGridPlaceholder.tsx; dependencies: [31, 33, 15040, 4584, 4017, 15061, 2] */
function _fun113957(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15257:6, offset: 0x0240df61, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/FileOrLinkGridPlaceholder.tsx');
exports.default = FileOrLinkGridPlaceholderItem;
}
function FileOrLinkGridPlaceholderItem({imageStyle, containerStyle}) { // fn#113958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15257:250, offset: 0x0240dfef, size: 235 bytes, params: 2, frame: 21
const value2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(true);
const value5 = env0_3.useMemo(_fun113959, [imageStyle.width,
imageStyle.height + 108 * (require(4584) /* metro dependency 4584: useFontScale */).useFontScale()]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [containerStyle, value2];
const SearchListCardContainer = (require(15061) /* metro dependency 15061: SearchListCard */).SearchListCardContainer;
return (
<View style={items2} pointerEvents="none">
<SearchListCardContainer containerStyle={value5} />
</View>
);
}
@@ -0,0 +1,53 @@
/* Metro module 15067; source: modules/search/native/components/tabs/pages/placeholders/FormRowPlaceholder.tsx; dependencies: [31, 27, 9615, 33, 4501, 697, 15040, 4017, 2] */
function _fun113996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15264:6, offset: 0x0240ff50, size: 468 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const SEARCH_ROW_TAP_STATE_PADDING = (require(9615) /* metro dependency 9615: SearchConstants */).SEARCH_ROW_TAP_STATE_PADDING;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.itemContainer = {'flexDirection': 'row', 'paddingHorizontal': 16, 'overflow': 'hidden', 'height': 64,
'paddingVertical': null, 'alignItems': 'center', paddingVertical: SEARCH_ROW_TAP_STATE_PADDING};
const object6 = {'height': 48, 'width': 48, 'borderRadius': null, 'marginRight': 16};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.backgroundColor = BORDER_SUBTLE;
object2.avatar = object6;
object2.innerContainer = {'justifyContent': 'center', 'flex': 1};
const object7 = {'width': '50%', 'borderRadius': null, 'height': 16, 'marginBottom': 8};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object7.backgroundColor = BORDER_SUBTLE;
object2.upperText = object7;
const object8 = {'justifyContent': 'center', 'width': '100%', 'borderRadius': null, 'height': 16};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object8.backgroundColor = BORDER_SUBTLE;
object2.lowerText = object8;
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/FormRowPlaceholder.tsx');
exports.default = FormRowPlaceholderItem;
}
function FormRowPlaceholderItem({style}) { // fn#113997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15264:881, offset: 0x02410124, size: 236 bytes, params: 2, frame: 20
const styles = useStyles();
const value2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(true);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={[value2, styles.itemContainer, style]} pointerEvents="none">
<View style={styles.avatar} />
<View style={styles.innerContainer}>
<View style={styles.upperText} />
<View style={styles.lowerText} />
</View>
</View2>
);
}
@@ -0,0 +1,24 @@
/* Metro module 15042; source: modules/search/native/components/tabs/pages/placeholders/GridItemPlaceholder.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
function _fun113834(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15239:6, offset: 0x02407af2, size: 257 bytes, params: 8, frame: 23
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'flex': 1, 'borderRadius': null, 'overflow': 'hidden'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.backgroundColor = BORDER_SUBTLE;
const env0_2 = Reflect.apply(createStyles, createStylesModule, [{imageContainer: object}]);
value = value.memo(_fun113835);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/GridItemPlaceholder.tsx');
exports.default = value;
}
function _fun113835({width, height, style}) { // fn#113835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15239:288, offset: 0x02407bf3, size: 85 bytes, params: 2, frame: 18
const styles = useStyles();
return <View style={[{width: width, height: height}, styles.imageContainer, style]} />;
}
@@ -0,0 +1,115 @@
/* Metro module 15041; source: modules/search/native/components/tabs/pages/placeholders/MediaGridPlaceholder.tsx; dependencies: [31, 27, 9615, 33, 4501, 697, 15040, 4017, 15042, 22, 4573, 1244, 11822, 15043, 2] */
function _fun113827(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:6, offset: 0x02407515, size: 403 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(9615) /* metro dependency 9615: SearchConstants */;
const env0_5 = value.MEDIA_NUM_COLUMNS;
const SEARCH_LIST_SECTION_TOP_PADDING = value.SEARCH_LIST_SECTION_TOP_PADDING;
const env0_6 = value.MEDIA_ITEM_GAP_WIDTH;
const SEARCH_LIST_HORIZONTAL_PADDING = value.SEARCH_LIST_HORIZONTAL_PADDING;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {container: {'zIndex': 1, 'position': 'absolute', 'width': '100%'}};
object2.recentsContainer = {position: 'relative', paddingHorizontal: SEARCH_LIST_HORIZONTAL_PADDING};
object2.row = {flexDirection: 'row'};
object2.section = {'flex': 1, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between', 'textTransform': 'none', 'paddingTop': null, 'paddingBottom': 8,
paddingTop: SEARCH_LIST_SECTION_TOP_PADDING};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object3.backgroundColor = BORDER_SUBTLE;
object2.sectionItem = object3;
object2.sectionText = {opacity: 0};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/MediaGridPlaceholder.tsx');
exports.default = MediaGridPlaceholderItem;
exports.RecentsMediaGridPlaceholder = RecentsMediaGridPlaceholder;
}
function MediaGridPlaceholderItem({size, containerStyle}) { // fn#113828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:713, offset: 0x024076a8, size: 148 bytes, params: 2, frame: 20
const value2 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(true);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[containerStyle, value2]} pointerEvents="none">
{((Component) => <Component height={size} width={size} style={containerStyle} />)(importDefault(15042) /* metro dependency 15042: GridItemPlaceholder */)}
</View>
);
}
function RecentsMediaGridPlaceholder({visible, size, numRows}) { // fn#113829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1084, offset: 0x0240773c, size: 528 bytes, params: 2, frame: 29
const styles = useStyles();
const binding = env0_3;
const value3 = binding.useMemo(_fun113831, [binding.useMemo(function() {
return require(dependencyMap[9]).range(0, numRows * MEDIA_NUM_COLUMNS);
}, [numRows])]);
const value4 = (require(15040) /* metro dependency 15040: usePlaceholderStyles */).usePlaceholderAnimatedStyle(visible);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.container];
items2[1] = styles.recentsContainer;
items2[2] = value4;
let sectionItem = styles.sectionItem;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let sectionText = styles.sectionText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const LBYpDH = (require(1244) /* metro dependency 1244: indexNative */).t.LBYpDH;
let view = <View style={sectionItem}><Text style={sectionText} maxFontSizeMultiplier={2} accessibilityRole="header" variant="text-sm/semibold" color="interactive-text-default">{Reflect.apply(string,
intl, [LBYpDH])}</Text></View>;
sectionItem = styles.sectionItem;
sectionText = styles.sectionText;
string = intl.string;
const LFTAUp = (require(1244) /* metro dependency 1244: indexNative */).t.LFTAUp;
view = <View style={styles.section}>{view}<View style={sectionItem}><Text variant="text-sm/semibold" color="text-brand" style={sectionText}>{Reflect.apply(string,
intl, [LFTAUp])}</Text></View></View>;
return (
<View2 style={items2} pointerEvents="none">
{[view, value3.map(_fun113832)]}
</View2>
);
}
function _fun113831() { // fn#113831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1218, offset: 0x02407984, size: 50 bytes, params: 1, frame: 13
const moduleValue = require(22) /* metro dependency 22 */;
return moduleValue.chunk(env0_3, MEDIA_NUM_COLUMNS);
}
function _fun113832(a0, a1) { // fn#113832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1829, offset: 0x024079b6, size: 173 bytes, params: 3, frame: 22
var environment;
const env0_0 = a1;
const value = environment.__proto__;
const Fragment = env1_3.Fragment;
return (
<Fragment key={a1}>
<View style={styles.row}>
{a0.map(_fun113833)}
</View>
{a1 < env0_4.length - 1 && ((MediaVerticalSeparator) => <MediaVerticalSeparator />)((require(15043) /* metro dependency 15043: Separators */).MediaVerticalSeparator)}
</Fragment>
);
}
function _fun113833(a0, a1) { // fn#113833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15238:1893, offset: 0x02407a63, size: 143 bytes, params: 3, frame: 22
const GridItemPlaceholder = importDefault(15042) /* metro dependency 15042: GridItemPlaceholder */;
const sizeBinding = size;
const searchPlatformUtilsModule = require(11822) /* metro dependency 11822: SearchPlatformUtils */;
const getMediaGridItemStyles = searchPlatformUtilsModule.getMediaGridItemStyles;
return (
<GridItemPlaceholder
height={sizeBinding}
width={sizeBinding}
style={Reflect.apply(getMediaGridItemStyles, searchPlatformUtilsModule,
[{itemIndex: require * MEDIA_NUM_COLUMNS + a1, numItems: env1_3.length, numColumns: MEDIA_NUM_COLUMNS,
spacing: MEDIA_ITEM_GAP_WIDTH}])}
key={a1}
/>
);
}
@@ -0,0 +1,16 @@
/* Metro module 15073; source: modules/search/native/components/tabs/pages/placeholders/MemberRowPlaceholder.tsx; dependencies: [31, 33, 4501, 15067, 2] */
function _fun114033(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15270:6, offset: 0x02411b43, size: 172 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {paddingHorizontal: 0}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/MemberRowPlaceholder.tsx');
exports.default = MemberRowPlaceholderItem;
}
function MemberRowPlaceholderItem() { // fn#114034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15270:301, offset: 0x02411bef, size: 56 bytes, params: 1, frame: 15
const styles = useStyles();
return ((Component) => <Component style={styles.container} />)(importDefault(15067) /* metro dependency 15067: FormRowPlaceholder */);
}
@@ -0,0 +1,11 @@
/* Metro module 15090; source: modules/search/native/components/tabs/pages/placeholders/PlaceholderUtils.tsx; dependencies: [2] */
function _fun114167(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#114167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15287:6, offset: 0x02416304, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/components/tabs/pages/placeholders/PlaceholderUtils.tsx');
exports.getAdjustedPlaceholderCount = function({numColumns, numResults, placeholderCount}) {
var value = 0;
return value === placeholderCount ? value : placeholderCount + (numColumns - numResults % numColumns);
};
}