This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,106 +1,160 @@
/* Metro module 14435; source: modules/home_drawer/native/HomeDrawerDM.tsx; dependencies: [31, 27, 1383, 3793, 4864, 1878, 482, 33, 566, 4805, 14436, 13775, 14429, 10629, 4573, 10975, 3834, 14407, 4013, 4010, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import UserGuildSettingsStore from '../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import UseMessagePreviews from '../../main_tabs_v2/useMessagePreviews.tsx'; /* Metro dependency 13775 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ChannelRecordModule from '../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as HomeDrawerExperimentModule from './HomeDrawerExperiment.tsx'; /* Metro dependency 4013 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HomeDrawerSharedModule from './HomeDrawerShared.tsx'; /* Metro dependency 14407 */
import * as UseChannelUnreadBadgeStateModule from '../../launchpad/native/shared/useChannelUnreadBadgeState.tsx'; /* Metro dependency 14436 */
function _fun109246(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:6, offset: 0x02342f5a, size: 275 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 env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(1383) /* metro dependency 1383: ChannelRecord */).isMultiUserDM;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(482) /* metro dependency 482: Constants */).NOOP;
const value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerDM.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/HomeDrawerDM.tsx');
exports.default = HomeDrawerDMExpandedChildrenWrapper;
}
function HomeDrawerDMExpandedChildren({channel}) { // fn#109247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:217, offset: 0x0234306d, size: 379 bytes, params: 2, frame: 21
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(channel.getRecipientId());
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, RelationshipStore],
_fun109249);
const useChannelUnreadBadgeStateModule = require(14436) /* metro dependency 14436: useChannelUnreadBadgeState */;
const useBaseChannelUnreadBadgeState = useChannelUnreadBadgeStateModule.useBaseChannelUnreadBadgeState;
const value3 = (importDefault(13775) /* metro dependency 13775: useMessagePreviews */)(channel,
{unread: Reflect.apply(useBaseChannelUnreadBadgeState, useChannelUnreadBadgeStateModule, [channel,
false]).unread});
const env0_3 = value3;
const value4 = env0_3.useMemo(_fun109251,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore], function() {
var channelBinding = channel;
return UserGuildSettingsStore.getChannelMuteConfig(channelBinding.guild_id, channelBinding.id);
})]);
const value5 = env0_3.useMemo(_fun109252, [value2, value4]);
const value6 = env0_3.useMemo(_fun109253, [channel, value3, value4]);
const HomeDrawerSharedItem = (require(14407) /* metro dependency 14407: HomeDrawerShared */).HomeDrawerSharedItem;
return <HomeDrawerSharedItem title={value5} subtitle={value6} />;
}
function HomeDrawerDMExpandedChildrenWrapper({channel}) { // fn#109254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:1398, offset: 0x0234342f, size: 126 bytes, params: 2, frame: 17
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
return Reflect.apply(useConfig, MobileHomeDrawerExperiment,
[{location: 'dm-expanded-children'}]).enableHome ? (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList ? null : <HomeDrawerDMExpandedChildren channel={channel} /> : null;
}
function _fun109249() { // fn#109249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:378, offset: 0x0234320d, size: 107 bytes, params: 1, frame: 18
var r1;
var r0;
var value3;
var moduleValue;
const channelBinding = channel;
const value2 = null;
if (value2 == channelBinding) {
r0 = value2;
} else {
value3 = environment.__proto__;
if (isMultiUserDM(channel.type)) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
r1 = moduleValue.computeChannelName(channel, UserStore, RelationshipStore);
} else if (value2 != user) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
r1 = moduleValue.computeChannelName(channel, UserStore, RelationshipStore);
} else {
r1 = value2;
function HomeDrawerDMExpandedChildren({channel}) { // fn#109247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:217, offset: 0x0234306d, size: 379 bytes, params: 2, frame: 21
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(channel.getRecipientId());
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, RelationshipStore],
_fun109249);
const useBaseChannelUnreadBadgeState = UseChannelUnreadBadgeStateModule.useBaseChannelUnreadBadgeState;
const value3 = (UseMessagePreviews)(channel,
{unread: Reflect.apply(useBaseChannelUnreadBadgeState, UseChannelUnreadBadgeStateModule, [channel,
false]).unread});
const env0_3 = value3;
const value4 = env0_3.useMemo(_fun109251,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore], function() {
var userGuildSettingsStoreBinding = UserGuildSettingsStore;
var channelBinding = channel;
return userGuildSettingsStoreBinding.getChannelMuteConfig(channelBinding.guild_id, channelBinding.id);
})]);
const value5 = env0_3.useMemo(_fun109252, [value2, value4]);
const value6 = env0_3.useMemo(_fun109253, [channel, value3, value4]);
const HomeDrawerSharedItem = (HomeDrawerSharedModule).HomeDrawerSharedItem;
return <HomeDrawerSharedItem title={value5} subtitle={value6} />;
function _fun109249() { // fn#109249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:378, offset: 0x0234320d, size: 107 bytes, params: 1, frame: 18
var r1;
var r0;
var value3;
var moduleValue;
const channelBinding = channel;
const value2 = null;
if (value2 == channelBinding) {
r0 = value2;
} else {
value3 = environment.__proto__;
if (isMultiUserDM(channel.type)) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
r1 = moduleValue.computeChannelName(channel, UserStore, RelationshipStore);
} else if (value2 != user) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
r1 = moduleValue.computeChannelName(channel, UserStore, RelationshipStore);
} else {
r1 = value2;
}
r0 = r1;
}
return r0;
}
r0 = r1;
function _fun109251() { // fn#109251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:628, offset: 0x02341542, size: 142 bytes, params: 1, frame: 16
var r3;
var object2;
var end_time;
var value2;
var Date;
var prototype;
var value3;
var date;
var value4;
var value5;
if (channelMuteConfig == null) {
object2 = {'isMuted': false, 'isTemporary': false};
} else {
end_time = channelMuteConfig.end_time;
value2 = end_time == null;
if (value2) {
r3 = value2;
} else {
Date = global.Date;
end_time = channelMuteConfig.end_time;
prototype = Date.prototype;
value3 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value4 = date instanceof Object ? date : value3;
Date = global.Date;
prototype = Date.prototype;
value5 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
r3 = value4 > (date instanceof Object ? date : value5);
}
end_time = channelMuteConfig.end_time;
object2 = {isMuted: r3, isTemporary: end_time != null};
}
return object2;
}
function _fun109252() { // fn#109252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:774, offset: 0x0234329e, size: 257 bytes, params: 1, frame: 19
const r7 = ChannelRecordModule.isMultiUserDM == null ? NOOP : ChannelRecordModule.isMultiUserDM.isMuted ? ChannelRecordModule.isMultiUserDM == null ? (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : ChannelRecordModule.isMultiUserDM.isTemporary ? (require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon : (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : NOOP;
const Text = (TextModule).Text;
return (
<View style={{'flexDirection': 'row', 'alignItems': 'center', 'gap': 4}}>
<Text variant="text-md/medium" color="text-default">
{env0_2}
</Text>
{((Component) => <Component size="xs" />)(r7)}
</View>
);
}
function _fun109253() { // fn#109253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:1065, offset: 0x0234339f, size: 144 bytes, params: 1, frame: 18
const value2 = null;
if (value2 == env0_3) {
return value2;
} else {
const ChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview;
return (
<ChannelRowPreview
channel={channel}
message={env0_3}
variant="text-xs/medium"
color="text-strong"
layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COZY}
muted={ChannelRecordModule.isMultiUserDM.isMuted}
/>
);
}
}
}
return r0;
}
function _fun109252() { // fn#109252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:774, offset: 0x0234329e, size: 257 bytes, params: 1, frame: 19
const r7 = env0_5 == null ? NOOP : env0_5.isMuted ? env0_5 == null ? (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : env0_5.isTemporary ? (require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon : (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : NOOP;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={{'flexDirection': 'row', 'alignItems': 'center', 'gap': 4}}>
<Text variant="text-md/medium" color="text-default">
{env0_2}
</Text>
{((Component) => <Component size="xs" />)(r7)}
</View>
);
}
function _fun109253() { // fn#109253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:1065, offset: 0x0234339f, size: 144 bytes, params: 1, frame: 18
const value2 = null;
if (value2 == env0_3) {
return value2;
} else {
const ChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview;
function HomeDrawerDMExpandedChildrenWrapper({channel}) { // fn#109254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14632:1398, offset: 0x0234342f, size: 126 bytes, params: 2, frame: 17
const MobileHomeDrawerExperiment = (HomeDrawerExperimentModule).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
return (
<ChannelRowPreview
channel={channel}
message={env0_3}
variant="text-xs/medium"
color="text-strong"
layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COZY}
muted={env0_5.isMuted}
/>
Reflect.apply(useConfig, MobileHomeDrawerExperiment, [{location: 'dm-expanded-children'}]).enableHome
? (
(importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList
? null
: (
<HomeDrawerDMExpandedChildren channel={channel} />
)
)
: null
);
}
}
global.__d(_fun109246, 14435, [31, 27, 1383, 3793, 4864, 1878, 482, 33, 566, 4805, 14436, 13775, 14429, 10629, 4573,
10975, 3834, 14407, 4013, 4010,
2]) /* metro module 14435, dependencies: [31, 27, 1383, 3793, 4864, 1878, 482, 33, 566, 4805, 14436, 13775, 14429, 10629, 4573, 10975, 3834, 14407, 4013, 4010, 2] */;
@@ -1,42 +1,75 @@
/* Metro module 14411; source: modules/home_drawer/native/HomeDrawerDirectMessagesRow.tsx; dependencies: [31, 12600, 33, 566, 4573, 1244, 14407, 4013, 4010, 2] */
import UseChatLayout from '../../chat/native/useChatLayout.tsx'; /* Metro dependency 4010 */
import PrivateChannelReadStateStore from '../../../stores/PrivateChannelReadStateStore.tsx'; /* Metro dependency 12600 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as HomeDrawerExperimentModule from './HomeDrawerExperiment.tsx'; /* Metro dependency 4013 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HomeDrawerSharedModule from './HomeDrawerShared.tsx'; /* Metro dependency 14407 */
function _fun109085(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14608:6, offset: 0x0233caa9, size: 165 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const privateChannelReadStateStore = importDefault(12600) /* metro dependency 12600: PrivateChannelReadStateStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerDirectMessagesRow.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/HomeDrawerDirectMessagesRow.tsx');
exports.default = HomeDrawerDMsRowWrapper;
function HomeDrawerDMsRow() { // fn#109086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14608:128, offset: 0x0233cb4e, size: 319 bytes, params: 1, frame: 22
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const length = (require(566) /* metro dependency 566: flux */).useStateFromStores([PrivateChannelReadStateStore],
function() {
return PrivateChannelReadStateStore.getUnreadPrivateChannelIds().length;
});
const r4 = (
length > 0
? (
<Text
variant="text-xs/medium"
color="text-default"
lineClamp={1}
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.WCMsy8,
{numPeople: length})}
</Text>
)
: null
);
const HomeDrawerSharedItem = (HomeDrawerSharedModule).HomeDrawerSharedItem;
const string = intl.string;
const YUU0RF = (require(1244) /* metro dependency 1244: indexNative */).t.YUU0RF;
return (
<HomeDrawerSharedItem
title={<Text variant="text-md/medium" color="text-default">
{Reflect.apply(string, intl, [YUU0RF])}
</Text>}
subtitle={r4}
/>
);
}
function HomeDrawerDMsRowWrapper() { // fn#109088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14608:657, offset: 0x0233cca5, size: 114 bytes, params: 1, frame: 16
const MobileHomeDrawerExperiment = (HomeDrawerExperimentModule).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
const enableHome = Reflect.apply(useConfig, MobileHomeDrawerExperiment,
[{location: 'dm-expanded-children'}]).enableHome;
const isChatBesideChannelList = (UseChatLayout)().isChatBesideChannelList;
const value2 = null;
return (
enableHome
? (
isChatBesideChannelList
? value2
: (
<HomeDrawerDMsRow />
)
)
: value2
);
}
}
function HomeDrawerDMsRow() { // fn#109086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14608:128, offset: 0x0233cb4e, size: 319 bytes, params: 1, frame: 22
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const length = (require(566) /* metro dependency 566: flux */).useStateFromStores([PrivateChannelReadStateStore],
function() {
return PrivateChannelReadStateStore.getUnreadPrivateChannelIds().length;
});
const r4 = length > 0 ? <Text variant="text-xs/medium" color="text-default" lineClamp={1}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.WCMsy8,
{numPeople: length})}</Text> : null;
const HomeDrawerSharedItem = (require(14407) /* metro dependency 14407: HomeDrawerShared */).HomeDrawerSharedItem;
const string = intl.string;
const YUU0RF = (require(1244) /* metro dependency 1244: indexNative */).t.YUU0RF;
return (
<HomeDrawerSharedItem
title={<Text variant="text-md/medium" color="text-default">{Reflect.apply(string, intl, [YUU0RF])}</Text>}
subtitle={r4}
/>
);
}
function HomeDrawerDMsRowWrapper() { // fn#109088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14608:657, offset: 0x0233cca5, size: 114 bytes, params: 1, frame: 16
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
const enableHome = Reflect.apply(useConfig, MobileHomeDrawerExperiment,
[{location: 'dm-expanded-children'}]).enableHome;
const isChatBesideChannelList = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList;
const value2 = null;
return enableHome ? isChatBesideChannelList ? value2 : <HomeDrawerDMsRow /> : value2;
}
global.__d(_fun109085, 14411, [31, 12600, 33, 566, 4573, 1244, 14407, 4013, 4010,
2]) /* metro module 14411, dependencies: [31, 12600, 33, 566, 4573, 1244, 14407, 4013, 4010, 2] */;
@@ -1,12 +1,16 @@
/* Metro module 4013; source: modules/home_drawer/native/HomeDrawerExperiment.tsx; dependencies: [1358, 2] */
import ApexExperiment from '../../experiments/apex/ApexExperiment.tsx'; /* Metro dependency 1358 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun33056(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4171:6, offset: 0x01026a9d, size: 174 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
let value = ApexExperiment;
value = value({'name': '2025-10-mobile-home-drawer', 'kind': 'user', defaultConfig: {'enableHome': false,
'landOnHome': false, 'enablePeekHint': false}, variations: {[1]: {'enableHome': true, 'landOnHome': false,
'enablePeekHint': true}, [2]: {'enableHome': true, 'landOnHome': true, 'enablePeekHint': false}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/HomeDrawerExperiment.tsx');
exports.MobileHomeDrawerExperiment = value;
}
global.__d(_fun33056, 4013, [1358, 2]) /* metro module 4013, dependencies: [1358, 2] */;
@@ -1,23 +1,33 @@
/* Metro module 14414; source: modules/home_drawer/native/HomeDrawerFavoritesRow.tsx; dependencies: [31, 33, 14407, 4573, 1244, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HomeDrawerSharedModule from './HomeDrawerShared.tsx'; /* Metro dependency 14407 */
function _fun109097(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14611:6, offset: 0x0233d2c0, size: 131 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerFavoritesRow.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/HomeDrawerFavoritesRow.tsx');
exports.HomeDrawerFavoritesRowExpandedChildren = HomeDrawerFavoritesRowExpandedChildren;
function HomeDrawerFavoritesRowExpandedChildren() { // fn#109098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14611:246, offset: 0x0233d343, size: 144 bytes, params: 1, frame: 20
const HomeDrawerSharedItem = (HomeDrawerSharedModule).HomeDrawerSharedItem;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<HomeDrawerSharedItem
title={<Text variant="text-md/medium" color="text-default">
{intl.string((IndexNativeModule).t.wMWyci)}
</Text>}
subtitle={null}
/>
);
}
}
function HomeDrawerFavoritesRowExpandedChildren() { // fn#109098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14611:246, offset: 0x0233d343, size: 144 bytes, params: 1, frame: 20
const HomeDrawerSharedItem = (require(14407) /* metro dependency 14407: HomeDrawerShared */).HomeDrawerSharedItem;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<HomeDrawerSharedItem
title={<Text variant="text-md/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wMWyci)}</Text>}
subtitle={null}
/>
);
}
global.__d(_fun109097, 14414, [31, 33, 14407, 4573, 1244,
2]) /* metro module 14414, dependencies: [31, 33, 14407, 4573, 1244, 2] */;
@@ -1,104 +1,128 @@
/* Metro module 14406; source: modules/home_drawer/native/HomeDrawerFolderRow.tsx; dependencies: [31, 27, 5214, 4896, 661, 33, 566, 10629, 4573, 1244, 14407, 4013, 4010, 2] */
import SortedGuildStore from '../../../stores/SortedGuildStore.tsx'; /* Metro dependency 4896 */
import GuildReadStateStore from '../../../stores/GuildReadStateStore.tsx'; /* Metro dependency 5214 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as HomeDrawerExperimentModule from './HomeDrawerExperiment.tsx'; /* Metro dependency 4013 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HomeDrawerSharedModule from './HomeDrawerShared.tsx'; /* Metro dependency 14407 */
function _fun109057(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:6, offset: 0x0233bbf4, size: 237 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 env0_4 = (require(27) /* metro dependency 27 */).View;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).NOOP;
const value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerFolderRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/HomeDrawerFolderRow.tsx');
exports.default = HomeDrawerFolderExpandedChildren;
}
function Wrapper_109058({folder}) { // fn#109058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:183, offset: 0x0233bce1, size: 421 bytes, params: 2, frame: 22
const value2 = ReactModule.useMemo(function() {
return {isMuted: false};
}, []);
const length = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return folder.guildIds.filter(_fun109061).length;
});
const length2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return folder.guildIds.filter(_fun109063).length;
});
const value3 = ReactModule.useMemo(_fun109064, [folder.folderName, value2]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value7 = ReactModule.useMemo(_fun109065,
[length > 0 ? 'Mentioned in ' + length + ' servers' : length2 > 0 ? 'Unread messages in ' + length2 + ' servers' : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.knOfkb,
{num: folder.guildIds.length})]);
const HomeDrawerSharedItem = (HomeDrawerSharedModule).HomeDrawerSharedItem;
return <HomeDrawerSharedItem title={value3} subtitle={value7} />;
function _fun109060() { // fn#109060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:287, offset: 0x0233be86, size: 39 bytes, params: 1, frame: 11
const guildIds = folder.guildIds;
return guildIds.filter(_fun109061).length;
function _fun109061(a0) { // fn#109061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:310, offset: 0x0233bead, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return GuildReadStateStore.getMentionCount(a0) > 0;
}
function Wrapper_109058({folder}) { // fn#109058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:183, offset: 0x0233bce1, size: 421 bytes, params: 2, frame: 22
const value2 = env0_3.useMemo(function() {
return {isMuted: false};
}, []);
const length = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return folder.guildIds.filter(_fun109061).length;
});
const length2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return folder.guildIds.filter(_fun109063).length;
});
const value3 = env0_3.useMemo(_fun109064, [folder.folderName, value2]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value7 = env0_3.useMemo(_fun109065,
[length > 0 ? 'Mentioned in ' + length + ' servers' : length2 > 0 ? 'Unread messages in ' + length2 + ' servers' : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.knOfkb,
{num: folder.guildIds.length})]);
const HomeDrawerSharedItem = (require(14407) /* metro dependency 14407: HomeDrawerShared */).HomeDrawerSharedItem;
return <HomeDrawerSharedItem title={value3} subtitle={value7} />;
}
}
function HomeDrawerFolderExpandedChildren({folderId}) { // fn#109066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:1157, offset: 0x0233c048, size: 187 bytes, params: 2, frame: 18
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], _fun109067);
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
return value2 == null ? null : Reflect.apply(useConfig, MobileHomeDrawerExperiment,
[{location: 'folder-expanded-children'}]).enableHome ? (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList ? null : <Wrapper_109058 folder={value2} /> : null;
}
function _fun109062() { // fn#109062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:381, offset: 0x0233beca, size: 39 bytes, params: 1, frame: 11
const guildIds = folder.guildIds;
return guildIds.filter(function(a0) {
return GuildReadStateStore.hasUnread(a0);
}).length;
function _fun109063(a0) { // fn#109063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:404, offset: 0x0233bef1, size: 23 bytes, params: 2, frame: 11
return GuildReadStateStore.hasUnread(a0);
}
function _fun109060() { // fn#109060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:287, offset: 0x0233be86, size: 39 bytes, params: 1, frame: 11
const guildIds = folder.guildIds;
return guildIds.filter(_fun109061).length;
}
}
function _fun109062() { // fn#109062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:381, offset: 0x0233beca, size: 39 bytes, params: 1, frame: 11
const guildIds = folder.guildIds;
return guildIds.filter(function(a0) {
return GuildReadStateStore.hasUnread(a0);
}).length;
}
function _fun109064() { // fn#109064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:446, offset: 0x0233bf08, size: 253 bytes, params: 1, frame: 23
var r8;
var intl;
const value3 = ((Component) => <Component size="xs" />)(env0_1.isMuted ? (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : NOOP);
const Text = (TextModule).Text;
const folderName = folder.folderName;
if (folderName != null) {
r8 = folderName;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JQ/1n3']);
}
return (
<View style={{'flexDirection': 'row', 'alignItems': 'center', 'gap': 4}}>
{value3}
<Text variant="text-md/medium" color="text-default">
{r8}
</Text>
</View>
);
}
function _fun109065() { // fn#109065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:906, offset: 0x0233c005, size: 67 bytes, params: 1, frame: 14
const Text = (TextModule).Text;
return (
<Text
variant="text-xs/medium"
color="text-muted"
lineClamp={1}
>
{env0_2}
</Text>
);
}
function _fun109064() { // fn#109064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:446, offset: 0x0233bf08, size: 253 bytes, params: 1, frame: 23
var r8;
var intl;
const value3 = ((Component) => <Component size="xs" />)(env0_1.isMuted ? (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : NOOP);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const folderName = folder.folderName;
if (folderName != null) {
r8 = folderName;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JQ/1n3']);
}
return (
<View style={{'flexDirection': 'row', 'alignItems': 'center', 'gap': 4}}>
{value3}
<Text variant="text-md/medium" color="text-default">
{r8}
</Text>
</View>
);
}
function _fun109065() { // fn#109065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:906, offset: 0x0233c005, size: 67 bytes, params: 1, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-xs/medium"
color="text-muted"
lineClamp={1}
>
{env0_2}
</Text>
);
}
function HomeDrawerFolderExpandedChildren({folderId}) { // fn#109066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:1157, offset: 0x0233c048, size: 187 bytes, params: 2, frame: 18
const value2 = (FluxModule).useStateFromStores([SortedGuildStore], _fun109067);
const MobileHomeDrawerExperiment = (HomeDrawerExperimentModule).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
return (
value2 == null
? null
: (
Reflect.apply(useConfig, MobileHomeDrawerExperiment,
[{location: 'folder-expanded-children'}]).enableHome
? (
(importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList
? null
: (
<Wrapper_109058 folder={value2} />
)
)
: null
)
);
function _fun109067() { // fn#109067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:1251, offset: 0x0233c103, size: 40 bytes, params: 1, frame: 12
const folderIdBinding = folderId;
const value2 = null;
return value2 != folderIdBinding ? SortedGuildStore.getGuildFolderById(folderId) : value2;
}
function _fun109067() { // fn#109067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:1251, offset: 0x0233c103, size: 40 bytes, params: 1, frame: 12
const folderIdBinding = folderId;
const value2 = null;
return value2 != folderIdBinding ? SortedGuildStore.getGuildFolderById(folderId) : value2;
}
}
function _fun109061(a0) { // fn#109061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14603:310, offset: 0x0233bead, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return GuildReadStateStore.getMentionCount(a0) > 0;
}
global.__d(_fun109057, 14406, [31, 27, 5214, 4896, 661, 33, 566, 10629, 4573, 1244, 14407, 4013, 4010,
2]) /* metro module 14406, dependencies: [31, 27, 5214, 4896, 661, 33, 566, 10629, 4573, 1244, 14407, 4013, 4010, 2] */;
@@ -1,235 +1,425 @@
/* Metro module 14428; source: modules/home_drawer/native/HomeDrawerGuildRow.tsx; dependencies: [31, 27, 1379, 1935, 5214, 1867, 4605, 4864, 4865, 482, 33, 4501, 566, 4013, 4010, 14429, 10629, 4573, 6915, 1305, 14431, 14432, 11566, 1244, 14407, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildChannelStore from '../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import ReadStateStore from '../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import UserGuildSettingsStore from '../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import GuildReadStateStore from '../../../stores/GuildReadStateStore.tsx'; /* Metro dependency 5214 */
import GuildBadgeV2 from '../../guild/native/GuildBadgeV2.tsx'; /* Metro dependency 6915 */
import UseTypingText from '../../chat/useTypingText.tsx'; /* Metro dependency 11566 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as HomeDrawerExperimentModule from './HomeDrawerExperiment.tsx'; /* Metro dependency 4013 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ReadStateConstantsModule from '../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as HomeDrawerSharedModule from './HomeDrawerShared.tsx'; /* Metro dependency 14407 */
import * as UseHomeDrawerGuildTypingModule from './useHomeDrawerGuildTyping.tsx'; /* Metro dependency 14432 */
function _fun109194(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:6, offset: 0x02341019, size: 380 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 env0_4 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_11 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_12 = (require(482) /* metro dependency 482: Constants */).NOOP;
const value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
const env0_15 = value.Fragment;
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({guildName: {'flexDirection': 'row',
const env0_16 = (CreateStylesModule).createStyles({guildName: {'flexDirection': 'row',
'alignItems': 'center', 'gap': 4}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerGuildRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/HomeDrawerGuildRow.tsx');
exports.default = HomeDrawerGuildRow;
}
function GuildRowWrapper({guild, disableSubtitle}) { // fn#109195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:346, offset: 0x02341195, size: 877 bytes, params: 2, frame: 34
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return GuildReadStateStore.hasUnread(guild.id);
});
const env0_3 = value2;
const value3 = env0_3.useMemo(_fun109198,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore], function() {
return UserGuildSettingsStore.getMuteConfig(guild.id);
})]);
const value4 = env0_3.useMemo(_fun109199, [guild, value3, styles.guildName]);
const {unreadChannelName,
unreadChannelCount} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildChannelStore,
ReadStateStore, UserGuildSettingsStore, ChannelStore], _fun109200, [guild.id]);
const {mentionChannelName,
mentionChannelCount} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildReadStateStore,
ChannelStore], _fun109202, [guild.id]);
const {voiceUsers, streamingUser,
streamingChannelId} = (require(14431) /* metro dependency 14431: HomeDrawerGuildVoiceState */).useVoiceUsers(guild);
const {typingChannelId, typingChannelName,
typingUserIds} = (require(14432) /* metro dependency 14432: useHomeDrawerGuildTyping */).useHomeDrawerGuildTyping(guild.id);
const value9 = (importDefault(11566) /* metro dependency 11566: useTypingText */)({channelId: typingChannelId,
guildId: guild.id, typingUserIds: typingUserIds});
let r2 = value3.isMuted || disableSubtitle;
r2 = !r2 ? voiceUsers.length === 0 : r2;
const value11 = !r2;
const value12 = env0_3.useMemo(_fun109204, [disableSubtitle, value3.isMuted, value2, unreadChannelName,
unreadChannelCount, mentionChannelName, mentionChannelCount, typingChannelId, typingChannelName, value9]);
const value13 = env0_3.useMemo(_fun109207, [value11, voiceUsers]);
const value14 = env0_3.useMemo(_fun109209, [value11, streamingUser]);
const HomeDrawerSharedItem = (require(14407) /* metro dependency 14407: HomeDrawerShared */).HomeDrawerSharedItem;
return (
<HomeDrawerSharedItem
title={value4}
subtitle={r2 ? value12 : streamingUser == null ? value13 : value14}
right={value3.isMuted || disableSubtitle || voiceUsers.length === 0 ? null : ((GuildVoiceState) => <GuildVoiceState voiceUsers={voiceUsers} streamingChannelId={streamingChannelId} streamingUser={streamingUser} guildId={guild.id} />)((require(14431) /* metro dependency 14431: HomeDrawerGuildVoiceState */).GuildVoiceState)}
/>
);
}
function HomeDrawerGuildRow({guildId, disableSubtitle}) { // fn#109210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:3646, offset: 0x02341cf1, size: 196 bytes, params: 2, frame: 19
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
return guild == null ? null : Reflect.apply(useConfig, MobileHomeDrawerExperiment,
[{location: 'guild-row'}]).enableHome ? (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList ? null : <GuildRowWrapper guild={guild} disableSubtitle={disableSubtitle} /> : null;
}
function _fun109199() { // fn#109199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:691, offset: 0x023415d0, size: 308 bytes, params: 1, frame: 23
const items2 = [((Component) => <Component size="xs" />)(env0_5.isMuted ? env0_5.isTemporary ? (require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon : (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : NOOP)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const guildBinding = guild;
items2[1] = <Text variant="text-md/medium" style={{flexShrink: 1}} lineClamp={1} color="text-default">{guildBinding.name}</Text>;
const GuildBadgeV2 = importDefault(6915) /* metro dependency 6915: GuildBadgeV2 */;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
items2[2] = <GuildBadgeV2 guild={guildBinding} size={REFRESH_SMALL_16} />;
return (
<View style={styles.guildName}>
{items2}
</View>
);
}
function _fun109200() { // fn#109200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1076, offset: 0x02341704, size: 121 bytes, params: 1, frame: 15
var environment;
var r2;
let value = environment.__proto__;
const getSelectableChannelIds = GuildChannelStore.getSelectableChannelIds;
const value4 = Reflect.apply(getSelectableChannelIds, GuildChannelStore, [guild.id]).filter(_fun109201);
const length = value4.length;
const value5 = undefined;
if (length > 0) {
value = ChannelStore.getChannel(value4[0]);
r2 = value == null ? value5 : value.name;
} else {
r2 = value5;
}
return {unreadChannelName: r2, unreadChannelCount: value4.length};
}
function _fun109202() { // fn#109202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1453, offset: 0x023417cf, size: 174 bytes, params: 1, frame: 16
var environment;
var r2;
var object2;
let value = environment.__proto__;
const property = GuildReadStateStore.getMutableGuildStates()[guild.id];
if (property == null) {
object2 = {mentionChannelName: undefined, mentionChannelCount: 0};
} else {
var Object = global.Object;
var value5 = Object.keys(property.mentionCounts).filter(_fun109203);
object2 = {};
var length = value5.length;
var value6 = undefined;
if (length > 0) {
value = ChannelStore.getChannel(value5[0]);
r2 = value == null ? value6 : value.name;
} else {
r2 = value6;
}
object2.mentionChannelName = r2;
length = value5.length;
object2.mentionChannelCount = length;
}
return object2;
}
function _fun109204() { // fn#109204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:2100, offset: 0x0234189e, size: 633 bytes, params: 1, frame: 27
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const disableSubtitleBinding = disableSubtitle;
const value2 = null;
return disableSubtitleBinding ? value2 : value2 == mentionChannelName ? value2 == typingChannelId || value2 == env0_14 || env0_5.isMuted ? env0_3 && value2 != unreadChannelName && unreadChannelCount > 0 ? <Text variant="text-xs/medium" color="text-strong" lineClamp={1}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.OqlmU6,
{channelName: unreadChannelName, channelHook: channelHook_109206,
count: unreadChannelCount - 1})}</Text> : value2 : <Text variant="text-xs/medium" color="text-strong" lineClamp={1}>{value2 != typingChannelName ? <><Text variant="text-xs/semibold">{'#' + typingChannelName}</Text>{' · '}</> : value2}{env0_14}</Text> : mentionChannelCount > 0 ? <Text variant="text-xs/medium" color="text-strong" lineClamp={1}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.L9YdGH,
{channelName: mentionChannelName, channelHook: channelHook_109205,
count: mentionChannelCount - 1})}</Text> : value2 == typingChannelId || value2 == env0_14 || env0_5.isMuted ? env0_3 && value2 != unreadChannelName && unreadChannelCount > 0 ? <Text variant="text-xs/medium" color="text-strong" lineClamp={1}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.OqlmU6,
{channelName: unreadChannelName, channelHook: channelHook_109206,
count: unreadChannelCount - 1})}</Text> : value2 : <Text variant="text-xs/medium" color="text-strong" lineClamp={1}>{value2 != typingChannelName ? <><Text variant="text-xs/semibold">{'#' + typingChannelName}</Text>{' · '}</> : value2}{env0_14}</Text>;
}
function _fun109207() { // fn#109207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:2866, offset: 0x02341b6a, size: 220 bytes, params: 1, frame: 24
var environment;
var r0;
var value3;
var Text;
var intl;
var format;
var r1Vkoc;
var object;
var voiceUsersBinding;
var Math;
var value;
if (env0_15) {
value3 = environment.__proto__;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
r1Vkoc = (require(1244) /* metro dependency 1244: indexNative */).t.r1Vkoc;
object = {};
voiceUsersBinding = voiceUsers;
value = voiceUsersBinding.slice(0, 2);
value = value.map(function(a0) {
return a0.username;
function GuildRowWrapper({guild, disableSubtitle}) { // fn#109195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:346, offset: 0x02341195, size: 877 bytes, params: 2, frame: 34
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
function() {
return GuildReadStateStore.hasUnread(guild.id);
});
object.users = value.join(', ');
Math = global.Math;
object.overflowCount = Math.max(voiceUsersBinding.length - 2, 0);
value = <Text variant="text-xs/medium" color="text-feedback-positive" lineClamp={1}>{Reflect.apply(format, intl,
[r1Vkoc, object])}</Text>;
r0 = value;
} else {
r0 = null;
const env0_3 = value2;
const value3 = env0_3.useMemo(_fun109198,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore], function() {
return UserGuildSettingsStore.getMuteConfig(guild.id);
})]);
const value4 = env0_3.useMemo(_fun109199, [guild, value3, styles.guildName]);
const {unreadChannelName,
unreadChannelCount} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildChannelStore,
ReadStateStore, UserGuildSettingsStore, ChannelStore], _fun109200, [guild.id]);
const {mentionChannelName,
mentionChannelCount} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildReadStateStore,
ChannelStore], _fun109202, [guild.id]);
const {voiceUsers, streamingUser,
streamingChannelId} = (require(14431) /* metro dependency 14431: HomeDrawerGuildVoiceState */).useVoiceUsers(guild);
const {typingChannelId, typingChannelName,
typingUserIds} = (UseHomeDrawerGuildTypingModule).useHomeDrawerGuildTyping(guild.id);
const value9 = (UseTypingText)({channelId: typingChannelId,
guildId: guild.id, typingUserIds: typingUserIds});
let r2 = value3.isMuted || disableSubtitle;
r2 = !r2 ? voiceUsers.length === 0 : r2;
const value11 = !r2;
const value12 = env0_3.useMemo(_fun109204, [disableSubtitle, value3.isMuted, value2, unreadChannelName,
unreadChannelCount, mentionChannelName, mentionChannelCount, typingChannelId, typingChannelName, value9]);
const value13 = env0_3.useMemo(_fun109207, [value11, voiceUsers]);
const value14 = env0_3.useMemo(_fun109209, [value11, streamingUser]);
const HomeDrawerSharedItem = (HomeDrawerSharedModule).HomeDrawerSharedItem;
return (
<HomeDrawerSharedItem
title={value4}
subtitle={r2 ? value12 : streamingUser == null ? value13 : value14}
right={value3.isMuted || disableSubtitle || voiceUsers.length === 0
? null
: ((GuildVoiceState) => <GuildVoiceState voiceUsers={voiceUsers} streamingChannelId={streamingChannelId} streamingUser={streamingUser} guildId={guild.id} />)((require(14431) /* metro dependency 14431: HomeDrawerGuildVoiceState */).GuildVoiceState)}
/>
);
function _fun109198() { // fn#109198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:545, offset: 0x02341542, size: 142 bytes, params: 1, frame: 16
var r3;
var object2;
var end_time;
var value2;
var Date;
var prototype;
var value3;
var date;
var value4;
var value5;
if (muteConfig == null) {
object2 = {'isMuted': false, 'isTemporary': false};
} else {
end_time = muteConfig.end_time;
value2 = end_time == null;
if (value2) {
r3 = value2;
} else {
Date = global.Date;
end_time = muteConfig.end_time;
prototype = Date.prototype;
value3 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value4 = date instanceof Object ? date : value3;
Date = global.Date;
prototype = Date.prototype;
value5 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
r3 = value4 > (date instanceof Object ? date : value5);
}
end_time = muteConfig.end_time;
object2 = {isMuted: r3, isTemporary: end_time != null};
}
return object2;
}
function _fun109199() { // fn#109199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:691, offset: 0x023415d0, size: 308 bytes, params: 1, frame: 23
const items2 = [
((Component) => <Component size="xs" />)(env0_5.isMuted ? env0_5.isTemporary ? (require(14429) /* metro dependency 14429: BellZIcon */).BellZIcon : (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon : NOOP),
];
const Text = (TextModule).Text;
const guildBinding = guild;
items2[1] = (
<Text
variant="text-md/medium"
style={{flexShrink: 1}}
lineClamp={1}
color="text-default"
>
{guildBinding.name}
</Text>
);
const Icon = (NativeModule).Icon;
const Sizes = Icon.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
items2[2] = <GuildBadgeV2 guild={guildBinding} size={REFRESH_SMALL_16} />;
return (
<View style={styles.guildName}>
{items2}
</View>
);
}
function _fun109200() { // fn#109200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1076, offset: 0x02341704, size: 121 bytes, params: 1, frame: 15
var environment;
var r2;
let value = environment.__proto__;
const guildChannelStoreBinding = GuildChannelStore;
const getSelectableChannelIds = guildChannelStoreBinding.getSelectableChannelIds;
const value4 = Reflect.apply(getSelectableChannelIds, guildChannelStoreBinding, [guild.id]).filter(_fun109201);
const length = value4.length;
const value5 = undefined;
if (length > 0) {
value = ChannelStore.getChannel(value4[0]);
r2 = value == null ? value5 : value.name;
} else {
r2 = value5;
}
return {unreadChannelName: r2, unreadChannelCount: value4.length};
function _fun109201(a0) { // fn#109201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1129, offset: 0x0234177d, size: 82 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
const basicChannel = ChannelStore.getBasicChannel(a0);
return basicChannel != null && (ReadStateStore.hasUnread(a0) && UserGuildSettingsStore.resolveUnreadSetting(basicChannel) === UnreadSetting.ALL_MESSAGES);
}
}
function _fun109202() { // fn#109202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1453, offset: 0x023417cf, size: 174 bytes, params: 1, frame: 16
var environment;
var r2;
var object;
let value = environment.__proto__;
const property = GuildReadStateStore.getMutableGuildStates()[guild.id];
if (property == null) {
object = {mentionChannelName: undefined, mentionChannelCount: 0};
} else {
var Object = global.Object;
var value5 = Object.keys(property.mentionCounts).filter(_fun109203);
object = {};
var length = value5.length;
var value6 = undefined;
if (length > 0) {
value = ChannelStore.getChannel(value5[0]);
r2 = value == null ? value6 : value.name;
} else {
r2 = value6;
}
object.mentionChannelName = r2;
length = value5.length;
object.mentionChannelCount = length;
}
return object;
function _fun109203(a0) { // fn#109203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1608, offset: 0x0234187d, size: 33 bytes, params: 2, frame: 2
return env0_0.mentionCounts[a0].count > 0;
}
}
function _fun109204() { // fn#109204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:2100, offset: 0x0234189e, size: 633 bytes, params: 1, frame: 27
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const disableSubtitleBinding = disableSubtitle;
const value2 = null;
return (
disableSubtitleBinding
? value2
: (
value2 == mentionChannelName
? (
value2 == typingChannelId || value2 == JsxRuntimeModule.jsxs || env0_5.isMuted
? (
env0_3 && value2 != unreadChannelName && unreadChannelCount > 0
? (
<Text
variant="text-xs/medium"
color="text-strong"
lineClamp={1}
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.OqlmU6,
{channelName: unreadChannelName, channelHook: channelHook_109206,
count: unreadChannelCount - 1})}
</Text>
)
: value2
)
: (
<Text
variant="text-xs/medium"
color="text-strong"
lineClamp={1}
>
{
value2 != typingChannelName
? (
<>
<Text variant="text-xs/semibold">
{'#' + typingChannelName}
</Text>
{' · '}
</>
)
: value2
}
{JsxRuntimeModule.jsxs}
</Text>
)
)
: (
mentionChannelCount > 0
? (
<Text
variant="text-xs/medium"
color="text-strong"
lineClamp={1}
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.L9YdGH,
{channelName: mentionChannelName, channelHook: channelHook_109205,
count: mentionChannelCount - 1})}
</Text>
)
: (
value2 == typingChannelId || value2 == JsxRuntimeModule.jsxs || env0_5.isMuted
? (
env0_3 && value2 != unreadChannelName && unreadChannelCount > 0
? (
<Text
variant="text-xs/medium"
color="text-strong"
lineClamp={1}
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.OqlmU6,
{channelName: unreadChannelName,
channelHook: channelHook_109206,
count: unreadChannelCount - 1})}
</Text>
)
: value2
)
: (
<Text
variant="text-xs/medium"
color="text-strong"
lineClamp={1}
>
{
value2 != typingChannelName
? (
<>
<Text variant="text-xs/semibold">
{'#' + typingChannelName}
</Text>
{' · '}
</>
)
: value2
}
{JsxRuntimeModule.jsxs}
</Text>
)
)
)
)
);
function channelHook_109205(a0) { // fn#109205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:2273, offset: 0x02341b17, size: 83 bytes, params: 2, frame: 16
const Text = (TextModule).Text;
return (
<Text variant="text-xs/semibold">
{'#' + a0}
</Text>
);
}
function channelHook_109206(a0) { // fn#109206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:2546, offset: 0x02341b17, size: 83 bytes, params: 2, frame: 16
const Text = (TextModule).Text;
return (
<Text variant="text-xs/semibold">
{'#' + a0}
</Text>
);
}
}
function _fun109207() { // fn#109207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:2866, offset: 0x02341b6a, size: 220 bytes, params: 1, frame: 24
var environment;
var r0;
var value3;
var Text;
var intl;
var format;
var r1Vkoc;
var object2;
var voiceUsersBinding;
var Math;
var value;
if (JsxRuntimeModule.Fragment) {
value3 = environment.__proto__;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
r1Vkoc = (require(1244) /* metro dependency 1244: indexNative */).t.r1Vkoc;
object2 = {};
voiceUsersBinding = voiceUsers;
value = voiceUsersBinding.slice(0, 2);
value = value.map(function(a0) {
return a0.username;
});
object2.users = value.join(', ');
Math = global.Math;
object2.overflowCount = Math.max(voiceUsersBinding.length - 2, 0);
value = (
<Text
variant="text-xs/medium"
color="text-feedback-positive"
lineClamp={1}
>
{Reflect.apply(format, intl, [r1Vkoc, object2])}
</Text>
);
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _fun109209() { // fn#109209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:3124, offset: 0x02341c46, size: 171 bytes, params: 1, frame: 22
var username;
var r0;
var value3;
var value4;
var Text;
var intl;
var format;
var k5IKep;
var value;
const value2 = null;
if (JsxRuntimeModule.Fragment) {
value3 = environment.__proto__;
value4 = undefined;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
k5IKep = (require(1244) /* metro dependency 1244: indexNative */).t.k5IKep;
username = value2 == streamingUser ? value4 : streamingUser.username;
value = '';
value = (
<Text
variant="text-xs/medium"
color="text-feedback-positive"
lineClamp={1}
>
{Reflect.apply(format, intl, [k5IKep, {username: value2 != username ? username : value}])}
</Text>
);
r0 = value;
} else {
r0 = value2;
}
return r0;
}
}
return r0;
}
function _fun109209() { // fn#109209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:3124, offset: 0x02341c46, size: 171 bytes, params: 1, frame: 22
var username;
var r0;
var value3;
var value4;
var Text;
var intl;
var format;
var k5IKep;
var value;
const value2 = null;
if (env0_15) {
value3 = environment.__proto__;
value4 = undefined;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
k5IKep = (require(1244) /* metro dependency 1244: indexNative */).t.k5IKep;
username = value2 == streamingUser ? value4 : streamingUser.username;
value = '';
value = <Text variant="text-xs/medium" color="text-feedback-positive" lineClamp={1}>{Reflect.apply(format, intl,
[k5IKep, {username: value2 != username ? username : value}])}</Text>;
r0 = value;
} else {
r0 = value2;
function HomeDrawerGuildRow({guildId, disableSubtitle}) { // fn#109210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:3646, offset: 0x02341cf1, size: 196 bytes, params: 2, frame: 19
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const MobileHomeDrawerExperiment = (HomeDrawerExperimentModule).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
return (
guild == null
? null
: (
Reflect.apply(useConfig, MobileHomeDrawerExperiment, [{location: 'guild-row'}]).enableHome
? (
(importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList
? null
: (
<GuildRowWrapper guild={guild} disableSubtitle={disableSubtitle} />
)
)
: null
)
);
}
return r0;
}
function _fun109201(a0) { // fn#109201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1129, offset: 0x0234177d, size: 82 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
const basicChannel = ChannelStore.getBasicChannel(a0);
return basicChannel != null && (ReadStateStore.hasUnread(a0) && UserGuildSettingsStore.resolveUnreadSetting(basicChannel) === UnreadSetting.ALL_MESSAGES);
}
function _fun109203(a0) { // fn#109203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:1608, offset: 0x0234187d, size: 33 bytes, params: 2, frame: 2
return env0_0.mentionCounts[a0].count > 0;
}
function channelHook_109205(a0) { // fn#109205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14625:2273, offset: 0x02341b17, size: 83 bytes, params: 2, frame: 16
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-xs/semibold">
{'#' + a0}
</Text>
);
}
global.__d(_fun109194, 14428, [31, 27, 1379, 1935, 5214, 1867, 4605, 4864, 4865, 482, 33, 4501, 566, 4013, 4010,
14429, 10629, 4573, 6915, 1305, 14431, 14432, 11566, 1244, 14407,
2]) /* metro module 14428, dependencies: [31, 27, 1379, 1935, 5214, 1867, 4605, 4864, 4865, 482, 33, 4501, 566, 4013, 4010, 14429, 10629, 4573, 6915, 1305, 14431, 14432, 11566, 1244, 14407, 2] */;
@@ -1,189 +1,210 @@
/* Metro module 14431; source: modules/home_drawer/native/HomeDrawerGuildVoiceState.tsx; dependencies: [31, 27, 1935, 3793, 4300, 661, 33, 4501, 697, 10251, 1305, 477, 4573, 1244, 10271, 5475, 566, 22, 14420, 2] */
import GuildChannelStore from '../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import SortedVoiceStateStore from '../../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as GuildChannelStoreModule from '../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun109215(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:6, offset: 0x02341e85, size: 560 bytes, params: 8, frame: 25
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
const env0_3 = importAll(dependencyMap[value]);
const env0_4 = (require(27) /* metro dependency 27 */).View;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_6 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_VOCAL_CHANNELS_KEY;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
const value2 = require(33) /* metro dependency 33 */;
const env0_10 = value2.jsx;
const env0_11 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
const object6 = {'width': 72, 'height': 44, 'borderRadius': null, 'overflow': 'hidden'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_12 = Reflect.apply(createStyles, createStylesModule, [{voiceContainer: {'paddingRight': 8, 'height': 40,
'gap': 4, 'justifyContent': 'center'}, streamPreview: object6}]);
const value4 = createStylesModule;
createStyles = value4.createStyles;
object5 = {};
const object7 = {'paddingHorizontal': 5, 'paddingVertical': 1, 'borderBottomRightRadius': null,
let createStyles = CreateStylesModule.createStyles;
const object2 = {'width': 72, 'height': 44, 'borderRadius': null, 'overflow': 'hidden'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [{voiceContainer: {'paddingRight': 8, 'height': 40,
'gap': 4, 'justifyContent': 'center'}, streamPreview: object2}]);
createStyles = CreateStylesModule.createStyles;
object = {};
const object3 = {'paddingHorizontal': 5, 'paddingVertical': 1, 'borderBottomRightRadius': null,
'overflow': 'hidden', 'justifyContent': 'center', 'alignItems': 'center', 'backgroundColor': null,
'position': 'absolute', 'top': 0, 'left': 0};
object7.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object7.backgroundColor = RED_400;
object5.tag = object7;
const object8 = {textAlign: 'center'};
object3.backgroundColor = RED_400;
object.tag = object3;
const object4 = {textAlign: 'center'};
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object8.color = WHITE;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object8.marginTop = platformUtilsModule.isAndroid() ? -2 : value;
object5.tagText = object8;
const env0_13 = Reflect.apply(createStyles, value4, [object5]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerGuildVoiceState.tsx');
object4.color = WHITE;
object4.marginTop = PlatformUtilsModule.isAndroid() ? -2 : value;
object.tagText = object4;
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/HomeDrawerGuildVoiceState.tsx');
exports.GuildVoiceState = GuildVoiceState;
exports.useVoiceUsers = useVoiceUsers;
}
function VoiceUsers({voiceUsers, guildId}) { // fn#109216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:417, offset: 0x023420b5, size: 227 bytes, params: 2, frame: 23
const r10 = voiceUsers.length > 3 ? voiceUsers.slice(0, 3) : voiceUsers;
return voiceUsers.length === 0 ? null : <View style={{'flexDirection': 'row', 'alignItems': 'center',
'gap': 4}}>{((AvatarPile) => <AvatarPile size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} names={r10.map(function(a0) {
return a0.username;
})} totalCount={voiceUsers.length}>{r10.map(_fun109218)}</AvatarPile>)((require(10251) /* metro dependency 10251: AvatarPileNative */).AvatarPile)}</View>;
}
function LiveTag_109219() { // fn#109219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1165, offset: 0x023421fd, size: 166 bytes, params: 1, frame: 21
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.tag}>
<Text
variant="text-xs/bold"
style={styles.tagText}
lineClamp={1}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI3q4h).toUpperCase()}
</Text>
</View>
);
}
function GuildVoiceState({voiceUsers, streamingChannelId, streamingUser, guildId}) { // fn#109220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1471, offset: 0x023422a3, size: 323 bytes, params: 2, frame: 27
var r5;
var r0;
var object;
var object2;
var streamPreview;
var FastImage;
const styles = useStyles();
const value3 = voiceUsers.length > 0;
const previewUrl = (importDefault(10271) /* metro dependency 10271: useFetchStreamPreview */)(guildId,
streamingChannelId ?? undefined, streamingUser?.id).previewUrl;
if (value3) {
var viewProps = {style: [styles.voiceContainer, {height: streamingUser != null ? 48 : 32}]};
if (previewUrl == null) {
r5 = <VoiceUsers voiceUsers={voiceUsers} guildId={guildId} />;
} else {
object2 = {};
streamPreview = styles.streamPreview;
object2.style = streamPreview;
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
streamPreview = styles.streamPreview;
r5 = <View {...object2}><FastImage style={streamPreview} source={{uri: previewUrl}} /><LiveTag_109219 /></View>;
function VoiceUsers({voiceUsers, guildId}) { // fn#109216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:417, offset: 0x023420b5, size: 227 bytes, params: 2, frame: 23
const r10 = voiceUsers.length > 3 ? voiceUsers.slice(0, 3) : voiceUsers;
return (
voiceUsers.length === 0
? null
: (
<View style={{'flexDirection': 'row', 'alignItems': 'center', 'gap': 4}}>
{((AvatarPile) => <AvatarPile size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} names={r10.map(function(a0) {
return a0.username;
})} totalCount={voiceUsers.length}>{r10.map(_fun109218)}</AvatarPile>)((require(10251) /* metro dependency 10251: AvatarPileNative */).AvatarPile)}
</View>
)
);
function _fun109218(a0) { // fn#109218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:708, offset: 0x02342198, size: 101 bytes, params: 2, frame: 18
const Avatar = (NativeModule).Avatar;
const AvatarSizes = (NativeModule).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
return (
<Avatar
size={XSMALL}
user={a0}
guildId={guildId}
animate={false}
key={a0.id}
/>
);
}
r0 = <View {...viewProps}>{r5}</View>;
} else {
r0 = null;
}
return r0;
}
function useVoiceUsers(a0) { // fn#109221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1891, offset: 0x023423e6, size: 302 bytes, params: 2, frame: 23
const env0_0 = a0;
const id = a0.id;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildChannelStore],
_fun109222, [id]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
function() {
return SortedVoiceStateStore.getVoiceStates(id);
}, [id]);
const env0_3 = value3;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore],
function() {
return RelationshipStore.getBlockedOrIgnoredIDs();
});
const binding = env0_3;
const value = binding.useMemo(_fun109227, [value2, value3, a0.afkChannelId, value4]);
const value5 = binding.useMemo(_fun109230, [value3, a0.afkChannelId, value2]);
return {voiceUsers: value, streamingUser: value5.streamingUser, streamingChannelId: value5.streamingChannelId};
}
function _fun109218(a0) { // fn#109218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:708, offset: 0x02342198, size: 101 bytes, params: 2, frame: 18
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
return (
<Avatar
size={XSMALL}
user={a0}
guildId={guildId}
animate={false}
key={a0.id}
/>
);
}
function _fun109222() { // fn#109222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1968, offset: 0x02342514, size: 71 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
const getChannels = GuildChannelStore.getChannels;
return Reflect.apply(getChannels, GuildChannelStore, [id])[GUILD_VOCAL_CHANNELS_KEY].filter(function(a0) {
return a0.channel.type === ChannelTypes.GUILD_VOICE;
}).map(function(a0) {
return a0.channel.id;
});
}
function _fun109227() { // fn#109227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2224, offset: 0x023425a9, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.flatMap(env0_2, _fun109228);
}
function _fun109230() { // fn#109230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2431, offset: 0x0234264a, size: 76 bytes, params: 1, frame: 12
const env0_0 = null;
const env0_1 = null;
const Object = global.Object;
Object.keys(env0_3).forEach(_fun109231);
return {streamingUser: env0_0, streamingChannelId: env0_1};
}
function _fun109228(a0) { // fn#109228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2248, offset: 0x023425e0, size: 106 bytes, params: 2, frame: 14
if (a0 === env1_0.afkChannelId) {
return [];
function LiveTag_109219() { // fn#109219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1165, offset: 0x023421fd, size: 166 bytes, params: 1, frame: 21
const styles = useStyles();
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.tag}>
<Text
variant="text-xs/bold"
style={styles.tagText}
lineClamp={1}
>
{intl.string((IndexNativeModule).t.dI3q4h).toUpperCase()}
</Text>
</View>
);
}
return (require(14420) /* metro dependency 14420: BlockedUserUtils */).filterOutBlockedOrIgnoredUsers((env1_3[a0] ?? []).map(function(a0) {
return a0.user;
}), env1_4);
}
function _fun109231(a0) { // fn#109231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2485, offset: 0x02342696, size: 116 bytes, params: 2, frame: 13
var environment;
var binding;
var user;
let value = environment.__proto__;
if (a0 !== env1_0.afkChannelId) {
binding = env1_2;
if (binding.includes(a0)) {
value = (env1_3[a0] ?? []).find(function(a0) {
return a0.voiceState.selfStream;
});
if (value != null && env0_0 == null) {
user = value.user;
env0_1 = a0;
function GuildVoiceState({voiceUsers, streamingChannelId, streamingUser, guildId}) { // fn#109220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1471, offset: 0x023422a3, size: 323 bytes, params: 2, frame: 27
var r5;
var r0;
var object2;
var object;
var streamPreview;
var FastImage;
const styles = useStyles();
const value3 = voiceUsers.length > 0;
const previewUrl = (importDefault(10271) /* metro dependency 10271: useFetchStreamPreview */)(guildId,
streamingChannelId ?? undefined, streamingUser?.id).previewUrl;
if (value3) {
var viewProps = {style: [styles.voiceContainer, {height: streamingUser != null ? 48 : 32}]};
if (previewUrl == null) {
r5 = <VoiceUsers voiceUsers={voiceUsers} guildId={guildId} />;
} else {
object = {};
streamPreview = styles.streamPreview;
object.style = streamPreview;
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
streamPreview = styles.streamPreview;
r5 = (
<View {...object}>
<FastImage style={streamPreview} source={{uri: previewUrl}} />
<LiveTag_109219 />
</View>
);
}
r0 = (
<View {...viewProps}>
{r5}
</View>
);
} else {
r0 = null;
}
return r0;
}
function useVoiceUsers(a0) { // fn#109221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1891, offset: 0x023423e6, size: 302 bytes, params: 2, frame: 23
const env0_0 = a0;
const id = a0.id;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildChannelStore],
_fun109222, [id]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
function() {
return SortedVoiceStateStore.getVoiceStates(id);
}, [id]);
const env0_3 = value3;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore],
function() {
return RelationshipStore.getBlockedOrIgnoredIDs();
});
const binding = env0_3;
const value = binding.useMemo(_fun109227, [value2, value3, a0.afkChannelId, value4]);
const value5 = binding.useMemo(_fun109230, [value3, a0.afkChannelId, value2]);
return {voiceUsers: value, streamingUser: value5.streamingUser, streamingChannelId: value5.streamingChannelId};
function _fun109222() { // fn#109222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:1968, offset: 0x02342514, size: 71 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
const guildChannelStoreBinding = GuildChannelStore;
const getChannels = guildChannelStoreBinding.getChannels;
return Reflect.apply(getChannels, guildChannelStoreBinding, [id])[GUILD_VOCAL_CHANNELS_KEY].filter(function(a0) {
return a0.channel.type === ChannelTypes.GUILD_VOICE;
}).map(function(a0) {
return a0.channel.id;
});
}
function _fun109227() { // fn#109227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2224, offset: 0x023425a9, size: 55 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.flatMap(env0_2, _fun109228);
function _fun109228(a0) { // fn#109228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2248, offset: 0x023425e0, size: 106 bytes, params: 2, frame: 14
if (a0 === env1_0.afkChannelId) {
return [];
}
return (require(14420) /* metro dependency 14420: BlockedUserUtils */).filterOutBlockedOrIgnoredUsers((env1_3[a0] ?? []).map(function(a0) {
return a0.user;
}), env1_4);
}
}
function _fun109230() { // fn#109230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2431, offset: 0x0234264a, size: 76 bytes, params: 1, frame: 12
const env0_0 = null;
const env0_1 = null;
const Object = global.Object;
Object.keys(env0_3).forEach(_fun109231);
return {streamingUser: env0_0, streamingChannelId: env0_1};
function _fun109231(a0) { // fn#109231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14628:2485, offset: 0x02342696, size: 116 bytes, params: 2, frame: 13
var environment;
var binding;
var user;
let value = environment.__proto__;
if (a0 !== env1_0.afkChannelId) {
binding = env1_2;
if (binding.includes(a0)) {
value = (env1_3[a0] ?? []).find(function(a0) {
return a0.voiceState.selfStream;
});
if (value != null && env0_0 == null) {
user = value.user;
env0_1 = a0;
}
}
}
}
}
}
}
global.__d(_fun109215, 14431, [31, 27, 1935, 3793, 4300, 661, 33, 4501, 697, 10251, 1305, 477, 4573, 1244, 10271,
5475, 566, 22, 14420,
2]) /* metro module 14431, dependencies: [31, 27, 1935, 3793, 4300, 661, 33, 4501, 697, 10251, 1305, 477, 4573, 1244, 10271, 5475, 566, 22, 14420, 2] */;
@@ -1,30 +1,41 @@
/* Metro module 14407; source: modules/home_drawer/native/HomeDrawerShared.tsx; dependencies: [31, 27, 33, 4501, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun109068(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14604:6, offset: 0x0233c12b, size: 234 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_1 = value.jsxs;
const env0_2 = value.jsx;
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
ReactModule;
const env0_3 = (CreateStylesModule).createStyles({container: {'flex': 1,
'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between', 'gap': 12},
titleContainer: {'flex': 1, 'flexDirection': 'column', 'justifyContent': 'center'},
rightContainer: {overflow: 'hidden'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerShared.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/HomeDrawerShared.tsx');
exports.HomeDrawerSharedItem = HomeDrawerSharedItem;
}
function HomeDrawerSharedItem({title, subtitle, right}) { // fn#109069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14604:479, offset: 0x0233c215, size: 148 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<View style={styles.container}>
<View style={styles.titleContainer}>
{title}
{subtitle}
function HomeDrawerSharedItem({title, subtitle, right}) { // fn#109069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14604:479, offset: 0x0233c215, size: 148 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<View style={styles.container}>
<View style={styles.titleContainer}>
{title}
{subtitle}
</View>
{
right != null
? (
<View style={styles.rightContainer}>
{right}
</View>
)
: null
}
</View>
{right != null ? <View style={styles.rightContainer}>{right}</View> : null}
</View>
);
);
}
}
global.__d(_fun109068, 14407, [31, 27, 33, 4501, 2]) /* metro module 14407, dependencies: [31, 27, 33, 4501, 2] */;
@@ -1,60 +1,65 @@
/* Metro module 14375; source: modules/home_drawer/native/HomeDrawerStore.tsx; dependencies: [661, 685, 4017, 3769, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as Module00685Module from '../../../by-id/module-00685.js'; /* Metro dependency 685 */
function _fun108792(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:6, offset: 0x0232ea81, size: 159 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).DM_WIDTH;
let value = require(685) /* metro dependency 685 */;
let value = Module00685Module;
value = value.createWithEqualityFn(_fun108793, (require(3769) /* metro dependency 3769 */).shallow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/HomeDrawerStore.tsx');
exports.default = value;
}
function _fun108793(a0, a1) { // fn#108793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:147, offset: 0x0232eb20, size: 181 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const object = {};
object.panelX = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(0);
object.gestureState = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable({'active': false,
'initialX': 0, 'initialY': 0, 'panelX': 0});
object.maxX = 0;
object.lastInteractionAt = {current: 0};
object.isPanelTouchActive = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(false);
object.setPanelX = setPanelX;
object.updateMaxX = updateMaxX;
object.noteInteraction = function() {
var lastInteractionAt = require().lastInteractionAt;
var Date = global.Date;
lastInteractionAt.current = Date.now();
};
return object;
function setPanelX(a0) { // fn#108794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:343, offset: 0x0232ebd5, size: 107 bytes, params: 2, frame: 15
var set;
let value = require();
const panelX = value.panelX;
const gestureState = value.gestureState;
const maxX = value.maxX;
value = 'open';
if (value === a0) {
panelX.set(maxX);
set = value;
} else {
panelX.set(0);
}
const set2 = gestureState.set;
const object = {};
const get = gestureState.get;
copyDataProperties(object, Reflect.apply(get, gestureState, []), set);
object['active'] = false;
Reflect.apply(set2, gestureState, [object]);
}
function _fun108793(a0, a1) { // fn#108793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:147, offset: 0x0232eb20, size: 181 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const object2 = {};
object2.panelX = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(0);
object2.gestureState = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable({'active': false,
'initialX': 0, 'initialY': 0, 'panelX': 0});
object2.maxX = 0;
object2.lastInteractionAt = {current: 0};
object2.isPanelTouchActive = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(false);
object2.setPanelX = setPanelX;
object2.updateMaxX = updateMaxX;
object2.noteInteraction = function() {
var lastInteractionAt = require().lastInteractionAt;
var Date = global.Date;
lastInteractionAt.current = Date.now();
};
return object2;
}
function updateMaxX({width}, {left, right}) { // fn#108795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:463, offset: 0x0232ec40, size: 74 bytes, params: 3, frame: 12
let value = width - left;
value -= right;
value = value - DM_WIDTH - 8;
env0_0({maxX: value + 8});
}
function setPanelX(a0) { // fn#108794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:343, offset: 0x0232ebd5, size: 107 bytes, params: 2, frame: 15
var set;
let value = require();
const panelX = value.panelX;
const gestureState = value.gestureState;
const maxX = value.maxX;
value = 'open';
if (value === a0) {
panelX.set(maxX);
set = value;
} else {
panelX.set(0);
}
const set2 = gestureState.set;
const object2 = {};
const get = gestureState.get;
copyDataProperties(object2, Reflect.apply(get, gestureState, []), set);
object2['active'] = false;
Reflect.apply(set2, gestureState, [object2]);
}
function updateMaxX({width}, {left, right}) { // fn#108795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14572:463, offset: 0x0232ec40, size: 74 bytes, params: 3, frame: 12
let value = width - left;
value -= right;
value = value - DM_WIDTH - 8;
env0_0({maxX: value + 8});
}
global.__d(_fun108792, 14375, [661, 685, 4017, 3769,
2]) /* metro module 14375, dependencies: [661, 685, 4017, 3769, 2] */;
@@ -1,42 +1,46 @@
/* Metro module 14376; source: modules/home_drawer/native/HomeDrawerSubtitleStore.tsx; dependencies: [629, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00629Module from '../../../by-id/module-00629.js'; /* Metro dependency 629 */
function _fun108797(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:6, offset: 0x0232ecb6, size: 115 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return {currentType: 'voice', startTimer: _fun108799, stopTimer: _fun108801};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/HomeDrawerSubtitleStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/HomeDrawerSubtitleStore.tsx');
exports.default = value;
}
function _fun108798(a0, a1) { // fn#108798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:121, offset: 0x0232ed29, size: 53 bytes, params: 3, frame: 3
const env0_0 = a0;
const env0_1 = a1;
return {currentType: 'voice', startTimer: startTimer_108799, stopTimer: stopTimer};
function startTimer_108799() { // fn#108799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:161, offset: 0x0232ed5e, size: 69 bytes, params: 1, frame: 14
if (env1_0 != null) {
global.clearInterval(env1_0);
}
env1_0 = global.setInterval(_fun108800, 3500);
function _fun108800() { // fn#108800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:207, offset: 0x0232eda3, size: 49 bytes, params: 1, frame: 13
let value = environment.__proto__;
const currentType = require().currentType;
const binding = env1_0;
value = 'voice';
binding({currentType: value !== currentType ? value : 'activity'});
}
function _fun108798(a0, a1) { // fn#108798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:121, offset: 0x0232ed29, size: 53 bytes, params: 3, frame: 3
const env0_0 = a0;
const env0_1 = a1;
return {currentType: 'voice', startTimer: startTimer, stopTimer: stopTimer};
}
}
function stopTimer() { // fn#108801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:301, offset: 0x0232edd4, size: 63 bytes, params: 1, frame: 13
if (env1_0 != null) {
global.clearInterval(env1_0);
}
env0_0({currentType: 'voice'});
}
function startTimer() { // fn#108799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:161, offset: 0x0232ed5e, size: 69 bytes, params: 1, frame: 14
if (env1_0 != null) {
global.clearInterval(env1_0);
}
env1_0 = global.setInterval(_fun108800, 3500);
}
function stopTimer() { // fn#108801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:301, offset: 0x0232edd4, size: 63 bytes, params: 1, frame: 13
if (env1_0 != null) {
global.clearInterval(env1_0);
}
env0_0({currentType: 'voice'});
}
function _fun108800() { // fn#108800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14573:207, offset: 0x0232eda3, size: 49 bytes, params: 1, frame: 13
let value = environment.__proto__;
const currentType = require().currentType;
const binding = env1_0;
value = 'voice';
binding({currentType: value !== currentType ? value : 'activity'});
}
global.__d(_fun108797, 14376, [629, 2]) /* metro module 14376, dependencies: [629, 2] */;
@@ -1,70 +1,74 @@
/* Metro module 14378; source: modules/home_drawer/native/useDrawerState.tsx; dependencies: [57, 31, 1485, 4007, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as Module01485Module from '../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as NavigationRouteUtilsNativeModule from '../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
function _fun108817(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:6, offset: 0x0232f7ba, size: 133 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/useDrawerState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/useDrawerState.tsx');
exports.useDrawerOpen = useDrawerOpen;
}
function useDrawerOpen() { // fn#108818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:214, offset: 0x0232f83f, size: 142 bytes, params: 1, frame: 18
let value = a0;
const r5 = !(value !== undefined) || value;
let env0_2 = undefined;
const value2 = (Module01485Module).useNavigation();
value = env0_2(ReactModule.useState(_fun108819), 2);
const property = value[0];
env0_2 = value[1];
ReactModule.useEffect(_fun108820, [value2, r5]);
return property;
function _fun108819() { // fn#108819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:287, offset: 0x0232f8cd, size: 158 bytes, params: 1, frame: 17
var value2;
var value3;
var moduleValue;
var value;
if (env0_0) {
value = env0_1.getState();
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = moduleValue.coerceGuildsRoute(value == null || value.routes == null ? value3 : value.routes[(value == null ? value3 : value.index) ?? 0]);
return (value == null || value.params == null ? value3 : value.params.drawerOpen) === true;
}
return false;
}
function useDrawerOpen() { // fn#108818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:214, offset: 0x0232f83f, size: 142 bytes, params: 1, frame: 18
let value = a0;
const r5 = !(value !== undefined) || value;
let env0_2 = undefined;
const value2 = (require(1485) /* metro dependency 1485 */).useNavigation();
const binding = env0_3;
value = env0_2(binding.useState(_fun108819), 2);
const property = value[0];
env0_2 = value[1];
binding.useEffect(_fun108820, [value2, r5]);
return property;
}
function _fun108820() { // fn#108820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:547, offset: 0x0232f96b, size: 56 bytes, params: 1, frame: 14
if (env0_0) {
env0_1.addListener('state', handleStateChange_108821);
return _fun108822;
}
function handleStateChange_108821({data}) { // fn#108821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:655, offset: 0x0232f9a3, size: 150 bytes, params: 2, frame: 17
var drawerOpen;
var params;
var value4;
const state = data.state;
let value = environment.__proto__.__proto__;
value = undefined;
const value3 = NavigationRouteUtilsNativeModule.coerceGuildsRoute(state == null || state.routes == null ? value : state.routes[(state == null ? value : state.index) ?? 0]);
if (value3 != null) {
params = value3.params;
drawerOpen = params == null ? value : params.drawerOpen;
value4 = environment.__proto__;
env1_2(drawerOpen === true);
}
return value;
}
function _fun108822() { // fn#108822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:605, offset: 0x0232fa39, size: 34 bytes, params: 1, frame: 13
const binding = env1_1;
binding.removeListener('state', handleStateChange_108821);
}
}
function _fun108819() { // fn#108819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:287, offset: 0x0232f8cd, size: 158 bytes, params: 1, frame: 17
var value2;
var value3;
var moduleValue;
var value;
if (env0_0) {
value = env0_1.getState();
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = moduleValue.coerceGuildsRoute(value == null || value.routes == null ? value3 : value.routes[(value == null ? value3 : value.index) ?? 0]);
return (value == null || value.params == null ? value3 : value.params.drawerOpen) === true;
}
return false;
}
function _fun108820() { // fn#108820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:547, offset: 0x0232f96b, size: 56 bytes, params: 1, frame: 14
if (env0_0) {
env0_1.addListener('state', handleStateChange_108821);
return _fun108822;
}
}
function handleStateChange_108821({data}) { // fn#108821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:655, offset: 0x0232f9a3, size: 150 bytes, params: 2, frame: 17
var drawerOpen;
var params;
var value4;
const state = data.state;
let value = environment.__proto__.__proto__;
value = undefined;
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
const value3 = navigationRouteUtilsNativeModule.coerceGuildsRoute(state == null || state.routes == null ? value : state.routes[(state == null ? value : state.index) ?? 0]);
if (value3 != null) {
params = value3.params;
drawerOpen = params == null ? value : params.drawerOpen;
value4 = environment.__proto__;
env1_2(drawerOpen === true);
}
return value;
}
function _fun108822() { // fn#108822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14575:605, offset: 0x0232fa39, size: 34 bytes, params: 1, frame: 13
const binding = env1_1;
binding.removeListener('state', handleStateChange_108821);
}
global.__d(_fun108817, 14378, [57, 31, 1485, 4007,
2]) /* metro module 14378, dependencies: [57, 31, 1485, 4007, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,51 +1,56 @@
/* Metro module 14432; source: modules/home_drawer/native/useHomeDrawerGuildTyping.tsx; dependencies: [1379, 11532, 628, 566, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import TypingStore from '../../../stores/TypingStore.tsx'; /* Metro dependency 11532 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun109233(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:6, offset: 0x0234270a, size: 166 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const typingStore = importDefault(11532) /* metro dependency 11532: TypingStore */;
object = {typingChannelId: undefined, typingChannelName: undefined, typingUserIds: []};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/useHomeDrawerGuildTyping.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/useHomeDrawerGuildTyping.tsx');
exports.useHomeDrawerGuildTyping = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStores([TypingStore, ChannelStore], _fun109236, [a0],
areHomeDrawerGuildTypingStatesEqual);
};
}
function areHomeDrawerGuildTypingStatesEqual(a0, a1) { // fn#109234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:185, offset: 0x023427b0, size: 95 bytes, params: 3, frame: 15
let value = a0.typingChannelId === a1.typingChannelId;
let r0 = value && a0.typingChannelName === a1.typingChannelName;
if (r0) {
value = require(628) /* metro dependency 628: shallowEqual */;
value = value.areArraysShallowEqual(a0.typingUserIds, a1.typingUserIds);
r0 = value;
function areHomeDrawerGuildTypingStatesEqual(a0, a1) { // fn#109234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:185, offset: 0x023427b0, size: 95 bytes, params: 3, frame: 15
let value = a0.typingChannelId === a1.typingChannelId;
let r0 = value && a0.typingChannelName === a1.typingChannelName;
if (r0) {
value = require(628) /* metro dependency 628: shallowEqual */;
value = value.areArraysShallowEqual(a0.typingUserIds, a1.typingUserIds);
r0 = value;
}
return r0;
}
return r0;
}
function useHomeDrawerGuildTyping(a0) { // fn#109235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:503, offset: 0x0234280f, size: 93 bytes, params: 2, frame: 18
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([TypingStore, ChannelStore], _fun109236,
[a0], areHomeDrawerGuildTypingStatesEqual);
}
function useHomeDrawerGuildTyping(a0) { // fn#109235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:503, offset: 0x0234280f, size: 93 bytes, params: 2, frame: 18
const env0_0 = a0;
return (FluxModule).useStateFromStores([TypingStore, ChannelStore], _fun109236,
[a0], areHomeDrawerGuildTypingStatesEqual);
function _fun109236() { // fn#109236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:581, offset: 0x0234286c, size: 130 bytes, params: 1, frame: 16
var r0;
var object;
const value = environment.__proto__;
const typingUsersByGuild = TypingStore.getTypingUsersByGuild(env0_0);
const Object = global.Object;
const property = Object.keys(typingUsersByGuild)[0];
if (property == null) {
r0 = env1_4;
} else {
object = {typingChannelId: property};
object.typingChannelName = ChannelStore.getChannel(property)?.name;
object.typingUserIds = global.Object.keys(typingUsersByGuild[property]);
r0 = object;
}
return r0;
}
function _fun109236() { // fn#109236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14629:581, offset: 0x0234286c, size: 130 bytes, params: 1, frame: 16
var r0;
var object2;
const value = environment.__proto__;
const typingUsersByGuild = TypingStore.getTypingUsersByGuild(env0_0);
const Object = global.Object;
const property = Object.keys(typingUsersByGuild)[0];
if (property == null) {
r0 = env1_4;
} else {
object2 = {typingChannelId: property};
object2.typingChannelName = ChannelStore.getChannel(property)?.name;
object2.typingUserIds = global.Object.keys(typingUsersByGuild[property]);
r0 = object2;
}
return r0;
}
global.__d(_fun109233, 14432, [1379, 11532, 628, 566,
2]) /* metro module 14432, dependencies: [1379, 11532, 628, 566, 2] */;
@@ -1,258 +1,269 @@
/* Metro module 14377; source: modules/home_drawer/native/useHomeDrawerPeekHint.tsx; dependencies: [57, 31, 4502, 14375, 661, 1376, 4017, 1365, 1485, 14378, 566, 14373, 3968, 7013, 4504, 4577, 14374, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import HomeDrawerStore from './HomeDrawerStore.tsx'; /* Metro dependency 14375 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as Module01485Module from '../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as DismissibleContentUnsafeUtilsModule from '../../dismissible_content/DismissibleContentUnsafeUtils.tsx'; /* Metro dependency 3968 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as SpringModule from '../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as UseSelectedDismissibleContentModule from '../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as UseGuildsRouteGuildIdModule from '../../main_tabs_v2/navigator/useGuildsRouteGuildId.tsx'; /* Metro dependency 14373 */
import * as UseHomeDrawerGestureModule from './useHomeDrawerGesture.tsx'; /* Metro dependency 14374 */
import * as UseDrawerStateModule from './useDrawerState.tsx'; /* Metro dependency 14378 */
function _fun108802(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:6, offset: 0x0232ee13, size: 350 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const homeDrawerStore = importDefault(14375) /* metro dependency 14375: HomeDrawerStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).ME;
const env0_7 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const Easing = (ReanimatedRexportModule).Easing;
const inOut = Easing.inOut;
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const Easing2 = (ReanimatedRexportModule).Easing;
const env0_8 = Reflect.apply(inOut, Easing, [Easing2.cubic]);
const env0_9 = [];
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
object = [HOME_DRAWER_SWIPE_PEEK_NUX];
object = {code: 'function useHomeDrawerPeekHintTsx1(){const{gestureState,panelX,PEEK_HINT_DRAWER_DRAG_THRESHOLD}=this.__closure;return gestureState.get().active&&panelX.get()>PEEK_HINT_DRAWER_DRAG_THRESHOLD;}'};
object = {code: 'function useHomeDrawerPeekHintTsx2(isDragged,wasDragged){const{isPeekGranted,runOnJS,handleDrawerDragged}=this.__closure;if(!isPeekGranted||wasDragged==null)return;if(isDragged&&!wasDragged){runOnJS(handleDrawerDragged)();}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/home_drawer/native/useHomeDrawerPeekHint.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/home_drawer/native/useHomeDrawerPeekHint.tsx');
exports.PEEK_HINT_DISTANCE = 40;
exports.useHomeDrawerPeekHint = useHomeDrawerPeekHint;
}
function useHomeDrawerPeekHint(a0, a1) { // fn#108803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:872, offset: 0x0232ef71, size: 944 bytes, params: 3, frame: 32
var object2;
let value = a0;
const env0_0 = a1;
const value3 = HomeDrawerStore();
const panelX = value3.panelX;
const gestureState = value3.gestureState;
const env0_2 = gestureState;
const lastInteractionAt = value3.lastInteractionAt;
const env0_3 = lastInteractionAt;
const isPanelTouchActive = value3.isPanelTouchActive;
const noteInteraction = value3.noteInteraction;
const value4 = (require(1485) /* metro dependency 1485 */).useIsFocused();
const value5 = (require(14378) /* metro dependency 14378: useDrawerState */).useDrawerOpen(value);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
let property = env0_2((require(14373) /* metro dependency 14373: useGuildsRouteGuildId */).useGuildsRouteGuildAndChannelId(),
1)[0];
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_useIsDismissibleContentDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
let HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
const value8 = !Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, dismissibleContentUnsafeUtilsModule,
[HOME_DRAWER_SWIPE_PEEK_NUX]);
let r3 = value && value4 && property != null;
r3 = r3 && property !== ME && !value5;
r3 = r3 && !useReducedMotion && value8;
let binding = env0_3;
const env0_8 = binding.useRef(false);
value = binding.useState(false);
value = env0_2(value, 2);
property = value[0];
const env0_9 = property;
const property2 = value[1];
const env0_10 = property2;
if (property && !r3) {
property2(false);
}
const useSelectedDismissibleContent = (require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent;
value = Reflect.apply(useSelectedDismissibleContent, value, [property && r3 ? env0_10 : env0_9, undefined, true]);
value = env0_2(value, 2);
const property3 = value[0];
const property4 = value[1];
const env0_11 = property4;
binding = env0_3;
const env0_12 = binding.useRef(null);
const env0_13 = binding.useRef(null);
const env0_14 = binding.useRef(false);
const env0_15 = binding.useRef(null);
value = binding.useCallback(_fun108805, [a1]);
HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
const value9 = property3 === HOME_DRAWER_SWIPE_PEEK_NUX;
binding.useEffect(_fun108807, [value9, value, property4]);
value = binding.useCallback(_fun108808, [a1]);
binding.useEffect(_fun108809, [r3, property, noteInteraction, lastInteractionAt, isPanelTouchActive]);
binding.useEffect(_fun108812, [value5, value]);
binding.useEffect(_fun108813, [r3, value]);
value = binding.useCallback(_fun108814, [value]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = useHomeDrawerPeekHintV;
closure.__closure = {gestureState: gestureState, panelX: panelX, PEEK_HINT_DRAWER_DRAG_THRESHOLD: 8};
closure.__workletHash = 15765003051494;
closure.__initData = env0_11;
const closure2 = useHomeDrawerPeekHintQ;
object2 = {isPeekGranted: value9};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.handleDrawerDragged = value;
closure2.__closure = object2;
closure2.__workletHash = 10054961085184;
closure2.__initData = env0_12;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
}
function _fun108805() { // fn#108805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1560, offset: 0x0232f321, size: 179 bytes, params: 1, frame: 18
if (env0_12.current != null) {
global.clearTimeout(env0_12.current);
env0_12.current = null;
}
env0_14.current = true;
const set = require.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, require, [timingModule.withTiming(40, {duration: 1500, easing: env1_8})]);
env0_13.current = global.setTimeout(_fun108806, 2500);
}
function _fun108807() { // fn#108807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1949, offset: 0x0232f465, size: 53 bytes, params: 1, frame: 10
if (result && !env0_14.current) {
env0_15.current = env0_11;
env0_16();
}
}
function _fun108808() { // fn#108808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2019, offset: 0x0232f49a, size: 197 bytes, params: 1, frame: 17
var set;
var value;
if (env0_12.current != null) {
global.clearTimeout(env0_12.current);
env0_12.current = null;
}
if (env0_13.current != null) {
global.clearTimeout(env0_13.current);
env0_13.current = null;
}
if (env0_14.current) {
env0_14.current = false;
set = require.set;
value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, require, [value.withSpring(0,
(require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HOME_DRAWER_FLING_PHYSICS)]);
}
}
function _fun108809() { // fn#108809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2251, offset: 0x0232f55f, size: 95 bytes, params: 1, frame: 15
if (env0_7) {
if (env0_9) {
return undefined;
function useHomeDrawerPeekHint(a0, a1) { // fn#108803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:872, offset: 0x0232ef71, size: 944 bytes, params: 3, frame: 32
let value = a0;
const env0_0 = a1;
const value3 = HomeDrawerStore();
const panelX = value3.panelX;
const gestureState = value3.gestureState;
const gestureState2 = gestureState;
const lastInteractionAt = value3.lastInteractionAt;
const lastInteractionAt2 = lastInteractionAt;
const isPanelTouchActive = value3.isPanelTouchActive;
const noteInteraction = value3.noteInteraction;
const value4 = (Module01485Module).useIsFocused();
const value5 = (UseDrawerStateModule).useDrawerOpen(value);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
let property = gestureState2((UseGuildsRouteGuildIdModule).useGuildsRouteGuildAndChannelId(),
1)[0];
const UNSAFE_useIsDismissibleContentDismissed = DismissibleContentUnsafeUtilsModule.UNSAFE_useIsDismissibleContentDismissed;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
let HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
const value8 = !Reflect.apply(UNSAFE_useIsDismissibleContentDismissed, DismissibleContentUnsafeUtilsModule,
[HOME_DRAWER_SWIPE_PEEK_NUX]);
let r3 = value && value4 && property != null;
r3 = r3 && property !== ME && !value5;
r3 = r3 && !useReducedMotion && value8;
let binding = lastInteractionAt2;
const env0_8 = binding.useRef(false);
value = binding.useState(false);
value = gestureState2(value, 2);
property = value[0];
const property5 = property;
const property2 = value[1];
const property22 = property2;
if (property && !r3) {
property2(false);
}
if (env0_8.current) {
return undefined;
const useSelectedDismissibleContent = (UseSelectedDismissibleContentModule).useSelectedDismissibleContent;
value = Reflect.apply(useSelectedDismissibleContent, value, [property && r3 ? property22 : property5, undefined,
true]);
value = gestureState2(value, 2);
const property3 = value[0];
const property4 = value[1];
const property42 = property4;
binding = lastInteractionAt2;
const env0_12 = binding.useRef(null);
const env0_13 = binding.useRef(null);
const env0_14 = binding.useRef(false);
const env0_15 = binding.useRef(null);
value = binding.useCallback(_fun108805, [a1]);
HOME_DRAWER_SWIPE_PEEK_NUX = DismissibleContent.HOME_DRAWER_SWIPE_PEEK_NUX;
const value9 = property3 === HOME_DRAWER_SWIPE_PEEK_NUX;
binding.useEffect(_fun108807, [value9, value, property4]);
value = binding.useCallback(_fun108808, [a1]);
binding.useEffect(_fun108809, [r3, property, noteInteraction, lastInteractionAt, isPanelTouchActive]);
binding.useEffect(_fun108812, [value5, value]);
binding.useEffect(_fun108813, [r3, value]);
value = binding.useCallback(_fun108814, [value]);
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const useHomeDrawerPeekHintV2 = useHomeDrawerPeekHintV;
useHomeDrawerPeekHintV2.__closure = {gestureState: gestureState, panelX: panelX, PEEK_HINT_DRAWER_DRAG_THRESHOLD: 8};
useHomeDrawerPeekHintV2.__workletHash = 15765003051494;
useHomeDrawerPeekHintV2.__initData = property42;
const useHomeDrawerPeekHintQ2 = useHomeDrawerPeekHintQ;
object = {isPeekGranted: value9};
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.handleDrawerDragged = value;
useHomeDrawerPeekHintQ2.__closure = object;
useHomeDrawerPeekHintQ2.__workletHash = 10054961085184;
useHomeDrawerPeekHintQ2.__initData = env0_12;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [useHomeDrawerPeekHintV2, useHomeDrawerPeekHintQ2]);
function _fun108805() { // fn#108805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1560, offset: 0x0232f321, size: 179 bytes, params: 1, frame: 18
if (env0_12.current != null) {
global.clearTimeout(env0_12.current);
env0_12.current = null;
}
env0_14.current = true;
const set = require.set;
Reflect.apply(set, require, [TimingModule.withTiming(40, {duration: 1500, easing: env1_8})]);
env0_13.current = global.setTimeout(_fun108806, 2500);
function _fun108806() { // fn#108806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1714, offset: 0x0232f3d4, size: 145 bytes, params: 1, frame: 21
var binding;
env1_13.current = null;
env1_14.current = false;
const set = require.set;
const withSpring = SpringModule.withSpring;
const HOME_DRAWER_FLING_PHYSICS = (UseHomeDrawerGestureModule).HOME_DRAWER_FLING_PHYSICS;
Reflect.apply(set, require, [Reflect.apply(withSpring, SpringModule, [0, HOME_DRAWER_FLING_PHYSICS])]);
if (env1_15.current != null) {
binding = env1_15;
binding.current(ContentDismissActionType.AUTO_DISMISS);
}
env1_10(false);
}
}
noteInteraction();
env0_12.current = global.setTimeout(checkIdle, 2000);
return _fun108811;
}
}
function _fun108812() { // fn#108812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2541, offset: 0x0232f67e, size: 36 bytes, params: 1, frame: 10
if (env0_6) {
env0_8.current = true;
env0_18();
}
}
function _fun108813() { // fn#108813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2590, offset: 0x0232f6a2, size: 81 bytes, params: 1, frame: 11
var current;
let binding = env0_7;
if (!binding && env0_14.current) {
env0_18();
current = env0_15.current;
if (current != null) {
binding = env0_15;
current = binding.current;
value = environment.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
function _fun108807() { // fn#108807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1949, offset: 0x0232f465, size: 53 bytes, params: 1, frame: 10
if (result && !env0_14.current) {
env0_15.current = env0_11;
env0_16();
}
}
function _fun108808() { // fn#108808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2019, offset: 0x0232f49a, size: 197 bytes, params: 1, frame: 17
var set;
var value;
if (env0_12.current != null) {
global.clearTimeout(env0_12.current);
env0_12.current = null;
}
if (env0_13.current != null) {
global.clearTimeout(env0_13.current);
env0_13.current = null;
}
if (env0_14.current) {
env0_14.current = false;
set = require.set;
value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, require, [value.withSpring(0,
(require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HOME_DRAWER_FLING_PHYSICS)]);
}
}
function _fun108809() { // fn#108809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2251, offset: 0x0232f55f, size: 95 bytes, params: 1, frame: 15
if (DismissibleContentConstantsModule.ContentDismissActionType) {
if (env0_9) {
return undefined;
}
if (env0_8.current) {
return undefined;
}
noteInteraction();
env0_12.current = global.setTimeout(checkIdle, 2000);
return _fun108811;
}
function checkIdle() { // fn#108810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2296, offset: 0x0232f5be, size: 136 bytes, params: 1, frame: 16
env1_12.current = null;
const Date = global.Date;
const value2 = Date.now();
const current = lastInteractionAt.current;
const value3 = 2000;
const value4 = value3 - (value2 - current);
const isPanelTouchActiveBinding = isPanelTouchActive;
const get = isPanelTouchActiveBinding.get;
if (Reflect.apply(get, isPanelTouchActiveBinding, [])) {
env1_12.current = global.setTimeout(checkIdle, value4 > 0 ? value4 : value3);
} else if (value4 > 0) {
env1_12.current = global.setTimeout(checkIdle, value4 > 0 ? value4 : value3);
} else {
env1_10(true);
}
}
function _fun108811() { // fn#108811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2448, offset: 0x0232f646, size: 56 bytes, params: 1, frame: 13
if (env1_12.current != null) {
global.clearTimeout(env1_12.current);
env1_12.current = null;
}
}
}
function _fun108812() { // fn#108812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2541, offset: 0x0232f67e, size: 36 bytes, params: 1, frame: 10
if (ConstantsModule.ME) {
env0_8.current = true;
env0_18();
}
}
function _fun108813() { // fn#108813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2590, offset: 0x0232f6a2, size: 81 bytes, params: 1, frame: 11
var current;
let binding = DismissibleContentConstantsModule.ContentDismissActionType;
if (!binding && env0_14.current) {
env0_18();
current = env0_15.current;
if (current != null) {
binding = env0_15;
current = binding.current;
value = environment.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
}
}
}
function _fun108814() { // fn#108814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2693, offset: 0x0232f6f3, size: 68 bytes, params: 1, frame: 13
var binding;
var value2;
env0_18();
let current = env0_15.current;
if (current != null) {
binding = env0_15;
current = binding.current;
value2 = environment.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.INDIRECT_ACTION]);
}
env0_10(false);
}
function useHomeDrawerPeekHintV() { // fn#108815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2793, owner: useHomeDrawerPeekHint.V, offset: 0x0232f737, size: 47 bytes, params: 1, frame: 10
var r0;
var value;
const gestureStateBinding = gestureState;
const get = gestureStateBinding.get;
const active = Reflect.apply(get, gestureStateBinding, []).active;
if (active) {
value = panelX.get();
value = value > 8;
r0 = value;
} else {
r0 = active;
}
return r0;
}
function useHomeDrawerPeekHintQ(a0, a1) { // fn#108816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2946, owner: useHomeDrawerPeekHint.Q, offset: 0x0232f766, size: 84 bytes, params: 3, frame: 13
let value = a0;
if (result && a1 != null && value && !a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_19)();
}
}
}
}
function _fun108814() { // fn#108814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2693, offset: 0x0232f6f3, size: 68 bytes, params: 1, frame: 13
var binding;
var value2;
env0_18();
let current = env0_15.current;
if (current != null) {
binding = env0_15;
current = binding.current;
value2 = environment.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.INDIRECT_ACTION]);
}
env0_10(false);
}
function useHomeDrawerPeekHintV() { // fn#108815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2793, owner: useHomeDrawerPeekHint.V, offset: 0x0232f737, size: 47 bytes, params: 1, frame: 10
var r0;
var value;
const gestureStateBinding = gestureState;
const get = gestureStateBinding.get;
const active = Reflect.apply(get, gestureStateBinding, []).active;
if (active) {
value = panelX.get();
value = value > 8;
r0 = value;
} else {
r0 = active;
}
return r0;
}
function useHomeDrawerPeekHintQ(a0, a1) { // fn#108816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2946, owner: useHomeDrawerPeekHint.Q, offset: 0x0232f766, size: 84 bytes, params: 3, frame: 13
let value = a0;
if (result && a1 != null && value && !a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_19)();
}
}
function _fun108806() { // fn#108806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:1714, offset: 0x0232f3d4, size: 145 bytes, params: 1, frame: 21
var binding;
env1_13.current = null;
env1_14.current = false;
const set = require.set;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const HOME_DRAWER_FLING_PHYSICS = (require(14374) /* metro dependency 14374: useHomeDrawerGesture */).HOME_DRAWER_FLING_PHYSICS;
Reflect.apply(set, require, [Reflect.apply(withSpring, springModule, [0, HOME_DRAWER_FLING_PHYSICS])]);
if (env1_15.current != null) {
binding = env1_15;
binding.current(ContentDismissActionType.AUTO_DISMISS);
}
env1_10(false);
}
function checkIdle() { // fn#108810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2296, offset: 0x0232f5be, size: 136 bytes, params: 1, frame: 16
env1_12.current = null;
const Date = global.Date;
const value2 = Date.now();
const current = lastInteractionAt.current;
const value3 = 2000;
const value4 = value3 - (value2 - current);
const isPanelTouchActiveBinding = isPanelTouchActive;
const get = isPanelTouchActiveBinding.get;
if (Reflect.apply(get, isPanelTouchActiveBinding, [])) {
env1_12.current = global.setTimeout(checkIdle, value4 > 0 ? value4 : value3);
} else if (value4 > 0) {
env1_12.current = global.setTimeout(checkIdle, value4 > 0 ? value4 : value3);
} else {
env1_10(true);
}
}
function _fun108811() { // fn#108811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14574:2448, offset: 0x0232f646, size: 56 bytes, params: 1, frame: 13
if (env1_12.current != null) {
global.clearTimeout(env1_12.current);
env1_12.current = null;
}
}
global.__d(_fun108802, 14377, [57, 31, 4502, 14375, 661, 1376, 4017, 1365, 1485, 14378, 566, 14373, 3968, 7013,
4504, 4577, 14374,
2]) /* metro module 14377, dependencies: [57, 31, 4502, 14375, 661, 1376, 4017, 1365, 1485, 14378, 566, 14373, 3968, 7013, 4504, 4577, 14374, 2] */;