Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,10 @@
|
||||
/* Metro module 3834; source: modules/main_tabs_v2/ChannelListLayoutTypes.tsx; dependencies: [2] */
|
||||
function _fun31382(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#31382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3973:6, offset: 0x00ff6c0a, size: 176 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/ChannelListLayoutTypes.tsx');
|
||||
exports.ChannelListLayoutTypes = {COZY: 'cozy', COZY_DRAWER: 'cozy-drawer', COZY_DRAWER_SMOL: 'cozy-drawer-smol',
|
||||
COMPACT: 'compact', MINIMAL: 'minimal'};
|
||||
exports.MessagePreviewTypes = {ALL: 'all', UNREADS: 'unreads', NONE: 'none'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 4008; source: modules/main_tabs_v2/RootNavigationRef.native.tsx; dependencies: [1485, 2] */
|
||||
function _fun33034(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4166:6, offset: 0x01025fbf, size: 111 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = (require(1485) /* metro dependency 1485 */).createNavigationContainerRef();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/RootNavigationRef.native.tsx');
|
||||
exports.getRootNavigationRef = getRootNavigationRef;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 5243; source: modules/main_tabs_v2/UserSearchUtils.tsx; dependencies: [5244, 1945, 3793, 661, 1861, 3995, 2] */
|
||||
function _fun46660(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5421:6, offset: 0x011ac9c3, size: 196 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = cleanString;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const friendSuggestionStore = importDefault(5244) /* metro dependency 5244: FriendSuggestionStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/UserSearchUtils.tsx');
|
||||
exports.cleanString = closure;
|
||||
exports.getRelationshipType = function(a0) {
|
||||
var value2 = RelationshipStore.getRelationshipType(a0);
|
||||
return value2 !== RelationshipTypes.NONE || FriendSuggestionStore.getSuggestion(a0) == null ? value2 : RelationshipTypes.SUGGESTION;
|
||||
};
|
||||
exports.getNames = getNames;
|
||||
}
|
||||
|
||||
function cleanString(a0) { // fn#46661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5421:154, offset: 0x011aca87, size: 61 bytes, params: 2, frame: 12
|
||||
var value;
|
||||
value = Reflect.apply((require(1861) /* metro dependency 1861: StringUtils */).stripDiacritics, value,
|
||||
[a0.toLocaleLowerCase()]);
|
||||
return value.trim();
|
||||
}
|
||||
|
||||
function getNames(a0) { // fn#46663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5421:495, offset: 0x011acb0e, size: 242 bytes, params: 2, frame: 18
|
||||
var value3;
|
||||
var value7;
|
||||
const object2 = {};
|
||||
const nickname = RelationshipStore.getNickname(a0.id);
|
||||
if (nickname != null) {
|
||||
value3 = cleanString(nickname);
|
||||
object2[nickname] = value3.split(' ');
|
||||
}
|
||||
const globalName = (importDefault(3995) /* metro dependency 3995: UserUtils */).getGlobalName(a0);
|
||||
if (globalName != null && object2[globalName] == null) {
|
||||
value7 = cleanString(globalName);
|
||||
object2[globalName] = value7.split(' ');
|
||||
}
|
||||
const username = a0.username;
|
||||
const cleanStringBinding = cleanString;
|
||||
const username2 = a0.username;
|
||||
const value8 = cleanStringBinding(username2);
|
||||
object2[username] = value8.split(' ');
|
||||
const getNicknames = GuildMemberStore.getNicknames;
|
||||
Reflect.apply(getNicknames, GuildMemberStore, [a0.id]).forEach(_fun46664);
|
||||
return {names: object2, nick: nickname};
|
||||
}
|
||||
|
||||
function _fun46664(a0) { // fn#46664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5421:760, offset: 0x011acc00, size: 62 bytes, params: 2, frame: 13
|
||||
var binding;
|
||||
var value;
|
||||
if (env0_0[a0] == null) {
|
||||
binding = env0_0;
|
||||
value = environment.__proto__;
|
||||
value = cleanString(a0);
|
||||
binding[a0] = value.split(' ');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/* Metro module 5176; source: modules/main_tabs_v2/YouBarExperiment.tsx; dependencies: [1358, 2] */
|
||||
function _fun45589(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5354:6, offset: 0x01192a30, size: 205 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
|
||||
value = value({'name': '2026-01-you-bar', 'kind': 'user', defaultConfig: {'enabled': false,
|
||||
'animateBetweenServers': false, 'questDockEnabled': false, 'largeAvatarEnabled': false},
|
||||
variations: {[1]: {'enabled': true, 'animateBetweenServers': false, 'questDockEnabled': true,
|
||||
'largeAvatarEnabled': false}, [2]: {'enabled': true, 'animateBetweenServers': false, 'questDockEnabled': true,
|
||||
'largeAvatarEnabled': true}, [3]: {'enabled': true, 'animateBetweenServers': false, 'questDockEnabled': false,
|
||||
'largeAvatarEnabled': true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/YouBarExperiment.tsx');
|
||||
exports.YouBarExperiment = value;
|
||||
exports.useYouBarEnabled = useYouBarEnabled;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 15342; source: modules/main_tabs_v2/channel_emoji/ChannelEmojiConstants.tsx; dependencies: [2] */
|
||||
function _fun117283(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15539:6, offset: 0x024ad3b3, size: 102 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/channel_emoji/ChannelEmojiConstants.tsx');
|
||||
exports.CHANNEL_THEME_COLOR_PALETTE = ['#5865F2', '#9B59B6', '#206694', '#3498DB', '#11806A', '#1ABC9C', '#992D22',
|
||||
'#E91E63', '#E74C3C', '#E67E22', '#F1C40F', '#607D8B'];
|
||||
exports.DEFAULT_CHANNEL_EMOJI_BACKGROUND_COLOR = '#607D8B';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 13099; source: modules/main_tabs_v2/helpers/MainNavigationLogger.tsx; dependencies: [3, 2] */
|
||||
function _fun100154(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13289:6, offset: 0x021dfb85, size: 119 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('MainNavigationLogger');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/helpers/MainNavigationLogger.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,51 @@
|
||||
/* Metro module 15352; source: modules/main_tabs_v2/native/AppComponents.tsx; dependencies: [33, 15143, 477, 4007, 14885, 15261, 4026, 15277, 10904, 12799, 4500, 3870, 15353, 15359, 15392, 15404, 15567, 2] */
|
||||
function _fun117349(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15549:6, offset: 0x024b00da, size: 802 bytes, params: 8, frame: 26
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const jsxRuntimejsx45 = value.jsx;
|
||||
const jsxRuntimejsxs46 = value.jsxs;
|
||||
const PortalKeyboardRenderer = (require(15143) /* metro dependency 15143: PortalKeyboardRenderer */).PortalKeyboardRenderer;
|
||||
const env0_2 = <PortalKeyboardRenderer />;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
const r14 = value.isIOS() ? _fun117350 : _fun117351;
|
||||
value = importDefault(14885) /* metro dependency 14885: AppFreezer */;
|
||||
const PictureInPictureGlobalContainer = (require(15261) /* metro dependency 15261: MainShared */).PictureInPictureGlobalContainer;
|
||||
const items2 = [<PictureInPictureGlobalContainer />];
|
||||
const BurstReactionAnimationContainer = (require(15261) /* metro dependency 15261: MainShared */).BurstReactionAnimationContainer;
|
||||
items2[1] = <BurstReactionAnimationContainer />;
|
||||
const MenuContainer = (require(15261) /* metro dependency 15261: MainShared */).MenuContainer;
|
||||
items2[2] = <MenuContainer />;
|
||||
const PortalKeyboardHost = (require(4026) /* metro dependency 4026: PortalKeyboard */).PortalKeyboardHost;
|
||||
items2[3] = <PortalKeyboardHost />;
|
||||
items2[4] = ((Component) => <Component />)(r14);
|
||||
const ActionSheetContainer = (require(15261) /* metro dependency 15261: MainShared */).ActionSheetContainer;
|
||||
items2[5] = <ActionSheetContainer appEntryKey="main" />;
|
||||
const Alerts = (require(15261) /* metro dependency 15261: MainShared */).Alerts;
|
||||
items2[6] = <Alerts />;
|
||||
const SoundPlayer = (require(15261) /* metro dependency 15261: MainShared */).SoundPlayer;
|
||||
items2[7] = <SoundPlayer />;
|
||||
items2[8] = ((Component) => <Component />)(importDefault(15277) /* metro dependency 15277: MainViewTooltipActionSheetsV2 */);
|
||||
items2[9] = ((Component) => <Component />)(importDefault(10904) /* metro dependency 10904: Notifications */);
|
||||
const ContextMenuContainer = (require(12799) /* metro dependency 12799: ContextMenuContainerNative */).ContextMenuContainer;
|
||||
items2[10] = <ContextMenuContainer />;
|
||||
const AlertModalContainer = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModalContainer;
|
||||
items2[11] = <AlertModalContainer />;
|
||||
const ToastContainer = (require(15261) /* metro dependency 15261: MainShared */).ToastContainer;
|
||||
items2[12] = <ToastContainer />;
|
||||
value = ((Component) => <Component lockKeys={['external-pip']}>{items2}</Component>)(value);
|
||||
const r4 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? ((AccessibilityAnnouncerLiveRegion) => <AccessibilityAnnouncerLiveRegion />)((require(3870) /* metro dependency 3870: AccessibilityAnnouncerLiveRegionNative */).AccessibilityAnnouncerLiveRegion) : null;
|
||||
const value9 = ((Component) => <Component />)(importDefault(15353) /* metro dependency 15353: ExternalPipViewAndroid */);
|
||||
const value16 = ((Component) => <Component lockKeys={['external-pip']}>{((Component) => <Component />)(importDefault(15359) /* metro dependency 15359: ActivityPanelContainer */)}{((Component) => <Component />)(importDefault(15392) /* metro dependency 15392: FramePanelContainer */)}{((Component) => <Component />)(importDefault(15404) /* metro dependency 15404: VoicePanelContainer */)}{((Component) => <Component />)(importDefault(15567) /* metro dependency 15567: MediaPlaybackPanelContainer */)}</Component>)(importDefault(14885) /* metro dependency 14885: AppFreezer */);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/AppComponents.tsx');
|
||||
exports.APP_EXTRA_COMPONENTS = value;
|
||||
exports.APP_EXTRA_COMPONENTS_NEVER_FREEZE = r4;
|
||||
exports.APP_EXTRA_COMPONENTS_EXTERNAL_PIP = value9;
|
||||
exports.APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO = value16;
|
||||
}
|
||||
|
||||
function _fun117350() { // fn#117350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15549:180, offset: 0x024b03fc, size: 46 bytes, params: 1, frame: 12
|
||||
return (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useIsModalOpen() ? null : env0_2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,289 @@
|
||||
/* Metro module 14757; source: modules/main_tabs_v2/native/ConnectionBanner.tsx; dependencies: [57, 31, 27, 7554, 7553, 661, 33, 4501, 697, 1244, 3860, 14758, 14760, 4573, 674, 4017, 5302, 4589, 566, 683, 4577, 7555, 2] */
|
||||
function _fun111423(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:6, offset: 0x023a146f, size: 687 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.ActivityIndicator;
|
||||
const env0_6 = value.View;
|
||||
const connectivityIndicatorStateStore = importDefault(7554) /* metro dependency 7554: ConnectivityIndicatorStateStore */;
|
||||
const env0_8 = (require(7554) /* metro dependency 7554: ConnectivityIndicatorStateStore */).ConnectivityIndicatorState;
|
||||
value = require(7553) /* metro dependency 7553: YouBarConstants */;
|
||||
const CONNECTION_BANNER_HEIGHT = value.CONNECTION_BANNER_HEIGHT;
|
||||
const env0_10 = value.useYouBarBottomMargin;
|
||||
const env0_11 = value.YOU_BAR_SPRING_CONFIG;
|
||||
const env0_12 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value.jsx;
|
||||
const env0_14 = value.jsxs;
|
||||
const env0_15 = ['transparent', 'black', 'black', 'transparent'];
|
||||
const env0_16 = [0, 0.25, 0.75, 1];
|
||||
const env0_17 = {'x': 0, 'y': 0.5};
|
||||
const env0_18 = {'x': 1, 'y': 0.5};
|
||||
const env0_19 = [0, 0.4, 0.75, 1];
|
||||
const env0_20 = {'x': 0, 'y': 0};
|
||||
const env0_21 = {'x': 0, 'y': 1};
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object2 = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': null, 'flexDirection': 'row',
|
||||
'alignItems': 'center', 'justifyContent': 'center'};
|
||||
object2.height = CONNECTION_BANNER_HEIGHT;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.gap = PX_8;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.paddingHorizontal = PX_12;
|
||||
const env0_22 = Reflect.apply(createStyles, value, [{container: {'position': 'absolute', 'left': 0, 'right': 0,
|
||||
'bottom': 0}, glow: {'position': 'absolute', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0},
|
||||
glowMaskGradient: {flex: 1}, content: object2, leadingSlot: {'width': 16, 'height': 16, 'alignItems': 'center',
|
||||
'justifyContent': 'center'}, spinner: {transform: [{scale: 0.8}]}}]);
|
||||
object = {code: 'function ConnectionBannerTsx1(finished){const{shouldShowBanner,runOnJS,setRenderState}=this.__closure;if(finished===true&&!shouldShowBanner){runOnJS(setRenderState)(null);}}'};
|
||||
object = {code: 'function ConnectionBannerTsx2(){const{progress,CONNECTION_BANNER_HEIGHT}=this.__closure;return{transform:[{translateY:(1-progress.get())*CONNECTION_BANNER_HEIGHT}],opacity:progress.get()};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/ConnectionBanner.tsx');
|
||||
exports.default = ConnectionBanner;
|
||||
}
|
||||
|
||||
function getBannerLabel(a0) { // fn#111424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:936, offset: 0x023a171e, size: 238 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const WAITING_FOR_NETWORK = ConnectivityIndicatorState.WAITING_FOR_NETWORK;
|
||||
if (WAITING_FOR_NETWORK === a0) {
|
||||
return intl.string(t.XKk1gp);
|
||||
}
|
||||
const NO_CONNECTION = ConnectivityIndicatorState.NO_CONNECTION;
|
||||
if (NO_CONNECTION === a0) {
|
||||
return intl.string(t.zPerw8);
|
||||
}
|
||||
const BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
|
||||
if (BACK_ONLINE === a0) {
|
||||
return intl.string(t.j8lYE2);
|
||||
}
|
||||
}
|
||||
|
||||
function ConnectionBannerIcon({state}) { // fn#111425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:1176, offset: 0x023a180c, size: 411 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
|
||||
const value2 = Reflect.apply(useToken, useTokenModule, [INTERACTIVE_ICON_DEFAULT]);
|
||||
const WAITING_FOR_NETWORK = ConnectivityIndicatorState.WAITING_FOR_NETWORK;
|
||||
if (WAITING_FOR_NETWORK === state) {
|
||||
return (
|
||||
<View style={styles.leadingSlot}>
|
||||
<ActivityIndicator
|
||||
size="small"
|
||||
color={value2}
|
||||
style={styles.spinner}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const NO_CONNECTION = ConnectivityIndicatorState.NO_CONNECTION;
|
||||
if (NO_CONNECTION === state) {
|
||||
return (
|
||||
<View style={styles.leadingSlot}>
|
||||
{((ConnectionUnknownIcon) => <ConnectionUnknownIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT} />)((require(14758) /* metro dependency 14758: ConnectionUnknownIcon */).ConnectionUnknownIcon)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
|
||||
if (BACK_ONLINE === state) {
|
||||
return (
|
||||
<View style={styles.leadingSlot}>
|
||||
{((ConnectionFineIcon) => <ConnectionFineIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE} />)((require(14760) /* metro dependency 14760: ConnectionFineIcon */).ConnectionFineIcon)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function ConnectionBannerContent({state}) { // fn#111426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:1718, offset: 0x023a19a7, size: 178 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const connectionBannerIcon = <ConnectionBannerIcon state={state} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
|
||||
return (
|
||||
<View style={styles.content}>
|
||||
{connectionBannerIcon}
|
||||
<Text
|
||||
variant="text-sm/medium"
|
||||
color={state !== BACK_ONLINE ? 'text-muted' : 'text-feedback-positive'}
|
||||
maxFontSizeMultiplier={1.5}
|
||||
>
|
||||
{getBannerLabel(state)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BackOnlineGlow({progress}) { // fn#111427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:2006, offset: 0x023a1a59, size: 358 bytes, params: 2, frame: 26
|
||||
const styles = useStyles();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
|
||||
const value3 = env0_4.useMemo(_fun111428, [Reflect.apply(useToken, useTokenModule, [ICON_FEEDBACK_POSITIVE])]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={[styles.glow, {opacity: progress}]} pointerEvents="none">
|
||||
{((Component) => <Component style={styles.glow} maskElement={((Component) => <Component style={styles.glowMaskGradient} colors={env0_15} locations={env0_16} start={env0_17} end={env0_18} />)(importDefault(4589) /* metro dependency 4589 */)}>{((Component) => <Component style={styles.glowMaskGradient} colors={value3} locations={env0_19} start={env0_20} end={env0_21} />)(importDefault(4589) /* metro dependency 4589 */)}</Component>)(importDefault(5302) /* metro dependency 5302 */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ConnectionBannerInner() { // fn#111429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:2906, offset: 0x023a1c6e, size: 565 bytes, params: 1, frame: 26
|
||||
const styles = useStyles();
|
||||
const value2 = useYouBarBottomMargin();
|
||||
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectivityIndicatorStateStore],
|
||||
function() {
|
||||
return ConnectivityIndicatorStateStore.getState();
|
||||
});
|
||||
let HIDDEN = ConnectivityIndicatorState.HIDDEN;
|
||||
const value3 = state !== HIDDEN;
|
||||
let BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
|
||||
const value4 = state === BACK_ONLINE;
|
||||
HIDDEN = ConnectivityIndicatorState.HIDDEN;
|
||||
const value5 = null;
|
||||
const r7 = state === HIDDEN ? value5 : state;
|
||||
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const [property, property2] = env0_3(env0_4.useState(r7), 2);
|
||||
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
var env0_4 = value9;
|
||||
if (value5 != r7 && property !== r7) {
|
||||
property2(r7);
|
||||
}
|
||||
env0_4.useEffect(_fun111431, [value3, value9]);
|
||||
env0_4.useEffect(_fun111433, [value4, value6]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = ConnectionBannerInnerV;
|
||||
closure.__closure = {progress: value9, CONNECTION_BANNER_HEIGHT: CONNECTION_BANNER_HEIGHT};
|
||||
closure.__workletHash = 13973493587548;
|
||||
closure.__initData = env0_24;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
BACK_ONLINE = ConnectivityIndicatorState.BACK_ONLINE;
|
||||
return (
|
||||
<View pointerEvents="none" style={[styles.container, {height: value2 + CONNECTION_BANNER_HEIGHT}, value12]}>
|
||||
{property !== BACK_ONLINE ? value5 : <BackOnlineGlow progress={value6} />}
|
||||
{value5 != property ? <ConnectionBannerContent state={property} /> : value5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ConnectionBanner() { // fn#111435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:4009, offset: 0x023a2031, size: 108 bytes, params: 1, frame: 15
|
||||
const {timeoutMs,
|
||||
hidden} = (importDefault(7555) /* metro dependency 7555: ConnectionIndicatorExperiment */).useConfig({location: 'ConnectionBanner'});
|
||||
useConnectivityIndicatorAnalytics(hidden);
|
||||
const value3 = null;
|
||||
return value3 == timeoutMs || hidden ? value3 : <ConnectionBannerInner />;
|
||||
}
|
||||
|
||||
function _fun111428() { // fn#111428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:2126, offset: 0x023a1bbf, size: 175 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(674) /* metro dependency 674 */;
|
||||
value = value(env0_0);
|
||||
const value3 = value.alpha(0);
|
||||
const items2 = [value3.css()];
|
||||
const value5 = value.alpha(0.1);
|
||||
items2[1] = value5.css();
|
||||
const value6 = value.alpha(0.28);
|
||||
items2[2] = value6.css();
|
||||
value = value.alpha(0.55);
|
||||
items2[3] = value.css();
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun111431() { // fn#111431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3197, offset: 0x023a1ea3, size: 178 bytes, params: 1, frame: 25
|
||||
const binding = env0_4;
|
||||
const set = binding.set;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const r6 = result ? 1 : 0;
|
||||
const closure = n_111432;
|
||||
const object2 = {};
|
||||
object2.shouldShowBanner = result;
|
||||
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.setRenderState = env0_3;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 3065113239920;
|
||||
closure.__initData = env1_23;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withSpring, springModule, [r6, YOU_BAR_SPRING_CONFIG,
|
||||
'respect-motion-settings', closure])]);
|
||||
}
|
||||
|
||||
function _fun111433() { // fn#111433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3468, offset: 0x023a1fa0, size: 71 bytes, params: 1, frame: 17
|
||||
const binding = env0_2;
|
||||
const set = binding.set;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
Reflect.apply(set, binding, [springModule.withSpring(result_2 ? 1 : 0, YOU_BAR_SPRING_CONFIG)]);
|
||||
}
|
||||
|
||||
function ConnectionBannerInnerV() { // fn#111434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3556, owner: ConnectionBannerInner.v, offset: 0x023a1fe7, size: 74 bytes, params: 1, frame: 12
|
||||
const object3 = {};
|
||||
const object4 = {};
|
||||
object4.translateY = (1 - env0_4.get()) * CONNECTION_BANNER_HEIGHT;
|
||||
object3.transform = [object4];
|
||||
object3.opacity = env0_4.get();
|
||||
return object3;
|
||||
}
|
||||
|
||||
function useConnectivityIndicatorAnalytics(a0) { // fn#111436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:4125, owner: ConnectionBanner.useConnectivityIndicatorAnalytics, offset: 0x023a209d, size: 124 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectivityIndicatorStateStore],
|
||||
function() {
|
||||
return ConnectivityIndicatorStateStore.getState();
|
||||
});
|
||||
const env0_2 = env1_4.useRef(null);
|
||||
env1_4.useEffect(_fun111438, [state, a0]);
|
||||
}
|
||||
|
||||
function n_111432(a0) { // fn#111432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:3272, offset: 0x023a1f55, size: 75 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var runOnJS;
|
||||
var value2;
|
||||
let value = a0 !== true;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
r0 = result;
|
||||
}
|
||||
if (!r0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = value.runOnJS;
|
||||
value2 = environment.__proto__;
|
||||
value = Reflect.apply(runOnJS, value, [env1_3]);
|
||||
value(null);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111438() { // fn#111438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14954:4259, offset: 0x023a212c, size: 199 bytes, params: 1, frame: 14
|
||||
var r4;
|
||||
var value2;
|
||||
var value;
|
||||
const binding = env0_2;
|
||||
const current = binding.current;
|
||||
binding.current = state;
|
||||
if (current != null) {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
if (current === ConnectivityIndicatorState.HIDDEN) {
|
||||
if (state !== ConnectivityIndicatorState.HIDDEN) {
|
||||
if (state !== ConnectivityIndicatorState.BACK_ONLINE) {
|
||||
r4 = env0_0 ? 'hidden' : state !== ConnectivityIndicatorState.NO_CONNECTION ? 'connecting' : 'offline';
|
||||
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
value.track(AnalyticEvents.CONNECTION_INDICATOR_SHOWN, {connection_indicator_type: r4});
|
||||
}
|
||||
}
|
||||
} else if (current === ConnectivityIndicatorState.BACK_ONLINE) {
|
||||
if (state !== ConnectivityIndicatorState.HIDDEN) {
|
||||
if (state !== ConnectivityIndicatorState.BACK_ONLINE) {
|
||||
r4 = env0_0 ? 'hidden' : state !== ConnectivityIndicatorState.NO_CONNECTION ? 'connecting' : 'offline';
|
||||
value = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
value.track(AnalyticEvents.CONNECTION_INDICATOR_SHOWN, {connection_indicator_type: r4});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 7555; source: modules/main_tabs_v2/native/ConnectionIndicatorExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun60761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7733:6, offset: 0x0170e18d, size: 211 bytes, params: 8, frame: 20
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1854) /* metro dependency 1854: apex */;
|
||||
value = value.createApexExperiment({'name': '2025-12-connection-indicator', 'kind': 'user',
|
||||
defaultConfig: {timeoutMs: undefined, hidden: true}, variations: {[1]: {'timeoutMs': 10000, 'hidden': false},
|
||||
[2]: {'timeoutMs': 15000, 'hidden': false}, [3]: {'timeoutMs': 20000, 'hidden': false},
|
||||
[4]: {'timeoutMs': 10000, 'hidden': true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/ConnectionIndicatorExperiment.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 14957; source: modules/main_tabs_v2/native/HideCoveredChannelsExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun113132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15154:6, offset: 0x023ea454, size: 145 bytes, params: 8, frame: 20
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1854) /* metro dependency 1854: apex */;
|
||||
value = value.createApexExperiment({'name': '2026-04-hide-covered-channels', 'kind': 'user',
|
||||
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/HideCoveredChannelsExperiment.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
/* Metro module 14299; source: modules/main_tabs_v2/native/MainNavigator.tsx; dependencies: [57, 31, 27, 1226, 14300, 661, 33, 4501, 477, 4092, 9884, 14301, 14302, 14360, 15124, 15129, 15132, 14899, 15170, 15224, 15227, 15231, 15233, 14893, 15260, 4015, 1482, 1583, 4863, 9603, 15261, 15310, 632, 5176, 7727, 4010, 5280, 11340, 14914, 15313, 10737, 15352, 9893, 2] */
|
||||
function _fun108153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:6, offset: 0x0231694b, size: 639 bytes, params: 8, frame: 24
|
||||
var value8;
|
||||
const env0_0 = require;
|
||||
const getAuthComponent = function() {
|
||||
return require(dependencyMap[12]).default;
|
||||
};
|
||||
const getTabsComponent = function() {
|
||||
return require(dependencyMap[13]).default;
|
||||
};
|
||||
const getChannelComponent = function() {
|
||||
return View;
|
||||
};
|
||||
const getMemberVerificationComponent = function() {
|
||||
return require(dependencyMap[15]).default;
|
||||
};
|
||||
const getFriendsNavigatorComponent = function() {
|
||||
return require(dependencyMap[16]).default;
|
||||
};
|
||||
const getYouComponent = function() {
|
||||
return require(dependencyMap[17]).default;
|
||||
};
|
||||
const getChannelDetailsComponent = function() {
|
||||
return require(dependencyMap[18]).default;
|
||||
};
|
||||
const getSearchComponent = function() {
|
||||
return require(dependencyMap[19]).default;
|
||||
};
|
||||
const getContextMenuCommandNavigatorComponent = function() {
|
||||
return require(dependencyMap[20]).default;
|
||||
};
|
||||
const getModalComponent = function() {
|
||||
return require(dependencyMap[21]).default;
|
||||
};
|
||||
const getMessageRequestsComponent = function() {
|
||||
return require(dependencyMap[22]).default;
|
||||
};
|
||||
const getSettingsComponent = function() {
|
||||
return require(dependencyMap[23]).default;
|
||||
};
|
||||
const getAccountStanding = function() {
|
||||
return require(dependencyMap[24]).default;
|
||||
};
|
||||
const closure = getChannelScreen;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const env0_7 = (require(14300) /* metro dependency 14300: NavigationConstants */).StackNavigationAnimationSettings;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = constantsModule.AnalyticEvents;
|
||||
const env0_9 = constantsModule.DrawerSourceTypes;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value3.jsx;
|
||||
const env0_11 = value3.jsxs;
|
||||
const env0_12 = value3.Fragment;
|
||||
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({flex: {flex: 1}});
|
||||
if ((require(477) /* metro dependency 477: PlatformUtils */).isIOS()) {
|
||||
value8 = (require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMajor() <= 15;
|
||||
}
|
||||
const env0_15 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
|
||||
const env0_16 = (importDefault(14301) /* metro dependency 14301: createChatPanelNativeStackNavigator */)();
|
||||
Object = global.Object;
|
||||
const env0_17 = Object.freeze({animation: 'none'});
|
||||
value = value.memo(StackNavigator_108171);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/MainNavigator.tsx');
|
||||
exports.default = value;
|
||||
exports.MAIN_NAVIGATOR_ID = 'mainNavigator';
|
||||
exports.getChannelScreen = closure;
|
||||
}
|
||||
|
||||
function WrappedAutoAnalytics() { // fn#108157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:587, offset: 0x02316bca, size: 44 bytes, params: 1, frame: 13
|
||||
return ((Component) => <Component />)((require(15124) /* metro dependency 15124: AutoAnalytics */).default);
|
||||
}
|
||||
|
||||
function getChannelScreen() { // fn#108168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1295, offset: 0x02316d36, size: 102 bytes, params: 1, frame: 17
|
||||
const value = a0;
|
||||
const env0_0 = value !== undefined ? value : StackNavigationAnimationSettings.animation;
|
||||
const Screen = env0_16.Screen;
|
||||
return (
|
||||
<Screen
|
||||
name="channel"
|
||||
listeners={{beforeRemove: beforeRemove}}
|
||||
options={options_108170}
|
||||
getComponent={getChannelComponent}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function StackNavigator_108171() { // fn#108171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1862, offset: 0x02316eec, size: 363 bytes, params: 1, frame: 22
|
||||
const styles = useStyles();
|
||||
(require(15261) /* metro dependency 15261: MainShared */).useScreenReaderEnabled();
|
||||
(require(15261) /* metro dependency 15261: MainShared */).useAppKeyCommands();
|
||||
(importDefault(15310) /* metro dependency 15310: useNativeThemeUpdater */)();
|
||||
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AuthenticationStore],
|
||||
_fun108172);
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
let value = env0_3(Reflect.apply(useState, binding, [StackNavigationAnimationSettings.animation]), 2);
|
||||
const property = value[0];
|
||||
var env0_3 = value[1];
|
||||
value = require(5176) /* metro dependency 5176: YouBarExperiment */;
|
||||
value = value.useYouBarEnabled('stacknavigator');
|
||||
return binding.useMemo(_fun108174, [styles, value2,
|
||||
(require(7727) /* metro dependency 7727: HomeIndicator */).useHomeIndicatorStore(function(a0) {
|
||||
return a0.autoHideHomeIndicator;
|
||||
}), (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions(), property,
|
||||
value, (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList]);
|
||||
}
|
||||
|
||||
function beforeRemove({data}) { // fn#108169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1394, owner: getChannelScreen.beforeRemove, offset: 0x02316d9c, size: 220 bytes, params: 2, frame: 18
|
||||
var moduleValue2;
|
||||
var setKeyboardType;
|
||||
var object2;
|
||||
if ((require(4015) /* metro dependency 4015: ChatInputUtils */).getBestActiveInput() != null) {
|
||||
moduleValue2 = require(1482) /* metro dependency 1482: KeyboardUIStoreNative */;
|
||||
setKeyboardType = moduleValue2.setKeyboardType;
|
||||
object2 = {};
|
||||
object2.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.SYSTEM;
|
||||
Reflect.apply(setKeyboardType, moduleValue2, [object2]);
|
||||
}
|
||||
const type = data == null || data.action == null ? undefined : data.action.type;
|
||||
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = defaultImport.trackWithMetadata;
|
||||
const CHANNEL_BACK_NAVIGATED = AnalyticEvents.CHANNEL_BACK_NAVIGATED;
|
||||
Reflect.apply(trackWithMetadata, defaultImport, [CHANNEL_BACK_NAVIGATED,
|
||||
{source: type === 'GO_BACK' ? DrawerSourceTypes.BACK_BUTTON : DrawerSourceTypes.SWIPE}]);
|
||||
}
|
||||
|
||||
function getChannelScreenOptions({navigation, route}) { // fn#108170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:1671, owner: getChannelScreen.options, offset: 0x02316e78, size: 116 bytes, params: 2, frame: 18
|
||||
const object2 = {headerShown: true};
|
||||
const renderHeader = (require(9603) /* metro dependency 9603: HeaderShared */).renderHeader;
|
||||
object2.header = renderHeader;
|
||||
const headerSharedModule = require(9603) /* metro dependency 9603: HeaderShared */;
|
||||
const getDefaultChannelStackHeaderProps = headerSharedModule.getDefaultChannelStackHeaderProps;
|
||||
copyDataProperties(object2, Reflect.apply(getDefaultChannelStackHeaderProps, headerSharedModule, [navigation,
|
||||
route]), renderHeader);
|
||||
copyDataProperties(object2, StackNavigationAnimationSettings, renderHeader);
|
||||
object2['animation'] = env0_0;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun108172() { // fn#108172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2011, offset: 0x02317057, size: 25 bytes, params: 1, frame: 9
|
||||
const value = environment.__proto__;
|
||||
return AuthenticationStore.getSessionId() != null;
|
||||
}
|
||||
|
||||
function _fun108174() { // fn#108174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2301, offset: 0x0231707b, size: 1107 bytes, params: 1, frame: 40
|
||||
const value2 = undefined;
|
||||
const StartupProfiler = importDefault(11340) /* metro dependency 11340: StartupProfiler */;
|
||||
const Profiles = (require(11340) /* metro dependency 11340: StartupProfiler */).Profiles;
|
||||
const MainNavigator = Profiles.MainNavigator;
|
||||
const VisualEffectViewTarget = importDefault(14914) /* metro dependency 14914: VisualEffectViewTarget */;
|
||||
const LaunchPadContainer = importDefault(15313) /* metro dependency 15313: LaunchPadContainer */;
|
||||
const GlobalStatusIndicator = importDefault(10737) /* metro dependency 10737: GlobalStatusIndicator */;
|
||||
const value4 = null;
|
||||
const r15 = env0_1 ? <WrappedAutoAnalytics /> : value4;
|
||||
const defaultImport5 = StartupProfiler;
|
||||
const StackNavigator = Profiles.StackNavigator;
|
||||
const Navigator = env1_15.Navigator;
|
||||
const object = {id: 'root', screenOptions: screenOptions_108175};
|
||||
let Screen = env1_15.Screen;
|
||||
const items2 = [<Screen name="main" options={env1_17}>{children_108176}</Screen>];
|
||||
Screen = env1_15.Screen;
|
||||
items2[1] = <Screen name="search" getComponent={getSearchComponent} />;
|
||||
Screen = env1_15.Screen;
|
||||
items2[2] = <Screen name="auth" getComponent={getAuthComponent} options={env1_17} />;
|
||||
Screen = env1_15.Screen;
|
||||
const getAccountStandingBinding = getAccountStanding;
|
||||
const object2 = {'presentation': 'fullScreenModal', 'gestureEnabled': false};
|
||||
copyDataProperties(object2, env1_17, undefined);
|
||||
items2[3] = <Screen name="account-standing" getComponent={getAccountStandingBinding} options={object2} />;
|
||||
items2[4] = env0_4 ? <env1_15.Screen name="you" options={options_108179} getComponent={getYouComponent} /> : value4;
|
||||
Screen = env1_15.Screen;
|
||||
const object3 = {name: 'friends', options: options_108180};
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object3.listeners = {beforeRemove: platformUtilsModule.isAndroid() ? value2 : _fun108181};
|
||||
object3.getComponent = getFriendsNavigatorComponent;
|
||||
items2[5] = <Screen {...object3} />;
|
||||
items2[6] = env0_4 ? <env1_15.Screen name="settings" options={options_108183} getComponent={getSettingsComponent} /> : value4;
|
||||
Screen = env1_15.Screen;
|
||||
items2[7] = <Screen name="sidebar" getComponent={getChannelDetailsComponent} options={options_108184} />;
|
||||
Screen = env1_15.Screen;
|
||||
items2[8] = <Screen name="message-requests" options={(importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)()} getComponent={getMessageRequestsComponent} />;
|
||||
Screen = env1_15.Screen;
|
||||
items2[9] = <Screen name="context-menu-commands" options={(importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)()} getComponent={getContextMenuCommandNavigatorComponent} />;
|
||||
Screen = env1_15.Screen;
|
||||
items2[10] = <Screen name="modal" options={options_108185} getComponent={getModalComponent} />;
|
||||
const launchPadContainer = <LaunchPadContainer><GlobalStatusIndicator>{r15}{((Component) => <Component profile={StackNavigator}><Navigator {...object}>{items2}</Navigator></Component>)(defaultImport5)}</GlobalStatusIndicator></LaunchPadContainer>;
|
||||
const APP_EXTRA_COMPONENTS = (require(15352) /* metro dependency 15352: AppComponents */).APP_EXTRA_COMPONENTS;
|
||||
const APP_EXTRA_COMPONENTS_NEVER_FREEZE = (require(15352) /* metro dependency 15352: AppComponents */).APP_EXTRA_COMPONENTS_NEVER_FREEZE;
|
||||
const APP_EXTRA_COMPONENTS_EXTERNAL_PIP = (require(15352) /* metro dependency 15352: AppComponents */).APP_EXTRA_COMPONENTS_EXTERNAL_PIP;
|
||||
return (
|
||||
<StartupProfiler profile={MainNavigator}>
|
||||
<VisualEffectViewTarget
|
||||
style={styles.flex}
|
||||
nativeID="mainNavigator"
|
||||
collapsableChildren={false}
|
||||
>
|
||||
{launchPadContainer}
|
||||
{APP_EXTRA_COMPONENTS}
|
||||
{APP_EXTRA_COMPONENTS_NEVER_FREEZE}
|
||||
{APP_EXTRA_COMPONENTS_EXTERNAL_PIP}
|
||||
</VisualEffectViewTarget>
|
||||
</StartupProfiler>
|
||||
);
|
||||
}
|
||||
|
||||
function screenOptions_108175() { // fn#108175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2613, offset: 0x023174ce, size: 34 bytes, params: 1, frame: 12
|
||||
const object2 = {headerShown: false};
|
||||
const binding = env1_5;
|
||||
object2.autoHideHomeIndicator = binding;
|
||||
copyDataProperties(object2, env1_7, binding);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function children_108176() { // fn#108176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2718, offset: 0x023174f0, size: 345 bytes, params: 1, frame: 25
|
||||
const jsxRuntimeEnv2_12Binding = jsxRuntimeEnv2_12;
|
||||
const Navigator = env2_16.Navigator;
|
||||
const object = {id: 'tabs', screenOptions: screenOptions_108177};
|
||||
let Screen = env2_16.Screen;
|
||||
const getTabsComponentBinding = getTabsComponent;
|
||||
const value2 = undefined;
|
||||
const items2 = [<Screen name="tabs" getComponent={getTabsComponentBinding} options={env2_17} />];
|
||||
Screen = env2_16.Screen;
|
||||
const getMemberVerificationComponentBinding = getMemberVerificationComponent;
|
||||
const object3 = {'presentation': 'transparentModal', 'animation': 'slide_from_bottom'};
|
||||
const binding = env1_7;
|
||||
copyDataProperties(object3, binding, undefined);
|
||||
items2[1] = <Screen name="member-verification" getComponent={getMemberVerificationComponentBinding} options={object3} />;
|
||||
const getChannelScreenBinding = getChannelScreen;
|
||||
const value5 = null;
|
||||
const animation = value5 == binding ? value2 : env1_7.animation;
|
||||
items2[2] = getChannelScreenBinding(value5 != animation ? animation : env1_2);
|
||||
items2[3] = env1_4 ? value5 : <env2_16.Screen name="settings" options={options_108178} getComponent={getSettingsComponent} />;
|
||||
const navigator = <Navigator {...object}>{items2}</Navigator>;
|
||||
const APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO = (require(15352) /* metro dependency 15352: AppComponents */).APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO;
|
||||
return (
|
||||
<>
|
||||
{navigator}
|
||||
{APP_EXTRA_COMPONENTS_VOICE_AND_VIDEO}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function options_108179() { // fn#108179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:3767, offset: 0x02317704, size: 247 bytes, params: 1, frame: 16
|
||||
var r2;
|
||||
var dependencyMap2;
|
||||
var dependencyMap3;
|
||||
var moduleValue2;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
const object2 = {};
|
||||
let value = environment.__proto__.__proto__;
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(dependencyMap[42]);
|
||||
const moduleValue = require(dependencyMap[9]);
|
||||
if (moduleValue.isIpadOS()) {
|
||||
value5 = 'modal';
|
||||
r2 = {presentation: value5};
|
||||
dependencyMap3 = value5;
|
||||
} else {
|
||||
moduleValue2 = require(dependencyMap[8]);
|
||||
if (moduleValue2.isAndroid()) {
|
||||
value3 = environment.__proto__;
|
||||
if (isChatBesideChannelList) {
|
||||
value4 = 'transparentModal';
|
||||
r2 = {presentation: value4};
|
||||
dependencyMap2 = value4;
|
||||
} else {
|
||||
r2 = value2;
|
||||
dependencyMap2 = dependencyMap;
|
||||
}
|
||||
} else {
|
||||
r2 = value2;
|
||||
dependencyMap2 = dependencyMap;
|
||||
}
|
||||
dependencyMap3 = dependencyMap2;
|
||||
}
|
||||
copyDataProperties(object2, defaultImport(r2), dependencyMap3);
|
||||
value = require(dependencyMap[8]);
|
||||
object2['contentStyle'] = value.isAndroid() && isChatBesideChannelList ? {backgroundColor: 'transparent'} : value2;
|
||||
object2['animation'] = 'slide_from_bottom';
|
||||
value = environment.__proto__;
|
||||
copyDataProperties(object2, env1_7, dependencyMap3);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function options_108180({route}) { // fn#108180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4075, offset: 0x023177fb, size: 162 bytes, params: 2, frame: 18
|
||||
const object2 = {};
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = undefined;
|
||||
const defaultImport = importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */;
|
||||
let params = route.params;
|
||||
const presentation = params == null || params.params == null ? value : params.params.presentation;
|
||||
const value2 = presentation != null;
|
||||
copyDataProperties(object2, defaultImport({presentation: value2 ? presentation : 'modal'}), value2);
|
||||
params = route.params;
|
||||
object2['fullScreenGestureEnabled'] = (params == null || params.params == null ? value : params.params.presentation) === 'card';
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun108181() { // fn#108181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4365, offset: 0x0231789d, size: 55 bytes, params: 1, frame: 13
|
||||
env1_3('none');
|
||||
global.setTimeout(_fun108182, StackNavigationAnimationSettings.duration);
|
||||
}
|
||||
|
||||
function options_108183() { // fn#108183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4508, offset: 0x023178f1, size: 126 bytes, params: 1, frame: 15
|
||||
var r1;
|
||||
var dependencyMap2;
|
||||
const object2 = {};
|
||||
let value = environment.__proto__.__proto__;
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(dependencyMap[42]);
|
||||
if (Reflect.apply(require(dependencyMap[9]).isIpadOS, value, [])) {
|
||||
value = 'modal';
|
||||
r1 = {presentation: value};
|
||||
dependencyMap2 = value;
|
||||
} else {
|
||||
r1 = value2;
|
||||
dependencyMap2 = dependencyMap;
|
||||
}
|
||||
copyDataProperties(object2, defaultImport(r1), dependencyMap2);
|
||||
object2['animation'] = 'slide_from_bottom';
|
||||
object2['fullScreenGestureEnabled'] = true;
|
||||
value = environment.__proto__;
|
||||
copyDataProperties(object2, env1_7, dependencyMap2);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function options_108184() { // fn#108184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4757, offset: 0x0231796f, size: 41 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)({lockOrientation: false});
|
||||
}
|
||||
|
||||
function options_108185({route}) { // fn#108185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:5040, offset: 0x02317998, size: 163 bytes, params: 2, frame: 19
|
||||
const object2 = {};
|
||||
object2.fullScreenGestureEnabled = route.params.fullScreenGestureEnabled;
|
||||
object2.animation = route.params.animation ?? 'slide_from_bottom';
|
||||
value = environment.__proto__.__proto__;
|
||||
value = importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */;
|
||||
const presentation = route.params.presentation;
|
||||
const value2 = 'transparentModal';
|
||||
copyDataProperties(object2,
|
||||
value({presentation: presentation === 'card' ? value2 : route.params.presentation ?? value2}), presentation);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function children_108176ScreenOptions({navigation}) { // fn#108177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:2790, owner: children_108176.screenOptions, offset: 0x02317649, size: 106 bytes, params: 2, frame: 16
|
||||
const object2 = {};
|
||||
object2.orientation = env3_14 ? 'default' : undefined;
|
||||
object2.headerShown = false;
|
||||
const moduleValue = require(dependencyMap[29]);
|
||||
const getDefaultStackHeaderProps = moduleValue.getDefaultStackHeaderProps;
|
||||
copyDataProperties(object2, Reflect.apply(getDefaultStackHeaderProps, moduleValue, [navigation]), dependencyMap);
|
||||
copyDataProperties(object2, StackNavigationAnimationSettings, dependencyMap);
|
||||
copyDataProperties(object2, env2_7, dependencyMap);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function children_108176Options({route}) { // fn#108178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:3250, owner: children_108176.options, offset: 0x023176b3, size: 81 bytes, params: 2, frame: 14
|
||||
const object2 = {};
|
||||
const params = route.params;
|
||||
const value = params != null;
|
||||
object2.animation = value && params.isRootScreen ? 'slide_from_bottom' : 'slide_from_right';
|
||||
object2.headerShown = false;
|
||||
copyDataProperties(object2, env2_7, value);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun108182() { // fn#108182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14496:4392, offset: 0x023178d4, size: 29 bytes, params: 1, frame: 11
|
||||
return env2_3(StackNavigationAnimationSettings.animation);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Metro module 14360; source: modules/main_tabs_v2/native/MainTabs.tsx; dependencies: [31, 27, 33, 4501, 4003, 7703, 1585, 3868, 7704, 14361, 2] */
|
||||
function _fun108668(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14557:6, offset: 0x02328d04, size: 216 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value2.jsx;
|
||||
const env0_5 = value2.jsxs;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
|
||||
value = value.memo(MainTabs);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/MainTabs.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function MainTabs() { // fn#108669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14557:207, offset: 0x02328ddc, size: 247 bytes, params: 1, frame: 23
|
||||
const value2 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
|
||||
const value3 = (require(7703) /* metro dependency 7703: useActiveTheme */).useIsCustomThemeActive();
|
||||
const styles = useStyles();
|
||||
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const items2 = [styles.container];
|
||||
items2[1] = {marginLeft: left, marginRight: right};
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
let value = importDefault(7704) /* metro dependency 7704: ThemedGradient */;
|
||||
value = ((Component) => <Component absolute mix={value3} />)(value);
|
||||
return (
|
||||
<View style={items2}>
|
||||
<ThemeContextProvider gradient={value2}>
|
||||
{value}
|
||||
{((Component) => <Component />)(importDefault(14361) /* metro dependency 14361: MainTabsNavigatorPanel */)}
|
||||
</ThemeContextProvider>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 7607; source: modules/main_tabs_v2/native/MainTabsConstants.tsx; dependencies: [2] */
|
||||
function _fun60951(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7785:6, offset: 0x01716047, size: 200 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/MainTabsConstants.tsx');
|
||||
exports.MODE_CHANGE_PHYSICS = {'mass': 0.5, 'damping': 30, 'stiffness': 320};
|
||||
exports.MainTabsNavigatorScreens = {GUILDS: 'guilds', MESSAGES: 'messages', NOTIFICATIONS: 'notifications',
|
||||
YOU: 'you', SETTINGS: 'settings', SETTINGS_JUMP: 'settings_jump', LAUNCHPAD: 'launchpad',
|
||||
FRIENDS: 'friends-tab', ICYMI: 'icymi', PLAY: 'play'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 14300; source: modules/main_tabs_v2/native/NavigationConstants.tsx; dependencies: [2] */
|
||||
function _fun108186(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14497:6, offset: 0x02317a3b, size: 92 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/NavigationConstants.tsx');
|
||||
exports.StackNavigationAnimationSettings = {'animation': 'simple_push', 'duration': 250,
|
||||
'fullScreenGestureEnabled': true};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,315 @@
|
||||
/* Metro module 6936; source: modules/main_tabs_v2/native/NavigationHistoryStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 4008, 4007, 4010, 2] */
|
||||
function _fun55132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:6, offset: 0x01376d7a, size: 466 bytes, params: 8, frame: 25
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_55135 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const RegExp = global.RegExp;
|
||||
const regExp = new RegExp('^(?:' + 'channel-' + '|' + 'guild-' + ')');
|
||||
const env0_8 = [];
|
||||
const Map = global.Map;
|
||||
let map = new Map();
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
map = _fun55141(PersistedStore);
|
||||
map.displayName = 'NavigationHistoryStore';
|
||||
map.persistKey = 'NavigationHistoryStore';
|
||||
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_55147});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/NavigationHistoryStore.tsx');
|
||||
exports.default = map;
|
||||
exports.CHANNEL_PREFIX = 'channel-';
|
||||
exports.GUILD_PREFIX = 'guild-';
|
||||
exports.getIdFromHistoryItem = getIdFromHistoryItem;
|
||||
exports.handleHistoryStoreNavigationChange = handleHistoryStoreNavigationChange;
|
||||
exports.getNavigationHistory = getNavigationHistory;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_55133(a0, a1) { // fn#55133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:150, offset: 0x01376f4c, size: 370 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun55134;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_55135(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_55135(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_55135(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun55134;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_55136() { // fn#55136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1060, offset: 0x013770be, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_55136_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function cleanDuplicatesAndAppend(a0) { // fn#55139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2212, offset: 0x0137711c, size: 187 bytes, params: 2, frame: 16
|
||||
var set;
|
||||
var Date;
|
||||
const env0_0 = a0;
|
||||
let binding = env0_8;
|
||||
const property = binding[binding.length - 1];
|
||||
binding = env0_9;
|
||||
env0_8 = binding.has(a0) ? env0_8.filter(_fun55140) : env0_8;
|
||||
if (property != null) {
|
||||
binding = env0_9;
|
||||
set = binding.set;
|
||||
Date = global.Date;
|
||||
Reflect.apply(set, binding, [property, Date.now()]);
|
||||
}
|
||||
env0_9.set(a0, undefined);
|
||||
env0_8.push(a0);
|
||||
if (env0_8.length > 100) {
|
||||
env0_8.shift();
|
||||
}
|
||||
env0_10.emitChange();
|
||||
}
|
||||
|
||||
function _fun55141(a0) { // fn#55141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1333, offset: 0x013771d7, size: 141 bytes, params: 2, frame: 16
|
||||
const closure = NavigationHistoryStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: value_55143}, {key: 'getState', value: value_55144},
|
||||
{key: 'getLastHistory', value: value_55145}, {key: 'getLastFocusedTimestampForHistoryItem',
|
||||
value: value_55146}]);
|
||||
}
|
||||
|
||||
function LOGOUT_55147() { // fn#55147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2181, offset: 0x01377322, size: 29 bytes, params: 1, frame: 9
|
||||
env0_8 = [];
|
||||
env0_9.clear();
|
||||
}
|
||||
|
||||
function getIdFromHistoryItem(a0) { // fn#55148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2563, offset: 0x0137733f, size: 27 bytes, params: 2, frame: 13
|
||||
return a0.replace(env0_7, '');
|
||||
}
|
||||
|
||||
function handleHistoryStoreNavigationChange() { // fn#55149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:2658, offset: 0x0137735a, size: 365 bytes, params: 1, frame: 19
|
||||
var channelId;
|
||||
var guildId;
|
||||
var value6;
|
||||
var moduleValue4;
|
||||
const value2 = undefined;
|
||||
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
if (rootNavigationRef != null) {
|
||||
var currentRoute = rootNavigationRef.getCurrentRoute();
|
||||
if (currentRoute == null) {
|
||||
return value2;
|
||||
}
|
||||
var params = currentRoute.params;
|
||||
if (params == null) {
|
||||
return value2;
|
||||
}
|
||||
var value5 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(currentRoute);
|
||||
if (value5 == null) {
|
||||
value6 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(currentRoute);
|
||||
if (value6 == null) {
|
||||
return value2;
|
||||
}
|
||||
moduleValue4 = require(4010) /* metro dependency 4010: useChatLayout */;
|
||||
if (moduleValue4.getChatLayout().isChatLockedOpen) {
|
||||
params = value6.params;
|
||||
channelId = params == null ? value2 : params.channelId;
|
||||
if (channelId != null) {
|
||||
cleanDuplicatesAndAppend('' + 'channel-' + channelId);
|
||||
return value2;
|
||||
}
|
||||
params = value6.params;
|
||||
guildId = params == null ? value2 : params.guildId;
|
||||
if (guildId != null) {
|
||||
cleanDuplicatesAndAppend('' + 'guild-' + guildId);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
params = value6.params;
|
||||
guildId = params == null ? value2 : params.guildId;
|
||||
if (guildId != null) {
|
||||
cleanDuplicatesAndAppend('' + 'guild-' + guildId);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
cleanDuplicatesAndAppend('' + 'channel-' + value5.params.channelId);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function value_55143(a0) { // fn#55143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1673, offset: 0x01377264, size: 140 bytes, params: 2, frame: 16
|
||||
var history;
|
||||
var r1;
|
||||
var r3;
|
||||
var value5;
|
||||
var set;
|
||||
var value6;
|
||||
let binding = env1_9;
|
||||
binding.clear();
|
||||
const _createForOfIteratorHelperLoose_55133Binding = _createForOfIteratorHelperLoose_55133;
|
||||
const value2 = undefined;
|
||||
reducibleJoin2: while (true) {
|
||||
if (a0 == null) {
|
||||
history = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
history = a0.history;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (history != null) {
|
||||
r1 = history;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = [];
|
||||
break reducibleJoin4;
|
||||
}
|
||||
const value3 = _createForOfIteratorHelperLoose_55133Binding(r1);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r3 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value5 = r3.value;
|
||||
binding = env1_9;
|
||||
set = binding.set;
|
||||
Reflect.apply(set, binding, [value5, value2]);
|
||||
value6 = value3();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
break reducibleLoop5;
|
||||
}
|
||||
r3 = value6;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
}
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
binding = env1_9;
|
||||
env1_8 = Reflect.apply(from, Array, [binding.keys()]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function value_55144() { // fn#55144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1879, offset: 0x013772f0, size: 16 bytes, params: 1, frame: 2
|
||||
return {history: env1_8};
|
||||
}
|
||||
|
||||
function value_55145() { // fn#55145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7114:1938, offset: 0x01377300, size: 34 bytes, params: 1, frame: 3
|
||||
let value = a0;
|
||||
const r2 = value !== undefined ? value : 1;
|
||||
value = environment.__proto__;
|
||||
const binding = env1_8;
|
||||
return binding[binding.length - r2];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
/* Metro module 14892; source: modules/main_tabs_v2/native/TabsNavigator.tsx; dependencies: [31, 27, 9559, 1934, 3969, 7607, 33, 4501, 14370, 14762, 14893, 14899, 14812, 14922, 566, 13574, 14934, 1585, 6517, 14935, 14885, 14936, 14952, 14886, 7556, 9581, 2] */
|
||||
function _fun112651(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:6, offset: 0x023d62b0, size: 430 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const getGuildsComponent_112652 = function() {
|
||||
return require(dependencyMap[8]).default;
|
||||
};
|
||||
const getNotificationsComponent_112653 = function() {
|
||||
return require(dependencyMap[9]).ThemedNotifications;
|
||||
};
|
||||
const getSettingsComponent_112654 = function() {
|
||||
return require(dependencyMap[10]).default;
|
||||
};
|
||||
const getYouComponent_112655 = function() {
|
||||
return require(dependencyMap[11]).default;
|
||||
};
|
||||
const getICYMIComponent_112656 = function() {
|
||||
return require(dependencyMap[12]).default;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const appFreezeStore = importDefault(9559) /* metro dependency 9559: AppFreezeStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const env0_8 = (require(7607) /* metro dependency 7607: MainTabsConstants */).MainTabsNavigatorScreens;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value2.jsx;
|
||||
const env0_10 = value2.jsxs;
|
||||
const env0_11 = value2.Fragment;
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({tabBar: {display: 'flex'}});
|
||||
const env0_13 = (require(14922) /* metro dependency 14922 */).createBottomTabNavigator();
|
||||
object = {ignoreQuestDock: true};
|
||||
const env0_15 = value.memo(_fun112658);
|
||||
value = value.memo(TabsNavigator);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/TabsNavigator.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function renderTabBar(a0) { // fn#112657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1396, offset: 0x023d649f, size: 99 bytes, params: 2, frame: 18
|
||||
a0.insets;
|
||||
const value = Object.create(null);
|
||||
value.insets = 0;
|
||||
return ((Component) => <Component>{((Component) => <Component {...copyDataProperties({}, a0, value,
|
||||
undefined)} />)(env0_15)}</Component>)(importDefault(14885) /* metro dependency 14885: AppFreezer */);
|
||||
}
|
||||
|
||||
function _fun112658(a0) { // fn#112658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:640, offset: 0x023d6502, size: 547 bytes, params: 2, frame: 30
|
||||
var r5;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const state = a0.state;
|
||||
const value2 = (require(13574) /* metro dependency 13574: useTabsVisible */).useTabsVisible(state.routes[state.index]);
|
||||
const useLaunchWelcomeNuxModule = require(14934) /* metro dependency 14934: useLaunchWelcomeNux */;
|
||||
const useLaunchWelcomeNuxVisible = useLaunchWelcomeNuxModule.useLaunchWelcomeNuxVisible;
|
||||
const isNuxVisible = Reflect.apply(useLaunchWelcomeNuxVisible, useLaunchWelcomeNuxModule, []).isNuxVisible;
|
||||
const value3 = (require(13574) /* metro dependency 13574: useTabsVisible */).useMainTabsHeight(env0_14);
|
||||
const value4 = (require(13574) /* metro dependency 13574: useTabsVisible */).useMainTabsWidth();
|
||||
const binding = env0_3;
|
||||
const value5 = binding.useMemo(_fun112659, [value2, value3, value4]);
|
||||
const value6 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const value7 = binding.useMemo(function() {
|
||||
return {top: top, bottom: bottom, left: 0, right: 0};
|
||||
}, [value6.top, value6.bottom]);
|
||||
const useContext = binding.useContext;
|
||||
const BottomTabBarHeightCallbackContext = (require(14922) /* metro dependency 14922 */).BottomTabBarHeightCallbackContext;
|
||||
const value9 = binding.useCallback(_fun112661, [Reflect.apply(useContext, binding,
|
||||
[BottomTabBarHeightCallbackContext])]);
|
||||
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
||||
const Provider = BottomTabBarHeightCallbackContext.Provider;
|
||||
const items2 = [styles.tabBar, value5];
|
||||
const BottomTabBar = (require(14922) /* metro dependency 14922 */).BottomTabBar;
|
||||
const provider = <Provider value={value9}><View style={items2}><BottomTabBar {...a0} {...{['insets']: value7}} /></View></Provider>;
|
||||
if (isNuxVisible) {
|
||||
value = importDefault(14935) /* metro dependency 14935: LaunchWelcomeNuxContainer */;
|
||||
value = ((Component) => <Component descriptors={a0.descriptors} isTabsVisible={value2} />)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
return (
|
||||
<LayerScope>
|
||||
{provider}
|
||||
{r5}
|
||||
</LayerScope>
|
||||
);
|
||||
}
|
||||
|
||||
function TabsNavigator() { // fn#112662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1491, offset: 0x023d67c1, size: 266 bytes, params: 1, frame: 22
|
||||
const value2 = (importDefault(14936) /* metro dependency 14936: useTabBarTabOptions */)();
|
||||
const value3 = (importDefault(14952) /* metro dependency 14952: useTabBarTabListeners */)();
|
||||
const value4 = TabsNavigatorUseInitialGuildParams();
|
||||
(importDefault(14886) /* metro dependency 14886: useNotificationPermissionPrompt */)();
|
||||
const value5 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
|
||||
const env0_3 = value5;
|
||||
const value6 = (require(9581) /* metro dependency 9581: ICYMIExperiment */).useICYMIEnabled('TabsNavigator');
|
||||
const value7 = AppFreezeStore(function(a0) {
|
||||
return a0.lockKeys.size > 0;
|
||||
});
|
||||
const Navigator = env0_13.Navigator;
|
||||
const renderTabBarBinding = renderTabBar;
|
||||
const base = value2.base;
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
return (
|
||||
<Navigator
|
||||
id="tabs"
|
||||
tabBar={renderTabBarBinding}
|
||||
freezeAllTabs={value7}
|
||||
screenOptions={base}
|
||||
>
|
||||
{Reflect.apply(useMemo, binding, [_fun112666, [value2, value3, value4, value6, value5]])}
|
||||
</Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun112659() { // fn#112659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:849, offset: 0x023d6725, size: 58 bytes, params: 1, frame: 4
|
||||
return {height: env0_1 > 0 ? env0_1 : undefined, width: env0_2, display: env0_0 ? 'flex' : 'none'};
|
||||
}
|
||||
|
||||
function _fun112661(a0) { // fn#112661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1086, offset: 0x023d6780, size: 65 bytes, params: 2, frame: 12
|
||||
if (env0_5 != null) {
|
||||
env0_5(a0);
|
||||
}
|
||||
const value = environment.__proto__;
|
||||
(require(13574) /* metro dependency 13574: useTabsVisible */).setTabsHeight(a0);
|
||||
}
|
||||
|
||||
function TabsNavigatorUseInitialGuildParams() { // fn#112663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1548, owner: TabsNavigator.useInitialGuildParams, offset: 0x023d68cb, size: 142 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_3;
|
||||
const value2 = undefined;
|
||||
const value3 = binding.useRef(value2);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [SelectedGuildStore];
|
||||
const guildId = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return SelectedGuildStore.getGuildId();
|
||||
}]);
|
||||
if (value3.current == null && guildId != null) {
|
||||
object = {guildId: guildId};
|
||||
object.channelId = SelectedChannelStore.getChannelId(guildId) ?? value2;
|
||||
value3.current = object;
|
||||
}
|
||||
return value3.current;
|
||||
}
|
||||
|
||||
function _fun112666() { // fn#112666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15089:1988, offset: 0x023d696f, size: 434 bytes, params: 1, frame: 21
|
||||
var r5;
|
||||
var icymi;
|
||||
const jsxRuntimeEnv1_11Binding = jsxRuntimeEnv1_11;
|
||||
let Screen = env1_13.Screen;
|
||||
const GUILDS = MainTabsNavigatorScreens.GUILDS;
|
||||
const items2 = [<Screen name={GUILDS} options={env0_0.guilds} listeners={env0_1.guilds} initialParams={env0_2} getComponent={getGuildsComponent_112652} />];
|
||||
if (env0_4) {
|
||||
Screen = env1_13.Screen;
|
||||
var screenProps = {name: MainTabsNavigatorScreens.ICYMI};
|
||||
icymi = env0_0.icymi;
|
||||
screenProps.options = icymi;
|
||||
icymi = env0_1.icymi;
|
||||
screenProps.listeners = icymi;
|
||||
screenProps.getComponent = getICYMIComponent_112656;
|
||||
r5 = <Screen {...screenProps} />;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
items2[1] = r5;
|
||||
Screen = env1_13.Screen;
|
||||
const NOTIFICATIONS = MainTabsNavigatorScreens.NOTIFICATIONS;
|
||||
items2[2] = <Screen name={NOTIFICATIONS} options={env0_0.notifications} listeners={env0_1.notifications} getComponent={getNotificationsComponent_112653} />;
|
||||
items2[3] = env0_3 && <env1_13.Screen name={MainTabsNavigatorScreens.SETTINGS_JUMP} options={env0_0.settings} getComponent={getSettingsComponent_112654} />;
|
||||
Screen = env1_13.Screen;
|
||||
const YOU = MainTabsNavigatorScreens.YOU;
|
||||
items2[4] = <Screen name={YOU} options={env0_0.you} listeners={env0_1.you} getComponent={getYouComponent_112655} />;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,123 @@
|
||||
/* Metro module 7553; source: modules/main_tabs_v2/native/YouBarConstants.tsx; dependencies: [7554, 697, 1585, 478, 4010, 3860, 1357, 7555, 566, 5176, 7556, 2] */
|
||||
function _fun60729(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:6, offset: 0x0170d062, size: 514 bytes, params: 8, frame: 28
|
||||
const env0_0 = require;
|
||||
const closure = function() {
|
||||
return importDefault(dependencyMap[2])().bottom > 0 ? require(dependencyMap[3]).isAndroid() ? PX_16 : PX_24 : PX_16;
|
||||
};
|
||||
const closure2 = useYouBarBottomMargin;
|
||||
const closure3 = useConnectionBannerHeight;
|
||||
const closure4 = useYouBarSettingsOutsideSafeAreaTop;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const connectivityIndicatorStateStore = importDefault(7554) /* metro dependency 7554: ConnectivityIndicatorStateStore */;
|
||||
const env0_4 = (require(7554) /* metro dependency 7554: ConnectivityIndicatorStateStore */).ConnectivityIndicatorState;
|
||||
const Set = global.Set;
|
||||
Object = global.Object;
|
||||
let set = new Set(Object.values((importDefault(697) /* metro dependency 697: native */).space));
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
set = 32 + 2 * PX_12;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
const PX_162 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const PX_163 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const PX_164 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/YouBarConstants.tsx');
|
||||
exports.CONNECTION_BANNER_HEIGHT = 48;
|
||||
exports.YOU_BAR_SPRING_CONFIG = {'damping': 20, 'stiffness': 300, 'mass': 1.5, 'overshootClamping': true,
|
||||
'restSpeedThreshold': 0.001, 'restDisplacementThreshold': 0.001};
|
||||
exports.YOU_BAR_PADDING = PX_12;
|
||||
exports.YOU_BAR_HEIGHT = set;
|
||||
exports.YOU_BAR_MARGIN = PX_16;
|
||||
exports.YOU_BAR_MARGIN_IOS = PX_24;
|
||||
exports.YOU_BAR_LEFT_INSET = PX_162;
|
||||
exports.YOU_BAR_FLOATING_OFFSET_MINIMUM = PX_163;
|
||||
exports.useYouBarHorizontalMargin = closure;
|
||||
exports.useYouBarRightInset = useYouBarRightInset;
|
||||
exports.useYouBarBottomMargin = closure2;
|
||||
exports.useConnectionBannerHeight = closure3;
|
||||
exports.useYouBarTotalHeight = useYouBarTotalHeight;
|
||||
exports.useYouBarSettingsOutsideSafeAreaTop = closure4;
|
||||
exports.useYouBarSettingsCustomHeaderPaddingTop = useYouBarSettingsCustomHeaderPaddingTop;
|
||||
exports.useYouBarIOSModalPresentation = useYouBarIOSModalPresentation;
|
||||
exports.YOU_BAR_GRADIENT_EXTRA_HEIGHT = PX_164;
|
||||
}
|
||||
|
||||
function useYouBarBottomMargin() { // fn#60731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:391, offset: 0x0170d2b9, size: 206 bytes, params: 1, frame: 18
|
||||
var r0;
|
||||
var moduleValue2;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('useYouBarBottomMargin');
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const CHAT_INPUT_FLOATING_OFFSET_MINIMUM = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_OFFSET_MINIMUM;
|
||||
if (value2) {
|
||||
r0 = global.Math.max(Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_FLOATING_OFFSET_MINIMUM]), bottom);
|
||||
} else if (bottom > 0) {
|
||||
moduleValue2 = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
r0 = moduleValue2.isAndroid() ? global.Math.max(PX_16, bottom) : PX_24;
|
||||
} else {
|
||||
r0 = global.Math.max(PX_16, bottom);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useConnectionBannerHeight() { // fn#60732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:625, offset: 0x0170d387, size: 134 bytes, params: 1, frame: 16
|
||||
const {timeoutMs,
|
||||
hidden} = (importDefault(7555) /* metro dependency 7555: ConnectionIndicatorExperiment */).useConfig({location: 'useConnectionBannerHeight'});
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
return timeoutMs == null || hidden ? 0 : Reflect.apply(useStateFromStores, fluxModule,
|
||||
[[ConnectivityIndicatorStateStore], function() {
|
||||
return ConnectivityIndicatorStateStore.getState();
|
||||
}]) !== ConnectivityIndicatorState.HIDDEN ? 48 : 0;
|
||||
}
|
||||
|
||||
function useYouBarSettingsOutsideSafeAreaTop(a0) { // fn#60734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:841, offset: 0x0170d420, size: 106 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var value;
|
||||
const value2 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled(a0);
|
||||
if (value2) {
|
||||
value = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
r0 = value ? (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)() : !value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useYouBarRightInset() { // fn#60735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:1462, offset: 0x0170d48a, size: 132 bytes, params: 1, frame: 17
|
||||
const value2 = useYouBarHorizontalMargin();
|
||||
const isChatBesideChannelList = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const CHANNEL_DRAWER_SPACING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_SPACING;
|
||||
const r1 = isChatBesideChannelList ? value2 - Reflect.apply(useToken, useTokenModule,
|
||||
[CHANNEL_DRAWER_SPACING]) : value2;
|
||||
const binding = env0_5;
|
||||
return binding.has(r1) ? r1 : value2;
|
||||
}
|
||||
|
||||
function useYouBarTotalHeight() { // fn#60736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:1789, offset: 0x0170d50e, size: 90 bytes, params: 1, frame: 14
|
||||
const value = a0;
|
||||
return (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('YouBar') ? useYouBarBottomMargin() + env0_6 + useConnectionBannerHeight() + (value !== undefined ? value : 0) : 0;
|
||||
}
|
||||
|
||||
function useYouBarSettingsCustomHeaderPaddingTop(a0) { // fn#60737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:2057, offset: 0x0170d568, size: 57 bytes, params: 2, frame: 12
|
||||
return useYouBarSettingsOutsideSafeAreaTop(a0) ? 16 : (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
}
|
||||
|
||||
function useYouBarIOSModalPresentation(a0) { // fn#60738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7731:2213, offset: 0x0170d5a1, size: 77 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
var value;
|
||||
const value2 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled(a0);
|
||||
if (value2) {
|
||||
value = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
value = !value.isAndroid();
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
/* Metro module 14369; source: modules/main_tabs_v2/native/YouBarStackNavigator.tsx; dependencies: [31, 27, 1934, 3969, 7607, 33, 9884, 14370, 14762, 14812, 566, 14886, 9581, 5280, 6517, 2] */
|
||||
function _fun108734(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:6, offset: 0x0232c32e, size: 315 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const getGuildsComponent = function() {
|
||||
return require(dependencyMap[7]).default;
|
||||
};
|
||||
const getNotificationsComponent = function() {
|
||||
return require(dependencyMap[8]).ThemedNotifications;
|
||||
};
|
||||
const getICYMIComponent = function() {
|
||||
return require(dependencyMap[9]).default;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.StyleSheet;
|
||||
const env0_5 = value2.View;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const env0_8 = (require(7607) /* metro dependency 7607: MainTabsConstants */).MainTabsNavigatorScreens;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value3.jsx;
|
||||
const env0_10 = value3.Fragment;
|
||||
const env0_11 = value3.jsxs;
|
||||
const env0_12 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
|
||||
value = value.memo(YouBarStackNavigator);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/YouBarStackNavigator.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function YouBarStackNavigator() { // fn#108738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:465, offset: 0x0232c48a, size: 274 bytes, params: 1, frame: 24
|
||||
const value = YouBarStackNavigatorUseInitialGuildParams();
|
||||
(importDefault(14886) /* metro dependency 14886: useNotificationPermissionPrompt */)();
|
||||
const value3 = (require(9581) /* metro dependency 9581: ICYMIExperiment */).useICYMIEnabled('TabsNavigator');
|
||||
const value4 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
|
||||
const binding = env0_3;
|
||||
let useMemo = binding.useMemo;
|
||||
const value5 = Reflect.apply(useMemo, binding, [_fun108741, [value4]]);
|
||||
const absoluteFillObject = StyleSheet.absoluteFillObject;
|
||||
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
||||
const Navigator = env0_12.Navigator;
|
||||
useMemo = binding.useMemo;
|
||||
return (
|
||||
<View style={absoluteFillObject}>
|
||||
<LayerScope>
|
||||
<Navigator id="tabs" screenOptions={value5}>
|
||||
{Reflect.apply(useMemo, binding, [_fun108742, [value, value3, value4]])}
|
||||
</Navigator>
|
||||
</LayerScope>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function YouBarStackNavigatorUseInitialGuildParams() { // fn#108739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:503, owner: YouBarStackNavigator.useInitialGuildParams, offset: 0x0232c59c, size: 142 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_3;
|
||||
const value2 = undefined;
|
||||
const value3 = binding.useRef(value2);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [SelectedGuildStore];
|
||||
const guildId = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return SelectedGuildStore.getGuildId();
|
||||
}]);
|
||||
if (value3.current == null && guildId != null) {
|
||||
object = {guildId: guildId};
|
||||
object.channelId = SelectedChannelStore.getChannelId(guildId) ?? value2;
|
||||
value3.current = object;
|
||||
}
|
||||
return value3.current;
|
||||
}
|
||||
|
||||
function _fun108741() { // fn#108741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:854, offset: 0x0232c63d, size: 49 bytes, params: 1, frame: 12
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_2, undefined);
|
||||
object2['headerShown'] = false;
|
||||
object2['gestureEnabled'] = true;
|
||||
object2['fullScreenGestureEnabled'] = true;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun108742() { // fn#108742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:1075, offset: 0x0232c66e, size: 234 bytes, params: 1, frame: 21
|
||||
const jsxRuntimeEnv1_10Binding = jsxRuntimeEnv1_10;
|
||||
let Screen = env1_12.Screen;
|
||||
const GUILDS = MainTabsNavigatorScreens.GUILDS;
|
||||
const screen = <Screen name={GUILDS} initialParams={env0_0} getComponent={getGuildsComponent} options={options_108743} />;
|
||||
const r5 = env0_1 ? <env1_12.Screen name={MainTabsNavigatorScreens.ICYMI} getComponent={getICYMIComponent} options={options_108744} /> : null;
|
||||
Screen = env1_12.Screen;
|
||||
const NOTIFICATIONS = MainTabsNavigatorScreens.NOTIFICATIONS;
|
||||
return (
|
||||
<>
|
||||
{screen}
|
||||
{r5}
|
||||
<Screen
|
||||
name={NOTIFICATIONS}
|
||||
getComponent={getNotificationsComponent}
|
||||
options={options_108745}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function options_108743() { // fn#108743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14566:1176, offset: 0x0232c758, size: 18 bytes, params: 1, frame: 11
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env1_2, environment.__proto__);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
/* Metro module 9612; source: modules/main_tabs_v2/native/channel/ChannelActions.tsx; dependencies: [31, 27, 4790, 1383, 1379, 4297, 9613, 661, 9614, 33, 4501, 8850, 697, 9616, 9618, 9619, 9625, 566, 6860, 22, 9626, 7709, 1244, 9627, 6998, 9628, 9621, 477, 4015, 9672, 9673, 9690, 1239, 4008, 9694, 6684, 9695, 9697, 5072, 9698, 9700, 2] */
|
||||
function _fun75303(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:6, offset: 0x01da94e3, size: 425 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 env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const activeThreadsStore = importDefault(4790) /* metro dependency 4790: ActiveThreadsStore */;
|
||||
const env0_5 = (require(1383) /* metro dependency 1383: ChannelRecord */).THREADED_CHANNEL_TYPES;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
||||
const env0_8 = (require(9613) /* metro dependency 9613: ChannelDetailsStore */).setIsChannelDetailsSearchActive;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = constantsModule.ChannelTypes;
|
||||
const env0_10 = constantsModule.ChannelTypesSets;
|
||||
const env0_11 = constantsModule.ComponentActions;
|
||||
const env0_12 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchEntrypointAnalyticsLocations;
|
||||
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_14 = (require(31) /* metro dependency 31 */).createElement;
|
||||
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({actionWrapper: {'flexShrink': 0,
|
||||
'flexDirection': 'row', 'alignItems': 'center'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelActions.tsx');
|
||||
exports.default = ChannelActions;
|
||||
}
|
||||
|
||||
function JoinCallButton() { // fn#75304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:472, offset: 0x01da968c, size: 84 bytes, params: 1, frame: 16
|
||||
const PhoneCallIcon = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
|
||||
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
|
||||
return <PhoneCallIcon size="sm" color={GREEN_360} />;
|
||||
}
|
||||
|
||||
function EndCallButton() { // fn#75305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:585, offset: 0x01da96e0, size: 84 bytes, params: 1, frame: 16
|
||||
const PhoneHangUpIcon = (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
|
||||
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
||||
return <PhoneHangUpIcon size="sm" color={RED_400} />;
|
||||
}
|
||||
|
||||
function ChannelActionButtons({channel, screenIndex}) { // fn#75306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:697, offset: 0x01da9734, size: 1192 bytes, params: 2, frame: 28
|
||||
var r7;
|
||||
var r2;
|
||||
var push;
|
||||
var object7;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
var t;
|
||||
var object8;
|
||||
var object9;
|
||||
var object10;
|
||||
var object11;
|
||||
var isChannelNSFWGated;
|
||||
var channelHasThreads;
|
||||
var value13;
|
||||
var unshift;
|
||||
var object12;
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(9618) /* metro dependency 9618: useIsNsfwGated */)(channel);
|
||||
const value3 = (require(9619) /* metro dependency 9619: ForumHooks */).useCanSearchForumPosts(channel);
|
||||
const value4 = (importDefault(9625) /* metro dependency 9625: useIsWindowSmall */)();
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ActiveThreadsStore], function() {
|
||||
var channelBinding = channel;
|
||||
return ActiveThreadsStore.hasThreadsForChannel(channelBinding.guild_id, channelBinding.id);
|
||||
});
|
||||
items2 = [];
|
||||
const value6 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanJoinThreadVoice(channel);
|
||||
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
|
||||
return VoiceStateStore.isInChannel(channel.id);
|
||||
});
|
||||
if (channel.isVocalThread() && value6 && (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore],
|
||||
function() {
|
||||
return !importDefault(dependencyMap[19]).isEmpty(VoiceStateStore.getVoiceStatesForChannel(channel.id));
|
||||
})) {
|
||||
push = items2.push;
|
||||
object7 = {source: null};
|
||||
object7.IconComponent = value7 ? EndCallButton : JoinCallButton;
|
||||
object7.onPress = value7 ? (importDefault(9626) /* metro dependency 9626: useHandleJoinThreadVoice */)(channel) : _fun75310;
|
||||
string = intl.string;
|
||||
t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object7.accessibilityLabel = value7 ? Reflect.apply(string, intl, [t['4ry6yi']]) : Reflect.apply(string, intl,
|
||||
[t.My50nf]);
|
||||
Reflect.apply(push, items2, [object7]);
|
||||
}
|
||||
const type = channel.type;
|
||||
const GUILD_DIRECTORY = ChannelTypes.GUILD_DIRECTORY;
|
||||
if (GUILD_DIRECTORY === type) {
|
||||
push = items2.push;
|
||||
object10 = {};
|
||||
object10.source = importDefault(9627) /* metro dependency 9627 */;
|
||||
object10.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
|
||||
object10.onPress = onPress_75311;
|
||||
object10.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
|
||||
Reflect.apply(push, items2, [object10]);
|
||||
} else if (ChannelTypes.GUILD_FORUM === type) {
|
||||
if (value3) {
|
||||
push = items2.push;
|
||||
object9 = {};
|
||||
object9.source = importDefault(9627) /* metro dependency 9627 */;
|
||||
object9.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
|
||||
object9.onPress = onPress_75312;
|
||||
object9.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
|
||||
Reflect.apply(push, items2, [object9]);
|
||||
}
|
||||
} else if (ChannelTypes.GUILD_MEDIA === type) {
|
||||
if (value3) {
|
||||
push = items2.push;
|
||||
object9 = {};
|
||||
object9.source = importDefault(9627) /* metro dependency 9627 */;
|
||||
object9.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
|
||||
object9.onPress = onPress_75312;
|
||||
object9.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
|
||||
Reflect.apply(push, items2, [object9]);
|
||||
}
|
||||
} else {
|
||||
push = items2.push;
|
||||
object8 = {};
|
||||
object8.source = importDefault(9627) /* metro dependency 9627 */;
|
||||
object8.IconComponent = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
|
||||
object8.onPress = onPress_75313;
|
||||
object8.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
|
||||
Reflect.apply(push, items2, [object8]);
|
||||
}
|
||||
let r1 = value4 && items2.length !== 0;
|
||||
if (!r1) {
|
||||
object11 = {channel: channel, isChannelNSFWGated: value2, channelHasThreads: value5};
|
||||
channel = object11.channel;
|
||||
isChannelNSFWGated = object11.isChannelNSFWGated;
|
||||
channelHasThreads = object11.channelHasThreads;
|
||||
value13 = THREADED_CHANNEL_TYPES.has(channel.type);
|
||||
r7 = !value13 && channelHasThreads;
|
||||
r7 = r7 && !ChannelTypesSets.GUILD_THREADS_ONLY.has(channel.type);
|
||||
r2 = value13 && !isChannelNSFWGated;
|
||||
r2 = r2 && !channel.isForumLikeChannel();
|
||||
r2 = r2 && r7;
|
||||
r1 = !r2;
|
||||
}
|
||||
if (!r1) {
|
||||
unshift = items2.unshift;
|
||||
object12 = {};
|
||||
object12.source = importDefault(9694) /* metro dependency 9694 */;
|
||||
object12.IconComponent = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
|
||||
object12.onPress = onPress_75314;
|
||||
object12.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B2panI);
|
||||
Reflect.apply(unshift, items2, [object12]);
|
||||
}
|
||||
return (
|
||||
<View style={styles.actionWrapper}>
|
||||
{items2.map(_fun75315)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function WrappedChannelNavButtons({channelId, screenIndex, showCreateThread}) { // fn#75316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3105, offset: 0x01da9f3c, size: 152 bytes, params: 2, frame: 20
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
return channel == null || (require(5072) /* metro dependency 5072: AgeGateUtils */).useShouldHideChannelContent(channel) || showCreateThread ? null : <ChannelActionButtons channel={channel} screenIndex={screenIndex} />;
|
||||
}
|
||||
|
||||
function ChannelActions({channelId, screenIndex, containerStyle, showCreateThread}) { // fn#75318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3465, offset: 0x01da9fd4, size: 275 bytes, params: 2, frame: 22
|
||||
var r4;
|
||||
var value;
|
||||
const {isMultiUserDM,
|
||||
isDM} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore], _fun75319);
|
||||
if ((require(9619) /* metro dependency 9619: ForumHooks */).useHasForumSearchQuery(channelId)) {
|
||||
const ForumChannelCloseSearchButton = (require(9698) /* metro dependency 9698: ForumChannelSearch */).ForumChannelCloseSearchButton;
|
||||
r4 = <ForumChannelCloseSearchButton channelId={channelId} />;
|
||||
} else if (isDM) {
|
||||
value = importDefault(9700) /* metro dependency 9700: PrivateChannelButtons */;
|
||||
value = ((Component) => <Component channelId={channelId} screenIndex={screenIndex} />)(value);
|
||||
r4 = value;
|
||||
} else if (isMultiUserDM) {
|
||||
value = importDefault(9700) /* metro dependency 9700: PrivateChannelButtons */;
|
||||
value = ((Component) => <Component channelId={channelId} screenIndex={screenIndex} />)(value);
|
||||
r4 = value;
|
||||
} else {
|
||||
r4 = <WrappedChannelNavButtons channelId={channelId} screenIndex={screenIndex} showCreateThread={showCreateThread} />;
|
||||
}
|
||||
return (
|
||||
<View style={containerStyle}>
|
||||
{r4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun75310() { // fn#75310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1227, offset: 0x01da9c66, size: 45 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
||||
return value.openChannelCallModal(channel);
|
||||
}
|
||||
|
||||
function ChannelActionButtonsOnPress() { // fn#75311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1468, owner: ChannelActionButtons.onPress, offset: 0x01da9c93, size: 51 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(9628) /* metro dependency 9628: GuildDirectorySearchModalActionCreators */).open({channel: channel});
|
||||
}
|
||||
|
||||
function ChannelActionButtonsOnPress_75312() { // fn#75312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1684, owner: ChannelActionButtons.onPress, offset: 0x01da9cc6, size: 55 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(9621) /* metro dependency 9621: ForumActionCreators */;
|
||||
value.updateForumSearchQuery(channel.id, '');
|
||||
}
|
||||
|
||||
function ChannelActionButtonsOnPress_75313() { // fn#75313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:1881, owner: ChannelActionButtons.onPress, offset: 0x01da9cfd, size: 439 bytes, params: 1, frame: 20
|
||||
var moduleValue2;
|
||||
var value3;
|
||||
var ComponentDispatch;
|
||||
let value = environment.__proto__;
|
||||
setIsChannelDetailsSearchActive(channel.id, true, 'initial');
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
moduleValue2 = require(4015) /* metro dependency 4015: ChatInputUtils */;
|
||||
value3 = moduleValue2.getChatInputRef(channel.id, screenIndex);
|
||||
if (value3 != null) {
|
||||
value3.blur();
|
||||
}
|
||||
}
|
||||
channelBinding = channel;
|
||||
const channelDetailsSearchContext = (require(9672) /* metro dependency 9672: useSearchContext */).getChannelDetailsSearchContext(channelBinding.id,
|
||||
channelBinding.getGuildId(), channelBinding.isThread());
|
||||
const defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
|
||||
const trackSearchOpened = defaultImport.trackSearchOpened;
|
||||
const CHANNEL_HEADER = SearchEntrypointAnalyticsLocations.CHANNEL_HEADER;
|
||||
Reflect.apply(trackSearchOpened, defaultImport, [{searchContext: channelDetailsSearchContext,
|
||||
searchLocation: CHANNEL_HEADER}]);
|
||||
if ((require(9690) /* metro dependency 9690: SwipeToMemberListUtils */).isSwipeToMemberListEnabled()) {
|
||||
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
ComponentDispatch.dispatch(ComponentActions.SHOW_CHANNEL_DETAILS, {source: 'channel-header-search',
|
||||
channelId: channel.id, screenIndex: screenIndex});
|
||||
} else {
|
||||
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
|
||||
value = value.getRootNavigationRef();
|
||||
if (value == null) {
|
||||
return undefined;
|
||||
}
|
||||
if (value.isReady()) {
|
||||
value.navigate('sidebar', {'channelId': null, 'search': true, 'source': 'channel-header-search',
|
||||
channelId: channel.id});
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ChannelActionButtonsOnPress_75314() { // fn#75314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:2889, owner: ChannelActionButtons.onPress, offset: 0x01da9eb4, size: 39 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(9695) /* metro dependency 9695: showThreadBrowserModal */)(channel);
|
||||
}
|
||||
|
||||
function _fun75315(a0, a1) { // fn#75315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3009, offset: 0x01da9edb, size: 97 bytes, params: 3, frame: 16
|
||||
const value = env0_2.length - 1;
|
||||
const createElementBinding = createElement;
|
||||
const defaultImport = importDefault(9697) /* metro dependency 9697: IconActionButton */;
|
||||
const object2 = {noMargin: a1 === value};
|
||||
copyDataProperties(object2, a0, value);
|
||||
object2['key'] = a0.accessibilityLabel;
|
||||
return createElementBinding(defaultImport, object2);
|
||||
}
|
||||
|
||||
function _fun75319() { // fn#75319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9798:3599, offset: 0x01daa0e7, size: 116 bytes, params: 1, frame: 16
|
||||
var r2;
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
const channel = ChannelStore.getChannel(channelId);
|
||||
const value4 = undefined;
|
||||
const r6 = channel == null ? value4 : channel.isMultiUserDM();
|
||||
object2.isMultiUserDM = r6 != null && r6;
|
||||
value = ChannelStore.getChannel(channelId);
|
||||
if (value == null) {
|
||||
r2 = value4;
|
||||
} else {
|
||||
value = value.isDM();
|
||||
r2 = value;
|
||||
}
|
||||
object2.isDM = r2 != null && r2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 11959; source: modules/main_tabs_v2/native/channel/ChannelSafeAreaBottom.android.tsx; dependencies: [11278, 11960, 11961, 2] */
|
||||
function _fun91755(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12145:6, offset: 0x02070fe9, size: 132 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const animatedKeyboardExperimentModule = require(11278) /* metro dependency 11278: AnimatedKeyboardExperiment */;
|
||||
const r1 = animatedKeyboardExperimentModule.isAnimatedAndroidKeyboard() ? importDefault(11960) /* metro dependency 11960: ChannelSafeAreaBottomNoop */ : importDefault(11961) /* metro dependency 11961: ChannelSafeAreaBottomAnimatedAndroid */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelSafeAreaBottom.android.tsx');
|
||||
exports.default = r1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* Metro module 11961; source: modules/main_tabs_v2/native/channel/ChannelSafeAreaBottomAnimated.android.tsx; dependencies: [31, 27, 33, 11280, 11284, 4017, 2] */
|
||||
function _fun91758(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12147:6, offset: 0x0207111e, size: 195 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value2.StyleSheet;
|
||||
const env0_4 = value2.View;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object = {code: 'function ChannelSafeAreaBottomAnimatedAndroidTsx1(){const{heightSharedValue}=this.__closure;return{height:heightSharedValue.get()};}'};
|
||||
value = value.memo(ChannelSafeAreaBottom);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelSafeAreaBottomAnimated.android.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function ChannelSafeAreaBottom({channelId}) { // fn#91759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12147:312, offset: 0x020711e1, size: 209 bytes, params: 2, frame: 20
|
||||
const value2 = (importDefault(11280) /* metro dependency 11280: useChannelSafeAreaHeightSharedValueAndroid */)();
|
||||
const value3 = (importDefault(11284) /* metro dependency 11284: useChannelSafeAreaBottomStyles */)(channelId);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = ChannelSafeAreaBottomN;
|
||||
closure.__closure = {heightSharedValue: value2};
|
||||
closure.__workletHash = 6491350126069;
|
||||
closure.__initData = env0_6;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View2 style={value4}>
|
||||
<View style={[StyleSheet.absoluteFill, value3]} />
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 11960; source: modules/main_tabs_v2/native/channel/ChannelSafeAreaBottomNoop.tsx; dependencies: [31, 27, 33, 2] */
|
||||
function _fun91756(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12146:6, offset: 0x0207106d, size: 154 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_0 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(ChannelSafeAreaNoop);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/ChannelSafeAreaBottomNoop.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
/* Metro module 14959; source: modules/main_tabs_v2/native/channel/StandaloneChannelScreen.tsx; dependencies: [31, 27, 9604, 661, 1386, 33, 4501, 697, 1485, 1585, 7701, 9390, 1244, 4007, 8811, 9605, 6517, 9709, 9612, 9690, 6632, 5103, 4048, 1357, 9722, 4010, 1305, 7704, 14960, 14977, 14994, 15011, 11273, 15015, 2] */
|
||||
function _fun113137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:6, offset: 0x023ea78c, size: 967 bytes, params: 8, frame: 27
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.View;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const mainTabsV2ConstantsModule = require(9604) /* metro dependency 9604: MainTabsV2Constants */;
|
||||
const env0_5 = mainTabsV2ConstantsModule.HEADER_CORNER_RADIUS;
|
||||
const MIDNIGHT_BORDER_WIDTH = mainTabsV2ConstantsModule.MIDNIGHT_BORDER_WIDTH;
|
||||
const env0_6 = mainTabsV2ConstantsModule.MIN_HEADER_HEIGHT;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const env0_8 = constantsModule.ME;
|
||||
const env0_9 = constantsModule.ThemeTypes;
|
||||
const env0_10 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
|
||||
const value5 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value5.jsx;
|
||||
const env0_12 = value5.jsxs;
|
||||
const env0_13 = value5.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {flex: 1};
|
||||
const object4 = {borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
|
||||
let BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object4.borderLeftColor = BORDER_STRONG;
|
||||
object4.borderTopWidth = MIDNIGHT_BORDER_WIDTH;
|
||||
object4.borderTopColor = 'transparent';
|
||||
object2.midnightContainerBorder = object4;
|
||||
let STANDALONE_CHANNEL_CONTENT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.STANDALONE_CHANNEL_CONTENT_BACKGROUND;
|
||||
object2.contentContainer = {flex: 1, backgroundColor: STANDALONE_CHANNEL_CONTENT_BACKGROUND};
|
||||
const object6 = {borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
|
||||
BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object6.borderLeftColor = BORDER_STRONG;
|
||||
object2.midnightContentContainerBorder = object6;
|
||||
STANDALONE_CHANNEL_CONTENT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.STANDALONE_CHANNEL_CONTENT_BACKGROUND;
|
||||
object2.containerEmpty = {backgroundColor: STANDALONE_CHANNEL_CONTENT_BACKGROUND};
|
||||
STANDALONE_CHANNEL_CONTENT_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.STANDALONE_CHANNEL_CONTENT_BACKGROUND;
|
||||
object2.headerWrapper = {'zIndex': 1, 'backgroundColor': null, 'flexDirection': 'row', 'alignItems': 'center',
|
||||
'flexShrink': 0, backgroundColor: STANDALONE_CHANNEL_CONTENT_BACKGROUND};
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['top'] = undefined;
|
||||
object7['height'] = 1;
|
||||
const STANDALONE_CHANNEL_HEADER_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.STANDALONE_CHANNEL_HEADER_BORDER;
|
||||
object7['backgroundColor'] = STANDALONE_CHANNEL_HEADER_BORDER;
|
||||
object2.headerBottomBorder = object7;
|
||||
const CHANNEL_DRAWER_CORNER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_CORNER_RADIUS;
|
||||
object2.headerWithFadingFrame = {borderTopLeftRadius: CHANNEL_DRAWER_CORNER_RADIUS};
|
||||
const object9 = {};
|
||||
let CHANNEL_DRAWER_DIVIDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_DIVIDER_WIDTH;
|
||||
object9.borderLeftWidth = CHANNEL_DRAWER_DIVIDER_WIDTH;
|
||||
let APP_FRAME_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.APP_FRAME_BORDER;
|
||||
object9.borderLeftColor = APP_FRAME_BORDER;
|
||||
object2.splitDivider = object9;
|
||||
const object13 = {};
|
||||
CHANNEL_DRAWER_DIVIDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_DIVIDER_WIDTH;
|
||||
object13.borderTopWidth = CHANNEL_DRAWER_DIVIDER_WIDTH;
|
||||
APP_FRAME_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.APP_FRAME_BORDER;
|
||||
object13.borderTopColor = APP_FRAME_BORDER;
|
||||
object2.splitDividerTop = object13;
|
||||
const object14 = {};
|
||||
BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object14.borderLeftColor = BORDER_STRONG;
|
||||
BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object14.borderTopColor = BORDER_STRONG;
|
||||
object14.borderLeftWidth = MIDNIGHT_BORDER_WIDTH;
|
||||
object14.borderTopWidth = MIDNIGHT_BORDER_WIDTH;
|
||||
object2.headerWithFadingFrameMidnight = object14;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.midnightFrameCover = {backgroundColor: BACKGROUND_BASE_LOW, position: 'absolute',
|
||||
left: -MIDNIGHT_BORDER_WIDTH, top: 0, width: MIDNIGHT_BORDER_WIDTH};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.actions = {marginRight: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.spacer = {width: PX_16};
|
||||
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(StandaloneChannelScreen);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/StandaloneChannelScreen.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function Header_113138({channelId, screenIndex, guildId, isNavigationScreen, frame, isMIDNIGHTTheme, isChatInputFloating, showCreateThread, isBackEnabled}) { // fn#113138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:1793, offset: 0x023eab53, size: 908 bytes, params: 2, frame: 35
|
||||
var object2;
|
||||
const env0_3 = frame;
|
||||
const value2 = (require(1485) /* metro dependency 1485 */).useNavigation();
|
||||
const styles = useStyles();
|
||||
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
const value4 = env0_3.useMemo(_fun113139, [styles.headerWrapper, styles.headerWithFadingFrame, styles.splitDivider,
|
||||
styles.splitDividerTop, styles.headerWithFadingFrameMidnight,
|
||||
(require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop(), frame, isMIDNIGHTTheme,
|
||||
isChatInputFloating, top]);
|
||||
const value5 = env0_3.useCallback(_fun113140, [value2, isNavigationScreen]);
|
||||
const value6 = env0_3.useMemo(_fun113141, [guildId]);
|
||||
object2 = {};
|
||||
const ServerIcon = (require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon;
|
||||
object2.IconComponent = ServerIcon;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const WYj55Y = (require(1244) /* metro dependency 1244: indexNative */).t.WYj55Y;
|
||||
object2.label = Reflect.apply(string, intl, [WYj55Y]);
|
||||
object2.action = action_113142;
|
||||
let r15 = value6 ? ((ContextMenu) => <ContextMenu triggerOnLongPress align="below" items={[object2]}>{children_113143}</ContextMenu>)((require(8811) /* metro dependency 8811: ContextMenuNative */).ContextMenu) : ((PressableNavigatorBackIcon) => <PressableNavigatorBackIcon onPress={value5} />)((require(9605) /* metro dependency 9605: PressableNavigatorBackIcon */).PressableNavigatorBackIcon);
|
||||
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
|
||||
const r6 = frame != null && isMIDNIGHTTheme ? isChatInputFloating ? null : <View style={[styles.midnightFrameCover,
|
||||
{height: top + HEADER_CORNER_RADIUS}]} /> : null;
|
||||
const view = <View style={styles.headerBottomBorder} />;
|
||||
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
||||
r15 = !isBackEnabled ? <View style={styles.spacer} /> : r15;
|
||||
return (
|
||||
<>
|
||||
{r6}
|
||||
<View style={value4}>
|
||||
{view}
|
||||
<LayerScope>
|
||||
{r15}
|
||||
{((Component) => <Component channelId={channelId} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9709) /* metro dependency 9709: ChannelHeader */)}
|
||||
{((Component) => <Component containerStyle={styles.actions} channelId={channelId} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9612) /* metro dependency 9612: ChannelActions */)}
|
||||
</LayerScope>
|
||||
</View>
|
||||
{frame}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function StandaloneChannelScreen({guildId, channelId, isNavigationScreen, frame, showCreateThread, screenIndex}) { // fn#113144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:3289, offset: 0x023eb0af, size: 1383 bytes, params: 2, frame: 36
|
||||
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
||||
var object10;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
let env0_3 = undefined;
|
||||
const styles = useStyles();
|
||||
const env0_2 = (require(1485) /* metro dependency 1485 */).useNavigation();
|
||||
const value3 = (require(9690) /* metro dependency 9690: SwipeToMemberListUtils */).useIsSwipeToMemberListEnabled();
|
||||
const needSubscriptionToAccess = (importDefault(6632) /* metro dependency 6632: useChannelRoleSubscriptionStatus */)(channelId).needSubscriptionToAccess;
|
||||
const value5 = (require(5103) /* metro dependency 5103: OnboardingHomeUtils */).useCanSeeOnboardingHome(guildId ?? EMPTY_STRING_SNOWFLAKE_ID);
|
||||
let binding = env0_3;
|
||||
const value6 = binding.useRef(null);
|
||||
const value7 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const MIDNIGHT = ThemeTypes.MIDNIGHT;
|
||||
const value8 = value7 === MIDNIGHT;
|
||||
env0_3 = value8;
|
||||
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
|
||||
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
|
||||
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
|
||||
[{location: 'StandaloneChannelScreen'}]).chatInputFloating;
|
||||
binding = env0_3;
|
||||
let useMemo = binding.useMemo;
|
||||
const value9 = Reflect.apply(useMemo, binding, [_fun113145, [frame, value8, chatInputFloating, styles.container,
|
||||
styles.midnightContainerBorder]]);
|
||||
binding = env0_3;
|
||||
useMemo = binding.useMemo;
|
||||
items = [frame, value8, chatInputFloating];
|
||||
items[3] = styles.contentContainer;
|
||||
items[4] = styles.splitDivider;
|
||||
items[5] = styles.midnightContentContainerBorder;
|
||||
const value10 = Reflect.apply(useMemo, binding, [_fun113146, items]);
|
||||
const value11 = (require(9722) /* metro dependency 9722: useIsForumChannelSearchActive */).useIsForumChannelSearchActive(channelId);
|
||||
const isChatLockedOpen = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatLockedOpen;
|
||||
const r12 = (isChatLockedOpen ? isNavigationScreen : !isChatLockedOpen) && !value11;
|
||||
if (channelId == null) {
|
||||
return (
|
||||
<View style={[value9, styles.containerEmpty]}>
|
||||
<EmptyState title={intl.string(t.ai6Lbr)} body={intl.string(t['LTr+x9'])} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (guildId == null) {
|
||||
return (
|
||||
<View style={[value9, styles.containerEmpty]}>
|
||||
<EmptyState title={intl.string(t.ai6Lbr)} body={intl.string(t['LTr+x9'])} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const header_113138 = <Header_113138 channelId={channelId} frame={frame} guildId={guildId} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} isMIDNIGHTTheme={value8} isChatInputFloating={chatInputFloating} showCreateThread={showCreateThread} isBackEnabled={r12} />;
|
||||
const ROLE_SUBSCRIPTIONS = StaticChannelRoute.ROLE_SUBSCRIPTIONS;
|
||||
if (channelId === ROLE_SUBSCRIPTIONS) {
|
||||
return (
|
||||
<View style={value9}>
|
||||
{header_113138}
|
||||
<View style={value10}>
|
||||
{((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}
|
||||
{((Component) => <Component guildId={guildId} gatedChannelId={needSubscriptionToAccess ? channelId : undefined} />)(importDefault(14960) /* metro dependency 14960: GuildRoleSubscriptionsOverview */)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (needSubscriptionToAccess) {
|
||||
return (
|
||||
<View style={value9}>
|
||||
{header_113138}
|
||||
<View style={value10}>
|
||||
{((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}
|
||||
{((Component) => <Component guildId={guildId} gatedChannelId={needSubscriptionToAccess ? channelId : undefined} />)(importDefault(14960) /* metro dependency 14960: GuildRoleSubscriptionsOverview */)}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const GUILD_HOME = StaticChannelRoute.GUILD_HOME;
|
||||
if (channelId === GUILD_HOME) {
|
||||
return (
|
||||
<View style={value9}>
|
||||
{header_113138}
|
||||
<View style={value10}>
|
||||
{value5 ? ((Component) => <Component guildId={guildId} />)(importDefault(14977) /* metro dependency 14977: GuildOnboardingHomePage */) : null}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const MEMBER_SAFETY = StaticChannelRoute.MEMBER_SAFETY;
|
||||
if (channelId === MEMBER_SAFETY) {
|
||||
return ((Component) => <Component guildId={guildId} />)(importDefault(14994) /* metro dependency 14994: StandaloneMembersView */);
|
||||
}
|
||||
if (showCreateThread) {
|
||||
return (
|
||||
<View style={value10}>
|
||||
{header_113138}
|
||||
{((CreateThreadView) => <CreateThreadView channelId={channelId} screenIndex={screenIndex} />)((require(15011) /* metro dependency 15011: CreateThreadView */).CreateThreadView)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const fragment = <>{header_113138}<View style={value10}>{((Component) => <Component guildId={guildId} channelId={channelId} chatInputRef={value6} screenIndex={screenIndex} />)(importDefault(11273) /* metro dependency 11273: ChatView */)}</View></>;
|
||||
return value3 ? ((Component) => <Component style={value9} channelId={channelId} screenIndex={screenIndex} isBackEnabled={r12}>{fragment}</Component>)(importDefault(15015) /* metro dependency 15015: SwipeForMemberListWrapper */) : <View style={value9} accessible={false} onAccessibilityEscape={onAccessibilityEscape_113147}>{fragment}</View>;
|
||||
}
|
||||
|
||||
function _fun113139() { // fn#113139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2045, offset: 0x023eaedf, size: 225 bytes, params: 1, frame: 6
|
||||
const frameBinding = frame;
|
||||
const value2 = undefined;
|
||||
return [styles.headerWrapper, env0_9, frameBinding != null ? styles.headerWithFadingFrame : value2,
|
||||
frame != null ? styles.splitDivider : value2, frame != null ? styles.splitDividerTop : value2,
|
||||
frame != null && isMIDNIGHTTheme ? isChatInputFloating ? value2 : styles.headerWithFadingFrameMidnight : value2,
|
||||
frame != null ? {marginTop: top, minHeight: MIN_HEADER_HEIGHT} : {paddingTop: top,
|
||||
minHeight: top + MIN_HEADER_HEIGHT}];
|
||||
}
|
||||
|
||||
function _fun113140() { // fn#113140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2424, offset: 0x023eafc0, size: 28 bytes, params: 1, frame: 9
|
||||
if (isNavigationScreen) {
|
||||
env0_6.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113141() { // fn#113141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2465, offset: 0x023eafdc, size: 33 bytes, params: 1, frame: 3
|
||||
var r0;
|
||||
var value;
|
||||
const value2 = guildId != null;
|
||||
if (value2) {
|
||||
guildIdBinding = guildId;
|
||||
value = environment.__proto__;
|
||||
value = guildIdBinding !== ME;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function Header_113138Action() { // fn#113142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2574, owner: Header_113138.action, offset: 0x023eaffd, size: 75 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).navigateToRootTab({'screen': 'guilds',
|
||||
'guildId': null, 'channelId': null, 'resetRoot': false, 'drawerOpen': false, guildId: guildId,
|
||||
channelId: channelId});
|
||||
}
|
||||
|
||||
function Header_113138Children(a0) { // fn#113143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:2762, owner: Header_113138.children, offset: 0x023eb048, size: 103 bytes, params: 2, frame: 16
|
||||
const ref = a0.ref;
|
||||
const value = Object.create(null);
|
||||
value.ref = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, ref);
|
||||
const PressableNavigatorBackIcon = (require(9605) /* metro dependency 9605: PressableNavigatorBackIcon */).PressableNavigatorBackIcon;
|
||||
return (
|
||||
<PressableNavigatorBackIcon
|
||||
ref={ref}
|
||||
{...value2}
|
||||
{...{['onPress']: env0_10}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun113145() { // fn#113145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:3727, offset: 0x023eb616, size: 69 bytes, params: 1, frame: 5
|
||||
const frameBinding = frame;
|
||||
const value2 = undefined;
|
||||
return [styles.container,
|
||||
frameBinding == null && env0_3 ? chatInputFloating ? value2 : styles.midnightContainerBorder : value2];
|
||||
}
|
||||
|
||||
function _fun113146() { // fn#113146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:3854, offset: 0x023eb65b, size: 97 bytes, params: 1, frame: 6
|
||||
const frameBinding = frame;
|
||||
const value2 = undefined;
|
||||
return [styles.contentContainer, frameBinding != null ? styles.splitDivider : value2,
|
||||
frame != null && env0_3 ? chatInputFloating ? value2 : styles.midnightContentContainerBorder : value2];
|
||||
}
|
||||
|
||||
function StandaloneChannelScreenOnAccessibilityEscape() { // fn#113147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15156:5149, owner: StandaloneChannelScreen.onAccessibilityEscape, offset: 0x023eb6bc, size: 28 bytes, params: 1, frame: 9
|
||||
if (env0_5) {
|
||||
env0_2.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,477 @@
|
||||
/* Metro module 15015; source: modules/main_tabs_v2/native/channel/SwipeForMemberListWrapper.tsx; dependencies: [57, 31, 27, 9613, 9604, 661, 33, 3, 4501, 697, 4863, 14368, 4010, 4017, 4594, 4048, 5459, 4015, 11335, 1239, 14364, 8621, 12080, 4008, 4007, 4571, 1485, 14958, 5321, 14954, 7704, 6517, 15016, 2] */
|
||||
function _fun113500(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6, offset: 0x023fc99b, size: 669 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_6 = value2.View;
|
||||
const channelDetailsStoreModule = require(9613) /* metro dependency 9613: ChannelDetailsStore */;
|
||||
const env0_7 = channelDetailsStoreModule.getIsChannelDetailsSearchActive;
|
||||
const env0_8 = channelDetailsStoreModule.setIsChannelDetailsSearchActive;
|
||||
const MIDNIGHT_BORDER_WIDTH = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).MIDNIGHT_BORDER_WIDTH;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = constantsModule.AnalyticEvents;
|
||||
const env0_11 = constantsModule.ComponentActions;
|
||||
const env0_12 = constantsModule.ThemeTypes;
|
||||
const value5 = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value5.jsx;
|
||||
const env0_14 = value5.jsxs;
|
||||
const value8 = new (importDefault(3) /* metro dependency 3: Logger */)('SwipeForMemberListWrapper');
|
||||
value = value.createContext(undefined);
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.memberListPreview = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'flex-start',
|
||||
'overflow': 'hidden', backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
|
||||
object4['overflow'] = 'hidden';
|
||||
object2.content = object4;
|
||||
const MODAL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MODAL_BACKGROUND;
|
||||
object2.memberListContainer = {'flex': 1, 'overflow': 'hidden', backgroundColor: MODAL_BACKGROUND};
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object2.midnightBorder = {borderLeftColor: BORDER_STRONG, borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
|
||||
object2.midnightRightOverflow = {right: -MIDNIGHT_BORDER_WIDTH};
|
||||
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
object2 = {code: 'function SwipeForMemberListWrapperTsx1(){const{shownPixels}=this.__closure;return shownPixels.get()>0;}'};
|
||||
object2 = {code: 'function SwipeForMemberListWrapperTsx2(isVisible,wasVisible){const{mainDisallowGesture,stackDisallowGesture,panelDisallowGesture}=this.__closure;var _stackDisallowGesture;if(isVisible===wasVisible)return;mainDisallowGesture.set(isVisible);(_stackDisallowGesture=stackDisallowGesture)===null||_stackDisallowGesture===void 0||_stackDisallowGesture.set(isVisible);if(!isVisible){panelDisallowGesture.set(false);}}'};
|
||||
object2 = {code: 'function SwipeForMemberListWrapperTsx3(){const{isChatLockedOpen,mainTranslateX,stackTranslateX}=this.__closure;return!isChatLockedOpen&&mainTranslateX.get()>0||stackTranslateX!=null&&stackTranslateX.get()>0;}'};
|
||||
object2 = {code: 'function SwipeForMemberListWrapperTsx4(isInactive,wasInactive){const{panelDisallowGesture}=this.__closure;if(isInactive===wasInactive)return;panelDisallowGesture.set(isInactive);}'};
|
||||
object2 = {code: 'function SwipeForMemberListWrapperTsx5(){const{maxWidth,translateX}=this.__closure;return maxWidth-translateX.get();}'};
|
||||
object2 = {code: 'function SwipeForMemberListWrapperTsx6(){const{theme,ThemeTypes,isChatBesideChannelList,translateX,MIDNIGHT_BORDER_WIDTH}=this.__closure;if(theme!==ThemeTypes.MIDNIGHT||isChatBesideChannelList)return translateX.get();return translateX.get()-MIDNIGHT_BORDER_WIDTH;}'};
|
||||
object2 = {code: "function SwipeForMemberListWrapperTsx7(){const{shownPixels,PEEK_PIXEL_THRESHOLD}=this.__closure;const exceedsPeekThreshold=shownPixels.get()>PEEK_PIXEL_THRESHOLD*2;return{display:exceedsPeekThreshold?'none':'flex',opacity:exceedsPeekThreshold?0:1-shownPixels.get()/PEEK_PIXEL_THRESHOLD};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/SwipeForMemberListWrapper.tsx');
|
||||
exports.default = _default_113501;
|
||||
exports.SwipeForMemberListContext = value;
|
||||
}
|
||||
|
||||
function _default_113501({channelId, screenIndex, isBackEnabled, children, style}) { // fn#113501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2526, offset: 0x023fcc38, size: 1632 bytes, params: 2, frame: 42
|
||||
const styles = useStyles();
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const env0_3 = value3;
|
||||
const isChatBesideChannelList = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatBesideChannelList;
|
||||
const binding = isChatBesideChannelList;
|
||||
const [property, env0_5] = env0_3(binding.useState(channelId), 2);
|
||||
binding.useEffect(_fun113502, [channelId]);
|
||||
let closure = _fun113505;
|
||||
const value6 = binding.useCallback(closure, []);
|
||||
const value7 = (importDefault(11335) /* metro dependency 11335: useChatWidth */)(screenIndex);
|
||||
const {gesture, panelGestureContext, isDragging, translateX, movePanel,
|
||||
maxWidth} = (importDefault(14364) /* metro dependency 14364: useMainTabsPanelsGesture */)({'canDrag': true,
|
||||
'onDragStart': null, 'onPreMovement': null, 'startShown': false, 'cancelOnSwipeRightFromStart': true,
|
||||
onDragStart: value6, onPreMovement: binding.useCallback(_fun113507, [channelId, screenIndex]),
|
||||
openWidth: binding.useMemo(_fun113506, [value3, value7])});
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
closure = function() {
|
||||
return maxWidth - translateX.get();
|
||||
};
|
||||
closure.__closure = {maxWidth: maxWidth, translateX: translateX};
|
||||
closure.__workletHash = 10842481670591;
|
||||
closure.__initData = env0_22;
|
||||
const value11 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
const value12 = (require(8621) /* metro dependency 8621: useStateFromSharedValue */).useDerivedStateFromSharedValue(value11,
|
||||
function(a0) {
|
||||
return a0 > 0;
|
||||
});
|
||||
binding.useEffect(_fun113510, [value12, channelId, screenIndex]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
useDerivedValue = moduleValue3.useDerivedValue;
|
||||
closure = _default_113501Te;
|
||||
closure.__closure = {theme: value3, ThemeTypes: ThemeTypes, isChatBesideChannelList: isChatBesideChannelList,
|
||||
translateX: translateX, MIDNIGHT_BORDER_WIDTH: MIDNIGHT_BORDER_WIDTH};
|
||||
closure.__workletHash = 5498466465211;
|
||||
closure.__initData = env0_23;
|
||||
const value13 = Reflect.apply(useDerivedValue, moduleValue3, [closure]);
|
||||
const value14 = binding.useCallback(_fun113512, [channelId, screenIndex, movePanel]);
|
||||
const value15 = binding.useCallback(function() {
|
||||
movePanel(false, false, 0, true);
|
||||
}, [movePanel]);
|
||||
binding.useEffect(_fun113514, [value15]);
|
||||
binding.useEffect(_fun113517, [value14, value15]);
|
||||
const value16 = binding.useCallback(_fun113519, [value11, value15, channelId]);
|
||||
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(value16, value12);
|
||||
binding.useEffect(_fun113520, [channelId, screenIndex, value15]);
|
||||
const env0_15 = (require(1485) /* metro dependency 1485 */).useNavigation();
|
||||
useAnalyticsEffect(channelId, screenIndex, isDragging, value12);
|
||||
const value17 = useGestureCompositionEffect(gesture, value11, panelGestureContext);
|
||||
const value18 = binding.useMemo(_fun113531, [panelGestureContext, channelId, screenIndex, value12]);
|
||||
const value19 = (require(14958) /* metro dependency 14958: useMainTabsChannelScreenStyles */).useMainTabsChannelScreenStyles(isDragging,
|
||||
value13, maxWidth);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
const useAnimatedStyle = moduleValue6.useAnimatedStyle;
|
||||
closure = _default_113501Le;
|
||||
closure.__closure = {shownPixels: value11, PEEK_PIXEL_THRESHOLD: 150};
|
||||
closure.__workletHash = 9468759128012;
|
||||
closure.__initData = env0_24;
|
||||
const value20 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
|
||||
const Provider = env0_16.Provider;
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
const object = {style: style, onAccessibilityEscape: onAccessibilityEscape_113533};
|
||||
const viewBindingProps = {style: styles.content};
|
||||
const value21 = !value12;
|
||||
viewBindingProps.accessibilityElementsHidden = value12 ? !value21 : undefined;
|
||||
viewBindingProps.importantForAccessibility = value12 ? 'no-hide-descendants' : undefined;
|
||||
const MainTabsContentScrim = (require(14954) /* metro dependency 14954: MainTabsContentScrim */).MainTabsContentScrim;
|
||||
const view = <View {...viewBindingProps}>{children}<MainTabsContentScrim translateX={value13} maxWidth={maxWidth} /></View>;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [value19];
|
||||
items3[1] = styles.memberListContainer;
|
||||
const MIDNIGHT = ThemeTypes.MIDNIGHT;
|
||||
items3[2] = value3 !== MIDNIGHT ? undefined : styles.midnightBorder;
|
||||
items3[3] = isChatBesideChannelList || value3 !== ThemeTypes.MIDNIGHT ? undefined : styles.midnightRightOverflow;
|
||||
const items4 = [((Component) => <Component absolute withOverlay overlayOpacity={0.5} />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)];
|
||||
const LayerScope = (require(6517) /* metro dependency 6517: LayerScopeNative */).LayerScope;
|
||||
items4[1] = <LayerScope>{((Component) => <Component isShowing={value12} channelId={property} isSearchLocked={false} onBackPress={value16} componentWidth={value7} onChannelDeleted={value15} />)(importDefault(15016) /* metro dependency 15016: ChannelDetails */)}</LayerScope>;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items4[2] = <View3 style={[StyleSheet.absoluteFill, value20]}><View style={styles.memberListPreview} /></View3>;
|
||||
return (
|
||||
<Provider value={value18}>
|
||||
<GestureDetector gesture={value17}>
|
||||
<View {...object}>
|
||||
{view}
|
||||
<View2
|
||||
style={items3}
|
||||
accessibilityElementsHidden={value12 ? undefined : value21}
|
||||
importantForAccessibility={value12 ? undefined : 'no-hide-descendants'}
|
||||
>
|
||||
{items4}
|
||||
</View2>
|
||||
</View>
|
||||
</GestureDetector>
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun113502() { // fn#113502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2705, offset: 0x023fd298, size: 62 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const env0_0 = (require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(_fun113503,
|
||||
200);
|
||||
return _fun113504;
|
||||
}
|
||||
|
||||
function _fun113505() { // fn#113505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2817, offset: 0x023fd2ea, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
|
||||
}
|
||||
|
||||
function _fun113506() { // fn#113506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2882, offset: 0x023fd30f, size: 44 bytes, params: 1, frame: 4
|
||||
const binding = env0_3;
|
||||
const MIDNIGHT = ThemeTypes.MIDNIGHT;
|
||||
return binding === MIDNIGHT ? env0_6 + MIDNIGHT_BORDER_WIDTH : env0_6;
|
||||
}
|
||||
|
||||
function _fun113507(a0) { // fn#113507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2932, offset: 0x023fd33b, size: 101 bytes, params: 2, frame: 17
|
||||
var value;
|
||||
var setIsChannelDetailsSearchActiveBinding;
|
||||
var channelIdBinding;
|
||||
var ComponentDispatch;
|
||||
if (!a0) {
|
||||
value = environment.__proto__;
|
||||
setIsChannelDetailsSearchActiveBinding = setIsChannelDetailsSearchActive;
|
||||
channelIdBinding = channelId;
|
||||
setIsChannelDetailsSearchActiveBinding(channelIdBinding, false, 'initial');
|
||||
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
ComponentDispatch.dispatch(ComponentActions.CHANNEL_DETAILS_HIDDEN, {channelId: channelIdBinding,
|
||||
screenIndex: screenIndex});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113510() { // fn#113510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:3462, offset: 0x023fd3ba, size: 85 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
var ComponentDispatch;
|
||||
if (env0_12) {
|
||||
value2 = environment.__proto__;
|
||||
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
ComponentDispatch.dispatch(ComponentActions.CHANNEL_DETAILS_SHOWN, {channelId: channelId,
|
||||
screenIndex: screenIndex});
|
||||
}
|
||||
}
|
||||
|
||||
function _default_113501Te() { // fn#113511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:3612, owner: _default_113501.te, offset: 0x023fd40f, size: 69 bytes, params: 1, frame: 11
|
||||
var r0;
|
||||
var value;
|
||||
const binding = env0_3;
|
||||
const MIDNIGHT = ThemeTypes.MIDNIGHT;
|
||||
if (binding !== MIDNIGHT) {
|
||||
r0 = translateX.get();
|
||||
} else if (isChatBesideChannelList) {
|
||||
r0 = translateX.get();
|
||||
} else {
|
||||
value = translateX.get();
|
||||
value -= MIDNIGHT_BORDER_WIDTH;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun113512(a0) { // fn#113512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:3834, offset: 0x023fd454, size: 128 bytes, params: 2, frame: 17
|
||||
var value4;
|
||||
if (a0.channelId === channelId && a0.screenIndex === screenIndex) {
|
||||
value4 = environment.__proto__;
|
||||
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
|
||||
if (a0.search === true) {
|
||||
setIsChannelDetailsSearchActive(a0.channelId, true, 'initial');
|
||||
}
|
||||
movePanel(true, false, 0, true);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113514() { // fn#113514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4028, offset: 0x023fd4ed, size: 58 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const env0_0 = (importDefault(12080) /* metro dependency 12080: RouteManager */).addRouteChangeListener(_fun113515);
|
||||
return _fun113516;
|
||||
}
|
||||
|
||||
function _fun113517() { // fn#113517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4122, offset: 0x023fd536, size: 108 bytes, params: 1, frame: 19
|
||||
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
let subscribe = ComponentDispatch.subscribe;
|
||||
const SHOW_CHANNEL_DETAILS = ComponentActions.SHOW_CHANNEL_DETAILS;
|
||||
Reflect.apply(subscribe, ComponentDispatch, [SHOW_CHANNEL_DETAILS, env0_13]);
|
||||
subscribe = ComponentDispatch.subscribe;
|
||||
const HIDE_CHANNEL_DETAILS = ComponentActions.HIDE_CHANNEL_DETAILS;
|
||||
Reflect.apply(subscribe, ComponentDispatch, [HIDE_CHANNEL_DETAILS, env0_14]);
|
||||
return _fun113518;
|
||||
}
|
||||
|
||||
function _fun113519() { // fn#113519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4426, offset: 0x023fd605, size: 525 bytes, params: 1, frame: 23
|
||||
var verbose;
|
||||
var object2;
|
||||
var value10;
|
||||
let binding = env0_11;
|
||||
if (binding.get() <= 0) {
|
||||
value10 = environment.__proto__;
|
||||
binding = env1_15;
|
||||
verbose = binding.verbose;
|
||||
object2 = {};
|
||||
object2.shownPixels = env0_11.get();
|
||||
Reflect.apply(verbose, binding, ['handleBackPress', 'shownPixels <= 0', object2]);
|
||||
return false;
|
||||
}
|
||||
const value4 = undefined;
|
||||
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
const r7 = rootNavigationRef == null ? value4 : rootNavigationRef.getCurrentRoute();
|
||||
const useChatLayoutModule = require(4010) /* metro dependency 4010: useChatLayout */;
|
||||
const getChatLayout = useChatLayoutModule.getChatLayout;
|
||||
const isChatLockedOpen = Reflect.apply(getChatLayout, useChatLayoutModule, []).isChatLockedOpen;
|
||||
const value7 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(r7);
|
||||
let r1 = value7 == null && isChatLockedOpen;
|
||||
const r10 = r1 ? (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(r7) : value7;
|
||||
binding = env1_15;
|
||||
verbose = binding.verbose;
|
||||
let params = r10 == null ? value4 : r10.params;
|
||||
Reflect.apply(verbose, binding, ['handleBackPress', {route: r10, channelId: channelId, currentRoute: r7,
|
||||
isChatLockedOpen: isChatLockedOpen, routeParams: params}]);
|
||||
if (r10 == null) {
|
||||
binding = env1_15;
|
||||
binding.verbose('handleBackPress', 'route is null', {currentRoute: r7, isChatLockedOpen: isChatLockedOpen});
|
||||
r1 = false;
|
||||
} else {
|
||||
params = r10.params;
|
||||
if ((params == null ? value4 : params.channelId) !== channelId) {
|
||||
binding = env1_15;
|
||||
verbose = binding.verbose;
|
||||
params = r10.params;
|
||||
Reflect.apply(verbose, binding, ['handleBackPress', 'route channelId mismatch',
|
||||
{routeChannelId: params == null ? value4 : params.channelId, expectedChannelId: channelId}]);
|
||||
r1 = false;
|
||||
} else if (getIsChannelDetailsSearchActive(channelId)) {
|
||||
env1_15.verbose('handleBackPress', 'cancelling search before closing panel');
|
||||
setIsChannelDetailsSearchActive(channelId, false, 'initial');
|
||||
r1 = true;
|
||||
} else {
|
||||
env0_14();
|
||||
r1 = true;
|
||||
}
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function useAnalyticsEffect(a0, a1, a2, a3) { // fn#113521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5345, owner: _default_113501.useAnalyticsEffect, offset: 0x023fd812, size: 113 bytes, params: 5, frame: 18
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const env0_3 = a3;
|
||||
const binding = env1_4;
|
||||
binding.useEffect(_fun113522, [a0, a1, a3]);
|
||||
binding.useEffect(_fun113523, [a3, a0, a1, a2]);
|
||||
}
|
||||
|
||||
function useGestureCompositionEffect(a0, a1, {disallowGesture}) { // fn#113524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5679, owner: _default_113501.useGestureCompositionEffect, offset: 0x023fd94f, size: 532 bytes, params: 4, frame: 27
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_4;
|
||||
let useContext = binding.useContext;
|
||||
const {gesture, disallowGesture, translateX} = Reflect.apply(useContext, binding,
|
||||
[importDefault(14368) /* metro dependency 14368: MainTabsNavigatorPanelContext */]);
|
||||
useContext = binding.useContext;
|
||||
const MainTabsChannelScreenStackContext = (require(14368) /* metro dependency 14368: MainTabsNavigatorPanelContext */).MainTabsChannelScreenStackContext;
|
||||
const r2 = Reflect.apply(useContext, binding, [MainTabsChannelScreenStackContext]) ?? ({});
|
||||
const gesture2 = r2.gesture;
|
||||
const disallowGesture2 = r2.disallowGesture;
|
||||
const translateX2 = r2.translateX;
|
||||
const isChatLockedOpen = (importDefault(4010) /* metro dependency 4010: useChatLayout */)().isChatLockedOpen;
|
||||
const value4 = env1_4.useMemo(_fun113525, [a0, gesture, gesture2]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
let closure = useGestureCompositionEffectU;
|
||||
closure.__closure = {shownPixels: a1};
|
||||
closure.__workletHash = 15116046915956;
|
||||
closure.__initData = env1_18;
|
||||
const closure2 = useGestureCompositionEffectC;
|
||||
closure2.__closure = {mainDisallowGesture: disallowGesture, stackDisallowGesture: disallowGesture2,
|
||||
panelDisallowGesture: disallowGesture};
|
||||
closure2.__workletHash = 13681610289748;
|
||||
closure2.__initData = env1_19;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
useAnimatedReaction = moduleValue2.useAnimatedReaction;
|
||||
closure = useGestureCompositionEffect_;
|
||||
closure.__closure = {isChatLockedOpen: isChatLockedOpen, mainTranslateX: translateX, stackTranslateX: translateX2};
|
||||
closure.__workletHash = 11938850302839;
|
||||
closure.__initData = env1_20;
|
||||
const closure3 = useGestureCompositionEffectH;
|
||||
closure3.__closure = {panelDisallowGesture: disallowGesture};
|
||||
closure3.__workletHash = 3362957347102;
|
||||
closure3.__initData = env1_21;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue2, [closure, closure3]);
|
||||
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(function() {
|
||||
disallowGesture.set(false);
|
||||
disallowGesture.set(false);
|
||||
if (disallowGesture != null) {
|
||||
disallowGesture.set(false);
|
||||
}
|
||||
});
|
||||
return value4;
|
||||
}
|
||||
|
||||
function _fun113531() { // fn#113531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6851, offset: 0x023fdca5, size: 59 bytes, params: 1, frame: 13
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, panelGestureContext, undefined);
|
||||
object2['channelId'] = channelId;
|
||||
object2['screenIndex'] = screenIndex;
|
||||
object2['isPanelActive'] = env0_12;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _default_113501Le() { // fn#113532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:7005, owner: _default_113501.le, offset: 0x023fdce0, size: 82 bytes, params: 1, frame: 12
|
||||
var value;
|
||||
const value3 = env0_11.get() > 300;
|
||||
const object2 = {};
|
||||
let r1 = value3 ? 'none' : 'flex';
|
||||
object2.display = r1;
|
||||
if (value3) {
|
||||
r1 = 0;
|
||||
} else {
|
||||
value = env0_11.get();
|
||||
value = 1 - value / 150;
|
||||
r1 = value;
|
||||
}
|
||||
object2.opacity = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _default_113501OnAccessibilityEscape() { // fn#113533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:7319, owner: _default_113501.onAccessibilityEscape, offset: 0x023fdd32, size: 28 bytes, params: 1, frame: 9
|
||||
if (isBackEnabled) {
|
||||
env0_15.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113503() { // fn#113503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:2747, offset: 0x023fd2d6, size: 20 bytes, params: 1, frame: 11
|
||||
env1_5(channelId);
|
||||
}
|
||||
|
||||
function _fun113518() { // fn#113518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:4255, offset: 0x023fd5a2, size: 99 bytes, params: 1, frame: 19
|
||||
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
let unsubscribe = ComponentDispatch.unsubscribe;
|
||||
const SHOW_CHANNEL_DETAILS = ComponentActions.SHOW_CHANNEL_DETAILS;
|
||||
Reflect.apply(unsubscribe, ComponentDispatch, [SHOW_CHANNEL_DETAILS, env1_13]);
|
||||
unsubscribe = ComponentDispatch.unsubscribe;
|
||||
const HIDE_CHANNEL_DETAILS = ComponentActions.HIDE_CHANNEL_DETAILS;
|
||||
Reflect.apply(unsubscribe, ComponentDispatch, [HIDE_CHANNEL_DETAILS, env1_14]);
|
||||
}
|
||||
|
||||
function _fun113522() { // fn#113522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5395, offset: 0x023fd883, size: 95 bytes, params: 1, frame: 17
|
||||
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = defaultImport.trackWithMetadata;
|
||||
const MEMBER_LIST_SWIPE_TOGGLED = AnalyticEvents.MEMBER_LIST_SWIPE_TOGGLED;
|
||||
const object2 = {};
|
||||
object2.channel_id = env0_0;
|
||||
const String = global.String;
|
||||
object2.screen_index = String(require);
|
||||
object2.member_list_open = importAll;
|
||||
Reflect.apply(trackWithMetadata, defaultImport, [MEMBER_LIST_SWIPE_TOGGLED, object2]);
|
||||
}
|
||||
|
||||
function _fun113523() { // fn#113523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5537, offset: 0x023fd8e2, size: 109 bytes, params: 1, frame: 16
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var trackWithMetadata;
|
||||
var MEMBER_LIST_SWIPE_PEEK;
|
||||
var object2;
|
||||
if (importAll && importDefault.get()) {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
trackWithMetadata = defaultImport.trackWithMetadata;
|
||||
MEMBER_LIST_SWIPE_PEEK = AnalyticEvents.MEMBER_LIST_SWIPE_PEEK;
|
||||
object2 = {channel_id: env0_0};
|
||||
object2.screen_index = global.String(require);
|
||||
Reflect.apply(trackWithMetadata, defaultImport, [MEMBER_LIST_SWIPE_PEEK, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113525() { // fn#113525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:5993, offset: 0x023fdb63, size: 60 bytes, params: 1, frame: 14
|
||||
return gesture == null ? env0_0.simultaneousWithExternalGesture(gesture) : env0_0.simultaneousWithExternalGesture(gesture,
|
||||
gesture);
|
||||
}
|
||||
|
||||
function useGestureCompositionEffectU() { // fn#113526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6131, owner: _default_113501.useGestureCompositionEffect.u, offset: 0x023fdb9f, size: 24 bytes, params: 1, frame: 9
|
||||
return require.get() > 0;
|
||||
}
|
||||
|
||||
function useGestureCompositionEffectC(a0, a1) { // fn#113527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6239, owner: _default_113501.useGestureCompositionEffect.c, offset: 0x023fdbb7, size: 74 bytes, params: 3, frame: 12
|
||||
if (a0 !== a1) {
|
||||
disallowGesture.set(a0);
|
||||
if (disallowGesture != null) {
|
||||
disallowGesture.set(a0);
|
||||
}
|
||||
if (!a0) {
|
||||
disallowGesture.set(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function useGestureCompositionEffect_() { // fn#113528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6466, owner: _default_113501.useGestureCompositionEffect._, offset: 0x023fdc01, size: 72 bytes, params: 1, frame: 11
|
||||
var r1;
|
||||
var value5;
|
||||
var value;
|
||||
let r0 = !isChatLockedOpen && translateX.get() > 0;
|
||||
if (!r0) {
|
||||
value5 = translateX != null;
|
||||
if (value5) {
|
||||
value = translateX.get();
|
||||
value = value > 0;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value5;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useGestureCompositionEffectH(a0, a1) { // fn#113529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15212:6637, owner: _default_113501.useGestureCompositionEffect.h, offset: 0x023fdc49, size: 31 bytes, params: 3, frame: 11
|
||||
if (a0 !== a1) {
|
||||
disallowGesture.set(a0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/* Metro module 9709; source: modules/main_tabs_v2/native/channel/header/ChannelHeader.tsx; dependencies: [31, 1379, 661, 1386, 33, 477, 4015, 9690, 1239, 4008, 632, 5072, 9710, 9712, 9714, 9721, 1244, 9723, 2] */
|
||||
function _fun76307(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9895:6, offset: 0x01dc9d7f, size: 211 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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
|
||||
const env0_5 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/ChannelHeader.tsx');
|
||||
exports.default = ChannelHeader;
|
||||
exports.navigateToChannelDetails = navigateToChannelDetails;
|
||||
}
|
||||
|
||||
function ChannelHeader({channelId, screenIndex, isNavigationScreen, pressable, isGuildMemberCountVisible, showCreateThread}) { // fn#76308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9895:289, offset: 0x01dc9e52, size: 575 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
var defaultImport2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let value = undefined;
|
||||
pressable = pressable === value || pressable;
|
||||
isGuildMemberCountVisible = isGuildMemberCountVisible === value || isGuildMemberCountVisible;
|
||||
showCreateThread = !(showCreateThread === value) && showCreateThread;
|
||||
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
|
||||
function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
const r7 = !(require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel) && pressable;
|
||||
const ROLE_SUBSCRIPTIONS = StaticChannelRoute.ROLE_SUBSCRIPTIONS;
|
||||
if (channelId === ROLE_SUBSCRIPTIONS) {
|
||||
r0 = ((Component) => <Component />)(importDefault(9710) /* metro dependency 9710: GuildRoleSubscriptionsChannelHeader */);
|
||||
} else if (channelId === StaticChannelRoute.GUILD_HOME) {
|
||||
r0 = ((Component) => <Component />)(importDefault(9712) /* metro dependency 9712: HomeChannelHeader */);
|
||||
} else if (channel == null) {
|
||||
if (channel == null) {
|
||||
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9723) /* metro dependency 9723: GuildChannelHeader */);
|
||||
r0 = value;
|
||||
} else if (channel.isForumLikeChannel()) {
|
||||
defaultImport2 = importDefault(9721) /* metro dependency 9721: ForumChannelHeader */;
|
||||
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} searchPlaceholder={channel.isForumChannel() ? value : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['L9fR+P'])} />)(defaultImport2);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9723) /* metro dependency 9723: GuildChannelHeader */);
|
||||
r0 = value;
|
||||
}
|
||||
} else if (channel.isPrivate()) {
|
||||
r0 = ((Component) => <Component channelId={channelId} pressable={r7} screenIndex={screenIndex} />)(importDefault(9714) /* metro dependency 9714: PrivateChannelHeader */);
|
||||
} else if (channel == null) {
|
||||
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9723) /* metro dependency 9723: GuildChannelHeader */);
|
||||
r0 = value;
|
||||
} else if (channel.isForumLikeChannel()) {
|
||||
defaultImport2 = importDefault(9721) /* metro dependency 9721: ForumChannelHeader */;
|
||||
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} searchPlaceholder={channel.isForumChannel() ? value : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['L9fR+P'])} />)(defaultImport2);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = ((Component) => <Component channelId={channelId} guildId={channel == null ? value : channel.guild_id} pressable={r7} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} showCreateThread={showCreateThread} />)(importDefault(9723) /* metro dependency 9723: GuildChannelHeader */);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function navigateToChannelDetails(a0, a1, a2) { // fn#76310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9895:1124, offset: 0x01dca091, size: 266 bytes, params: 4, frame: 20
|
||||
var chatInputRef;
|
||||
var ComponentDispatch;
|
||||
var value;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
chatInputRef = (require(4015) /* metro dependency 4015: ChatInputUtils */).getChatInputRef(a0, a1);
|
||||
if (chatInputRef != null) {
|
||||
chatInputRef.blur();
|
||||
}
|
||||
}
|
||||
if ((require(9690) /* metro dependency 9690: SwipeToMemberListUtils */).isSwipeToMemberListEnabled()) {
|
||||
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
ComponentDispatch.dispatch(ComponentActions.SHOW_CHANNEL_DETAILS, {source: a2, channelId: a0, screenIndex: a1});
|
||||
} else {
|
||||
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
|
||||
value = value.getRootNavigationRef();
|
||||
if (value != null && value.isReady()) {
|
||||
value.navigate('sidebar', {channelId: a0, source: a2});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,308 @@
|
||||
/* Metro module 9717; source: modules/main_tabs_v2/native/channel/header/ChannelHeaderShared.tsx; dependencies: [57, 31, 27, 3793, 1878, 9604, 33, 4501, 697, 1357, 5278, 477, 8696, 4573, 1305, 9718, 9719, 6647, 9720, 1244, 4805, 2] */
|
||||
function _fun76344(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:6, offset: 0x01dcb930, size: 483 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = renderChannelIconRaw;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_8 = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).getMinHeaderHeight;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const env0_11 = value.Fragment;
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun76356);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/ChannelHeaderShared.tsx');
|
||||
exports.renderTitleWrapper = renderTitleWrapper;
|
||||
exports.renderChannelTitle = renderChannelTitle;
|
||||
exports.renderGroupDMIcon = renderGroupDMIcon;
|
||||
exports.renderUserAvatar = renderUserAvatar;
|
||||
exports.renderChannelIconRaw = closure;
|
||||
exports.renderChannelIcon = renderChannelIcon;
|
||||
exports.renderMemberCountText = renderMemberCountText;
|
||||
exports.renderParentChannelSubTitle = renderParentChannelSubTitle;
|
||||
exports.renderEmptyIcon = renderEmptyIcon;
|
||||
}
|
||||
|
||||
function TitleWrapper({children, onPress, headerAccessibilityLabel, titleContentHeight}) { // fn#76345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:971, offset: 0x01dcbb13, size: 337 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
var PressableOpacity;
|
||||
var value;
|
||||
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared'));
|
||||
let binding = env0_4;
|
||||
const [property, env0_1] = env0_3(binding.useState(undefined), 2);
|
||||
const value6 = env0_4.useCallback(_fun76346, []);
|
||||
binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
if (onPress == null) {
|
||||
r0 = <View style={styles.wrapper} accessibilityRole="header">{children}</View>;
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = <PressableOpacity onLayout={value.isAndroid() ? value6 : undefined} onPress={onPress} androidRippleConfig={property} accessibilityRole="header" accessibilityLabel={headerAccessibilityLabel} hitSlop={Reflect.apply(useMemo,
|
||||
|
||||
binding, [_fun76347, [titleContentHeight]])} style={styles.wrapper}>{children}</PressableOpacity>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ChannelTitle({title, accessibleTitle, subtitle, disableArrow, userId, guildId, icon}) { // fn#76348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:1610, offset: 0x01dcbceb, size: 550 bytes, params: 2, frame: 32
|
||||
disableArrow = !(disableArrow === undefined) && disableArrow;
|
||||
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelTitle');
|
||||
const styles = useStyles(value2);
|
||||
const items2 = [value2 && icon != null ? icon : null];
|
||||
items2[1] = userId != null ? ((Component) => <Component userId={userId} guildId={guildId} userName={title} variant={value2 ? 'redesign/heading-18/semibold' : 'heading-lg/bold'} defaultColor="mobile-text-heading-primary" lineClamp={1} style={styles.channelName} accessibilityLabel={accessibleTitle} accessibilityRole="header" maxFontSizeMultiplier={2} />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */) : ((Text) => <Text variant={value2 ? 'redesign/heading-18/semibold' : 'heading-lg/bold'} color="mobile-text-heading-primary" lineClamp={1} style={styles.channelName} accessibilityLabel={accessibleTitle} accessibilityRole="header" maxFontSizeMultiplier={2}>{title}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
items2[2] = !disableArrow && ((Icon) => <Icon source={importDefault(9718) /* metro dependency 9718 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} style={styles.arrowIcon} />)((require(1305) /* metro dependency 1305: native */).Icon);
|
||||
return (
|
||||
<View style={styles.channelContent}>
|
||||
<View style={styles.nameWithArrow}>
|
||||
{items2}
|
||||
</View>
|
||||
{subtitle != null && <View style={styles.subTitleContainer}>{subtitle}</View>}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GroupDMIcon({channel}) { // fn#76349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:2498, offset: 0x01dcbf11, size: 125 bytes, params: 2, frame: 18
|
||||
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared'));
|
||||
const GroupDMAvatar = importDefault(9719) /* metro dependency 9719: GroupDMAvatar */;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
|
||||
return (
|
||||
<GroupDMAvatar
|
||||
size={REFRESH_MEDIUM_32}
|
||||
channel={channel}
|
||||
style={styles.channelIcon}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function UserAvatar({user, status, isMobileOnline, isVROnline}) { // fn#76350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:2671, offset: 0x01dcbf8e, size: 199 bytes, params: 2, frame: 22
|
||||
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared'));
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const avatarDecoration = user.avatarDecoration;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
|
||||
return (
|
||||
<Avatar
|
||||
user={user}
|
||||
avatarDecoration={avatarDecoration}
|
||||
guildId={undefined}
|
||||
size={REFRESH_MEDIUM_32}
|
||||
status={user.isSystemUser() ? null : status}
|
||||
isMobileOnline={isMobileOnline}
|
||||
isVROnline={isVROnline}
|
||||
style={styles.channelIcon}
|
||||
autoStatusCutout
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function renderChannelIconRaw(a0, a1) { // fn#76351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3015, offset: 0x01dcc055, size: 37 bytes, params: 3, frame: 13
|
||||
return <ChannelIconRaw icon={a0} IconComponent={a1} />;
|
||||
}
|
||||
|
||||
function ChannelIconRaw({icon, IconComponent}) { // fn#76352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3100, offset: 0x01dcc07a, size: 223 bytes, params: 2, frame: 21
|
||||
var r5;
|
||||
var r0;
|
||||
var object2;
|
||||
var value;
|
||||
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared');
|
||||
const styles = useStyles(value3);
|
||||
if (IconComponent != null) {
|
||||
object2 = {};
|
||||
value = 'md';
|
||||
r5 = value3 ? 'xs' : value;
|
||||
object2.size = r5;
|
||||
value = 'text-strong';
|
||||
r5 = value3 ? 'icon-strong' : value;
|
||||
object2.color = r5;
|
||||
r5 = value3 ? {marginEnd: 4} : undefined;
|
||||
object2.style = r5;
|
||||
value = <IconComponent {...object2} />;
|
||||
r0 = value;
|
||||
} else {
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
r0 = <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} source={icon} color={styles.guildChannelIcon.tintColor} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function MemberCountText({presenceCount, memberCount, withSeparator}) { // fn#76353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3395, offset: 0x01dcc159, size: 285 bytes, params: 2, frame: 24
|
||||
var r9;
|
||||
var r5;
|
||||
var Text;
|
||||
var object;
|
||||
var value;
|
||||
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared');
|
||||
const value4 = 'online';
|
||||
const r11 = presenceCount !== 0 || memberCount === null ? value4 : 'total';
|
||||
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
const value9 = ((Component) => <Component type={r11} count={(value4 !== r11 ? memberCount : presenceCount) ?? undefined} color={value3 ? 'text-subtle' : 'text-muted'} />)(importDefault(9720) /* metro dependency 9720: GuildActionSheetMemberCount */);
|
||||
if (withSeparator) {
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
object = {};
|
||||
value = 'text-xs/medium';
|
||||
r9 = value3 ? 'text-sm/normal' : value;
|
||||
object.variant = r9;
|
||||
value = 'border-subtle';
|
||||
r9 = value3 ? 'text-subtle' : value;
|
||||
object.color = r9;
|
||||
value = <Text {...object}>{'•'}</Text>;
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{value9}
|
||||
{r5}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function ParentChannelSubTitle({channel}) { // fn#76354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:3789, offset: 0x01dcc276, size: 284 bytes, params: 2, frame: 27
|
||||
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared');
|
||||
const styles = useStyles(value2);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const BjYvHO = (require(1244) /* metro dependency 1244: indexNative */).t.BjYvHO;
|
||||
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
const moduleValue2 = useChannelNameModule;
|
||||
return (
|
||||
<Text
|
||||
lineClamp={1}
|
||||
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [BjYvHO,
|
||||
{channelName: useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore)}])}
|
||||
maxFontSizeMultiplier={2}
|
||||
variant={value2 ? 'text-sm/medium' : 'text-xs/medium'}
|
||||
color={value2 ? 'text-subtle' : 'text-muted'}
|
||||
style={styles.parentChannelName}
|
||||
>
|
||||
{moduleValue2.computeChannelName(channel, UserStore, RelationshipStore)}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function EmptyIcon() { // fn#76355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4209, offset: 0x01dcc392, size: 73 bytes, params: 1, frame: 14
|
||||
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelHeaderShared'));
|
||||
return <View style={styles.channelIconWrapper} />;
|
||||
}
|
||||
|
||||
function _fun76356(a0) { // fn#76356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:244, offset: 0x01dcc3db, size: 291 bytes, params: 2, frame: 17
|
||||
const object2 = {wrapper: {'flex': 1, 'alignItems': 'center', 'flexShrink': 1, 'flexDirection': 'row',
|
||||
'paddingEnd': 8}};
|
||||
object2.channelContent = {'flex': 1, 'flexShrink': 1, 'justifyContent': 'center', marginTop: a0 ? 4 : undefined};
|
||||
object2.nameWithArrow = {'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 1};
|
||||
const object4 = {flexShrink: 1};
|
||||
copyDataProperties(object4, a0 ? {} : {'fontSize': 18, 'lineHeight': 24}, undefined);
|
||||
object2.channelName = object4;
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object2.arrowIcon = {'tintColor': null, 'flexShrink': 0, 'flexGrow': 0, 'marginTop': 2, 'marginLeft': 2,
|
||||
tintColor: INTERACTIVE_TEXT_DEFAULT};
|
||||
object2.channelIcon = {'marginRight': 12, 'flexShrink': 0};
|
||||
object2.channelIconWrapper = {'width': 32, 'height': 32, 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
|
||||
object2.guildChannelIcon = {tintColor: TEXT_STRONG};
|
||||
object2.subTitleContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4, 'marginBottom': 4};
|
||||
object2.parentChannelName = {'lineHeight': 16, 'flexShrink': 1};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function renderTitleWrapper(a0, a1, a2, a3) { // fn#76357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4437, offset: 0x01dcc4fe, size: 53 bytes, params: 5, frame: 13
|
||||
return (
|
||||
<TitleWrapper
|
||||
onPress={a1}
|
||||
headerAccessibilityLabel={a2}
|
||||
titleContentHeight={a3}
|
||||
>
|
||||
{a0}
|
||||
</TitleWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
function renderChannelTitle(a0) { // fn#76358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4590, offset: 0x01dcc533, size: 109 bytes, params: 2, frame: 20
|
||||
const value = a1;
|
||||
const r0 = value !== undefined ? value : {};
|
||||
const accessibleTitle = r0.accessibleTitle;
|
||||
const subtitle = r0.subtitle;
|
||||
const disableArrow = r0.disableArrow;
|
||||
const r7 = disableArrow !== undefined && disableArrow;
|
||||
const userId = r0.userId;
|
||||
return (
|
||||
<ChannelTitle
|
||||
title={a0}
|
||||
accessibleTitle={accessibleTitle}
|
||||
subtitle={subtitle}
|
||||
disableArrow={r7}
|
||||
userId={userId}
|
||||
guildId={r0.guildId}
|
||||
icon={r0.icon}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function renderGroupDMIcon(a0) { // fn#76359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4852, offset: 0x01dcc5a0, size: 30 bytes, params: 2, frame: 13
|
||||
return <GroupDMIcon channel={a0} />;
|
||||
}
|
||||
|
||||
function renderUserAvatar(a0, a1, a2, a3) { // fn#76360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:4936, offset: 0x01dcc5be, size: 53 bytes, params: 5, frame: 13
|
||||
return (
|
||||
<UserAvatar
|
||||
user={a0}
|
||||
status={a1}
|
||||
isMobileOnline={a2}
|
||||
isVROnline={a3}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function renderChannelIcon(a0, a1) { // fn#76361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5105, offset: 0x01dcc5f3, size: 109 bytes, params: 3, frame: 19
|
||||
const renderChannelIconRawBinding = renderChannelIconRaw;
|
||||
const value = undefined;
|
||||
const channelIconWithGuild = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconWithGuild(a0,
|
||||
a1);
|
||||
const channelUtilsModule = require(6647) /* metro dependency 6647: ChannelUtils */;
|
||||
const getChannelIconComponent = channelUtilsModule.getChannelIconComponent;
|
||||
return renderChannelIconRawBinding(channelIconWithGuild, Reflect.apply(getChannelIconComponent, channelUtilsModule,
|
||||
[a0, {isRulesChannel: (a1 == null ? value : a1.rulesChannelId) === a0.id}]));
|
||||
}
|
||||
|
||||
function renderMemberCountText(a0, a1) { // fn#76362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5323, offset: 0x01dcc660, size: 68 bytes, params: 3, frame: 17
|
||||
let value = a2;
|
||||
const r5 = value !== undefined ? value : false;
|
||||
value = null;
|
||||
return value != a0 ? <MemberCountText presenceCount={a0} memberCount={a1} withSeparator={r5} /> : value == a1 ? value : <MemberCountText presenceCount={a0} memberCount={a1} withSeparator={r5} />;
|
||||
}
|
||||
|
||||
function renderParentChannelSubTitle(a0) { // fn#76363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5491, offset: 0x01dcc6a4, size: 30 bytes, params: 2, frame: 13
|
||||
return <ParentChannelSubTitle channel={a0} />;
|
||||
}
|
||||
|
||||
function renderEmptyIcon() { // fn#76364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:5594, offset: 0x01dcc6c2, size: 23 bytes, params: 1, frame: 13
|
||||
return <EmptyIcon />;
|
||||
}
|
||||
|
||||
function _fun76346({nativeEvent}) { // fn#76346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:1170, offset: 0x01dcbc64, size: 50 bytes, params: 2, frame: 12
|
||||
env0_1({borderless: true, radius: nativeEvent.layout.width});
|
||||
}
|
||||
|
||||
function _fun76347() { // fn#76347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9903:1250, offset: 0x01dcbc96, size: 85 bytes, params: 1, frame: 15
|
||||
var Math;
|
||||
var max;
|
||||
var value2;
|
||||
var value;
|
||||
if (titleContentHeight != null) {
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
value2 = environment.__proto__;
|
||||
value = Reflect.apply(max, Math, [0, (getMinHeaderHeight('ChannelHeaderShared') - titleContentHeight) / 2]);
|
||||
return {top: value, bottom: value};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 9721; source: modules/main_tabs_v2/native/channel/header/ForumChannelHeader.tsx; dependencies: [31, 27, 9604, 33, 4501, 9722, 9698, 9723, 2] */
|
||||
function _fun76375(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9907:6, offset: 0x01dcd215, size: 238 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const MIN_HEADER_HEIGHT = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).MIN_HEADER_HEIGHT;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({search: {'flex': 1,
|
||||
'flexShrink': 1, 'flexDirection': 'row', 'alignItems': 'center', 'paddingStart': 4, height: MIN_HEADER_HEIGHT}});
|
||||
value = value.memo(_fun76376);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/ForumChannelHeader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun76376({channelId, screenIndex, guildId, pressable, isGuildMemberCountVisible, isNavigationScreen, searchPlaceholder}) { // fn#76376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9907:292, offset: 0x01dcd303, size: 227 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
if ((require(9722) /* metro dependency 9722: useIsForumChannelSearchActive */).useIsForumChannelSearchActive(channelId)) {
|
||||
r0 = <View style={styles.search}>{((ForumChannelSearchInput) => <ForumChannelSearchInput channelId={channelId} guildId={guildId} placeholder={searchPlaceholder} />)((require(9698) /* metro dependency 9698: ForumChannelSearch */).ForumChannelSearchInput)}</View>;
|
||||
} else {
|
||||
value = importDefault(9723) /* metro dependency 9723: GuildChannelHeader */;
|
||||
value = ((Component) => <Component channelId={channelId} guildId={guildId} pressable={pressable} isGuildMemberCountVisible={isGuildMemberCountVisible} isNavigationScreen={isNavigationScreen} screenIndex={screenIndex} />)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,430 @@
|
||||
/* Metro module 9723; source: modules/main_tabs_v2/native/channel/header/GuildChannelHeader.tsx; dependencies: [57, 31, 27, 9724, 4257, 1383, 6875, 1379, 4111, 1867, 3793, 1878, 661, 1376, 33, 566, 9717, 8581, 1244, 4805, 9715, 7013, 1365, 1948, 6647, 8543, 1357, 9725, 9709, 2] */
|
||||
function _fun76380(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:6, offset: 0x01dcd4eb, size: 477 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_76383 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelMemberCountStore = importDefault(9724) /* metro dependency 9724: ChannelMemberCountStore */;
|
||||
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
||||
const env0_8 = (require(1383) /* metro dependency 1383: ChannelRecord */).THREAD_CHANNEL_TYPES;
|
||||
const channelMemberStore = importDefault(6875) /* metro dependency 6875: ChannelMemberStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_15 = constantsModule.ChannelTypes;
|
||||
const env0_16 = constantsModule.HelpdeskArticles;
|
||||
const env0_17 = constantsModule.StatusTypes;
|
||||
const env0_18 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
let value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_19 = value3.jsx;
|
||||
const env0_20 = value3.Fragment;
|
||||
const env0_21 = value3.jsxs;
|
||||
value = value.memo(GuildChannelHeader);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/GuildChannelHeader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_76381(a0, a1) { // fn#76381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:396, offset: 0x01dcd6c8, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun76382;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_76383(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_76383(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_76383(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun76382;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function GuildChannelMemberCount({channel, withSeparator}) { // fn#76384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:1306, offset: 0x01dcd83c, size: 213 bytes, params: 2, frame: 21
|
||||
withSeparator = !(withSeparator === undefined) && withSeparator;
|
||||
const {online,
|
||||
total} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelMemberStore,
|
||||
ChannelMemberCountStore], _fun76385);
|
||||
env0_4.useEffect(function() {
|
||||
var channelBinding = channel;
|
||||
ChannelMemberCountStore.requestCount(channelBinding.guild_id, channelBinding.id);
|
||||
}, [channel.guild_id, channel.id]);
|
||||
if (total != null) {
|
||||
if (total > 500) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
if (online != null) {
|
||||
if (online > 500) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderMemberCountText(online, total,
|
||||
withSeparator);
|
||||
}
|
||||
|
||||
function computeVisibleChannelName({channel, guildId, showCreateThread, isConnected}) { // fn#76387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:1870, offset: 0x01dcda57, size: 312 bytes, params: 2, frame: 19
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const ageGateUtilsModule = require(8581) /* metro dependency 8581: AgeGateUtils */;
|
||||
return ageGateUtilsModule.shouldNSFWGateGuild(guildId) ? intl.string(t.HbPHt1) : showCreateThread ? intl.string(t['4WNcpu']) : channel == null ? isConnected ? intl.string(t.ai6Lbr) : intl.string(t.ZTNur7) : (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel,
|
||||
UserStore, RelationshipStore);
|
||||
}
|
||||
|
||||
function ChannelLinkedLobbyCoachmark({iconRef, guild, channel}) { // fn#76388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2220, offset: 0x01dcdb8f, size: 230 bytes, params: 2, frame: 23
|
||||
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
|
||||
const useSelectedDismissibleContent = useSelectedDismissibleContentModule.useSelectedDismissibleContent;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
let CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP = DismissibleContent.CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP;
|
||||
const value3 = env0_3(Reflect.apply(useSelectedDismissibleContent, useSelectedDismissibleContentModule,
|
||||
[[CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP], undefined, true]), 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP = DismissibleContent.CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP;
|
||||
const value4 = property === CHANNEL_LINKED_LOBBY_EDUCATION_TOOLTIP;
|
||||
const binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(iconRef, Reflect.apply(useMemo,
|
||||
binding, [_fun76389, [channel, guild, property2, value4]]));
|
||||
return null;
|
||||
}
|
||||
|
||||
function GuildChannelHeader({channelId, screenIndex, guildId, pressable, isGuildMemberCountVisible, showCreateThread}) { // fn#76391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2933, offset: 0x01dcddbb, size: 902 bytes, params: 2, frame: 36
|
||||
var r15;
|
||||
var r7;
|
||||
var items2;
|
||||
var visibleChannelName;
|
||||
var intl;
|
||||
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GuildChannelHeader');
|
||||
const value5 = env0_4.useRef(null);
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
var env0_4 = channel;
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GatewayConnectionStore],
|
||||
function() {
|
||||
return GatewayConnectionStore.isConnected();
|
||||
});
|
||||
const env0_5 = (importDefault(9725) /* metro dependency 9725: useGetThreadDraftSettings */)(channelId);
|
||||
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun76394);
|
||||
const r1 = pressable && channel != null && !showCreateThread;
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
let r18 = channel == null || showCreateThread ? null : (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderChannelIcon(channel,
|
||||
guild);
|
||||
const {node, hasSubtitle} = GuildChannelHeaderUseChannelName({channel: channel, parentChannel: value7,
|
||||
guildId: guildId, disableArrow: !r1, disableGuildMemberCount: !isGuildMemberCountVisible,
|
||||
showCreateThread: showCreateThread, icon: value3 ? r18 : null});
|
||||
const value12 = env0_4.useCallback(_fun76399, [channelId, screenIndex]);
|
||||
const jsxRuntimeEnv0_20Binding = jsxRuntimeEnv0_20;
|
||||
if (value3) {
|
||||
r15 = guild != null && channel?.linkedLobby != null ? <View ref={value5}><ChannelLinkedLobbyCoachmark iconRef={value5} guild={guild} channel={channel} /></View> : null;
|
||||
} else {
|
||||
var viewBindingProps = {ref: value5, style: {marginRight: 8}};
|
||||
items2 = [r18];
|
||||
r18 = guild != null && channel?.linkedLobby != null ? <ChannelLinkedLobbyCoachmark iconRef={value5} guild={guild} channel={channel} /> : null;
|
||||
items2[1] = r18;
|
||||
r15 = <View {...viewBindingProps}>{items2}</View>;
|
||||
}
|
||||
const fragment = <>{r15}{node}</>;
|
||||
if (channel != null) {
|
||||
visibleChannelName = computeVisibleChannelName({channel: channel, guildId: guildId,
|
||||
showCreateThread: showCreateThread, isConnected: value6});
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r7 = '' + visibleChannelName + ', ' + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x87QCk);
|
||||
} else {
|
||||
r7 = undefined;
|
||||
}
|
||||
if (r1) {
|
||||
return (
|
||||
<>
|
||||
{(require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderTitleWrapper(fragment, value12,
|
||||
r7,
|
||||
hasSubtitle ? 44 : 24)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
return fragment;
|
||||
}
|
||||
|
||||
function _fun76385() { // fn#76385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:1419, offset: 0x01dcd911, size: 286 bytes, params: 1, frame: 33
|
||||
var r7;
|
||||
var r8;
|
||||
var r9;
|
||||
var r10;
|
||||
var r11;
|
||||
var r6;
|
||||
var r20;
|
||||
var r16;
|
||||
var r17;
|
||||
var r18;
|
||||
var r2;
|
||||
var r3;
|
||||
var r4;
|
||||
var r5;
|
||||
var value7;
|
||||
var count;
|
||||
var value8;
|
||||
var UNKNOWN;
|
||||
var value9;
|
||||
var value10;
|
||||
var OFFLINE;
|
||||
var value11;
|
||||
var value12;
|
||||
var value13;
|
||||
const value = environment.__proto__;
|
||||
const _createForOfIteratorHelperLoose_76381Binding = _createForOfIteratorHelperLoose_76381;
|
||||
const getProps = ChannelMemberStore.getProps;
|
||||
let {guild_id, id} = channel;
|
||||
const value3 = _createForOfIteratorHelperLoose_76381Binding(Reflect.apply(getProps, ChannelMemberStore, [guild_id,
|
||||
id]).groups);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
const value5 = false;
|
||||
const value6 = 0;
|
||||
if (done) {
|
||||
r2 = value6;
|
||||
r3 = value5;
|
||||
r4 = value6;
|
||||
r5 = value5;
|
||||
} else {
|
||||
r7 = value6;
|
||||
r8 = value6;
|
||||
r9 = value5;
|
||||
r10 = value5;
|
||||
r11 = value4;
|
||||
while (true) {
|
||||
value7 = r11.value;
|
||||
count = value7.count;
|
||||
value8 = value6 !== count;
|
||||
if (value8) {
|
||||
id = value7.id;
|
||||
UNKNOWN = StatusTypes.UNKNOWN;
|
||||
value9 = id !== UNKNOWN;
|
||||
r6 = value9;
|
||||
} else {
|
||||
r6 = value8;
|
||||
}
|
||||
if (!r6) {
|
||||
r16 = r7;
|
||||
r17 = r8;
|
||||
r18 = r9;
|
||||
continue;
|
||||
}
|
||||
count = value7.count;
|
||||
value10 = r8 + count;
|
||||
id = value7.id;
|
||||
OFFLINE = StatusTypes.OFFLINE;
|
||||
value11 = true;
|
||||
if (id === OFFLINE) {
|
||||
r6 = r7;
|
||||
r20 = value11;
|
||||
continue;
|
||||
}
|
||||
count = value7.count;
|
||||
value12 = r7 + count;
|
||||
r6 = value12;
|
||||
r20 = r9;
|
||||
r10 = value11;
|
||||
r16 = r6;
|
||||
r17 = value10;
|
||||
r18 = r20;
|
||||
value13 = value3();
|
||||
done = value13.done;
|
||||
if (done) {
|
||||
r2 = r16;
|
||||
r3 = r10;
|
||||
r4 = r17;
|
||||
r5 = r18;
|
||||
break;
|
||||
}
|
||||
r7 = r16;
|
||||
r8 = r17;
|
||||
r9 = r18;
|
||||
r11 = value13;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return r3 ? {total: r5 ? r4 : null, online: r2} : ChannelMemberCountStore.getMemberCount(channel.id);
|
||||
}
|
||||
|
||||
function _fun76389() { // fn#76389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2525, offset: 0x01dcdc75, size: 297 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const YIVr4B = t.YIVr4B;
|
||||
object2.title = Reflect.apply(string, intl, [YIVr4B]);
|
||||
const format = intl.format;
|
||||
const w8VWRT = t.w8VWRT;
|
||||
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
const getArticleURL = defaultImport.getArticleURL;
|
||||
const LINKED_LOBBIES = HelpdeskArticles.LINKED_LOBBIES;
|
||||
object2.description = Reflect.apply(format, intl, [w8VWRT, {helpdeskArticle: Reflect.apply(getArticleURL,
|
||||
defaultImport, [LINKED_LOBBIES])}]);
|
||||
let r1 = (channel == null ? value2 : channel.linkedLobby) != null && result;
|
||||
object2.visible = r1;
|
||||
object2.position = 'bottom';
|
||||
object2.offsetY = 15;
|
||||
object2.onDismiss = onDismiss_76390;
|
||||
if (channel != null) {
|
||||
value = require(6647) /* metro dependency 6647: ChannelUtils */;
|
||||
value = value.getChannelIconWithGuild(channel, guild);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
object2.imgSource = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun76394() { // fn#76394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:3279, offset: 0x01dce141, size: 151 bytes, params: 1, frame: 16
|
||||
return channel == null || showCreateThread ? ChannelStore.getChannel(env0_5?.parentChannelId) : channel != null && channel.parent_id != null && THREAD_CHANNEL_TYPES.has(channel.type) ? ChannelStore.getChannel(channel.parent_id) : undefined;
|
||||
}
|
||||
|
||||
function GuildChannelHeaderUseChannelName({channel, parentChannel, guildId, disableArrow, disableGuildMemberCount, showCreateThread, icon}) { // fn#76396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:3544, owner: GuildChannelHeader.useChannelName, offset: 0x01dce1f3, size: 750 bytes, params: 2, frame: 30
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let items = [GatewayConnectionStore];
|
||||
const visibleChannelName = computeVisibleChannelName({channel: channel, guildId: guildId,
|
||||
showCreateThread: showCreateThread, isConnected: Reflect.apply(useStateFromStores, fluxModule, [items,
|
||||
function() {
|
||||
return GatewayConnectionStore.isConnected();
|
||||
}])});
|
||||
let r4 = !(require(8581) /* metro dependency 8581: AgeGateUtils */).shouldNSFWGateGuild(guildId) && (showCreateThread || channel?.isThread());
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const value5 = Reflect.apply(formatToPlainString, intl, [r4 ? t['OkzL+Q'] : t.UbNmGc,
|
||||
{channelName: visibleChannelName}]);
|
||||
const r3 = r4 && parentChannel != null ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderParentChannelSubTitle(parentChannel) : undefined;
|
||||
r4 = !disableGuildMemberCount && (fluxModule.useStateFromStores([GuildMemberCountStore], function() {
|
||||
return GuildMemberCountStore.getMemberCount(guildId);
|
||||
}) ?? 0) < 500 && channel != null && !channel.isThread();
|
||||
if (r4) {
|
||||
items = [ChannelTypes.GUILD_DIRECTORY];
|
||||
items[1] = ChannelTypes.GUILD_FORUM;
|
||||
r4 = !items.includes(channel.type);
|
||||
}
|
||||
r4 = r4 && !showCreateThread;
|
||||
const value14 = (require(9715) /* metro dependency 9715: ChatLoadingIndicator */).useShouldChannelShowLoadingIndicator(channel?.id);
|
||||
let r1 = channel != null && channel.isForumLikeChannel();
|
||||
r1 = !r1 && value14;
|
||||
const r12 = r1 ? ((ChannelHeaderLoadingIndicator) => <ChannelHeaderLoadingIndicator />)((require(9715) /* metro dependency 9715: ChatLoadingIndicator */).ChannelHeaderLoadingIndicator) : <>{r4 && <GuildChannelMemberCount channel={channel} withSeparator={r3 != null} />}{parentChannel != null && r3}</>;
|
||||
value = require(9717) /* metro dependency 9717: ChannelHeaderShared */;
|
||||
r1 = !r1 ? r4 : r1;
|
||||
r1 = !r1 ? r3 != null : r1;
|
||||
return {node: value.renderChannelTitle(visibleChannelName, {accessibleTitle: value5, subtitle: r12,
|
||||
disableArrow: disableArrow, guildId: guildId, icon: icon}), hasSubtitle: r1};
|
||||
}
|
||||
|
||||
function _fun76399() { // fn#76399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:4766, offset: 0x01dce50f, size: 57 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(9709) /* metro dependency 9709: ChannelHeader */;
|
||||
value.navigateToChannelDetails(channelId, screenIndex, 'guild-channel-header-title');
|
||||
}
|
||||
|
||||
function onDismiss_76390() { // fn#76390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9909:2779, offset: 0x01dcdd9e, size: 29 bytes, params: 1, frame: 11
|
||||
const binding = env1_2;
|
||||
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
||||
return binding(USER_DISMISS);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/* Metro module 9712; source: modules/main_tabs_v2/native/channel/header/HomeChannelHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 9713, 4573, 1244, 2] */
|
||||
function _fun76314(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9898:6, offset: 0x01dca3c9, size: 250 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value2.jsx;
|
||||
const env0_5 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{container: {'flex': 1, 'flexDirection': 'row',
|
||||
'alignItems': 'center', gap: PX_8}}]);
|
||||
value = value.memo(HomeChannelHeader);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/HomeChannelHeader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function HomeChannelHeader() { // fn#76315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9898:270, offset: 0x01dca4c3, size: 238 bytes, params: 1, frame: 22
|
||||
const styles = useStyles();
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconProps = {source: importDefault(9713) /* metro dependency 9713 */};
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const MEDIUM = Sizes.MEDIUM;
|
||||
iconProps.size = MEDIUM;
|
||||
iconProps.disableColor = true;
|
||||
const icon = <Icon {...iconProps} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const Ym2Ri6 = (require(1244) /* metro dependency 1244: indexNative */).t.Ym2Ri6;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{icon}
|
||||
<Text variant="heading-lg/extrabold" color="interactive-text-active">
|
||||
{Reflect.apply(string, intl, [Ym2Ri6])}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,383 @@
|
||||
/* Metro module 9700; source: modules/main_tabs_v2/native/channel/header/PrivateChannelButtons.tsx; dependencies: [31, 27, 4606, 1379, 3793, 1878, 4297, 9613, 661, 4299, 1933, 9614, 33, 1305, 4501, 697, 566, 9701, 8214, 9707, 7708, 9708, 9709, 9672, 9673, 4863, 4080, 9726, 1962, 5278, 1244, 6998, 9727, 8876, 3853, 683, 9757, 7002, 7709, 6711, 9616, 8850, 4573, 9759, 2] */
|
||||
function _fun76235(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:6, offset: 0x01dc777c, size: 812 bytes, params: 8, frame: 27
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const env0_6 = (require(4606) /* metro dependency 4606: ChannelRTCStore */).NO_PARTICIPANTS;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
||||
const env0_11 = (require(9613) /* metro dependency 9613: ChannelDetailsStore */).setIsChannelDetailsSearchActive;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = constantsModule.AnalyticEvents;
|
||||
const env0_13 = constantsModule.AnalyticsSections;
|
||||
const env0_14 = constantsModule.ChannelTypes;
|
||||
const env0_15 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
|
||||
const env0_16 = (require(1933) /* metro dependency 1933: ChangelogConstants */).CHANGELOG_URL;
|
||||
const env0_17 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchEntrypointAnalyticsLocations;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_18 = value3.jsx;
|
||||
const env0_19 = value3.jsxs;
|
||||
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XSMALL = AvatarSizes.XSMALL;
|
||||
const property = AVATAR_SIZE_MAP[XSMALL];
|
||||
object3 = {};
|
||||
const CutoutDirection = (require(1305) /* metro dependency 1305: native */).CutoutDirection;
|
||||
const RIGHT = CutoutDirection.RIGHT;
|
||||
object3.direction = RIGHT;
|
||||
object3.radius = property / 2 + 3;
|
||||
object3.inset = -6;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {privateChannelButtonsWrapper: {'flexDirection': 'row', 'gap': 12, 'paddingEnd': 1}};
|
||||
const object5 = {};
|
||||
let REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
object5.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
const BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.button.BORDER_RADIUS;
|
||||
object5.borderRadius = BORDER_RADIUS;
|
||||
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object5.minHeight = PX_32;
|
||||
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object5.minWidth = PX_32;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object5.padding = PX_4;
|
||||
object5.justifyContent = 'center';
|
||||
object5.flexDirection = 'row';
|
||||
object5.alignItems = 'center';
|
||||
object3.button = object5;
|
||||
object3.disabledButton = {opacity: 0.6};
|
||||
const object6 = {};
|
||||
REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
object6.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object6.width = property;
|
||||
object6.height = property;
|
||||
object6.justifyContent = 'center';
|
||||
object6.alignItems = 'center';
|
||||
object6.marginLeft = -6;
|
||||
object3.overflowBadge = object6;
|
||||
const env0_21 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
value = value.memo(PrivateChannelButtons);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/PrivateChannelButtons.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function PrivateChannelButtons({channelId, screenIndex}) { // fn#76236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1170, offset: 0x01dc7aa8, size: 2220 bytes, params: 2, frame: 42
|
||||
var r25;
|
||||
var r22;
|
||||
var r11;
|
||||
var r2;
|
||||
var r1;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var object;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
var object2;
|
||||
var unsafe_rawColors;
|
||||
var VoiceNormalIcon;
|
||||
var items3;
|
||||
var items5;
|
||||
var object10;
|
||||
var object12;
|
||||
var items7;
|
||||
var object14;
|
||||
let value = undefined;
|
||||
const styles = useStyles();
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
const env0_3 = channel;
|
||||
const r6 = channel == null ? value : channel.getRecipientId();
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], _fun76238,
|
||||
[channel]);
|
||||
const value6 = (require(9701) /* metro dependency 9701: useInappropriateConversationSafetyToolsWarningForChannel */).useInappropriateConversationSafetyToolsWarningForChannel(channelId);
|
||||
const r19 = value6 != null && r6 != null;
|
||||
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore, UserStore],
|
||||
_fun76239);
|
||||
const value10 = (require(8214) /* metro dependency 8214: useIsCallActive */).useIsCallActiveNullable(channel == null ? value : channel.id);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
|
||||
const callParticipants = Reflect.apply(useStateFromStoresObject, fluxModule, [[ChannelRTCStore],
|
||||
_fun76240]).callParticipants;
|
||||
let binding = env0_3;
|
||||
let useMemo = binding.useMemo;
|
||||
const {visibleParticipants, totalParticipantCount} = Reflect.apply(useMemo, binding, [_fun76241,
|
||||
[callParticipants]]);
|
||||
const r14 = channel == null ? value : channel.isMultiUserDM();
|
||||
const r15 = r14 && callParticipants.length > 0;
|
||||
const {application,
|
||||
isAppDM} = (importDefault(9707) /* metro dependency 9707: useAppDMChatInputState */)({context: {type: 'channel',
|
||||
channel: channel}});
|
||||
binding = env0_3;
|
||||
const value14 = binding.useCallback(_fun76243, [channel]);
|
||||
const env0_13 = binding.useCallback(_fun76244, [value14]);
|
||||
const value15 = binding.useCallback(_fun76245, [value14]);
|
||||
const value16 = binding.useCallback(_fun76246, [channel, channelId, screenIndex]);
|
||||
const value17 = binding.useCallback(_fun76247, [r6, channel, application]);
|
||||
useMemo = binding.useMemo;
|
||||
let button = styles.button;
|
||||
const value18 = Reflect.apply(useMemo, binding, [_fun76248, [r19, button, value16, channelId, r6,
|
||||
value6 == null ? value : value6.id, value6 == null ? value : value6.type]]);
|
||||
if ((importDefault(8876) /* metro dependency 8876: isChangelogChannel */)(channelId)) {
|
||||
return (
|
||||
<PressableOpacity
|
||||
style={styles.button}
|
||||
onPress={function() {
|
||||
importDefault(dependencyMap[34]).openURL(CHANGELOG_URL);
|
||||
var defaultImport2 = importDefault(dependencyMap[35]);
|
||||
var CHANGE_LOG_CTA_CLICKED = AnalyticEvents.CHANGE_LOG_CTA_CLICKED;
|
||||
defaultImport2.track(CHANGE_LOG_CTA_CLICKED, {cta_type: 'channel_header', target: CHANGELOG_URL});
|
||||
}}
|
||||
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+KSnWX'])}
|
||||
>
|
||||
{((WindowLaunchIcon) => <WindowLaunchIcon size="sm" />)((require(9757) /* metro dependency 9757: WindowLaunchIcon */).WindowLaunchIcon)}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
if (isAppDM) {
|
||||
if (application == null) {
|
||||
r2 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.privateChannelButtonsWrapper};
|
||||
button = styles.button;
|
||||
items7 = [<PressableOpacity style={button} onPress={value16} accessibilityLabel={intl.string(t['5h0QOP'])} accessibilityRole="button">{((MagnifyingGlassIcon) => <MagnifyingGlassIcon size="sm" />)((require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon)}</PressableOpacity>];
|
||||
button = styles.button;
|
||||
items7[1] = <PressableOpacity style={button} onPress={value17} accessibilityLabel={intl.string(t.oCqlGG)} accessibilityRole="button">{((SettingsIcon) => <SettingsIcon size="sm" />)((require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon)}</PressableOpacity>;
|
||||
r2 = <View {...viewBindingProps}>{items7}</View>;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.privateChannelButtonsWrapper};
|
||||
object = {};
|
||||
string = intl.string;
|
||||
object.accessibilityLabel = r15 ? Reflect.apply(string, intl, [t['0D/6Rz']]) : value5 ? Reflect.apply(string,
|
||||
intl,
|
||||
[t['4ry6yi']]) : Reflect.apply(string, intl, [t.focH1t]);
|
||||
object.accessibilityRole = 'button';
|
||||
items2 = [styles.button];
|
||||
object2 = {};
|
||||
r25 = r15 ? 1 : value;
|
||||
object2.borderWidth = r25;
|
||||
if (r15) {
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
r25 = value5 ? unsafe_rawColors.GREEN_360 : unsafe_rawColors.BRAND_400;
|
||||
} else {
|
||||
r25 = value;
|
||||
}
|
||||
object2.borderColor = r25;
|
||||
items2[1] = object2;
|
||||
items2[2] = value9 ? styles.disabledButton : null;
|
||||
object.style = items2;
|
||||
object.onPress = onPress_76250;
|
||||
object.disabled = value9;
|
||||
if (r15) {
|
||||
VoiceNormalIcon = (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon;
|
||||
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
r22 = <VoiceNormalIcon size="sm" color={value5 ? unsafe_rawColors.GREEN_360 : unsafe_rawColors.BRAND_400} />;
|
||||
} else if (value5) {
|
||||
const PhoneHangUpIcon = (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
|
||||
r22 = <PhoneHangUpIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400} />;
|
||||
} else {
|
||||
const PhoneCallIcon = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
|
||||
r22 = <PhoneCallIcon size="sm" color={value10 ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360 : value} />;
|
||||
}
|
||||
items3 = [r22];
|
||||
items3[1] = visibleParticipants.map(_fun76251);
|
||||
r22 = totalParticipantCount > 5 && <View style={styles.overflowBadge}>{((Text) => <Text variant="text-xxs/semibold" color="button-outline-primary-text">{'+'}{totalParticipantCount - 5}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
|
||||
items3[2] = r22;
|
||||
items5 = [<PressableOpacity {...object}>{items3}</PressableOpacity>];
|
||||
if (r14) {
|
||||
r11 = null;
|
||||
} else if (value5) {
|
||||
r11 = null;
|
||||
} else {
|
||||
r11 = <PressableOpacity style={[styles.button,
|
||||
value9 ? styles.disabledButton : null]} onPress={value15} disabled={value9} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oCqlGG)} accessibilityRole="button">{((VideoIcon) => <VideoIcon size="sm" />)((require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon)}</PressableOpacity>;
|
||||
}
|
||||
items5[1] = r11;
|
||||
items5[2] = value18;
|
||||
value = <View {...viewBindingProps}>{items5}</View>;
|
||||
r1 = value;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function _fun76238() { // fn#76238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1368, offset: 0x01dc8354, size: 45 bytes, params: 1, frame: 12
|
||||
return channel != null && VoiceStateStore.isInChannel(channel.id);
|
||||
}
|
||||
|
||||
function _fun76239() { // fn#76239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1534, offset: 0x01dc8381, size: 125 bytes, params: 1, frame: 16
|
||||
var r1;
|
||||
var isBlocked2;
|
||||
var value;
|
||||
const channelBinding = channel;
|
||||
const value2 = undefined;
|
||||
const type = channelBinding == null ? value2 : channel.type;
|
||||
const DM = ChannelTypes.DM;
|
||||
let r0 = type === DM && env0_4 != null;
|
||||
if (r0) {
|
||||
isBlocked2 = RelationshipStore.isBlocked(env0_4);
|
||||
if (isBlocked2) {
|
||||
r1 = isBlocked2;
|
||||
} else {
|
||||
value = UserStore.getUser(env0_4);
|
||||
value = (value == null ? value2 : value.isProvisional) === true;
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun76240() { // fn#76240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1763, offset: 0x01dc83fe, size: 154 bytes, params: 1, frame: 17
|
||||
const object2 = {};
|
||||
const channelBinding = channel;
|
||||
const value2 = undefined;
|
||||
let r1 = channelBinding == null ? value2 : channel.isMultiUserDM();
|
||||
r1 = r1 === true ? ChannelRTCStore.getParticipants(channel.id) : NO_PARTICIPANTS;
|
||||
object2.callParticipants = r1;
|
||||
object2.participantsVersion = (channel == null ? value2 : channel.isMultiUserDM()) !== true ? -1 : ChannelRTCStore.getParticipantsVersion(channel.id);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun76241() { // fn#76241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:1980, offset: 0x01dc8498, size: 61 bytes, params: 1, frame: 14
|
||||
const value = callParticipants.filter(function({type}) {
|
||||
return type === ParticipantTypes.USER;
|
||||
});
|
||||
const object2 = {};
|
||||
object2.visibleParticipants = value.slice(0, 5);
|
||||
object2.totalParticipantCount = value.length;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun76243() { // fn#76243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2296, offset: 0x01dc84f0, size: 132 bytes, params: 1, frame: 16
|
||||
var value2;
|
||||
var moduleValue;
|
||||
let value = a0;
|
||||
const r4 = value !== undefined ? value : false;
|
||||
let channelBinding = channel;
|
||||
if (channelBinding != null) {
|
||||
channelBinding = channel;
|
||||
if (channelBinding.isPrivate()) {
|
||||
value2 = environment.__proto__;
|
||||
value = (importDefault(7708) /* metro dependency 7708: getPrivateChannelCall */)(channel, r4);
|
||||
if (value.inCall) {
|
||||
value.onPress();
|
||||
} else {
|
||||
moduleValue = require(9708) /* metro dependency 9708: ConfirmStartCall */;
|
||||
moduleValue.confirmStartCall(value.onPress);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun76244() { // fn#76244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2435, offset: 0x01dc8574, size: 18 bytes, params: 1, frame: 11
|
||||
env0_12(false);
|
||||
}
|
||||
|
||||
function _fun76245() { // fn#76245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2470, offset: 0x01dc8586, size: 18 bytes, params: 1, frame: 11
|
||||
env0_12(true);
|
||||
}
|
||||
|
||||
function _fun76246() { // fn#76246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2505, offset: 0x01dc8598, size: 194 bytes, params: 1, frame: 18
|
||||
var guildId;
|
||||
var isThread2;
|
||||
var moduleValue2;
|
||||
const channelHeaderModule = require(9709) /* metro dependency 9709: ChannelHeader */;
|
||||
const navigateToChannelDetails = channelHeaderModule.navigateToChannelDetails;
|
||||
const channelIdBinding = channelId;
|
||||
Reflect.apply(navigateToChannelDetails, channelHeaderModule, [channelIdBinding, screenIndex,
|
||||
'private-channel-search-button']);
|
||||
setIsChannelDetailsSearchActive(channelIdBinding, true, 'action');
|
||||
let channelBinding = channel;
|
||||
if (channelBinding != null) {
|
||||
channelBinding = channel;
|
||||
guildId = channelBinding.getGuildId();
|
||||
isThread2 = channelBinding.isThread();
|
||||
moduleValue2 = require(9672) /* metro dependency 9672: useSearchContext */;
|
||||
(importDefault(9673) /* metro dependency 9673: Tracking */).trackSearchOpened({searchContext: moduleValue2.getChannelDetailsSearchContext(channelId,
|
||||
|
||||
guildId, isThread2), searchLocation: SearchEntrypointAnalyticsLocations.INDIVIDUAL_DM});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun76247() { // fn#76247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:2801, offset: 0x01dc865a, size: 227 bytes, params: 1, frame: 20
|
||||
var value5;
|
||||
var defaultImport;
|
||||
var defaultImport2;
|
||||
if (env0_4 != null && channel != null && application != null) {
|
||||
value5 = environment.__proto__;
|
||||
defaultImport = importDefault(dependencyMap[25]);
|
||||
defaultImport.trackWithMetadata(AnalyticEvents.SETTINGS_PANE_VIEWED, {'settings_type': 'user',
|
||||
'destination_pane': null, 'source_page': 'app_dm_settings',
|
||||
destination_pane: AnalyticsSections.SETTINGS_APP_DMS_MENU, application_id: application.id});
|
||||
defaultImport2 = importDefault(dependencyMap[26]);
|
||||
defaultImport2.openLazy(require(dependencyMap[28])(dependencyMap[27], dependencyMap.paths),
|
||||
'AppDMOptionsBottomSheet', {userId: env0_4, channel: channel, application: application});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun76248() { // fn#76248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:3128, offset: 0x01dc873d, size: 252 bytes, params: 1, frame: 19
|
||||
var r0;
|
||||
var PressableOpacity;
|
||||
var intl;
|
||||
if (env0_6) {
|
||||
const SafetyToolsButton = (require(9727) /* metro dependency 9727: SafetyToolsButton */).SafetyToolsButton;
|
||||
r0 = <SafetyToolsButton channelId={channelId} recipientId={env0_4} warningId={env0_5.id} warningType={env0_5.type} />;
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var pressableOpacityProps = {style: styles.button, onPress: env0_14};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP']);
|
||||
pressableOpacityProps.accessibilityRole = 'button';
|
||||
r0 = <PressableOpacity {...pressableOpacityProps}>{((MagnifyingGlassIcon) => <MagnifyingGlassIcon size="sm" />)((require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon)}</PressableOpacity>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function PrivateChannelButtonsOnPress_76250() { // fn#76250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:4669, owner: PrivateChannelButtons.onPress, offset: 0x01dc8896, size: 76 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (env0_10) {
|
||||
if (channel != null) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
||||
moduleValue.openChannelCallModal(channel);
|
||||
} else {
|
||||
env0_13();
|
||||
}
|
||||
} else {
|
||||
env0_13();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun76251(a0, a1) { // fn#76251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9886:5044, offset: 0x01dc88e2, size: 205 bytes, params: 3, frame: 25
|
||||
const value2 = visibleParticipants.length - 1;
|
||||
const value4 = undefined;
|
||||
const CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
|
||||
const object = {};
|
||||
const PX_4 = a1 !== 0 ? -6 : (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object.marginLeft = PX_4;
|
||||
const user = a0.user;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XSMALL = AvatarSizes.XSMALL;
|
||||
return (
|
||||
<CutoutableAvatarImage
|
||||
style={object}
|
||||
user={user}
|
||||
guildId={value4}
|
||||
size={XSMALL}
|
||||
cutout={a1 !== value2 || totalParticipantCount > 5 ? env1_20 : value4}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
/* Metro module 9714; source: modules/main_tabs_v2/native/channel/header/PrivateChannelHeader.tsx; dependencies: [31, 1379, 4396, 3793, 1878, 661, 33, 1305, 4501, 697, 566, 9709, 4805, 1244, 8829, 9715, 3995, 9717, 2] */
|
||||
function _fun76317(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:6, offset: 0x01dca5f7, size: 387 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = constantsModule.ChannelTypes;
|
||||
const env0_9 = constantsModule.StatusTypes;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value3.jsx;
|
||||
const env0_11 = value3.Fragment;
|
||||
const env0_12 = value3.jsxs;
|
||||
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
|
||||
const env0_13 = AVATAR_SIZE_MAP[REFRESH_MEDIUM_32];
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
const env0_14 = Reflect.apply(createStyles, createStylesModule, [{activityStatusText: {color: TEXT_MUTED}}]);
|
||||
value = value.memo(PrivateChannelHeader);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/header/PrivateChannelHeader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function GroupDmMemberCount({channel}) { // fn#76318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:373, offset: 0x01dca77a, size: 114 bytes, params: 2, frame: 19
|
||||
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, PresenceStore],
|
||||
_fun76319);
|
||||
const channelHeaderSharedModule = require(9717) /* metro dependency 9717: ChannelHeaderShared */;
|
||||
return channelHeaderSharedModule.renderMemberCountText(value, channel.recipients.length);
|
||||
}
|
||||
|
||||
function PrivateChannelHeader({channelId, screenIndex, pressable}) { // fn#76321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:730, offset: 0x01dca8ac, size: 1120 bytes, params: 2, frame: 33
|
||||
var r15;
|
||||
var r11;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var moduleValue4;
|
||||
var moduleValue6;
|
||||
const styles = useStyles();
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun76323);
|
||||
const env0_3 = value3;
|
||||
const {isMobileOnline, isVROnline,
|
||||
status} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], _fun76324);
|
||||
const value5 = env0_3.useCallback(_fun76325, [channelId, screenIndex]);
|
||||
if (channel != null) {
|
||||
moduleValue4 = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
r15 = moduleValue4.computeChannelName(channel, UserStore, RelationshipStore);
|
||||
} else {
|
||||
r15 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ai6Lbr);
|
||||
}
|
||||
let r0 = value3 != null ? ((Component) => <Component userId={value3.id} guildId={channel?.guild_id} textStyle={styles.activityStatusText} />)(importDefault(8829) /* metro dependency 8829: ActivityStatus */) : null;
|
||||
if ((require(9715) /* metro dependency 9715: ChatLoadingIndicator */).useShouldChannelShowLoadingIndicator(channelId)) {
|
||||
const ChannelHeaderLoadingIndicator = (require(9715) /* metro dependency 9715: ChatLoadingIndicator */).ChannelHeaderLoadingIndicator;
|
||||
r0 = <ChannelHeaderLoadingIndicator />;
|
||||
} else {
|
||||
r0 = channel != null && channel.isMultiUserDM() ? <GroupDmMemberCount channel={channel} /> : r0;
|
||||
}
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const UbNmGc = (require(1244) /* metro dependency 1244: indexNative */).t.UbNmGc;
|
||||
const value13 = Reflect.apply(formatToPlainString, intl, [UbNmGc, {channelName: r15}]);
|
||||
if (value3 == null) {
|
||||
r11 = null;
|
||||
} else if (value3.isSystemUser()) {
|
||||
r11 = null;
|
||||
} else {
|
||||
moduleValue6 = require(3995) /* metro dependency 3995: UserUtils */;
|
||||
r11 = moduleValue6.humanizeStatus(status, {isMobile: isMobileOnline, isVR: isVROnline});
|
||||
}
|
||||
const value15 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.x87QCk);
|
||||
const r8 = r11 != null ? '' + value13 + ', ' + r11 + ', ' + value15 : '' + value13 + ', ' + value15;
|
||||
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
const items2 = [value3 != null ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderUserAvatar(value3,
|
||||
status, isMobileOnline,
|
||||
isVROnline) : channel == null ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderEmptyIcon() : channel.isGroupDM() ? (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderGroupDMIcon(channel) : (require(9717) /* metro dependency 9717: ChannelHeaderShared */).renderEmptyIcon()];
|
||||
const channelHeaderSharedModule = require(9717) /* metro dependency 9717: ChannelHeaderShared */;
|
||||
items2[1] = channelHeaderSharedModule.renderChannelTitle(r15, {accessibleTitle: value13, subtitle: r0,
|
||||
disableArrow: !pressable, userId: value3?.id, guildId: channel?.guild_id});
|
||||
const fragment = <>{items2}</>;
|
||||
if (pressable) {
|
||||
return (
|
||||
<>
|
||||
{channelHeaderSharedModule.renderTitleWrapper(fragment, value5, r8, r0 != null ? 44 : env0_13)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
return fragment;
|
||||
}
|
||||
|
||||
function _fun76319() { // fn#76319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:455, offset: 0x01dca7ec, size: 111 bytes, params: 1, frame: 17
|
||||
const recipients = channel.recipients;
|
||||
const items2 = [];
|
||||
const value = arraySpread(items2, recipients, 0, undefined);
|
||||
items2[value] = UserStore.getCurrentUser()?.id ?? '0';
|
||||
value + 1;
|
||||
return items2.reduce(_fun76320, 0);
|
||||
}
|
||||
|
||||
function _fun76323() { // fn#76323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:903, offset: 0x01dcad26, size: 77 bytes, params: 1, frame: 13
|
||||
const channelBinding = channel;
|
||||
const value2 = undefined;
|
||||
const type = channelBinding == null ? value2 : channel.type;
|
||||
const DM = ChannelTypes.DM;
|
||||
return type !== DM ? value2 : UserStore.getUser(channel.getRecipientId());
|
||||
}
|
||||
|
||||
function _fun76324() { // fn#76324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:1018, offset: 0x01dcad73, size: 149 bytes, params: 1, frame: 15
|
||||
return {isMobileOnline: env0_3 != null && PresenceStore.isMobileOnline(env0_3.id),
|
||||
isVROnline: env0_3 != null && PresenceStore.isVROnline(env0_3.id),
|
||||
status: env0_3 != null ? PresenceStore.getStatus(env0_3.id) : StatusTypes.UNKNOWN};
|
||||
}
|
||||
|
||||
function _fun76325() { // fn#76325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:1219, offset: 0x01dcae08, size: 57 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(9709) /* metro dependency 9709: ChannelHeader */;
|
||||
value.navigateToChannelDetails(channelId, screenIndex, 'private-channel-header-title');
|
||||
}
|
||||
|
||||
function _fun76320(a0, a1) { // fn#76320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9900:557, offset: 0x01dca85b, size: 81 bytes, params: 3, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
const status = PresenceStore.getStatus(a1);
|
||||
const INVISIBLE = StatusTypes.INVISIBLE;
|
||||
return a0 + (status === INVISIBLE || status === StatusTypes.OFFLINE || status === StatusTypes.UNKNOWN ? 0 : 1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,380 @@
|
||||
/* Metro module 11284; source: modules/main_tabs_v2/native/channel/useChannelSafeAreaBottomStyles.tsx; dependencies: [31, 4257, 3785, 1379, 4259, 4294, 661, 1386, 4501, 697, 11285, 6632, 4022, 632, 1583, 477, 1357, 3860, 7701, 2] */
|
||||
function _fun86159(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:6, offset: 0x01f89dcf, size: 366 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 gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
||||
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).InputModes;
|
||||
const env0_10 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
|
||||
object = {LURKER: 'lurker', VOICE: 'voice', CHAT: 'chat', DIRECTORY: 'directory', EXPRESSION_PICKER: 'expression',
|
||||
MEDIA: 'media', APPS: 'apps', NONE: 'none'};
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
|
||||
var object = {};
|
||||
var object2 = {};
|
||||
object2.backgroundColor = importDefault(dependencyMap[9]).colors.BACKGROUND_BASE_LOWER;
|
||||
object.lurker = object2;
|
||||
object.chat = {backgroundColor: a0};
|
||||
object.voice = {backgroundColor: a0};
|
||||
object.expressionPickerBackground = {backgroundColor: importDefault(dependencyMap[9]).colors.MOBILE_KEYBOARD_GAP_BACKGROUND};
|
||||
return object;
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/useChannelSafeAreaBottomStyles.tsx');
|
||||
exports.default = useChannelSafeAreaBottomStyles;
|
||||
}
|
||||
|
||||
function useChannelSafeAreaBottomStyles(a0) { // fn#86161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:738, offset: 0x01f89fa8, size: 232 bytes, params: 2, frame: 19
|
||||
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
|
||||
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
|
||||
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
|
||||
[{location: 'useChannelSafeAreaBottomStyles'}]).chatInputFloating;
|
||||
const moduleValue2 = mobileVisualRefreshExperimentModule;
|
||||
const resolveRefreshToken = moduleValue2.resolveRefreshToken;
|
||||
const CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND;
|
||||
const styles = useStyles((require(3860) /* metro dependency 3860: useToken */).useToken(Reflect.apply(resolveRefreshToken,
|
||||
moduleValue2, [CHANNEL_SAFE_AREA_BOTTOM_BACKGROUND, chatInputFloating])));
|
||||
return env0_3.useMemo(_fun86164, [styles,
|
||||
(require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientBottom(),
|
||||
useChannelSafeAreaBottomType(a0)]);
|
||||
}
|
||||
|
||||
function useChannelSafeAreaBottomType(a0) { // fn#86162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:1044, owner: useChannelSafeAreaBottomStyles.useChannelSafeAreaBottomType, offset: 0x01f8a090, size: 176 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
const result = (importDefault(11285) /* metro dependency 11285: useCreateThreadViewProps */)(a0) != null;
|
||||
const env0_2 = (importDefault(6632) /* metro dependency 6632: useChannelRoleSubscriptionStatus */)(a0).needSubscriptionToAccess;
|
||||
const env0_3 = (importDefault(4022) /* metro dependency 4022: useKeyboardType */)();
|
||||
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GatewayConnectionStore,
|
||||
ChannelStore, LurkingStore, MediaEngineStore, RTCConnectionStore], _fun86163);
|
||||
}
|
||||
|
||||
function _fun86164() { // fn#86164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:1824, offset: 0x01f8a3b9, size: 261 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
var object2;
|
||||
var stylesBinding;
|
||||
let binding = env0_2;
|
||||
const NONE = env1_11.NONE;
|
||||
if (binding !== NONE) {
|
||||
binding = env0_2;
|
||||
var DIRECTORY = env1_11.DIRECTORY;
|
||||
if (binding !== DIRECTORY) {
|
||||
if (env0_2 === env1_11.EXPRESSION_PICKER) {
|
||||
r0 = styles.expressionPickerBackground;
|
||||
} else if (env0_2 === env1_11.MEDIA) {
|
||||
r0 = styles.expressionPickerBackground;
|
||||
} else if (env0_2 === env1_11.APPS) {
|
||||
r0 = styles.expressionPickerBackground;
|
||||
} else if (env0_2 === env1_11.CHAT) {
|
||||
object2 = {};
|
||||
stylesBinding = styles;
|
||||
copyDataProperties(object2, env0_1, copyDataProperties(object2, stylesBinding.chat, stylesBinding));
|
||||
r0 = object2;
|
||||
} else if (env0_2 === env1_11.VOICE) {
|
||||
object2 = {};
|
||||
stylesBinding = styles;
|
||||
copyDataProperties(object2, env0_1, copyDataProperties(object2, stylesBinding.voice, stylesBinding));
|
||||
r0 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
stylesBinding = styles;
|
||||
copyDataProperties(object2, stylesBinding[env0_2], stylesBinding);
|
||||
copyDataProperties(object2, env0_1, stylesBinding);
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86163() { // fn#86163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11470:1209, offset: 0x01f8a140, size: 633 bytes, params: 1, frame: 19
|
||||
var r0;
|
||||
var r2;
|
||||
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
const channel = ChannelStore.getChannel(env0_0);
|
||||
const value4 = undefined;
|
||||
const r9 = channel == null ? value4 : channel.getGuildId();
|
||||
const binding = env0_0;
|
||||
const GUILD_HOME = StaticChannelRoute.GUILD_HOME;
|
||||
if (binding === GUILD_HOME) {
|
||||
r0 = env2_11.NONE;
|
||||
} else if (env0_0 === StaticChannelRoute.ROLE_SUBSCRIPTIONS) {
|
||||
r0 = env2_11.NONE;
|
||||
} else if (needSubscriptionToAccess) {
|
||||
r0 = env2_11.NONE;
|
||||
} else if (GatewayConnectionStore.isConnected()) {
|
||||
if (MediaEngineStore.getMode() !== InputModes.PUSH_TO_TALK) {
|
||||
if (env0_3 !== KeyboardTypes.EXPRESSION) {
|
||||
if (env0_3 !== KeyboardTypes.MEDIA) {
|
||||
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
|
||||
if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
} else {
|
||||
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue3.isAndroid()) {
|
||||
r2 = env2_11.APPS;
|
||||
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue2.isAndroid()) {
|
||||
r2 = env2_11.MEDIA;
|
||||
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
|
||||
if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
} else {
|
||||
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue3.isAndroid()) {
|
||||
r2 = env2_11.APPS;
|
||||
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue.isAndroid()) {
|
||||
r2 = env2_11.EXPRESSION_PICKER;
|
||||
} else if (env0_3 !== KeyboardTypes.MEDIA) {
|
||||
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
|
||||
if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
} else {
|
||||
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue3.isAndroid()) {
|
||||
r2 = env2_11.APPS;
|
||||
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue2.isAndroid()) {
|
||||
r2 = env2_11.MEDIA;
|
||||
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
|
||||
if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
} else {
|
||||
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue3.isAndroid()) {
|
||||
r2 = env2_11.APPS;
|
||||
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (RTCConnectionStore.getChannelId() != null) {
|
||||
r2 = env2_11.VOICE;
|
||||
} else if (env0_3 !== KeyboardTypes.EXPRESSION) {
|
||||
if (env0_3 !== KeyboardTypes.MEDIA) {
|
||||
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
|
||||
if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
} else {
|
||||
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue3.isAndroid()) {
|
||||
r2 = env2_11.APPS;
|
||||
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue2.isAndroid()) {
|
||||
r2 = env2_11.MEDIA;
|
||||
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
|
||||
if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
} else {
|
||||
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue3.isAndroid()) {
|
||||
r2 = env2_11.APPS;
|
||||
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue.isAndroid()) {
|
||||
r2 = env2_11.EXPRESSION_PICKER;
|
||||
} else if (env0_3 !== KeyboardTypes.MEDIA) {
|
||||
if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
|
||||
if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
} else {
|
||||
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue3.isAndroid()) {
|
||||
r2 = env2_11.APPS;
|
||||
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue2.isAndroid()) {
|
||||
r2 = env2_11.MEDIA;
|
||||
} else if (env0_3 !== KeyboardTypes.APP_LAUNCHER) {
|
||||
if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
} else {
|
||||
moduleValue3 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (moduleValue3.isAndroid()) {
|
||||
r2 = env2_11.APPS;
|
||||
} else if ((channel == null ? value4 : channel.isDirectory()) === true) {
|
||||
r2 = env2_11.DIRECTORY;
|
||||
} else if (r9 == null) {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
} else if (LurkingStore.isLurking(r9)) {
|
||||
r2 = env2_11.LURKER;
|
||||
} else {
|
||||
r2 = channel == null ? value4 : channel.isForumLikeChannel();
|
||||
r2 = r2 !== true || result ? env0_0 != null ? env2_11.CHAT : env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
r0 = r2;
|
||||
} else {
|
||||
r0 = env0_0 == null ? env2_11.NONE : env2_11.CHAT;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
/* Metro module 11280; source: modules/main_tabs_v2/native/channel/useChannelSafeAreaHeightSharedValue.android.tsx; dependencies: [11281, 11283, 4022, 5466, 3860, 697, 1357, 4017, 1583, 2] */
|
||||
function _fun86129(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:6, offset: 0x01f88cfa, size: 119 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object = {code: 'function useChannelSafeAreaHeightSharedValueAndroidTsx1(){const{chatInputFloating,chatInputSpaceBottom,keyboardOpenOrOpening,keyboardWillOpenSharedValue,keyboardOpenedHeight,insets,keyboardTypeSharedValue,KeyboardTypes,customKeyboardHeight}=this.__closure;const resolveBottom=function(bottom){return chatInputFloating?Math.max(bottom,chatInputSpaceBottom):bottom;};if(keyboardOpenOrOpening.get()||keyboardWillOpenSharedValue.get()){const systemKeyboardHeight=keyboardOpenedHeight.get();if(systemKeyboardHeight<=0){return resolveBottom(insets.get().bottom);}return systemKeyboardHeight;}if(keyboardTypeSharedValue.get()===KeyboardTypes.SYSTEM){return resolveBottom(insets.get().bottom);}return customKeyboardHeight;}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/useChannelSafeAreaHeightSharedValue.android.tsx');
|
||||
exports.default = useChannelSafeAreaHeightSharedValue;
|
||||
}
|
||||
|
||||
function useChannelSafeAreaHeightSharedValue() { // fn#86130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:950, offset: 0x01f88d71, size: 380 bytes, params: 1, frame: 24
|
||||
var object2;
|
||||
const value2 = (importDefault(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */)();
|
||||
const {keyboardOpenOrOpening,
|
||||
keyboardOpenedHeight} = (importDefault(11283) /* metro dependency 11283: useSafeAreaBottomKeyboardInfoController */)();
|
||||
const value4 = (require(4022) /* metro dependency 4022: useKeyboardType */).useKeyboardTypeSharedValue();
|
||||
const env0_3 = value4;
|
||||
const value5 = (require(4022) /* metro dependency 4022: useKeyboardType */).useKeyboardWillOpenSharedValue();
|
||||
const value6 = (importDefault(5466) /* metro dependency 5466: useCustomKeyboardHeight */)();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const CHAT_INPUT_FLOATING_OFFSET_MINIMUM = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_FLOATING_OFFSET_MINIMUM;
|
||||
const value7 = Reflect.apply(useToken, useTokenModule, [CHAT_INPUT_FLOATING_OFFSET_MINIMUM]);
|
||||
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
|
||||
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
|
||||
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
|
||||
[{location: 'ChatInput'}]).chatInputFloating;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
const closure = useChannelSafeAreaHeightSharedValueO;
|
||||
object2 = {chatInputFloating: chatInputFloating, chatInputSpaceBottom: value7,
|
||||
keyboardOpenOrOpening: keyboardOpenOrOpening, keyboardWillOpenSharedValue: value5,
|
||||
keyboardOpenedHeight: keyboardOpenedHeight, insets: value2, keyboardTypeSharedValue: value4};
|
||||
const KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
|
||||
object2.KeyboardTypes = KeyboardTypes;
|
||||
object2.customKeyboardHeight = value6;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 12201325230972;
|
||||
closure.__initData = env0_3;
|
||||
return Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
}
|
||||
|
||||
function useChannelSafeAreaHeightSharedValueO() { // fn#86131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:1366, owner: useChannelSafeAreaHeightSharedValue.o, offset: 0x01f88eed, size: 175 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var binding;
|
||||
var value4;
|
||||
const closure = resolveBottom;
|
||||
const keyboardOpenOrOpeningBinding = keyboardOpenOrOpening;
|
||||
const get = keyboardOpenOrOpeningBinding.get;
|
||||
if (Reflect.apply(get, keyboardOpenOrOpeningBinding, [])) {
|
||||
value4 = keyboardOpenedHeight.get();
|
||||
r0 = value4 <= 0 ? closure(env0_0.get().bottom) : value4;
|
||||
} else {
|
||||
if (Reflect.apply(env0_4.get, binding, [])) {
|
||||
value4 = keyboardOpenedHeight.get();
|
||||
return value4 <= 0 ? closure(env0_0.get().bottom) : value4;
|
||||
}
|
||||
var value2 = env0_3.get();
|
||||
var KeyboardTypes = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes;
|
||||
var SYSTEM = KeyboardTypes.SYSTEM;
|
||||
r0 = value2 === SYSTEM ? closure(env0_0.get().bottom) : env0_5;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function resolveBottom(a0) { // fn#86132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11466:1395, owner: useChannelSafeAreaHeightSharedValue.o.resolveBottom, offset: 0x01f88f9c, size: 41 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
let value = a0;
|
||||
if (chatInputFloating) {
|
||||
value = global.Math.max(value, env1_6);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
/* Metro module 11283; source: modules/main_tabs_v2/native/channel/useSafeAreaBottomKeyboardInfoController.tsx; dependencies: [31, 1581, 477, 1597, 1598, 1481, 1599, 4017, 1847, 2] */
|
||||
function _fun86146(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:6, offset: 0x01f89653, size: 196 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
|
||||
value = value.isMetaQuest();
|
||||
object = {code: "function useSafeAreaBottomKeyboardInfoControllerTsx1(e){const{runOnJS,KeyboardStateDebugging,IS_SYSTEM_KEYBOARD_EXTERNAL,keyboardOverlapsCurrentAppEntry,keyboardOpenedHeight}=this.__closure;runOnJS(KeyboardStateDebugging.keyboardControllerWorkletEvent)('onStart',e.height);if(IS_SYSTEM_KEYBOARD_EXTERNAL)return;if(e.height>0&&keyboardOverlapsCurrentAppEntry.get()){keyboardOpenedHeight.set(e.height);}}"};
|
||||
object = {code: "function useSafeAreaBottomKeyboardInfoControllerTsx2(e){const{runOnJS,KeyboardStateDebugging,IS_SYSTEM_KEYBOARD_EXTERNAL,keyboardOverlapsCurrentAppEntry,keyboardOpenedHeight}=this.__closure;runOnJS(KeyboardStateDebugging.keyboardControllerWorkletEvent)('onEnd',e.height);if(IS_SYSTEM_KEYBOARD_EXTERNAL)return;if(e.height>0&&keyboardOverlapsCurrentAppEntry.get()){keyboardOpenedHeight.set(e.height);}}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/channel/useSafeAreaBottomKeyboardInfoController.tsx');
|
||||
exports.default = useSafeAreaBottomKeyboardInfoController;
|
||||
exports.IS_SYSTEM_KEYBOARD_EXTERNAL = value;
|
||||
}
|
||||
|
||||
function isKeyboardOverlappingAppEntry(a0) { // fn#86147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:132, offset: 0x01f89717, size: 153 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
return isAndroid2 ? (importDefault(1597) /* metro dependency 1597: NativeSafeAreaInsetsModule */).getImeInsets(false,
|
||||
a0) > 0 || !(require(1598) /* metro dependency 1598: AppEntryKey */).APP_ENTRY_KEYS.some(_fun86148) && null : !isAndroid2;
|
||||
}
|
||||
|
||||
function useSafeAreaBottomKeyboardInfoController() { // fn#86149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1265, offset: 0x01f897f0, size: 519 bytes, params: 1, frame: 27
|
||||
var object4;
|
||||
var r1;
|
||||
var value5;
|
||||
const value2 = undefined;
|
||||
const value3 = (require(1481) /* metro dependency 1481: AppEntryKeyContext */).useAppEntryKey();
|
||||
const value4 = 0;
|
||||
if (env0_4) {
|
||||
r1 = value4;
|
||||
} else {
|
||||
value5 = (require(1599) /* metro dependency 1599 */).KeyboardController.state();
|
||||
r1 = (value5 == null ? value2 : value5.height) ?? value4;
|
||||
}
|
||||
const r6 = value4 !== r1 && isKeyboardOverlappingAppEntry(value3) === true;
|
||||
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r6 ? r1 : value4);
|
||||
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r6);
|
||||
const value10 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(r6);
|
||||
let binding = value10;
|
||||
binding.useEffect(_fun86150, [value3, value9, value8, value10]);
|
||||
const moduleValue5 = require(1599) /* metro dependency 1599 */;
|
||||
const useKeyboardHandler = moduleValue5.useKeyboardHandler;
|
||||
object4 = {};
|
||||
let closure = onStart_86157;
|
||||
const object5 = {};
|
||||
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object5.runOnJS = runOnJS;
|
||||
object5.KeyboardStateDebugging = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
|
||||
binding = env0_4;
|
||||
object5.IS_SYSTEM_KEYBOARD_EXTERNAL = binding;
|
||||
object5.keyboardOverlapsCurrentAppEntry = value10;
|
||||
object5.keyboardOpenedHeight = value8;
|
||||
closure.__closure = object5;
|
||||
closure.__workletHash = 11726427166555;
|
||||
closure.__initData = env0_5;
|
||||
object4.onStart = closure;
|
||||
closure = onEnd_86158;
|
||||
const object6 = {};
|
||||
object6.runOnJS = runOnJS;
|
||||
object6.KeyboardStateDebugging = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
|
||||
object6.IS_SYSTEM_KEYBOARD_EXTERNAL = binding;
|
||||
object6.keyboardOverlapsCurrentAppEntry = value10;
|
||||
object6.keyboardOpenedHeight = value8;
|
||||
closure.__closure = object6;
|
||||
closure.__workletHash = 15110866363831;
|
||||
closure.__initData = env0_6;
|
||||
object4.onEnd = closure;
|
||||
Reflect.apply(useKeyboardHandler, moduleValue5, [object4, []]);
|
||||
return {keyboardOpenOrOpening: value9, keyboardOpenedHeight: value8, keyboardOverlapsCurrentAppEntry: value10};
|
||||
}
|
||||
|
||||
function _fun86148(a0) { // fn#86148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:263, offset: 0x01f897b0, size: 64 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
let value = a0 !== env0_0;
|
||||
if (value) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(1597) /* metro dependency 1597: NativeSafeAreaInsetsModule */;
|
||||
value = value.getImeInsets(false, a0);
|
||||
value = value > 0;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun86150() { // fn#86150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1595, offset: 0x01f899f7, size: 234 bytes, params: 1, frame: 18
|
||||
if (env1_4) {
|
||||
return undefined;
|
||||
}
|
||||
const KeyboardEvents = (require(1599) /* metro dependency 1599 */).KeyboardEvents;
|
||||
const env0_1 = KeyboardEvents.addListener('keyboardWillShow', _fun86152);
|
||||
const env0_2 = KeyboardEvents.addListener('keyboardDidShow', _fun86153);
|
||||
const env0_3 = KeyboardEvents.addListener('keyboardWillHide', _fun86154);
|
||||
const env0_4 = KeyboardEvents.addListener('keyboardDidHide', _fun86155);
|
||||
return _fun86156;
|
||||
}
|
||||
|
||||
function useSafeAreaBottomKeyboardInfoControllerOnStart(a0) { // fn#86157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2440, owner: useSafeAreaBottomKeyboardInfoController.onStart, offset: 0x01f89cb9, size: 139 bytes, params: 2, frame: 17
|
||||
var binding;
|
||||
const value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
reanimatedRexportModule.runOnJS((importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */).keyboardControllerWorkletEvent)('onStart',
|
||||
a0.height);
|
||||
if (!env1_4) {
|
||||
if (a0.height > 0 && env0_3.get()) {
|
||||
binding = env0_1;
|
||||
binding.set(a0.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function useSafeAreaBottomKeyboardInfoControllerOnEnd(a0) { // fn#86158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2782, owner: useSafeAreaBottomKeyboardInfoController.onEnd, offset: 0x01f89d44, size: 139 bytes, params: 2, frame: 17
|
||||
var binding;
|
||||
const value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
reanimatedRexportModule.runOnJS((importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */).keyboardControllerWorkletEvent)('onEnd',
|
||||
a0.height);
|
||||
if (!env1_4) {
|
||||
if (a0.height > 0 && env0_3.get()) {
|
||||
binding = env0_1;
|
||||
binding.set(a0.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleKeyboardShow(a0) { // fn#86151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2240, offset: 0x01f89ae1, size: 110 bytes, params: 2, frame: 14
|
||||
var value;
|
||||
var isKeyboardOverlappingAppEntryBinding;
|
||||
var isKeyboardOverlappingAppEntry2;
|
||||
var binding;
|
||||
if (!(a0 <= 0)) {
|
||||
value = environment.__proto__.__proto__;
|
||||
isKeyboardOverlappingAppEntryBinding = isKeyboardOverlappingAppEntry;
|
||||
value = environment.__proto__;
|
||||
isKeyboardOverlappingAppEntry2 = isKeyboardOverlappingAppEntryBinding(env1_0);
|
||||
if (isKeyboardOverlappingAppEntry2 != null) {
|
||||
env1_3.set(isKeyboardOverlappingAppEntry2);
|
||||
}
|
||||
if (isKeyboardOverlappingAppEntry2 !== false) {
|
||||
if (isKeyboardOverlappingAppEntry2 === true) {
|
||||
binding = env1_2;
|
||||
binding.set(true);
|
||||
binding = env1_1;
|
||||
binding.set(a0);
|
||||
}
|
||||
} else {
|
||||
env1_2.set(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86152(a0) { // fn#86152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1673, offset: 0x01f89b4f, size: 69 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
|
||||
value.keyboardControllerKeyboardWillShow(a0.height);
|
||||
handleKeyboardShow(a0.height);
|
||||
}
|
||||
|
||||
function _fun86153(a0) { // fn#86153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1823, offset: 0x01f89b94, size: 69 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */;
|
||||
value.keyboardControllerKeyboardDidShow(a0.height);
|
||||
handleKeyboardShow(a0.height);
|
||||
}
|
||||
|
||||
function _fun86154() { // fn#86154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:1973, offset: 0x01f89bd9, size: 82 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
(importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */).keyboardControllerKeyboardWillHide();
|
||||
value = environment.__proto__;
|
||||
const binding = env1_3;
|
||||
const get = binding.get;
|
||||
if (Reflect.apply(get, binding, [])) {
|
||||
if (!env0_0) {
|
||||
env1_2.set(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86155() { // fn#86155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2106, offset: 0x01f89c2b, size: 79 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
(importDefault(1847) /* metro dependency 1847: KeyboardStateDebugging */).keyboardControllerKeyboardDidHide();
|
||||
value = environment.__proto__;
|
||||
const binding = env1_3;
|
||||
const get = binding.get;
|
||||
if (Reflect.apply(get, binding, [])) {
|
||||
env1_2.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86156() { // fn#86156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11469:2190, offset: 0x01f89c7a, size: 63 bytes, params: 1, frame: 10
|
||||
env0_1.remove();
|
||||
env0_2.remove();
|
||||
env0_3.remove();
|
||||
env0_4.remove();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
/* Metro module 15132; source: modules/main_tabs_v2/native/friends/FriendsNavigator.tsx; dependencies: [31, 27, 33, 9884, 4501, 697, 9606, 9603, 11944, 1244, 15133, 4884, 5280, 15134, 15140, 15153, 15154, 15155, 15161, 15162, 15163, 15165, 15168, 15169, 4003, 1585, 3868, 2] */
|
||||
function _fun115344(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:6, offset: 0x0245d680, size: 329 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
|
||||
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
|
||||
backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/FriendsNavigator.tsx');
|
||||
exports.default = ThemedFriendsNavigator;
|
||||
}
|
||||
|
||||
function RequestsSettingsModalButton({onPress}) { // fn#115345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:402, offset: 0x0245d7c9, size: 163 bytes, params: 2, frame: 21
|
||||
const PressableNavigatorButtonWrapper = importDefault(9606) /* metro dependency 9606: PressableNavigatorButtonWrapper */;
|
||||
const HeaderIconButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderIconButton;
|
||||
const object = {source: importDefault(11944) /* metro dependency 11944 */, onPress: onPress};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/']);
|
||||
return (
|
||||
<PressableNavigatorButtonWrapper isModal>
|
||||
<HeaderIconButton {...object} />
|
||||
</PressableNavigatorButtonWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
function FriendsNavigator() { // fn#115346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:607, offset: 0x0245d86c, size: 1187 bytes, params: 1, frame: 26
|
||||
const env0_0 = useStyles();
|
||||
const env0_1 = (importDefault(15133) /* metro dependency 15133: useThemedHeaderOptions */)();
|
||||
env0_3.useLayoutEffect(_fun115347, []);
|
||||
const env0_2 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
|
||||
const Navigator = env0_7.Navigator;
|
||||
const object2 = {screenOptions: screenOptions_115348};
|
||||
let Screen = env0_7.Screen;
|
||||
const items2 = [<Screen name="root" options={function({navigation}) {
|
||||
var object = {};
|
||||
object.title = require(dependencyMap[9]).intl.string(require(dependencyMap[9]).t.TdEu5X);
|
||||
object.headerRight = _fun115351;
|
||||
return object;
|
||||
}} getComponent={function() {
|
||||
return require(dependencyMap[13]).default;
|
||||
}} />];
|
||||
Screen = env0_7.Screen;
|
||||
const object3 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object3.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.jD1qzM]);
|
||||
items2[1] = <Screen name="new-message" options={object3} getComponent={function() {
|
||||
return require(dependencyMap[14]).default;
|
||||
}} />;
|
||||
Screen = env0_7.Screen;
|
||||
const object5 = {};
|
||||
object5.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3hF1W4']);
|
||||
items2[2] = <Screen name="gdm" options={object5} getComponent={function() {
|
||||
return require(dependencyMap[15]).default;
|
||||
}} />;
|
||||
Screen = env0_7.Screen;
|
||||
const object7 = {};
|
||||
object7.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w5uwoI);
|
||||
items2[3] = <Screen name="add-friend" options={object7} getComponent={function() {
|
||||
return require(dependencyMap[16]).default;
|
||||
}} />;
|
||||
Screen = env0_7.Screen;
|
||||
const object9 = {};
|
||||
object9.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zIJnA6);
|
||||
items2[4] = <Screen name="add-friends" options={object9} getComponent={function() {
|
||||
return require(dependencyMap[17]).default;
|
||||
}} />;
|
||||
Screen = env0_7.Screen;
|
||||
string = intl.string;
|
||||
const QzVsOs = (require(1244) /* metro dependency 1244: indexNative */).t.QzVsOs;
|
||||
items2[5] = <Screen name="username-search" options={{title: Reflect.apply(string, intl,
|
||||
[QzVsOs])}} getComponent={function() {
|
||||
return require(dependencyMap[18]).default;
|
||||
}} />;
|
||||
Screen = env0_7.Screen;
|
||||
const object11 = {};
|
||||
object11.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1uAmCw']);
|
||||
items2[6] = <Screen name="suggested-friends" options={object11} getComponent={function() {
|
||||
return require(dependencyMap[19]).default;
|
||||
}} />;
|
||||
Screen = env0_7.Screen;
|
||||
string = intl.string;
|
||||
const XT4hVl = (require(1244) /* metro dependency 1244: indexNative */).t.XT4hVl;
|
||||
items2[7] = <Screen name="requests-settings" options={{title: Reflect.apply(string, intl,
|
||||
[XT4hVl])}} getComponent={function() {
|
||||
return require(dependencyMap[20]).default;
|
||||
}} />;
|
||||
Screen = env0_7.Screen;
|
||||
items2[8] = <Screen name="requests" options={function({navigation}) {
|
||||
var object = {};
|
||||
object.title = require(dependencyMap[9]).intl.string(require(dependencyMap[9]).t.fyA115);
|
||||
object.headerRight = _fun115362;
|
||||
return object;
|
||||
}} getComponent={function() {
|
||||
return require(dependencyMap[21]).default;
|
||||
}} />;
|
||||
Screen = env0_7.Screen;
|
||||
const object12 = {};
|
||||
object12.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oHVeHc);
|
||||
items2[9] = <Screen name="spam-requests" options={object12} getComponent={function() {
|
||||
return require(dependencyMap[22]).default;
|
||||
}} />;
|
||||
Screen = env0_7.Screen;
|
||||
const object13 = {};
|
||||
object13.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tFY5Zb);
|
||||
items2[10] = <Screen name="ignored-user-requests" options={object13} getComponent={function() {
|
||||
return require(dependencyMap[23]).default;
|
||||
}} />;
|
||||
return (
|
||||
<Navigator {...object2}>
|
||||
{items2}
|
||||
</Navigator>
|
||||
);
|
||||
}
|
||||
|
||||
function ThemedFriendsNavigator() { // fn#115367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:3162, offset: 0x0245e200, size: 177 bytes, params: 1, frame: 21
|
||||
const value2 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
|
||||
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const styles = useStyles();
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
return (
|
||||
<ThemeContextProvider gradient={value2}>
|
||||
<View style={[styles.container, {paddingLeft: left, paddingRight: right}]}>
|
||||
<FriendsNavigator />
|
||||
</View>
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun115347() { // fn#115347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:677, offset: 0x0245dd0f, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed();
|
||||
}
|
||||
|
||||
function FriendsNavigatorScreenOptions({navigation, route}) { // fn#115348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:802, owner: FriendsNavigator.screenOptions, offset: 0x0245dd34, size: 368 bytes, params: 2, frame: 21
|
||||
var r11;
|
||||
var environment;
|
||||
var r8;
|
||||
var value5;
|
||||
var value7;
|
||||
let params = route.params;
|
||||
let value = null;
|
||||
const value3 = (value == params ? undefined : params.presentation) === 'card';
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_1, r11);
|
||||
params = route.params;
|
||||
object2['contentStyle'] = (value == params ? undefined : params.presentation) === 'card' || value3 ? value : env0_1.contentStyle;
|
||||
object2['headerStyle'] = styles.header;
|
||||
object2['headerShadowVisible'] = false;
|
||||
object2['headerTitle'] = screenOptionsHeaderTitle_115349;
|
||||
object2['headerTitleAlign'] = 'center';
|
||||
const getState = navigation.getState;
|
||||
if (Reflect.apply(getState, navigation, []).routes[0].key !== route.key) {
|
||||
value5 = environment.__proto__;
|
||||
r8 = require(dependencyMap[7]).getRenderModalBackImage(navigation);
|
||||
} else {
|
||||
params = route.params;
|
||||
if ((value == params ? undefined : params.presentation) !== 'card') {
|
||||
value7 = environment.__proto__;
|
||||
r8 = require(dependencyMap[7]).getRenderModalCloseImage(navigation);
|
||||
r11 = dependencyMap;
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
r8 = require(dependencyMap[7]).getRenderModalBackImage(navigation);
|
||||
}
|
||||
}
|
||||
object2['headerLeft'] = r8;
|
||||
params = route.params;
|
||||
value = (value == params ? undefined : params.presentation) === 'card';
|
||||
object2['fullScreenGestureEnabled'] = value || value3;
|
||||
copyDataProperties(object2, env0_2, r11);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function FriendsNavigatorOptions({navigation}) { // fn#115350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:1442, owner: FriendsNavigator.options, offset: 0x0245defb, size: 95 bytes, params: 2, frame: 16
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const TdEu5X = (require(1244) /* metro dependency 1244: indexNative */).t.TdEu5X;
|
||||
return {title: Reflect.apply(string, intl, [TdEu5X]), headerRight: headerRight_115351};
|
||||
}
|
||||
|
||||
function FriendsNavigatorOptions_115361({navigation}) { // fn#115361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:2609, owner: FriendsNavigator.options, offset: 0x0245e103, size: 95 bytes, params: 2, frame: 16
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyA115);
|
||||
object2.headerRight = headerRight_115362;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function screenOptionsHeaderTitle_115349(a0) { // fn#115349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:1051, owner: FriendsNavigator.screenOptions.headerTitle, offset: 0x0245dea4, size: 87 bytes, params: 2, frame: 16
|
||||
const children = a0.children;
|
||||
const value = Object.create(null);
|
||||
value.children = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, children);
|
||||
const GenericHeaderTitle = (require(9603) /* metro dependency 9603: HeaderShared */).GenericHeaderTitle;
|
||||
return <GenericHeaderTitle title={children} {...value2} />;
|
||||
}
|
||||
|
||||
function optionsHeaderRight(a0) { // fn#115351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:1518, owner: FriendsNavigator.options.headerRight, offset: 0x0245df5a, size: 129 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
|
||||
const headerTextButtonProps = {...a0};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
headerTextButtonProps['label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zIJnA6);
|
||||
headerTextButtonProps['onPress'] = function() {
|
||||
return navigation.navigate('add-friends', {sourcePage: 'Friends Screen Header'});
|
||||
};
|
||||
return <HeaderTextButton {...headerTextButtonProps} />;
|
||||
}
|
||||
|
||||
function optionsHeaderRight_115362() { // fn#115362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15329:2685, owner: FriendsNavigator.options.headerRight, offset: 0x0245e162, size: 36 bytes, params: 1, frame: 13
|
||||
return <RequestsSettingsModalButton onPress={function() {
|
||||
return navigation.navigate('requests-settings');
|
||||
}} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
/* Metro module 14805; source: modules/main_tabs_v2/native/friends/components/ActionStatusSubLabel.tsx; dependencies: [31, 33, 4501, 3869, 4017, 4573, 4584, 4504, 2] */
|
||||
function _fun111740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:6, offset: 0x023af92a, size: 315 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
|
||||
return {container: {overflow: 'hidden'}, actionStatus: {position: 'absolute'}};
|
||||
});
|
||||
const announceActioned = function(a0) {
|
||||
var AccessibilityAnnouncer = require(dependencyMap[3]).AccessibilityAnnouncer;
|
||||
AccessibilityAnnouncer.announce(a0);
|
||||
};
|
||||
value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const createAnimatedComponent = value.createAnimatedComponent;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const env0_7 = Reflect.apply(createAnimatedComponent, value, [Text]);
|
||||
object = {code: 'function ActionStatusSubLabelTsx1(){const{hasSecondLine,actioned,lineHeight,fontScale,animate,withTiming,interpolate}=this.__closure;const currentlyHasSecondLine=hasSecondLine&&!actioned.get();const lineHeightValue=lineHeight*fontScale;const currentLineHeightValue=currentlyHasSecondLine?lineHeightValue*2:lineHeightValue;return{height:!animate||!actioned.get()?currentLineHeightValue:withTiming(interpolate(actioned.get()?1:0,[0,1],[currentlyHasSecondLine?lineHeightValue*2:lineHeightValue,lineHeightValue]))};}'};
|
||||
object = {code: 'function ActionStatusSubLabelTsx2(){const{actioned,lineHeight,fontScale,animate,withTiming,interpolate}=this.__closure;const translateYValue=actioned.get()?lineHeight*fontScale:0;return{transform:[{translateY:!animate?translateYValue:withTiming(interpolate(actioned.get()?1:0,[0,1],[0,translateYValue]))}]};}'};
|
||||
object = {code: 'function ActionStatusSubLabelTsx3(){const{actioned,lineHeight,fontScale,animate,withTiming,interpolate}=this.__closure;const translateYValue=actioned.get()?0:-lineHeight*fontScale;return{transform:[{translateY:!animate?translateYValue:withTiming(interpolate(actioned.get()?1:0,[0,1],[translateYValue,0]))}],opacity:!animate?actioned.get()?1:0:withTiming(actioned.get()?1:0)};}'};
|
||||
object = {code: 'function ActionStatusSubLabelTsx4(){const{actioned}=this.__closure;return actioned.get();}'};
|
||||
object = {code: 'function ActionStatusSubLabelTsx5(actioned,actionedPrev){const{actionStatusAccessibilityLabel,runOnJS,announceActioned}=this.__closure;const isActioned=actioned&&actionedPrev===false;if(!isActioned||actionStatusAccessibilityLabel==null){return;}runOnJS(announceActioned)(actionStatusAccessibilityLabel);}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ActionStatusSubLabel.tsx');
|
||||
exports.ActionStatusSubLabel = ActionStatusSubLabel;
|
||||
}
|
||||
|
||||
function ActionStatusSubLabel({lineHeight, textVariant, actioned, label, secondaryLabel, actionStatus, actionStatusAccessibilityLabel, maxFontSizeMultiplier, animate}) { // fn#111743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:2121, offset: 0x023afab6, size: 897 bytes, params: 2, frame: 35
|
||||
lineHeight = lineHeight === undefined ? 16 : lineHeight;
|
||||
textVariant = textVariant === undefined ? 'text-xs/medium' : textVariant;
|
||||
const value = secondaryLabel != null;
|
||||
const value3 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
|
||||
const styles = useStyles();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = ActionStatusSubLabelL;
|
||||
let object2 = {hasSecondLine: value, actioned: actioned, lineHeight: lineHeight, fontScale: value3,
|
||||
animate: animate};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 14210085997091;
|
||||
closure.__initData = env0_8;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue3.useAnimatedStyle;
|
||||
closure = ActionStatusSubLabelY;
|
||||
object2 = {actioned: actioned, lineHeight: lineHeight, fontScale: value3, animate: animate};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 1040596522101;
|
||||
closure.__initData = env0_9;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = ActionStatusSubLabelV;
|
||||
object2 = {actioned: actioned, lineHeight: lineHeight, fontScale: value3, animate: animate};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 2183035188794;
|
||||
closure.__initData = env0_10;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
const useAnimatedReaction = moduleValue5.useAnimatedReaction;
|
||||
closure = function() {
|
||||
return actioned.get();
|
||||
};
|
||||
closure.__closure = {actioned: actioned};
|
||||
closure.__workletHash = 9609826744629;
|
||||
closure.__initData = env0_11;
|
||||
const closure2 = ActionStatusSubLabelV_111748;
|
||||
object2 = {actionStatusAccessibilityLabel: actionStatusAccessibilityLabel};
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.announceActioned = announceActioned;
|
||||
closure2.__closure = object2;
|
||||
closure2.__workletHash = 14141240445417;
|
||||
closure2.__initData = env0_12;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue5, [closure, closure2]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={[styles.container, value4]}>
|
||||
{((Component) => <Component variant={textVariant} maxFontSizeMultiplier={maxFontSizeMultiplier} color="text-default" style={value5} lineClamp={1}>{label}</Component>)(env0_7)}
|
||||
{value && ((Component) => <Component variant={textVariant} maxFontSizeMultiplier={maxFontSizeMultiplier} style={value5} color="text-default" lineClamp={1}>{secondaryLabel}</Component>)(env0_7)}
|
||||
{((Component) => <Component variant={textVariant} maxFontSizeMultiplier={maxFontSizeMultiplier} color="text-default" style={[styles.actionStatus,
|
||||
value6]} lineClamp={1}>{actionStatus}</Component>)(env0_7)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ActionStatusSubLabelL() { // fn#111744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:2405, owner: ActionStatusSubLabel.L, offset: 0x023afe37, size: 207 bytes, params: 1, frame: 21
|
||||
var r5;
|
||||
var r1;
|
||||
var actionedBinding;
|
||||
var value5;
|
||||
var moduleValue;
|
||||
var withTiming;
|
||||
var moduleValue2;
|
||||
var interpolate;
|
||||
var value;
|
||||
const binding = env0_4;
|
||||
if (binding) {
|
||||
actionedBinding = actioned;
|
||||
r5 = !actionedBinding.get();
|
||||
} else {
|
||||
r5 = binding;
|
||||
}
|
||||
const value3 = lineHeight * env0_5;
|
||||
const r4 = r5 ? 2 * value3 : value3;
|
||||
if (animate) {
|
||||
actionedBinding = actioned;
|
||||
if (actionedBinding.get()) {
|
||||
value5 = environment.__proto__;
|
||||
moduleValue = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue.withTiming;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
interpolate = moduleValue2.interpolate;
|
||||
value = actioned.get();
|
||||
value = Reflect.apply(withTiming, moduleValue, [Reflect.apply(interpolate, moduleValue2, [value ? 1 : 0, [0,
|
||||
1],
|
||||
[r5 ? 2 * value3 : value3, value3]])]);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = r4;
|
||||
}
|
||||
} else {
|
||||
r1 = r4;
|
||||
}
|
||||
return {height: r1};
|
||||
}
|
||||
|
||||
function ActionStatusSubLabelY() { // fn#111745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:2767, owner: ActionStatusSubLabel.y, offset: 0x023aff06, size: 171 bytes, params: 1, frame: 22
|
||||
var r1;
|
||||
var value5;
|
||||
var moduleValue;
|
||||
var withTiming;
|
||||
var moduleValue2;
|
||||
var interpolate;
|
||||
const value2 = actioned.get();
|
||||
const value3 = 0;
|
||||
const r3 = value2 ? lineHeight * env0_5 : value3;
|
||||
if (animate) {
|
||||
value5 = environment.__proto__;
|
||||
moduleValue = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue.withTiming;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
interpolate = moduleValue2.interpolate;
|
||||
actionedBinding = actioned;
|
||||
r1 = Reflect.apply(withTiming, moduleValue, [Reflect.apply(interpolate, moduleValue2,
|
||||
[actionedBinding.get() ? 1 : value3, [0, 1], [0, r3]])]);
|
||||
} else {
|
||||
r1 = r3;
|
||||
}
|
||||
return {transform: [{translateY: r1}]};
|
||||
}
|
||||
|
||||
function ActionStatusSubLabelV() { // fn#111746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:3101, owner: ActionStatusSubLabel.V, offset: 0x023affb1, size: 264 bytes, params: 1, frame: 22
|
||||
var r1;
|
||||
var value6;
|
||||
var moduleValue;
|
||||
var withTiming;
|
||||
var moduleValue2;
|
||||
var interpolate;
|
||||
var value9;
|
||||
var moduleValue3;
|
||||
const value2 = actioned.get();
|
||||
const value3 = 0;
|
||||
const r3 = value2 ? value3 : -lineHeight * env0_5;
|
||||
const object2 = {};
|
||||
if (animate) {
|
||||
value6 = environment.__proto__;
|
||||
moduleValue = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue.withTiming;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
interpolate = moduleValue2.interpolate;
|
||||
actionedBinding = actioned;
|
||||
r1 = Reflect.apply(withTiming, moduleValue, [Reflect.apply(interpolate, moduleValue2,
|
||||
[actionedBinding.get() ? 1 : value3, [0, 1], [r3, value3]])]);
|
||||
} else {
|
||||
r1 = r3;
|
||||
}
|
||||
object2.transform = [{translateY: r1}];
|
||||
if (animate) {
|
||||
value9 = environment.__proto__;
|
||||
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue3.withTiming;
|
||||
actionedBinding = actioned;
|
||||
r1 = Reflect.apply(withTiming, moduleValue3, [actionedBinding.get() ? 1 : value3]);
|
||||
} else {
|
||||
actionedBinding = actioned;
|
||||
r1 = actionedBinding.get() ? 1 : value3;
|
||||
}
|
||||
object2.opacity = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function ActionStatusSubLabelV_111748(a0, a1) { // fn#111748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15002:3587, owner: ActionStatusSubLabel.v, offset: 0x023b00b9, size: 89 bytes, params: 3, frame: 12
|
||||
var moduleValue;
|
||||
let value = a0;
|
||||
if (value && a1 === false && actionStatusAccessibilityLabel != null) {
|
||||
value = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value = moduleValue.runOnJS(announceActioned);
|
||||
value(actionStatusAccessibilityLabel);
|
||||
}
|
||||
}
|
||||
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
/* Metro module 15160; source: modules/main_tabs_v2/native/friends/components/AddFriendsContactSyncEmptyState.tsx; dependencies: [31, 27, 33, 4501, 697, 12010, 4573, 1244, 6766, 11997, 4578, 11993, 2] */
|
||||
function _fun115691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15357:6, offset: 0x0246a671, size: 594 bytes, params: 8, frame: 24
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Image;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object6 = {alignItems: 'center'};
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object6.marginTop = PX_24;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginHorizontal = PX_16;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object6.paddingBottom = PX_12;
|
||||
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
|
||||
object6.backgroundColor = CARD_BACKGROUND_DEFAULT;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object4.content = object6;
|
||||
const object8 = {'height': 135, 'width': 216};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object8.marginTop = PX_24;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.marginBottom = PX_16;
|
||||
object4.headerImage = object8;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.title = {'marginBottom': null, 'width': '100%', 'textAlign': 'center', marginBottom: PX_8};
|
||||
const object9 = {};
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object9.marginBottom = PX_24;
|
||||
const PX_48 = (importDefault(697) /* metro dependency 697: native */).space.PX_48;
|
||||
object9.paddingHorizontal = PX_48;
|
||||
object9.width = '100%';
|
||||
object9.alignContent = 'center';
|
||||
object4.subtitle = object9;
|
||||
object4.subtitleText = {textAlign: 'center'};
|
||||
const object10 = {width: '100%'};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object10.paddingBottom = PX_4;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object10.paddingHorizontal = PX_12;
|
||||
object4.trailing = object10;
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/AddFriendsContactSyncEmptyState.tsx');
|
||||
exports.default = AddFriendsContactSyncEmptyState;
|
||||
}
|
||||
|
||||
function AddFriendsContactSyncEmptyState() { // fn#115692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15357:945, offset: 0x0246a8c3, size: 491 bytes, params: 1, frame: 27
|
||||
const styles = useStyles();
|
||||
const items2 = [<Image resizeMode="contain" style={styles.headerImage} source={importDefault(12010) /* metro dependency 12010 */} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
items2[1] = <Text style={styles.title} variant="heading-lg/bold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
intl, [(require(1244) /* metro dependency 1244: indexNative */).t['/G+nci']])}</Text>;
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
const format = intl.format;
|
||||
const OXdOPf = (require(1244) /* metro dependency 1244: indexNative */).t.OXdOPf;
|
||||
const object = {};
|
||||
object.learnMoreHook = (require(11997) /* metro dependency 11997: ContactSyncUtils */).handleOpenLearnMoreLink;
|
||||
items2[2] = <View style={styles.subtitle}><TextWithIOSLinkWorkaround style={styles.subtitleText} variant="text-sm/medium">{Reflect.apply(format,
|
||||
intl, [OXdOPf, object])}</TextWithIOSLinkWorkaround></View>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
const QUXSpo = (require(1244) /* metro dependency 1244: indexNative */).t.QUXSpo;
|
||||
items2[3] = <View style={styles.trailing}><Button variant="primary" size="lg" text={Reflect.apply(string, intl,
|
||||
[QUXSpo])} onPress={onPress_115693} /></View>;
|
||||
return (
|
||||
<View style={styles.content}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function AddFriendsContactSyncEmptyStateOnPress() { // fn#115693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15357:1585, owner: AddFriendsContactSyncEmptyState.onPress, offset: 0x0246aaae, size: 47 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
(require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).openContactSyncModal({},
|
||||
'Add Friends Contact Sync Empty State');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,323 @@
|
||||
/* Metro module 14478; source: modules/main_tabs_v2/native/friends/components/AddFriendsScreenUtils.tsx; dependencies: [5, 1379, 661, 4503, 8800, 4603, 3856, 1244, 11786, 7067, 8783, 2] */
|
||||
function _fun109538(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14675:6, offset: 0x02350d11, size: 228 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
|
||||
const env0_6 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/AddFriendsScreenUtils.tsx');
|
||||
exports.dismissIncomingRequest = function({userId, applicationId}) {
|
||||
importDefault(dependencyMap[4]).cancelFriendRequest({userId: userId, applicationId: applicationId,
|
||||
location: AnalyticsSections.FRIENDS_ADD_FRIENDS_MODAL});
|
||||
};
|
||||
exports.acceptIncomingRequest = function({userId, applicationId}) {
|
||||
importDefault(dependencyMap[4]).maybeConfirmFriendRequestAccept({userId: userId, applicationId: applicationId,
|
||||
location: AnalyticsSections.FRIENDS_ADD_FRIENDS_MODAL});
|
||||
};
|
||||
exports.sendWave = function() {
|
||||
return _sendWave.apply(this, arguments);
|
||||
};
|
||||
exports.addContactSuggestion = function(a0) {
|
||||
importDefault(dependencyMap[10]).addRelationship({userId: a0.id,
|
||||
context: {location: AnalyticsSections.FRIENDS_ADD_FRIENDS_MODAL}, type: undefined,
|
||||
fromFriendSuggestion: true});
|
||||
};
|
||||
}
|
||||
|
||||
function _sendWave() { // fn#109539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14675:174, offset: 0x02350df5, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun109541).apply(this, arguments);
|
||||
}
|
||||
|
||||
async function _fun109541(a0) { // fn#109541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14675:215, offset: 0x02350e3b, size: 476 bytes, params: 2, frame: 25
|
||||
var r1;
|
||||
var r12;
|
||||
var value;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
var binding;
|
||||
var getDMFromUserId;
|
||||
var value5;
|
||||
var binding2;
|
||||
var property;
|
||||
var value6;
|
||||
var getDMChannel;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var binding3;
|
||||
var value11;
|
||||
var trackWaveCtaClicked;
|
||||
var object2;
|
||||
var value12;
|
||||
var sendStickers;
|
||||
var SEND_WAVE;
|
||||
var items2;
|
||||
var value13;
|
||||
var value14;
|
||||
var value15;
|
||||
var binding4;
|
||||
var value16;
|
||||
var openPrivateChannel;
|
||||
var error;
|
||||
var binding5;
|
||||
var presentError;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var iufib1;
|
||||
exceptionLanding59: while (true) {
|
||||
value = a1;
|
||||
value2 = undefined;
|
||||
value3 = false;
|
||||
if (value3) {
|
||||
return value2;
|
||||
}
|
||||
reducibleJoin3: while (true) {
|
||||
if (value !== undefined) {
|
||||
r1 = value;
|
||||
break reducibleJoin3;
|
||||
}
|
||||
value = true;
|
||||
r1 = value;
|
||||
break reducibleJoin3;
|
||||
}
|
||||
await undefined;
|
||||
value = undefined;
|
||||
value4 = false;
|
||||
if (value4) {
|
||||
return value;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_4;
|
||||
getDMFromUserId = binding.getDMFromUserId;
|
||||
value5 = Reflect.apply(getDMFromUserId, binding, [a0]);
|
||||
if (value5 == null) {
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding59;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding59;
|
||||
}
|
||||
try {
|
||||
property = binding2[5];
|
||||
} catch (error) {
|
||||
break exceptionLanding59;
|
||||
}
|
||||
try {
|
||||
value6 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding59;
|
||||
}
|
||||
try {
|
||||
getDMChannel = value6.getDMChannel;
|
||||
} catch (error) {
|
||||
break exceptionLanding59;
|
||||
}
|
||||
try {
|
||||
value7 = Reflect.apply(getDMChannel, value6, [a0]);
|
||||
} catch (error) {
|
||||
break exceptionLanding59;
|
||||
}
|
||||
await value7;
|
||||
try {
|
||||
value8 = undefined;
|
||||
value9 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding59;
|
||||
}
|
||||
if (value9) {
|
||||
return value8;
|
||||
}
|
||||
r12 = value8;
|
||||
} else {
|
||||
r12 = value5;
|
||||
}
|
||||
reduciblePort57: while (true) {
|
||||
exceptionLanding56: while (true) {
|
||||
try {
|
||||
value10 = r12 == null;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
if (value10) {
|
||||
break reduciblePort57;
|
||||
}
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
binding3 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
property = binding3[8];
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
value11 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
trackWaveCtaClicked = value11.trackWaveCtaClicked;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
object2.channelId = r12;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
object2.source = a2;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(trackWaveCtaClicked, value11, [object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
property = binding3[9];
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
value12 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
sendStickers = value12.sendStickers;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
binding = env2_6;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
SEND_WAVE = binding.SEND_WAVE;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
object2.location = SEND_WAVE;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
items2 = ['749054660769218631'];
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
value13 = Reflect.apply(sendStickers, value12, [r12, items2, '', object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
await value13;
|
||||
try {
|
||||
value14 = undefined;
|
||||
value15 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
if (value15) {
|
||||
return value14;
|
||||
}
|
||||
if (r1) {
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
binding4 = env2_2;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
property = binding4[5];
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
value16 = binding(property);
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
openPrivateChannel = value16.openPrivateChannel;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
object2.recipientIds = a0;
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(openPrivateChannel, value16, [object2]);
|
||||
} catch (error) {
|
||||
break exceptionLanding56;
|
||||
}
|
||||
break reduciblePort57;
|
||||
}
|
||||
break reduciblePort57;
|
||||
}
|
||||
binding = env2_0;
|
||||
binding5 = env2_2;
|
||||
value = binding(binding5[6]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding5[7]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding5[7]).t;
|
||||
iufib1 = t.iufib1;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [iufib1])]);
|
||||
break reduciblePort57;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
binding = env2_0;
|
||||
const binding6 = env2_2;
|
||||
value = binding(binding6[6]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding6[7]).intl;
|
||||
Reflect.apply(presentError, value, [intl.string(binding(binding6[7]).t.iufib1)]);
|
||||
}
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/* Metro module 15166; source: modules/main_tabs_v2/native/friends/components/ClearAllIncomingRequestsAlertModal.tsx; dependencies: [5, 31, 33, 8783, 4500, 1244, 4500, 2] */
|
||||
function _fun115756(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:6, offset: 0x0246ce8a, size: 185 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const handleConfirm = function() {
|
||||
return _handleConfirm.apply(this, arguments);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ClearAllIncomingRequestsAlertModal.tsx');
|
||||
exports.default = ClearAllIncomingRequestsAlertModal;
|
||||
}
|
||||
|
||||
function _handleConfirm() { // fn#115758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:212, offset: 0x0246cf43, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun115760).apply(this, arguments);
|
||||
}
|
||||
|
||||
function ClearAllIncomingRequestsAlertModal({incomingRequestCount}) { // fn#115761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:472, offset: 0x0246cfbd, size: 394 bytes, params: 2, frame: 26
|
||||
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.z2pFjo);
|
||||
object2.content = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['0nTvEw'],
|
||||
{incomingRequestCount: incomingRequestCount});
|
||||
const AlertActions = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActions;
|
||||
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
|
||||
object2.actions = <AlertActions><AlertActionButton variant="destructive" onPress={handleConfirm} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cY+Oob'])} key="confirm" /><AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])} key="cancel" /></AlertActions>;
|
||||
return <AlertModal {...object2} />;
|
||||
}
|
||||
|
||||
function* _fun115760() { // fn#115760, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15363:263, offset: 0x0246cf80, size: 61 bytes, params: 1, frame: 12
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_1(env2_2[3]);
|
||||
yield value.clearPendingRelationships();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,318 @@
|
||||
/* Metro module 14806; source: modules/main_tabs_v2/native/friends/components/ContactSuggestionActions.tsx; dependencies: [31, 27, 33, 4017, 4501, 697, 14478, 4504, 4577, 1305, 14807, 4578, 1244, 2] */
|
||||
function _fun111749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:6, offset: 0x023b0112, size: 618 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
object2 = {duration: 200};
|
||||
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object2.easing = Easing.in(Easing2.quad);
|
||||
object2 = {duration: 250};
|
||||
const Easing3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object2.easing = Easing.in(Easing3.quad);
|
||||
object2 = {duration: 250};
|
||||
const Easing4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object2.easing = Easing.in(Easing4.quad);
|
||||
object2 = {duration: 250};
|
||||
const out = Easing.out;
|
||||
const Easing5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
|
||||
object2.easing = Reflect.apply(out, Easing, [Easing5.quad]);
|
||||
const env0_11 = {'mass': 1, 'stiffness': 172, 'damping': 17.3};
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [{icon: {'position': 'absolute', 'top': 4, 'zIndex': 2,
|
||||
'color': null, 'opacity': 0, color: INTERACTIVE_TEXT_DEFAULT}}]);
|
||||
object2 = {code: 'function ContactSuggestionActionsTsx1(){const{right,opacity,scale}=this.__closure;return{right:right.get(),opacity:opacity.get(),transform:[{scale:scale.get()}]};}'};
|
||||
object2 = {code: 'function ContactSuggestionActionsTsx2(){const{buttonOpacity}=this.__closure;return{opacity:buttonOpacity.get()};}'};
|
||||
object2 = {code: 'function ContactSuggestionActionsTsx3(){const{added}=this.__closure;return added.get();}'};
|
||||
object2 = {code: "function ContactSuggestionActionsTsx4(added){const{animate,runOnJS,finishAnimationCallback,scale,withTiming,SCALE_CONFIG,opacity,OPACITY_CONFIG,buttonOpacity,right,withSpring,SPRING_CONFIG,withDelay,OPACITY_OUT_CONFIG,TRANSLATE_OUT_CONFIG}=this.__closure;if(!animate){runOnJS(finishAnimationCallback)();return;}if(added){scale.set(withTiming(1,SCALE_CONFIG));opacity.set(withTiming(1,OPACITY_CONFIG));buttonOpacity.set(withTiming(0,OPACITY_CONFIG));right.set(withSpring(12,SPRING_CONFIG,'respect-motion-settings',function(finished){if(!finished)return;opacity.set(withDelay(1000,withTiming(0,OPACITY_OUT_CONFIG)));scale.set(withDelay(1000,withTiming(0.5,SCALE_CONFIG)));right.set(withDelay(1000,withTiming(-8,TRANSLATE_OUT_CONFIG,'respect-motion-settings',function(finished){if(finished)runOnJS(finishAnimationCallback)();})));}));}else{buttonOpacity.set(1);scale.set(0.5);opacity.set(0);right.set(30);}}"};
|
||||
object2 = {code: "function ContactSuggestionActionsTsx5(finished){const{opacity,withDelay,withTiming,OPACITY_OUT_CONFIG,scale,SCALE_CONFIG,right,TRANSLATE_OUT_CONFIG,runOnJS,finishAnimationCallback}=this.__closure;if(!finished)return;opacity.set(withDelay(1000,withTiming(0,OPACITY_OUT_CONFIG)));scale.set(withDelay(1000,withTiming(0.5,SCALE_CONFIG)));right.set(withDelay(1000,withTiming(-8,TRANSLATE_OUT_CONFIG,'respect-motion-settings',function(finished){if(finished)runOnJS(finishAnimationCallback)();})));}"};
|
||||
object2 = {code: 'function ContactSuggestionActionsTsx6(finished){const{runOnJS,finishAnimationCallback}=this.__closure;if(finished)runOnJS(finishAnimationCallback)();}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ContactSuggestionActions.tsx');
|
||||
exports.ContactSuggestionActions = ContactSuggestionActions;
|
||||
}
|
||||
|
||||
function ContactSuggestionActions({user, added, onAddSuggestion, onFinishAnimation, size, animate}) { // fn#111750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:2682, offset: 0x023b037c, size: 1001 bytes, params: 2, frame: 33
|
||||
var object2;
|
||||
const env0_3 = onFinishAnimation;
|
||||
size = size === undefined ? 'sm' : size;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(30);
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.5);
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const env0_7 = value4;
|
||||
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(1);
|
||||
const env0_8 = value5;
|
||||
const binding = env0_3;
|
||||
const value6 = binding.useCallback(function() {
|
||||
if (onFinishAnimation != null) {
|
||||
global.setTimeout(_fun111752, 1000);
|
||||
}
|
||||
}, [onFinishAnimation, user]);
|
||||
const env0_9 = value6;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = ContactSuggestionActionsB;
|
||||
closure.__closure = {right: value2, opacity: value4, scale: value3};
|
||||
closure.__workletHash = 13774422449074;
|
||||
closure.__initData = env0_13;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue6.useAnimatedStyle;
|
||||
closure = ContactSuggestionActionsE;
|
||||
closure.__closure = {buttonOpacity: value5};
|
||||
closure.__workletHash = 4378005846847;
|
||||
closure.__initData = env0_14;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
|
||||
const value9 = binding.useCallback(_fun111755, [onAddSuggestion, user, added, animate, value2, value4, value3,
|
||||
value5]);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
const useAnimatedReaction = moduleValue7.useAnimatedReaction;
|
||||
closure = function() {
|
||||
return added.get();
|
||||
};
|
||||
closure.__closure = {added: added};
|
||||
closure.__workletHash = 15816115253403;
|
||||
closure.__initData = env0_15;
|
||||
const closure2 = ContactSuggestionActionsD;
|
||||
object2 = {animate: animate};
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.finishAnimationCallback = value6;
|
||||
object2.scale = value3;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.SCALE_CONFIG = env0_9;
|
||||
object2.opacity = value4;
|
||||
object2.OPACITY_CONFIG = env0_7;
|
||||
object2.buttonOpacity = value5;
|
||||
object2.right = value2;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.SPRING_CONFIG = env0_11;
|
||||
object2.withDelay = reanimatedRexportModule.withDelay;
|
||||
object2.OPACITY_OUT_CONFIG = env0_8;
|
||||
object2.TRANSLATE_OUT_CONFIG = env0_10;
|
||||
closure2.__closure = object2;
|
||||
closure2.__workletHash = 6602847520399;
|
||||
closure2.__initData = env0_16;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue7, [closure, closure2]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.icon, value7];
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const view = <View2 pointerEvents="none" style={items2}><Icon source={importDefault(14807) /* metro dependency 14807 */} color={styles.icon.color} /></View2>;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const OYkgVk = (require(1244) /* metro dependency 1244: indexNative */).t.OYkgVk;
|
||||
return (
|
||||
<View>
|
||||
{view}
|
||||
<View3 style={value8}>
|
||||
<Button
|
||||
variant="secondary"
|
||||
size={size}
|
||||
grow={false}
|
||||
text={Reflect.apply(string, intl, [OYkgVk])}
|
||||
onPress={value9}
|
||||
/>
|
||||
</View3>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun111751() { // fn#111751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:2943, offset: 0x023b0765, size: 48 bytes, params: 1, frame: 13
|
||||
if (onFinishAnimation != null) {
|
||||
global.setTimeout(function() {
|
||||
onFinishAnimation(user);
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
function ContactSuggestionActionsB() { // fn#111753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3026, owner: ContactSuggestionActions.b, offset: 0x023b07a9, size: 73 bytes, params: 1, frame: 11
|
||||
const object3 = {};
|
||||
object3.right = env0_5.get();
|
||||
object3.opacity = env0_7.get();
|
||||
const object4 = {};
|
||||
object4.scale = env0_6.get();
|
||||
object3.transform = [object4];
|
||||
return object3;
|
||||
}
|
||||
|
||||
function ContactSuggestionActionsE() { // fn#111754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3211, owner: ContactSuggestionActions.E, offset: 0x023b07f2, size: 24 bytes, params: 1, frame: 10
|
||||
const object2 = {};
|
||||
object2.opacity = env0_8.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun111755() { // fn#111755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3330, offset: 0x023b080a, size: 141 bytes, params: 1, frame: 13
|
||||
var binding;
|
||||
let value = environment.__proto__;
|
||||
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
|
||||
const addContactSuggestion = value.addContactSuggestion;
|
||||
const userBinding = user;
|
||||
Reflect.apply(addContactSuggestion, value, [userBinding]);
|
||||
onAddSuggestion(userBinding);
|
||||
added.set(true);
|
||||
if (!animate) {
|
||||
binding = env0_5;
|
||||
binding.set(12);
|
||||
binding = env0_7;
|
||||
binding.set(1);
|
||||
binding = env0_6;
|
||||
binding.set(1);
|
||||
binding = env0_8;
|
||||
binding.set(0);
|
||||
}
|
||||
}
|
||||
|
||||
function ContactSuggestionActionsD(a0) { // fn#111757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3569, owner: ContactSuggestionActions.D, offset: 0x023b0897, size: 491 bytes, params: 2, frame: 27
|
||||
var environment;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var binding;
|
||||
var set;
|
||||
var value3;
|
||||
var moduleValue2;
|
||||
var withTiming;
|
||||
var binding2;
|
||||
var moduleValue3;
|
||||
var binding3;
|
||||
var moduleValue4;
|
||||
var moduleValue5;
|
||||
var withSpring;
|
||||
var binding4;
|
||||
var closure;
|
||||
var object2;
|
||||
if (animate) {
|
||||
if (a0) {
|
||||
binding = env0_6;
|
||||
set = binding.set;
|
||||
value3 = environment.__proto__;
|
||||
moduleValue2 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue2.withTiming;
|
||||
binding2 = env1_9;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue2, [1, binding2])]);
|
||||
binding = env0_7;
|
||||
set = binding.set;
|
||||
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue3.withTiming;
|
||||
binding3 = env1_7;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue3, [1, binding3])]);
|
||||
binding = env0_8;
|
||||
set = binding.set;
|
||||
moduleValue4 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue4.withTiming;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, moduleValue4, [0, binding3])]);
|
||||
binding = env0_5;
|
||||
set = binding.set;
|
||||
moduleValue5 = require(4577) /* metro dependency 4577: spring */;
|
||||
withSpring = moduleValue5.withSpring;
|
||||
binding4 = env1_11;
|
||||
closure = DN;
|
||||
object2 = {opacity: env0_7};
|
||||
object2.withDelay = (require(4017) /* metro dependency 4017: ReanimatedRexport */).withDelay;
|
||||
withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.withTiming = withTiming;
|
||||
object2.OPACITY_OUT_CONFIG = env1_8;
|
||||
object2.scale = env0_6;
|
||||
object2.SCALE_CONFIG = binding2;
|
||||
object2.right = env0_5;
|
||||
object2.TRANSLATE_OUT_CONFIG = env1_10;
|
||||
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.finishAnimationCallback = env0_9;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 9570116008915;
|
||||
closure.__initData = env1_17;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withSpring, moduleValue5, [12, binding4,
|
||||
'respect-motion-settings',
|
||||
closure])]);
|
||||
} else {
|
||||
binding = env0_8;
|
||||
binding.set(1);
|
||||
binding = env0_6;
|
||||
binding.set(0.5);
|
||||
binding = env0_7;
|
||||
binding.set(0);
|
||||
binding = env0_5;
|
||||
binding.set(30);
|
||||
}
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS(env0_9)();
|
||||
}
|
||||
}
|
||||
|
||||
function DN(a0) { // fn#111758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3745, owner: ContactSuggestionActions.D.n, offset: 0x023b0a82, size: 316 bytes, params: 2, frame: 27
|
||||
var environment;
|
||||
var value;
|
||||
var binding;
|
||||
var set;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var withDelay;
|
||||
var withTiming;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
var moduleValue5;
|
||||
var moduleValue6;
|
||||
var binding2;
|
||||
var closure;
|
||||
var object2;
|
||||
if (a0) {
|
||||
value = environment.__proto__;
|
||||
binding = env1_7;
|
||||
set = binding.set;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withDelay = moduleValue.withDelay;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue, [1000,
|
||||
(require(4504) /* metro dependency 4504: timing */).withTiming(0, env2_8)])]);
|
||||
binding = env1_6;
|
||||
set = binding.set;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withDelay = moduleValue3.withDelay;
|
||||
moduleValue4 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue4.withTiming;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue3, [1000, Reflect.apply(withTiming,
|
||||
moduleValue4,
|
||||
[0.5, env2_9])])]);
|
||||
binding = env1_5;
|
||||
set = binding.set;
|
||||
moduleValue5 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
withDelay = moduleValue5.withDelay;
|
||||
moduleValue6 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue6.withTiming;
|
||||
binding2 = env2_10;
|
||||
closure = n_body;
|
||||
object2 = {};
|
||||
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.finishAnimationCallback = env1_9;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 5242616772399;
|
||||
closure.__initData = env2_18;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue5, [1000, Reflect.apply(withTiming,
|
||||
moduleValue6,
|
||||
[-8, binding2, 'respect-motion-settings', closure])])]);
|
||||
}
|
||||
}
|
||||
|
||||
function n_body(a0) { // fn#111759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15003:3957, owner: ContactSuggestionActions.D.n.body, offset: 0x023b0bbe, size: 56 bytes, params: 2, frame: 12
|
||||
var value;
|
||||
var runOnJS;
|
||||
var value2;
|
||||
if (a0) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = value.runOnJS;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
Reflect.apply(runOnJS, value, [env2_9])();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
/* Metro module 15159; source: modules/main_tabs_v2/native/friends/components/ContactSuggestionRow.tsx; dependencies: [31, 4502, 661, 33, 3995, 4017, 1244, 632, 14478, 14477, 7707, 14805, 14806, 683, 2] */
|
||||
function _fun115684(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:6, offset: 0x0246a08a, size: 216 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = constantsModule.AnalyticEvents;
|
||||
const env0_6 = constantsModule.InstantInviteSources;
|
||||
const env0_7 = constantsModule.RelationshipTypes;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object = {ADD: 'add'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ContactSuggestionRow.tsx');
|
||||
exports.ContactSuggestionRow = ContactSuggestionRow;
|
||||
}
|
||||
|
||||
function ContactSuggestionRow(a0) { // fn#115685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:378, offset: 0x0246a162, size: 933 bytes, params: 2, frame: 29
|
||||
var r12;
|
||||
var r5;
|
||||
var defaultImport;
|
||||
var defaultImport2;
|
||||
var defaultImport3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var z7y34b;
|
||||
const suggestedFriend = a0.suggestedFriend;
|
||||
const added = a0.added;
|
||||
const onAddSuggestion = a0.onAddSuggestion;
|
||||
let object2 = {'suggestedFriend': 0, 'added': 0, 'onAddSuggestion': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
let value = copyDataProperties({}, a0, object2, undefined);
|
||||
const env0_3 = value;
|
||||
const value2 = undefined;
|
||||
if (suggestedFriend.friendSuggestionName == null) {
|
||||
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
r12 = defaultImport.getName(suggestedFriend.user);
|
||||
} else if (suggestedFriend.friendSuggestionName.length > 0) {
|
||||
r12 = suggestedFriend.friendSuggestionName;
|
||||
} else {
|
||||
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
r12 = defaultImport.getName(suggestedFriend.user);
|
||||
}
|
||||
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const binding = env0_3;
|
||||
binding.useEffect(_fun115686, [added, value6]);
|
||||
const value7 = binding.useMemo(_fun115687, [added]);
|
||||
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const useCallback = binding.useCallback;
|
||||
let user = suggestedFriend.user;
|
||||
const value8 = Reflect.apply(useCallback, binding, [_fun115689, [value6, onAddSuggestion, user]]);
|
||||
let mutualFriendsCount = suggestedFriend == null ? value2 : suggestedFriend.mutualFriendsCount;
|
||||
const r11 = mutualFriendsCount != null && (suggestedFriend == null ? value2 : suggestedFriend.mutualFriendsCount) > 0;
|
||||
const suggestedContactNameForSuggestion = (require(14477) /* metro dependency 14477: FriendSuggestionUtils */).getSuggestedContactNameForSuggestion(r12,
|
||||
suggestedFriend);
|
||||
if (suggestedContactNameForSuggestion != null) {
|
||||
defaultImport3 = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
r5 = '' + defaultImport3.getUserTag(suggestedFriend.user) + ' · ' + suggestedContactNameForSuggestion;
|
||||
} else {
|
||||
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
r5 = defaultImport2.getUserTag(suggestedFriend.user);
|
||||
}
|
||||
const UserRow = importDefault(7707) /* metro dependency 7707: UserRow */;
|
||||
const defaultImport4Props = {...value};
|
||||
user = suggestedFriend.user;
|
||||
defaultImport4Props['user'] = user;
|
||||
const SUGGESTION = RelationshipTypes.SUGGESTION;
|
||||
defaultImport4Props['type'] = SUGGESTION;
|
||||
defaultImport4Props['accessibilityActions'] = value7;
|
||||
defaultImport4Props['onAccessibilityAction'] = value8;
|
||||
defaultImport4Props['labelLineClamp'] = 1;
|
||||
defaultImport4Props['subLabelLineClamp'] = 1;
|
||||
defaultImport4Props['label'] = r12;
|
||||
const ActionStatusSubLabel = (require(14805) /* metro dependency 14805: ActionStatusSubLabel */).ActionStatusSubLabel;
|
||||
object2 = {actioned: value6, label: r5};
|
||||
if (r11) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
z7y34b = (require(1244) /* metro dependency 1244: indexNative */).t.z7y34b;
|
||||
mutualFriendsCount = suggestedFriend == null ? value2 : suggestedFriend.mutualFriendsCount;
|
||||
value = '';
|
||||
value = Reflect.apply(formatToPlainString, intl, [z7y34b, {count: mutualFriendsCount ?? value}]);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value2;
|
||||
}
|
||||
object2.secondaryLabel = r5;
|
||||
const string = intl.string;
|
||||
const Kzyxm9 = (require(1244) /* metro dependency 1244: indexNative */).t.Kzyxm9;
|
||||
object2.actionStatus = Reflect.apply(string, intl, [Kzyxm9]);
|
||||
object2.animate = !useReducedMotion;
|
||||
defaultImport4Props['subLabel'] = <ActionStatusSubLabel {...object2} />;
|
||||
const ContactSuggestionActions = (require(14806) /* metro dependency 14806: ContactSuggestionActions */).ContactSuggestionActions;
|
||||
user = suggestedFriend.user;
|
||||
value = <ContactSuggestionActions user={user} added={value6} onAddSuggestion={onAddSuggestion} animate={value} />;
|
||||
defaultImport4Props['trailing'] = value;
|
||||
return <UserRow {...defaultImport4Props} />;
|
||||
}
|
||||
|
||||
function _fun115686() { // fn#115686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:619, offset: 0x0246a507, size: 25 bytes, params: 1, frame: 11
|
||||
const binding = env0_4;
|
||||
binding.set(added);
|
||||
}
|
||||
|
||||
function _fun115687() { // fn#115687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:659, offset: 0x0246a520, size: 106 bytes, params: 1, frame: 15
|
||||
var items;
|
||||
var object2;
|
||||
var intl;
|
||||
if (added) {
|
||||
items = [];
|
||||
} else {
|
||||
object2 = {};
|
||||
value = environment.__proto__;
|
||||
object2.name = env1_9.ADD;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ed99+i']);
|
||||
items = [object2];
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
function _fun115689({nativeEvent}) { // fn#115689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:812, offset: 0x0246a58a, size: 113 bytes, params: 2, frame: 13
|
||||
var onAddSuggestionBinding;
|
||||
var suggestedFriendBinding;
|
||||
var user;
|
||||
var addContactSuggestion;
|
||||
const actionName = nativeEvent.actionName;
|
||||
let value = environment.__proto__;
|
||||
const ADD = env1_9.ADD;
|
||||
if (actionName === ADD) {
|
||||
env0_4.set(true);
|
||||
onAddSuggestionBinding = onAddSuggestion;
|
||||
suggestedFriendBinding = suggestedFriend;
|
||||
user = suggestedFriendBinding.user;
|
||||
onAddSuggestionBinding(user);
|
||||
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
|
||||
addContactSuggestion = value.addContactSuggestion;
|
||||
user = suggestedFriendBinding.user;
|
||||
return Reflect.apply(addContactSuggestion, value, [user]);
|
||||
}
|
||||
}
|
||||
|
||||
function ContactSuggestionRowOnAddSuggestion(a0) { // fn#115690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15356:1635, owner: ContactSuggestionRow.onAddSuggestion, offset: 0x0246a5fb, size: 118 bytes, params: 2, frame: 19
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const FRIEND_SUGGESTION_ADDED = AnalyticEvents.FRIEND_SUGGESTION_ADDED;
|
||||
Reflect.apply(track, defaultImport, [FRIEND_SUGGESTION_ADDED, {suggested_user_id: a0.id,
|
||||
suggestion_source: suggestedFriend.source,
|
||||
location: env0_3.location ?? InstantInviteSources.ADD_FRIENDS_MODAL}]);
|
||||
onAddSuggestion(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,227 @@
|
||||
/* Metro module 15157; source: modules/main_tabs_v2/native/friends/components/IncomingRequestRow.tsx; dependencies: [31, 4502, 4234, 7690, 661, 33, 4017, 632, 1244, 3995, 14478, 10349, 7707, 14805, 15158, 2] */
|
||||
function _fun115658(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:6, offset: 0x02468aa2, size: 291 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const env0_6 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object = {ACCEPT: 'accept', DECLINE: 'decline', WAVE: 'wave'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/IncomingRequestRow.tsx');
|
||||
exports.IncomingFriendRequestRow = IncomingFriendRequestRow;
|
||||
exports.ConnectedIncomingGameFriendRequestRow = ConnectedIncomingGameFriendRequestRow;
|
||||
}
|
||||
|
||||
function IncomingRequestRow(a0) { // fn#115659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:274, offset: 0x02468bc5, size: 699 bytes, params: 2, frame: 35
|
||||
const user = a0.user;
|
||||
const applicationId = a0.applicationId;
|
||||
const accepted = a0.accepted;
|
||||
const onAcceptIncomingRequest = a0.onAcceptIncomingRequest;
|
||||
const env0_3 = onAcceptIncomingRequest;
|
||||
const onDeclineIncomingRequest = a0.onDeclineIncomingRequest;
|
||||
const accessibilityLabel = a0.accessibilityLabel;
|
||||
const acceptRequestAccessibilityLabel = a0.acceptRequestAccessibilityLabel;
|
||||
const ignoreRequestAccessibilityLabel = a0.ignoreRequestAccessibilityLabel;
|
||||
const acceptedRequestLabel = a0.acceptedRequestLabel;
|
||||
const acceptedRequestAccessibilityLabel = a0.acceptedRequestAccessibilityLabel;
|
||||
const object2 = {'user': 0, 'applicationId': 0, 'accepted': 0, 'onAcceptIncomingRequest': 0,
|
||||
'onDeclineIncomingRequest': 0, 'accessibilityLabel': 0, 'acceptRequestAccessibilityLabel': 0,
|
||||
'ignoreRequestAccessibilityLabel': 0, 'acceptedRequestLabel': 0, 'acceptedRequestAccessibilityLabel': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
let value = copyDataProperties({}, a0, object2, undefined);
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
env0_3.useEffect(_fun115661, [accepted, value3]);
|
||||
const value4 = env0_3.useMemo(_fun115662, [acceptRequestAccessibilityLabel, accepted,
|
||||
ignoreRequestAccessibilityLabel, user]);
|
||||
const value5 = env0_3.useCallback(_fun115663, [applicationId, onAcceptIncomingRequest, onDeclineIncomingRequest,
|
||||
value3, user]);
|
||||
const value7 = env0_3.useMemo(_fun115665,
|
||||
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ApplicationStore],
|
||||
function() {
|
||||
return ApplicationStore.getApplication(applicationId);
|
||||
}), applicationId, (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user)]);
|
||||
const UserRow = importDefault(7707) /* metro dependency 7707: UserRow */;
|
||||
const defaultImport2Props = {...value};
|
||||
defaultImport2Props['user'] = user;
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
defaultImport2Props['type'] = PENDING_INCOMING;
|
||||
const ACTIONS = UserRowModes.ACTIONS;
|
||||
defaultImport2Props['mode'] = ACTIONS;
|
||||
defaultImport2Props['accessibilityActions'] = value4;
|
||||
defaultImport2Props['accessibilityLabel'] = accessibilityLabel;
|
||||
defaultImport2Props['onAccessibilityAction'] = value5;
|
||||
const ActionStatusSubLabel = (require(14805) /* metro dependency 14805: ActionStatusSubLabel */).ActionStatusSubLabel;
|
||||
defaultImport2Props['subLabel'] = <ActionStatusSubLabel actioned={value3} label={value7} actionStatus={acceptedRequestLabel} actionStatusAccessibilityLabel={acceptedRequestAccessibilityLabel} animate={!useReducedMotion} />;
|
||||
const IncomingRequestRowActions = (require(15158) /* metro dependency 15158: IncomingRequestRowActions */).IncomingRequestRowActions;
|
||||
value = <IncomingRequestRowActions user={user} pressed={value3} applicationId={applicationId} onAcceptIncomingRequest={onAcceptIncomingRequest} onDeclineIncomingRequest={onDeclineIncomingRequest} animate={value} acceptRequestAccessibilityLabel={acceptRequestAccessibilityLabel} ignoreRequestAccessibilityLabel={ignoreRequestAccessibilityLabel} />;
|
||||
defaultImport2Props['trailing'] = value;
|
||||
return <UserRow {...defaultImport2Props} />;
|
||||
}
|
||||
|
||||
function IncomingGameFriendRequestRow(a0) { // fn#115666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:1884, offset: 0x02469103, size: 455 bytes, params: 2, frame: 26
|
||||
const user = a0.user;
|
||||
const application = a0.application;
|
||||
const value = Object.create(null);
|
||||
value.user = 0;
|
||||
value.application = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const value4 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user);
|
||||
const incomingRequestRowBindingProps = {user: user, applicationId: application.id};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let formatToPlainString = intl.formatToPlainString;
|
||||
incomingRequestRowBindingProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.u6lp4x, {name: value4}]);
|
||||
incomingRequestRowBindingProps.acceptedRequestLabel = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.gRgJGR,
|
||||
{applicationNameHook: applicationNameHook});
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
const Ke6fRJ = (require(1244) /* metro dependency 1244: indexNative */).t.Ke6fRJ;
|
||||
incomingRequestRowBindingProps.acceptedRequestAccessibilityLabel = Reflect.apply(formatToPlainString, intl, [Ke6fRJ,
|
||||
{name: value4, applicationName: application.name}]);
|
||||
incomingRequestRowBindingProps.acceptRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.kMUpdH,
|
||||
{name: value4, applicationName: application.name});
|
||||
incomingRequestRowBindingProps.ignoreRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.d8Cw5e,
|
||||
{name: value4, applicationName: application.name});
|
||||
copyDataProperties(incomingRequestRowBindingProps, value2, value);
|
||||
return <IncomingRequestRow {...incomingRequestRowBindingProps} />;
|
||||
}
|
||||
|
||||
function IncomingFriendRequestRow(a0) { // fn#115668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:2757, offset: 0x02469310, size: 386 bytes, params: 2, frame: 24
|
||||
const user = a0.user;
|
||||
const value = Object.create(null);
|
||||
value.user = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const value4 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useUserTag(user);
|
||||
const object2 = {user: user};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let formatToPlainString = intl.formatToPlainString;
|
||||
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.u6lp4x, {name: value4}]);
|
||||
object2.acceptedRequestLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0E614Z']);
|
||||
object2.acceptedRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.cRwkp7,
|
||||
{name: value4});
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
const MUfqsS = (require(1244) /* metro dependency 1244: indexNative */).t.MUfqsS;
|
||||
object2.acceptRequestAccessibilityLabel = Reflect.apply(formatToPlainString, intl, [MUfqsS, {name: value4}]);
|
||||
object2.ignoreRequestAccessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['0OF9IB'],
|
||||
{name: value4});
|
||||
copyDataProperties(object2, value2, value);
|
||||
return <IncomingRequestRow {...object2} />;
|
||||
}
|
||||
|
||||
function ConnectedIncomingGameFriendRequestRow(a0) { // fn#115669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:3340, offset: 0x02469492, size: 144 bytes, params: 2, frame: 20
|
||||
const user = a0.user;
|
||||
const env0_0 = a0.applicationId;
|
||||
const value = null;
|
||||
const value2 = Object.create(value);
|
||||
value2.user = 0;
|
||||
value2.applicationId = 0;
|
||||
const value3 = copyDataProperties({}, a0, value2, undefined);
|
||||
const application = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ApplicationStore],
|
||||
function() {
|
||||
return ApplicationStore.getApplication(applicationId);
|
||||
});
|
||||
return value == application ? value : <IncomingGameFriendRequestRow user={user} application={application} {...value3} />;
|
||||
}
|
||||
|
||||
function _fun115661() { // fn#115661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:650, offset: 0x02468e80, size: 25 bytes, params: 1, frame: 11
|
||||
const binding = env0_7;
|
||||
binding.set(accepted);
|
||||
}
|
||||
|
||||
function _fun115662() { // fn#115662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:690, offset: 0x02468e99, size: 198 bytes, params: 1, frame: 20
|
||||
var items;
|
||||
var intl;
|
||||
var formatToPlainString;
|
||||
var m0zYbV;
|
||||
var defaultImport;
|
||||
const acceptedBinding = accepted;
|
||||
const object2 = {};
|
||||
const binding = env1_9;
|
||||
if (acceptedBinding) {
|
||||
object2.name = binding.WAVE;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
m0zYbV = (require(1244) /* metro dependency 1244: indexNative */).t.m0zYbV;
|
||||
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
object2.label = Reflect.apply(formatToPlainString, intl, [m0zYbV, {username: defaultImport.getName(user)}]);
|
||||
items = [object2];
|
||||
} else {
|
||||
object2.name = binding.ACCEPT;
|
||||
object2.label = acceptRequestAccessibilityLabel;
|
||||
items = [object2, {name: env1_9.DECLINE, label: ignoreRequestAccessibilityLabel}];
|
||||
}
|
||||
return items;
|
||||
}
|
||||
|
||||
function _fun115663({nativeEvent}) { // fn#115663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:879, offset: 0x02468f5f, size: 292 bytes, params: 2, frame: 17
|
||||
var userBinding;
|
||||
var id;
|
||||
var onDeclineIncomingRequestBinding;
|
||||
var applicationIdBinding;
|
||||
var dismissIncomingRequest;
|
||||
var onAcceptIncomingRequestBinding;
|
||||
var acceptIncomingRequest;
|
||||
const actionName = nativeEvent.actionName;
|
||||
let value = environment.__proto__;
|
||||
const ACCEPT = env1_9.ACCEPT;
|
||||
if (ACCEPT === actionName) {
|
||||
env0_7.set(true);
|
||||
onAcceptIncomingRequestBinding = onAcceptIncomingRequest;
|
||||
userBinding = user;
|
||||
id = userBinding.id;
|
||||
applicationIdBinding = applicationId;
|
||||
onAcceptIncomingRequestBinding(id, applicationIdBinding);
|
||||
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
|
||||
acceptIncomingRequest = value.acceptIncomingRequest;
|
||||
id = userBinding.id;
|
||||
return Reflect.apply(acceptIncomingRequest, value, [{userId: id, applicationId: applicationIdBinding}]);
|
||||
}
|
||||
const DECLINE = env1_9.DECLINE;
|
||||
if (DECLINE === actionName) {
|
||||
onDeclineIncomingRequestBinding = onDeclineIncomingRequest;
|
||||
userBinding = user;
|
||||
id = userBinding.id;
|
||||
applicationIdBinding = applicationId;
|
||||
onDeclineIncomingRequestBinding(id, applicationIdBinding);
|
||||
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
|
||||
dismissIncomingRequest = value.dismissIncomingRequest;
|
||||
id = userBinding.id;
|
||||
return Reflect.apply(dismissIncomingRequest, value, [{userId: id, applicationId: applicationIdBinding}]);
|
||||
}
|
||||
const WAVE = env1_9.WAVE;
|
||||
if (WAVE === actionName) {
|
||||
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
|
||||
return value.sendWave(user.id, true, 'Incoming Friend Request');
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115665() { // fn#115665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:1299, offset: 0x0246909e, size: 101 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var value3;
|
||||
var ApplicationIconAndName;
|
||||
let applicationBinding = application;
|
||||
if (applicationBinding != null) {
|
||||
value3 = environment.__proto__;
|
||||
ApplicationIconAndName = importDefault(10349) /* metro dependency 10349: ApplicationIconAndName */;
|
||||
applicationBinding = application;
|
||||
r0 = <ApplicationIconAndName application={applicationBinding} textVariant="text-xs/medium" iconSize={12} key={applicationBinding.id} />;
|
||||
} else {
|
||||
r0 = applicationId != null ? '' : env0_8;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function applicationNameHook() { // fn#115667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15354:2192, owner: IncomingGameFriendRequestRow.applicationNameHook, offset: 0x024692ca, size: 70 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(10349) /* metro dependency 10349: ApplicationIconAndName */;
|
||||
const applicationBinding = application;
|
||||
return ((Component) => <Component application={applicationBinding} textVariant="text-xs/medium" iconSize={12} key={applicationBinding.id} />)(value);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
/* Metro module 15158; source: modules/main_tabs_v2/native/friends/components/IncomingRequestRowActions.tsx; dependencies: [31, 27, 33, 4501, 4017, 4504, 14478, 4572, 8341, 13436, 8096, 4578, 1244, 4573, 2] */
|
||||
function _fun115671(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:6, offset: 0x02469522, size: 294 bytes, params: 8, frame: 20
|
||||
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 value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flexDirection: 'row'}});
|
||||
object = {code: "function IncomingRequestRowActionsTsx1(){const{animate,pressed,withTiming}=this.__closure;return{position:'absolute',right:0,flexDirection:'row',opacity:!animate?!pressed.get()?1:0:withTiming(!pressed.get()?1:0,{duration:150}),pointerEvents:!pressed.get()?'auto':'none'};}"};
|
||||
object = {code: "function IncomingRequestRowActionsTsx2(){const{buttonWidth,buttonOffsetX,pressed,animate,withTiming}=this.__closure;const width=buttonWidth.get();const offset=buttonOffsetX.get();const scaleX=!pressed.get()?0.5:1;const translateX=!pressed.get()?width-offset:0;return{transform:[{translateX:!animate?translateX:withTiming(translateX)},{scaleX:!animate?scaleX:withTiming(scaleX)}],opacity:!animate?!pressed.get()?0:1:withTiming(!pressed.get()?0:1),pointerEvents:!pressed.get()?'none':'auto'};}"};
|
||||
object = {code: 'function IncomingRequestRowActionsTsx3(){const{waveWidth,waveHeight}=this.__closure;return{transform:[{translateX:waveWidth.get()/2},{translateY:waveHeight.get()/2}]};}'};
|
||||
object = {code: "function IncomingRequestRowActionsTsx4(){const{withDelay,withRepeat,withTiming,pressed,Easing,waveWidth,waveHeight}=this.__closure;return{transform:[{rotateZ:withDelay(450,withRepeat(withTiming(pressed.get()?'8deg':'-2deg',{duration:150,easing:Easing.inOut(Easing.quad)}),4,true))},{translateX:-waveWidth.get()/2},{translateY:-waveHeight.get()/2}]};}"};
|
||||
object = {code: "function IncomingRequestRowActionsTsx5(){const{pressed}=this.__closure;return{pointerEvents:!pressed.get()?'none':'none'};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/IncomingRequestRowActions.tsx');
|
||||
exports.IncomingRequestRowActions = IncomingRequestRowActions;
|
||||
}
|
||||
|
||||
function IncomingRequestRowActions({user, applicationId, pressed, onAcceptIncomingRequest, onDeclineIncomingRequest, animate, acceptRequestAccessibilityLabel, ignoreRequestAccessibilityLabel}) { // fn#115672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:1809, offset: 0x02469648, size: 1386 bytes, params: 2, frame: 38
|
||||
const env0_3 = onAcceptIncomingRequest;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
|
||||
const env0_8 = value4;
|
||||
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
|
||||
const env0_9 = value5;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = IncomingRequestRowActionsE;
|
||||
let object3 = {animate: animate, pressed: pressed};
|
||||
object3.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
closure.__closure = object3;
|
||||
closure.__workletHash = 1291516991185;
|
||||
closure.__initData = env0_8;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue6.useAnimatedStyle;
|
||||
closure = IncomingRequestRowActionsQ;
|
||||
object3 = {buttonWidth: value3, buttonOffsetX: value2, pressed: pressed, animate: animate};
|
||||
object3.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
closure.__closure = object3;
|
||||
closure.__workletHash = 2207673076655;
|
||||
closure.__initData = env0_9;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue7.useAnimatedStyle;
|
||||
closure = IncomingRequestRowActionsX;
|
||||
closure.__closure = {waveWidth: value4, waveHeight: value5};
|
||||
closure.__workletHash = 4308223742756;
|
||||
closure.__initData = env0_10;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
|
||||
const moduleValue8 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue8.useAnimatedStyle;
|
||||
closure = IncomingRequestRowActionsA;
|
||||
object3 = {withDelay: reanimatedRexportModule.withDelay, withRepeat: reanimatedRexportModule.withRepeat,
|
||||
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, pressed: pressed};
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object3.Easing = Easing;
|
||||
object3.waveWidth = value4;
|
||||
object3.waveHeight = value5;
|
||||
closure.__closure = object3;
|
||||
closure.__workletHash = 6870822621980;
|
||||
closure.__initData = env0_11;
|
||||
const value9 = Reflect.apply(useAnimatedStyle, moduleValue8, [closure]);
|
||||
const moduleValue9 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue9.useAnimatedProps;
|
||||
closure = function() {
|
||||
pressed.get();
|
||||
return {pointerEvents: 'none'};
|
||||
};
|
||||
closure.__closure = {pressed: pressed};
|
||||
closure.__workletHash = 5804402563280;
|
||||
closure.__initData = env0_12;
|
||||
const value10 = Reflect.apply(useAnimatedProps, moduleValue9, [closure]);
|
||||
const binding = env0_3;
|
||||
const value11 = binding.useCallback(function() {
|
||||
pressed.set(true);
|
||||
var moduleValue = require(dependencyMap[6]);
|
||||
var userBinding = user;
|
||||
var applicationIdBinding = applicationId;
|
||||
moduleValue.acceptIncomingRequest({userId: userBinding.id, applicationId: applicationIdBinding});
|
||||
onAcceptIncomingRequest(userBinding.id, applicationIdBinding);
|
||||
}, [applicationId, onAcceptIncomingRequest, pressed, user]);
|
||||
const value12 = binding.useCallback(_fun115679, [applicationId, onDeclineIncomingRequest, user]);
|
||||
const value13 = binding.useCallback(_fun115680, [user]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const object4 = {onLayout: onLayout_115681, style: value6};
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const view = <View2 {...object4}><Stack direction="horizontal" spacing={8}><IconButton size="sm" variant="tertiary" icon={importDefault(13436) /* metro dependency 13436 */} onPress={value12} accessibilityLabel={ignoreRequestAccessibilityLabel} maxFontSizeMultiplier={2} /><IconButton size="sm" variant="active" icon={importDefault(8096) /* metro dependency 8096 */} onPress={value11} accessibilityLabel={acceptRequestAccessibilityLabel} maxFontSizeMultiplier={2} /></Stack></View2>;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const view3Props = {style: value7, onLayout: onLayout_115682, ...value10};
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const n8nU4W = (require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W;
|
||||
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const r13 = animate ? value8 : null;
|
||||
const View5 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const view5Props = {style: animate ? value9 : null, onLayout: onLayout_115683};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{view}
|
||||
<View3 {...view3Props}>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="secondary"
|
||||
text={Reflect.apply(string, intl, [n8nU4W])}
|
||||
icon={<View4 style={r13} accessibilityElementsHidden importantForAccessibility="no-hide-descendants"><View5 {...view5Props}><Text maxFontSizeMultiplier={2} variant="text-sm/normal">{'👋'}</Text></View5></View4>}
|
||||
onPress={value13}
|
||||
/>
|
||||
</View3>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function IncomingRequestRowActionsE() { // fn#115673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:2177, owner: IncomingRequestRowActions.E, offset: 0x02469bb2, size: 148 bytes, params: 1, frame: 17
|
||||
var r2;
|
||||
var value5;
|
||||
var moduleValue;
|
||||
const object2 = {'position': 'absolute', 'right': 0, 'flexDirection': 'row'};
|
||||
if (animate) {
|
||||
value5 = environment.__proto__;
|
||||
moduleValue = require(4504) /* metro dependency 4504: timing */;
|
||||
r2 = moduleValue.withTiming(pressed.get() ? 0 : 1, {duration: 150});
|
||||
} else {
|
||||
r2 = pressed.get() ? 0 : 1;
|
||||
}
|
||||
object2.opacity = r2;
|
||||
object2.pointerEvents = pressed.get() ? 'none' : 'auto';
|
||||
return object2;
|
||||
}
|
||||
|
||||
function IncomingRequestRowActionsQ() { // fn#115674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:2493, owner: IncomingRequestRowActions.q, offset: 0x02469c46, size: 323 bytes, params: 1, frame: 18
|
||||
var r2;
|
||||
var withTiming;
|
||||
var value15;
|
||||
var moduleValue3;
|
||||
const value2 = env0_7.get();
|
||||
const value3 = env0_6.get();
|
||||
const r8 = pressed.get() ? 1 : 0.5;
|
||||
const value7 = pressed.get();
|
||||
const value8 = 0;
|
||||
const r7 = value7 ? value8 : value2 - value3;
|
||||
const object2 = {};
|
||||
const items2 = [{translateX: animate ? (require(4504) /* metro dependency 4504: timing */).withTiming(r7) : r7}];
|
||||
items2[1] = {scaleX: animate ? (require(4504) /* metro dependency 4504: timing */).withTiming(r8) : r8};
|
||||
object2.transform = items2;
|
||||
if (animate) {
|
||||
value15 = environment.__proto__;
|
||||
moduleValue3 = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = moduleValue3.withTiming;
|
||||
pressedBinding = pressed;
|
||||
r2 = Reflect.apply(withTiming, moduleValue3, [pressedBinding.get() ? 1 : value8]);
|
||||
} else {
|
||||
pressedBinding = pressed;
|
||||
r2 = pressedBinding.get() ? 1 : value8;
|
||||
}
|
||||
object2.opacity = r2;
|
||||
object2.pointerEvents = pressed.get() ? 'auto' : 'none';
|
||||
return object2;
|
||||
}
|
||||
|
||||
function IncomingRequestRowActionsX() { // fn#115675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:2917, owner: IncomingRequestRowActions.x, offset: 0x02469d89, size: 74 bytes, params: 1, frame: 13
|
||||
let binding = env0_8;
|
||||
let get = binding.get;
|
||||
const items2 = [{translateX: Reflect.apply(get, binding, []) / 2}];
|
||||
binding = env0_9;
|
||||
get = binding.get;
|
||||
items2[1] = {translateY: Reflect.apply(get, binding, []) / 2};
|
||||
return {transform: items2};
|
||||
}
|
||||
|
||||
function IncomingRequestRowActionsA() { // fn#115676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:3101, owner: IncomingRequestRowActions.A, offset: 0x02469dd3, size: 278 bytes, params: 1, frame: 27
|
||||
let value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = reanimatedRexportModule.withDelay;
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
const withRepeat = moduleValue2.withRepeat;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const pressedBinding = pressed;
|
||||
let get = pressedBinding.get;
|
||||
const r4 = Reflect.apply(get, pressedBinding, []) ? '8deg' : '-2deg';
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const inOut = Easing.inOut;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
value = Reflect.apply(withTiming, timingModule, [r4, {duration: 150, easing: Reflect.apply(inOut, Easing,
|
||||
[Easing2.quad])}]);
|
||||
value = Reflect.apply(withRepeat, moduleValue2, [value, 4, true]);
|
||||
const items2 = [{rotateZ: Reflect.apply(withDelay, reanimatedRexportModule, [450, value])}];
|
||||
let binding = env0_8;
|
||||
get = binding.get;
|
||||
items2[1] = {translateX: -Reflect.apply(get, binding, []) / 2};
|
||||
binding = env0_9;
|
||||
get = binding.get;
|
||||
items2[2] = {translateY: -Reflect.apply(get, binding, []) / 2};
|
||||
return {transform: items2};
|
||||
}
|
||||
|
||||
function _fun115679() { // fn#115679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:3840, offset: 0x02469f65, size: 79 bytes, params: 1, frame: 15
|
||||
const onDeclineIncomingRequestBinding = onDeclineIncomingRequest;
|
||||
const userBinding = user;
|
||||
const id = userBinding.id;
|
||||
const applicationIdBinding = applicationId;
|
||||
onDeclineIncomingRequestBinding(id, applicationIdBinding);
|
||||
const value = environment.__proto__;
|
||||
(require(14478) /* metro dependency 14478: AddFriendsScreenUtils */).dismissIncomingRequest({userId: userBinding.id,
|
||||
applicationId: applicationIdBinding});
|
||||
}
|
||||
|
||||
function _fun115680() { // fn#115680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:3945, offset: 0x02469fb4, size: 60 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = require(14478) /* metro dependency 14478: AddFriendsScreenUtils */;
|
||||
value.sendWave(user.id, true, 'Incoming Friend Request');
|
||||
}
|
||||
|
||||
function IncomingRequestRowActionsOnLayout({nativeEvent}) { // fn#115681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:4074, owner: IncomingRequestRowActions.onLayout, offset: 0x02469ff0, size: 41 bytes, params: 2, frame: 11
|
||||
env0_6.set(nativeEvent.layout.width);
|
||||
}
|
||||
|
||||
function IncomingRequestRowActionsOnLayout_115682({nativeEvent}) { // fn#115682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:4477, owner: IncomingRequestRowActions.onLayout, offset: 0x0246a019, size: 41 bytes, params: 2, frame: 11
|
||||
const binding = env0_7;
|
||||
binding.set(nativeEvent.layout.width);
|
||||
}
|
||||
|
||||
function IncomingRequestRowActionsOnLayout_115683(a0) { // fn#115683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15355:4788, owner: IncomingRequestRowActions.onLayout, offset: 0x0246a042, size: 72 bytes, params: 2, frame: 13
|
||||
let binding = env0_8;
|
||||
binding.set(a0.nativeEvent.layout.width);
|
||||
binding = env0_9;
|
||||
binding.set(a0.nativeEvent.layout.height);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Metro module 15156; source: modules/main_tabs_v2/native/friends/components/ShowAllRow.tsx; dependencies: [31, 27, 33, 4501, 697, 6238, 12808, 1305, 4573, 1244, 2] */
|
||||
function _fun115655(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15353:6, offset: 0x024687af, size: 246 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
const env0_5 = Reflect.apply(createStyles, value, [{labelContainer: {'flexDirection': 'row',
|
||||
'alignItems': 'center'}, showAllText: {marginLeft: PX_12}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/ShowAllRow.tsx');
|
||||
exports.default = ShowAllRow;
|
||||
}
|
||||
|
||||
function ShowAllRow({users, onPress, count}) { // fn#115656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15353:382, offset: 0x024688a5, size: 371 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {onPress: onPress, end: true};
|
||||
const AvatarDuoPile = (require(12808) /* metro dependency 12808: AvatarDuoPileNative */).AvatarDuoPile;
|
||||
const object4 = {};
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XSMALL_20 = AvatarSizes.XSMALL_20;
|
||||
object4.size = XSMALL_20;
|
||||
object4['aria-label'] = '';
|
||||
let value = users.slice(0, 2);
|
||||
value = <AvatarDuoPile {...object4}>{value.map(_fun115657)}</AvatarDuoPile>;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const NrzztX = (require(1244) /* metro dependency 1244: indexNative */).t.NrzztX;
|
||||
object2.label = <View style={styles.labelContainer}>{value}<Text style={styles.showAllText} variant="text-md/semibold" color="text-brand">{Reflect.apply(format,
|
||||
intl, [NrzztX, {count: count}])}</Text></View>;
|
||||
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const Arrow = TableRow2.Arrow;
|
||||
object2.trailing = <Arrow />;
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function _fun115657(a0, a1) { // fn#115657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15353:632, offset: 0x02468a18, size: 138 bytes, params: 3, frame: 22
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const getAvatarSource = a0.getAvatarSource;
|
||||
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
|
||||
const {XSMALL, XSMALL_20} = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
return (
|
||||
<Avatar
|
||||
source={Reflect.apply(getAvatarSource, a0, [null, false, AVATAR_SIZE_MAP[XSMALL]])}
|
||||
size={XSMALL_20}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/* Metro module 14480; source: modules/main_tabs_v2/native/friends/components/useSuggestedFriends.tsx; dependencies: [57, 31, 5244, 12016, 632, 22, 3995, 2] */
|
||||
function _fun109552(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:6, offset: 0x02351613, size: 175 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const friendSuggestionStore = importDefault(5244) /* metro dependency 5244: FriendSuggestionStore */;
|
||||
const env0_6 = (require(12016) /* metro dependency 12016: FriendsScreenConstants */).SuggestedFriendSource;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/components/useSuggestedFriends.tsx');
|
||||
exports.default = useSuggestedFriends;
|
||||
}
|
||||
|
||||
function useSuggestedFriends(a0) { // fn#109553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:274, offset: 0x023516c2, size: 218 bytes, params: 2, frame: 18
|
||||
const isConnected = (a0 ?? ({})).isConnected;
|
||||
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([FriendSuggestionStore],
|
||||
function() {
|
||||
return FriendSuggestionStore.getSuggestions();
|
||||
});
|
||||
const [property, property2] = env0_3(env0_4.useState([]), 2);
|
||||
const r3 = isConnected == null || isConnected;
|
||||
value = env0_4.useMemo(_fun109555, [property, value2, r3]);
|
||||
return {added: property, setAdded: property2, friendSuggestions: value,
|
||||
numFriendSuggestions: r3 ? value.length : value2.length};
|
||||
}
|
||||
|
||||
function _fun109555() { // fn#109555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:469, offset: 0x023517af, size: 125 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
var binding;
|
||||
var value2;
|
||||
var value3;
|
||||
var value;
|
||||
if (env0_2) {
|
||||
binding = env0_1;
|
||||
value2 = binding.filter(function({source}) {
|
||||
return source === SuggestedFriendSource.USER_SUGGESTIONS;
|
||||
});
|
||||
binding = env0_0;
|
||||
value = binding.map(_fun109557);
|
||||
value3 = environment.__proto__;
|
||||
value = (importDefault(22) /* metro dependency 22 */).unionBy(value2, value, _fun109558);
|
||||
return value.sort(_fun109559);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function _fun109557({user, name, contactNames}) { // fn#109557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:549, offset: 0x02351847, size: 68 bytes, params: 2, frame: 5
|
||||
value = environment.__proto__.__proto__;
|
||||
const USER_SUGGESTIONS = SuggestedFriendSource.USER_SUGGESTIONS;
|
||||
return {user: user, friendSuggestionName: name ?? undefined, source: USER_SUGGESTIONS, contactNames: contactNames};
|
||||
}
|
||||
|
||||
function _fun109559({user}, {user}) { // fn#109559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14677:732, offset: 0x0235188b, size: 85 bytes, params: 3, frame: 15
|
||||
let value = environment.__proto__.__proto__;
|
||||
let getName = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName;
|
||||
value = Reflect.apply(getName, value, [user]);
|
||||
const localeCompare = value.localeCompare;
|
||||
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
getName = defaultImport.getName;
|
||||
return Reflect.apply(localeCompare, value, [Reflect.apply(getName, defaultImport, [user])]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
/* Metro module 15167; source: modules/main_tabs_v2/native/friends/hooks/getPendingRelationshipIds.tsx; dependencies: [3793, 661, 2] */
|
||||
function _fun115762(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:6, offset: 0x0246d147, size: 161 bytes, params: 8, frame: 18
|
||||
const _arrayLikeToArray_115765 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const env0_1 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/hooks/getPendingRelationshipIds.tsx');
|
||||
exports.getPendingRelationshipIds = getPendingRelationshipIds;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_115763(a0, a1) { // fn#115763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:139, offset: 0x0246d1e8, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun115764;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_115765(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_115765(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_115765(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun115764;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function filterFromPending(a0) { // fn#115766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:1071, offset: 0x0246d35c, size: 41 bytes, params: 2, frame: 12
|
||||
return RelationshipStore.isSpam(a0) || RelationshipStore.isIgnored(a0);
|
||||
}
|
||||
|
||||
function getPendingRelationshipIds(a0) { // fn#115767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15364:1237, offset: 0x0246d385, size: 297 bytes, params: 2, frame: 22
|
||||
var r5;
|
||||
var r0;
|
||||
var value5;
|
||||
var value6;
|
||||
var PENDING_INCOMING;
|
||||
var value7;
|
||||
var value8;
|
||||
var PENDING_OUTGOING;
|
||||
var value9;
|
||||
var isSpam2;
|
||||
var value10;
|
||||
var isIgnored2;
|
||||
var value11;
|
||||
const items5 = [];
|
||||
const items2 = [];
|
||||
const items3 = [];
|
||||
const items4 = [];
|
||||
const value3 = _createForOfIteratorHelperLoose_115763(a0.keys());
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r5 = value4;
|
||||
while (true) {
|
||||
value5 = r5.value;
|
||||
value6 = a0.get(value5);
|
||||
PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
value7 = value6 !== PENDING_INCOMING;
|
||||
if (value7) {
|
||||
r0 = value7;
|
||||
} else {
|
||||
value8 = filterFromPending(value5);
|
||||
r0 = value8;
|
||||
}
|
||||
if (r0) {
|
||||
continue;
|
||||
}
|
||||
items5.push(value5);
|
||||
PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
|
||||
if (value6 !== PENDING_OUTGOING) {
|
||||
continue;
|
||||
}
|
||||
items2.push(value5);
|
||||
PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
value9 = value6 === PENDING_INCOMING;
|
||||
if (!value9) {
|
||||
r0 = value9;
|
||||
continue;
|
||||
}
|
||||
isSpam2 = RelationshipStore.isSpam(value5);
|
||||
r0 = isSpam2;
|
||||
if (!r0) {
|
||||
continue;
|
||||
}
|
||||
items3.push(value5);
|
||||
PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
value10 = value6 === PENDING_INCOMING;
|
||||
if (!value10) {
|
||||
r0 = value10;
|
||||
continue;
|
||||
}
|
||||
isIgnored2 = RelationshipStore.isIgnored(value5);
|
||||
r0 = isIgnored2;
|
||||
if (!r0) {
|
||||
continue;
|
||||
}
|
||||
items4.push(value5);
|
||||
value11 = value3();
|
||||
done = value11.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r5 = value11;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
items5.reverse();
|
||||
items2.reverse();
|
||||
items3.reverse();
|
||||
return {pendingIncomingIds: items5, pendingOutgoingIds: items2, spamIds: items3, ignoredUserIds: items4};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,358 @@
|
||||
/* Metro module 12616; source: modules/main_tabs_v2/native/friends/screens/AddFriendById.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 1244, 4573, 6985, 12617, 8787, 8783, 3856, 683, 3869, 7681, 4578, 2] */
|
||||
function _fun96767(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:6, offset: 0x02165c1f, size: 759 bytes, params: 8, frame: 29
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const getDefaultTextState = function() {
|
||||
var object = {validatedText: ''};
|
||||
object.hint = require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t['6p7Mhh']);
|
||||
return object;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = value2.Keyboard;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = constantsModule.PLACEHOLDER_TAG;
|
||||
const env0_8 = constantsModule.AnalyticEvents;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value4.jsx;
|
||||
const env0_10 = value4.jsxs;
|
||||
const env0_11 = value4.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.container = {'backgroundColor': null, 'alignItems': 'center', 'justifyContent': 'center',
|
||||
'paddingHorizontal': 16, backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
object2.textInputContainer = {alignSelf: 'stretch'};
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
object2.placeholderText = {color: TEXT_MUTED};
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object2.inputAccessoryText = {'fontSize': 12, 'lineHeight': 16, 'marginVertical': 8, color: TEXT_SUBTLE};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.redesignInputAccessoryText = {marginBottom: PX_8};
|
||||
object2.inputHeaderText = {marginTop: 0};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.redesignGrow = {flexGrow: 2, minHeight: PX_24};
|
||||
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
||||
object2.errorStateText = {color: RED_400, marginVertical: 4};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.friendMessageContainer = {alignSelf: 'stretch', marginTop: PX_16};
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.messageLabel = {marginBottom: PX_4};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object2.messageFooterText = {marginTop: PX_4};
|
||||
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
object2 = {SUCCESS: 0};
|
||||
object2[0] = 'SUCCESS';
|
||||
object2.ERROR = 1;
|
||||
object2[1] = 'ERROR';
|
||||
object2.LOADING = 2;
|
||||
object2[2] = 'LOADING';
|
||||
object2.NONE = 3;
|
||||
object2[3] = 'NONE';
|
||||
object2 = {DISCORD_TAG: 'DISCORD_TAG', MESSAGE: 'MESSAGE'};
|
||||
const env0_15 = value.forwardRef(_fun96770);
|
||||
value = value.forwardRef(_fun96771);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/AddFriendById.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function ErrorMessage({errorMessage}) { // fn#96769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:1278, offset: 0x02165f66, size: 105 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-xs/medium"
|
||||
color="text-feedback-critical"
|
||||
style={[styles.inputAccessoryText, styles.errorStateText]}
|
||||
>
|
||||
{errorMessage}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun96770({textState, onChangeText, onSelectionChange, onKeyPress, onSubmitEditing, onFocus, validationState, autoFocus, headerText, headerTextStyle}, a1) { // fn#96770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:1486, offset: 0x02165fcf, size: 664 bytes, params: 3, frame: 33
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const r10 = headerText !== undefined ? headerText : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YegTF2).toUpperCase();
|
||||
const styles = useStyles();
|
||||
let status = validationState.status;
|
||||
let ERROR = env0_13.ERROR;
|
||||
const message = status !== ERROR || validationState.field !== env0_14.DISCORD_TAG ? undefined : validationState.message;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const items2 = [<Text style={[styles.redesignInputAccessoryText, styles.inputHeaderText,
|
||||
headerTextStyle]} variant="text-sm/semibold" color="text-muted">{r10}</Text>];
|
||||
const TextField = (require(6985) /* metro dependency 6985: TextFieldNative */).TextField;
|
||||
const textFieldProps2 = {ref: a1, value: textState.validatedText,
|
||||
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qRaqel)};
|
||||
status = validationState.status;
|
||||
ERROR = env0_13.ERROR;
|
||||
textFieldProps2.accessibilityHint = status !== ERROR ? undefined : validationState.a11yMessage;
|
||||
textFieldProps2.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qRaqel);
|
||||
textFieldProps2.placeholderTextColor = styles.placeholderText.color;
|
||||
textFieldProps2.onChange = onChangeText;
|
||||
textFieldProps2.onSelectionChange = onSelectionChange;
|
||||
textFieldProps2.onKeyPress = onKeyPress;
|
||||
textFieldProps2.onSubmitEditing = onSubmitEditing;
|
||||
textFieldProps2.autoCapitalize = 'none';
|
||||
textFieldProps2.returnKeyType = 'send';
|
||||
textFieldProps2.keyboardType = 'twitter';
|
||||
textFieldProps2.autoCorrect = false;
|
||||
textFieldProps2.blurOnSubmit = true;
|
||||
textFieldProps2.maxLength = 37;
|
||||
textFieldProps2.autoFocus = autoFocus;
|
||||
textFieldProps2.onFocus = onFocus;
|
||||
textFieldProps2.status = message != null ? 'error' : undefined;
|
||||
items2[1] = <TextField {...textFieldProps2} />;
|
||||
items2[2] = message != null ? <ErrorMessage errorMessage={message} /> : null;
|
||||
return (
|
||||
<View style={styles.textInputContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun96771({style, onFocus, autoFocusInput, headerText, headerTextStyle, sourcePage}, a1) { // fn#96771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:2502, offset: 0x02166267, size: 1215 bytes, params: 3, frame: 38
|
||||
var r7;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items4;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const env0_1 = binding.useRef(0);
|
||||
const env0_2 = binding.useRef('');
|
||||
let useState = binding.useState;
|
||||
const value3 = Reflect.apply(useState, binding, [function() {
|
||||
return getDefaultTextState();
|
||||
}]);
|
||||
const binding2 = env0_3;
|
||||
const value4 = binding2(value3, 2);
|
||||
const property = value4[0];
|
||||
var env0_4 = value4[1];
|
||||
useState = binding.useState;
|
||||
const NONE = env0_13.NONE;
|
||||
const value5 = binding2(Reflect.apply(useState, binding, [{status: NONE}]), 2);
|
||||
const property2 = value5[0];
|
||||
const env0_6 = value5[1];
|
||||
useState = binding.useState;
|
||||
const value6 = binding2(Reflect.apply(useState, binding, ['']), 2);
|
||||
const property3 = value6[0];
|
||||
const env0_8 = value6[1];
|
||||
let defaultImport = importDefault(12617) /* metro dependency 12617: FriendRequestMessageExperiment */;
|
||||
const useConfig = defaultImport.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'AddFriendbyId'}]).enabled;
|
||||
const value7 = binding.useCallback(_fun96773, [property2]);
|
||||
const value8 = binding.useCallback(_fun96774, [property2]);
|
||||
const closure = onSubmitEditing_96775;
|
||||
binding.useEffect(function() {
|
||||
var defaultImport = importDefault(dependencyMap[14]);
|
||||
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
|
||||
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: 'Id', source_page: sourcePage});
|
||||
}, [sourcePage]);
|
||||
binding.useEffect(_fun96779, [property2]);
|
||||
const validatedText = property.validatedText;
|
||||
const length = validatedText.trim().length;
|
||||
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
const items2 = [styles.container, style];
|
||||
const env0_152 = ((Component) => <Component textState={property} onChangeText={value7} onSelectionChange={onSelectionChange} onKeyPress={onKeyPress} onSubmitEditing={closure} onFocus={onFocus} validationState={property2} autoFocus={autoFocusInput} headerText={headerText} headerTextStyle={headerTextStyle} ref={a1} />)(env0_15);
|
||||
if (enabled) {
|
||||
var viewBinding2Props = {style: styles.friendMessageContainer};
|
||||
items4 = [<Text style={[styles.messageLabel, styles.inputHeaderText,
|
||||
headerTextStyle]} variant="text-sm/semibold" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Yi6Mpu)}</Text>];
|
||||
items4[1] = ((TextArea) => <TextArea returnKeyType="done" submitBehavior="submit" value={property3} maxLength={120} onSubmitEditing={closure} onChange={value8} status={property2.field !== env0_14.MESSAGE || property2.status !== env0_13.ERROR ? undefined : 'error'} />)((require(7681) /* metro dependency 7681: TextAreaNative */).TextArea);
|
||||
items4[2] = property2.status !== env0_13.ERROR ? <Text style={styles.messageFooterText} variant="text-xs/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.UtfQNw)}</Text> : property2.field === env0_14.MESSAGE ? <ErrorMessage errorMessage={property2.message} /> : <Text style={styles.messageFooterText} variant="text-xs/medium" color="text-muted">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.UtfQNw)}</Text>;
|
||||
r7 = <View {...viewBinding2Props}>{items4}</View>;
|
||||
} else {
|
||||
r7 = enabled;
|
||||
}
|
||||
const items5 = [<View style={items2}>{env0_152}{r7}</View>];
|
||||
items5[1] = <View style={styles.redesignGrow} />;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const status = property2.status;
|
||||
const LOADING = env0_13.LOADING;
|
||||
items5[2] = <Button size="lg" text={Reflect.apply(string, intl,
|
||||
[t['PMsq/b']])} disabled={length <= 0} onPress={closure} loading={status === LOADING} grow={false} />;
|
||||
return (
|
||||
<>
|
||||
{items5}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun96773(a0) { // fn#96773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:2860, offset: 0x02166735, size: 226 bytes, params: 2, frame: 19
|
||||
var r2;
|
||||
var value3;
|
||||
var value4;
|
||||
var property;
|
||||
var value9;
|
||||
const binding = env0_4;
|
||||
const length = a0.length;
|
||||
const value2 = 0;
|
||||
if (length <= value2) {
|
||||
value9 = environment.__proto__;
|
||||
r2 = getDefaultTextState();
|
||||
} else {
|
||||
value3 = a0.split('#');
|
||||
value4 = environment.__proto__;
|
||||
property = env1_3(value3, 2)[1];
|
||||
r2 = {validatedText: a0,
|
||||
hint: property != null ? a0 + PLACEHOLDER_TAG.slice(property != null ? property.length + 1 : value2) : ''};
|
||||
}
|
||||
binding(r2);
|
||||
const status = env0_5.status;
|
||||
const ERROR = env1_13.ERROR;
|
||||
if (status === ERROR && env0_5.field === env1_14.DISCORD_TAG) {
|
||||
env0_6({status: env1_13.NONE});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun96774(a0) { // fn#96774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3145, offset: 0x02166817, size: 129 bytes, params: 2, frame: 15
|
||||
env0_8(a0.replace(RegExp('\\n', 'g'), ''));
|
||||
const status = env0_5.status;
|
||||
value = environment.__proto__;
|
||||
const ERROR = env1_13.ERROR;
|
||||
if (status === ERROR && env0_5.field === env1_14.MESSAGE) {
|
||||
env0_6({status: env1_13.NONE});
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_96775() { // fn#96775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3267, offset: 0x02166898, size: 484 bytes, params: 1, frame: 23
|
||||
var environment;
|
||||
var r6;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var object2;
|
||||
var sendRequest;
|
||||
var intl;
|
||||
var value;
|
||||
const value2 = env0_3.validatedText.trim();
|
||||
let binding = env0_7;
|
||||
const value3 = binding.trim();
|
||||
if (value2.length <= 0) {
|
||||
binding = env0_6;
|
||||
object2 = {};
|
||||
value = environment.__proto__;
|
||||
object2.status = env1_13.ERROR;
|
||||
object2.field = env1_14.DISCORD_TAG;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.message = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mxnceg);
|
||||
binding(object2);
|
||||
} else {
|
||||
r6 = !value2.includes('#') && value2.startsWith('@') ? value2.substring(1) : value2;
|
||||
value8 = environment.__proto__;
|
||||
value9 = undefined;
|
||||
value10 = (require(8787) /* metro dependency 8787: FriendsUtils */).validateDiscordTag(r6);
|
||||
if (value10 != null) {
|
||||
env0_6({status: env1_13.ERROR, field: env1_14.DISCORD_TAG, message: value10});
|
||||
} else {
|
||||
env0_6({status: env1_13.LOADING});
|
||||
value = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
||||
sendRequest = value.sendRequest;
|
||||
object2 = {discordTag: r6};
|
||||
object2.context = {location: 'Search - Add Friend Search'};
|
||||
object2.errorUxConfig = (require(8783) /* metro dependency 8783: RelationshipActionCreators */).RelationshipErrorUXConfig.SHOW_ONLY_IF_ACTION_NEEDED;
|
||||
object2.note = value3.length > 0 ? value3 : value9;
|
||||
value = Reflect.apply(sendRequest, value, [object2]);
|
||||
value.then(_fun96776, _fun96777);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun96779() { // fn#96779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:4505, offset: 0x02166d16, size: 104 bytes, params: 1, frame: 13
|
||||
var AccessibilityAnnouncer;
|
||||
const status = env0_5.status;
|
||||
const ERROR = env1_13.ERROR;
|
||||
if (status === ERROR && env0_5.a11yMessage != null) {
|
||||
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
|
||||
AccessibilityAnnouncer.announce(env0_5.a11yMessage);
|
||||
}
|
||||
}
|
||||
|
||||
function onSelectionChange({nativeEvent}) { // fn#96780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:4759, offset: 0x02166d7e, size: 50 bytes, params: 2, frame: 3
|
||||
const start = nativeEvent.selection.start;
|
||||
if (start !== env0_1.current) {
|
||||
env0_1.current = start;
|
||||
}
|
||||
}
|
||||
|
||||
function onKeyPress({nativeEvent}) { // fn#96781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:4840, offset: 0x02166db0, size: 31 bytes, params: 2, frame: 2
|
||||
env0_2.current = nativeEvent.key;
|
||||
}
|
||||
|
||||
function _fun96776() { // fn#96776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3784, offset: 0x02166a7c, size: 177 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
let binding = env1_4;
|
||||
binding(getDefaultTextState());
|
||||
env1_8('');
|
||||
binding = env1_6;
|
||||
const object2 = {};
|
||||
const SUCCESS = env2_13.SUCCESS;
|
||||
object2.status = SUCCESS;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const Rtl1Ep = (require(1244) /* metro dependency 1244: indexNative */).t.Rtl1Ep;
|
||||
object2.message = Reflect.apply(format, intl, [Rtl1Ep, {discordTag: env0_0}]);
|
||||
binding(object2);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentAddedFriendToast();
|
||||
Keyboard.dismiss();
|
||||
}
|
||||
|
||||
function _fun96777(a0) { // fn#96777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12806:3953, offset: 0x02166b2d, size: 416 bytes, params: 2, frame: 22
|
||||
var code;
|
||||
var value2;
|
||||
var binding;
|
||||
var object2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var humanizeAbortCode;
|
||||
var value4;
|
||||
var moduleValue2;
|
||||
var humanizeAbortCodeForA11y;
|
||||
var value6;
|
||||
var value7;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var ckHwck;
|
||||
const value = undefined;
|
||||
if ((a0 == null || a0.body == null ? value : a0.body.note) != null) {
|
||||
value6 = environment.__proto__;
|
||||
binding = env1_6;
|
||||
object2 = {};
|
||||
value7 = environment.__proto__.__proto__;
|
||||
object2.status = env2_13.ERROR;
|
||||
object2.field = env2_14.MESSAGE;
|
||||
string = intl.string;
|
||||
ckHwck = t.ckHwck;
|
||||
object2.message = Reflect.apply(string, intl, [ckHwck]);
|
||||
string = intl.string;
|
||||
ckHwck = t.ckHwck;
|
||||
object2.a11yMessage = Reflect.apply(string, intl, [ckHwck]);
|
||||
binding(object2);
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
binding = env1_6;
|
||||
object2 = {};
|
||||
value3 = environment.__proto__.__proto__;
|
||||
object2.status = env2_13.ERROR;
|
||||
object2.field = env2_14.DISCORD_TAG;
|
||||
moduleValue = require(8787) /* metro dependency 8787: FriendsUtils */;
|
||||
humanizeAbortCode = moduleValue.humanizeAbortCode;
|
||||
code = a0 == null || a0.body == null ? value : a0.body.code;
|
||||
value4 = -1;
|
||||
object2.message = Reflect.apply(humanizeAbortCode, moduleValue, [code ?? value4, env0_0]);
|
||||
moduleValue2 = require(8787) /* metro dependency 8787: FriendsUtils */;
|
||||
humanizeAbortCodeForA11y = moduleValue2.humanizeAbortCodeForA11y;
|
||||
code = a0 == null || a0.body == null ? value : a0.body.code;
|
||||
object2.a11yMessage = Reflect.apply(humanizeAbortCodeForA11y, moduleValue2, [code ?? value4, env0_0]);
|
||||
binding(object2);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/* Metro module 15154; source: modules/main_tabs_v2/native/friends/screens/AddFriendScreen.tsx; dependencies: [57, 31, 27, 1878, 661, 11995, 33, 4501, 697, 11997, 3995, 683, 1244, 9212, 9603, 477, 7704, 4573, 12616, 12618, 2] */
|
||||
function _fun115595(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:6, offset: 0x0246650f, size: 436 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = value.ScrollView;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_9 = (require(11995) /* metro dependency 11995: ContactSyncConstants */).ContactPermissions;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const env0_12 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {headerText: {'marginTop': 32, 'marginHorizontal': 16, 'textAlign': 'center'},
|
||||
subheaderText: {'marginVertical': 8, 'marginHorizontal': 16, 'textAlign': 'center'}};
|
||||
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.input = {marginTop: 16, backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
object2.otherOptionsContainer = {'marginTop': 16, 'paddingHorizontal': 16};
|
||||
object2.rowContainer = {marginTop: 8};
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.background = {backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
const env0_13 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/AddFriendScreen.tsx');
|
||||
exports.default = AddFriendScreen;
|
||||
}
|
||||
|
||||
function AddFriendScreen(a0) { // fn#115596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:750, offset: 0x024666c3, size: 745 bytes, params: 2, frame: 32
|
||||
var r11;
|
||||
const navigation = a0.navigation;
|
||||
const sourcePage = a0.route.params.sourcePage;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(11997) /* metro dependency 11997: ContactSyncUtils */).useContactSyncAccount();
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const contactSyncUtilsModule = require(11997) /* metro dependency 11997: ContactSyncUtils */;
|
||||
const value4 = env0_3(Reflect.apply(useState, binding, [!contactSyncUtilsModule.isContactSyncEnabled(value2)]), 2);
|
||||
const property = value4[0];
|
||||
const env0_2 = value4[1];
|
||||
binding.useLayoutEffect(_fun115598, [binding.useCallback(_fun115597, []), navigation, value2]);
|
||||
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
const value6 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const GWMTSE = (require(1244) /* metro dependency 1244: indexNative */).t.GWMTSE;
|
||||
const items2 = [<Text style={styles.headerText} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
intl, [GWMTSE])}</Text>];
|
||||
items2[1] = <Text style={styles.subheaderText} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Rn/sLl'])}</Text>;
|
||||
items2[2] = ((Component) => <Component style={styles.input} autoFocusInput={false} sourcePage={sourcePage} />)(importDefault(12616) /* metro dependency 12616: AddFriendById */);
|
||||
const text = <Text accessibilityRole="header" variant="eyebrow" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dukg0Z)}</Text>;
|
||||
if (property) {
|
||||
value = importDefault(12618) /* metro dependency 12618: ContactSyncUpsellCTA */;
|
||||
value = ((Component) => <Component style={styles.rowContainer} location="Add Friend Modal" />)(value);
|
||||
r11 = value;
|
||||
} else {
|
||||
r11 = null;
|
||||
}
|
||||
items2[3] = <View style={styles.otherOptionsContainer}>{text}{r11}</View>;
|
||||
return (
|
||||
<>
|
||||
{value6}
|
||||
<ScrollView keyboardShouldPersistTaps="handled" style={styles.background}>
|
||||
{items2}
|
||||
</ScrollView>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun115597() { // fn#115597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:952, offset: 0x024669ac, size: 269 bytes, params: 1, frame: 22
|
||||
let value = environment.__proto__;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const value3 = undefined;
|
||||
const r8 = currentUser != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(currentUser) : value3;
|
||||
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport2.track;
|
||||
const FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
|
||||
Reflect.apply(track, defaultImport2, [FRIEND_ADD_VIEWED, {'friend_add_type': 'Invite',
|
||||
'source_page': 'Add Friend Modal'}]);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const property = (require(1244) /* metro dependency 1244: indexNative */).t['6E9a1J'];
|
||||
const protocol = global.location.protocol;
|
||||
const GLOBAL_ENV = global.window.GLOBAL_ENV;
|
||||
const WEBAPP_ENDPOINT = GLOBAL_ENV.WEBAPP_ENDPOINT;
|
||||
value = Reflect.apply(formatToPlainString, intl, [property, {url: '' + protocol + WEBAPP_ENDPOINT, username: r8}]);
|
||||
const showShareActionSheetAndroidModule = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
|
||||
showShareActionSheetAndroidModule.showShareActionSheet({message: value}, 'Add Friend Modal');
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun115598() { // fn#115598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:1348, offset: 0x02466ab9, size: 88 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const navigationBinding = navigation;
|
||||
navigationBinding.setOptions({headerRight: headerRight_115599});
|
||||
let value = environment.__proto__;
|
||||
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
|
||||
value = value.checkContactPermissions();
|
||||
value.then(_fun115600);
|
||||
}
|
||||
|
||||
function headerRight_115599(a0) { // fn#115599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:1379, offset: 0x02466b11, size: 110 bytes, params: 2, frame: 17
|
||||
let value = environment.__proto__.__proto__;
|
||||
const getRenderHeaderTextButton = require(dependencyMap[14]).getRenderHeaderTextButton;
|
||||
const intl = require(dependencyMap[12]).intl;
|
||||
const string = intl.string;
|
||||
const RDE0Sc = require(dependencyMap[12]).t.RDE0Sc;
|
||||
value = Reflect.apply(getRenderHeaderTextButton, value, [Reflect.apply(string, intl, [RDE0Sc]), env1_3]);
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, dependencyMap);
|
||||
return value(object2);
|
||||
}
|
||||
|
||||
function _fun115600(a0) { // fn#115600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15351:1510, offset: 0x02466b7f, size: 133 bytes, params: 2, frame: 14
|
||||
var isContactSyncEnabled;
|
||||
var value4;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const NOT_DETERMINED = ContactPermissions.NOT_DETERMINED;
|
||||
let r2 = a0 === NOT_DETERMINED || (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && a0 === ContactPermissions.UNAUTHORIZED;
|
||||
if (!r2) {
|
||||
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
|
||||
isContactSyncEnabled = value.isContactSyncEnabled;
|
||||
value4 = environment.__proto__;
|
||||
value = !Reflect.apply(isContactSyncEnabled, value, [env1_1]);
|
||||
r2 = value;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
env1_2(r2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,927 @@
|
||||
/* Metro module 15155; source: modules/main_tabs_v2/native/friends/screens/AddFriendsScreen.tsx; dependencies: [57, 5, 31, 27, 5242, 3793, 1878, 12016, 661, 11995, 33, 4501, 697, 11993, 8879, 3856, 1244, 7147, 11997, 477, 6771, 6789, 4594, 683, 8743, 632, 22, 3995, 14480, 6777, 7704, 9171, 5461, 7697, 6238, 3858, 6700, 15156, 15157, 15159, 15160, 2] */
|
||||
function _fun115601(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:6, offset: 0x02466c04, size: 736 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
let env0_0 = require;
|
||||
const _arrayLikeToArray_115604 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const areGameFriendRequestRowsEqual = function(a0, a1) {
|
||||
return a0.userId === a1.userId && a0.applicationId === a1.applicationId;
|
||||
};
|
||||
const areHydratedGameFriendRequestRowStatesEqual = function(a0, a1) {
|
||||
var env0_0 = a1;
|
||||
return a0 === a1 || a0.length === a1.length && a0.every(_fun115607);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.View;
|
||||
const env0_7 = value.ScrollView;
|
||||
const gameRelationshipStore = importDefault(5242) /* metro dependency 5242: GameRelationshipStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_11 = (require(12016) /* metro dependency 12016: FriendsScreenConstants */).Sections;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = value.AnalyticEvents;
|
||||
const env0_13 = value.AnalyticsSections;
|
||||
const env0_14 = value.InstantInviteSources;
|
||||
const env0_15 = value.RelationshipTypes;
|
||||
const env0_16 = (require(11995) /* metro dependency 11995: ContactSyncConstants */).ContactPermissions;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_17 = value.jsx;
|
||||
const env0_18 = value.jsxs;
|
||||
object2 = {FIND_FRIENDS: 0};
|
||||
object2[0] = 'FIND_FRIENDS';
|
||||
object2.INCOMING_FRIEND_REQUESTS = 1;
|
||||
object2[1] = 'INCOMING_FRIEND_REQUESTS';
|
||||
object2.INCOMING_GAME_FRIEND_REQUESTS = 2;
|
||||
object2[2] = 'INCOMING_GAME_FRIEND_REQUESTS';
|
||||
object2.CONTACT_SUGGESTIONS = 3;
|
||||
object2[3] = 'CONTACT_SUGGESTIONS';
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {flex: 1};
|
||||
const object4 = {};
|
||||
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object4.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingVertical = PX_16;
|
||||
object2.inviteAppsContainerNonSticky = object4;
|
||||
object2.inviteAppsContentContainer = {'paddingTop': 0, 'paddingBottom': 0, 'minWidth': '100%'};
|
||||
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.emptyContainer = {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
const object6 = {};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginHorizontal = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.paddingTop = PX_8;
|
||||
object2.emptyActionContainer = object6;
|
||||
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.loading = {'backgroundColor': null, 'justifyContent': 'center', 'flex': 1,
|
||||
backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
const env0_20 = Reflect.apply(createStyles, value, [object2]);
|
||||
const handleFindFriends = function() {
|
||||
var moduleValue = require(dependencyMap[13]);
|
||||
var FRIENDS_ADD_FRIENDS_MODAL = AnalyticsSections.FRIENDS_ADD_FRIENDS_MODAL;
|
||||
moduleValue.openContactSyncModal({}, FRIENDS_ADD_FRIENDS_MODAL);
|
||||
};
|
||||
const env0_22 = _fun115609();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/AddFriendsScreen.tsx');
|
||||
exports.default = AddFriendsScreen;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_115602(a0, a1) { // fn#115602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:380, offset: 0x02466ee4, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun115603;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_115604(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_115604(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_115604(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun115603;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function areHydratedGameFriendRequestRowStatesEqual(a0, a1) { // fn#115606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:2656, offset: 0x0246707f, size: 59 bytes, params: 3, frame: 13
|
||||
const env0_0 = a1;
|
||||
return a0 === a1 || a0.length === a1.length && a0.every(_fun115607);
|
||||
}
|
||||
|
||||
function _fun115609() { // fn#115609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:2157, offset: 0x0246711f, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env0_4(_fun115611);
|
||||
return _fun115612;
|
||||
}
|
||||
|
||||
function AddFriendsScreen(a0) { // fn#115613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:2996, offset: 0x0246727c, size: 1622 bytes, params: 2, frame: 38
|
||||
var r14;
|
||||
var r8;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items4;
|
||||
const navigation = a0.navigation;
|
||||
const env0_1 = a0.route.params.sourcePage;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const ADD_FRIENDS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ADD_FRIENDS;
|
||||
const analyticsLocations = defaultImport(ADD_FRIENDS).analyticsLocations;
|
||||
let binding = env0_5;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [[]]);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
var env0_3 = value3[0];
|
||||
const env0_4 = value3[1];
|
||||
useState = binding.useState;
|
||||
const value4 = binding2(Reflect.apply(useState, binding, [[]]), 2);
|
||||
var env0_5 = value4[0];
|
||||
const env0_6 = value4[1];
|
||||
useState = binding.useState;
|
||||
const value5 = binding2(Reflect.apply(useState, binding, [[]]), 2);
|
||||
var property = value5[0];
|
||||
const env0_8 = value5[1];
|
||||
useState = binding.useState;
|
||||
const value6 = binding2(Reflect.apply(useState, binding, [[]]), 2);
|
||||
const property2 = value6[0];
|
||||
const env0_10 = value6[1];
|
||||
const env0_11 = binding.useCallback(_fun115614, []);
|
||||
const env0_12 = binding.useCallback(_fun115617, []);
|
||||
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
|
||||
var defaultImport = importDefault(dependencyMap[23]);
|
||||
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
|
||||
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: AnalyticsSections.FRIENDS_ADD_FRIENDS_MODAL,
|
||||
source_page: sourcePage});
|
||||
});
|
||||
const value7 = binding.useCallback(function() {
|
||||
navigation.navigate('username-search');
|
||||
}, [navigation]);
|
||||
const env0_14 = binding.useCallback(_fun115622, [analyticsLocations]);
|
||||
const value8 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([RelationshipStore,
|
||||
UserStore], _fun115623);
|
||||
const value9 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GameRelationshipStore,
|
||||
RelationshipStore, UserStore], _fun115627, [property2, property], areHydratedGameFriendRequestRowStatesEqual);
|
||||
const value10 = (importDefault(14480) /* metro dependency 14480: useSuggestedFriends */)();
|
||||
const env0_17 = value10.added;
|
||||
const env0_18 = value10.setAdded;
|
||||
const friendSuggestions = value10.friendSuggestions;
|
||||
const r7 = friendSuggestions.length > 0 && value8.length > 3;
|
||||
const r1 = friendSuggestions.length > 0 && value9.length > 3;
|
||||
binding = env0_5;
|
||||
const useMemo = binding.useMemo;
|
||||
(importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(Reflect.apply(useMemo, binding,
|
||||
[_fun115633, [value9, r1]]));
|
||||
const value16 = useTransitionEnd({navigation: navigation});
|
||||
const isContactSyncEnabled2 = (require(11997) /* metro dependency 11997: ContactSyncUtils */).isContactSyncEnabled((require(11997) /* metro dependency 11997: ContactSyncUtils */).useContactSyncAccount());
|
||||
var [property, env0_22] = env0_3(binding.useState(false), 2);
|
||||
binding.useEffect(_fun115637, []);
|
||||
const isContactSyncAvailable2 = (require(11997) /* metro dependency 11997: ContactSyncUtils */).isContactSyncAvailable();
|
||||
const r16 = isContactSyncAvailable2 ? isContactSyncEnabled2 ? property : !isContactSyncEnabled2 : !!isContactSyncAvailable2;
|
||||
let r9 = value8.length === 0 && value9.length === 0 && friendSuggestions.length === 0;
|
||||
binding = env0_5;
|
||||
const value25 = binding.useMemo(_fun115639, [value8.length, friendSuggestions.length, value9.length, r16, r7, r1]);
|
||||
const value26 = binding.useCallback(_fun115640, []);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const value27 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
|
||||
const view = <View style={styles.inviteAppsContainerNonSticky}>{((Component) => <Component onItemPressed={env0_22} contentContainerStyle={styles.inviteAppsContentContainer} />)(importDefault(9171) /* metro dependency 9171: InstantInviteShareApps */)}</View>;
|
||||
if (value16) {
|
||||
if (r9) {
|
||||
var scrollViewBindingProps = {style: styles.emptyContainer};
|
||||
items4 = [<View style={styles.emptyActionContainer}><TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QzVsOs)} labelLineClamp={1} icon={((Icon) => <Icon IconComponent={(require(6700) /* metro dependency 6700: AtIcon */).AtIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} arrow onPress={value7} start end /></View>];
|
||||
if (r16) {
|
||||
value = importDefault(15160) /* metro dependency 15160: AddFriendsContactSyncEmptyState */;
|
||||
value = ((Component) => <Component />)(value);
|
||||
r14 = value;
|
||||
} else {
|
||||
r14 = null;
|
||||
}
|
||||
items4[1] = r14;
|
||||
value = <ScrollView {...scrollViewBindingProps}>{items4}</ScrollView>;
|
||||
r9 = value;
|
||||
} else {
|
||||
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
|
||||
r9 = <UsersFastList sections={value25} getItemProps={getItemProps} getSectionProps={value26} insetEnd={12} disableStickySections />;
|
||||
}
|
||||
r8 = r9;
|
||||
} else if (r9) {
|
||||
if (r9) {
|
||||
var scrollViewBindingProps = {style: styles.emptyContainer};
|
||||
items4 = [<View style={styles.emptyActionContainer}><TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QzVsOs)} labelLineClamp={1} icon={((Icon) => <Icon IconComponent={(require(6700) /* metro dependency 6700: AtIcon */).AtIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} arrow onPress={value7} start end /></View>];
|
||||
if (r16) {
|
||||
value = importDefault(15160) /* metro dependency 15160: AddFriendsContactSyncEmptyState */;
|
||||
value = ((Component) => <Component />)(value);
|
||||
r14 = value;
|
||||
} else {
|
||||
r14 = null;
|
||||
}
|
||||
items4[1] = r14;
|
||||
value = <ScrollView {...scrollViewBindingProps}>{items4}</ScrollView>;
|
||||
r9 = value;
|
||||
} else {
|
||||
const UsersFastList2 = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
|
||||
r9 = <UsersFastList2 sections={value25} getItemProps={getItemProps} getSectionProps={value26} insetEnd={12} disableStickySections />;
|
||||
}
|
||||
r8 = r9;
|
||||
} else {
|
||||
r8 = <View style={styles.loading}>{((ActivityIndicator) => <ActivityIndicator />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}</View>;
|
||||
}
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
{value27}
|
||||
<View style={styles.container}>
|
||||
{view}
|
||||
{r8}
|
||||
</View>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun115607(a0, a1) { // fn#115607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:2757, offset: 0x024670ba, size: 50 bytes, params: 3, frame: 4
|
||||
const property = require[a1];
|
||||
const user = a0.user;
|
||||
const user2 = property.user;
|
||||
return user === user2 && a0.applicationId === property.applicationId;
|
||||
}
|
||||
|
||||
function* _fun115611(a0) { // fn#115611, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:2177, offset: 0x0246714e, size: 302 bytes, params: 2, frame: 23
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value3;
|
||||
var createFriendInvite;
|
||||
var ADD_FRIENDS_MODAL;
|
||||
var friendInvite;
|
||||
var value4;
|
||||
var value5;
|
||||
var code;
|
||||
var intl;
|
||||
var t;
|
||||
var error;
|
||||
var binding4;
|
||||
var presentError;
|
||||
var string;
|
||||
var R0RpRX;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value = binding(binding4[15]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding4[16]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[16]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value = binding(binding4[15]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding4[16]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[16]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[14];
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value = binding(binding4[15]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding4[16]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[16]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value3 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value = binding(binding4[15]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding4[16]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[16]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
createFriendInvite = value3.createFriendInvite;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value = binding(binding4[15]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding4[16]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[16]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env2_14;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value = binding(binding4[15]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding4[16]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[16]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
ADD_FRIENDS_MODAL = binding.ADD_FRIENDS_MODAL;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value = binding(binding4[15]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding4[16]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[16]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
friendInvite = Reflect.apply(createFriendInvite, value3, [null, ADD_FRIENDS_MODAL]);
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value = binding(binding4[15]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding4[16]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[16]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
return undefined;
|
||||
}
|
||||
yield friendInvite;
|
||||
try {
|
||||
value4 = undefined;
|
||||
value5 = false;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value = binding(binding4[15]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding4[16]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[16]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
return undefined;
|
||||
}
|
||||
if (value5) {
|
||||
return value4;
|
||||
}
|
||||
try {
|
||||
code = value4.code;
|
||||
} catch (error) {
|
||||
binding = env2_0;
|
||||
binding4 = env2_2;
|
||||
value = binding(binding4[15]);
|
||||
presentError = value.presentError;
|
||||
intl = binding(binding4[16]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[16]).t;
|
||||
R0RpRX = t.R0RpRX;
|
||||
Reflect.apply(presentError, value, [Reflect.apply(string, intl, [R0RpRX])]);
|
||||
return undefined;
|
||||
}
|
||||
var object3 = {channel: null, code: code};
|
||||
binding = env2_0;
|
||||
var binding3 = env2_2;
|
||||
intl = binding(binding3[16]).intl;
|
||||
var formatToPlainString = intl.formatToPlainString;
|
||||
var PJf9P9 = binding(binding3[16]).t.PJf9P9;
|
||||
var object4 = {};
|
||||
object4.link = env2_1(binding3[17])(code);
|
||||
object3.message = Reflect.apply(formatToPlainString, intl, [PJf9P9, object4]);
|
||||
ADD_FRIENDS_MODAL = env2_14.ADD_FRIENDS_MODAL;
|
||||
object3.location = ADD_FRIENDS_MODAL;
|
||||
a0(object3);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115614(a0, a1) { // fn#115614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:3309, offset: 0x024678d2, size: 70 bytes, params: 3, frame: 12
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
if (a1 != null) {
|
||||
env0_10(_fun115615);
|
||||
} else {
|
||||
env0_6(_fun115616);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115617(a0, a1) { // fn#115617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:3407, offset: 0x0246794b, size: 70 bytes, params: 3, frame: 12
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
if (a1 != null) {
|
||||
env0_8(_fun115618);
|
||||
} else {
|
||||
env0_4(_fun115619);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115622(a0) { // fn#115622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:3684, offset: 0x024679fa, size: 73 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id, localUser: a0,
|
||||
sourceAnalyticsLocations: analyticsLocations, location: 'Add Friends Modal User Profile'});
|
||||
}
|
||||
|
||||
function _fun115623() { // fn#115623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:3844, offset: 0x02467a43, size: 249 bytes, params: 1, frame: 24
|
||||
var environment;
|
||||
var r7;
|
||||
var r10;
|
||||
var value7;
|
||||
var isUnfilteredPendingIncoming;
|
||||
var user;
|
||||
var value9;
|
||||
var binding;
|
||||
var value10;
|
||||
var value11;
|
||||
const items2 = [];
|
||||
let value = environment.__proto__;
|
||||
const value4 = _createForOfIteratorHelperLoose_115602(RelationshipStore.getMutableRelationships().keys());
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
if (!done) {
|
||||
r7 = value5;
|
||||
while (true) {
|
||||
value7 = r7.value;
|
||||
isUnfilteredPendingIncoming = RelationshipStore.isUnfilteredPendingIncoming;
|
||||
if (Reflect.apply(isUnfilteredPendingIncoming, RelationshipStore, [value7])) {
|
||||
user = UserStore.getUser(value7);
|
||||
value9 = user == null;
|
||||
if (value9) {
|
||||
r10 = value9;
|
||||
continue;
|
||||
}
|
||||
binding = env0_3;
|
||||
value10 = binding.includes(value7);
|
||||
r10 = value10;
|
||||
if (r10) {
|
||||
break;
|
||||
}
|
||||
items2.push(user);
|
||||
break;
|
||||
}
|
||||
value11 = value4();
|
||||
done = value11.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r7 = value11;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
env0_5.forEach(_fun115624);
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value = value.unionBy([], items2, function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
return value.sort(_fun115626);
|
||||
}
|
||||
|
||||
function _fun115627() { // fn#115627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:4275, offset: 0x02467bb7, size: 149 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const getGameRelationshipsByType = GameRelationshipStore.getGameRelationshipsByType;
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
Reflect.apply(getGameRelationshipsByType, GameRelationshipStore, [PENDING_INCOMING]).forEach(_fun115628);
|
||||
env0_9.forEach(_fun115630);
|
||||
value = importDefault(22) /* metro dependency 22 */;
|
||||
value = value.unionBy([], [], function(a0) {
|
||||
return a0.user.id;
|
||||
});
|
||||
return value.sort(_fun115632);
|
||||
}
|
||||
|
||||
function _fun115633() { // fn#115633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:4974, offset: 0x02467d9f, size: 103 bytes, params: 1, frame: 16
|
||||
var r2;
|
||||
var property;
|
||||
var push;
|
||||
var applicationId;
|
||||
var value4;
|
||||
const r3 = env0_21 ? global.Math.min(env0_16.length, 3) : env0_16.length;
|
||||
const items2 = [];
|
||||
const value3 = 0;
|
||||
if (value3 < r3) {
|
||||
r2 = value3;
|
||||
while (true) {
|
||||
property = env0_16[r2];
|
||||
if (property != null) {
|
||||
push = items2.push;
|
||||
applicationId = property.applicationId;
|
||||
Reflect.apply(push, items2, [applicationId]);
|
||||
}
|
||||
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value4 < r3) {
|
||||
r2 = value4;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function useTransitionEnd({navigation}) { // fn#115634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:5139, owner: AddFriendsScreen.useTransitionEnd, offset: 0x02467e06, size: 94 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_5;
|
||||
value = env1_3(binding.useState(false), 2);
|
||||
const property = value[0];
|
||||
const env0_1 = value[1];
|
||||
binding.useEffect(function() {
|
||||
return navigation.addListener('transitionEnd', _fun115636);
|
||||
}, [navigation]);
|
||||
return property;
|
||||
}
|
||||
|
||||
function _fun115637() { // fn#115637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:5458, offset: 0x02467e86, size: 86 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const contactSyncUtilsModule = require(11997) /* metro dependency 11997: ContactSyncUtils */;
|
||||
if (contactSyncUtilsModule.isContactSyncAvailable()) {
|
||||
value = contactSyncUtilsModule;
|
||||
value = value.checkContactPermissions();
|
||||
value.then(_fun115638);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115639() { // fn#115639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:5741, offset: 0x02467f35, size: 85 bytes, params: 1, frame: 5
|
||||
const value4 = 4;
|
||||
return [env0_23 ? 2 : 1, env0_20 ? value4 : env0_15.length, env0_21 ? value4 : env0_16.length,
|
||||
friendSuggestions.length];
|
||||
}
|
||||
|
||||
function _fun115640(a0) { // fn#115640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:5845, offset: 0x02467f8a, size: 317 bytes, params: 2, frame: 17
|
||||
var object;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object5;
|
||||
var object6;
|
||||
const FIND_FRIENDS = env1_19.FIND_FRIENDS;
|
||||
if (FIND_FRIENDS !== a0) {
|
||||
var INCOMING_FRIEND_REQUESTS = env1_19.INCOMING_FRIEND_REQUESTS;
|
||||
if (INCOMING_FRIEND_REQUESTS === a0) {
|
||||
object6 = {};
|
||||
object6.title = intl.string(t['93cLE3']);
|
||||
return {type: 'section', props: object6};
|
||||
}
|
||||
var INCOMING_GAME_FRIEND_REQUESTS = env1_19.INCOMING_GAME_FRIEND_REQUESTS;
|
||||
if (INCOMING_GAME_FRIEND_REQUESTS === a0) {
|
||||
object5 = {};
|
||||
object5.title = intl.string(t['0uVuaU']);
|
||||
return {type: 'section', props: object5};
|
||||
}
|
||||
var CONTACT_SUGGESTIONS = env1_19.CONTACT_SUGGESTIONS;
|
||||
if (CONTACT_SUGGESTIONS === a0) {
|
||||
object = {};
|
||||
object.title = intl.string(t['1uAmCw']);
|
||||
return {type: 'section', props: object};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getItemProps(a0, a1) { // fn#115641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:6855, owner: AddFriendsScreen.getItemProps, offset: 0x024680c7, size: 520 bytes, params: 3, frame: 23
|
||||
var property;
|
||||
let value = a1 === 0;
|
||||
const value3 = a1 === env0_24[a0] - 1;
|
||||
const FIND_FRIENDS = env1_19.FIND_FRIENDS;
|
||||
if (FIND_FRIENDS === a0) {
|
||||
return value && env0_23 ? {'type': 'custom', 'itemType': 'showContactSyncCTA', 'key': 'showContactSyncCTA',
|
||||
component: component_115642} : {'type': 'custom', 'itemType': 'addByUsername', 'key': 'addByUsername',
|
||||
component: component_115643};
|
||||
}
|
||||
const INCOMING_FRIEND_REQUESTS = env1_19.INCOMING_FRIEND_REQUESTS;
|
||||
if (INCOMING_FRIEND_REQUESTS === a0) {
|
||||
if (value3) {
|
||||
if (env0_20) {
|
||||
return {'type': 'custom', 'itemType': 'viewAll', 'key': 'friendRequestsViewAll',
|
||||
component: component_115644};
|
||||
}
|
||||
return {'type': 'custom', 'itemType': 'incomingRequest', key: env0_15[a1].id, component: component_115646};
|
||||
}
|
||||
return {'type': 'custom', 'itemType': 'incomingRequest', key: env0_15[a1].id, component: component_115646};
|
||||
}
|
||||
const INCOMING_GAME_FRIEND_REQUESTS = env1_19.INCOMING_GAME_FRIEND_REQUESTS;
|
||||
if (INCOMING_GAME_FRIEND_REQUESTS === a0) {
|
||||
if (value3) {
|
||||
if (env0_21) {
|
||||
return {'type': 'custom', 'itemType': 'viewAll', 'key': 'gameFriendRequestsViewAll',
|
||||
component: component_115647};
|
||||
}
|
||||
property = env0_16[a1];
|
||||
return {'type': 'custom', 'itemType': 'incomingRequest',
|
||||
key: '' + property.user.id + '-' + property.applicationId,
|
||||
component: component_115650};
|
||||
}
|
||||
property = env0_16[a1];
|
||||
return {'type': 'custom', 'itemType': 'incomingRequest',
|
||||
key: '' + property.user.id + '-' + property.applicationId,
|
||||
component: component_115650};
|
||||
}
|
||||
const CONTACT_SUGGESTIONS = env1_19.CONTACT_SUGGESTIONS;
|
||||
if (CONTACT_SUGGESTIONS === a0) {
|
||||
property = friendSuggestions[a1];
|
||||
value = undefined;
|
||||
return {type: 'custom',
|
||||
itemType: (property == null ? value : property.mutualFriendsCount) != null && (property == null ? value : property.mutualFriendsCount) > 0 ? 'contactSuggestionMutualCount' : 'contactSuggestionNoMutualCount',
|
||||
|
||||
key: property.user.id, component: component_115652};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115615(a0) { // fn#115615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:3328, offset: 0x02467918, size: 51 bytes, params: 2, frame: 15
|
||||
const items2 = [];
|
||||
const value = arraySpread(items2, a0, 0, undefined);
|
||||
items2[value] = {userId: env0_0, applicationId: require};
|
||||
value + 1;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun115624(a0) { // fn#115624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:4082, offset: 0x02467b3c, size: 48 bytes, params: 2, frame: 11
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = UserStore.getUser(a0);
|
||||
if (value != null) {
|
||||
env0_0.push(value);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115626(a0, a1) { // fn#115626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:4166, offset: 0x02467b6c, size: 75 bytes, params: 3, frame: 15
|
||||
let value = environment.__proto__.__proto__;
|
||||
let getName = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName;
|
||||
value = Reflect.apply(getName, value, [a0]);
|
||||
const localeCompare = value.localeCompare;
|
||||
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
getName = defaultImport.getName;
|
||||
return Reflect.apply(localeCompare, value, [Reflect.apply(getName, defaultImport, [a1])]);
|
||||
}
|
||||
|
||||
function _fun115628({id, applicationId}) { // fn#115628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:4351, offset: 0x02467c4c, size: 145 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
var binding;
|
||||
const env0_0 = id;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const user = UserStore.getUser(id);
|
||||
let r0 = RelationshipStore.isSpam(id) || RelationshipStore.isBlockedOrIgnored(id);
|
||||
r0 = !r0 ? user == null : r0;
|
||||
if (!r0) {
|
||||
value = environment.__proto__;
|
||||
value = env1_7.some(function(a0) {
|
||||
return areGameFriendRequestRowsEqual(a0, {userId: id, applicationId: applicationId});
|
||||
});
|
||||
r0 = value;
|
||||
}
|
||||
if (!r0) {
|
||||
binding = env0_0;
|
||||
binding.push({user: user, applicationId: applicationId});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115630({userId, applicationId}) { // fn#115630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:4581, offset: 0x02467d06, size: 68 bytes, params: 2, frame: 13
|
||||
var binding;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = UserStore.getUser(userId);
|
||||
if (value != null) {
|
||||
binding = env0_1;
|
||||
binding.push({user: value, applicationId: applicationId});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115632({user}, {user}) { // fn#115632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:4724, offset: 0x02467d4a, size: 85 bytes, params: 3, frame: 15
|
||||
let value = environment.__proto__.__proto__;
|
||||
let getName = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName;
|
||||
value = Reflect.apply(getName, value, [user]);
|
||||
const localeCompare = value.localeCompare;
|
||||
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
getName = defaultImport.getName;
|
||||
return Reflect.apply(localeCompare, value, [Reflect.apply(getName, defaultImport, [user])]);
|
||||
}
|
||||
|
||||
function _fun115635() { // fn#115635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:5245, offset: 0x02467e64, size: 34 bytes, params: 1, frame: 13
|
||||
return navigation.addListener('transitionEnd', _fun115636);
|
||||
}
|
||||
|
||||
function _fun115638(a0) { // fn#115638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:5541, offset: 0x02467edc, size: 89 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
const NOT_DETERMINED = ContactPermissions.NOT_DETERMINED;
|
||||
const value2 = a0 === NOT_DETERMINED;
|
||||
const r3 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && a0 === ContactPermissions.UNAUTHORIZED;
|
||||
value = environment.__proto__;
|
||||
env1_22(value2 || r3);
|
||||
}
|
||||
|
||||
function getItemPropsComponent() { // fn#115642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:7016, owner: AddFriendsScreen.getItemProps.component, offset: 0x024682cf, size: 208 bytes, params: 1, frame: 20
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {'start': true, 'label': null, 'labelLineClamp': 1};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.j2POVo);
|
||||
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const Icon = TableRow2.Icon;
|
||||
const FriendsIcon = (require(3858) /* metro dependency 3858: FriendsIcon */).FriendsIcon;
|
||||
object2.icon = <Icon IconComponent={FriendsIcon} />;
|
||||
const TableRow3 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const Arrow = TableRow3.Arrow;
|
||||
object2.trailing = <Arrow />;
|
||||
object2.onPress = handleFindFriends;
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function getItemPropsComponent_115643() { // fn#115643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:7325, owner: AddFriendsScreen.getItemProps.component, offset: 0x0246839f, size: 190 bytes, params: 1, frame: 20
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const tableRowProps = {'start': null, 'end': true, 'label': null, 'labelLineClamp': 1, 'icon': null, 'arrow': true,
|
||||
start: !env1_23};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const QzVsOs = (require(1244) /* metro dependency 1244: indexNative */).t.QzVsOs;
|
||||
tableRowProps.label = Reflect.apply(string, intl, [QzVsOs]);
|
||||
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const Icon = TableRow2.Icon;
|
||||
const AtIcon = (require(6700) /* metro dependency 6700: AtIcon */).AtIcon;
|
||||
tableRowProps.icon = <Icon IconComponent={AtIcon} />;
|
||||
tableRowProps.onPress = env1_13;
|
||||
return <TableRow {...tableRowProps} />;
|
||||
}
|
||||
|
||||
function getItemPropsComponent_115644() { // fn#115644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:7638, owner: AddFriendsScreen.getItemProps.component, offset: 0x0246845d, size: 86 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(15156) /* metro dependency 15156: ShowAllRow */;
|
||||
const binding = env1_15;
|
||||
return ((Component) => <Component onPress={onPress_115645} users={binding.slice(3)} count={binding.length} />)(value);
|
||||
}
|
||||
|
||||
function getItemPropsComponent_115646() { // fn#115646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:7942, owner: AddFriendsScreen.getItemProps.component, offset: 0x0246852a, size: 129 bytes, params: 1, frame: 18
|
||||
const IncomingFriendRequestRow = (require(15157) /* metro dependency 15157: IncomingRequestRow */).IncomingFriendRequestRow;
|
||||
const binding = env1_5;
|
||||
return (
|
||||
<IncomingFriendRequestRow
|
||||
accepted={binding.includes(env0_2.id)}
|
||||
user={env0_2}
|
||||
start={result}
|
||||
end={result_2}
|
||||
onPress={env1_14}
|
||||
onDeclineIncomingRequest={env1_12}
|
||||
onAcceptIncomingRequest={env1_11}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function getItemPropsComponent_115647() { // fn#115647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:8224, owner: AddFriendsScreen.getItemProps.component, offset: 0x024685ab, size: 103 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(15156) /* metro dependency 15156: ShowAllRow */;
|
||||
const binding = env1_16;
|
||||
return ((Component) => <Component onPress={function() {
|
||||
navigation.navigate('requests');
|
||||
}} users={binding.slice(3).map(function(a0) {
|
||||
return a0.user;
|
||||
})} count={binding.length} />)(value);
|
||||
}
|
||||
|
||||
function getItemPropsComponent_115650() { // fn#115650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:8449, owner: AddFriendsScreen.getItemProps.component, offset: 0x0246862c, size: 144 bytes, params: 1, frame: 17
|
||||
const ConnectedIncomingGameFriendRequestRow = (require(15157) /* metro dependency 15157: IncomingRequestRow */).ConnectedIncomingGameFriendRequestRow;
|
||||
return (
|
||||
<ConnectedIncomingGameFriendRequestRow
|
||||
accepted={env1_9.find(function(a0) {
|
||||
return areGameFriendRequestRowsEqual(a0, {userId: user.id, applicationId: applicationId});
|
||||
}) != null}
|
||||
applicationId={applicationId}
|
||||
user={user}
|
||||
start={result}
|
||||
end={result_2}
|
||||
onPress={env1_14}
|
||||
onDeclineIncomingRequest={env1_12}
|
||||
onAcceptIncomingRequest={env1_11}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function getItemPropsComponent_115652() { // fn#115652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:8939, owner: AddFriendsScreen.getItemProps.component, offset: 0x024686ea, size: 135 bytes, params: 1, frame: 19
|
||||
const ContactSuggestionRow = (require(15159) /* metro dependency 15159: ContactSuggestionRow */).ContactSuggestionRow;
|
||||
const contactSuggestionRowProps = {added: added.includes(env0_5), suggestedFriend: env0_5, start: result,
|
||||
end: result_2, onPress: env1_14};
|
||||
const ADD_FRIENDS_MODAL = InstantInviteSources.ADD_FRIENDS_MODAL;
|
||||
contactSuggestionRowProps.location = ADD_FRIENDS_MODAL;
|
||||
contactSuggestionRowProps.onAddSuggestion = function() {
|
||||
return setAdded(_fun115654);
|
||||
};
|
||||
return <ContactSuggestionRow {...contactSuggestionRowProps} />;
|
||||
}
|
||||
|
||||
function componentOnPress() { // fn#115645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:7663, owner: AddFriendsScreen.getItemProps.component.onPress, offset: 0x024684b3, size: 119 bytes, params: 1, frame: 16
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const FRIEND_FINDER_SECTION_EXPANDED = AnalyticEvents.FRIEND_FINDER_SECTION_EXPANDED;
|
||||
const PENDING = Sections.PENDING;
|
||||
Reflect.apply(track, defaultImport, [FRIEND_FINDER_SECTION_EXPANDED, {section_id: PENDING, truncated_count: 3,
|
||||
expanded_count: env2_15.length, location: 'AddFriends'}]);
|
||||
navigation.navigate('requests');
|
||||
}
|
||||
|
||||
function componentOnAddSuggestion() { // fn#115653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:9084, owner: AddFriendsScreen.getItemProps.component.onAddSuggestion, offset: 0x02468771, size: 25 bytes, params: 1, frame: 11
|
||||
return setAdded(_fun115654);
|
||||
}
|
||||
|
||||
function _fun115654(a0) { // fn#115654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15352:9091, offset: 0x0246878a, size: 37 bytes, params: 2, frame: 13
|
||||
const items2 = [];
|
||||
const value = arraySpread(items2, a0, 0, undefined);
|
||||
items2[value] = env2_5;
|
||||
value + 1;
|
||||
return items2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,442 @@
|
||||
/* Metro module 15165; source: modules/main_tabs_v2/native/friends/screens/FriendRequestsScreen.tsx; dependencies: [57, 31, 27, 4623, 3793, 1878, 7690, 661, 8804, 33, 4501, 697, 15166, 1962, 4497, 632, 4624, 3829, 14777, 4788, 21, 6771, 6789, 683, 10341, 6777, 15167, 644, 8743, 1244, 1484, 6231, 6238, 4573, 8853, 7704, 9221, 5278, 9768, 5473, 7697, 2] */
|
||||
function _fun115716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:6, offset: 0x0246ba53, size: 790 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const notificationCenterItemsStore = importDefault(4623) /* metro dependency 4623: NotificationCenterItemsStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_9 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_10 = value.AnalyticEvents;
|
||||
const env0_11 = value.AnalyticsSections;
|
||||
const env0_12 = value.RelationshipTypes;
|
||||
const env0_13 = (require(8804) /* metro dependency 8804: Constants */).MINIMUM_PENDING_INCOMING_COUNT_FOR_CLEAR_ALL;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value.jsx;
|
||||
const env0_15 = value.jsxs;
|
||||
object2 = {Incoming: 0};
|
||||
object2[0] = 'Incoming';
|
||||
object2.Outgoing = 1;
|
||||
object2[1] = 'Outgoing';
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {flex: 1};
|
||||
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.noResultsContainer = {backgroundColor: BACKGROUND_BASE_LOWER, flex: 1};
|
||||
const object3 = {};
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object3.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.paddingBottom = PX_16;
|
||||
object3.justifyContent = 'flex-end';
|
||||
object3.flexDirection = 'row';
|
||||
object2.clearAllContainer = object3;
|
||||
const object7 = {};
|
||||
let INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
|
||||
object7.backgroundColor = INPUT_BACKGROUND_DEFAULT;
|
||||
INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
|
||||
object7.borderColor = INPUT_BACKGROUND_DEFAULT;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object7.paddingHorizontal = PX_16;
|
||||
const PX_64 = (importDefault(697) /* metro dependency 697: native */).space.PX_64;
|
||||
object7.minWidth = 2 * PX_64;
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object7.alignItems = 'center';
|
||||
object7.paddingVertical = 5;
|
||||
object7.borderWidth = 3;
|
||||
object2.clearAll = object7;
|
||||
const object8 = {};
|
||||
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object8.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.paddingBottom = PX_16;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object8.paddingTop = PX_8;
|
||||
object2.tabs = object8;
|
||||
const env0_17 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendRequestsScreen.tsx');
|
||||
exports.default = FriendRequestsScreen;
|
||||
}
|
||||
|
||||
function compareUserItems(a0, a1) { // fn#115717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1192, offset: 0x0246bd69, size: 138 bytes, params: 3, frame: 15
|
||||
var r0;
|
||||
var value;
|
||||
var compare;
|
||||
let user = a0.user;
|
||||
let id = user.id;
|
||||
user = a1.user;
|
||||
if (id === user.id) {
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value = value.compare(a0.applicationId, a1.applicationId);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
compare = value.compare;
|
||||
user = a0.user;
|
||||
id = user.id;
|
||||
user = a1.user;
|
||||
value = Reflect.apply(compare, value, [id, user.id]);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function FriendRequestsScreen() { // fn#115718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1453, offset: 0x0246bdf3, size: 1743 bytes, params: 1, frame: 41
|
||||
var object6;
|
||||
var r2;
|
||||
const styles = useStyles();
|
||||
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const FRIEND_REQUESTS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FRIEND_REQUESTS;
|
||||
const analyticsLocations = defaultImport(FRIEND_REQUESTS).analyticsLocations;
|
||||
useNotificationCenterAckFriendRequests();
|
||||
let binding = env0_4;
|
||||
binding.useEffect(function() {
|
||||
var defaultImport = importDefault(dependencyMap[23]);
|
||||
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
|
||||
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: AnalyticsSections.FRIENDS_REQUESTS_MODAL});
|
||||
}, []);
|
||||
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([RelationshipStore],
|
||||
_fun115726);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
let property = value3[0];
|
||||
const property2 = value3[1];
|
||||
const gameRelationshipStoreHooksModule = require(10341) /* metro dependency 10341: GameRelationshipStoreHooks */;
|
||||
let useGameRelationshipsByType = gameRelationshipStoreHooksModule.useGameRelationshipsByType;
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
const value4 = Reflect.apply(useGameRelationshipsByType, gameRelationshipStoreHooksModule, [PENDING_INCOMING]);
|
||||
const moduleValue3 = gameRelationshipStoreHooksModule;
|
||||
useGameRelationshipsByType = moduleValue3.useGameRelationshipsByType;
|
||||
const PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
|
||||
const value5 = Reflect.apply(useGameRelationshipsByType, moduleValue3, [PENDING_OUTGOING]);
|
||||
const useMemo = binding.useMemo;
|
||||
(importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(Reflect.apply(useMemo, binding,
|
||||
[_fun115727, [value4, value5]]));
|
||||
const {pendingIncomingIds, pendingOutgoingIds, spamIds, ignoredUserIds} = binding.useMemo(_fun115730, [property,
|
||||
property2]);
|
||||
const {incoming, outgoing, spam,
|
||||
ignoredUsers} = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
|
||||
_fun115731, [ignoredUserIds, value4, value5, pendingIncomingIds, pendingOutgoingIds, spamIds],
|
||||
importDefault(644) /* metro dependency 644 */);
|
||||
const {incomingData, incomingSection, outgoingData, outgoingSection} = binding.useMemo(_fun115744, [ignoredUsers,
|
||||
incoming, outgoing, spam]);
|
||||
const useState = binding.useState;
|
||||
const value10 = binding2(Reflect.apply(useState, binding, [_fun115745]), 2);
|
||||
property = value10[0];
|
||||
const env0_16 = value10[1];
|
||||
const value11 = binding.useCallback(_fun115746, [analyticsLocations]);
|
||||
const value12 = binding.useCallback(_fun115747, []);
|
||||
const value14 = binding.useCallback(_fun115748, [property, incomingData, outgoingData, value11, spam.length,
|
||||
ignoredUsers.length, (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation()]);
|
||||
let Outgoing = env0_16.Outgoing;
|
||||
let r8 = property === Outgoing && outgoing.length === 0;
|
||||
if (!r8) {
|
||||
r2 = property === env0_16.Incoming && incoming.length === 0;
|
||||
r2 = r2 && spam.length === 0;
|
||||
r2 = r2 && ignoredUserIds.length === 0;
|
||||
r8 = r2;
|
||||
}
|
||||
let Incoming = env0_16.Incoming;
|
||||
const r11 = property === Incoming && incoming.length >= MINIMUM_PENDING_INCOMING_COUNT_FOR_CLEAR_ALL;
|
||||
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
|
||||
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
|
||||
object6 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: onSetActiveIndex_115752};
|
||||
const object4 = {};
|
||||
binding = env0_16;
|
||||
Incoming = binding.Incoming;
|
||||
object4.id = Incoming.toString();
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object4.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bekioP);
|
||||
const value23 = null;
|
||||
object4.page = value23;
|
||||
const items2 = [object4];
|
||||
const object5 = {};
|
||||
Outgoing = binding.Outgoing;
|
||||
object5.id = Outgoing.toString();
|
||||
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tWqcIF);
|
||||
object5.page = value23;
|
||||
items2[1] = object5;
|
||||
object6.items = items2;
|
||||
const value24 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object6]);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const value25 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
|
||||
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
|
||||
const view = <View style={styles.tabs}><SegmentedControl state={value24} /></View>;
|
||||
const PressableComponent = r11 ? <View style={styles.clearAllContainer}>{((PressableOpacity) => <PressableOpacity style={styles.clearAll} onPress={function() {
|
||||
_fun115754(incoming.length);
|
||||
}}>{((Text) => <Text variant="text-sm/semibold" color="text-brand">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.O8k7O4)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : value23;
|
||||
if (r8) {
|
||||
r8 = <View style={styles.noResultsContainer}>{((Component) => <Component title={property === env0_16.Incoming ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7uvAKe']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['yvzX/Z'])} illustration={(require(5473) /* metro dependency 5473: native */).WumpusCouchSpotIllustration} disableBackgroundOverlay />)(importDefault(9768) /* metro dependency 9768: NoResults */)}</View>;
|
||||
} else {
|
||||
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
|
||||
r8 = <UsersFastList sections={property !== env0_16.Incoming ? outgoingSection : incomingSection} getItemProps={value14} getSectionProps={value12} />;
|
||||
}
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
{value25}
|
||||
<View style={styles.container}>
|
||||
{view}
|
||||
{PressableComponent}
|
||||
{r8}
|
||||
</View>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function useNotificationCenterAckFriendRequests() { // fn#115719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1552, owner: FriendRequestsScreen.useNotificationCenterAckFriendRequests, offset: 0x0246c4c2, size: 130 bytes, params: 1, frame: 18
|
||||
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([NotificationCenterItemsStore],
|
||||
function() {
|
||||
return NotificationCenterItemsStore.localItems.filter(_fun115721);
|
||||
});
|
||||
const NotificationCenterAckedBeforeId = (require(3829) /* metro dependency 3829: UserSettings */).NotificationCenterAckedBeforeId;
|
||||
env1_4.useEffect(_fun115722, [value2, NotificationCenterAckedBeforeId.useSetting()]);
|
||||
}
|
||||
|
||||
function _fun115726() { // fn#115726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2263, offset: 0x0246c6bf, size: 41 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
const items2 = [RelationshipStore.getMutableRelationships()];
|
||||
const getVersion = RelationshipStore.getVersion;
|
||||
items2[1] = Reflect.apply(getVersion, RelationshipStore, []);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun115727() { // fn#115727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2466, offset: 0x0246c6e8, size: 97 bytes, params: 1, frame: 15
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
env0_3.forEach(_fun115728);
|
||||
env0_4.forEach(_fun115729);
|
||||
const Array = global.Array;
|
||||
return Array.from(set);
|
||||
}
|
||||
|
||||
function _fun115730() { // fn#115730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2626, offset: 0x0246c766, size: 50 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(15167) /* metro dependency 15167: getPendingRelationshipIds */).getPendingRelationshipIds(env0_1,
|
||||
env0_2);
|
||||
}
|
||||
|
||||
function _fun115731() { // fn#115731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2790, offset: 0x0246c798, size: 335 bytes, params: 1, frame: 19
|
||||
const value3 = pendingIncomingIds.map(function(a0) {
|
||||
var object = {};
|
||||
object.user = UserStore.getUser(a0);
|
||||
object.isGameRelationship = false;
|
||||
return object;
|
||||
}).filter(function(a0) {
|
||||
return a0.user != null;
|
||||
});
|
||||
const value5 = env0_3.map(function(a0) {
|
||||
var object = {};
|
||||
object.user = UserStore.getUser(a0.id);
|
||||
object.isGameRelationship = true;
|
||||
object.applicationId = a0.applicationId;
|
||||
return object;
|
||||
}).filter(function(a0) {
|
||||
return a0.user != null;
|
||||
});
|
||||
const value7 = pendingOutgoingIds.map(function(a0) {
|
||||
var object = {};
|
||||
object.user = UserStore.getUser(a0);
|
||||
object.isGameRelationship = false;
|
||||
return object;
|
||||
}).filter(function(a0) {
|
||||
return a0.user != null;
|
||||
});
|
||||
const value9 = env0_4.map(function(a0) {
|
||||
var object = {};
|
||||
object.user = UserStore.getUser(a0.id);
|
||||
object.isGameRelationship = true;
|
||||
object.applicationId = a0.applicationId;
|
||||
return object;
|
||||
}).filter(function(a0) {
|
||||
return a0.user != null;
|
||||
});
|
||||
const object2 = {};
|
||||
const items3 = [];
|
||||
arraySpread(items3, value5, arraySpread(items3, value3, 0, items3), items3);
|
||||
const sort = items3.sort;
|
||||
const compareUserItemsBinding = compareUserItems;
|
||||
object2.incoming = Reflect.apply(sort, items3, [compareUserItemsBinding]);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value9, arraySpread(items2, value7, 0, items3), items3);
|
||||
object2.outgoing = items2.sort(compareUserItemsBinding);
|
||||
object2.spam = spamIds.map(function(a0) {
|
||||
var object = {};
|
||||
object.user = UserStore.getUser(a0);
|
||||
return object;
|
||||
}).filter(function(a0) {
|
||||
return a0.user != null;
|
||||
});
|
||||
object2.ignoredUsers = ignoredUserIds.map(function(a0) {
|
||||
var object = {};
|
||||
object.user = UserStore.getUser(a0);
|
||||
return object;
|
||||
}).filter(function(a0) {
|
||||
return a0.user != null;
|
||||
});
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun115744() { // fn#115744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:3526, offset: 0x0246c96a, size: 143 bytes, params: 1, frame: 7
|
||||
const value2 = spam.length + ignoredUsers.length;
|
||||
const incomingBinding = incoming;
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
const value4 = 0;
|
||||
const outgoingBinding = outgoing;
|
||||
const PENDING_OUTGOING = RelationshipTypes.PENDING_OUTGOING;
|
||||
return {incomingData: {items: incomingBinding, relationship: PENDING_INCOMING},
|
||||
incomingSection: [incomingBinding.length, value2 > value4 ? 1 : value4], outgoingData: {items: outgoingBinding,
|
||||
relationship: PENDING_OUTGOING}, outgoingSection: [outgoingBinding.length]};
|
||||
}
|
||||
|
||||
function _fun115745() { // fn#115745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:3836, offset: 0x0246c9f9, size: 61 bytes, params: 1, frame: 3
|
||||
return incoming.length !== 0 ? env1_16.Incoming : outgoing.length > 0 ? env1_16.Outgoing : env1_16.Incoming;
|
||||
}
|
||||
|
||||
function _fun115746(a0) { // fn#115746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:3929, offset: 0x0246ca36, size: 63 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id, localUser: a0,
|
||||
sourceAnalyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function _fun115747(a0) { // fn#115747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4020, offset: 0x0246ca75, size: 98 bytes, params: 2, frame: 16
|
||||
var object;
|
||||
var value;
|
||||
var intl;
|
||||
if (a0 === 1) {
|
||||
object = {};
|
||||
value = environment.__proto__;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NHpP/k']);
|
||||
return {type: 'section', props: object};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115748(a0, a1) { // fn#115748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4163, offset: 0x0246cad7, size: 205 bytes, params: 3, frame: 8
|
||||
var r7;
|
||||
var object2;
|
||||
if (a0 === 1) {
|
||||
object2 = {'type': 'custom', 'component': null, 'key': 'spamRequests', 'itemType': 'spamRequests'};
|
||||
object2.component = component_115749;
|
||||
} else {
|
||||
var binding = env0_15;
|
||||
var Incoming = env1_16.Incoming;
|
||||
r7 = binding === Incoming ? incomingData : outgoingData;
|
||||
var items2 = r7.items;
|
||||
object2 = {type: 'user'};
|
||||
var user = items2[a1].user;
|
||||
var ACTIONS = UserRowModes.ACTIONS;
|
||||
object2.props = {type: r7.relationship, user: user, onPress: env0_17, mode: ACTIONS, start: a1 === 0,
|
||||
end: a1 === items2.length - 1, applicationId: items2[a1].applicationId,
|
||||
isGameRelationship: items2[a1].isGameRelationship};
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function FriendRequestsScreenOnSetActiveIndex(a0) { // fn#115752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5273, owner: FriendRequestsScreen.onSetActiveIndex, offset: 0x0246cdb1, size: 53 bytes, params: 2, frame: 11
|
||||
env0_16(a0 === 0 ? env1_16.Incoming : env1_16.Outgoing);
|
||||
}
|
||||
|
||||
function FriendRequestsScreenOnPress() { // fn#115753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5773, owner: FriendRequestsScreen.onPress, offset: 0x0246cde6, size: 30 bytes, params: 1, frame: 11
|
||||
handleClearAllIncomingRequests(incoming.length);
|
||||
}
|
||||
|
||||
function _fun115720() { // fn#115720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1646, offset: 0x0246c544, size: 34 bytes, params: 1, frame: 11
|
||||
return NotificationCenterItemsStore.localItems.filter(_fun115721);
|
||||
}
|
||||
|
||||
function _fun115722() { // fn#115722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1897, offset: 0x0246c5c2, size: 136 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
var binding;
|
||||
var value2;
|
||||
var value;
|
||||
if (env0_0.length > 0) {
|
||||
binding = env0_0;
|
||||
value = binding.map(function(a0) {
|
||||
return a0.local_id;
|
||||
});
|
||||
value = value.filter(global.Boolean);
|
||||
value2 = environment.__proto__.__proto__;
|
||||
(require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).markNotificationCenterLocalItemsAcked(value);
|
||||
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
|
||||
value.bulkMarkNotificationCenterItemsAcked(binding.filter(_fun115724));
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115728({applicationId}) { // fn#115728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2503, offset: 0x0246c749, size: 29 bytes, params: 2, frame: 11
|
||||
env0_0.add(applicationId);
|
||||
}
|
||||
|
||||
function component_115749() { // fn#115749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4211, offset: 0x0246cba4, size: 445 bytes, params: 1, frame: 27
|
||||
var environment;
|
||||
var r7;
|
||||
var r5;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var object4;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const length = spam.length;
|
||||
const value3 = null;
|
||||
if (length > 0) {
|
||||
r7 = <TableRow onPress={onPress_115750} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fUQoqD)} trailing={((Text) => <Text variant="text-sm/medium" color="text-muted">{spam.length}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} arrow />;
|
||||
} else {
|
||||
r7 = value3;
|
||||
}
|
||||
if (ignoredUsers.length > 0) {
|
||||
r5 = <TableRow onPress={onPress_115751} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.en1Gkz)} trailing={((Text) => <Text variant="text-sm/medium" color="text-muted">{ignoredUsers.length}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} arrow />;
|
||||
} else {
|
||||
r5 = value3;
|
||||
}
|
||||
return (
|
||||
<TableRowGroup hasIcons={false}>
|
||||
{r7}
|
||||
{r5}
|
||||
</TableRowGroup>
|
||||
);
|
||||
}
|
||||
|
||||
function handleClearAllIncomingRequests(a0) { // fn#115754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5777, owner: FriendRequestsScreen.onPress.handleClearAllIncomingRequests, offset: 0x0246ce04, size: 89 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert('clear-all-incoming-requests',
|
||||
((Component) => <Component incomingRequestCount={a0} />)(env2_4.lazy(_fun115755)));
|
||||
}
|
||||
|
||||
function _fun115721(a0) { // fn#115721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:1671, offset: 0x0246c566, size: 92 bytes, params: 2, frame: 15
|
||||
const type = a0.type;
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
|
||||
return type === INCOMING_FRIEND_REQUESTS || a0.type === NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
|
||||
}
|
||||
|
||||
function _fun115724(a0) { // fn#115724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:2068, offset: 0x0246c64a, size: 52 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
return !value.isRemoteAcked(a0, env1_1);
|
||||
}
|
||||
|
||||
function component_115749OnPress() { // fn#115750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4303, owner: component_115749.onPress, offset: 0x0246cd61, size: 40 bytes, params: 1, frame: 13
|
||||
env2_18.navigate('friends', {screen: 'spam-requests'});
|
||||
}
|
||||
|
||||
function component_115749OnPress_115751() { // fn#115751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:4548, owner: component_115749.onPress, offset: 0x0246cd89, size: 40 bytes, params: 1, frame: 13
|
||||
env2_18.navigate('friends', {screen: 'ignored-user-requests'});
|
||||
}
|
||||
|
||||
function _fun115755() { // fn#115755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15362:5834, offset: 0x0246ce5d, size: 45 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return require(dependencyMap[13])(dependencyMap[12], dependencyMap.paths);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/* Metro module 15163; source: modules/main_tabs_v2/native/friends/screens/FriendRequestsSettingsScreen.tsx; dependencies: [31, 27, 33, 4501, 697, 7704, 15164, 2] */
|
||||
function _fun115708(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15360:6, offset: 0x0246b49f, size: 287 bytes, params: 8, frame: 23
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).ScrollView;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.Fragment;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object.flex = 1;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingHorizontal = PX_16;
|
||||
const env0_6 = Reflect.apply(createStyles, value, [{container: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendRequestsSettingsScreen.tsx');
|
||||
exports.default = FriendRequestsSettingsScreen;
|
||||
}
|
||||
|
||||
function FriendRequestsSettingsScreen() { // fn#115709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15360:452, offset: 0x0246b5be, size: 131 bytes, params: 1, frame: 21
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<>
|
||||
{((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}
|
||||
<ScrollView style={styles.container}>
|
||||
{((Component) => <Component />)(importDefault(15164) /* metro dependency 15164: UserSettingsFriendRequests */)}
|
||||
</ScrollView>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
/* Metro module 15134; source: modules/main_tabs_v2/native/friends/screens/FriendsScreen.tsx; dependencies: [31, 27, 5242, 3793, 33, 4501, 697, 1484, 6771, 6789, 1585, 566, 15135, 1848, 8743, 15136, 15139, 14807, 4058, 1244, 6238, 9768, 5473, 4578, 7691, 9871, 2] */
|
||||
function _fun115372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:6, offset: 0x0245e4a7, size: 396 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const gameRelationshipStore = importDefault(5242) /* metro dependency 5242: GameRelationshipStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.container = {paddingTop: PX_8, flex: 1};
|
||||
const object4 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.marginHorizontal = PX_16;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object4.overflow = 'hidden';
|
||||
object2.requestsButtonContainer = object4;
|
||||
object2.emptyContainer = {'justifyContent': 'center', 'flexGrow': 1};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.buttonContainer = {'flexDirection': 'row', 'marginBottom': null, 'width': '100%', marginBottom: PX_16};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendsScreen.tsx');
|
||||
exports.default = FriendsScreen;
|
||||
}
|
||||
|
||||
function FriendsScreen() { // fn#115373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:596, offset: 0x0245e633, size: 535 bytes, params: 1, frame: 30
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const styles = useStyles();
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const FRIENDS_LIST = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FRIENDS_LIST;
|
||||
const analyticsLocations = defaultImport(FRIENDS_LIST).analyticsLocations;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const env0_3 = bottom;
|
||||
const {incoming, outgoing, spam,
|
||||
pendingIgnored} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RelationshipStore,
|
||||
GameRelationshipStore], _fun115374);
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useCallback(_fun115375, [analyticsLocations]);
|
||||
const value5 = binding.useCallback(_fun115376, [value2]);
|
||||
binding.useEffect(_fun115377, []);
|
||||
const value6 = binding.useMemo(_fun115378, [incoming, value2, outgoing, spam, pendingIgnored]);
|
||||
const value7 = binding.useMemo(_fun115380, [bottom, incoming, value2, outgoing, styles, spam]);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
let value = importDefault(7691) /* metro dependency 7691: SearchableUserList */;
|
||||
value = ((Component) => <Component onSelectUser={value4} handleMessage={value5} actions={value6} withAffinitySuggestions={false} withGameFriends defaultNoResultsFound={value7} hideSearchOnDefaultNoResults disableThemedGradient />)(value);
|
||||
const TTIFirstContentfulPaint = (require(9871) /* metro dependency 9871: TTIFirstContentfulPaint */).TTIFirstContentfulPaint;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
{value}
|
||||
<TTIFirstContentfulPaint label="friends" />
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun115374() { // fn#115374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:771, offset: 0x0245e84a, size: 136 bytes, params: 1, frame: 19
|
||||
const object2 = {};
|
||||
const value = environment.__proto__;
|
||||
object2.incoming = (require(15135) /* metro dependency 15135: useFriendRequestCounts */).getIncomingFriendRequestCount([RelationshipStore,
|
||||
GameRelationshipStore]);
|
||||
object2.outgoing = (require(15135) /* metro dependency 15135: useFriendRequestCounts */).getOutgoingFriendRequestCount([RelationshipStore,
|
||||
GameRelationshipStore]);
|
||||
object2.spam = RelationshipStore.getSpamCount();
|
||||
object2.pendingIgnored = RelationshipStore.getPendingIgnoredCount();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun115375(a0) { // fn#115375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1026, offset: 0x0245e8d2, size: 89 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
|
||||
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id, localUser: a0,
|
||||
sourceAnalyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function _fun115376({id}) { // fn#115376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1150, offset: 0x0245e92b, size: 71 bytes, params: 2, frame: 14
|
||||
env0_0.navigate('friends', {screen: 'new-message', params: {defaultSelectedUserId: id,
|
||||
sourcePage: 'Friends Screen'}});
|
||||
}
|
||||
|
||||
function _fun115377() { // fn#115377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1283, offset: 0x0245e972, size: 65 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
(importDefault(15136) /* metro dependency 15136: trackFriendListViewed */)({tab_opened: null});
|
||||
(importDefault(15139) /* metro dependency 15139: trackFriendListClicked */)({tab_opened: null});
|
||||
}
|
||||
|
||||
function _fun115378() { // fn#115378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1367, offset: 0x0245e9b3, size: 258 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
var push;
|
||||
var object2;
|
||||
var value6;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const items2 = [];
|
||||
const value3 = incoming + spam + pendingIgnored;
|
||||
if (value3 > 0 || outgoing > 0) {
|
||||
push = items2.push;
|
||||
object2 = {};
|
||||
value6 = environment.__proto__;
|
||||
object2.icon = importDefault(14807) /* metro dependency 14807 */;
|
||||
object2.IconComponent = (require(4058) /* metro dependency 4058: SendMessageIcon */).SendMessageIcon;
|
||||
object2.iconVariant = 'default';
|
||||
object2.label = intl.string(t.fyA115);
|
||||
object2.subLabel = intl.formatToPlainString(t['1IEawz'], {incoming: value3, outgoing: outgoing});
|
||||
object2.onPress = onPress_115379;
|
||||
Reflect.apply(push, items2, [object2]);
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun115380() { // fn#115380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1711, offset: 0x0245ead9, size: 760 bytes, params: 1, frame: 30
|
||||
var r0;
|
||||
var TableRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
if (incoming + outgoing + spam > 0) {
|
||||
var viewBinding2Props = {style: styles.requestsButtonContainer};
|
||||
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
r0 = <View {...viewBinding2Props}><TableRow start end icon={((Icon) => <Icon source={importDefault(14807) /* metro dependency 14807 */} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)} trailing={((Arrow) => <Arrow />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Arrow)} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyA115)} subLabel={incoming + outgoing > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['1IEawz'],
|
||||
|
||||
{incoming: incoming,
|
||||
outgoing: outgoing}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.e6BtLq,
|
||||
|
||||
{spam: spam})} onPress={onPress_115381} /></View>;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
const NoResults = importDefault(9768) /* metro dependency 9768: NoResults */;
|
||||
const noResultsProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['oi+B4p']),
|
||||
fullHeight: true};
|
||||
stylesBinding = styles;
|
||||
noResultsProps.containerStyle = stylesBinding.emptyContainer;
|
||||
const WumpusCouchSpotIllustration = (require(5473) /* metro dependency 5473: native */).WumpusCouchSpotIllustration;
|
||||
noResultsProps.illustration = WumpusCouchSpotIllustration;
|
||||
const items2 = [stylesBinding.buttonContainer];
|
||||
items2[1] = {paddingBottom: bottom};
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{r0}
|
||||
<NoResults {...noResultsProps}>
|
||||
<View style={items2}>
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zIJnA6)}
|
||||
size="lg"
|
||||
onPress={onPress_115382}
|
||||
grow
|
||||
/>
|
||||
</View>
|
||||
</NoResults>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function onPress_115379() { // fn#115379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:1633, offset: 0x0245eab5, size: 36 bytes, params: 1, frame: 13
|
||||
return env1_0.navigate('friends', {screen: 'requests'});
|
||||
}
|
||||
|
||||
function onPress_115381() { // fn#115381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:2138, offset: 0x0245edd1, size: 91 bytes, params: 1, frame: 14
|
||||
if (incoming + outgoing > 0) {
|
||||
env1_0.navigate('friends', {screen: 'requests'});
|
||||
} else {
|
||||
env1_0.navigate('friends', {screen: 'spam-requests'});
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_115382() { // fn#115382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15331:2554, offset: 0x0245ee2c, size: 56 bytes, params: 1, frame: 14
|
||||
return env1_0.navigate('friends', {screen: 'add-friends', params: {sourcePage: 'Friends Screen'}});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Metro module 12016; source: modules/main_tabs_v2/native/friends/screens/FriendsScreenConstants.tsx; dependencies: [2] */
|
||||
function _fun92311(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12202:6, offset: 0x020843af, size: 219 bytes, params: 8, frame: 17
|
||||
var object3;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object3 = {USER_SUGGESTIONS: 1};
|
||||
object3[1] = 'USER_SUGGESTIONS';
|
||||
object3.FF_PEOPLE_YOU_MAY_KNOW = 2;
|
||||
object3[2] = 'FF_PEOPLE_YOU_MAY_KNOW';
|
||||
const object4 = {SYNC_CONTACTS: 0};
|
||||
object4[0] = 'SYNC_CONTACTS';
|
||||
object4.FRIEND_SUGGESTIONS = 1;
|
||||
object4[1] = 'FRIEND_SUGGESTIONS';
|
||||
object4.PENDING = 2;
|
||||
object4[2] = 'PENDING';
|
||||
object4.ONLINE = 3;
|
||||
object4[3] = 'ONLINE';
|
||||
object4.OFFLINE = 4;
|
||||
object4[4] = 'OFFLINE';
|
||||
object4.SPAM = 5;
|
||||
object4[5] = 'SPAM';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/FriendsScreenConstants.tsx');
|
||||
exports.SuggestedFriendSource = object3;
|
||||
exports.Sections = object4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/* Metro module 15169; source: modules/main_tabs_v2/native/friends/screens/IgnoredUserRequestsScreen.tsx; dependencies: [31, 3793, 1878, 7690, 661, 33, 6771, 6789, 566, 15167, 8743, 7697, 2] */
|
||||
function _fun115777(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:6, offset: 0x0246d83b, size: 218 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 relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/IgnoredUserRequestsScreen.tsx');
|
||||
exports.default = IgnoredUserRequestsScreen;
|
||||
}
|
||||
|
||||
function IgnoredUserRequestsScreen({navigation}) { // fn#115778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:309, offset: 0x0246d915, size: 349 bytes, params: 2, frame: 22
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const FRIEND_REQUESTS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FRIEND_REQUESTS;
|
||||
const analyticsLocations = defaultImport(FRIEND_REQUESTS).analyticsLocations;
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun115780,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore], function() {
|
||||
return require(dependencyMap[9]).getPendingRelationshipIds(RelationshipStore.getMutableRelationships()).ignoredUserIds;
|
||||
})]);
|
||||
const binding = env0_3;
|
||||
let useCallback = binding.useCallback;
|
||||
const value4 = Reflect.apply(useCallback, binding, [_fun115783, [analyticsLocations]]);
|
||||
const value5 = binding.useCallback(function() {
|
||||
}, []);
|
||||
useCallback = binding.useCallback;
|
||||
if (value3.length !== 0) {
|
||||
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
|
||||
return (
|
||||
<UsersFastList
|
||||
getItemProps={Reflect.apply(useCallback, binding, [_fun115785, [value4, value3]])}
|
||||
getSectionProps={value5}
|
||||
sections={[value3.length]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
navigation.goBack();
|
||||
}
|
||||
|
||||
function _fun115780() { // fn#115780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:575, offset: 0x0246daac, size: 45 bytes, params: 1, frame: 12
|
||||
return env0_1.map(function(a0) {
|
||||
return UserStore.getUser(a0);
|
||||
}).filter(function(a0) {
|
||||
return a0 != null;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun115785(a0) { // fn#115785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15366:768, offset: 0x0246dad9, size: 105 bytes, params: 2, frame: 7
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
const binding = env0_2;
|
||||
const ACTIONS = UserRowModes.ACTIONS;
|
||||
return {type: 'user', props: {type: PENDING_INCOMING, user: binding[a0], onPress: env0_3, mode: ACTIONS,
|
||||
start: a0 === 0, end: a0 === binding.length - 1}};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,700 @@
|
||||
/* Metro module 15153; source: modules/main_tabs_v2/native/friends/screens/NewGroupDMScreen.tsx; dependencies: [57, 5, 31, 27, 1379, 12601, 4294, 1878, 7690, 661, 33, 4501, 697, 4603, 7709, 8916, 8112, 4080, 566, 15142, 683, 3857, 1244, 9603, 7702, 9171, 8879, 7147, 1305, 7691, 2] */
|
||||
function _fun115563(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:6, offset: 0x024652b9, size: 584 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const handleOneRecipientInDM = function() {
|
||||
return _handleOneRecipientInDM.apply(this, arguments);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.ActivityIndicator;
|
||||
const env0_7 = value.View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const privateChannelRecipientsInviteStore = importDefault(12601) /* metro dependency 12601: PrivateChannelRecipientsInviteStore */;
|
||||
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_12 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_13 = value.InstantInviteSources;
|
||||
const env0_14 = value.AnalyticEvents;
|
||||
const env0_15 = value.AnalyticsSections;
|
||||
const env0_16 = value.NEW_GROUP_DM_POPOUT_ID;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_17 = value.jsx;
|
||||
const env0_18 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.button = {color: INTERACTIVE_TEXT_ACTIVE};
|
||||
object2.container = {'height': '100%', 'display': 'flex'};
|
||||
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.instantInviteView = {flexShrink: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.nameInputContainer = {paddingHorizontal: 16, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.nameInput = {'backgroundColor': null, 'marginBottom': 8, 'height': 40, 'width': '100%',
|
||||
backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
const env0_19 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/NewGroupDMScreen.tsx');
|
||||
exports.default = NewGroupDMScreen;
|
||||
}
|
||||
|
||||
function _handleOneRecipientInDM() { // fn#115565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:864, offset: 0x02465501, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun115567).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _handleInviteUsers() { // fn#115568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:1128, offset: 0x024655ca, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_4(_fun115570).apply(this, arguments);
|
||||
}
|
||||
|
||||
function NewGroupDMScreen(a0) { // fn#115573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:2001, offset: 0x02465979, size: 1071 bytes, params: 2, frame: 37
|
||||
var r5;
|
||||
var TextInput;
|
||||
var intl;
|
||||
const navigation = a0.navigation;
|
||||
const params = a0.route.params;
|
||||
const env0_1 = params.channelId;
|
||||
const locationPage = params.locationPage;
|
||||
let allowNameEdit = params.allowNameEdit;
|
||||
const value = undefined;
|
||||
allowNameEdit = !(allowNameEdit === value) && allowNameEdit;
|
||||
const styles = useStyles();
|
||||
const env0_3 = styles;
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
const env0_4 = channel;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const env0_5 = currentUser;
|
||||
let binding = env0_5;
|
||||
let useState = binding.useState;
|
||||
const value4 = Reflect.apply(useState, binding, [[]]);
|
||||
const binding2 = env0_3;
|
||||
const value5 = binding2(value4, 2);
|
||||
const value6 = 0;
|
||||
const property = value5[value6];
|
||||
const env0_7 = value5[1];
|
||||
useState = binding.useState;
|
||||
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property2 = value7[value6];
|
||||
const env0_9 = value7[1];
|
||||
useState = binding.useState;
|
||||
const value8 = binding2(Reflect.apply(useState, binding, ['']), 2);
|
||||
const property3 = value8[value6];
|
||||
const property4 = value8[1];
|
||||
const value9 = binding.useMemo(function() {
|
||||
var r0;
|
||||
r0 = channel?.recipients;
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
}, [channel]);
|
||||
const length = property.length;
|
||||
const length2 = value9.length;
|
||||
const value10 = null;
|
||||
const value11 = length + ((value10 != length2 ? length2 : value6) + 1);
|
||||
const value12 = value11 > (importDefault(15142) /* metro dependency 15142: getGroupDMRecipientLimit */)(channel);
|
||||
binding = env0_5;
|
||||
binding.useEffect(function() {
|
||||
var defaultImport = importDefault(dependencyMap[20]);
|
||||
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
|
||||
defaultImport.track(OPEN_POPOUT, {type: AnalyticsSections.DM_INVITE, location: {page: locationPage}});
|
||||
}, [locationPage]);
|
||||
binding.useLayoutEffect(_fun115582, [channel, property2, navigation, value11, value12, value9, property,
|
||||
binding.useCallback(env0_4(_fun115579), [channel, navigation, value9, property, property3]), styles]);
|
||||
const value15 = binding.useCallback(_fun115589, []);
|
||||
const value17 = env0_3(binding.useState(false), 2);
|
||||
const env0_15 = value17[value6];
|
||||
const env0_16 = value17[1];
|
||||
const value18 = (importDefault(7702) /* metro dependency 7702: useIsUsingClientTheme */)();
|
||||
const r7 = (value10 == channel ? value : channel.isGroupDM()) && value10 != currentUser && value11 < (importDefault(15142) /* metro dependency 15142: getGroupDMRecipientLimit */)(channel) && <View style={styles.instantInviteView}>{((Component) => <Component onItemPressed={_fun115591()} />)(importDefault(9171) /* metro dependency 9171: InstantInviteShareApps */)}</View>;
|
||||
if (allowNameEdit) {
|
||||
var viewBinding3Props = {style: styles.nameInputContainer};
|
||||
TextInput = (require(1305) /* metro dependency 1305: native */).TextInput;
|
||||
var textInputProps = {style: styles.nameInput, value: property3, onChangeText: property4};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
textInputProps.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.KSVhrX);
|
||||
r5 = <View {...viewBinding3Props}><TextInput {...textInputProps} /></View>;
|
||||
} else {
|
||||
r5 = value10;
|
||||
}
|
||||
const SearchableUserList = importDefault(7691) /* metro dependency 7691: SearchableUserList */;
|
||||
const TOGGLE = UserRowModes.TOGGLE;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{r7}
|
||||
{r5}
|
||||
<SearchableUserList
|
||||
rowMode={TOGGLE}
|
||||
onSelectUser={value15}
|
||||
disabledUserIds={value9}
|
||||
selectedUserIds={property}
|
||||
withAffinitySuggestions
|
||||
withAlphabeticalSections={false}
|
||||
disableGradient
|
||||
disableStickySections={value18}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function* _fun115567(a0, a1) { // fn#115567, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:933, offset: 0x0246553e, size: 140 bytes, params: 3, frame: 18
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var value3 = env2_1(env2_2[13]);
|
||||
yield value3.openPrivateChannel({recipientIds: [], location: 'New Group DM', onBeforeTransition: a1});
|
||||
var value4 = undefined;
|
||||
if (false) {
|
||||
return value4;
|
||||
}
|
||||
value = env2_1(env2_2[13]);
|
||||
yield value.addRecipients(value4, a0, undefined);
|
||||
}
|
||||
}
|
||||
|
||||
async function _fun115570(a0) { // fn#115570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:1187, offset: 0x02465610, size: 599 bytes, params: 2, frame: 25
|
||||
var environment;
|
||||
var r6;
|
||||
var Array;
|
||||
var from;
|
||||
var binding;
|
||||
var value8;
|
||||
var value9;
|
||||
var value11;
|
||||
var showGuardCallAlert;
|
||||
let value = a1;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const env0_0 = a0;
|
||||
if (value !== undefined) {
|
||||
r6 = value;
|
||||
} else {
|
||||
Array = global.Array;
|
||||
from = Array.from;
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_9;
|
||||
value = Reflect.apply(from, Array, [binding.getSelectedUsers()]);
|
||||
r6 = value;
|
||||
}
|
||||
const env0_2 = a2;
|
||||
let env0_3 = undefined;
|
||||
await undefined;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
if (a0 != null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_10;
|
||||
if (binding.getChannelId() !== a0.id) {
|
||||
if (a0.isDM()) {
|
||||
if (r6.length === 1) {
|
||||
await env2_20(r6, a2);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
env0_3 = value;
|
||||
value = environment.__proto__.__proto__;
|
||||
env2_1(env2_2[17]).hideActionSheet(env2_16);
|
||||
return env0_3;
|
||||
}
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[13]);
|
||||
await value.addRecipients(a0.id, r6, undefined, a2);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
env0_3 = value;
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding(env2_2[17]).hideActionSheet(env2_16);
|
||||
return env0_3;
|
||||
}
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[13]);
|
||||
await value.addRecipients(a0.id, r6, undefined, a2);
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
env0_3 = value;
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding(env2_2[17]).hideActionSheet(env2_16);
|
||||
return env0_3;
|
||||
}
|
||||
}
|
||||
if (a0 != null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_10;
|
||||
if (binding.getChannelId() === a0.id) {
|
||||
if (a0.isDM()) {
|
||||
binding = env2_0;
|
||||
value11 = binding(env2_2[14]);
|
||||
showGuardCallAlert = value11.showGuardCallAlert;
|
||||
binding = env2_4;
|
||||
Reflect.apply(showGuardCallAlert, value11, [binding(_fun115572)]);
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding(env2_2[17]).hideActionSheet(env2_16);
|
||||
return env0_3;
|
||||
}
|
||||
if (a0.isGroupDM()) {
|
||||
binding = env2_1;
|
||||
value8 = binding(env2_2[13]);
|
||||
await value8.addRecipients(a0.id, r6, undefined, a2);
|
||||
value9 = undefined;
|
||||
if (false) {
|
||||
return value9;
|
||||
}
|
||||
env0_3 = value9;
|
||||
binding = env2_1;
|
||||
value = binding(env2_2[15]);
|
||||
value.ring(env0_3, r6, 'gdm_invite');
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding(env2_2[17]).hideActionSheet(env2_16);
|
||||
return env0_3;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding(env2_2[17]).hideActionSheet(env2_16);
|
||||
return env0_3;
|
||||
}
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
value = env2_1(env2_2[13]);
|
||||
await value.openPrivateChannel({recipientIds: r6, location: 'New Group DM', onBeforeTransition: a2});
|
||||
value = undefined;
|
||||
if (false) {
|
||||
return value;
|
||||
}
|
||||
env0_3 = value;
|
||||
value = environment.__proto__.__proto__;
|
||||
env2_1(env2_2[17]).hideActionSheet(env2_16);
|
||||
return env0_3;
|
||||
}
|
||||
|
||||
function* _fun115579() { // fn#115579, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:2607, offset: 0x02465e3d, size: 323 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
var binding;
|
||||
var items;
|
||||
var value3;
|
||||
var closure;
|
||||
var closure2;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var value10;
|
||||
var value11;
|
||||
var error;
|
||||
var value13;
|
||||
var binding2;
|
||||
var value14;
|
||||
var open;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
PrivateChannelRecipientsInviteStore(true);
|
||||
try {
|
||||
binding = env1_4;
|
||||
} catch (error) {
|
||||
value13 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value14 = binding(binding2[21]);
|
||||
open = value14.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
Reflect.apply(open, value14, [{key: 'GROUP_DM_ADD_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['N/9OFy']])}]);
|
||||
PrivateChannelRecipientsInviteStore(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
value13 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value14 = binding(binding2[21]);
|
||||
open = value14.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
Reflect.apply(open, value14, [{key: 'GROUP_DM_ADD_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['N/9OFy']])}]);
|
||||
PrivateChannelRecipientsInviteStore(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
items = [];
|
||||
} catch (error) {
|
||||
value13 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value14 = binding(binding2[21]);
|
||||
open = value14.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
Reflect.apply(open, value14, [{key: 'GROUP_DM_ADD_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['N/9OFy']])}]);
|
||||
PrivateChannelRecipientsInviteStore(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value3 = arraySpread(items, ActivityIndicator, 0, undefined);
|
||||
} catch (error) {
|
||||
value13 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value14 = binding(binding2[21]);
|
||||
open = value14.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
Reflect.apply(open, value14, [{key: 'GROUP_DM_ADD_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['N/9OFy']])}]);
|
||||
PrivateChannelRecipientsInviteStore(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
value13 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value14 = binding(binding2[21]);
|
||||
open = value14.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
Reflect.apply(open, value14, [{key: 'GROUP_DM_ADD_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['N/9OFy']])}]);
|
||||
PrivateChannelRecipientsInviteStore(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
arraySpread(items, UserStore, value3, undefined);
|
||||
} catch (error) {
|
||||
value13 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value14 = binding(binding2[21]);
|
||||
open = value14.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
Reflect.apply(open, value14, [{key: 'GROUP_DM_ADD_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['N/9OFy']])}]);
|
||||
PrivateChannelRecipientsInviteStore(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
closure = handleInviteUsers;
|
||||
} catch (error) {
|
||||
value13 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value14 = binding(binding2[21]);
|
||||
open = value14.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
Reflect.apply(open, value14, [{key: 'GROUP_DM_ADD_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['N/9OFy']])}]);
|
||||
PrivateChannelRecipientsInviteStore(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
closure2 = function() {
|
||||
return (require.getParent() ?? require).goBack();
|
||||
};
|
||||
} catch (error) {
|
||||
value13 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value14 = binding(binding2[21]);
|
||||
open = value14.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
Reflect.apply(open, value14, [{key: 'GROUP_DM_ADD_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['N/9OFy']])}]);
|
||||
PrivateChannelRecipientsInviteStore(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value4 = closure(binding, items, closure2);
|
||||
} catch (error) {
|
||||
value13 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value14 = binding(binding2[21]);
|
||||
open = value14.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
Reflect.apply(open, value14, [{key: 'GROUP_DM_ADD_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['N/9OFy']])}]);
|
||||
PrivateChannelRecipientsInviteStore(false);
|
||||
return undefined;
|
||||
}
|
||||
yield value4;
|
||||
try {
|
||||
value5 = undefined;
|
||||
value6 = false;
|
||||
} catch (error) {
|
||||
value13 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
binding2 = env2_2;
|
||||
value14 = binding(binding2[21]);
|
||||
open = value14.open;
|
||||
binding = env2_0;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
Reflect.apply(open, value14, [{key: 'GROUP_DM_ADD_ERROR', content: Reflect.apply(string, intl,
|
||||
[t['N/9OFy']])}]);
|
||||
PrivateChannelRecipientsInviteStore(false);
|
||||
return undefined;
|
||||
}
|
||||
if (value6) {
|
||||
return value5;
|
||||
}
|
||||
if (env1_4 == null && value5 != null && RTCConnectionStore !== '') {
|
||||
value10 = environment.__proto__.__proto__;
|
||||
value11 = env2_1(env2_2[13]);
|
||||
yield value11.setName(value5, RTCConnectionStore);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115582() { // fn#115582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:3006, offset: 0x02465fc5, size: 376 bytes, params: 1, frame: 22
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r10 = channel == null ? intl.string(t['3hF1W4']) : channel.isGroupDM() ? intl.string(t['LR+Ptf']) : intl.string(t['3hF1W4']);
|
||||
if (channel != null) {
|
||||
channel.isGroupDM();
|
||||
}
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const YUhnoy = t.YUhnoy;
|
||||
const object2 = {numMembers: env0_12};
|
||||
object2.maxMemberLimit = (importDefault(15142) /* metro dependency 15142: getGroupDMRecipientLimit */)(channel);
|
||||
const value7 = Reflect.apply(formatToPlainString, intl, [YUhnoy, object2]);
|
||||
const navigationBinding = navigation;
|
||||
navigationBinding.setOptions({title: '' + r10 + ' (' + value7 + ')', headerTitle: headerTitle_115583,
|
||||
headerRight: headerRight_115584});
|
||||
}
|
||||
|
||||
function _fun115589(a0) { // fn#115589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:3856, offset: 0x024663b2, size: 32 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
env0_7(_fun115590);
|
||||
}
|
||||
|
||||
function _fun115591() { // fn#115591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:4165, offset: 0x024663d2, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_4(_fun115593);
|
||||
return _fun115594;
|
||||
}
|
||||
|
||||
function* _fun115572() { // fn#115572, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:1461, offset: 0x02465872, size: 263 bytes, params: 1, frame: 23
|
||||
var binding;
|
||||
var value7;
|
||||
var value8;
|
||||
var value10;
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
if (env1_1.length === 1) {
|
||||
value7 = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
yield env4_20(env1_1, env1_2);
|
||||
value8 = undefined;
|
||||
if (false) {
|
||||
return value8;
|
||||
}
|
||||
env1_3 = value8;
|
||||
value10 = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
} else {
|
||||
binding = env4_1;
|
||||
var value4 = binding(env4_2[13]);
|
||||
var addRecipients = value4.addRecipients;
|
||||
var id = env1_0.id;
|
||||
binding = env1_1;
|
||||
yield Reflect.apply(addRecipients, value4, [id, binding, undefined, env1_2]);
|
||||
var value5 = undefined;
|
||||
if (false) {
|
||||
return value5;
|
||||
}
|
||||
env1_3 = value5;
|
||||
}
|
||||
var value11 = env4_0(env4_2[14]);
|
||||
yield value11.monkeyPatchCall();
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env4_1;
|
||||
var binding3 = env4_2;
|
||||
binding(binding3[15]).call(env1_3, false, true);
|
||||
binding(binding3[16])(env1_3);
|
||||
}
|
||||
}
|
||||
|
||||
function handleInviteUsers() { // fn#115580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:2643, offset: 0x02465f80, size: 30 bytes, params: 1, frame: 13
|
||||
return env3_22.apply(this, arguments);
|
||||
}
|
||||
|
||||
function headerTitle_115583(a0) { // fn#115583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:3294, offset: 0x0246613d, size: 152 bytes, params: 2, frame: 18
|
||||
if (a0 == null) {
|
||||
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
|
||||
throw undefined;
|
||||
}
|
||||
let value = copyDataProperties({}, a0, undefined, undefined);
|
||||
const GenericHeaderTitle = (require(9603) /* metro dependency 9603: HeaderShared */).GenericHeaderTitle;
|
||||
const genericHeaderTitleProps = {...value};
|
||||
genericHeaderTitleProps['title'] = env0_0;
|
||||
genericHeaderTitleProps['subtitle'] = env0_1;
|
||||
value = environment.__proto__;
|
||||
genericHeaderTitleProps['color'] = env1_13 ? 'text-feedback-critical' : 'mobile-text-heading-primary';
|
||||
return <GenericHeaderTitle {...genericHeaderTitleProps} />;
|
||||
}
|
||||
|
||||
function headerRight_115584(a0) { // fn#115584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:3436, offset: 0x024661d5, size: 416 bytes, params: 2, frame: 23
|
||||
var environment;
|
||||
var r5;
|
||||
var r6;
|
||||
var r0;
|
||||
var channelBinding;
|
||||
var value2;
|
||||
var getRenderHeaderTextButton;
|
||||
const intl = require(dependencyMap[22]).intl;
|
||||
var binding;
|
||||
var renderHeaderTextButton;
|
||||
var object2;
|
||||
var value5;
|
||||
var value6;
|
||||
var moduleValue2;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
const value = environment.__proto__;
|
||||
if (env1_8) {
|
||||
value9 = environment.__proto__.__proto__;
|
||||
r0 = <ActivityIndicator color={styles.button.color} size="small" />;
|
||||
} else {
|
||||
channelBinding = channel;
|
||||
if (channelBinding == null) {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
renderHeaderTextButton = require(dependencyMap[23]).getRenderHeaderTextButton(intl.string(require(dependencyMap[22]).t.CumH4u),
|
||||
|
||||
|
||||
env2_4(_fun115588));
|
||||
object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
object2['disabled'] = env1_13;
|
||||
r0 = renderHeaderTextButton(object2);
|
||||
} else {
|
||||
channelBinding = channel;
|
||||
if (channelBinding.isGroupDM()) {
|
||||
value5 = environment.__proto__.__proto__;
|
||||
value6 = undefined;
|
||||
moduleValue2 = require(dependencyMap[23]);
|
||||
getRenderHeaderTextButton = moduleValue2.getRenderHeaderTextButton;
|
||||
value7 = intl.string(require(dependencyMap[22]).t.OYkgVk);
|
||||
binding = env2_4;
|
||||
value8 = Reflect.apply(getRenderHeaderTextButton, moduleValue2, [value7, binding(_fun115586)]);
|
||||
object2 = {};
|
||||
copyDataProperties(object2, a0, dependencyMap);
|
||||
binding = env1_13;
|
||||
if (binding) {
|
||||
r6 = binding;
|
||||
} else {
|
||||
r5 = channel == null ? value6 : channel.isGroupDM();
|
||||
r5 = r5 && env1_6.length <= 0;
|
||||
r6 = r5;
|
||||
}
|
||||
object2['disabled'] = r6;
|
||||
r0 = value8(object2);
|
||||
} else {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
renderHeaderTextButton = require(dependencyMap[23]).getRenderHeaderTextButton(intl.string(require(dependencyMap[22]).t.CumH4u),
|
||||
|
||||
|
||||
|
||||
env2_4(_fun115588));
|
||||
object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
object2['disabled'] = env1_13;
|
||||
r0 = renderHeaderTextButton(object2);
|
||||
}
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function* _fun115593(a0) { // fn#115593, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:4185, offset: 0x02466401, size: 270 bytes, params: 2, frame: 22
|
||||
var object3;
|
||||
var binding2;
|
||||
var intl;
|
||||
var formatToPlainString;
|
||||
var property;
|
||||
var object4;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
if (!AnalyticsSections) {
|
||||
NEW_GROUP_DM_POPOUT_ID(true);
|
||||
var binding = env3_1;
|
||||
var value4 = binding(env3_2[26]);
|
||||
var mobileCreateInvite = value4.mobileCreateInvite;
|
||||
binding = env2_4;
|
||||
var GROUP_DM = env3_13.GROUP_DM;
|
||||
yield Reflect.apply(mobileCreateInvite, value4, [binding, GROUP_DM]);
|
||||
var value5 = undefined;
|
||||
if (false) {
|
||||
return value5;
|
||||
}
|
||||
if (value5 != null) {
|
||||
object3 = {channel: env2_4, code: value5};
|
||||
binding = env3_0;
|
||||
binding2 = env3_2;
|
||||
intl = binding(binding2[22]).intl;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
property = binding(binding2[22]).t['+zWvOQ'];
|
||||
object4 = {};
|
||||
object4.username = env2_5.username;
|
||||
binding = env3_1;
|
||||
object4.link = binding(binding2[27])(value5);
|
||||
object3.message = Reflect.apply(formatToPlainString, intl, [property, object4]);
|
||||
object3.location = env3_13.GROUP_DM;
|
||||
a0(object3);
|
||||
}
|
||||
NEW_GROUP_DM_POPOUT_ID(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun115586() { // fn#115586, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15350:3583, offset: 0x02466380, size: 39 bytes, params: 1, frame: 10
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
yield AnalyticEvents();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,786 @@
|
||||
/* Metro module 15140; source: modules/main_tabs_v2/native/friends/screens/NewMessageScreen.tsx; dependencies: [5, 57, 31, 27, 1383, 1379, 3793, 5219, 7690, 661, 33, 4017, 4573, 4501, 697, 477, 4603, 5225, 694, 566, 683, 15141, 15142, 4504, 9603, 1244, 11273, 15143, 6771, 6789, 5463, 4594, 9612, 1230, 3856, 10858, 10859, 4051, 4050, 9768, 4578, 11833, 2] */
|
||||
function _fun115399(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:6, offset: 0x0245f7b0, size: 710 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_115402 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_7 = (require(1383) /* metro dependency 1383: ChannelRecord */).PrivateChannelRecord;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const privateChannelSortStore = importDefault(5219) /* metro dependency 5219: PrivateChannelSortStore */;
|
||||
const env0_11 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = value.AnalyticEvents;
|
||||
const env0_13 = value.AnalyticsSections;
|
||||
const env0_14 = value.ChannelTypes;
|
||||
const env0_15 = value.ME;
|
||||
const env0_16 = value.Routes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_17 = value.jsx;
|
||||
const env0_18 = value.jsxs;
|
||||
value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const createAnimatedComponent = value.createAnimatedComponent;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const env0_19 = Reflect.apply(createAnimatedComponent, value, [Text]);
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {flex: 1};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.background = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const object3 = {flexDirection: 'column'};
|
||||
object3.alignItems = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 'flex-start' : 'center';
|
||||
object2.header = object3;
|
||||
object2.emptyContainer = {'flexGrow': 1, 'justifyContent': 'center'};
|
||||
object2.emptyKeyboardView = {flexGrow: 1};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.addFriendsButtonContainer = {'marginBottom': null, 'flexDirection': 'row', 'justifyContent': 'center',
|
||||
'width': '100%', marginBottom: PX_16};
|
||||
const env0_20 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {code: 'function NewMessageScreenTsx1(){const{numInGroup,NUM_IN_GROUP_THRESHOLD,withTiming}=this.__closure;const show=numInGroup>=NUM_IN_GROUP_THRESHOLD;return{opacity:withTiming(show?1:0),maxHeight:withTiming(show?20:0)};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/NewMessageScreen.tsx');
|
||||
exports.default = NewMessageScreen;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_115400(a0, a1) { // fn#115400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:349, offset: 0x0245fa76, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun115401;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_115402(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_115402(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_115402(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun115401;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function isPrivateChannelMatch(a0, {recipients}) { // fn#115403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:1722, offset: 0x0245fbea, size: 97 bytes, params: 3, frame: 14
|
||||
var value3;
|
||||
var includes;
|
||||
var value4;
|
||||
if (recipients.length === a0.length) {
|
||||
var value;
|
||||
value = _createForOfIteratorHelperLoose_115400(recipients);
|
||||
var value2 = value();
|
||||
var done = value2.done;
|
||||
if (done) {
|
||||
return true;
|
||||
}
|
||||
var r1 = value2;
|
||||
loopExit2: while (true) {
|
||||
value3 = r1.value;
|
||||
includes = a0.includes;
|
||||
if (Reflect.apply(includes, a0, [value3])) {
|
||||
value4 = value();
|
||||
done = value4.done;
|
||||
if (done) {
|
||||
return true;
|
||||
}
|
||||
r1 = value4;
|
||||
continue;
|
||||
}
|
||||
break loopExit2;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function findLocalMatchingPrivateChannelId(a0) { // fn#115404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:1922, offset: 0x0245fc4b, size: 174 bytes, params: 2, frame: 17
|
||||
var r5;
|
||||
var value;
|
||||
var property;
|
||||
var find;
|
||||
var value4;
|
||||
const env0_0 = a0;
|
||||
let length = a0.length;
|
||||
if (length === 1) {
|
||||
value = ChannelStore.getDMFromUserId(a0[0]);
|
||||
value4 = null;
|
||||
return value4 != value ? value : value4;
|
||||
}
|
||||
value = env0_4(PrivateChannelSortStore.getSortedChannels(), 2);
|
||||
const value3 = 0;
|
||||
const items2 = [value[value3], value[1]];
|
||||
length = items2.length;
|
||||
if (value3 < length) {
|
||||
r5 = value3;
|
||||
loopExit2: while (true) {
|
||||
property = items2[r5];
|
||||
find = property.find;
|
||||
value = Reflect.apply(find, property, [_fun115405]);
|
||||
if (value != null) {
|
||||
return value.channelId;
|
||||
}
|
||||
value = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
|
||||
length = items2.length;
|
||||
if (value < length) {
|
||||
r5 = value;
|
||||
continue;
|
||||
}
|
||||
break loopExit2;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _findMatchingPrivateChannelId() { // fn#115406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:2281, offset: 0x0245fd43, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun115408).apply(this, arguments);
|
||||
}
|
||||
|
||||
function useChannelForParticipants(a0) { // fn#115409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:2557, offset: 0x0245fdf6, size: 248 bytes, params: 2, frame: 18
|
||||
const env0_0 = a0;
|
||||
const [property, env0_2] = env0_4(env0_5.useState(null), 2);
|
||||
env0_5.useEffect(_fun115410, [a0]);
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun115415);
|
||||
env0_5.useEffect(_fun115416, [a0, channel]);
|
||||
env0_5.useEffect(_fun115422, [a0, property]);
|
||||
env0_5.useEffect(_fun115424, [channel]);
|
||||
return property;
|
||||
}
|
||||
|
||||
function Header_115425({title, numInGroup}) { // fn#115425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:4663, offset: 0x024603a6, size: 431 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
let binding = env0_5;
|
||||
const value2 = binding.useMemo(_fun115426, [numInGroup]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = Header_115425A;
|
||||
object2 = {numInGroup: numInGroup, NUM_IN_GROUP_THRESHOLD: 5};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 12426216833792;
|
||||
closure.__initData = env0_21;
|
||||
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value4 = value2 === 0;
|
||||
const GenericHeaderTitle = (require(9603) /* metro dependency 9603: HeaderShared */).GenericHeaderTitle;
|
||||
const genericHeaderTitle = <GenericHeaderTitle title={title} />;
|
||||
binding = env0_19;
|
||||
const r10 = value4 ? 'text-feedback-critical' : 'text-muted';
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={styles.header}>
|
||||
{genericHeaderTitle}
|
||||
{((Component) => <Component style={value3} variant="text-xs/medium" color={r10}>{value4 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yiQW1O) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.HrSDPF,
|
||||
{number: '' + value2})}</Component>)(binding)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ChatPreview_115428({channelId, navigateToChannel, tagListInputRef}) { // fn#115428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:5326, offset: 0x024605ef, size: 303 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const value2 = env0_5.useRef(null);
|
||||
env0_5.useEffect(_fun115429, [channelId]);
|
||||
useRedirectToChannelOnMessage(channelId, navigateToChannel);
|
||||
const value3 = ((Component) => <Component guildId={ME} channelId={channelId} chatInputRef={value2} HACK_fixModalInteraction alwaysRespectKeyboard screenIndex="new-message" secondaryTextFieldRef={tagListInputRef} />)(importDefault(11273) /* metro dependency 11273: ChatView */);
|
||||
const PortalKeyboardRenderer = (require(15143) /* metro dependency 15143: PortalKeyboardRenderer */).PortalKeyboardRenderer;
|
||||
return (
|
||||
<View style={styles.background}>
|
||||
<View style={styles.container}>
|
||||
{value3}
|
||||
<PortalKeyboardRenderer portal={(require(477) /* metro dependency 477: PlatformUtils */).isAndroid()} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function NewMessageScreen(a0) { // fn#115432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:6058, offset: 0x024607f4, size: 984 bytes, params: 2, frame: 36
|
||||
const navigation = a0.navigation;
|
||||
const params = a0.route.params;
|
||||
const defaultSelectedUserId = params.defaultSelectedUserId;
|
||||
const env0_1 = params.sourcePage;
|
||||
const value = undefined;
|
||||
let env0_4 = value;
|
||||
let env0_5 = value;
|
||||
const styles = useStyles();
|
||||
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const NEW_MESSAGE_COMPOSER = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).NEW_MESSAGE_COMPOSER;
|
||||
const analyticsLocations = defaultImport(NEW_MESSAGE_COMPOSER).analyticsLocations;
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
|
||||
var defaultImport = importDefault(dependencyMap[20]);
|
||||
var MESSAGE_COMPOSER_OPENED = AnalyticEvents.MESSAGE_COMPOSER_OPENED;
|
||||
defaultImport.track(MESSAGE_COMPOSER_OPENED, {source_page: sourcePage});
|
||||
});
|
||||
let binding = env0_5;
|
||||
const useState = binding.useState;
|
||||
const value4 = env0_4(Reflect.apply(useState, binding,
|
||||
[defaultSelectedUserId != null ? [defaultSelectedUserId] : []]), 2);
|
||||
const property = value4[0];
|
||||
env0_4 = property;
|
||||
env0_5 = value4[1];
|
||||
const [property2, env0_6] = env0_4(env0_5.useState(false), 2);
|
||||
const [property3, env0_7] = env0_4(env0_5.useState(false), 2);
|
||||
const value9 = useChannelForParticipants(property);
|
||||
const value10 = env0_5.useRef(null);
|
||||
env0_5.useLayoutEffect(function() {
|
||||
navigation.setOptions({headerTitle: _fun115435, headerRight: _fun115436});
|
||||
}, [navigation, property.length, value9]);
|
||||
const value11 = env0_5.useCallback(function(a0) {
|
||||
navigation.goBack();
|
||||
require(dependencyMap[33]).transitionTo(Routes.CHANNEL(ME, a0));
|
||||
}, [navigation]);
|
||||
const value13 = env0_5.useCallback(_fun115438(), [property, value11]);
|
||||
const value14 = env0_5.useCallback(_fun115442, []);
|
||||
const value15 = env0_5.useCallback(_fun115444, []);
|
||||
binding = env0_5;
|
||||
const useMemo = binding.useMemo;
|
||||
const r12 = property2 || property3 ? value : property.length > 0 ? <ChatPreview_115428 channelId={value9 ?? (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID} navigateToChannel={value11} tagListInputRef={value10} key={Reflect.apply(useMemo,
|
||||
binding, [_fun115445, [property]])} /> : value;
|
||||
const value18 = property.length === 0;
|
||||
const value20 = env0_5.useMemo(_fun115447, [navigation,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], _fun115446), value18]);
|
||||
const value21 = env0_5.useMemo(_fun115450, [navigation]);
|
||||
const value22 = env0_5.useMemo(_fun115452, [navigation, styles, insets.bottom]);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const NewMessageUserList = importDefault(11833) /* metro dependency 11833: NewMessageUserList */;
|
||||
const NONE = UserRowModes.NONE;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<NewMessageUserList
|
||||
actions={value20}
|
||||
noResultActions={value21}
|
||||
rowMode={NONE}
|
||||
tagListInputRef={value10}
|
||||
onSelectUser={value13}
|
||||
onQueryChanged={value15}
|
||||
selectedUserIds={property}
|
||||
withAffinitySuggestions
|
||||
overrideResults={r12}
|
||||
withGuildMembers={value18}
|
||||
withGDMNames
|
||||
forceSearchResults={property3}
|
||||
onForceSearchResults={value14}
|
||||
defaultNoResultsFound={value22}
|
||||
autoFocusSearch
|
||||
/>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun115405({channelId}) { // fn#115405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:2135, offset: 0x0245fcf9, size: 74 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const channel = ChannelStore.getChannel(channelId);
|
||||
return !(channel == null || !channel.isPrivate()) && isPrivateChannelMatch(env0_0, channel);
|
||||
}
|
||||
|
||||
function* _fun115408(a0) { // fn#115408, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:2362, offset: 0x0245fd80, size: 118 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var getDMChannel;
|
||||
var value4;
|
||||
var error;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
const value3 = env2_25(a0);
|
||||
if (value3 != null) {
|
||||
return value3;
|
||||
}
|
||||
if (a0.length > 1) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
binding = env2_1;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
property = binding2[16];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value = binding(property);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
getDMChannel = value.getDMChannel;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
property = a0[0];
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(getDMChannel, value, [property]);
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
yield value;
|
||||
try {
|
||||
value = undefined;
|
||||
value4 = false;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
return value4 ? value : value;
|
||||
}
|
||||
|
||||
function _fun115410() { // fn#115410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:2654, offset: 0x0245feee, size: 99 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
const closure = handleChannelCreate_115411;
|
||||
const closure2 = handleChannelDelete_115412;
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('CHANNEL_CREATE', closure);
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).subscribe('CHANNEL_DELETE', closure2);
|
||||
return _fun115414;
|
||||
}
|
||||
|
||||
function _fun115416() { // fn#115416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:3306, offset: 0x0246008b, size: 119 bytes, params: 1, frame: 15
|
||||
var r1;
|
||||
if (env0_0.length !== 0) {
|
||||
r1 = channel != null && channel.isPrivate();
|
||||
r1 = r1 && isPrivateChannelMatch(env0_0, channel);
|
||||
if (!r1) {
|
||||
(function() {
|
||||
return _doAction.apply(this, arguments);
|
||||
})();
|
||||
}
|
||||
} else {
|
||||
env0_2(null);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115422() { // fn#115422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:3730, offset: 0x024601c0, size: 251 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
const FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID = (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var dispatch;
|
||||
var object;
|
||||
if (env0_1 == null) {
|
||||
value3 = environment.__proto__;
|
||||
} else if (env0_1 !== FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID) {
|
||||
return undefined;
|
||||
}
|
||||
if (findLocalMatchingPrivateChannelId(env0_0) == null) {
|
||||
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatch = defaultImport.dispatch;
|
||||
object = {};
|
||||
object.id = FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
|
||||
object.type = env0_0.length === 1 ? ChannelTypes.DM : ChannelTypes.GROUP_DM;
|
||||
object.name = '';
|
||||
object.guild_id = null;
|
||||
object.recipients = env0_0;
|
||||
Reflect.apply(dispatch, defaultImport, [{type: 'CHANNEL_CREATE', channel: new PrivateChannelRecord()}]);
|
||||
return function() {
|
||||
var defaultImport = importDefault(dependencyMap[18]);
|
||||
var object2 = {};
|
||||
object2.id = require(dependencyMap[17]).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
|
||||
object2.guild_id = undefined;
|
||||
object2.parent_id = undefined;
|
||||
defaultImport.dispatch({type: 'CHANNEL_DELETE', channel: object2});
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115424() { // fn#115424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:4191, offset: 0x02460313, size: 147 bytes, params: 1, frame: 14
|
||||
var value5;
|
||||
if (channel != null && channel.id === (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID) {
|
||||
value5 = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'LOAD_MESSAGES_SUCCESS',
|
||||
'channelId': null, 'messages': null, 'isBefore': false, 'isAfter': false, 'hasMoreBefore': false,
|
||||
'hasMoreAfter': false, 'limit': 0, 'jump': null, 'isStale': false, channelId: channel.id, messages: [],
|
||||
jump: undefined});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun115426() { // fn#115426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:4728, offset: 0x02460555, size: 49 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(15142) /* metro dependency 15142: getGroupDMRecipientLimit */)() - (numInGroup + 1);
|
||||
}
|
||||
|
||||
function Header_115425A() { // fn#115427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:4788, owner: Header_115425.a, offset: 0x02460586, size: 105 bytes, params: 1, frame: 18
|
||||
const value = numInGroup >= 5;
|
||||
const object2 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const value3 = 0;
|
||||
object2.opacity = timingModule.withTiming(value ? 1 : value3);
|
||||
const moduleValue2 = timingModule;
|
||||
object2.maxHeight = moduleValue2.withTiming(value ? 20 : value3);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun115429() { // fn#115429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:5447, offset: 0x0246071e, size: 62 bytes, params: 1, frame: 14
|
||||
var value2;
|
||||
var defaultImport;
|
||||
if (channelId != null) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
|
||||
defaultImport.preload(ME, channelId);
|
||||
}
|
||||
}
|
||||
|
||||
function useRedirectToChannelOnMessage(a0, a1) { // fn#115430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:5490, owner: ChatPreview_115428.useRedirectToChannelOnMessage, offset: 0x0246075c, size: 82 bytes, params: 3, frame: 16
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
(importDefault(15141) /* metro dependency 15141: useOnMessageSend */)(env1_5.useCallback(_fun115431, [a0, a1]));
|
||||
}
|
||||
|
||||
function _fun115434() { // fn#115434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:6550, offset: 0x02460c0a, size: 50 bytes, params: 1, frame: 13
|
||||
const navigationBinding = navigation;
|
||||
navigationBinding.setOptions({headerTitle: headerTitle_115435, headerRight: headerRight_115436});
|
||||
}
|
||||
|
||||
function _fun115438() { // fn#115438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:6888, offset: 0x02460d2b, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun115440);
|
||||
return _fun115441;
|
||||
}
|
||||
|
||||
function _fun115442() { // fn#115442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:7452, offset: 0x02460f1e, size: 25 bytes, params: 1, frame: 11
|
||||
env0_7(function(a0) {
|
||||
return !a0;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun115444({length}) { // fn#115444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:7491, offset: 0x02460f37, size: 41 bytes, params: 2, frame: 12
|
||||
env0_7(false);
|
||||
env0_6(length > 0);
|
||||
}
|
||||
|
||||
function _fun115445() { // fn#115445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:7534, offset: 0x02460f60, size: 23 bytes, params: 1, frame: 11
|
||||
return env0_4.join(':');
|
||||
}
|
||||
|
||||
function _fun115446() { // fn#115446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:7773, offset: 0x02460f77, size: 25 bytes, params: 1, frame: 9
|
||||
const value = environment.__proto__;
|
||||
return RelationshipStore.getRelationshipCount() > 0;
|
||||
}
|
||||
|
||||
function _fun115447() { // fn#115447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:7819, offset: 0x02460f90, size: 307 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var push;
|
||||
var object3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object4;
|
||||
const items2 = [];
|
||||
if (env0_10) {
|
||||
if (env0_11) {
|
||||
push = items2.push;
|
||||
object3 = {};
|
||||
value = environment.__proto__;
|
||||
object3.icon = importDefault(10858) /* metro dependency 10858 */;
|
||||
object3.IconComponent = (require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon;
|
||||
object3.label = intl.string(t['3hF1W4']);
|
||||
object3.iconVariant = 'default';
|
||||
object3.onPress = function() {
|
||||
return navigation.navigate('gdm', {allowNameEdit: false,
|
||||
locationPage: AnalyticsSections.NEW_MESSAGE_COMPOSER});
|
||||
};
|
||||
Reflect.apply(push, items2, [object3]);
|
||||
}
|
||||
push = items2.push;
|
||||
object4 = {};
|
||||
value = environment.__proto__;
|
||||
object4.icon = importDefault(4051) /* metro dependency 4051 */;
|
||||
object4.IconComponent = (require(4050) /* metro dependency 4050: UserPlusIcon */).UserPlusIcon;
|
||||
object4.label = intl.string(t['9nbDJx']);
|
||||
object4.iconVariant = 'default';
|
||||
object4.onPress = onPress_115449;
|
||||
Reflect.apply(push, items2, [object4]);
|
||||
}
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun115450() { // fn#115450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:8305, offset: 0x02461123, size: 140 bytes, params: 1, frame: 15
|
||||
const object2 = {};
|
||||
object2.icon = importDefault(4051) /* metro dependency 4051 */;
|
||||
const UserPlusIcon = (require(4050) /* metro dependency 4050: UserPlusIcon */).UserPlusIcon;
|
||||
object2.IconComponent = UserPlusIcon;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9nbDJx']);
|
||||
object2.iconVariant = 'default';
|
||||
object2.onPress = function() {
|
||||
navigation.navigate('add-friends', {sourcePage: 'New Message Composer'});
|
||||
};
|
||||
return [object2];
|
||||
}
|
||||
|
||||
function _fun115452() { // fn#115452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:8532, offset: 0x024611af, size: 367 bytes, params: 1, frame: 28
|
||||
const stylesBinding = styles;
|
||||
const items2 = [stylesBinding.emptyKeyboardView];
|
||||
items2[1] = {paddingBottom: insets.bottom};
|
||||
const NoResults = importDefault(9768) /* metro dependency 9768: NoResults */;
|
||||
const object = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1ESycm']);
|
||||
object.subtitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5IlFpu']);
|
||||
object.containerStyle = stylesBinding.emptyContainer;
|
||||
object.fullHeight = true;
|
||||
const addFriendsButtonContainer = stylesBinding.addFriendsButtonContainer;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<NoResults {...object}>
|
||||
<View style={addFriendsButtonContainer}>
|
||||
<Button
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zIJnA6)}
|
||||
size="lg"
|
||||
onPress={function() {
|
||||
return navigation.navigate('add-friends', {sourcePage: 'New Message Composer No Results'});
|
||||
}}
|
||||
grow
|
||||
/>
|
||||
</View>
|
||||
</NoResults>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function handleChannelCreate_115411({channel}) { // fn#115411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:2659, offset: 0x0245ff51, size: 105 bytes, params: 2, frame: 15
|
||||
var isPrivateChannelMatchBinding;
|
||||
var value2;
|
||||
const id = channel.id;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID = (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
|
||||
if (id !== FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID) {
|
||||
if (channel.isPrivate()) {
|
||||
isPrivateChannelMatchBinding = isPrivateChannelMatch;
|
||||
value2 = environment.__proto__;
|
||||
if (isPrivateChannelMatchBinding(env1_0, channel)) {
|
||||
env1_2(findLocalMatchingPrivateChannelId(env1_0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleChannelDelete_115412(a0) { // fn#115412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:2856, offset: 0x0245ffba, size: 32 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
env1_2(_fun115413);
|
||||
}
|
||||
|
||||
function _fun115414() { // fn#115414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:3093, offset: 0x02460022, size: 79 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.unsubscribe('CHANNEL_CREATE', handleChannelCreate_115411);
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.unsubscribe('CHANNEL_DELETE', handleChannelDelete_115412);
|
||||
}
|
||||
|
||||
function _doAction() { // fn#115417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:3311, offset: 0x02460102, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return env2_3(_fun115419).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fun115431() { // fn#115431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:5555, offset: 0x024607ae, size: 70 bytes, params: 1, frame: 17
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const MESSAGE_COMPOSER_TRANSITIONED = AnalyticEvents.MESSAGE_COMPOSER_TRANSITIONED;
|
||||
const binding = env0_0;
|
||||
Reflect.apply(track, defaultImport, [MESSAGE_COMPOSER_TRANSITIONED, {channel_id: binding}]);
|
||||
require(binding);
|
||||
}
|
||||
|
||||
function headerTitle_115435({children}) { // fn#115435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:6581, offset: 0x02460c3c, size: 52 bytes, params: 2, frame: 14
|
||||
return <Header_115425 numInGroup={env1_4.length} title={children} />;
|
||||
}
|
||||
|
||||
function headerRight_115436() { // fn#115436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:6649, offset: 0x02460c70, size: 109 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const value2 = null;
|
||||
return value2 === env1_8 || env1_8 === (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID ? value2 : ((Component) => <Component channelId={env1_8} screenIndex="new-message" />)(importDefault(9612) /* metro dependency 9612: ChannelActions */);
|
||||
}
|
||||
|
||||
function* _fun115440(a0) { // fn#115440, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:6908, offset: 0x02460d5a, size: 452 bytes, params: 2, frame: 19
|
||||
var binding;
|
||||
var id;
|
||||
var value7;
|
||||
var value8;
|
||||
var items2;
|
||||
var length;
|
||||
var binding2;
|
||||
var value11;
|
||||
var value12;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
if (a0 instanceof env3_7) {
|
||||
value12 = env3_1(env3_2[20]);
|
||||
value12.track(env3_12.MESSAGE_COMPOSER_SEARCH_RESULT_CLICKED);
|
||||
value = environment.__proto__.__proto__;
|
||||
RelationshipStore(a0.id);
|
||||
} else {
|
||||
binding = env3_9;
|
||||
var isFriend = binding.isFriend;
|
||||
id = a0.id;
|
||||
if (Reflect.apply(isFriend, binding, [id])) {
|
||||
value7 = environment.__proto__.__proto__;
|
||||
binding = env2_4;
|
||||
value8 = binding.indexOf(a0.id);
|
||||
binding = env2_4;
|
||||
items2 = [];
|
||||
arraySpread(items2, binding, 0, undefined);
|
||||
if (value8 === -1) {
|
||||
length = env2_4.length;
|
||||
binding = env3_1;
|
||||
if (length >= binding(env3_2[22])() - 1) {
|
||||
binding = env3_0;
|
||||
binding2 = env3_2;
|
||||
binding(binding2[34]).showMaxGroupMembers();
|
||||
binding = env3_1;
|
||||
value11 = binding(binding2[20]);
|
||||
value11.track(env3_12.MESSAGE_COMPOSER_MAX_USERS_ADDED);
|
||||
return undefined;
|
||||
}
|
||||
items2.push(a0.id);
|
||||
env2_5(items2);
|
||||
PrivateChannelRecord(false);
|
||||
return undefined;
|
||||
}
|
||||
items2.splice(value8, 1);
|
||||
env2_5(items2);
|
||||
PrivateChannelRecord(false);
|
||||
return undefined;
|
||||
}
|
||||
binding = env3_1;
|
||||
var value3 = binding(env3_2[16]);
|
||||
var getOrEnsurePrivateChannel = value3.getOrEnsurePrivateChannel;
|
||||
id = a0.id;
|
||||
yield Reflect.apply(getOrEnsurePrivateChannel, value3, [id]);
|
||||
var value4 = undefined;
|
||||
if (false) {
|
||||
return value4;
|
||||
}
|
||||
binding = env3_1;
|
||||
var value6 = binding(env3_2[20]);
|
||||
value6.track(env3_12.MESSAGE_COMPOSER_SEARCH_RESULT_CLICKED);
|
||||
value = environment.__proto__.__proto__;
|
||||
RelationshipStore(value4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_115449() { // fn#115449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:8206, offset: 0x024610f9, size: 42 bytes, params: 1, frame: 13
|
||||
navigation.navigate('add-friends', {sourcePage: 'New Message Composer'});
|
||||
}
|
||||
|
||||
function _fun115413(a0) { // fn#115413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:2891, offset: 0x0245ffda, size: 72 bytes, params: 2, frame: 12
|
||||
const value = a0;
|
||||
const FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID = (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
|
||||
return value === FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID ? value : value === env0_0.channel.id ? null : value;
|
||||
}
|
||||
|
||||
function* _fun115419() { // fn#115419, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:3352, offset: 0x02460142, size: 96 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
yield findMatchingPrivateChannelId(require);
|
||||
var value3 = undefined;
|
||||
if (false) {
|
||||
return value3;
|
||||
}
|
||||
dependencyMap(value3 ?? env4_0(env4_2[17]).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID);
|
||||
}
|
||||
}
|
||||
|
||||
function findMatchingPrivateChannelId() { // fn#115420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15337:3376, offset: 0x024601a2, size: 30 bytes, params: 1, frame: 13
|
||||
return env5_26.apply(this, arguments);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/* Metro module 15168; source: modules/main_tabs_v2/native/friends/screens/SpamRequestsScreen.tsx; dependencies: [31, 3793, 1878, 7690, 661, 33, 6771, 6789, 566, 15167, 8742, 480, 8743, 7697, 2] */
|
||||
function _fun115768(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:6, offset: 0x0246d4ae, size: 218 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 relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(7690) /* metro dependency 7690: UserRowConstants */).UserRowModes;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/SpamRequestsScreen.tsx');
|
||||
exports.default = SpamRequestsScreen;
|
||||
}
|
||||
|
||||
function SpamRequestsScreen({navigation}) { // fn#115769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:302, offset: 0x0246d588, size: 397 bytes, params: 2, frame: 23
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const FRIEND_REQUESTS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FRIEND_REQUESTS;
|
||||
const analyticsLocations = defaultImport(FRIEND_REQUESTS).analyticsLocations;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([RelationshipStore],
|
||||
function() {
|
||||
return require(dependencyMap[9]).getPendingRelationshipIds(RelationshipStore.getMutableRelationships()).spamIds;
|
||||
});
|
||||
const defaultImport2 = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
|
||||
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
||||
const FRIEND_REQUESTS_SPAM_INBOX = ImpressionNames.FRIEND_REQUESTS_SPAM_INBOX;
|
||||
defaultImport2({name: FRIEND_REQUESTS_SPAM_INBOX});
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun115771,
|
||||
[value2]);
|
||||
const binding = env0_3;
|
||||
let useCallback = binding.useCallback;
|
||||
const value4 = Reflect.apply(useCallback, binding, [_fun115774, [analyticsLocations]]);
|
||||
const value5 = binding.useCallback(function() {
|
||||
}, []);
|
||||
useCallback = binding.useCallback;
|
||||
if (value3.length !== 0) {
|
||||
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
|
||||
return (
|
||||
<UsersFastList
|
||||
getItemProps={Reflect.apply(useCallback, binding, [_fun115776, [value4, value3]])}
|
||||
getSectionProps={value5}
|
||||
sections={[value3.length]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
navigation.goBack();
|
||||
}
|
||||
|
||||
function _fun115771() { // fn#115771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:632, offset: 0x0246d74f, size: 45 bytes, params: 1, frame: 12
|
||||
return env0_1.map(function(a0) {
|
||||
return UserStore.getUser(a0);
|
||||
}).filter(function(a0) {
|
||||
return a0 != null;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun115774(a0) { // fn#115774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:705, offset: 0x0246d793, size: 63 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: a0.id, localUser: a0,
|
||||
sourceAnalyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function _fun115776(a0, a1) { // fn#115776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15365:825, offset: 0x0246d7d2, size: 105 bytes, params: 3, frame: 7
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
const binding = env0_2;
|
||||
const ACTIONS = UserRowModes.ACTIONS;
|
||||
return {type: 'user', props: {type: PENDING_INCOMING, user: binding[a1], onPress: env0_3, mode: ACTIONS,
|
||||
start: a1 === 0, end: a1 === binding.length - 1}};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 15162; source: modules/main_tabs_v2/native/friends/screens/SuggestedFriendsScreen.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 6771, 6789, 683, 14480, 8743, 15159, 7704, 7697, 9768, 1244, 2] */
|
||||
function _fun115699(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:6, offset: 0x0246af83, size: 281 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_5 = value.AnalyticEvents;
|
||||
const env0_6 = value.AnalyticsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{emptyContainer: {flex: 1, paddingTop: PX_32},
|
||||
container: {flex: 1}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/SuggestedFriendsScreen.tsx');
|
||||
exports.default = SuggestedFriendsScreen;
|
||||
}
|
||||
|
||||
function SuggestedFriendsScreen() { // fn#115700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:414, offset: 0x0246b09c, size: 549 bytes, params: 1, frame: 32
|
||||
var r8;
|
||||
var NoResults;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const SUGGESTED_FRIENDS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).SUGGESTED_FRIENDS;
|
||||
const analyticsLocations = defaultImport(SUGGESTED_FRIENDS).analyticsLocations;
|
||||
const binding = env0_3;
|
||||
binding.useEffect(function() {
|
||||
var defaultImport = importDefault(dependencyMap[8]);
|
||||
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
|
||||
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: AnalyticsSections.FRIENDS_SUGGESTED_FRIENDS_MODAL});
|
||||
}, []);
|
||||
const {added, setAdded,
|
||||
friendSuggestions} = (importDefault(14480) /* metro dependency 14480: useSuggestedFriends */)();
|
||||
const value4 = binding.useCallback(_fun115703, [added, friendSuggestions, binding.useCallback(_fun115702,
|
||||
[analyticsLocations]), setAdded]);
|
||||
const value5 = binding.useCallback(function() {
|
||||
}, []);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const value6 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
|
||||
if (friendSuggestions.length !== 0) {
|
||||
const UsersFastList = (require(7697) /* metro dependency 7697: UsersFastList */).UsersFastList;
|
||||
r8 = <UsersFastList sections={[friendSuggestions.length]} getItemProps={value4} getSectionProps={value5} insetStart={8} />;
|
||||
} else {
|
||||
var viewBinding2Props = {style: styles.emptyContainer};
|
||||
NoResults = importDefault(9768) /* metro dependency 9768: NoResults */;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r8 = <View {...viewBinding2Props}><NoResults title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pxFW8V)} disableBackgroundOverlay /></View>;
|
||||
}
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
{value6}
|
||||
<View style={styles.container}>
|
||||
{r8}
|
||||
</View>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun115703(a0, a1) { // fn#115703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:794, offset: 0x0246b341, size: 151 bytes, params: 3, frame: 8
|
||||
const env0_0 = a1;
|
||||
const property = friendSuggestions[a1];
|
||||
const value2 = undefined;
|
||||
const r4 = (property == null ? value2 : property.mutualFriendsCount) != null && (property == null ? value2 : property.mutualFriendsCount) > 0;
|
||||
const result = a1 === friendSuggestions.length - 1;
|
||||
const user = property.user;
|
||||
return {type: 'custom', itemType: r4 ? 'contactSuggestionMutualCount' : 'contactSuggestionNoMutualCount',
|
||||
key: user.id, component: component};
|
||||
}
|
||||
|
||||
function component() { // fn#115704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:1037, offset: 0x0246b3d8, size: 137 bytes, params: 1, frame: 19
|
||||
const ContactSuggestionRow = (require(15159) /* metro dependency 15159: ContactSuggestionRow */).ContactSuggestionRow;
|
||||
const addedBinding = added;
|
||||
const includes = addedBinding.includes;
|
||||
const binding = env0_1;
|
||||
const resultBinding = result;
|
||||
const FRIENDS_SUGGESTED_FRIENDS_MODAL = AnalyticsSections.FRIENDS_SUGGESTED_FRIENDS_MODAL;
|
||||
return (
|
||||
<ContactSuggestionRow
|
||||
added={Reflect.apply(includes, addedBinding, [binding])}
|
||||
suggestedFriend={binding}
|
||||
start={require === 0}
|
||||
end={resultBinding}
|
||||
onPress={env1_4}
|
||||
onAddSuggestion={function() {
|
||||
return setAdded(_fun115706);
|
||||
}}
|
||||
location={FRIENDS_SUGGESTED_FRIENDS_MODAL}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function componentOnAddSuggestion_115705() { // fn#115705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:1156, owner: component.onAddSuggestion, offset: 0x0246b461, size: 25 bytes, params: 1, frame: 11
|
||||
return setAdded(_fun115706);
|
||||
}
|
||||
|
||||
function _fun115706(a0) { // fn#115706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15359:1163, offset: 0x0246b47a, size: 37 bytes, params: 2, frame: 13
|
||||
const items2 = [];
|
||||
const value = arraySpread(items2, a0, 0, undefined);
|
||||
items2[value] = env2_1;
|
||||
value + 1;
|
||||
return items2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
/* Metro module 15161; source: modules/main_tabs_v2/native/friends/screens/UsernameSearchScreen.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 683, 5463, 4559, 7701, 477, 5467, 7704, 12616, 1244, 2] */
|
||||
function _fun115694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:6, offset: 0x0246aadd, size: 464 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.ScrollView;
|
||||
const env0_5 = value.View;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = value.AnalyticEvents;
|
||||
const env0_7 = value.AnalyticsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.background = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.content = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
const PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
|
||||
object2.iosPaddingThemeAdjust = {paddingTop: PX_40};
|
||||
const object3 = {flexGrow: 1};
|
||||
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object3.backgroundColor = MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.paddingHorizontal = PX_16;
|
||||
object2.container = object3;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.inputContainer = {'marginTop': null, 'backgroundColor': 'transparent', 'paddingHorizontal': 0,
|
||||
marginTop: PX_16};
|
||||
object2.headerText = {textTransform: 'none'};
|
||||
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/friends/screens/UsernameSearchScreen.tsx');
|
||||
exports.default = UsernameSearchScreen;
|
||||
}
|
||||
|
||||
function UsernameSearchScreen({navigation}) { // fn#115695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:827, offset: 0x0246acad, size: 540 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const binding = env0_3;
|
||||
binding.useEffect(function() {
|
||||
var defaultImport = importDefault(dependencyMap[6]);
|
||||
var FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
|
||||
defaultImport.track(FRIEND_ADD_VIEWED, {friend_add_type: AnalyticsSections.FRIENDS_ADD_BY_USERNAME_MODAL});
|
||||
}, []);
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets;
|
||||
const value3 = binding.useRef(null);
|
||||
binding.useEffect(function() {
|
||||
return navigation.addListener('transitionEnd', _fun115698);
|
||||
}, [navigation]);
|
||||
const value4 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useClientThemesOverride();
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
const iosPaddingThemeAdjust = platformUtilsModule.isIOS() && value4 != null && insets.top > 0 ? styles.iosPaddingThemeAdjust : null;
|
||||
const KeyboardAwareView = importDefault(5467) /* metro dependency 5467: KeyboardAwareView */;
|
||||
const items2 = [styles.content, value4];
|
||||
const value5 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
|
||||
const items3 = [styles.container, iosPaddingThemeAdjust];
|
||||
const bottom = insets.bottom;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
items3[2] = {paddingBottom: bottom + PX_16};
|
||||
const AddFriendById = importDefault(12616) /* metro dependency 12616: AddFriendById */;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const YEOwDM = (require(1244) /* metro dependency 1244: indexNative */).t.YEOwDM;
|
||||
return (
|
||||
<View style={styles.background}>
|
||||
<KeyboardAwareView style={items2}>
|
||||
{value5}
|
||||
<ScrollView
|
||||
alwaysBounceVertical={false}
|
||||
keyboardShouldPersistTaps="handled"
|
||||
contentContainerStyle={items3}
|
||||
>
|
||||
<AddFriendById
|
||||
style={styles.inputContainer}
|
||||
autoFocusInput={false}
|
||||
headerText={Reflect.apply(string, intl, [YEOwDM])}
|
||||
headerTextStyle={styles.headerText}
|
||||
ref={value3}
|
||||
/>
|
||||
</ScrollView>
|
||||
</KeyboardAwareView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun115697() { // fn#115697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:1045, offset: 0x0246af0a, size: 34 bytes, params: 1, frame: 13
|
||||
return navigation.addListener('transitionEnd', _fun115698);
|
||||
}
|
||||
|
||||
function _fun115698({data}) { // fn#115698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15358:1080, offset: 0x0246af2c, size: 87 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var value;
|
||||
var current;
|
||||
const closing = data.closing;
|
||||
if (closing) {
|
||||
r0 = closing;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */;
|
||||
value = value.getIsScreenReaderEnabled();
|
||||
r0 = value;
|
||||
}
|
||||
if (!r0) {
|
||||
value = environment.__proto__;
|
||||
current = env1_1.current;
|
||||
if (current != null) {
|
||||
current.focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/* Metro module 13098; source: modules/main_tabs_v2/native/getChannelDetailsFromRoute.tsx; dependencies: [4007, 2] */
|
||||
function _fun100152(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13288:6, offset: 0x021dfa54, size: 96 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/getChannelDetailsFromRoute.tsx');
|
||||
exports.default = getChannelDetailsFromRoute;
|
||||
}
|
||||
|
||||
function getChannelDetailsFromRoute(a0) { // fn#100153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13288:194, offset: 0x021dfab4, size: 209 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var items2;
|
||||
var params;
|
||||
let value = a1;
|
||||
const value2 = undefined;
|
||||
const r2 = value !== value2 ? value : false;
|
||||
const value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceChannelRoute(a0);
|
||||
if (value3 != null) {
|
||||
params = value3.params;
|
||||
items2 = [params.guildId];
|
||||
params = value3.params;
|
||||
items2[1] = params.channelId;
|
||||
return items2;
|
||||
}
|
||||
if (r2) {
|
||||
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
value = value.coerceGuildsRoute(a0);
|
||||
if (value != null) {
|
||||
params = value.params;
|
||||
items2 = [params == null ? value2 : params.guildId];
|
||||
params = value.params;
|
||||
items2[1] = params == null ? value2 : params.channelId;
|
||||
r0 = items2;
|
||||
} else {
|
||||
r0 = [value2, value2];
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return [value2, value2];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
/* Metro module 4009; source: modules/main_tabs_v2/native/getInitialNavigationState.tsx; dependencies: [57, 1226, 3973, 1934, 661, 3, 4010, 4013, 1230, 3974, 3987, 2] */
|
||||
function _fun33036(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:6, offset: 0x0102602e, size: 295 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const closure = function(a0) {
|
||||
return [{name: 'main', state: {routes: a0, index: a0.length - 1}}];
|
||||
};
|
||||
const closure2 = getInitialGuildState;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const defaultRouteStore = importDefault(3973) /* metro dependency 3973: DefaultRouteStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = value.ME;
|
||||
const env0_7 = value.Routes;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('getInitialNavigationState');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/getInitialNavigationState.tsx');
|
||||
exports.default = getInitialNavigationState;
|
||||
exports.wrapRouteForRootNavigator = closure;
|
||||
exports.getInitialAuthState = function() {
|
||||
return {routes: [{name: 'auth'}], index: 0};
|
||||
};
|
||||
exports.getInitialGuildState = closure2;
|
||||
exports.computeInitialNavigationState = computeInitialNavigationState;
|
||||
}
|
||||
|
||||
function getInitialGuildState(a0, a1, a2) { // fn#33039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:374, offset: 0x010261a8, size: 414 bytes, params: 4, frame: 24
|
||||
var r0;
|
||||
var object3;
|
||||
var object4;
|
||||
const r11 = a1 ?? SelectedChannelStore.getChannelId(a0) ?? undefined;
|
||||
const useChatLayoutModule = require(4010) /* metro dependency 4010: useChatLayout */;
|
||||
const getChatLayout = useChatLayoutModule.getChatLayout;
|
||||
const isChatLockedOpen = Reflect.apply(getChatLayout, useChatLayoutModule, []).isChatLockedOpen;
|
||||
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
|
||||
const getConfig = MobileHomeDrawerExperiment.getConfig;
|
||||
let object = {location: 'app-start'};
|
||||
const landOnHome = Reflect.apply(getConfig, MobileHomeDrawerExperiment, [object]).landOnHome;
|
||||
if (a2) {
|
||||
if (r11 == null) {
|
||||
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
|
||||
object4 = {index: 0};
|
||||
object4.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
|
||||
params: {guildId: a0,
|
||||
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
|
||||
object[1] = object4;
|
||||
r0 = object;
|
||||
} else if (isChatLockedOpen) {
|
||||
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
|
||||
object4 = {index: 0};
|
||||
object4.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
|
||||
params: {guildId: a0,
|
||||
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
|
||||
object[1] = object4;
|
||||
r0 = object;
|
||||
} else if (landOnHome) {
|
||||
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
|
||||
object4 = {index: 0};
|
||||
object4.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
|
||||
params: {guildId: a0,
|
||||
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
|
||||
object[1] = object4;
|
||||
r0 = object;
|
||||
} else {
|
||||
object3 = {index: 0};
|
||||
object3.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
|
||||
params: {guildId: a0,
|
||||
channelId: r11}}], index: 0}}, {name: 'channel', params: {guildId: a0, channelId: r11}}]);
|
||||
r0 = [true, object3];
|
||||
}
|
||||
} else {
|
||||
object = [isChatLockedOpen ? r11 != null : !!isChatLockedOpen];
|
||||
object4 = {index: 0};
|
||||
object4.routes = wrapRouteForRootNavigator([{name: 'tabs', state: {routes: [{name: 'guilds',
|
||||
params: {guildId: a0,
|
||||
channelId: r11, drawerOpen: landOnHome}}], index: 0}}]);
|
||||
object[1] = object4;
|
||||
r0 = object;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function computeInitialNavigationStateWithoutLogging() { // fn#33040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:966, offset: 0x01026346, size: 606 bytes, params: 1, frame: 28
|
||||
var r5;
|
||||
var r3;
|
||||
var r0;
|
||||
var r2;
|
||||
var object2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var location;
|
||||
var moduleValue2;
|
||||
var matchPath;
|
||||
var pathname;
|
||||
const RouteParam = (require(3987) /* metro dependency 3987: RouteUtils */).RouteParam;
|
||||
var guildId;
|
||||
var channelId;
|
||||
var value6;
|
||||
var openChannel;
|
||||
var moduleValue3;
|
||||
var lastNonVoiceRoute;
|
||||
var value9;
|
||||
var value10;
|
||||
var value13;
|
||||
var property;
|
||||
var property2;
|
||||
var items5;
|
||||
if (AuthenticationStore.getToken() != null) {
|
||||
value3 = undefined;
|
||||
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
|
||||
location = moduleValue.getHistory().location;
|
||||
moduleValue2 = require(3974) /* metro dependency 3974: matchPathCompat */;
|
||||
matchPath = moduleValue2.matchPath;
|
||||
pathname = location.pathname;
|
||||
object2 = {};
|
||||
object2.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId({optional: true}), ':messageId?');
|
||||
value6 = Reflect.apply(matchPath, moduleValue2, [pathname, object2]);
|
||||
if (value6 == null) {
|
||||
moduleValue3 = require(3974) /* metro dependency 3974: matchPathCompat */;
|
||||
matchPath = moduleValue3.matchPath;
|
||||
lastNonVoiceRoute = DefaultRouteStore.lastNonVoiceRoute;
|
||||
object2 = {};
|
||||
object2.path = Routes.CHANNEL(RouteParam.guildId(), RouteParam.channelId({optional: true}), ':messageId?');
|
||||
value9 = Reflect.apply(matchPath, moduleValue3, [lastNonVoiceRoute, object2]);
|
||||
value10 = false;
|
||||
r3 = value9;
|
||||
r5 = value10;
|
||||
} else {
|
||||
openChannel = location.openChannel;
|
||||
r5 = openChannel != null && openChannel;
|
||||
r3 = value6;
|
||||
}
|
||||
r0 = (r3 == null ? value3 : r3.params) ?? ({});
|
||||
channelId = r0.channelId;
|
||||
guildId = r0.guildId;
|
||||
if (guildId == null) {
|
||||
items5 = [{page: 'private-channels'}];
|
||||
items5[1] = getInitialGuildState(ME, value3, false)[1];
|
||||
return items5;
|
||||
}
|
||||
r5 = !r5 ? guildId !== ME : r5;
|
||||
value13 = env0_2(getInitialGuildState(guildId, channelId, r5), 2);
|
||||
property = value13[0];
|
||||
property2 = value13[1];
|
||||
r2 = property ? 'other' : guildId !== ME ? 'guild-channels' : 'private-channels';
|
||||
r0 = r2 === 'private-channels' ? [{page: r2}, property2] : [{page: r2, guildId: guildId}, property2];
|
||||
return r0;
|
||||
}
|
||||
return [{page: 'other'}, {routes: [{name: 'auth'}], index: 0}];
|
||||
}
|
||||
|
||||
function getInitialNavigationState(a0) { // fn#33041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:1981, offset: 0x010265a4, size: 52 bytes, params: 2, frame: 12
|
||||
const property = computeInitialNavigationStateWithoutLogging()[1];
|
||||
if (a0 != null) {
|
||||
a0.forEach(_fun33042);
|
||||
}
|
||||
return property;
|
||||
}
|
||||
|
||||
function computeInitialNavigationState() { // fn#33043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:2298, offset: 0x010265f4, size: 37 bytes, params: 1, frame: 13
|
||||
const initialNavigationStateWithoutLogging = computeInitialNavigationStateWithoutLogging();
|
||||
env0_8.log('Initial State:', initialNavigationStateWithoutLogging);
|
||||
return initialNavigationStateWithoutLogging;
|
||||
}
|
||||
|
||||
function _fun33042(a0) { // fn#33042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4167:2101, offset: 0x010265d8, size: 28 bytes, params: 2, frame: 11
|
||||
return env0_0.routes.push(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/* Metro module 15233; source: modules/main_tabs_v2/native/message_requests/MessageRequestsNavigator.tsx; dependencies: [31, 27, 33, 9884, 4501, 697, 5280, 4884, 1585, 9603, 1244, 9893, 15234, 15254, 15255, 2] */
|
||||
function _fun116528(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:6, offset: 0x0248cd08, size: 307 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWEST};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
|
||||
backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/MessageRequestsNavigator.tsx');
|
||||
exports.default = MessageRequestsNavigator;
|
||||
}
|
||||
|
||||
function MessageRequestsNavigator() { // fn#116529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:510, offset: 0x0248ce3b, size: 551 bytes, params: 1, frame: 30
|
||||
const styles = useStyles();
|
||||
const env0_1 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
|
||||
let binding = env0_3;
|
||||
binding.useLayoutEffect(_fun116530, []);
|
||||
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const items3 = [styles.container];
|
||||
items3[1] = {paddingLeft: left, paddingRight: right};
|
||||
binding = env0_7;
|
||||
const Navigator = binding.Navigator;
|
||||
const object = {screenOptions: screenOptions_116531};
|
||||
let Screen = binding.Screen;
|
||||
const object2 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ);
|
||||
copyDataProperties(object2, (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)(),
|
||||
undefined);
|
||||
const items2 = [<Screen name="root" options={object2} getComponent={function() {
|
||||
return require(dependencyMap[12]).default;
|
||||
}} />];
|
||||
Screen = binding.Screen;
|
||||
const object4 = {};
|
||||
object4.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ulKXHp);
|
||||
copyDataProperties(object4, (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)(),
|
||||
intl);
|
||||
items2[1] = <Screen name="spam" options={object4} getComponent={function() {
|
||||
return require(dependencyMap[13]).default;
|
||||
}} />;
|
||||
Screen = binding.Screen;
|
||||
const object6 = {};
|
||||
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object6.title = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.iilwGH);
|
||||
copyDataProperties(object6, (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)(),
|
||||
intl);
|
||||
items2[2] = <Screen name="preview" options={object6} getComponent={function() {
|
||||
return require(dependencyMap[14]).default;
|
||||
}} />;
|
||||
return (
|
||||
<View style={items3}>
|
||||
<Navigator {...object}>
|
||||
{items2}
|
||||
</Navigator>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116530() { // fn#116530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:622, offset: 0x0248d062, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed();
|
||||
}
|
||||
|
||||
function MessageRequestsNavigatorScreenOptions({navigation}) { // fn#116531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15430:794, owner: MessageRequestsNavigator.screenOptions, offset: 0x0248d087, size: 112 bytes, params: 2, frame: 15
|
||||
const object2 = {};
|
||||
object2.headerStyle = styles.header;
|
||||
object2.headerShadowVisible = false;
|
||||
object2.headerTitle = headerTitle_116532;
|
||||
object2.headerTitleAlign = 'center';
|
||||
object2.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
|
||||
copyDataProperties(object2, env0_1, require);
|
||||
return object2;
|
||||
}
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
/* Metro module 15255; source: modules/main_tabs_v2/native/message_requests/screens/MessageRequestsPreviewScreen.tsx; dependencies: [31, 4605, 661, 33, 11896, 9597, 10903, 15256, 11273, 2] */
|
||||
function _fun116644(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15452:6, offset: 0x024913a7, size: 180 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 readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).ME;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/screens/MessageRequestsPreviewScreen.tsx');
|
||||
exports.default = MessageRequestsScreen_116645;
|
||||
}
|
||||
|
||||
function MessageRequestsScreen_116645(a0) { // fn#116645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15452:272, offset: 0x0249145b, size: 254 bytes, params: 2, frame: 21
|
||||
var object2;
|
||||
var r4;
|
||||
const channelId = a0.route.params.channelId;
|
||||
var value;
|
||||
const binding = env0_3;
|
||||
const value2 = binding.useRef(null);
|
||||
const value3 = (require(11896) /* metro dependency 11896: useIsMessageRequestRestrictedViewer */).useIsMessageRequestRestrictedViewer('MessageRequestsPreviewScreen');
|
||||
binding.useEffect(function() {
|
||||
var defaultImport = importDefault(dependencyMap[5]);
|
||||
var object = {};
|
||||
var channelIdBinding = channelId;
|
||||
object.channelId = channelIdBinding;
|
||||
object.messageId = ReadStateStore.lastMessageId(channelIdBinding);
|
||||
defaultImport.fetchMessages(object);
|
||||
}, [channelId]);
|
||||
const ChannelContainer = (require(10903) /* metro dependency 10903: ChannelContainer */).ChannelContainer;
|
||||
object2 = {guildId: ME, channelId: channelId};
|
||||
if (value3) {
|
||||
value = importDefault(15256) /* metro dependency 15256: RestrictedMessageRequestPreview */;
|
||||
value = ((Component) => <Component channelId={channelId} />)(value);
|
||||
r4 = value;
|
||||
} else {
|
||||
r4 = ((Component) => <Component guildId={ME} channelId={channelId} chatInputRef={value2} HACK_fixModalInteraction screenIndex="message-request" />)(importDefault(11273) /* metro dependency 11273: ChatView */);
|
||||
}
|
||||
return (
|
||||
<ChannelContainer {...object2}>
|
||||
{r4}
|
||||
</ChannelContainer>
|
||||
);
|
||||
}
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
/* Metro module 15234; source: modules/main_tabs_v2/native/message_requests/screens/MessageRequestsScreenWithTabs.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 8853, 1244, 15235, 15252, 9221, 8861, 9871, 2] */
|
||||
function _fun116536(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15431:6, offset: 0x0248d0f7, size: 338 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value2.jsx;
|
||||
const env0_7 = value2.jsxs;
|
||||
object2 = {REQUEST: 'REQUEST', SPAM: 'SPAM'};
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
object2.messageRequestContent = {flex: 1};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.tabContainer = {minHeight: 32, paddingHorizontal: PX_16};
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(_fun116537);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/screens/MessageRequestsScreenWithTabs.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun116537({navigation}) { // fn#116537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15431:428, offset: 0x0248d249, size: 569 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
let binding = env0_4;
|
||||
const [property, env0_1] = env0_3(binding.useState(0), 2);
|
||||
const value4 = binding.useCallback(function(a0) {
|
||||
return navigation.push('preview', {channelId: a0});
|
||||
}, [navigation]);
|
||||
const value5 = binding.useCallback(_fun116539, []);
|
||||
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
|
||||
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
|
||||
const object = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7RFcXZ']);
|
||||
binding = env0_8;
|
||||
const REQUEST = binding.REQUEST;
|
||||
object.id = REQUEST;
|
||||
object.page = ((Component) => <Component goToMessageRequestPreview={value4} />)(importDefault(15235) /* metro dependency 15235: MessageRequestList */);
|
||||
const items3 = [object];
|
||||
const object3 = {};
|
||||
object3.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ulKXHp);
|
||||
const SPAM = binding.SPAM;
|
||||
object3.id = SPAM;
|
||||
object3.page = ((Component) => <Component goToMessageRequestPreview={value4} />)(importDefault(15252) /* metro dependency 15252: SpamMessageList */);
|
||||
items3[1] = object3;
|
||||
const value6 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [{items: items3,
|
||||
pageWidth: property, defaultIndex: 0}]);
|
||||
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
|
||||
const items2 = [<View style={styles.tabContainer} onLayout={value5}><SegmentedControl state={value6} /></View>];
|
||||
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
|
||||
items2[1] = <View style={styles.messageRequestContent}><SegmentedControlPages state={value6} /></View>;
|
||||
const TTIFirstContentfulPaint = (require(9871) /* metro dependency 9871: TTIFirstContentfulPaint */).TTIFirstContentfulPaint;
|
||||
items2[2] = <TTIFirstContentfulPaint label="message_requests" />;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/* Metro module 15254; source: modules/main_tabs_v2/native/message_requests/screens/MessageRequestsSpamScreen.tsx; dependencies: [31, 33, 15252, 2] */
|
||||
function _fun116641(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15451:6, offset: 0x024912c4, size: 138 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/message_requests/screens/MessageRequestsSpamScreen.tsx');
|
||||
exports.default = MessageRequestsScreen;
|
||||
}
|
||||
|
||||
function MessageRequestsScreen({navigation}) { // fn#116642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15451:246, offset: 0x0249134e, size: 89 bytes, params: 2, frame: 15
|
||||
return ((Component) => <Component goToMessageRequestPreview={env0_2.useCallback(function(a0) {
|
||||
return navigation.push('preview', {channelId: a0});
|
||||
}, [navigation])} />)(importDefault(15252) /* metro dependency 15252: SpamMessageList */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,344 @@
|
||||
/* Metro module 15845; source: modules/main_tabs_v2/native/modal/DeprecatedModalManager.tsx; dependencies: [7, 6, 15, 17, 18, 9113, 1226, 9152, 15846, 1373, 661, 4008, 4007, 5082, 8961, 15847, 15848, 15856, 15857, 16128, 16130, 4860, 2] */
|
||||
function _fun121836(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:6, offset: 0x025525ae, size: 510 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
let env0_0 = require;
|
||||
const _arrayLikeToArray_121842 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const createPushModalHandler = function(a0) {
|
||||
var r1;
|
||||
var env0_0 = copyRestArgs(0, r1);
|
||||
return _fun121847;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const guildSettingsStore = importDefault(9113) /* metro dependency 9113: GuildSettingsStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const createInviteModalStore = importDefault(9152) /* metro dependency 9152: CreateInviteModalStore */;
|
||||
const notificationSettingsModalStore = importDefault(15846) /* metro dependency 15846: NotificationSettingsModalStore */;
|
||||
let value = importDefault(1373) /* metro dependency 1373: UserRequiredActionStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_13 = constantsModule.UserRequiredActions;
|
||||
const AppContext = constantsModule.AppContext;
|
||||
const env0_14 = AppContext.APP;
|
||||
object2 = {'key': 'EMAIL_VERIFICATION_MODAL_OPEN', 'store': null, 'closable': false, 'center': true};
|
||||
object2.store = value;
|
||||
object2.isOpen = isOpen_121848;
|
||||
object2.getComponent = function() {
|
||||
return require(dependencyMap[16]).default;
|
||||
};
|
||||
object2 = {'key': 'USER_REQUIRED_ACTION_UPDATE', 'store': null, 'center': true};
|
||||
object2.store = value;
|
||||
object2.isOpen = isOpen_121850;
|
||||
object2.getComponent = function() {
|
||||
return require(dependencyMap[17]).default;
|
||||
};
|
||||
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun121852(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/modal/DeprecatedModalManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_121837() { // fn#121837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:236, offset: 0x025527ac, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_121837_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_121840(a0, a1) { // fn#121840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:429, offset: 0x0255280e, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun121841;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_121842(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_121842(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_121842(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun121841;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function handlePushedModal(a0) { // fn#121843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1362, offset: 0x02552982, size: 88 bytes, params: 2, frame: 14
|
||||
let value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
|
||||
value = value.getRootNavigationRef();
|
||||
if (value != null) {
|
||||
value.navigate({name: 'modal', key: a0.key, params: {modal: a0}});
|
||||
}
|
||||
}
|
||||
|
||||
function handlePoppedModal() { // fn#121844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1494, offset: 0x025529da, size: 37 bytes, params: 1, frame: 11
|
||||
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModal();
|
||||
}
|
||||
|
||||
function pushFirstOpenModal(a0, a1) { // fn#121845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1544, offset: 0x025529ff, size: 219 bytes, params: 3, frame: 20
|
||||
var r3;
|
||||
var value5;
|
||||
var isOpen;
|
||||
var isOpen2;
|
||||
var value6;
|
||||
const _createForOfIteratorHelperLoose_121840Binding = _createForOfIteratorHelperLoose_121840;
|
||||
const value2 = undefined;
|
||||
const value3 = _createForOfIteratorHelperLoose_121840Binding(a0);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
var r4 = value4;
|
||||
while (true) {
|
||||
value5 = r4.value;
|
||||
if (value5 != null) {
|
||||
isOpen = value5.isOpen;
|
||||
if (isOpen == null) {
|
||||
r3 = value2;
|
||||
break;
|
||||
}
|
||||
isOpen2 = value5.isOpen(APP, a1);
|
||||
r3 = isOpen2;
|
||||
break;
|
||||
}
|
||||
r3 = value2;
|
||||
if (r3 == null) {
|
||||
break;
|
||||
}
|
||||
if (r3) {
|
||||
break;
|
||||
}
|
||||
value6 = value3();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
return value2;
|
||||
}
|
||||
r4 = value6;
|
||||
continue;
|
||||
}
|
||||
var component = value5.getComponent();
|
||||
var store = value5.store;
|
||||
var getProps = store == null ? value2 : store.getProps;
|
||||
r4 = typeof getProps === 'function' ? value5.store.getProps() : {};
|
||||
handlePushedModal((importDefault(5082) /* metro dependency 5082: getDeprecatedModalData */)(component,
|
||||
{key: value5.key}, r4));
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function createPushModalHandler(a0) { // fn#121846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1882, offset: 0x02552ada, size: 21 bytes, params: 2, frame: 10
|
||||
const env0_0 = copyRestArgs(0, undefined);
|
||||
return _fun121847;
|
||||
}
|
||||
|
||||
function isOpen_121848(a0, a1) { // fn#121848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2036, offset: 0x02552b06, size: 134 bytes, params: 3, frame: 14
|
||||
let value = a1;
|
||||
let r0 = (importDefault(8961) /* metro dependency 8961: VerificationUtils */).isFullScreenVerification(value ?? UserRequiredActionStore.getAction()) && AuthenticationStore.getToken() != null;
|
||||
if (r0) {
|
||||
value = require(15847) /* metro dependency 15847: SafetyFlowsExperiment */;
|
||||
value = !value.isEligibleForSafetyFlowsExperiment({location: 'modal-manager-verification'});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function isOpen_121850(a0, a1) { // fn#121850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2329, offset: 0x02552b8c, size: 45 bytes, params: 3, frame: 10
|
||||
const r1 = a1 ?? UserRequiredActionStore.getAction();
|
||||
const AGREEMENTS = UserRequiredActions.AGREEMENTS;
|
||||
return r1 === AGREEMENTS;
|
||||
}
|
||||
|
||||
function _fun121852(a0) { // fn#121852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2419, offset: 0x02552bb9, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = DeprecatedModalManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_3(closure);
|
||||
}
|
||||
|
||||
function _fun121847() { // fn#121847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:1926, offset: 0x02552aef, size: 23 bytes, params: 1, frame: 11
|
||||
pushFirstOpenModal(env0_0);
|
||||
}
|
||||
|
||||
function DeprecatedModalManager(a0) { // fn#121853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2431, offset: 0x02552be3, size: 366 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_4;
|
||||
binding(this, DeprecatedModalManager);
|
||||
let object = [];
|
||||
arraySpread(object, value, 0, object);
|
||||
value = env1_6(DeprecatedModalManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_121837()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, object, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, object);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
object = {};
|
||||
const createPushModalHandlerBinding = createPushModalHandler;
|
||||
binding = env1_16;
|
||||
const binding2 = env1_15;
|
||||
object.CONNECTION_OPEN_SUPPLEMENTAL = createPushModalHandlerBinding(binding, binding2);
|
||||
object.EMAIL_VERIFICATION_MODAL_OPEN = createPushModalHandlerBinding(binding2);
|
||||
object.USER_REQUIRED_ACTION_UPDATE = USER_REQUIRED_ACTION_UPDATE;
|
||||
object.GUILD_SETTINGS_OPEN = createPushModalHandlerBinding({'key': 'GUILD_SETTINGS_OPEN', 'store': null,
|
||||
'closable': false, store: GuildSettingsStore, getComponent: function() {
|
||||
return require(dependencyMap[18]).default;
|
||||
}});
|
||||
object.NOTIFICATION_SETTINGS_MODAL_OPEN = createPushModalHandlerBinding({'key': 'NOTIFICATION_SETTINGS_MODAL_OPEN',
|
||||
'store': null, 'closable': false, store: NotificationSettingsModalStore, getComponent: function() {
|
||||
return require(dependencyMap[19]).default;
|
||||
}});
|
||||
object.CREATE_INVITE_MODAL_OPEN = createPushModalHandlerBinding({'key': 'CREATE_INVITE_MODAL_OPEN', 'store': null,
|
||||
'closable': false, store: CreateInviteModalStore, getComponent: function() {
|
||||
return require(dependencyMap[20]).default;
|
||||
}});
|
||||
const handlePoppedModalBinding = handlePoppedModal;
|
||||
object.GUILD_SETTINGS_CLOSE = handlePoppedModalBinding;
|
||||
object.NOTIFICATION_SETTINGS_MODAL_CLOSE = handlePoppedModalBinding;
|
||||
object.PREMIUM_PAYMENT_MODAL_CLOSE = handlePoppedModalBinding;
|
||||
object.EMAIL_VERIFICATION_MODAL_CLOSE = handlePoppedModalBinding;
|
||||
object.CREATE_INVITE_MODAL_CLOSE = handlePoppedModalBinding;
|
||||
object.QUICKSWITCHER_HIDE = handlePoppedModalBinding;
|
||||
object.IFE_EXPERIMENT_SEARCH_MODAL_CLOSE = handlePoppedModalBinding;
|
||||
value.actions = object;
|
||||
return value;
|
||||
}
|
||||
|
||||
function USER_REQUIRED_ACTION_UPDATE(a0) { // fn#121854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16053:2835, owner: DeprecatedModalManager.USER_REQUIRED_ACTION_UPDATE, offset: 0x02552d51, size: 201 bytes, params: 2, frame: 15
|
||||
var value;
|
||||
var moduleValue;
|
||||
var isModalOpen;
|
||||
var moduleValue3;
|
||||
if (a0.requiredAction == null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
isModalOpen = moduleValue.isModalOpen;
|
||||
if (Reflect.apply(isModalOpen, moduleValue, ['USER_REQUIRED_ACTION_UPDATE'])) {
|
||||
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModal('USER_REQUIRED_ACTION_UPDATE');
|
||||
}
|
||||
moduleValue3 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
isModalOpen = moduleValue3.isModalOpen;
|
||||
if (Reflect.apply(isModalOpen, moduleValue3, ['EMAIL_VERIFICATION_MODAL_OPEN'])) {
|
||||
(require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).popModal('EMAIL_VERIFICATION_MODAL_OPEN');
|
||||
}
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
pushFirstOpenModal([env2_16, env2_15], a0.requiredAction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* Metro module 5083; source: modules/main_tabs_v2/native/modal/ModalDispatchQueue.tsx; dependencies: [6, 7, 2] */
|
||||
function _fun44116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5261:6, offset: 0x01168afe, size: 144 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
||||
let value = _fun44117();
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/modal/ModalDispatchQueue.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun44117() { // fn#44117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5261:122, offset: 0x01168b8e, size: 78 bytes, params: 1, frame: 15
|
||||
return env0_1(ModalDispatchQueue, [{key: 'enqueue', value: function(a0) {
|
||||
this.queue.push(a0);
|
||||
}}, {key: 'flush', value: function() {
|
||||
var queue;
|
||||
var value;
|
||||
if (this.queue.length > 0) {
|
||||
while (true) {
|
||||
queue = this.queue;
|
||||
value = queue.shift();
|
||||
if (value != null) {
|
||||
value();
|
||||
}
|
||||
if (this.queue.length > 0) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}}]);
|
||||
}
|
||||
|
||||
function ModalDispatchQueue() { // fn#44118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5261:143, offset: 0x01168bdc, size: 37 bytes, params: 1, frame: 13
|
||||
env1_0(this, ModalDispatchQueue);
|
||||
this.queue = [];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/* Metro module 15231; source: modules/main_tabs_v2/native/modal/ModalScreen.tsx; dependencies: [29, 31, 27, 661, 33, 4501, 697, 5080, 8742, 480, 4884, 1585, 15232, 477, 15143, 2] */
|
||||
function _fun116519(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:6, offset: 0x0248c7b1, size: 296 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const env0_3 = ['impressionName', 'impressionProperties'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.View;
|
||||
const env0_7 = value.StyleSheet;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).NOOP;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const env0_11 = Reflect.apply(createStyles, value,
|
||||
[{containerWithPadding: {backgroundColor: BACKGROUND_BASE_LOWEST}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/modal/ModalScreen.tsx');
|
||||
exports.default = Modal_116520;
|
||||
}
|
||||
|
||||
function Modal_116520(a0) { // fn#116520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:349, offset: 0x0248c8d9, size: 627 bytes, params: 2, frame: 25
|
||||
let modal = a0.route.params.modal;
|
||||
const value = undefined;
|
||||
const styles = useStyles();
|
||||
const r5 = modal.props ?? ({});
|
||||
const impressionName = r5.impressionName;
|
||||
const impressionProperties = r5.impressionProperties;
|
||||
let binding = env0_4;
|
||||
const value3 = binding(r5, env0_3);
|
||||
binding = env0_5;
|
||||
const value4 = binding.useCallback(_fun116521, []);
|
||||
const defaultImport = importDefault(dependencyMap[8]);
|
||||
const ImpressionTypes = require(dependencyMap[9]).ImpressionTypes;
|
||||
const MODAL = ImpressionTypes.MODAL;
|
||||
defaultImport({type: MODAL, name: impressionName, properties: impressionProperties});
|
||||
const useRef = binding.useRef;
|
||||
const callbacks = modal.callbacks;
|
||||
const env0_1 = Reflect.apply(useRef, binding, [callbacks == null ? value : callbacks.onExited]);
|
||||
binding = env0_5;
|
||||
binding.useEffect(_fun116522);
|
||||
binding.useEffect(function() {
|
||||
return _fun116524;
|
||||
}, []);
|
||||
binding.useLayoutEffect(_fun116525, []);
|
||||
const {left, right} = importDefault(dependencyMap[11])();
|
||||
const moduleValue = require(dependencyMap[12]);
|
||||
const shouldExcludeSafeAreaForModalKey2 = moduleValue.shouldExcludeSafeAreaForModalKey(modal.key);
|
||||
const viewProps = {style: [StyleSheet.absoluteFillObject,
|
||||
shouldExcludeSafeAreaForModalKey2 ? value : [styles.containerWithPadding, {paddingLeft: left,
|
||||
paddingRight: right}]], onAccessibilityEscape: modal.closable ? importDefault(dependencyMap[7]).pop : NOOP};
|
||||
binding = env0_5;
|
||||
const createElement = binding.createElement;
|
||||
modal = modal.modal;
|
||||
const object = {};
|
||||
copyDataProperties(object, value3, dependencyMap);
|
||||
object['style'] = value;
|
||||
object['transitionState'] = null;
|
||||
object['onClose'] = value4;
|
||||
return (
|
||||
<View {...viewProps}>
|
||||
{Reflect.apply(createElement, binding, [modal, object])}
|
||||
{require(dependencyMap[13]).isIOS() && ((PortalKeyboardRenderer) => <PortalKeyboardRenderer portal={false} />)(require(dependencyMap[14]).PortalKeyboardRenderer)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116521() { // fn#116521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:501, offset: 0x0248cb4c, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
|
||||
}
|
||||
|
||||
function _fun116522() { // fn#116522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:661, offset: 0x0248cb71, size: 44 bytes, params: 1, frame: 5
|
||||
const binding = env0_1;
|
||||
const callbacks = modal.callbacks;
|
||||
const value = undefined;
|
||||
binding.current = callbacks == null ? value : callbacks.onExited;
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun116523() { // fn#116523, offset: 0x0248cb9d, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun116524;
|
||||
}
|
||||
|
||||
function _fun116525() { // fn#116525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:805, offset: 0x0248cbce, size: 42 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).trackAppUIViewed('ModalScreen');
|
||||
}
|
||||
|
||||
function _fun116524() { // fn#116524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15428:742, offset: 0x0248cba8, size: 38 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
return env1_1.current?.();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 8776; source: modules/main_tabs_v2/native/navigateToLastChannel.tsx; dependencies: [4007, 8777, 4601, 2] */
|
||||
function _fun68628(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8961:6, offset: 0x01c56849, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/navigateToLastChannel.tsx');
|
||||
exports.default = navigateToLastChannel;
|
||||
}
|
||||
|
||||
function navigateToLastChannel() { // fn#68629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8961:189, offset: 0x01c568b0, size: 144 bytes, params: 1, frame: 16
|
||||
var r3;
|
||||
var params;
|
||||
var transitionToChannel;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute((importDefault(8777) /* metro dependency 8777: getNavigatorCurrentRoute */)());
|
||||
const value4 = value3 != null;
|
||||
if (value4) {
|
||||
params = value3.params;
|
||||
r3 = (params == null ? value2 : params.channelId) != null;
|
||||
} else {
|
||||
r3 = value4;
|
||||
}
|
||||
if (r3) {
|
||||
value = require(4601) /* metro dependency 4601: transitionToChannel */;
|
||||
transitionToChannel = value.transitionToChannel;
|
||||
params = value3.params;
|
||||
Reflect.apply(transitionToChannel, value, [params == null ? value2 : params.channelId]);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/* Metro module 14367; source: modules/main_tabs_v2/native/panels/ChannelScreenAnimatedFrame.tsx; dependencies: [31, 27, 9604, 661, 33, 4501, 697, 4048, 1357, 4017, 4504, 1305, 14365, 7701, 6618, 2] */
|
||||
function _fun108730(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14564:6, offset: 0x0232be35, size: 415 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(9604) /* metro dependency 9604: MainTabsV2Constants */;
|
||||
const HEADER_CORNER_RADIUS = value.HEADER_CORNER_RADIUS;
|
||||
const MIDNIGHT_BORDER_WIDTH = value.MIDNIGHT_BORDER_WIDTH;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {'position': 'absolute', 'zIndex': 1, 'top': 0, 'width': '100%',
|
||||
backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object2.midnightContainer = {borderLeftColor: BORDER_STRONG, borderLeftWidth: MIDNIGHT_BORDER_WIDTH};
|
||||
const object3 = {};
|
||||
const APP_FRAME_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.APP_FRAME_BORDER;
|
||||
object3.borderLeftColor = APP_FRAME_BORDER;
|
||||
const CHANNEL_DRAWER_DIVIDER_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHANNEL_DRAWER_DIVIDER_WIDTH;
|
||||
object3.borderLeftWidth = CHANNEL_DRAWER_DIVIDER_WIDTH;
|
||||
object2.splitDivider = object3;
|
||||
object2.additionalHeight = {height: HEADER_CORNER_RADIUS};
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
||||
object2 = {code: 'function ChannelScreenAnimatedFrameTsx1(){const{translateX,maxWidth,isChatLockedOpen,withTiming,STANDARD_EASING,SIDE_PANEL_CLOSE_DURATION_MS,SIDE_PANEL_OPEN_DURATION_MS}=this.__closure;const hide=translateX.get()===maxWidth||isChatLockedOpen;return{opacity:withTiming(hide?0:1,{easing:STANDARD_EASING,duration:hide?SIDE_PANEL_CLOSE_DURATION_MS:SIDE_PANEL_OPEN_DURATION_MS})};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/ChannelScreenAnimatedFrame.tsx');
|
||||
exports.default = ChannelScreenAnimatedFrame;
|
||||
}
|
||||
|
||||
function ChannelScreenAnimatedFrame({translateX, maxWidth, isChatLockedOpen}) { // fn#108731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14564:1105, offset: 0x0232bfd4, size: 490 bytes, params: 2, frame: 26
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const MIDNIGHT = ThemeTypes.MIDNIGHT;
|
||||
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
|
||||
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
|
||||
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
|
||||
[{location: 'ChannelScreenAnimatedFrame'}]).chatInputFloating;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = ChannelScreenAnimatedFrameE;
|
||||
object2 = {translateX: translateX, maxWidth: maxWidth, isChatLockedOpen: isChatLockedOpen};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object2.STANDARD_EASING = STANDARD_EASING;
|
||||
const SIDE_PANEL_CLOSE_DURATION_MS = (require(14365) /* metro dependency 14365: PanelsConfig */).SIDE_PANEL_CLOSE_DURATION_MS;
|
||||
object2.SIDE_PANEL_CLOSE_DURATION_MS = SIDE_PANEL_CLOSE_DURATION_MS;
|
||||
const SIDE_PANEL_OPEN_DURATION_MS = (require(14365) /* metro dependency 14365: PanelsConfig */).SIDE_PANEL_OPEN_DURATION_MS;
|
||||
object2.SIDE_PANEL_OPEN_DURATION_MS = SIDE_PANEL_OPEN_DURATION_MS;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 9063010717249;
|
||||
closure.__initData = env0_8;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value5 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop();
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.container];
|
||||
items2[1] = styles.splitDivider;
|
||||
items2[2] = value3 !== MIDNIGHT || chatInputFloating ? undefined : styles.midnightContainer;
|
||||
items2[3] = value5;
|
||||
items2[4] = value4;
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
return (
|
||||
<View2 pointerEvents="none" style={items2}>
|
||||
<SafeAreaPaddingView top />
|
||||
<View style={styles.additionalHeight} />
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function ChannelScreenAnimatedFrameE() { // fn#108732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14564:1353, owner: ChannelScreenAnimatedFrame.E, offset: 0x0232c1be, size: 157 bytes, params: 1, frame: 20
|
||||
let r5 = translateX.get() === maxWidth || isChatLockedOpen;
|
||||
let value = environment.__proto__;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const r2 = r5 ? 0 : 1;
|
||||
const object = {};
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object.easing = STANDARD_EASING;
|
||||
value = require(14365) /* metro dependency 14365: PanelsConfig */;
|
||||
r5 = r5 ? value.SIDE_PANEL_CLOSE_DURATION_MS : value.SIDE_PANEL_OPEN_DURATION_MS;
|
||||
object.duration = r5;
|
||||
return {opacity: Reflect.apply(withTiming, timingModule, [r2, object])};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,431 @@
|
||||
/* Metro module 14956; source: modules/main_tabs_v2/native/panels/MainTabsChannelScreenStack.tsx; dependencies: [57, 31, 27, 9604, 661, 482, 33, 4501, 14957, 4017, 4594, 4048, 1357, 14958, 4508, 4018, 4521, 14959, 1485, 14364, 4015, 14368, 5321, 4003, 14363, 4010, 694, 4016, 3868, 2] */
|
||||
function _fun113107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6, offset: 0x023e9123, size: 526 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const getKey_113113 = function(a0) {
|
||||
var String = global.String;
|
||||
return String(a0.index);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.NativeModules;
|
||||
const env0_6 = value2.StyleSheet;
|
||||
const env0_7 = value2.View;
|
||||
const MIDNIGHT_BORDER_WIDTH = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).MIDNIGHT_BORDER_WIDTH;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = constantsModule.AnalyticsObjectTypes;
|
||||
const env0_9 = constantsModule.AnalyticsObjects;
|
||||
const env0_10 = constantsModule.AnalyticsSections;
|
||||
const env0_11 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value4.jsx;
|
||||
const env0_13 = value4.jsxs;
|
||||
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({midnightContainerStyles: {marginTop: -MIDNIGHT_BORDER_WIDTH,
|
||||
marginLeft: -MIDNIGHT_BORDER_WIDTH}});
|
||||
object = {code: 'function MainTabsChannelScreenStackTsx1(){const{translateX}=this.__closure;return translateX.get()>0;}'};
|
||||
object = {code: 'function MainTabsChannelScreenStackTsx2(isVisibleBeneath,wasVisibleBeneath){const{highestFullyRenderedScreenIndex,index}=this.__closure;if(isVisibleBeneath===wasVisibleBeneath)return;if(isVisibleBeneath){if(highestFullyRenderedScreenIndex.get()>=index){highestFullyRenderedScreenIndex.set(index-1);}return;}if(highestFullyRenderedScreenIndex.get()<index){highestFullyRenderedScreenIndex.set(index);}}'};
|
||||
object = {code: 'function MainTabsChannelScreenStackTsx3(){const{enabled,highestFullyRenderedScreenIndex,index}=this.__closure;return enabled&&highestFullyRenderedScreenIndex.get()>index;}'};
|
||||
const env0_18 = value.memo(FirstChannelScreen);
|
||||
object = {code: 'function MainTabsChannelScreenStackTsx4(){const{translateX}=this.__closure;return translateX.get()===0;}'};
|
||||
object = {code: 'function MainTabsChannelScreenStackTsx5(isFullyOpen,prev){const{index,mainTabsDisallowGesture}=this.__closure;if(isFullyOpen===prev)return;if(index!==1)return;mainTabsDisallowGesture.set(isFullyOpen);}'};
|
||||
const env0_21 = value.memo(ChannelScreen);
|
||||
object = {code: 'function MainTabsChannelScreenStackTsx6(){const{translateX,maxWidth}=this.__closure;return translateX.get()===maxWidth;}'};
|
||||
object = {code: 'function MainTabsChannelScreenStackTsx7(value,prev){const{runOnJS,setIsHidden}=this.__closure;if(value===prev)return;runOnJS(setIsHidden)(value);}'};
|
||||
value = value.memo(MainTabsChannelScreenStack);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsChannelScreenStack.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function useIsCompletelyCovered(a0, a1, a2) { // fn#113108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1114, offset: 0x023e9331, size: 310 bytes, params: 4, frame: 24
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const defaultImport = importDefault(14957) /* metro dependency 14957: HideCoveredChannelsExperiment */;
|
||||
const useConfig = defaultImport.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'MainTabsChannelScreenStack'}]).enabled;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
let closure = useIsCompletelyCoveredC;
|
||||
closure.__closure = {translateX: a2};
|
||||
closure.__workletHash = 10608377273080;
|
||||
closure.__initData = env0_15;
|
||||
const closure2 = useIsCompletelyCoveredL;
|
||||
closure2.__closure = {highestFullyRenderedScreenIndex: a1, index: a0};
|
||||
closure2.__workletHash = 10137919010401;
|
||||
closure2.__initData = env0_16;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(_fun113111);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
const useDerivedValue = moduleValue3.useDerivedValue;
|
||||
closure = useIsCompletelyCoveredU;
|
||||
closure.__closure = {enabled: enabled, highestFullyRenderedScreenIndex: a1, index: a0};
|
||||
closure.__workletHash = 1648562234730;
|
||||
closure.__initData = env0_17;
|
||||
return Reflect.apply(useDerivedValue, moduleValue3, [closure]);
|
||||
}
|
||||
|
||||
function FirstChannelScreen({guildId, channelId, showCreateThread, frame, index, freeze, isDragging, translateX, containerWidth, isActive, maxWidth, focusChatPressableComponent, transitionState, cleanup, parentFreezeValue, highestFullyRenderedScreenIndex}) { // fn#113114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1782, offset: 0x023e9548, size: 571 bytes, params: 2, frame: 40
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const styles = useStyles();
|
||||
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
|
||||
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
|
||||
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
|
||||
[{location: 'MainTabsChannelScreenStack'}]).chatInputFloating;
|
||||
const value5 = (require(14958) /* metro dependency 14958: useMainTabsChannelScreenStyles */).useMainTabsChannelScreenStyles(isDragging,
|
||||
translateX, maxWidth, useIsCompletelyCovered(index, highestFullyRenderedScreenIndex, translateX),
|
||||
parentFreezeValue);
|
||||
env0_4.useEffect(function() {
|
||||
if (transitionState === require(dependencyMap[14]).TransitionStates.YEETED) {
|
||||
cleanup();
|
||||
}
|
||||
}, [cleanup, transitionState]);
|
||||
const REAWorkaroundView = importDefault(4018) /* metro dependency 4018: REAWorkaroundView */;
|
||||
const items2 = [value5];
|
||||
items2[1] = containerWidth != null ? {width: containerWidth} : null;
|
||||
const MIDNIGHT = ThemeTypes.MIDNIGHT;
|
||||
items2[2] = value3 !== MIDNIGHT || chatInputFloating ? undefined : styles.midnightContainerStyles;
|
||||
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
|
||||
const viewBindingProps = {collapsable: false, style: StyleSheet.absoluteFill,
|
||||
pointerEvents: isActive ? 'auto' : 'box-only', accessibilityElementsHidden: isActive ? undefined : !isActive,
|
||||
importantForAccessibility: isActive ? undefined : 'no-hide-descendants'};
|
||||
let value = importDefault(14959) /* metro dependency 14959: StandaloneChannelScreen */;
|
||||
value = <Freeze freeze={freeze}><View {...viewBindingProps}>{((Component) => <Component guildId={guildId} channelId={channelId} showCreateThread={showCreateThread} isNavigationScreen={containerWidth == null} frame={frame} screenIndex={index} />)(value)}</View></Freeze>;
|
||||
return (
|
||||
<REAWorkaroundView style={items2}>
|
||||
{value}
|
||||
{focusChatPressableComponent}
|
||||
</REAWorkaroundView>
|
||||
);
|
||||
}
|
||||
|
||||
function ChannelScreen({guildId, channelId, showCreateThread, transitionState, cleanup, isActive, freeze, parentFreezeValue, index, highestFullyRenderedScreenIndex}) { // fn#113116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3121, offset: 0x023e97bd, size: 907 bytes, params: 2, frame: 46
|
||||
var object2;
|
||||
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const styles = useStyles();
|
||||
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
|
||||
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
|
||||
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
|
||||
[{location: 'MainTabsChannelScreenStack'}]).chatInputFloating;
|
||||
const value4 = (require(1485) /* metro dependency 1485 */).useNavigation();
|
||||
const binding = env0_4;
|
||||
var env0_4 = binding.useRef(false);
|
||||
const value5 = binding.useCallback(_fun113117, [cleanup, value4]);
|
||||
const defaultImport = importDefault(14364) /* metro dependency 14364: useMainTabsPanelsGesture */;
|
||||
object2 = {};
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
const YEETED = TransitionStates.YEETED;
|
||||
object2.canDrag = transitionState !== YEETED;
|
||||
object2.onVisibilityChange = value5;
|
||||
object2.onDragStart = (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard;
|
||||
object2.startShown = false;
|
||||
const {gesture, panelGestureContext, isDragging, translateX, movePanel, maxWidth} = defaultImport(object2);
|
||||
const value7 = useIsCompletelyCovered(index, highestFullyRenderedScreenIndex, translateX);
|
||||
const useContext = binding.useContext;
|
||||
const disallowGesture = Reflect.apply(useContext, binding,
|
||||
[importDefault(14368) /* metro dependency 14368: MainTabsNavigatorPanelContext */]).disallowGesture;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
const closure = ChannelScreenV;
|
||||
closure.__closure = {translateX: translateX};
|
||||
closure.__workletHash = 1803281708382;
|
||||
closure.__initData = env0_19;
|
||||
const closure2 = ChannelScreenY;
|
||||
closure2.__closure = {index: index, mainTabsDisallowGesture: disallowGesture};
|
||||
closure2.__workletHash = 4369586160197;
|
||||
closure2.__initData = env0_20;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
const env0_8 = binding.useRef({cleanup: cleanup, movePanel: movePanel});
|
||||
binding.useEffect(_fun113120);
|
||||
binding.useEffect(_fun113121, [transitionState]);
|
||||
const value8 = (require(14958) /* metro dependency 14958: useMainTabsChannelScreenStyles */).useMainTabsChannelScreenStyles(isDragging,
|
||||
translateX, maxWidth, value7, parentFreezeValue);
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
const MainTabsChannelScreenStackContext = (require(14368) /* metro dependency 14368: MainTabsNavigatorPanelContext */).MainTabsChannelScreenStackContext;
|
||||
const Provider = MainTabsChannelScreenStackContext.Provider;
|
||||
const REAWorkaroundView = importDefault(4018) /* metro dependency 4018: REAWorkaroundView */;
|
||||
const items2 = [value8];
|
||||
const MIDNIGHT = ThemeTypes.MIDNIGHT;
|
||||
items2[1] = value3 !== MIDNIGHT || chatInputFloating ? undefined : styles.midnightContainerStyles;
|
||||
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
|
||||
return (
|
||||
<GestureDetector gesture={gesture}>
|
||||
<Provider value={panelGestureContext}>
|
||||
<REAWorkaroundView
|
||||
style={items2}
|
||||
accessibilityElementsHidden={isActive ? undefined : !isActive}
|
||||
importantForAccessibility={isActive ? undefined : 'no-hide-descendants'}
|
||||
>
|
||||
<Freeze freeze={freeze}>
|
||||
{((Component) => <Component guildId={guildId} channelId={channelId} showCreateThread={showCreateThread} isNavigationScreen frame={null} screenIndex={index} />)(importDefault(14959) /* metro dependency 14959: StandaloneChannelScreen */)}
|
||||
</Freeze>
|
||||
</REAWorkaroundView>
|
||||
</Provider>
|
||||
</GestureDetector>
|
||||
);
|
||||
}
|
||||
|
||||
function MainTabsChannelScreenStack({screens, screenStackActive, translateX, isDragging, maxWidth, highestFullyRenderedScreenIndex, shouldFreeze, focusChatPressableComponent, firstScreenWidth, firstScreenFrame}) { // fn#113122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5237, offset: 0x023e9c7a, size: 989 bytes, params: 2, frame: 35
|
||||
var r7;
|
||||
var r0;
|
||||
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
|
||||
const env0_3 = isDragging;
|
||||
const env0_4 = maxWidth;
|
||||
let value = undefined;
|
||||
const value3 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
|
||||
let binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const get = translateX.get;
|
||||
const value5 = env0_3(Reflect.apply(useState, binding, [Reflect.apply(get, translateX, []) === maxWidth]), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
const closure = function() {
|
||||
return translateX.get() === maxWidth;
|
||||
};
|
||||
closure.__closure = {translateX: translateX, maxWidth: maxWidth};
|
||||
closure.__workletHash = 9963940499904;
|
||||
closure.__initData = env0_22;
|
||||
const closure2 = MainTabsChannelScreenStackD;
|
||||
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setIsHidden: property2};
|
||||
closure2.__workletHash = 10167608718442;
|
||||
closure2.__initData = env0_23;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
const value6 = binding.useMemo(_fun113125, [screens]);
|
||||
let useEffect = binding.useEffect;
|
||||
Reflect.apply(useEffect, binding, [_fun113126, [value6]]);
|
||||
const property3 = screens[0];
|
||||
const r5 = shouldFreeze && property && (property3 == null || property3.type !== (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType.DEFAULT);
|
||||
const value9 = reanimatedRexportModule.useSharedValue(0);
|
||||
binding = env0_4;
|
||||
binding.useEffect(function() {
|
||||
var env0_0 = global.setTimeout(_fun113128, 10);
|
||||
return _fun113129;
|
||||
}, [r5, value9]);
|
||||
const value10 = binding.useCallback(_fun113130, [screens.length, focusChatPressableComponent, isDragging,
|
||||
translateX, firstScreenWidth, firstScreenFrame, maxWidth, value9, screenStackActive,
|
||||
highestFullyRenderedScreenIndex]);
|
||||
const env0_12 = binding.useRef((property3 == null ? value : property3.channelId) ?? null);
|
||||
binding = env0_4;
|
||||
const env0_13 = binding.useRef(null);
|
||||
useEffect = binding.useEffect;
|
||||
object = [property3 == null ? value : property3.type];
|
||||
object[1] = property3 == null ? value : property3.channelId;
|
||||
Reflect.apply(useEffect, binding, [_fun113131, object]);
|
||||
(require(4016) /* metro dependency 4016: ScreenIndexFrozen */).freezeScreenIndex(r5, 0);
|
||||
if (r5) {
|
||||
if (property3 == null ? value : property3.showCreateThread) {
|
||||
r0 = null;
|
||||
} else {
|
||||
object = {freeze: r5};
|
||||
var viewBindingProps = {'collapsable': false, 'style': null, 'pointerEvents': 'box-none',
|
||||
style: StyleSheet.absoluteFill};
|
||||
r7 = screenStackActive ? value : !screenStackActive;
|
||||
viewBindingProps.accessibilityElementsHidden = r7;
|
||||
r7 = screenStackActive ? value : 'no-hide-descendants';
|
||||
viewBindingProps.importantForAccessibility = r7;
|
||||
value = <Freeze {...object}><View {...viewBindingProps}>{((ThemeContextProvider) => <ThemeContextProvider gradient={value3}>{((TransitionGroup) => <TransitionGroup items={screens} renderItem={value10} getItemKey={getKey_113113} />)((require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup)}</ThemeContextProvider>)((require(3868) /* metro dependency 3868: native */).ThemeContextProvider)}</View></Freeze>;
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
object = {freeze: r5};
|
||||
var viewBindingProps = {'collapsable': false, 'style': null, 'pointerEvents': 'box-none',
|
||||
style: StyleSheet.absoluteFill};
|
||||
r7 = screenStackActive ? value : !screenStackActive;
|
||||
viewBindingProps.accessibilityElementsHidden = r7;
|
||||
r7 = screenStackActive ? value : 'no-hide-descendants';
|
||||
viewBindingProps.importantForAccessibility = r7;
|
||||
value = <Freeze {...object}><View {...viewBindingProps}>{((ThemeContextProvider) => <ThemeContextProvider gradient={value3}>{((TransitionGroup) => <TransitionGroup items={screens} renderItem={value10} getItemKey={getKey_113113} />)((require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup)}</ThemeContextProvider>)((require(3868) /* metro dependency 3868: native */).ThemeContextProvider)}</View></Freeze>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useIsCompletelyCoveredC() { // fn#113109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1271, owner: useIsCompletelyCovered.c, offset: 0x023e9467, size: 24 bytes, params: 1, frame: 9
|
||||
return importDefault.get() > 0;
|
||||
}
|
||||
|
||||
function useIsCompletelyCoveredL(a0, a1) { // fn#113110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1363, owner: useIsCompletelyCovered.l, offset: 0x023e947f, size: 90 bytes, params: 3, frame: 14
|
||||
var value2;
|
||||
var binding;
|
||||
if (a0 !== a1) {
|
||||
value2 = require.get();
|
||||
binding = env0_0;
|
||||
if (a0) {
|
||||
if (value2 >= binding) {
|
||||
require.set(env0_0 - 1);
|
||||
}
|
||||
} else if (value2 < binding) {
|
||||
require.set(env0_0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113111() { // fn#113111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1563, offset: 0x023e94d9, size: 53 bytes, params: 1, frame: 12
|
||||
if (require.get() >= env0_0) {
|
||||
require.set(env0_0 - 1);
|
||||
}
|
||||
}
|
||||
|
||||
function useIsCompletelyCoveredU() { // fn#113112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:1622, owner: useIsCompletelyCovered.u, offset: 0x023e950e, size: 33 bytes, params: 1, frame: 11
|
||||
return enabled && require.get() > env0_0;
|
||||
}
|
||||
|
||||
function _fun113117(a0) { // fn#113117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3483, offset: 0x023e9b48, size: 63 bytes, params: 2, frame: 10
|
||||
if (!a0) {
|
||||
if (env0_4.current) {
|
||||
cleanup();
|
||||
} else {
|
||||
env0_4.current = true;
|
||||
env0_3.goBack();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ChannelScreenV() { // fn#113118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3870, owner: ChannelScreen.v, offset: 0x023e9b87, size: 24 bytes, params: 1, frame: 9
|
||||
return translateX.get() === 0;
|
||||
}
|
||||
|
||||
function ChannelScreenY(a0, a1) { // fn#113119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:3964, owner: ChannelScreen.y, offset: 0x023e9b9f, size: 51 bytes, params: 3, frame: 12
|
||||
if (a0 !== a1 && index === 1) {
|
||||
disallowGesture.set(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113121() { // fn#113121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:4188, offset: 0x023e9bd2, size: 168 bytes, params: 1, frame: 20
|
||||
const {cleanup, movePanel} = env0_8.current;
|
||||
const transitionStateBinding = transitionState;
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
const MOUNTED = TransitionStates.MOUNTED;
|
||||
if (transitionStateBinding === MOUNTED) {
|
||||
movePanel(true, false, 0, false);
|
||||
} else if (transitionState !== TransitionStates.ENTERED) {
|
||||
if (env0_4.current) {
|
||||
cleanup();
|
||||
} else {
|
||||
env0_4.current = true;
|
||||
movePanel(false, false, 0, true);
|
||||
}
|
||||
} else {
|
||||
movePanel(true, false, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
function MainTabsChannelScreenStackD(a0, a1) { // fn#113124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5669, owner: MainTabsChannelScreenStack.D, offset: 0x023ea071, size: 61 bytes, params: 3, frame: 13
|
||||
var value;
|
||||
if (a0 !== a1) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env0_9)(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113125() { // fn#113125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5830, offset: 0x023ea0ae, size: 90 bytes, params: 1, frame: 15
|
||||
const value = screens.at(-1);
|
||||
const value2 = null;
|
||||
const type = value2 == value ? undefined : value.type;
|
||||
const ChannelScreenType = (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType;
|
||||
const DEFAULT = ChannelScreenType.DEFAULT;
|
||||
return type !== DEFAULT ? value2 : value.channelId;
|
||||
}
|
||||
|
||||
function _fun113126() { // fn#113126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:5954, offset: 0x023ea108, size: 49 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
const MediaPlayerManager = NativeModules.MediaPlayerManager;
|
||||
if (!(MediaPlayerManager == null || MediaPlayerManager.pauseAllMediaPlayers == null)) {
|
||||
MediaPlayerManager.pauseAllMediaPlayers();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113127() { // fn#113127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6174, offset: 0x023ea139, size: 41 bytes, params: 1, frame: 14
|
||||
const env0_0 = global.setTimeout(_fun113128, 10);
|
||||
return _fun113129;
|
||||
}
|
||||
|
||||
function _fun113130(a0, a1, a2, a3) { // fn#113130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6281, offset: 0x023ea18b, size: 392 bytes, params: 5, frame: 23
|
||||
var r0;
|
||||
var value2;
|
||||
var binding;
|
||||
var guildId;
|
||||
var channelId;
|
||||
var showCreateThread;
|
||||
var screensBinding;
|
||||
var length;
|
||||
var value5;
|
||||
const Number = global.Number;
|
||||
let value = Number(a0);
|
||||
if (value === 0) {
|
||||
value5 = environment.__proto__;
|
||||
binding = env1_18;
|
||||
guildId = a1.guildId;
|
||||
channelId = a1.channelId;
|
||||
showCreateThread = a1.showCreateThread;
|
||||
value = ((Component) => <Component guildId={guildId} channelId={channelId} showCreateThread={showCreateThread != null && showCreateThread} focusChatPressableComponent={focusChatPressableComponent} index={value} transitionState={a2} cleanup={a3} isDragging={isDragging} translateX={translateX} isActive={screenStackActive && value === screens.length - 1} freeze={value < screens.length - 2} containerWidth={firstScreenWidth} frame={firstScreenFrame} parentFreezeValue={env0_11} maxWidth={maxWidth} highestFullyRenderedScreenIndex={highestFullyRenderedScreenIndex} key={a0} />)(binding);
|
||||
r0 = value;
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
binding = env1_21;
|
||||
var bindingProps = {guildId: a1.guildId, channelId: a1.channelId};
|
||||
showCreateThread = a1.showCreateThread;
|
||||
bindingProps.showCreateThread = showCreateThread != null && showCreateThread;
|
||||
bindingProps.index = value;
|
||||
bindingProps.transitionState = a2;
|
||||
bindingProps.parentFreezeValue = env0_11;
|
||||
bindingProps.cleanup = a3;
|
||||
screensBinding = screens;
|
||||
length = screensBinding.length;
|
||||
bindingProps.isActive = value === length - 1;
|
||||
length = screensBinding.length;
|
||||
bindingProps.freeze = value < length - 2;
|
||||
bindingProps.highestFullyRenderedScreenIndex = highestFullyRenderedScreenIndex;
|
||||
value = ((Component) => <Component {...bindingProps} key={a0} />)(binding);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun113131() { // fn#113131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:7010, offset: 0x023ea313, size: 321 bytes, params: 1, frame: 16
|
||||
var binding;
|
||||
var binding2;
|
||||
var value5;
|
||||
var value6;
|
||||
var moduleValue;
|
||||
const value2 = undefined;
|
||||
let type = env0_10 == null ? value2 : env0_10.type;
|
||||
let r1 = type != null && env0_13.current !== env0_10.type;
|
||||
if (r1) {
|
||||
binding = env0_13;
|
||||
binding2 = env0_10;
|
||||
type = binding2.type;
|
||||
binding.current = type;
|
||||
if (binding2.channelId === env0_12.current) {
|
||||
type = env0_10.type;
|
||||
value5 = environment.__proto__;
|
||||
value6 = type !== (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType.DEFAULT;
|
||||
if (value6) {
|
||||
r1 = value6;
|
||||
} else {
|
||||
moduleValue = require(4010) /* metro dependency 4010: useChatLayout */;
|
||||
r1 = moduleValue.getChatLayout().isChatLockedOpen;
|
||||
}
|
||||
if (!r1) {
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'TRY_ACK',
|
||||
location: {section: AnalyticsSections.CHANNEL,
|
||||
object: AnalyticsObjects.ACK_CHANNEL_SELECT_SAME_CHANNEL_DISPATCH,
|
||||
objectType: AnalyticsObjectTypes.ACK_AUTOMATIC}, channelId: env0_10.channelId});
|
||||
}
|
||||
} else {
|
||||
env0_12.current = env0_10.channelId;
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun113128() { // fn#113128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15153:6197, offset: 0x023ea162, size: 41 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_11;
|
||||
binding.set(env1_11.get() + 1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Metro module 14954; source: modules/main_tabs_v2/native/panels/MainTabsContentScrim.tsx; dependencies: [27, 33, 4501, 697, 4017, 2] */
|
||||
function _fun113102(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15151:6, offset: 0x023e8caa, size: 246 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
||||
object3['zIndex'] = 5;
|
||||
const BACKGROUND_SCRIM = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM;
|
||||
object3['backgroundColor'] = BACKGROUND_SCRIM;
|
||||
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{scrim: object3}]);
|
||||
object = {code: 'function MainTabsContentScrimTsx1(){const{interpolate,translateX,maxWidth,Extrapolation}=this.__closure;return{opacity:interpolate(translateX.get(),[maxWidth,0],[0,0.5],Extrapolation.CLAMP)};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsContentScrim.tsx');
|
||||
exports.MainTabsContentScrim = MainTabsContentScrim;
|
||||
}
|
||||
|
||||
function MainTabsContentScrim({translateX, maxWidth}) { // fn#113103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15151:566, offset: 0x023e8da0, size: 223 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = MainTabsContentScrimC;
|
||||
const object2 = {};
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
object2.translateX = translateX;
|
||||
object2.maxWidth = maxWidth;
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
object2.Extrapolation = Extrapolation;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 7933670426250;
|
||||
closure.__initData = env0_5;
|
||||
const value2 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return <View style={[styles.scrim, value2]} pointerEvents="none" />;
|
||||
}
|
||||
|
||||
function MainTabsContentScrimC() { // fn#113104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15151:666, owner: MainTabsContentScrim.c, offset: 0x023e8e7f, size: 117 bytes, params: 1, frame: 21
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
const value3 = translateX.get();
|
||||
const items2 = [maxWidth, 0];
|
||||
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
|
||||
const CLAMP = Extrapolation.CLAMP;
|
||||
return {opacity: Reflect.apply(interpolate, value, [value3, items2, [0, 0.5], CLAMP])};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,397 @@
|
||||
/* Metro module 14361; source: modules/main_tabs_v2/native/panels/MainTabsNavigatorPanel.tsx; dependencies: [57, 31, 27, 661, 33, 3, 4501, 697, 1485, 4010, 11336, 11335, 14362, 4015, 14363, 4008, 4601, 1239, 14364, 4603, 14367, 4017, 5115, 5176, 7703, 14368, 5321, 14369, 14892, 14954, 14955, 14956, 2] */
|
||||
function _fun108670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:6, offset: 0x02328ed3, size: 391 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = value2.StyleSheet;
|
||||
const env0_7 = value2.Pressable;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = constantsModule.ComponentActions;
|
||||
const env0_9 = constantsModule.ME;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value4.jsx;
|
||||
const env0_11 = value4.jsxs;
|
||||
const value7 = new (importDefault(3) /* metro dependency 3: Logger */)('MainTabsNavigatorPanel');
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [{container: {flex: 1},
|
||||
containerBackground: {backgroundColor: BACKGROUND_BASE_LOWEST}, tabsContainer: {flex: 1}}]);
|
||||
object = {code: 'function MainTabsNavigatorPanelTsx1(){const{translateX,highestFullyRenderedScreenIndex}=this.__closure;return{opacity:translateX.get()>0&&highestFullyRenderedScreenIndex.get()<1?1:0};}'};
|
||||
value = value.memo(MainTabsNavigatorPanel);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsNavigatorPanel.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function MainTabsNavigatorPanel() { // fn#108671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:626, offset: 0x0232905a, size: 1828 bytes, params: 1, frame: 42
|
||||
var object2;
|
||||
var r10;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const styles = useStyles();
|
||||
const value3 = require(dependencyMap[8]).useNavigation();
|
||||
const {isChatBesideChannelList, isChatLockedOpen} = importDefault(dependencyMap[9])();
|
||||
const value5 = require(dependencyMap[10]).useDrawerWidth();
|
||||
const value6 = importDefault(dependencyMap[11])();
|
||||
let binding = env0_4;
|
||||
const env0_3 = binding.useRef(isChatLockedOpen);
|
||||
var env0_4 = binding.useRef(false);
|
||||
binding.useLayoutEffect(_fun108672, [isChatLockedOpen]);
|
||||
const value7 = importDefault(dependencyMap[14])(value3);
|
||||
let useState = binding.useState;
|
||||
const value8 = Reflect.apply(useState, binding, [_fun108673]);
|
||||
const binding2 = env0_3;
|
||||
const value9 = binding2(value8, 2);
|
||||
const value10 = 0;
|
||||
const property = value9[value10];
|
||||
const env0_7 = value9[1];
|
||||
const property2 = value7[value10];
|
||||
const env0_9 = binding.useRef(property2);
|
||||
binding.useEffect(_fun108674, [property2]);
|
||||
const value11 = binding.useCallback(_fun108675, [value3]);
|
||||
useState = binding.useState;
|
||||
const value12 = binding2(Reflect.apply(useState, binding, [_fun108676]), 2);
|
||||
const property3 = value12[value10];
|
||||
const env0_12 = value12[1];
|
||||
useState = binding.useState;
|
||||
const value13 = binding2(Reflect.apply(useState, binding, [_fun108677]), 2);
|
||||
const property4 = value13[value10];
|
||||
const env0_13 = value13[1];
|
||||
binding.useEffect(function() {
|
||||
var closure = _fun108679;
|
||||
closure.addListener('state', closure);
|
||||
return _fun108680;
|
||||
}, [value3]);
|
||||
binding.useEffect(_fun108681, [property3]);
|
||||
const r18 = property4 && isChatBesideChannelList;
|
||||
const env0_14 = r18;
|
||||
binding = env0_4;
|
||||
const env0_15 = binding.useRef(false);
|
||||
const value14 = binding.useCallback(_fun108682, [value3, value11]);
|
||||
let closure = _fun108683;
|
||||
const value15 = binding.useCallback(closure, []);
|
||||
const value16 = null;
|
||||
const r1 = value16 != property2 && property2.type !== require(dependencyMap[14]).ChannelScreenType.FALLBACK_RENDERED;
|
||||
const defaultImport = importDefault(dependencyMap[18]);
|
||||
object2 = {};
|
||||
let r15 = r18 && isChatLockedOpen;
|
||||
r15 = !r15 && r1;
|
||||
object2.canDrag = r15;
|
||||
object2.onVisibilityChange = value14;
|
||||
object2.onDragStart = value15;
|
||||
const property5 = value7[value10];
|
||||
const type = value16 == property5 ? value2 : property5.type;
|
||||
const ChannelScreenType = require(dependencyMap[14]).ChannelScreenType;
|
||||
const DEFAULT = ChannelScreenType.DEFAULT;
|
||||
object2.startShown = type === DEFAULT;
|
||||
object2.openWidth = r18 ? value5 : value2;
|
||||
const {gesture, panelGestureContext, isDragging, translateX, movePanel, maxWidth,
|
||||
isDraggingRef} = defaultImport(object2);
|
||||
binding = env0_4;
|
||||
binding.useEffect(_fun108684, [r18, value5]);
|
||||
const env0_22 = binding.useRef({handleExit: value11, maxWidth: maxWidth, movePanel: movePanel, screens: value7,
|
||||
firstScreen: property2});
|
||||
binding.useEffect(_fun108685);
|
||||
binding.useEffect(_fun108686, [value16 == property2 ? value2 : property2.type, translateX, isDraggingRef]);
|
||||
env0_4.useEffect(_fun108687, [value16 == property2 ? value2 : property2.channelId]);
|
||||
binding = env0_4;
|
||||
const value22 = binding.useMemo(_fun108689, [binding.useCallback(_fun108688, [movePanel, r1]), property,
|
||||
isChatLockedOpen, r18]);
|
||||
const r29 = r18 && isChatLockedOpen ? value7.length <= 1 : !property;
|
||||
const value25 = env0_4.useMemo(_fun108690, [isChatLockedOpen, r18, maxWidth, translateX]);
|
||||
const moduleValue3 = require(dependencyMap[21]);
|
||||
const useSharedValue = moduleValue3.useSharedValue;
|
||||
const get = translateX.get;
|
||||
const value27 = Reflect.apply(useSharedValue, moduleValue3, [Reflect.apply(get, translateX,
|
||||
[]) > value10 ? -1 : value10]);
|
||||
const moduleValue4 = require(dependencyMap[21]);
|
||||
const useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = MainTabsNavigatorPanelSe;
|
||||
closure.__closure = {translateX: translateX, highestFullyRenderedScreenIndex: value27};
|
||||
closure.__workletHash = 10839500061449;
|
||||
closure.__initData = env0_14;
|
||||
const value28 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
const value29 = importDefault(dependencyMap[22])('channel_list_scrim');
|
||||
const value30 = require(dependencyMap[23]).useYouBarEnabled('MainTabs');
|
||||
const value31 = require(dependencyMap[24]).useIsCustomThemeActive();
|
||||
const Provider = importDefault(dependencyMap[25]).Provider;
|
||||
const GestureDetector = require(dependencyMap[26]).GestureDetector;
|
||||
const items2 = [styles.container];
|
||||
items2[1] = !value31 && styles.containerBackground;
|
||||
const View2 = importDefault(dependencyMap[21]).View;
|
||||
const items4 = [<View2 style={[styles.tabsContainer,
|
||||
value28]} accessibilityElementsHidden={r29 ? value2 : !r29} importantForAccessibility={r29 ? value2 : 'no-hide-descendants'}>{((Component) => <Component />)(importDefault(value30 ? dependencyMap[27] : dependencyMap[28]))}{value29 ? ((MainTabsContentScrim) => <MainTabsContentScrim translateX={translateX} maxWidth={maxWidth} />)(require(dependencyMap[29]).MainTabsContentScrim) : value2}</View2>];
|
||||
items4[1] = ((Component) => <Component />)(importDefault(dependencyMap[30]));
|
||||
if (value7.length > value10) {
|
||||
value = importDefault(dependencyMap[31]);
|
||||
value = ((Component) => <Component screens={value7} screenStackActive={property || r18 && isChatLockedOpen} translateX={translateX} isDragging={isDragging} maxWidth={maxWidth} highestFullyRenderedScreenIndex={value27} shouldFreeze={!r18} focusChatPressableComponent={value22} firstScreenWidth={r18 && isChatLockedOpen ? value6 : value2} firstScreenFrame={value25} />)(value);
|
||||
r10 = value;
|
||||
} else {
|
||||
r10 = value16;
|
||||
}
|
||||
items4[2] = r10;
|
||||
return (
|
||||
<Provider value={panelGestureContext}>
|
||||
<GestureDetector gesture={gesture}>
|
||||
<View style={items2} collapsable={false}>
|
||||
{items4}
|
||||
</View>
|
||||
</GestureDetector>
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun108672() { // fn#108672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:848, offset: 0x0232977e, size: 136 bytes, params: 1, frame: 14
|
||||
var binding;
|
||||
var value2;
|
||||
const current = env0_3.current;
|
||||
let isChatLockedOpenBinding = isChatLockedOpen;
|
||||
if (current !== isChatLockedOpenBinding) {
|
||||
binding = env0_3;
|
||||
isChatLockedOpenBinding = isChatLockedOpen;
|
||||
binding.current = isChatLockedOpenBinding;
|
||||
value2 = environment.__proto__;
|
||||
if (isChatLockedOpenBinding) {
|
||||
(require(14362) /* metro dependency 14362: PanelsNavigationUtils */).convertPortraitToLandscapeScreens();
|
||||
} else {
|
||||
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
|
||||
(require(14362) /* metro dependency 14362: PanelsNavigationUtils */).convertLandscapeToPortraitScreens();
|
||||
}
|
||||
env0_4.current = true;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108673() { // fn#108673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1055, offset: 0x02329806, size: 72 bytes, params: 1, frame: 13
|
||||
const type = env0_5[0]?.type;
|
||||
const ChannelScreenType = (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType;
|
||||
const DEFAULT = ChannelScreenType.DEFAULT;
|
||||
return type === DEFAULT;
|
||||
}
|
||||
|
||||
function _fun108675() { // fn#108675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1245, offset: 0x0232984e, size: 141 bytes, params: 1, frame: 22
|
||||
var r5;
|
||||
var r9;
|
||||
var r3;
|
||||
var value5;
|
||||
var value6;
|
||||
const value2 = undefined;
|
||||
env0_7(false);
|
||||
const state = env0_0.getState();
|
||||
const index = state.index;
|
||||
let routes = state.routes;
|
||||
let property = routes[index];
|
||||
let name = property == null ? value2 : property.name;
|
||||
const value4 = 0;
|
||||
if (name !== 'channel') {
|
||||
r3 = value4;
|
||||
} else {
|
||||
r5 = value4;
|
||||
r9 = index;
|
||||
while (true) {
|
||||
value5 = r5 + 1;
|
||||
value6 = r9 - 1;
|
||||
routes = state.routes;
|
||||
property = routes[value6];
|
||||
name = property == null ? value2 : property.name;
|
||||
if (name === 'channel') {
|
||||
r5 = value5;
|
||||
r9 = value6;
|
||||
continue;
|
||||
}
|
||||
r3 = value5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (r3 > value4) {
|
||||
env0_0.pop(r3);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun108676() { // fn#108676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1396, offset: 0x023298db, size: 55 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */;
|
||||
const isActiveTabsGuilds = value.isActiveTabsGuilds;
|
||||
const binding = env0_0;
|
||||
const getState = binding.getState;
|
||||
return Reflect.apply(isActiveTabsGuilds, value, [Reflect.apply(getState, binding, [])]);
|
||||
}
|
||||
|
||||
function _fun108678() { // fn#108678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1525, offset: 0x02329912, size: 45 bytes, params: 1, frame: 14
|
||||
env0_0.addListener('state', handleStateChange_108679);
|
||||
return _fun108680;
|
||||
}
|
||||
|
||||
function _fun108681() { // fn#108681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1723, offset: 0x0232997e, size: 20 bytes, params: 1, frame: 11
|
||||
env0_13(env0_11);
|
||||
}
|
||||
|
||||
function _fun108682(a0) { // fn#108682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1783, offset: 0x02329992, size: 303 bytes, params: 2, frame: 17
|
||||
var index;
|
||||
var name;
|
||||
var binding;
|
||||
var getState;
|
||||
var routes;
|
||||
var value3;
|
||||
var rootNavigationRef;
|
||||
var state;
|
||||
var state2;
|
||||
var property;
|
||||
var moduleValue2;
|
||||
const value2 = undefined;
|
||||
env0_7(a0);
|
||||
env0_15.current = false;
|
||||
if (a0) {
|
||||
if (env0_9.current != null) {
|
||||
binding = env0_0;
|
||||
getState = binding.getState;
|
||||
routes = Reflect.apply(getState, binding, []).routes;
|
||||
getState = binding.getState;
|
||||
index = Reflect.apply(getState, binding, []).index;
|
||||
name = routes[index].name;
|
||||
if (name !== 'channel') {
|
||||
value3 = environment.__proto__;
|
||||
rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
if (rootNavigationRef == null) {
|
||||
name = value2;
|
||||
} else {
|
||||
state = rootNavigationRef.getState();
|
||||
if (state == null) {
|
||||
name = value2;
|
||||
} else {
|
||||
routes = state.routes;
|
||||
if (rootNavigationRef == null) {
|
||||
index = value2;
|
||||
} else {
|
||||
state2 = rootNavigationRef.getState();
|
||||
index = state2 == null ? value2 : state2.index;
|
||||
}
|
||||
property = routes[index];
|
||||
name = property == null ? value2 : property.name;
|
||||
}
|
||||
}
|
||||
if (name !== 'modal') {
|
||||
env0_15.current = true;
|
||||
moduleValue2 = require(4601) /* metro dependency 4601: transitionToChannel */;
|
||||
moduleValue2.transitionToChannel(env0_9.current.channelId);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
env0_10();
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun108683() { // fn#108683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2163, offset: 0x02329ac1, size: 75 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
const dispatch = ComponentDispatch.dispatch;
|
||||
const BOTTOM_CHANNEL_SCREEN_DRAG_START = ComponentActions.BOTTOM_CHANNEL_SCREEN_DRAG_START;
|
||||
Reflect.apply(dispatch, ComponentDispatch, [BOTTOM_CHANNEL_SCREEN_DRAG_START]);
|
||||
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
|
||||
}
|
||||
|
||||
function _fun108684() { // fn#108684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2633, offset: 0x02329b0c, size: 54 bytes, params: 1, frame: 14
|
||||
env1_12.log('Chat Layout Changed', {isNavigatorPanelsBesideChannelList: env0_14, drawerWidth: env0_2});
|
||||
}
|
||||
|
||||
function _fun108685() { // fn#108685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2829, offset: 0x02329b42, size: 21 bytes, params: 1, frame: 2
|
||||
env0_22.current = env0_21;
|
||||
}
|
||||
|
||||
function _fun108686() { // fn#108686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:2864, offset: 0x02329b57, size: 293 bytes, params: 1, frame: 22
|
||||
var translateXBinding;
|
||||
let current = isDraggingRef.current;
|
||||
if (!current) {
|
||||
current = env0_22.current;
|
||||
var handleExit = current.handleExit;
|
||||
var maxWidth = current.maxWidth;
|
||||
var movePanel = current.movePanel;
|
||||
var screens = current.screens;
|
||||
var value2 = undefined;
|
||||
var type = env0_8 == null ? value2 : env0_8.type;
|
||||
var ChannelScreenType = (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType;
|
||||
var DEFAULT = ChannelScreenType.DEFAULT;
|
||||
var value4 = type === DEFAULT;
|
||||
if (screens.length >= 2) {
|
||||
translateXBinding = translateX;
|
||||
translateXBinding.set(value4 ? 0 : maxWidth);
|
||||
env0_7(value4);
|
||||
return value2;
|
||||
}
|
||||
if (value4) {
|
||||
if (env0_15.current) {
|
||||
env0_15.current = false;
|
||||
translateXBinding = translateX;
|
||||
if (translateXBinding.get() === maxWidth) {
|
||||
handleExit();
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
movePanel(true, false, 0, true);
|
||||
return undefined;
|
||||
}
|
||||
if (movePanel(false, false, 0, false)) {
|
||||
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108687() { // fn#108687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3234, offset: 0x02329c7c, size: 127 bytes, params: 1, frame: 17
|
||||
var defaultImport;
|
||||
const firstScreen = env0_22.current.firstScreen;
|
||||
const value = undefined;
|
||||
const type = firstScreen == null ? value : firstScreen.type;
|
||||
const ChannelScreenType = (require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */).ChannelScreenType;
|
||||
const BACKGROUND_SAVED = ChannelScreenType.BACKGROUND_SAVED;
|
||||
if (type === BACKGROUND_SAVED) {
|
||||
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
|
||||
defaultImport.preload(firstScreen.guildId ?? ME, firstScreen.channelId);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun108688() { // fn#108688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3452, offset: 0x02329cfb, size: 32 bytes, params: 1, frame: 16
|
||||
if (env0_16) {
|
||||
movePanel(true, false, 0, false);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108689() { // fn#108689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3499, offset: 0x02329d1b, size: 75 bytes, params: 1, frame: 15
|
||||
const value2 = null;
|
||||
return env0_14 ? isChatLockedOpen || env0_6 ? value2 : <Pressable style={StyleSheet.absoluteFill} onPress={env0_23} /> : value2;
|
||||
}
|
||||
|
||||
function _fun108690() { // fn#108690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3606, offset: 0x02329d66, size: 78 bytes, params: 1, frame: 16
|
||||
return env0_14 ? ((Component) => <Component translateX={translateX} maxWidth={maxWidth} isChatLockedOpen={isChatLockedOpen} />)(importDefault(14367) /* metro dependency 14367: ChannelScreenAnimatedFrame */) : null;
|
||||
}
|
||||
|
||||
function MainTabsNavigatorPanelSe() { // fn#108691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:3765, owner: MainTabsNavigatorPanel.se, offset: 0x02329db4, size: 63 bytes, params: 1, frame: 12
|
||||
var r1;
|
||||
var value4;
|
||||
var value;
|
||||
const value2 = translateX.get();
|
||||
const value3 = 0;
|
||||
if (value2 > value3) {
|
||||
value = env0_24.get();
|
||||
value4 = 1;
|
||||
r1 = value < value4 ? value4 : value3;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
return {opacity: r1};
|
||||
}
|
||||
|
||||
function handleStateChange_108679({data}) { // fn#108679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14558:1530, offset: 0x0232993f, size: 63 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_12;
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(14363) /* metro dependency 14363: useChannelScreensFromNavigation */;
|
||||
binding(value.isActiveTabsGuilds(data.state));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Metro module 14368; source: modules/main_tabs_v2/native/panels/MainTabsNavigatorPanelContext.tsx; dependencies: [31, 5321, 8142, 2] */
|
||||
function _fun108733(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14565:6, offset: 0x0232c25b, size: 211 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
object2 = {};
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
object2.gesture = Gesture.Pan();
|
||||
object2.disallowGesture = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue(false);
|
||||
object2.translateX = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue(0);
|
||||
const context = value.createContext(object2);
|
||||
value = value.createContext(undefined);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/MainTabsNavigatorPanelContext.tsx');
|
||||
exports.default = context;
|
||||
exports.MainTabsChannelScreenStackContext = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
/* Metro module 14362; source: modules/main_tabs_v2/native/panels/PanelsNavigationUtils.tsx; dependencies: [4008, 4007, 1489, 491, 2] */
|
||||
function _fun108692(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14559:6, offset: 0x02329df3, size: 109 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/PanelsNavigationUtils.tsx');
|
||||
exports.convertPortraitToLandscapeScreens = convertPortraitToLandscapeScreens;
|
||||
exports.convertLandscapeToPortraitScreens = convertLandscapeToPortraitScreens;
|
||||
}
|
||||
|
||||
function convertPortraitToLandscapeScreens() { // fn#108693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14559:222, offset: 0x02329e60, size: 500 bytes, params: 1, frame: 26
|
||||
var r15;
|
||||
var r4;
|
||||
var state4;
|
||||
var moduleValue2;
|
||||
var coerceMainRoute;
|
||||
var routes;
|
||||
var value5;
|
||||
var state;
|
||||
var moduleValue3;
|
||||
var coerceChannelRoute;
|
||||
var moduleValue4;
|
||||
var coerceTabsRoute;
|
||||
var value6;
|
||||
var moduleValue5;
|
||||
var coerceGuildsRoute;
|
||||
var state2;
|
||||
var state3;
|
||||
var value7;
|
||||
var object;
|
||||
var items2;
|
||||
var slice;
|
||||
var dispatch;
|
||||
var CommonActions;
|
||||
var reset;
|
||||
var object3;
|
||||
const value2 = undefined;
|
||||
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
if (rootNavigationRef != null) {
|
||||
state4 = rootNavigationRef.getState();
|
||||
if (state4 != null) {
|
||||
moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
coerceMainRoute = moduleValue2.coerceMainRoute;
|
||||
routes = state4.routes;
|
||||
value5 = Reflect.apply(coerceMainRoute, moduleValue2, [routes[0]]);
|
||||
if (value5 != null) {
|
||||
state = value5.state;
|
||||
if (state != null) {
|
||||
if (state.index !== 0) {
|
||||
moduleValue3 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
coerceChannelRoute = moduleValue3.coerceChannelRoute;
|
||||
routes = state.routes;
|
||||
if (Reflect.apply(coerceChannelRoute, moduleValue3, [routes[1]]) != null) {
|
||||
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
coerceTabsRoute = moduleValue4.coerceTabsRoute;
|
||||
routes = state.routes;
|
||||
value6 = Reflect.apply(coerceTabsRoute, moduleValue4, [routes[0]]);
|
||||
if (value6 != null) {
|
||||
moduleValue5 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
coerceGuildsRoute = moduleValue5.coerceGuildsRoute;
|
||||
state2 = value6.state;
|
||||
if (state2 == null) {
|
||||
r4 = value2;
|
||||
} else {
|
||||
routes = state2.routes;
|
||||
state3 = value6.state;
|
||||
value7 = state3 == null;
|
||||
r4 = routes[value7 ? value2 : state3.index];
|
||||
r15 = value7;
|
||||
}
|
||||
if (Reflect.apply(coerceGuildsRoute, moduleValue5, [r4]) != null) {
|
||||
object = {};
|
||||
copyDataProperties(object, state, undefined);
|
||||
object['index'] = state.index - 1;
|
||||
routes = state.routes;
|
||||
items2 = [routes[0]];
|
||||
routes = state.routes;
|
||||
slice = routes.slice;
|
||||
arraySpread(items2, Reflect.apply(slice, routes, [2]), 1, r15);
|
||||
object['routes'] = items2;
|
||||
value5.state = object;
|
||||
object = [value5];
|
||||
routes = state4.routes;
|
||||
slice = routes.slice;
|
||||
arraySpread(object, Reflect.apply(slice, routes, [1]), 1, r15);
|
||||
dispatch = rootNavigationRef.dispatch;
|
||||
CommonActions = (require(1489) /* metro dependency 1489 */).CommonActions;
|
||||
reset = CommonActions.reset;
|
||||
object3 = {};
|
||||
copyDataProperties(object3, state4, 1);
|
||||
object3['routes'] = object;
|
||||
object3['index'] = object.length - 1;
|
||||
Reflect.apply(dispatch, rootNavigationRef, [Reflect.apply(reset, CommonActions,
|
||||
[object3])]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function convertLandscapeToPortraitScreens() { // fn#108694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14559:879, offset: 0x0232a054, size: 667 bytes, params: 1, frame: 27
|
||||
var r4;
|
||||
var channelId;
|
||||
var r11;
|
||||
var moduleValue4;
|
||||
var coerceTabsRoute;
|
||||
var value6;
|
||||
var moduleValue5;
|
||||
var coerceGuildsRoute;
|
||||
var state2;
|
||||
var state3;
|
||||
var value7;
|
||||
var object;
|
||||
var items2;
|
||||
var params;
|
||||
var value10;
|
||||
var dispatch;
|
||||
const CommonActions = (require(1489) /* metro dependency 1489 */).CommonActions;
|
||||
var reset;
|
||||
var object2;
|
||||
const value2 = undefined;
|
||||
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
if (rootNavigationRef != null) {
|
||||
var state4 = rootNavigationRef.getState();
|
||||
if (state4 == null) {
|
||||
return value2;
|
||||
}
|
||||
var moduleValue2 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
var coerceMainRoute = moduleValue2.coerceMainRoute;
|
||||
var routes = state4.routes;
|
||||
var value5 = Reflect.apply(coerceMainRoute, moduleValue2, [routes[0]]);
|
||||
if (value5 == null) {
|
||||
return value2;
|
||||
}
|
||||
var state = value5.state;
|
||||
if (state == null) {
|
||||
return value2;
|
||||
}
|
||||
if (state4.index !== 0) {
|
||||
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
coerceTabsRoute = moduleValue4.coerceTabsRoute;
|
||||
routes = state.routes;
|
||||
value6 = Reflect.apply(coerceTabsRoute, moduleValue4, [routes[0]]);
|
||||
if (value6 != null) {
|
||||
moduleValue5 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
coerceGuildsRoute = moduleValue5.coerceGuildsRoute;
|
||||
state2 = value6.state;
|
||||
if (state2 == null) {
|
||||
r4 = value2;
|
||||
} else {
|
||||
routes = state2.routes;
|
||||
state3 = value6.state;
|
||||
r4 = routes[state3 == null ? value2 : state3.index];
|
||||
}
|
||||
value7 = Reflect.apply(coerceGuildsRoute, moduleValue5, [r4]);
|
||||
if (value7 != null) {
|
||||
object = {};
|
||||
copyDataProperties(object, state, undefined);
|
||||
object['index'] = state.index + 1;
|
||||
routes = state.routes;
|
||||
items2 = [routes[0]];
|
||||
params = value7.params;
|
||||
channelId = params == null ? value2 : params.channelId;
|
||||
r11 = channelId ?? 'channel-' + (require(491) /* metro dependency 491 */).v4();
|
||||
params = value7.params;
|
||||
value10 = params == null;
|
||||
channelId = value10 ? value2 : params.channelId;
|
||||
params = value7.params;
|
||||
items2[1] = {name: 'channel', key: r11, params: {channelId: channelId,
|
||||
guildId: params == null ? value2 : params.guildId}};
|
||||
routes = state.routes;
|
||||
arraySpread(items2, routes.slice(1), 2, value10);
|
||||
object['routes'] = items2;
|
||||
value5.state = object;
|
||||
object = [value5];
|
||||
routes = state4.routes;
|
||||
arraySpread(object, routes.slice(1), 1, value10);
|
||||
dispatch = rootNavigationRef.dispatch;
|
||||
reset = CommonActions.reset;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, state4, 1);
|
||||
object2['routes'] = object;
|
||||
object2['index'] = object.length - 1;
|
||||
Reflect.apply(dispatch, rootNavigationRef, [Reflect.apply(reset, CommonActions, [object2])]);
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
if (state.index === 0) {
|
||||
return value2;
|
||||
}
|
||||
var moduleValue3 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
if (moduleValue3.coerceChannelRoute(state.routes[1]) == null) {
|
||||
return value2;
|
||||
}
|
||||
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
value6 = moduleValue4.coerceTabsRoute(state.routes[0]);
|
||||
if (value6 != null) {
|
||||
moduleValue5 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
coerceGuildsRoute = moduleValue5.coerceGuildsRoute;
|
||||
state2 = value6.state;
|
||||
if (state2 == null) {
|
||||
r4 = value2;
|
||||
} else {
|
||||
routes = state2.routes;
|
||||
state3 = value6.state;
|
||||
r4 = routes[state3 == null ? value2 : state3.index];
|
||||
}
|
||||
value7 = Reflect.apply(coerceGuildsRoute, moduleValue5, [r4]);
|
||||
if (value7 != null) {
|
||||
object = {};
|
||||
copyDataProperties(object, state, undefined);
|
||||
object['index'] = state.index + 1;
|
||||
routes = state.routes;
|
||||
items2 = [routes[0]];
|
||||
params = value7.params;
|
||||
channelId = params == null ? value2 : params.channelId;
|
||||
r11 = channelId ?? 'channel-' + (require(491) /* metro dependency 491 */).v4();
|
||||
params = value7.params;
|
||||
value10 = params == null;
|
||||
channelId = value10 ? value2 : params.channelId;
|
||||
params = value7.params;
|
||||
items2[1] = {name: 'channel', key: r11, params: {channelId: channelId,
|
||||
guildId: params == null ? value2 : params.guildId}};
|
||||
routes = state.routes;
|
||||
arraySpread(items2, routes.slice(1), 2, value10);
|
||||
object['routes'] = items2;
|
||||
value5.state = object;
|
||||
object = [value5];
|
||||
routes = state4.routes;
|
||||
arraySpread(object, routes.slice(1), 1, value10);
|
||||
dispatch = rootNavigationRef.dispatch;
|
||||
reset = CommonActions.reset;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, state4, 1);
|
||||
object2['routes'] = object;
|
||||
object2['index'] = object.length - 1;
|
||||
Reflect.apply(dispatch, rootNavigationRef, [Reflect.apply(reset, CommonActions, [object2])]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 14955; source: modules/main_tabs_v2/native/panels/ThemedHeaderBackgroundGradient.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 3860, 673, 4589, 2] */
|
||||
function _fun113105(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15152:6, offset: 0x023e8ef4, size: 225 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value2.StyleSheet;
|
||||
const env0_4 = value2.View;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'position': 'absolute',
|
||||
'left': 0, 'right': 0, 'top': 0}});
|
||||
value = value.memo(ThemedHeaderBackgroundGradient);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/ThemedHeaderBackgroundGradient.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function ThemedHeaderBackgroundGradient({baseColor = importDefault(dependencyMap[4]).colors.BACKGROUND_BASE_LOWEST, minHeight}) { // fn#113106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15152:247, offset: 0x023e8fd5, size: 334 bytes, params: 2, frame: 19
|
||||
minHeight = minHeight === undefined ? 16 : minHeight;
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const value3 = (require(3860) /* metro dependency 3860: useToken */).useToken(baseColor);
|
||||
const r7 = (require(673) /* metro dependency 673: ColorUtils */).hex2rgb(value3, 0) ?? 'transparent';
|
||||
const Math = global.Math;
|
||||
return (
|
||||
<View style={[styles.container, {height: Math.max(value2.top, minHeight)}]} pointerEvents="none">
|
||||
{((Component) => <Component style={StyleSheet.absoluteFill} colors={[value3, r7]} start={{'x': 0,
|
||||
'y': 0}} end={{'x': 0, 'y': 1}} />)(importDefault(4589) /* metro dependency 4589 */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
/* Metro module 14301; source: modules/main_tabs_v2/native/panels/createChatPanelNativeStackNavigator.tsx; dependencies: [31, 33, 1485, 4007, 9884, 2] */
|
||||
function _fun108187(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:6, offset: 0x02317a97, size: 158 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
let value = require(1485) /* metro dependency 1485 */;
|
||||
value = value.createNavigatorFactory(ChatPanelNativeStackNavigator);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/createChatPanelNativeStackNavigator.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function ChatPanelNativeStackNavigator(a0) { // fn#108188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:161, offset: 0x02317b35, size: 354 bytes, params: 2, frame: 25
|
||||
const id = a0.id;
|
||||
const initialRouteName = a0.initialRouteName;
|
||||
const children = a0.children;
|
||||
const screenListeners = a0.screenListeners;
|
||||
const screenOptions = a0.screenOptions;
|
||||
const object2 = {'id': 0, 'initialRouteName': 0, 'children': 0, 'screenListeners': 0, 'screenOptions': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object2, id);
|
||||
const moduleValue = require(1485) /* metro dependency 1485 */;
|
||||
const useNavigationBuilder = moduleValue.useNavigationBuilder;
|
||||
const StackRouter = moduleValue.StackRouter;
|
||||
const value3 = Reflect.apply(useNavigationBuilder, moduleValue, [StackRouter, {id: id,
|
||||
initialRouteName: initialRouteName, children: children, screenListeners: screenListeners,
|
||||
screenOptions: screenOptions}]);
|
||||
var stateBinding = value3.state;
|
||||
const descriptors = value3.descriptors;
|
||||
const navigation = value3.navigation;
|
||||
const env0_2 = navigation;
|
||||
const NavigationContent = value3.NavigationContent;
|
||||
const binding = env0_2;
|
||||
var {state, filteredDescriptors} = binding.useMemo(_fun108189, [stateBinding, descriptors]);
|
||||
binding.useEffect(_fun108190, [navigation, stateBinding.index, stateBinding.key]);
|
||||
const NativeStackView = (require(9884) /* metro dependency 9884 */).NativeStackView;
|
||||
return (
|
||||
<NavigationContent>
|
||||
<NativeStackView
|
||||
{...value}
|
||||
{...{['state']: stateBinding}}
|
||||
{...{['navigation']: navigation}}
|
||||
{...{['descriptors']: filteredDescriptors}}
|
||||
/>
|
||||
</NavigationContent>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun108189() { // fn#108189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:480, offset: 0x02317c97, size: 366 bytes, params: 1, frame: 28
|
||||
var r5;
|
||||
var r6;
|
||||
var r14;
|
||||
var r7;
|
||||
var property;
|
||||
var moduleValue;
|
||||
var coerceChannelRoute;
|
||||
var key;
|
||||
var descriptorsBinding;
|
||||
var key2;
|
||||
var index;
|
||||
var value4;
|
||||
var value5;
|
||||
const object3 = {};
|
||||
const stateBinding = state;
|
||||
copyDataProperties(object3, stateBinding, undefined);
|
||||
let routes = stateBinding.routes;
|
||||
const items4 = [];
|
||||
const value2 = 0;
|
||||
arraySpread(items4, routes, value2, undefined);
|
||||
object3['routes'] = items4;
|
||||
const items2 = [];
|
||||
const items3 = [];
|
||||
const object4 = {};
|
||||
let length = object3.routes.length;
|
||||
if (value2 < length) {
|
||||
r5 = value2;
|
||||
r6 = value2;
|
||||
while (true) {
|
||||
routes = object3.routes;
|
||||
property = routes[r5];
|
||||
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
coerceChannelRoute = moduleValue.coerceChannelRoute;
|
||||
if (Reflect.apply(coerceChannelRoute, moduleValue, [property]) != null) {
|
||||
items2.push(property);
|
||||
index = object3.index;
|
||||
if (r5 <= index) {
|
||||
value4 = typeof r6 === 'bigint' ? r6 + 1n : +r6 + 1;
|
||||
r14 = value4;
|
||||
break;
|
||||
}
|
||||
r14 = r6;
|
||||
break;
|
||||
}
|
||||
items3.push(property);
|
||||
key = property.key;
|
||||
descriptorsBinding = descriptors;
|
||||
if (key in descriptorsBinding) {
|
||||
key = property.key;
|
||||
descriptorsBinding = descriptors;
|
||||
key2 = property.key;
|
||||
object4[key] = descriptorsBinding[key2];
|
||||
r14 = r6;
|
||||
break;
|
||||
}
|
||||
r14 = r6;
|
||||
break;
|
||||
value5 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
|
||||
routes = object3.routes;
|
||||
length = routes.length;
|
||||
if (value5 < length) {
|
||||
r5 = value5;
|
||||
r6 = r14;
|
||||
continue;
|
||||
}
|
||||
r7 = r14;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r7 = value2;
|
||||
}
|
||||
const Math = global.Math;
|
||||
object3.index = Math.max(value2, object3.index - r7);
|
||||
object3.routes = items3;
|
||||
if (value2 === object3.routes.length) {
|
||||
object3.index = value2;
|
||||
} else if (object3.index >= object3.routes.length) {
|
||||
object3.index = object3.routes.length - 1;
|
||||
}
|
||||
return {state: object3, filteredDescriptors: object4};
|
||||
}
|
||||
|
||||
function _fun108190() { // fn#108190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:922, offset: 0x02317e05, size: 68 bytes, params: 1, frame: 14
|
||||
return navigation == null || navigation.addListener == null ? undefined : navigation.addListener('tabPress',
|
||||
function(a0) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = navigation.isFocused();
|
||||
global.requestAnimationFrame(_fun108192);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun108191(a0) { // fn#108191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:988, offset: 0x02317e49, size: 54 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
const env0_1 = navigation.isFocused();
|
||||
global.requestAnimationFrame(_fun108192);
|
||||
}
|
||||
|
||||
function _fun108192() { // fn#108192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14498:1035, offset: 0x02317e7f, size: 136 bytes, params: 1, frame: 16
|
||||
var navigationBinding;
|
||||
var dispatch;
|
||||
var object2;
|
||||
var value6;
|
||||
var StackActions;
|
||||
if (state.index > 0 && env0_1 && !env0_0.defaultPrevented) {
|
||||
navigationBinding = navigation;
|
||||
dispatch = navigationBinding.dispatch;
|
||||
object2 = {};
|
||||
value6 = environment.__proto__.__proto__.__proto__;
|
||||
StackActions = (require(1485) /* metro dependency 1485 */).StackActions;
|
||||
copyDataProperties(object2, StackActions.popToTop(), require);
|
||||
object2['target'] = state.key;
|
||||
Reflect.apply(dispatch, navigationBinding, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,322 @@
|
||||
/* Metro module 14363; source: modules/main_tabs_v2/native/panels/useChannelScreensFromNavigation.tsx; dependencies: [57, 31, 1379, 1934, 3969, 661, 1386, 4008, 4007, 4010, 2] */
|
||||
function _fun108695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:6, offset: 0x0232a2ef, size: 337 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = getActiveTabsRoute;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).ME;
|
||||
const env0_9 = (require(1386) /* metro dependency 1386: ChannelConstants */).isStaticChannelRoute;
|
||||
object2 = {DEFAULT: 0};
|
||||
object2[0] = 'DEFAULT';
|
||||
object2.BACKGROUND_SAVED = 1;
|
||||
object2[1] = 'BACKGROUND_SAVED';
|
||||
object2.FALLBACK_RENDERED = 2;
|
||||
object2[2] = 'FALLBACK_RENDERED';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/useChannelScreensFromNavigation.tsx');
|
||||
exports.default = useChannelScreensFromNavigation;
|
||||
exports.ChannelScreenType = object2;
|
||||
exports.getActiveTabsRoute = closure;
|
||||
exports.isActiveTabsGuilds = isActiveTabsGuilds;
|
||||
}
|
||||
|
||||
function getActiveTabsRoute(a0) { // fn#108696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:333, offset: 0x0232a440, size: 246 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var object2;
|
||||
if (a0 != null) {
|
||||
var state = a0.state;
|
||||
var value = undefined;
|
||||
r0 = state == null ? value : state.routes[(a0.state == null ? value : a0.state.index) ?? (a0.state == null ? value : a0.state.routes.length) - 1];
|
||||
if (r0 != null) {
|
||||
return r0;
|
||||
}
|
||||
var params = a0.params;
|
||||
if ((params == null ? value : params.screen) != null) {
|
||||
object2 = {key: 'resolved'};
|
||||
params = a0.params;
|
||||
object2.name = params.screen;
|
||||
params = a0.params;
|
||||
params = params.params;
|
||||
object2.params = params;
|
||||
return object2;
|
||||
}
|
||||
var rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
if ((rootNavigationRef == null ? value : rootNavigationRef.isReady()) === true) {
|
||||
return rootNavigationRef.getCurrentRoute();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function resolveBackgroundScreen({routes}) { // fn#108697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:756, offset: 0x0232a536, size: 315 bytes, params: 2, frame: 17
|
||||
var search;
|
||||
const value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(routes[0]);
|
||||
if (value3 != null) {
|
||||
var activeTabsRoute = getActiveTabsRoute(value3);
|
||||
if (activeTabsRoute == null) {
|
||||
return [];
|
||||
}
|
||||
var value5 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceGuildsRoute(activeTabsRoute);
|
||||
if (value5 == null) {
|
||||
return [];
|
||||
}
|
||||
var params = value5.params;
|
||||
var guildId = params?.guildId;
|
||||
params = value5.params;
|
||||
var r0 = params?.channelId ?? undefined;
|
||||
if (r0 == null) {
|
||||
return [];
|
||||
}
|
||||
if (isStaticChannelRoute(r0)) {
|
||||
search = value5.params?.search;
|
||||
return [{index: 0,
|
||||
type: search == null ? env0_10.BACKGROUND_SAVED : search ? env0_10.FALLBACK_RENDERED : env0_10.BACKGROUND_SAVED,
|
||||
|
||||
|
||||
guildId: guildId, channelId: r0, showCreateThread: false}];
|
||||
}
|
||||
var getChannel = ChannelStore.getChannel;
|
||||
if (Reflect.apply(getChannel, ChannelStore, [r0]) != null) {
|
||||
search = value5.params?.search;
|
||||
return [{index: 0,
|
||||
type: search == null ? env0_10.BACKGROUND_SAVED : search ? env0_10.FALLBACK_RENDERED : env0_10.BACKGROUND_SAVED,
|
||||
|
||||
|
||||
guildId: guildId, channelId: r0, showCreateThread: false}];
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
function resolveChannelScreens(a0, a1) { // fn#108698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1286, offset: 0x0232a671, size: 276 bytes, params: 3, frame: 23
|
||||
var r12;
|
||||
var r2;
|
||||
var r0;
|
||||
var routes;
|
||||
var property;
|
||||
var moduleValue;
|
||||
var value3;
|
||||
var push;
|
||||
var length;
|
||||
var DEFAULT;
|
||||
var params;
|
||||
var guildId;
|
||||
var channelId;
|
||||
var showCreateThread;
|
||||
var value4;
|
||||
var backgroundScreen;
|
||||
var items2;
|
||||
const items3 = [];
|
||||
let index = a0.index;
|
||||
let value = 0;
|
||||
if (value <= index) {
|
||||
r2 = value;
|
||||
while (true) {
|
||||
routes = a0.routes;
|
||||
property = routes[r2];
|
||||
moduleValue = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
value3 = moduleValue.coerceChannelRoute(property);
|
||||
if (value3 != null) {
|
||||
push = items3.push;
|
||||
length = items3.length;
|
||||
DEFAULT = env0_10.DEFAULT;
|
||||
params = value3.params;
|
||||
guildId = params.guildId;
|
||||
params = value3.params;
|
||||
channelId = params.channelId;
|
||||
params = value3.params;
|
||||
showCreateThread = params.showCreateThread;
|
||||
Reflect.apply(push, items3, [{index: length, type: DEFAULT, guildId: guildId, channelId: channelId,
|
||||
showCreateThread: showCreateThread}]);
|
||||
r12 = channelId;
|
||||
}
|
||||
value4 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
index = a0.index;
|
||||
if (value4 <= index) {
|
||||
r2 = value4;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (a1.isChatLockedOpen) {
|
||||
backgroundScreen = resolveBackgroundScreen(a0);
|
||||
length = backgroundScreen.length;
|
||||
if (length > value) {
|
||||
items2 = [];
|
||||
value = arraySpread(items2, backgroundScreen, value, r12);
|
||||
arraySpread(items2, items3.map(_fun108699), value, r12);
|
||||
return items2;
|
||||
}
|
||||
length = items3.length;
|
||||
r0 = length > value ? items3 : resolveBackgroundScreen(a0);
|
||||
} else {
|
||||
r0 = items3.length > value ? items3 : resolveBackgroundScreen(a0);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useChannelScreensFromNavigation(a0) { // fn#108700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1900, offset: 0x0232a7b4, size: 185 bytes, params: 2, frame: 18
|
||||
const env0_0 = a0;
|
||||
const value2 = (importDefault(4010) /* metro dependency 4010: useChatLayout */)();
|
||||
const binding = env0_4;
|
||||
let value = env0_3(binding.useState(_fun108701), 2);
|
||||
const property = value[0];
|
||||
const env0_2 = value[1];
|
||||
value = binding.useCallback(_fun108702, []);
|
||||
binding.useEffect(_fun108704, [a0, value2, value]);
|
||||
binding.useEffect(function() {
|
||||
var closure = _fun108706;
|
||||
closure.addListener('state', closure);
|
||||
return _fun108707;
|
||||
}, [a0, value]);
|
||||
return property;
|
||||
}
|
||||
|
||||
function isActiveTabsGuilds({routes}) { // fn#108708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:3078, offset: 0x0232aaf5, size: 111 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
const property = routes[0];
|
||||
var value;
|
||||
const value2 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(property);
|
||||
if (value2 == null) {
|
||||
return false;
|
||||
}
|
||||
const activeTabsRoute = getActiveTabsRoute(value2);
|
||||
const value4 = activeTabsRoute != null;
|
||||
if (value4) {
|
||||
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
value = value.coerceGuildsRoute(activeTabsRoute) != null;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value4;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun108699(a0) { // fn#108699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1699, offset: 0x0232a785, size: 47 bytes, params: 2, frame: 12
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
object2['index'] = a0.index + env0_0.length;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun108701() { // fn#108701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:1974, offset: 0x0232a86d, size: 136 bytes, params: 1, frame: 16
|
||||
var r0;
|
||||
var guildId;
|
||||
var channelId;
|
||||
const channelScreens = resolveChannelScreens(env0_0.getState(), env0_1);
|
||||
if (channelScreens.length > 0) {
|
||||
r0 = channelScreens;
|
||||
} else {
|
||||
guildId = SelectedGuildStore.getGuildId();
|
||||
channelId = SelectedChannelStore.getChannelId();
|
||||
r0 = channelId == null ? [] : [{index: 0, type: env1_10.FALLBACK_RENDERED, guildId: guildId ?? ME,
|
||||
channelId: channelId}];
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun108702(a0, a1) { // fn#108702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2249, offset: 0x0232a8f5, size: 206 bytes, params: 3, frame: 17
|
||||
var environment;
|
||||
var guildId;
|
||||
var property;
|
||||
var value;
|
||||
var value2;
|
||||
var value3;
|
||||
var activeTabsRoute;
|
||||
if (a0 == null) {
|
||||
property = a1.routes[0];
|
||||
value = environment.__proto__;
|
||||
value2 = undefined;
|
||||
value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(property);
|
||||
if (value3 != null) {
|
||||
activeTabsRoute = getActiveTabsRoute(value3);
|
||||
if (activeTabsRoute != null) {
|
||||
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
value = value.coerceGuildsRoute(activeTabsRoute);
|
||||
guildId = value == null || value.params == null ? value2 : value.params.guildId;
|
||||
}
|
||||
}
|
||||
env0_2(_fun108703);
|
||||
} else if (a0.length > 0) {
|
||||
env0_2(a0);
|
||||
} else {
|
||||
property = a1.routes[0];
|
||||
value = environment.__proto__;
|
||||
value2 = undefined;
|
||||
value3 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceTabsRoute(property);
|
||||
if (value3 != null) {
|
||||
activeTabsRoute = getActiveTabsRoute(value3);
|
||||
if (activeTabsRoute != null) {
|
||||
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
value = value.coerceGuildsRoute(activeTabsRoute);
|
||||
guildId = value == null || value.params == null ? value2 : value.params.guildId;
|
||||
}
|
||||
}
|
||||
env0_2(_fun108703);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108704() { // fn#108704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2679, offset: 0x0232aa45, size: 48 bytes, params: 1, frame: 14
|
||||
const state = env0_0.getState();
|
||||
env0_3(resolveChannelScreens(state, env0_1), state);
|
||||
}
|
||||
|
||||
function _fun108705() { // fn#108705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2763, offset: 0x0232aa75, size: 45 bytes, params: 1, frame: 14
|
||||
env0_0.addListener('state', handleStateChange_108706);
|
||||
return _fun108707;
|
||||
}
|
||||
|
||||
function _fun108703(a0) { // fn#108703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2532, offset: 0x0232a9c3, size: 130 bytes, params: 2, frame: 16
|
||||
var r1;
|
||||
var r0;
|
||||
var type;
|
||||
var value3;
|
||||
var object2;
|
||||
const value = a0;
|
||||
if (value.length === 0) {
|
||||
r0 = value;
|
||||
} else {
|
||||
if (env0_0 == null) {
|
||||
type = value[0].type;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
if (type === env2_10.FALLBACK_RENDERED) {
|
||||
r1 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value[0], type);
|
||||
object2['type'] = env2_10.FALLBACK_RENDERED;
|
||||
r1 = [object2];
|
||||
}
|
||||
} else if (env0_0 !== value[0].guildId) {
|
||||
r1 = [];
|
||||
} else {
|
||||
type = value[0].type;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
if (type === env2_10.FALLBACK_RENDERED) {
|
||||
r1 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value[0], type);
|
||||
object2['type'] = env2_10.FALLBACK_RENDERED;
|
||||
r1 = [object2];
|
||||
}
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function handleStateChange_108706(a0) { // fn#108706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14560:2768, offset: 0x0232aaa2, size: 83 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__.__proto__;
|
||||
const resolveChannelScreensBinding = resolveChannelScreens;
|
||||
const state = a0.data.state;
|
||||
const getChatLayout = (require(4010) /* metro dependency 4010: useChatLayout */).getChatLayout;
|
||||
value = resolveChannelScreensBinding(state, Reflect.apply(getChatLayout, value, []));
|
||||
env1_3(value, a0.data.state);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/* Metro module 14958; source: modules/main_tabs_v2/native/panels/useMainTabsChannelScreenStyles.tsx; dependencies: [31, 27, 4501, 697, 4017, 2] */
|
||||
function _fun113133(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:6, offset: 0x023ea4e5, size: 230 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
||||
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object3, SHADOW_LOW, undefined);
|
||||
const env0_3 = Reflect.apply(createStyles, createStylesModule, [{elevation: object3}]);
|
||||
object = {code: 'function useMainTabsChannelScreenStylesTsx1(){const{freezeValue,isDragging,translateX,maxWidth,elevationStyle,isCompletelyCovered}=this.__closure;var _freezeValue,_isCompletelyCovered;(_freezeValue=freezeValue)===null||_freezeValue===void 0||_freezeValue.get();const showBorder=isDragging.get()||translateX.get()!==0&&translateX.get()!==maxWidth;return{transform:[{translateX:translateX.get()}],shadowOpacity:showBorder?elevationStyle.shadowOpacity:0,elevation:showBorder?elevationStyle.elevation:0,opacity:(_isCompletelyCovered=isCompletelyCovered)!==null&&_isCompletelyCovered!==void 0&&_isCompletelyCovered.get()?0:1};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/useMainTabsChannelScreenStyles.tsx');
|
||||
exports.useMainTabsChannelScreenStyles = useMainTabsChannelScreenStyles;
|
||||
}
|
||||
|
||||
function useMainTabsChannelScreenStyles(a0, a1, a2, a3, a4) { // fn#113134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:989, offset: 0x023ea5cb, size: 212 bytes, params: 6, frame: 22
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const env0_3 = a3;
|
||||
const env0_4 = a4;
|
||||
const styles = useStyles();
|
||||
const elevation = styles.elevation;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = useMainTabsChannelScreenStylesC;
|
||||
closure.__closure = {freezeValue: a4, isDragging: a0, translateX: a1, maxWidth: a2, elevationStyle: elevation,
|
||||
isCompletelyCovered: a3};
|
||||
closure.__workletHash = 16765484569296;
|
||||
closure.__initData = env0_4;
|
||||
return env0_2.useMemo(_fun113136, [styles, Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure])]);
|
||||
}
|
||||
|
||||
function useMainTabsChannelScreenStylesC() { // fn#113135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:1097, owner: useMainTabsChannelScreenStyles.c, offset: 0x023ea69f, size: 206 bytes, params: 1, frame: 14
|
||||
if (env0_4 != null) {
|
||||
env0_4.get();
|
||||
}
|
||||
const r5 = env0_0.get() || require.get() !== 0 && require.get() !== importDefault;
|
||||
const object = {};
|
||||
object.translateX = require.get();
|
||||
const value7 = 0;
|
||||
return {transform: [object], shadowOpacity: r5 ? elevation.shadowOpacity : value7,
|
||||
elevation: r5 ? elevation.elevation : value7, opacity: importAll != null && importAll.get() ? value7 : 1};
|
||||
}
|
||||
|
||||
function _fun113136() { // fn#113136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15155:1466, offset: 0x023ea76d, size: 31 bytes, params: 1, frame: 3
|
||||
return [styles.elevation, env0_7];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,931 @@
|
||||
/* Metro module 14364; source: modules/main_tabs_v2/native/panels/useMainTabsPanelsGesture.tsx; dependencies: [31, 11324, 477, 14365, 11325, 1585, 1478, 4017, 4504, 4507, 4577, 14366, 5321, 2] */
|
||||
function _fun108709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:6, offset: 0x0232ab64, size: 362 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(11324) /* metro dependency 11324: LaunchPadConstants */).LaunchPadTypes;
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
const panelsConfigModule = require(14365) /* metro dependency 14365: PanelsConfig */;
|
||||
const env0_6 = value ? panelsConfigModule.ANDROID_PANELS_ANIMATION_CONFIG : panelsConfigModule.DEFAULT_PANELS_ANIMATION_CONFIG;
|
||||
object = {code: "function useMainTabsPanelsGestureTsx1(width){const{isDragging,translateX,IS_ANDROID,withTiming,timingInstant}=this.__closure;if(isDragging.get())return;if(translateX.get()===0)return;translateX.set(IS_ANDROID?withTiming(width,timingInstant,'animate-always'):width);}"};
|
||||
object = {code: "function useMainTabsPanelsGestureTsx2(show,isFling,velocity,force){const{translateX,width,onVisibilityChange,runOnJS,onPreMovement,panelsConfig,isTimingConfig,withTiming,withSpring}=this.__closure;if(!force&&translateX.get()!==0&&translateX.get()!==width){return false;}const targetTranslationX=show?0:width;if(translateX.get()===targetTranslationX){if(onVisibilityChange!=null){runOnJS(onVisibilityChange)(show);}return false;}if(onPreMovement!=null){runOnJS(onPreMovement)(show);}const animationConfig=show?isFling?panelsConfig.swipeSidePanelOpen:panelsConfig.nonSwipeSidePanelOpen:isFling?panelsConfig.swipeSidePanelClose:panelsConfig.nonSwipeSidePanelClose;function handleAnimationFinish(finished){'worklet';if(!finished)return;if(onVisibilityChange!=null){runOnJS(onVisibilityChange)(show);}}translateX.set(isTimingConfig(animationConfig)?withTiming(targetTranslationX,animationConfig,'respect-motion-settings',handleAnimationFinish):withSpring(targetTranslationX,{...animationConfig,velocity:velocity},'respect-motion-settings',handleAnimationFinish));return true;}"};
|
||||
object = {code: 'function handleAnimationFinish_useMainTabsPanelsGestureTsx3(finished){const{onVisibilityChange,runOnJS,show}=this.__closure;if(!finished)return;if(onVisibilityChange!=null){runOnJS(onVisibilityChange)(show);}}'};
|
||||
object = {code: 'function useMainTabsPanelsGestureTsx4(){const{disallowGesture}=this.__closure;return disallowGesture.get();}'};
|
||||
object = {code: 'function useMainTabsPanelsGestureTsx5(currentDisallow,previousDisallow){const{didJustAllowGesture}=this.__closure;if(currentDisallow===previousDisallow)return;if(currentDisallow)return;didJustAllowGesture.set(true);}'};
|
||||
object = {code: 'function useMainTabsPanelsGestureTsx6(e){const{isDragging,disallowGesture,didJustAllowGesture,runOnJS,setIsDraggingRef,panelsConfig,movePanel,translateX,width}=this.__closure;try{if(!isDragging.get()||disallowGesture.get()||didJustAllowGesture.get()){return;}}finally{isDragging.set(false);didJustAllowGesture.set(false);runOnJS(setIsDraggingRef)(false);}if(Math.abs(e.velocityX)>panelsConfig.minFlingVelocityX){movePanel(e.velocityX<0,true,e.velocityX,true);}else{movePanel(translateX.get()<width/2,false,e.velocityX,true);}}'};
|
||||
object = {code: 'function useMainTabsPanelsGestureTsx7(e){const{disallowGesture,translateX,width,didJustAllowGesture}=this.__closure;if(disallowGesture.get()){const currentTranslateX=translateX.get();if(currentTranslateX===0||currentTranslateX===width){return;}translateX.set(0);return;}translateX.set(Math.max(0,Math.min(width,translateX.get()+e.changeX)));didJustAllowGesture.set(false);}'};
|
||||
object = {code: 'function useMainTabsPanelsGestureTsx8(){const{isDragging,runOnJS,setIsDraggingRef,onDragStart}=this.__closure;isDragging.set(true);runOnJS(setIsDraggingRef)(true);if(onDragStart!=null){runOnJS(onDragStart)();}}'};
|
||||
object = {code: 'function useMainTabsPanelsGestureTsx9(event,manager){const{State,startPosition,GESTURE_MIN_DISTANCE,disallowGesture,translateX,cancelOnSwipeRightFromStart,width,launchPadType,LaunchPadTypes,windowWidth,LAUNCHPAD_GESTURE_INSET}=this.__closure;if(event.state!==State.BEGAN)return;const touch=event.allTouches[0];if(touch==null)return;const xDiff=touch.x-startPosition.get().x;const xDiffAbs=Math.abs(xDiff);if(xDiffAbs<=GESTURE_MIN_DISTANCE)return;if(disallowGesture.get()){return;}const yDiffAbs=Math.abs(touch.y-startPosition.get().y);if(xDiffAbs<=yDiffAbs||xDiffAbs*xDiffAbs+yDiffAbs*yDiffAbs<GESTURE_MIN_DISTANCE*GESTURE_MIN_DISTANCE){return;}if(xDiff<=0){if(translateX.get()===0){manager.fail();return;}}else{if(cancelOnSwipeRightFromStart===true&&translateX.get()>=width){manager.fail();return;}}const isGestureBasedLaunchPad=launchPadType===LaunchPadTypes.GESTURE_EDGE||launchPadType===LaunchPadTypes.GESTURE_FULL;if(isGestureBasedLaunchPad&&xDiff<0){const launchpadGestureEdge=windowWidth-LAUNCHPAD_GESTURE_INSET;if(launchPadType===LaunchPadTypes.GESTURE_FULL&&startPosition.get().x<launchpadGestureEdge||launchPadType===LaunchPadTypes.GESTURE_EDGE&&startPosition.get().x>=launchpadGestureEdge){manager.fail();return;}}manager.activate();}'};
|
||||
object = {code: 'function useMainTabsPanelsGestureTsx10(event,manager){const{startPosition}=this.__closure;const touch=event.allTouches[0];if(touch==null)return;startPosition.set({x:touch.x,y:touch.y});manager.begin();}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/panels/useMainTabsPanelsGesture.tsx');
|
||||
exports.default = useMainTabsPanelsGesture;
|
||||
}
|
||||
|
||||
function useMainTabsPanelsGesture({canDrag, onVisibilityChange, onDragStart, onPreMovement, startShown, openWidth, cancelOnSwipeRightFromStart}) { // fn#108710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:4894, offset: 0x0232acce, size: 936 bytes, params: 2, frame: 36
|
||||
var object2;
|
||||
const env0_3 = onPreMovement;
|
||||
const value2 = (importDefault(11325) /* metro dependency 11325: useLaunchPadType */)();
|
||||
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const env0_6 = value3;
|
||||
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const r2 = openWidth ?? width;
|
||||
const env0_8 = r2;
|
||||
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(startShown ? 0 : r2);
|
||||
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const env0_10 = value6;
|
||||
const binding = env0_3;
|
||||
const value7 = binding.useRef(false);
|
||||
const env0_11 = value7;
|
||||
let useCallback = binding.useCallback;
|
||||
const value8 = Reflect.apply(useCallback, binding, [_fun108711, [value7]]);
|
||||
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
binding.useEffect(_fun108712, [value6, value5, r2]);
|
||||
useCallback = binding.useCallback;
|
||||
let closure = useMainTabsPanelsGestureR;
|
||||
object2 = {translateX: value5, width: r2, onVisibilityChange: onVisibilityChange};
|
||||
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.onPreMovement = onPreMovement;
|
||||
object2.panelsConfig = env0_6;
|
||||
object2.isTimingConfig = (require(14365) /* metro dependency 14365: PanelsConfig */).isTimingConfig;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 4205680413964;
|
||||
closure.__initData = env0_8;
|
||||
const value10 = Reflect.apply(useCallback, binding, [closure, [onVisibilityChange, onPreMovement, value5, r2]]);
|
||||
const value11 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
closure = useMainTabsPanelsGestureU;
|
||||
closure.__closure = {disallowGesture: value9};
|
||||
closure.__workletHash = 15338765161171;
|
||||
closure.__initData = env0_10;
|
||||
const closure2 = useMainTabsPanelsGestureN;
|
||||
closure2.__closure = {didJustAllowGesture: value11};
|
||||
closure2.__workletHash = 17048450187141;
|
||||
closure2.__initData = env0_11;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
const value12 = reanimatedRexportModule.useSharedValue({'x': 0, 'y': 0});
|
||||
let value = binding.useContext(importDefault(14366) /* metro dependency 14366: LaunchPadGestureRefContext */);
|
||||
let useMemo = binding.useMemo;
|
||||
value = Reflect.apply(useMemo, binding, [_fun108719, [value3, value5, r2, width, value6, value10, onDragStart,
|
||||
canDrag, value12, value2, cancelOnSwipeRightFromStart, value9, value8, value, value11]]);
|
||||
useMemo = binding.useMemo;
|
||||
return {gesture: value, panelGestureContext: Reflect.apply(useMemo, binding, [_fun108725, [value, value9, value5]]),
|
||||
isDragging: value6, translateX: value5, movePanel: value10, maxWidth: r2, isDraggingRef: value7};
|
||||
}
|
||||
|
||||
function _fun108711(a0) { // fn#108711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:5200, offset: 0x0232b076, size: 20 bytes, params: 2, frame: 2
|
||||
env0_11.current = a0;
|
||||
}
|
||||
|
||||
function _fun108712() { // fn#108712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:5265, offset: 0x0232b08a, size: 164 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const runOnUI = reanimatedRexportModule.runOnUI;
|
||||
const closure = e_108713;
|
||||
const object2 = {};
|
||||
object2.isDragging = env0_10;
|
||||
object2.translateX = env0_9;
|
||||
object2.IS_ANDROID = env1_5;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.timingInstant = (require(4507) /* metro dependency 4507: timingPresets */).timingInstant;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 16976202846494;
|
||||
closure.__initData = env1_7;
|
||||
Reflect.apply(runOnUI, reanimatedRexportModule, [closure])(env0_8);
|
||||
}
|
||||
|
||||
function useMainTabsPanelsGestureR(a0, a1, a2, a3) { // fn#108714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:5614, owner: useMainTabsPanelsGesture.R, offset: 0x0232b1b0, size: 441 bytes, params: 5, frame: 26
|
||||
var environment;
|
||||
var r10;
|
||||
var r5;
|
||||
var r1;
|
||||
var value;
|
||||
var binding;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var value5;
|
||||
var value6;
|
||||
var set;
|
||||
var withSpring;
|
||||
var object2;
|
||||
var value7;
|
||||
var moduleValue2;
|
||||
const env0_0 = a0;
|
||||
if (a3) {
|
||||
value = 0;
|
||||
r10 = a0 ? value : env0_8;
|
||||
binding = env0_9;
|
||||
if (binding.get() === r10) {
|
||||
if (onVisibilityChange != null) {
|
||||
value7 = environment.__proto__;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue2.runOnJS(onVisibilityChange)(a0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (onPreMovement != null) {
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS(onPreMovement)(a0);
|
||||
}
|
||||
value5 = environment.__proto__;
|
||||
binding = env1_6;
|
||||
r5 = a0 ? a1 ? binding.swipeSidePanelOpen : binding.nonSwipeSidePanelOpen : a1 ? binding.swipeSidePanelClose : binding.nonSwipeSidePanelClose;
|
||||
value6 = _fun108715();
|
||||
binding = env0_9;
|
||||
set = binding.set;
|
||||
value = require(14365) /* metro dependency 14365: PanelsConfig */;
|
||||
value = value.isTimingConfig(r5);
|
||||
if (value) {
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
value = value.withTiming(r10, r5, 'respect-motion-settings', value6);
|
||||
r1 = value;
|
||||
} else {
|
||||
value = require(4577) /* metro dependency 4577: spring */;
|
||||
withSpring = value.withSpring;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, r5, undefined);
|
||||
object2['velocity'] = a2;
|
||||
value = Reflect.apply(withSpring, value, [r10, object2, 'respect-motion-settings', value6]);
|
||||
r1 = value;
|
||||
}
|
||||
Reflect.apply(set, binding, [r1]);
|
||||
return true;
|
||||
}
|
||||
if (env0_9.get() === 0) {
|
||||
value = 0;
|
||||
r10 = a0 ? value : env0_8;
|
||||
binding = env0_9;
|
||||
if (binding.get() === r10) {
|
||||
if (onVisibilityChange != null) {
|
||||
value7 = environment.__proto__;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue2.runOnJS(onVisibilityChange)(a0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (onPreMovement != null) {
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS(onPreMovement)(a0);
|
||||
}
|
||||
value5 = environment.__proto__;
|
||||
binding = env1_6;
|
||||
r5 = a0 ? a1 ? binding.swipeSidePanelOpen : binding.nonSwipeSidePanelOpen : a1 ? binding.swipeSidePanelClose : binding.nonSwipeSidePanelClose;
|
||||
value6 = _fun108715();
|
||||
binding = env0_9;
|
||||
set = binding.set;
|
||||
value = require(14365) /* metro dependency 14365: PanelsConfig */;
|
||||
value = value.isTimingConfig(r5);
|
||||
if (value) {
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
value = value.withTiming(r10, r5, 'respect-motion-settings', value6);
|
||||
r1 = value;
|
||||
} else {
|
||||
value = require(4577) /* metro dependency 4577: spring */;
|
||||
withSpring = value.withSpring;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, r5, undefined);
|
||||
object2['velocity'] = a2;
|
||||
value = Reflect.apply(withSpring, value, [r10, object2, 'respect-motion-settings', value6]);
|
||||
r1 = value;
|
||||
}
|
||||
Reflect.apply(set, binding, [r1]);
|
||||
return true;
|
||||
}
|
||||
if (env0_9.get() === env0_8) {
|
||||
value = 0;
|
||||
r10 = a0 ? value : env0_8;
|
||||
binding = env0_9;
|
||||
if (binding.get() === r10) {
|
||||
if (onVisibilityChange != null) {
|
||||
value7 = environment.__proto__;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue2.runOnJS(onVisibilityChange)(a0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (onPreMovement != null) {
|
||||
value4 = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS(onPreMovement)(a0);
|
||||
}
|
||||
value5 = environment.__proto__;
|
||||
binding = env1_6;
|
||||
r5 = a0 ? a1 ? binding.swipeSidePanelOpen : binding.nonSwipeSidePanelOpen : a1 ? binding.swipeSidePanelClose : binding.nonSwipeSidePanelClose;
|
||||
value6 = _fun108715();
|
||||
binding = env0_9;
|
||||
set = binding.set;
|
||||
value = require(14365) /* metro dependency 14365: PanelsConfig */;
|
||||
value = value.isTimingConfig(r5);
|
||||
if (value) {
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
value = value.withTiming(r10, r5, 'respect-motion-settings', value6);
|
||||
r1 = value;
|
||||
} else {
|
||||
value = require(4577) /* metro dependency 4577: spring */;
|
||||
withSpring = value.withSpring;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, r5, undefined);
|
||||
object2['velocity'] = a2;
|
||||
value = Reflect.apply(withSpring, value, [r10, object2, 'respect-motion-settings', value6]);
|
||||
r1 = value;
|
||||
}
|
||||
Reflect.apply(set, binding, [r1]);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function useMainTabsPanelsGestureN(a0, a1) { // fn#108718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:6753, owner: useMainTabsPanelsGesture.N, offset: 0x0232b420, size: 36 bytes, params: 3, frame: 11
|
||||
if (a0 !== a1) {
|
||||
if (!a0) {
|
||||
env0_15.set(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108719() { // fn#108719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:6952, offset: 0x0232b444, size: 724 bytes, params: 1, frame: 20
|
||||
var object2;
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value2 = Gesture.Pan();
|
||||
const value5 = value2.enabled(canDrag).requireExternalGestureToFail(env0_17);
|
||||
const manualActivation = value5.manualActivation;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
const value6 = Reflect.apply(manualActivation, value5, [platformUtilsModule.isAndroid()]);
|
||||
const hitSlop = value6.hitSlop;
|
||||
const binding = env0_6;
|
||||
const value7 = Reflect.apply(hitSlop, value6, [{top: -binding.top, left: -binding.left, bottom: -binding.bottom,
|
||||
right: -binding.right}]);
|
||||
const onTouchesDown = value7.onTouchesDown;
|
||||
let closure = u_108720;
|
||||
closure.__closure = {startPosition: env0_16};
|
||||
closure.__workletHash = 718728838752;
|
||||
closure.__initData = env1_16;
|
||||
const value8 = Reflect.apply(onTouchesDown, value7, [closure]);
|
||||
const onTouchesMove = value8.onTouchesMove;
|
||||
closure = o_108721;
|
||||
const State = (require(5321) /* metro dependency 5321 */).State;
|
||||
closure.__closure = {State: State, startPosition: env0_16, GESTURE_MIN_DISTANCE: 12, disallowGesture: env0_13,
|
||||
translateX: env0_9, cancelOnSwipeRightFromStart: cancelOnSwipeRightFromStart, width: env0_8,
|
||||
launchPadType: env0_5, LaunchPadTypes: LaunchPadTypes, windowWidth: width, LAUNCHPAD_GESTURE_INSET: 48};
|
||||
closure.__workletHash = 13108412336922;
|
||||
closure.__initData = env1_15;
|
||||
const value9 = Reflect.apply(onTouchesMove, value8, [closure]);
|
||||
const onStart = value9.onStart;
|
||||
closure = l_108722;
|
||||
object2 = {isDragging: env0_10};
|
||||
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.runOnJS = runOnJS;
|
||||
object2.setIsDraggingRef = env0_12;
|
||||
object2.onDragStart = onDragStart;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 8659650895938;
|
||||
closure.__initData = env1_14;
|
||||
const value10 = Reflect.apply(onStart, value9, [closure]);
|
||||
const onChange = value10.onChange;
|
||||
closure = n_108723;
|
||||
closure.__closure = {disallowGesture: env0_13, translateX: env0_9, width: env0_8, didJustAllowGesture: env0_15};
|
||||
closure.__workletHash = 13355779907583;
|
||||
closure.__initData = env1_13;
|
||||
const value11 = Reflect.apply(onChange, value10, [closure]);
|
||||
const onFinalize = value11.onFinalize;
|
||||
closure = e_108724;
|
||||
closure.__closure = {isDragging: env0_10, disallowGesture: env0_13, didJustAllowGesture: env0_15, runOnJS: runOnJS,
|
||||
setIsDraggingRef: env0_12, panelsConfig: env1_6, movePanel: env0_14, translateX: env0_9, width: env0_8};
|
||||
closure.__workletHash = 2071301756262;
|
||||
closure.__initData = env1_12;
|
||||
return Reflect.apply(onFinalize, value11, [closure]);
|
||||
}
|
||||
|
||||
function _fun108725() { // fn#108725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:9037, offset: 0x0232bbee, size: 34 bytes, params: 1, frame: 3
|
||||
return {gesture: env0_18, disallowGesture: env0_13, translateX: env0_9};
|
||||
}
|
||||
|
||||
function e_108713(a0) { // fn#108713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:5295, offset: 0x0232b12e, size: 130 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var set;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
let value = a0;
|
||||
let binding = env1_10;
|
||||
const get = binding.get;
|
||||
if (!Reflect.apply(get, binding, [])) {
|
||||
binding = env1_9;
|
||||
if (binding.get() !== 0) {
|
||||
binding = env1_9;
|
||||
set = binding.set;
|
||||
value4 = environment.__proto__.__proto__;
|
||||
if (env2_5) {
|
||||
moduleValue = require(4504) /* metro dependency 4504: timing */;
|
||||
value = moduleValue.withTiming(value,
|
||||
(require(4507) /* metro dependency 4507: timingPresets */).timingInstant,
|
||||
'animate-always');
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
Reflect.apply(set, binding, [r0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun108715() { // fn#108715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:5878, offset: 0x0232b369, size: 103 bytes, params: 1, frame: 14
|
||||
const closure = handleAnimationFinish_108716;
|
||||
const object2 = {};
|
||||
object2.onVisibilityChange = onVisibilityChange;
|
||||
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.show = env0_0;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 1018878139815;
|
||||
closure.__initData = env2_9;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function u_108720({allTouches}, a1) { // fn#108720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:7152, offset: 0x0232b718, size: 75 bytes, params: 3, frame: 14
|
||||
var value;
|
||||
const property = allTouches[0];
|
||||
if (property != null) {
|
||||
value = environment.__proto__;
|
||||
env1_16.set({x: property.x, y: property.y});
|
||||
a1.begin();
|
||||
}
|
||||
}
|
||||
|
||||
function o_108721(a0, a1) { // fn#108721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:7326, offset: 0x0232b763, size: 466 bytes, params: 3, frame: 20
|
||||
var value8;
|
||||
const state = a0.state;
|
||||
const State = (require(5321) /* metro dependency 5321 */).State;
|
||||
const BEGAN = State.BEGAN;
|
||||
if (state === BEGAN) {
|
||||
var property = a0.allTouches[0];
|
||||
if (property == null) {
|
||||
return undefined;
|
||||
}
|
||||
var x = property.x;
|
||||
var binding = env1_16;
|
||||
var get = binding.get;
|
||||
var value3 = x - Reflect.apply(get, binding, []).x;
|
||||
var Math = global.Math;
|
||||
var abs = Math.abs;
|
||||
var value4 = Reflect.apply(abs, Math, [value3]);
|
||||
if (value4 <= 12) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_13;
|
||||
get = binding.get;
|
||||
if (Reflect.apply(get, binding, [])) {
|
||||
return undefined;
|
||||
}
|
||||
Math = global.Math;
|
||||
abs = Math.abs;
|
||||
var y = property.y;
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
var value5 = Reflect.apply(abs, Math, [y - Reflect.apply(get, binding, []).y]);
|
||||
if (value4 <= value5) {
|
||||
return undefined;
|
||||
}
|
||||
if (value4 * value4 + value5 * value5 < 144) {
|
||||
return undefined;
|
||||
}
|
||||
if (value3 <= 0) {
|
||||
binding = env1_9;
|
||||
get = binding.get;
|
||||
if (Reflect.apply(get, binding, []) === 0) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding === LaunchPadTypes.GESTURE_EDGE) {
|
||||
if (value3 < 0) {
|
||||
value8 = width - 48;
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_FULL) {
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
if (binding.get().x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x < value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_FULL) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
if (value3 < 0) {
|
||||
value8 = width - 48;
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_FULL) {
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
if (binding.get().x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x < value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
if (cancelOnSwipeRightFromStart !== true) {
|
||||
binding = env1_5;
|
||||
if (binding === LaunchPadTypes.GESTURE_EDGE) {
|
||||
if (value3 < 0) {
|
||||
value8 = width - 48;
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_FULL) {
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
if (binding.get().x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x < value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_FULL) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
if (value3 < 0) {
|
||||
value8 = width - 48;
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_FULL) {
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
if (binding.get().x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x < value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_9;
|
||||
if (binding.get() >= env1_8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding === LaunchPadTypes.GESTURE_EDGE) {
|
||||
if (value3 < 0) {
|
||||
value8 = width - 48;
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_FULL) {
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
if (binding.get().x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x < value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_FULL) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
if (value3 < 0) {
|
||||
value8 = width - 48;
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_FULL) {
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
if (binding.get().x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x < value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_5;
|
||||
if (binding !== LaunchPadTypes.GESTURE_EDGE) {
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_16;
|
||||
get = binding.get;
|
||||
x = Reflect.apply(get, binding, []).x;
|
||||
if (x >= value8) {
|
||||
a1.fail();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
return undefined;
|
||||
}
|
||||
a1.activate();
|
||||
}
|
||||
}
|
||||
|
||||
function l_108722() { // fn#108722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:8060, offset: 0x0232b935, size: 110 bytes, params: 1, frame: 16
|
||||
var moduleValue2;
|
||||
env1_10.set(true);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
reanimatedRexportModule.runOnJS(env1_12)(true);
|
||||
if (onDragStart != null) {
|
||||
moduleValue2 = reanimatedRexportModule;
|
||||
moduleValue2.runOnJS(onDragStart)();
|
||||
}
|
||||
}
|
||||
|
||||
function n_108723(a0) { // fn#108723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:8280, offset: 0x0232b9a3, size: 164 bytes, params: 2, frame: 19
|
||||
var set;
|
||||
var value5;
|
||||
let binding = env1_13;
|
||||
const value2 = binding.get();
|
||||
binding = env1_9;
|
||||
if (value2) {
|
||||
value5 = binding.get();
|
||||
if (value5 === 0) {
|
||||
return undefined;
|
||||
}
|
||||
if (value5 === env1_8) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_9;
|
||||
binding.set(0);
|
||||
} else {
|
||||
set = binding.set;
|
||||
var Math = global.Math;
|
||||
var max = Math.max;
|
||||
var Math2 = global.Math;
|
||||
Reflect.apply(set, binding, [Reflect.apply(max, Math, [0, Math2.min(env1_8, env1_9.get() + a0.changeX)])]);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
function e_108724(a0) { // fn#108724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:8554, offset: 0x0232ba47, size: 423 bytes, params: 2, frame: 19
|
||||
var binding;
|
||||
var get;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var moduleValue;
|
||||
var runOnJS;
|
||||
var Math;
|
||||
var abs;
|
||||
var velocityX;
|
||||
var value8;
|
||||
var moduleValue2;
|
||||
var error;
|
||||
var value9;
|
||||
var moduleValue3;
|
||||
let value = environment.__proto__;
|
||||
try {
|
||||
binding = env1_10;
|
||||
} catch (error) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value9 = environment.__proto__.__proto__;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue3, [env1_12])(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
get = binding.get;
|
||||
} catch (error) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value9 = environment.__proto__.__proto__;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue3, [env1_12])(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
value2 = Reflect.apply(get, binding, []);
|
||||
} catch (error) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value9 = environment.__proto__.__proto__;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue3, [env1_12])(false);
|
||||
throw error;
|
||||
}
|
||||
if (value2) {
|
||||
try {
|
||||
binding = env1_13;
|
||||
} catch (error) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value9 = environment.__proto__.__proto__;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue3, [env1_12])(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
get = binding.get;
|
||||
} catch (error) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value9 = environment.__proto__.__proto__;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue3, [env1_12])(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
value3 = Reflect.apply(get, binding, []);
|
||||
} catch (error) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value9 = environment.__proto__.__proto__;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue3, [env1_12])(false);
|
||||
throw error;
|
||||
}
|
||||
if (value3) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value8 = environment.__proto__.__proto__;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue2.runOnJS(env1_12)(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env1_15;
|
||||
} catch (error) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value9 = environment.__proto__.__proto__;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue3, [env1_12])(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
get = binding.get;
|
||||
} catch (error) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value9 = environment.__proto__.__proto__;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue3, [env1_12])(false);
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
value4 = Reflect.apply(get, binding, []);
|
||||
} catch (error) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value9 = environment.__proto__.__proto__;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue3, [env1_12])(false);
|
||||
throw error;
|
||||
}
|
||||
if (value4) {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value8 = environment.__proto__.__proto__;
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue2.runOnJS(env1_12)(false);
|
||||
return undefined;
|
||||
}
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
value5 = environment.__proto__.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue, [env1_12])(false);
|
||||
Math = global.Math;
|
||||
abs = Math.abs;
|
||||
velocityX = a0.velocityX;
|
||||
if (Reflect.apply(abs, Math, [velocityX]) > env2_6.minFlingVelocityX) {
|
||||
binding = env1_14;
|
||||
velocityX = a0.velocityX;
|
||||
value = velocityX < 0;
|
||||
velocityX = a0.velocityX;
|
||||
binding(value, true, velocityX, true);
|
||||
} else {
|
||||
env1_14(env1_9.get() < env1_8 / 2, false, a0.velocityX, true);
|
||||
}
|
||||
} else {
|
||||
binding = env1_10;
|
||||
binding.set(false);
|
||||
binding = env1_15;
|
||||
binding.set(false);
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue2.runOnJS(env1_12)(false);
|
||||
}
|
||||
}
|
||||
|
||||
function handleAnimationFinish_108716(a0) { // fn#108716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14561:5915, offset: 0x0232b3d0, size: 80 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var runOnJS;
|
||||
var value2;
|
||||
var value3;
|
||||
let value = a0;
|
||||
if (value) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = onVisibilityChange != null;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
if (r0) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = value.runOnJS;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
value = Reflect.apply(runOnJS, value, [onVisibilityChange]);
|
||||
value3 = environment.__proto__;
|
||||
value(env1_0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
/* Metro module 14764; source: modules/main_tabs_v2/native/shared_components/BackIconWithBadge.tsx; dependencies: [31, 27, 5214, 33, 4501, 697, 566, 14745, 1305, 7599, 478, 5284, 5312, 4066, 2] */
|
||||
function _fun111461(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:6, offset: 0x023a3183, size: 447 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
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 */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {badgeWrapper: {'position': 'absolute', 'top': 16, 'left': 12}, backIcon: {'height': 24, 'width': 24}};
|
||||
const object4 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': null,
|
||||
'borderRadius': null, 'padding': 7};
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object4.gap = PX_4;
|
||||
const BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.button.BORDER_RADIUS;
|
||||
object4.borderRadius = BORDER_RADIUS;
|
||||
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
object4.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
object3.iconWithBadge = object4;
|
||||
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object3.downIconWithBadge = {backgroundColor: CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/BackIconWithBadge.tsx');
|
||||
exports.BACK_ICON_WITH_BADGE_HIT_SLOP = {'top': 8, 'bottom': 8, 'left': 8, 'right': 8};
|
||||
exports.SettingsLeftIconWithBadge = SettingsLeftIconWithBadge;
|
||||
exports.LeftBackIconWithBadge = LeftBackIconWithBadge;
|
||||
exports.CloseIconWithBadgeOnSide = CloseIconWithBadgeOnSide;
|
||||
}
|
||||
|
||||
function IconWithBadge({includeNotificationsCount, Icon}) { // fn#111462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:581, offset: 0x023a3342, size: 519 bytes, params: 2, frame: 28
|
||||
includeNotificationsCount = !(includeNotificationsCount === undefined) && includeNotificationsCount;
|
||||
const styles = useStyles();
|
||||
const value7 = ((require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
|
||||
function() {
|
||||
return GuildReadStateStore.getTotalMentionCount();
|
||||
}) ?? 0) + (includeNotificationsCount ? (importDefault(14745) /* metro dependency 14745: useNotificationsTabBadge */)().value : 0);
|
||||
const value9 = env0_3.useMemo(_fun111465, [value7, env0_3.useMemo(_fun111464, [value7])]);
|
||||
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
return (
|
||||
<View
|
||||
style={platformUtilsModule.isAndroid() ? {'height': 40, 'width': 40, 'paddingTop': 8,
|
||||
'marginRight': -8} : undefined}
|
||||
>
|
||||
<View style={styles.backIcon}>
|
||||
{((Component) => <Component cutouts={value9 != null ? [value9] : []}><Icon size="md" style={styles.backIcon} color="interactive-text-default" /></Component>)(importDefault(7599) /* metro dependency 7599: ClipView */)}
|
||||
{value7 > 0 ? <View style={styles.badgeWrapper}>{((Badge) => <Badge value={value7} maxValue={99} />)((require(1305) /* metro dependency 1305: native */).Badge)}</View> : null}
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function SettingsLeftIconWithBadge({navigation, includeNotificationsCount}) { // fn#111466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:1570, offset: 0x023a3665, size: 148 bytes, params: 2, frame: 17
|
||||
var object2;
|
||||
includeNotificationsCount = !(includeNotificationsCount === undefined) && includeNotificationsCount;
|
||||
const value2 = env0_3.useMemo(function() {
|
||||
return navigation.getState().index > 0;
|
||||
}, [navigation]);
|
||||
object2 = {includeNotificationsCount: includeNotificationsCount};
|
||||
if (value2) {
|
||||
object2.Icon = (require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon;
|
||||
} else {
|
||||
object2.Icon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
}
|
||||
return <IconWithBadge {...object2} />;
|
||||
}
|
||||
|
||||
function LeftBackIconWithBadge({includeNotificationsCount}) { // fn#111468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:1869, offset: 0x023a3717, size: 73 bytes, params: 2, frame: 16
|
||||
includeNotificationsCount = !(includeNotificationsCount === undefined) && includeNotificationsCount;
|
||||
const ArrowLargeLeftIcon = (require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon;
|
||||
return <IconWithBadge includeNotificationsCount={includeNotificationsCount} Icon={ArrowLargeLeftIcon} />;
|
||||
}
|
||||
|
||||
function CloseIconWithBadgeOnSide() { // fn#111469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:2049, offset: 0x023a3760, size: 270 bytes, params: 1, frame: 21
|
||||
const styles = useStyles();
|
||||
const totalMentionCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
|
||||
function() {
|
||||
return GuildReadStateStore.getTotalMentionCount();
|
||||
});
|
||||
const value2 = null;
|
||||
const value3 = 0;
|
||||
const value5 = (value2 != totalMentionCount ? totalMentionCount : value3) + (importDefault(14745) /* metro dependency 14745: useNotificationsTabBadge */)().value;
|
||||
const items2 = [styles.iconWithBadge];
|
||||
items2[1] = styles.downIconWithBadge;
|
||||
const XLargeIcon = (require(4066) /* metro dependency 4066: XLargeIcon */).XLargeIcon;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<XLargeIcon size="sm" color="white" />
|
||||
{value5 > value3 ? ((Badge) => <Badge value={value5} />)((require(1305) /* metro dependency 1305: native */).Badge) : value2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun111464() { // fn#111464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:775, offset: 0x023a355c, size: 84 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
const BADGE_SIZE = (require(1305) /* metro dependency 1305: native */).BADGE_SIZE;
|
||||
var value;
|
||||
if (env0_0 < 10) {
|
||||
value = environment.__proto__;
|
||||
r0 = BADGE_SIZE;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = BADGE_SIZE + 8;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun111465() { // fn#111465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14961:843, offset: 0x023a35b0, size: 181 bytes, params: 1, frame: 17
|
||||
var value2;
|
||||
var BADGE_PADDING;
|
||||
var object2;
|
||||
const BADGE_SIZE = (require(1305) /* metro dependency 1305: native */).BADGE_SIZE;
|
||||
if (env0_0 !== 0) {
|
||||
value2 = environment.__proto__;
|
||||
BADGE_PADDING = (require(1305) /* metro dependency 1305: native */).BADGE_PADDING;
|
||||
object2 = {};
|
||||
object2.shape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape.RoundedRect;
|
||||
object2.x = 12 - BADGE_PADDING;
|
||||
object2.y = 16 - BADGE_PADDING;
|
||||
object2.width = env0_1 + 2 * BADGE_PADDING;
|
||||
object2.height = BADGE_SIZE + 2 * BADGE_PADDING;
|
||||
object2.cornerRadius = (BADGE_SIZE + 2 * BADGE_PADDING) / 2;
|
||||
return object2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,475 @@
|
||||
/* Metro module 14939; source: modules/main_tabs_v2/native/shared_components/BadgableTabBarIcon.tsx; dependencies: [31, 27, 4502, 3969, 6876, 1878, 482, 33, 1305, 697, 4501, 1244, 9609, 7599, 1357, 7556, 6817, 3859, 14937, 632, 3995, 14940, 14743, 4017, 4577, 4581, 12771, 14943, 8696, 2] */
|
||||
function _fun112992(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:6, offset: 0x023e4d23, size: 435 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const selfPresenceStore = importDefault(6876) /* metro dependency 6876: SelfPresenceStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_9 = (require(482) /* metro dependency 482: Constants */).StatusTypes;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const NORMAL = AvatarSizes.NORMAL;
|
||||
const env0_12 = AVATAR_SIZE_MAP[NORMAL];
|
||||
const env0_13 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun112994);
|
||||
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun112995);
|
||||
object = {code: 'function BadgableTabBarIconTsx1(){const{scaleDownAnimation,rotationAnimation,wobbleAnimationX,wobbleAnimationY}=this.__closure;return{transform:[{scale:scaleDownAnimation.get()},{rotate:rotationAnimation.get()+"deg"},{scaleX:wobbleAnimationX.get()},{scaleY:wobbleAnimationY.get()}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/BadgableTabBarIcon.tsx');
|
||||
exports.BadgableTabBarIcon = BadgableTabBarIcon;
|
||||
exports.YouIcon = YouIcon;
|
||||
}
|
||||
|
||||
function BadgeContent({value, countA11yLabel, unread, lowPriority, unreadA11yLabel}) { // fn#112993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:907, offset: 0x023e4ed6, size: 313 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var object2;
|
||||
var Badge;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
if (value > 0) {
|
||||
Badge = (require(1305) /* metro dependency 1305: native */).Badge;
|
||||
var badgeProps = {style: lowPriority && styles.lowPriorityBadge, value: value, accessible: false};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
badgeProps.accessibilityLabel = intl.formatToPlainString(countA11yLabel ?? (require(1244) /* metro dependency 1244: indexNative */).t.XNn2u2,
|
||||
|
||||
{count: value});
|
||||
value = <View style={{margin: 3}}><Badge {...badgeProps} /></View>;
|
||||
r0 = value;
|
||||
} else if (unread) {
|
||||
object2 = {accessibilityLabel: unreadA11yLabel};
|
||||
value = importDefault(9609) /* metro dependency 9609: Badge */;
|
||||
value = <View {...object2}>{((Component) => <Component size={12} style={styles.unread} />)(value)}</View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun112994() { // fn#112994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:317, offset: 0x023e500f, size: 215 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
object2.container = {position: 'relative'};
|
||||
object2.content = {position: 'absolute'};
|
||||
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
|
||||
object2.lowPriorityBadge = {backgroundColor: PRIMARY_400};
|
||||
const object3 = {};
|
||||
let TAB_BAR_UNREAD_BADGE_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TAB_BAR_UNREAD_BADGE_SIZE;
|
||||
object3.height = TAB_BAR_UNREAD_BADGE_SIZE;
|
||||
TAB_BAR_UNREAD_BADGE_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TAB_BAR_UNREAD_BADGE_SIZE;
|
||||
object3.width = TAB_BAR_UNREAD_BADGE_SIZE;
|
||||
const BADGE_SIZE = (require(1305) /* metro dependency 1305: native */).BADGE_SIZE;
|
||||
object3.borderRadius = BADGE_SIZE / 2;
|
||||
object2.unread = object3;
|
||||
const binding = env0_12;
|
||||
object2.avatarTablet = {width: binding, height: binding};
|
||||
object2.avatarCutoutWrapper = {padding: PX_4};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun112995(a0) { // fn#112995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:704, offset: 0x023e50e6, size: 164 bytes, params: 2, frame: 18
|
||||
const object2 = {};
|
||||
const binding = env0_12;
|
||||
const value2 = -(a0 - binding) / 2;
|
||||
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.containerTablet = {left: value2 + PX_24};
|
||||
const object4 = {'width': null, 'left': null, 'height': null, 'justifyContent': 'center', 'position': 'absolute',
|
||||
'bottom': 0, 'top': 0};
|
||||
const value = a0 - binding;
|
||||
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object4.width = value - PX_24;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.left = binding + PX_16;
|
||||
object4.height = binding;
|
||||
object2.usernameTablet = object4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function BadgableTabBarIcon(a0) { // fn#112996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:1722, offset: 0x023e518a, size: 737 bytes, params: 2, frame: 32
|
||||
var r6;
|
||||
var r0;
|
||||
var object3;
|
||||
var intl;
|
||||
var ClipView;
|
||||
const badgeA11yLabel = a0.badgeA11yLabel;
|
||||
const color = a0.color;
|
||||
const icon = a0.icon;
|
||||
const iconAnimated = a0.iconAnimated;
|
||||
a0.focused;
|
||||
const navigation = a0.navigation;
|
||||
const useBadgeCount = a0.useBadgeCount;
|
||||
const value = undefined;
|
||||
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('BadgableTabBarIcon');
|
||||
const styles = useStyles();
|
||||
const value4 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
|
||||
const ICON_SIZE = (require(6817) /* metro dependency 6817: IconSize */).ICON_SIZE;
|
||||
const md = ICON_SIZE.md;
|
||||
let object4 = {iconSize: md};
|
||||
const value5 = BadgableTabBarIconUseIconContentStyle(object4);
|
||||
const value6 = useBadgeCount();
|
||||
const value7 = value6.value;
|
||||
const showDot = value6.showDot;
|
||||
const lowPriority = value6.lowPriority;
|
||||
const value8 = BadgableTabBarIconUseIconBadgeCutout({iconSize: md, cutoutRadius: 11, badgeCount: value7,
|
||||
isWindowLarge: value4});
|
||||
const binding = env0_3;
|
||||
const value9 = null;
|
||||
const value10 = binding.useRef(value9);
|
||||
const r11 = value4 ? value : iconAnimated;
|
||||
let r10 = value7 > 0 || showDot;
|
||||
env0_3.useEffect(_fun113001, [navigation, r11]);
|
||||
if (r10) {
|
||||
var viewBindingProps = {style: [styles.content, value5]};
|
||||
object3 = {value: value7, countA11yLabel: badgeA11yLabel, unread: showDot, lowPriority: lowPriority};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object3.unreadA11yLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sRUdB8);
|
||||
r6 = <View {...viewBindingProps}><BadgeContent {...object3} /></View>;
|
||||
} else {
|
||||
r6 = value9;
|
||||
}
|
||||
if (value9 != r11) {
|
||||
object4 = {};
|
||||
object4.style = styles.container;
|
||||
ClipView = importDefault(7599) /* metro dependency 7599: ClipView */;
|
||||
r10 = r10 ? [value8] : [];
|
||||
object4.children = [<ClipView cutouts={r10}>{((Component) => <Component ref={value10} size={value3 ? 'refresh_sm' : 'md'} color={color} />)(r11)}</ClipView>,
|
||||
|
||||
r6];
|
||||
r0 = object4;
|
||||
} else {
|
||||
object4 = {};
|
||||
object4.style = styles.container;
|
||||
object4.children = [((Component) => <Component cutouts={r10 ? [value8] : []}>{((BaseIconImage) => <BaseIconImage source={icon} size="sm" color={color} />)((require(3859) /* metro dependency 3859: BaseIconImage */).BaseIconImage)}</Component>)(importDefault(7599) /* metro dependency 7599: ClipView */),
|
||||
|
||||
r6];
|
||||
r0 = object4;
|
||||
}
|
||||
return <View {...r0} />;
|
||||
}
|
||||
|
||||
function YouIcon({focused, tintColor, navigation}) { // fn#113003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:3112, offset: 0x023e5701, size: 2000 bytes, params: 2, frame: 48
|
||||
var view;
|
||||
var View2;
|
||||
var Avatar;
|
||||
var items5;
|
||||
let env0_3 = undefined;
|
||||
const value3 = (require(14937) /* metro dependency 14937: useTabBarStyles */).useTabletIconYouWidth();
|
||||
const value4 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('YouIcon');
|
||||
const value5 = (importDefault(7556) /* metro dependency 7556: useIsWindowLarge */)();
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
let r23 = value5 ? AvatarSizes.NORMAL : value4 ? AvatarSizes.XSMALL : AvatarSizes.TABS_22;
|
||||
const styles = useStyles();
|
||||
const styles2 = useStyles(value3);
|
||||
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
|
||||
function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const value6 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(currentUser);
|
||||
const status = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SelfPresenceStore],
|
||||
function() {
|
||||
return SelfPresenceStore.getStatus();
|
||||
});
|
||||
let r21 = status != null && status !== StatusTypes.UNKNOWN;
|
||||
const value10 = currentUser?.avatar == null;
|
||||
const guildId = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SelectedGuildStore],
|
||||
function() {
|
||||
return SelectedGuildStore.getGuildId();
|
||||
});
|
||||
let binding = env0_3;
|
||||
const value11 = binding.useRef(null);
|
||||
(require(14940) /* metro dependency 14940: useGuildTagCoachmark */).useGuildTagAvailableCoachmark(value11,
|
||||
guildId ?? null);
|
||||
(require(14940) /* metro dependency 14940: useGuildTagCoachmark */).useGuildTagUpdatedCoachmark(value11,
|
||||
currentUser ?? null);
|
||||
(importDefault(14743) /* metro dependency 14743: usePrivateProfileCoachmark */)(value11);
|
||||
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
env0_3 = useReducedMotion;
|
||||
const r31 = value5 || focused ? 1 : 0.5;
|
||||
binding = env0_3;
|
||||
const value14 = binding.useRef(null);
|
||||
const value15 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(1);
|
||||
const value16 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value17 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(1);
|
||||
const value18 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(1);
|
||||
const value22 = binding.useCallback(_fun113011, [useReducedMotion, binding.useCallback(_fun113008, [value15]),
|
||||
binding.useCallback(_fun113009, [value16]), binding.useCallback(_fun113010, [value17, value18])]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = YouIconX;
|
||||
closure.__closure = {scaleDownAnimation: value15, rotationAnimation: value16, wobbleAnimationX: value17,
|
||||
wobbleAnimationY: value18};
|
||||
closure.__workletHash = 3024112617373;
|
||||
closure.__initData = env0_16;
|
||||
const value23 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
binding.useEffect(function() {
|
||||
return navigation.addListener('tabPress', _fun113014);
|
||||
}, [navigation, value22]);
|
||||
const StatusSizes = (require(1305) /* metro dependency 1305: native */).StatusSizes;
|
||||
const REFRESH_MEDIUM_10 = StatusSizes.REFRESH_MEDIUM_10;
|
||||
const value24 = REFRESH_MEDIUM_10 / 2 + 3;
|
||||
const value25 = binding.useMemo(_fun113015, [status, r23, value24, REFRESH_MEDIUM_10]);
|
||||
const r34 = value5 ? 'lg' : 'md';
|
||||
const ICON_SIZE = (require(6817) /* metro dependency 6817: IconSize */).ICON_SIZE;
|
||||
const value28 = env0_3.useMemo(_fun113016, [ICON_SIZE[r34], value24, REFRESH_MEDIUM_10]);
|
||||
object = {opacity: r31};
|
||||
const containerTablet = value5 ? styles2.containerTablet : undefined;
|
||||
if (value10) {
|
||||
items5 = [((Component) => <Component cutouts={r21 ? [value28] : []}>{((YouTabLottie) => <YouTabLottie ref={value14} size={r34} color={tintColor} opacity={r31} />)((require(12771) /* metro dependency 12771: YouTabLottie */).YouTabLottie)}</Component>)(importDefault(7599) /* metro dependency 7599: ClipView */)];
|
||||
r21 = r21 && <View style={[styles.content, {bottom: -2, right: -2 - REFRESH_MEDIUM_10 + 4},
|
||||
object]}>{((Status) => <Status size={REFRESH_MEDIUM_10 ?? (require(1305) /* metro dependency 1305: native */).StatusSizes.MEDIUM} status={status} />)((require(1305) /* metro dependency 1305: native */).Status)}</View>;
|
||||
items5[1] = r21;
|
||||
view = <View>{items5}</View>;
|
||||
} else {
|
||||
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
var view2Props = {style: [value23]};
|
||||
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
var avatarProps = {user: currentUser, guildId: undefined, style: value5 ? styles.avatarTablet : undefined,
|
||||
size: r23, animate: false, needsOffscreenAlphaCompositing: true,
|
||||
avatarDecoration: currentUser?.avatarDecoration};
|
||||
r23 = r21 ? status : undefined;
|
||||
avatarProps.status = r23;
|
||||
r23 = value5 ? undefined : REFRESH_MEDIUM_10;
|
||||
avatarProps.statusSizeOverride = r23;
|
||||
r23 = value5 ? undefined : [{bottom: -REFRESH_MEDIUM_10 / 2, right: 1 - REFRESH_MEDIUM_10}, object];
|
||||
avatarProps.statusStyle = r23;
|
||||
r23 = value5 ? undefined : value25;
|
||||
avatarProps.cutout = r23;
|
||||
r23 = value5 ? !!value5 : undefined;
|
||||
avatarProps.autoStatusCutout = r23;
|
||||
view = <View2 {...view2Props}><Avatar {...avatarProps} /></View2>;
|
||||
}
|
||||
object = [<View style={styles.container} ref={value11}><View style={styles.avatarCutoutWrapper}>{view}</View></View>];
|
||||
const MobileTrialUserSettingsAvatarBadge = (require(14943) /* metro dependency 14943: MobileTrialUserSettingsAvatarBadge */).MobileTrialUserSettingsAvatarBadge;
|
||||
object[1] = <MobileTrialUserSettingsAvatarBadge />;
|
||||
object[2] = value5 && currentUser != null && value6 != null && <View style={styles2.usernameTablet}>{((Component) => <Component userId={currentUser.id} userName={value6} defaultColor="interactive-text-active" variant="text-md/semibold" lineClamp={1} maxFontSizeMultiplier={2} />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */)}</View>;
|
||||
return (
|
||||
<View style={containerTablet}>
|
||||
{object}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function BadgableTabBarIconUseIconContentStyle({iconSize, offset, adjustForYouTab}) { // fn#112997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:1921, owner: BadgableTabBarIcon.useIconContentStyle, offset: 0x023e546b, size: 94 bytes, params: 2, frame: 16
|
||||
var environment;
|
||||
offset = offset === undefined ? 0 : offset;
|
||||
adjustForYouTab = !(adjustForYouTab === undefined) && adjustForYouTab;
|
||||
const value = environment.__proto__;
|
||||
return env1_3.useMemo(function() {
|
||||
var r3;
|
||||
var adjustForYouTabBinding = adjustForYouTab;
|
||||
var iconSizeBinding = iconSize;
|
||||
r3 = adjustForYouTabBinding ? 0.55 * iconSizeBinding : iconSizeBinding / 3;
|
||||
adjustForYouTabBinding = adjustForYouTab;
|
||||
iconSizeBinding = iconSize;
|
||||
return {borderRadius: 8, top: r3 + offset,
|
||||
left: (adjustForYouTabBinding ? 0.65 * iconSizeBinding : 0.625 * iconSizeBinding) + offset};
|
||||
}, [iconSize, offset, adjustForYouTab]);
|
||||
}
|
||||
|
||||
function BadgableTabBarIconUseIconBadgeCutout({iconSize, offset, cutoutRadius, badgeCount, isWindowLarge}) { // fn#112999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2152, owner: BadgableTabBarIcon.useIconBadgeCutout, offset: 0x023e553a, size: 114 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
offset = offset === undefined ? 0 : offset;
|
||||
const value = environment.__proto__;
|
||||
return env1_3.useMemo(_fun113000, [iconSize, offset, cutoutRadius, badgeCount, isWindowLarge]);
|
||||
}
|
||||
|
||||
function _fun113001() { // fn#113001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2555, offset: 0x023e569e, size: 48 bytes, params: 1, frame: 13
|
||||
if (env0_2 != null) {
|
||||
return navigation.addListener('tabPress', _fun113002);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113008() { // fn#113008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:3963, offset: 0x023e5ee4, size: 129 bytes, params: 1, frame: 21
|
||||
const object2 = {mass: 0.13};
|
||||
const binding = env0_5;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withSequence = value.withSequence;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const value2 = springModule.withSpring(0.7, object2);
|
||||
const moduleValue2 = springModule;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withSequence, value, [value2, moduleValue2.withSpring(1, object2)])]);
|
||||
}
|
||||
|
||||
function _fun113009() { // fn#113009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:4090, offset: 0x023e5f65, size: 250 bytes, params: 1, frame: 28
|
||||
const binding = env0_6;
|
||||
const set = binding.set;
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = value.withDelay;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withSequence = reanimatedRexportModule.withSequence;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
|
||||
const value2 = Reflect.apply(withSpring, springModule, [-4, springStandard]);
|
||||
const value3 = springModule.withSpring(3, springStandard);
|
||||
const value4 = springModule.withSpring(-2, springStandard);
|
||||
const moduleValue5 = springModule;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [30, Reflect.apply(withSequence,
|
||||
reanimatedRexportModule, [value2, value3, value4, moduleValue5.withSpring(0, springStandard)])])]);
|
||||
}
|
||||
|
||||
function _fun113010() { // fn#113010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:4362, offset: 0x023e605f, size: 759 bytes, params: 1, frame: 38
|
||||
var value;
|
||||
let binding = env0_7;
|
||||
let set = binding.set;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let withDelay = reanimatedRexportModule.withDelay;
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
let withSequence = moduleValue2.withSequence;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const springStandard = (require(4581) /* metro dependency 4581: springPresets */).springStandard;
|
||||
const value3 = Reflect.apply(withSpring, springModule, [1.09, springStandard]);
|
||||
const value4 = springModule.withSpring(0.9, springStandard);
|
||||
const value5 = springModule.withSpring(1.04, springStandard);
|
||||
const value6 = springModule.withSpring(0.96, springStandard);
|
||||
const value7 = springModule.withSpring(1.02, springStandard);
|
||||
const value8 = springModule.withSpring(0.99, springStandard);
|
||||
const moduleValue9 = springModule;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withDelay, reanimatedRexportModule, [8, Reflect.apply(withSequence,
|
||||
moduleValue2, [value3, value4, value5, value6, value7, value8, moduleValue9.withSpring(1, springStandard)])])]);
|
||||
binding = env0_8;
|
||||
set = binding.set;
|
||||
withDelay = reanimatedRexportModule.withDelay;
|
||||
const moduleValue10 = reanimatedRexportModule;
|
||||
withSequence = moduleValue10.withSequence;
|
||||
const value10 = springModule.withSpring(0.87, springStandard);
|
||||
const value11 = springModule.withSpring(1.06, springStandard);
|
||||
const value12 = springModule.withSpring(0.95, springStandard);
|
||||
const value13 = springModule.withSpring(1.04, springStandard);
|
||||
const value14 = springModule.withSpring(0.97, springStandard);
|
||||
const value15 = springModule.withSpring(1.01, springStandard);
|
||||
const moduleValue17 = springModule;
|
||||
value = Reflect.apply(withDelay, value, [8, Reflect.apply(withSequence, moduleValue10, [value10, value11, value12,
|
||||
value13, value14, value15, moduleValue17.withSpring(1, springStandard)])]);
|
||||
Reflect.apply(set, binding, [value]);
|
||||
}
|
||||
|
||||
function _fun113011() { // fn#113011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5184, offset: 0x023e6356, size: 40 bytes, params: 1, frame: 10
|
||||
if (!useReducedMotion) {
|
||||
env0_9();
|
||||
env0_10();
|
||||
env0_11();
|
||||
}
|
||||
}
|
||||
|
||||
function YouIconX() { // fn#113012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5251, owner: YouIcon.x, offset: 0x023e637e, size: 140 bytes, params: 1, frame: 17
|
||||
const object = {};
|
||||
object.scale = env0_5.get();
|
||||
const items2 = [object];
|
||||
const object6 = {};
|
||||
object6.rotate = '' + env0_6.get() + 'deg';
|
||||
items2[1] = object6;
|
||||
const object7 = {};
|
||||
object7.scaleX = env0_7.get();
|
||||
items2[2] = object7;
|
||||
const object8 = {};
|
||||
object8.scaleY = env0_8.get();
|
||||
items2[3] = object8;
|
||||
return {transform: items2};
|
||||
}
|
||||
|
||||
function _fun113013() { // fn#113013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5500, offset: 0x023e640a, size: 34 bytes, params: 1, frame: 13
|
||||
return navigation.addListener('tabPress', _fun113014);
|
||||
}
|
||||
|
||||
function _fun113015() { // fn#113015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5660, offset: 0x023e6467, size: 178 bytes, params: 1, frame: 16
|
||||
var property;
|
||||
var object;
|
||||
const statusBinding = status;
|
||||
const UNKNOWN = StatusTypes.UNKNOWN;
|
||||
const value3 = null;
|
||||
if (value3 != (statusBinding === UNKNOWN ? value3 : status)) {
|
||||
property = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[env0_1];
|
||||
object = {};
|
||||
object.shape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape.Circle;
|
||||
object.x = property - REFRESH_MEDIUM_10 / 2 - 1;
|
||||
object.y = property - REFRESH_MEDIUM_10 - 1;
|
||||
object.size = 2 * env0_14;
|
||||
return {nativeCutouts: [object]};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun113016() { // fn#113016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5881, offset: 0x023e6519, size: 106 bytes, params: 1, frame: 13
|
||||
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
|
||||
const Circle = CutoutShape.Circle;
|
||||
return {shape: Circle, x: env0_15 - 3 - 4, y: env0_15 - REFRESH_MEDIUM_10 - 3, size: 2 * env0_14};
|
||||
}
|
||||
|
||||
function _fun113000() { // fn#113000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2267, offset: 0x023e55ac, size: 242 bytes, params: 1, frame: 14
|
||||
let r1 = badgeCount > 0 ? {'x': 0, 'y': 0, 'size': 0} : {'x': 2, 'y': 2, 'size': -4};
|
||||
const object2 = {};
|
||||
const CutoutShape = (require(7599) /* metro dependency 7599: ClipView */).CutoutShape;
|
||||
const Circle = CutoutShape.Circle;
|
||||
object2.shape = Circle;
|
||||
let isWindowLargeBinding = isWindowLarge;
|
||||
let iconSizeBinding = iconSize;
|
||||
object2.x = (isWindowLargeBinding ? 0.67 * iconSizeBinding : 0.625 * iconSizeBinding + r1.x) + offset;
|
||||
isWindowLargeBinding = isWindowLarge;
|
||||
iconSizeBinding = iconSize;
|
||||
object2.y = (isWindowLargeBinding ? 0.57 * iconSizeBinding : iconSizeBinding / 3 + r1.y) + offset;
|
||||
isWindowLargeBinding = isWindowLarge;
|
||||
let value = 2 * cutoutRadius;
|
||||
if (isWindowLargeBinding) {
|
||||
r1 = value;
|
||||
} else {
|
||||
value += r1.size;
|
||||
r1 = value;
|
||||
}
|
||||
object2.size = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun113002() { // fn#113002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:2604, offset: 0x023e56ce, size: 51 bytes, params: 1, frame: 13
|
||||
var r1;
|
||||
var r2;
|
||||
var current;
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_1 == null;
|
||||
const value3 = undefined;
|
||||
if (value2) {
|
||||
r1 = value2;
|
||||
r2 = value3;
|
||||
} else {
|
||||
current = env1_1.current;
|
||||
r1 = current == null;
|
||||
r2 = current;
|
||||
}
|
||||
if (!r1) {
|
||||
r2.play();
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun113014() { // fn#113014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15136:5530, offset: 0x023e642c, size: 59 bytes, params: 1, frame: 13
|
||||
var r2;
|
||||
var r3;
|
||||
var current;
|
||||
const value2 = env1_4 == null;
|
||||
const value3 = undefined;
|
||||
if (value2) {
|
||||
r2 = value2;
|
||||
r3 = value3;
|
||||
} else {
|
||||
current = env1_4.current;
|
||||
r2 = current == null;
|
||||
r3 = current;
|
||||
}
|
||||
if (!r2) {
|
||||
r3.play();
|
||||
}
|
||||
env1_12();
|
||||
return value3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/* Metro module 9609; source: modules/main_tabs_v2/native/shared_components/Badge.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
|
||||
function _fun75298(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9795:6, offset: 0x01da912d, size: 293 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_0 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object2.badge = {backgroundColor: BACKGROUND_BRAND};
|
||||
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
object2.badgeClassic = {backgroundColor: INTERACTIVE_TEXT_ACTIVE};
|
||||
object2.mask = {'alignItems': 'center', 'justifyContent': 'center'};
|
||||
const env0_2 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(Badge);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/Badge.tsx');
|
||||
exports.default = value;
|
||||
exports.DEFAULT_BADGE_SIZE = 12;
|
||||
exports.CHANNEL_BADGE_SIZE = 8;
|
||||
exports.DEFAULT_BADGE_MASK_SIZE = 4;
|
||||
}
|
||||
|
||||
function Badge({size, maskSize, classic, maskColor, style, badgeStyle}) { // fn#75299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9795:352, offset: 0x01da9252, size: 228 bytes, params: 2, frame: 22
|
||||
size = size === undefined ? 12 : size;
|
||||
maskSize = maskSize === undefined ? 4 : maskSize;
|
||||
classic = !(classic === undefined) && classic;
|
||||
const styles = useStyles();
|
||||
const value6 = size + 2 * maskSize;
|
||||
return (
|
||||
<View
|
||||
style={[styles.mask, maskColor != null ? {backgroundColor: maskColor, height: value6, width: value6,
|
||||
borderRadius: value6 / 2} : undefined, style]}
|
||||
>
|
||||
<View
|
||||
style={[classic ? styles.badgeClassic : styles.badge, {height: size, width: size,
|
||||
borderRadius: size / 2}, badgeStyle]}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
/* Metro module 10975; source: modules/main_tabs_v2/native/shared_components/ChannelRowPreview.tsx; dependencies: [31, 27, 3793, 33, 6697, 9759, 8841, 9786, 4056, 10976, 8850, 9616, 4584, 10978, 1357, 10919, 10981, 8518, 4573, 1244, 4048, 4501, 697, 3829, 8177, 9773, 8368, 566, 2] */
|
||||
function _fun84032(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:6, offset: 0x01f34fd7, size: 274 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const closure = ChannelRowPreview;
|
||||
const closure2 = NativeChannelRowPreview;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value2.jsx;
|
||||
const env0_7 = value2.jsxs;
|
||||
const env0_8 = value2.Fragment;
|
||||
const env0_9 = value.memo(_fun84038);
|
||||
value = value.memo(_fun84039);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/ChannelRowPreview.tsx');
|
||||
exports.ChannelRowPreview = closure;
|
||||
exports.NativeChannelRowPreview = closure2;
|
||||
exports.NativeMessageChannelRowPreview = value;
|
||||
}
|
||||
|
||||
function PreviewIcon(a0) { // fn#84033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:171, offset: 0x01f350e9, size: 561 bytes, params: 2, frame: 16
|
||||
const icon = a0.icon;
|
||||
const value = Object.create(null);
|
||||
value.icon = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
if (icon === 'image') {
|
||||
const ImageIcon = (require(6697) /* metro dependency 6697: ImageIcon */).ImageIcon;
|
||||
return <ImageIcon {...value2} />;
|
||||
}
|
||||
if (icon === 'video') {
|
||||
const VideoIcon = (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
|
||||
return <VideoIcon {...value2} />;
|
||||
}
|
||||
if (icon === 'audio') {
|
||||
const MusicIcon = (require(8841) /* metro dependency 8841: MusicIcon */).MusicIcon;
|
||||
return <MusicIcon {...value2} />;
|
||||
}
|
||||
if (icon === 'attachment') {
|
||||
const AttachmentIcon = (require(9786) /* metro dependency 9786: AttachmentIcon */).AttachmentIcon;
|
||||
return <AttachmentIcon {...value2} />;
|
||||
}
|
||||
if (icon === 'link') {
|
||||
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
|
||||
return <LinkIcon {...value2} />;
|
||||
}
|
||||
if (icon === 'sticker') {
|
||||
const StickerIcon = (require(10976) /* metro dependency 10976: StickerIcon */).StickerIcon;
|
||||
return <StickerIcon {...value2} />;
|
||||
}
|
||||
if (icon === 'call-active') {
|
||||
const PhoneCallIcon = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
|
||||
return <PhoneCallIcon {...value2} />;
|
||||
}
|
||||
if (icon === 'call-ended') {
|
||||
const PhoneHangUpIcon = (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
|
||||
return <PhoneHangUpIcon {...value2} />;
|
||||
}
|
||||
}
|
||||
|
||||
function ChannelRowPreview({message, channel, layout, lineClamp, muted, variant, color, hasReplyNudge}) { // fn#84034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:859, offset: 0x01f3531a, size: 852 bytes, params: 2, frame: 32
|
||||
var r6;
|
||||
var jsxRuntimeEnv0_8Binding;
|
||||
var items3;
|
||||
var intl;
|
||||
lineClamp = lineClamp === undefined ? 1 : lineClamp;
|
||||
const value4 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ChannelRowPreview');
|
||||
const value5 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
|
||||
const value6 = (require(10919) /* metro dependency 10919: useFormattedMessagePreview */).useFormattedMessagePreview(message,
|
||||
channel);
|
||||
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
|
||||
const useScaledTextLineHeightAndroidModule = require(8518) /* metro dependency 8518: useScaledTextLineHeightAndroid */;
|
||||
const value8 = useScaledTextLineHeightAndroidModule.scaleTextLineHeight(layoutStyles.messagePreview.text.variant,
|
||||
value5);
|
||||
if (value6 == null) {
|
||||
return null;
|
||||
}
|
||||
const authorLabel = value6.authorLabel;
|
||||
const color2 = value6.color;
|
||||
const trailingIcon = value6.trailingIcon;
|
||||
const r13 = color ?? color2;
|
||||
const type = value6.type;
|
||||
const r10 = type === 'text' ? value6.text : type === 'markup' ? ((Component) => <Component markup={value6.type === 'markup' ? value6.markup : value6.message.content} channelId={message.channel_id} guildId={channel.guild_id} muted={muted} layout={layout} color={r13} />)(env0_9) : type !== 'message' ? undefined : ((Component) => <Component markup={value6.type === 'markup' ? value6.markup : value6.message.content} channelId={message.channel_id} guildId={channel.guild_id} muted={muted} layout={layout} color={r13} />)(env0_9);
|
||||
const object = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
object.minHeight = value8;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text lineClamp={lineClamp} variant={variant ?? (value4 ? 'text-sm/normal' : layoutStyles.messagePreview.text.variant)} maxFontSizeMultiplier={1.75} color={r13} style={{'paddingBottom': 2,
|
||||
'flexShrink': 1}}>{authorLabel != null && '' + authorLabel + ': '}{r10}</Text>;
|
||||
const r7 = trailingIcon != null && <PreviewIcon icon={trailingIcon} size={layoutStyles.messagePreview.messageTypeIconSizeNew} color={r13} style={{marginLeft: 4}} />;
|
||||
if (hasReplyNudge) {
|
||||
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
items3 = [<Text variant="text-xs/semibold" color="text-muted" maxFontSizeMultiplier={1.75} style={{'paddingBottom': 2,
|
||||
|
||||
'marginHorizontal': 4}}>{'·'}</Text>];
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items3[1] = <Text variant="text-xs/semibold" color="text-brand" maxFontSizeMultiplier={1.75} style={{paddingBottom: 2}}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VaKgGF)}</Text>;
|
||||
r6 = <>{items3}</>;
|
||||
} else {
|
||||
r6 = hasReplyNudge;
|
||||
}
|
||||
return (
|
||||
<View style={object}>
|
||||
{text}
|
||||
{r7}
|
||||
{r6}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function NativeChannelRowPreview({message, lineClamp, messageSizeCacheRef, maxHeight, backgroundColor, gifAutoPlay, gradientStyles}) { // fn#84035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:2183, offset: 0x01f3566e, size: 380 bytes, params: 2, frame: 26
|
||||
gifAutoPlay = !(gifAutoPlay === undefined) && gifAutoPlay;
|
||||
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createNativeStyleProperties = createStylesModule.createNativeStyleProperties;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
const env0_2 = Reflect.apply(createNativeStyleProperties, createStylesModule,
|
||||
[{seeMoreLabelColor: TEXT_DEFAULT}])(value2);
|
||||
const RenderEmbeds = (require(3829) /* metro dependency 3829: UserSettings */).RenderEmbeds;
|
||||
const setting = RenderEmbeds.getSetting();
|
||||
const env0_3 = setting;
|
||||
const InlineEmbedMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineEmbedMedia;
|
||||
const setting2 = InlineEmbedMedia.getSetting();
|
||||
const InlineAttachmentMedia = (require(3829) /* metro dependency 3829: UserSettings */).InlineAttachmentMedia;
|
||||
return ((Component) => <Component pointerEvents="none" horizontalOffset={0} modifyRow={modifyRow} message={message} rowGenerator={env0_3.useMemo(_fun84036,
|
||||
[setting, setting2, InlineAttachmentMedia.getSetting(),
|
||||
gifAutoPlay])} messageSizeCacheRef={messageSizeCacheRef} maxHeight={maxHeight} backgroundColor={backgroundColor} gradientStyles={gradientStyles} />)(importDefault(9773) /* metro dependency 9773: ChatItem */);
|
||||
}
|
||||
|
||||
function _fun84038({markup, channelId, guildId, muted, layout, color}) { // fn#84038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:643, offset: 0x01f358f7, size: 129 bytes, params: 2, frame: 19
|
||||
let value = require(4584) /* metro dependency 4584: useFontScale */;
|
||||
value = value.useFontScale();
|
||||
const messagePreviewMarkupModule = require(10978) /* metro dependency 10978: MessagePreviewMarkup */;
|
||||
return messagePreviewMarkupModule.renderMessagePreviewMarkup({content: markup, muted: muted, guildId: guildId,
|
||||
channelId: channelId, layout: layout, color: color, fontScale: value});
|
||||
}
|
||||
|
||||
function _fun84039(a0) { // fn#84039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:3325, offset: 0x01f35978, size: 179 bytes, params: 2, frame: 21
|
||||
const env0_0 = a0;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], _fun84040,
|
||||
[a0.message.author.id]);
|
||||
const useFormattedMessagePreviewModule = require(10919) /* metro dependency 10919: useFormattedMessagePreview */;
|
||||
return useFormattedMessagePreviewModule.isMessageContentPreviewable(a0.message) ? value2 ? <ChannelRowPreview {...a0} /> : <NativeChannelRowPreview {...a0} /> : <ChannelRowPreview {...a0} />;
|
||||
}
|
||||
|
||||
function _fun84036() { // fn#84036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:2573, offset: 0x01f357ea, size: 163 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(8177) /* metro dependency 8177: RowGenerator */;
|
||||
value = new value();
|
||||
value.setOptions({renderEmbeds: env0_3, inlineEmbedMedia: env0_4, inlineAttachmentMedia: env0_5,
|
||||
renderReactions: false, animateEmoji: false, gifAutoPlay: gifAutoPlay, renderReplies: false,
|
||||
renderCodedLinks: false, renderGiftCode: false, renderActivityInviteEmbed: false, renderThreadEmbeds: false,
|
||||
renderForumPostActions: false, ignoreMentioned: true, enableSwipeActions: false, renderExecutedCommands: false,
|
||||
useAlternateEmbedColors: true});
|
||||
return value;
|
||||
}
|
||||
|
||||
function NativeChannelRowPreviewModifyRow(a0) { // fn#84037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:3038, owner: NativeChannelRowPreview.modifyRow, offset: 0x01f3588d, size: 106 bytes, params: 2, frame: 13
|
||||
const MessageContextType = (require(8368) /* metro dependency 8368: RowGeneratorTypes */).MessageContextType;
|
||||
const SEARCH = MessageContextType.SEARCH;
|
||||
a0.contextType = SEARCH;
|
||||
if (lineClamp != null) {
|
||||
a0.truncation = {'numberOfLines': null, 'expandable': false, 'seeMoreLabel': '...', numberOfLines: lineClamp,
|
||||
seeMoreLabelColor: env0_2.seeMoreLabelColor};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun84040() { // fn#84040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11161:3376, offset: 0x01f35a2b, size: 43 bytes, params: 1, frame: 11
|
||||
return RelationshipStore.isBlockedOrIgnored(env0_0.message.author.id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,267 @@
|
||||
/* Metro module 10275; source: modules/main_tabs_v2/native/shared_components/GroupAvatar.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 6235, 1357, 4002, 6619, 632, 4017, 4504, 4577, 4573, 5475, 2] */
|
||||
function _fun79722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:6, offset: 0x01e5f545, size: 645 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(31) /* metro dependency 31 */).createElement;
|
||||
const env0_9 = {'damping': 30, 'stiffness': 400};
|
||||
const env0_10 = {'damping': 30, 'stiffness': 400};
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun79730);
|
||||
const items2 = [[{'translateY': 0, 'translateX': 0, 'scale': 1}, {'translateY': 0, 'translateX': 0, 'scale': 0},
|
||||
{'translateY': 0, 'translateX': 0, 'scale': 0}, {'translateY': 0, 'translateX': 0, 'scale': 0}]];
|
||||
items2[1] = [{'translateY': -14, 'translateX': -14, 'scale': 0.75}, {'translateY': 12, 'translateX': 12,
|
||||
'scale': 0.875}, {'translateY': 0, 'translateX': 0, 'scale': 0}, {'translateY': 0, 'translateX': 0, 'scale': 0}];
|
||||
items2[2] = [{'translateY': -4, 'translateX': 16, 'scale': 0.75}, {'translateY': 14, 'translateX': -14,
|
||||
'scale': 0.875}, {'translateY': -18, 'translateX': -12, 'scale': 0.625}, {'translateY': 0, 'translateX': 0,
|
||||
'scale': 0}];
|
||||
items2[3] = [{'translateY': -14, 'translateX': -14, 'scale': 0.875}, {'translateY': 14, 'translateX': 14,
|
||||
'scale': 0.875}, {'translateY': -18, 'translateX': 18, 'scale': 0.625}, {'translateY': 18, 'translateX': -18,
|
||||
'scale': 0.625}];
|
||||
object = {code: 'function GroupAvatarTsx1(){const{withTiming,opacityAnimation,useReducedMotion,translateXAnimation,withSpring,SPRING_OPTIONS_POSITION,translateYAnimation,scaleAnimation,SPRING_OPTIONS_SCALE}=this.__closure;return{opacity:withTiming(opacityAnimation.get()),transform:[{translateX:useReducedMotion?translateXAnimation.get():withSpring(translateXAnimation.get(),SPRING_OPTIONS_POSITION)},{translateY:useReducedMotion?translateYAnimation.get():withSpring(translateYAnimation.get(),SPRING_OPTIONS_POSITION)},{scale:useReducedMotion?scaleAnimation.get():withSpring(scaleAnimation.get(),SPRING_OPTIONS_SCALE)}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/GroupAvatar.tsx');
|
||||
exports.default = GroupAvatar;
|
||||
}
|
||||
|
||||
function AnimatedContainer({scale, translateX, shadow, translateY, animateOnMount, children}) { // fn#79723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:3379, offset: 0x01e5f7ca, size: 616 bytes, params: 2, frame: 28
|
||||
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GroupAvatar'));
|
||||
const useReducedMotion = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const env0_3 = useReducedMotion;
|
||||
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? 0 : 1);
|
||||
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? 0 : translateY);
|
||||
const value9 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? 0 : translateX);
|
||||
const value11 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(animateOnMount ? scale / 2 : scale);
|
||||
env0_3.useEffect(_fun79725, [value6, value11, value8, value9, scale, translateY, translateX]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = AnimatedContainerT;
|
||||
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
|
||||
opacityAnimation: value6, useReducedMotion: useReducedMotion, translateXAnimation: value9,
|
||||
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, SPRING_OPTIONS_POSITION: env0_10,
|
||||
translateYAnimation: value8, scaleAnimation: value11, SPRING_OPTIONS_SCALE: env0_9};
|
||||
closure.__workletHash = 8800301056148;
|
||||
closure.__initData = env0_13;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
shadow = shadow ? styles.shadow : undefined;
|
||||
return (
|
||||
<View style={[styles.avatarContainer, value12, shadow]}>
|
||||
{children}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GroupMemberCount({count}) { // fn#79727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4402, offset: 0x01e5fbb6, size: 176 bytes, params: 2, frame: 21
|
||||
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GroupAvatar'));
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.avatarWrapper}>
|
||||
<View style={styles.overflowCount}>
|
||||
<Text variant="text-sm/semibold">
|
||||
{'+'}
|
||||
{count}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GroupMemberAvatar({guildId, user}) { // fn#79728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4621, offset: 0x01e5fc66, size: 189 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var value;
|
||||
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GroupAvatar'));
|
||||
const value3 = env0_3.useMemo(_fun79729, [guildId, user]);
|
||||
if (value3 == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.avatarWrapper};
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = <View {...viewBindingProps}>{((Component) => <Component style={styles.avatar} source={value3} />)(value)}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun79730(a0) { // fn#79730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:269, offset: 0x01e5fd51, size: 972 bytes, params: 2, frame: 18
|
||||
const object2 = {};
|
||||
object2.groupContainer = {position: 'relative'};
|
||||
const object4 = {};
|
||||
const value2 = 5;
|
||||
const value3 = undefined;
|
||||
object4.borderRadius = importDefault(dependencyMap[value2]).radii.sm;
|
||||
let BLACK = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BLACK;
|
||||
object4.shadowColor = BLACK;
|
||||
object4.shadowOffset = a0 ? value3 : {'width': 0, 'height': 0};
|
||||
object4.shadowRadius = a0 ? value3 : value2;
|
||||
object4.shadowOpacity = a0 ? value3 : 0.2;
|
||||
object4.elevation = a0 ? value3 : 10;
|
||||
object2.shadowContainer = object4;
|
||||
let CARD_BACKGROUND_DEFAULT = a0 ? value3 : importDefault(dependencyMap[value2]).colors.CARD_BACKGROUND_DEFAULT;
|
||||
object2.shadowContainerBackground = {backgroundColor: CARD_BACKGROUND_DEFAULT};
|
||||
let WHITE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.WHITE;
|
||||
object2.shadowContainerBackgroundLight = {backgroundColor: WHITE, opacity: 0.4};
|
||||
WHITE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.WHITE;
|
||||
object2.shadowContainerBackgroundDark = {backgroundColor: WHITE, opacity: 0.15};
|
||||
const object5 = {};
|
||||
let GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
|
||||
object5.width = GROUP_AVATAR_SIZE;
|
||||
GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
|
||||
object5.height = GROUP_AVATAR_SIZE;
|
||||
object5.overflow = 'hidden';
|
||||
object5.borderRadius = importDefault(dependencyMap[value2]).radii.sm;
|
||||
CARD_BACKGROUND_DEFAULT = a0 ? value3 : importDefault(dependencyMap[value2]).colors.CARD_BACKGROUND_DEFAULT;
|
||||
object5.backgroundColor = CARD_BACKGROUND_DEFAULT;
|
||||
object2.gradientContainer = object5;
|
||||
const BACKGROUND_MOD_SUBTLE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BACKGROUND_MOD_SUBTLE;
|
||||
object2.gradientDimOverlay = {'position': 'absolute', 'left': 0, 'top': 0, 'right': 0, 'bottom': 0,
|
||||
backgroundColor: BACKGROUND_MOD_SUBTLE};
|
||||
const object6 = {};
|
||||
GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
|
||||
object6.width = GROUP_AVATAR_SIZE;
|
||||
GROUP_AVATAR_SIZE = importDefault(dependencyMap[value2]).modules.mobile.GROUP_AVATAR_SIZE;
|
||||
object6.height = GROUP_AVATAR_SIZE;
|
||||
object6.borderRadius = importDefault(dependencyMap[value2]).radii.sm;
|
||||
object6.borderWidth = a0 ? value3 : 1;
|
||||
const BORDER_SUBTLE = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BORDER_SUBTLE;
|
||||
object6.borderColor = BORDER_SUBTLE;
|
||||
object6.position = 'absolute';
|
||||
object2.gradientImageBorder = object6;
|
||||
object2.avatarContainer = {'position': 'absolute', 'top': '50%', 'left': '50%', 'width': 38, 'height': 38,
|
||||
'marginTop': -19, 'marginLeft': -19};
|
||||
const object7 = {};
|
||||
BLACK = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BLACK;
|
||||
object7.shadowColor = BLACK;
|
||||
const DARK_03_LIGHT_02 = a0 ? value3 : (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_03_LIGHT_02;
|
||||
object7.shadowOpacity = DARK_03_LIGHT_02;
|
||||
object7.shadowOffset = a0 ? value3 : {'width': 0, 'height': 3};
|
||||
object7.shadowRadius = a0 ? value3 : 2;
|
||||
object2.shadow = object7;
|
||||
object2.avatar = {'width': 32, 'height': 32, 'position': 'absolute', 'borderRadius': 16};
|
||||
const BACKGROUND_BASE_LOWER = a0 ? value3 : importDefault(dependencyMap[value2]).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.avatarWrapper = {'position': 'absolute', 'width': 38, 'height': 38, 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'borderRadius': 19, backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
const colors = importDefault(dependencyMap[value2]).colors;
|
||||
object2.overflowCount = {'width': 38, 'height': 38, 'position': 'absolute', 'borderRadius': 19,
|
||||
'backgroundColor': null, 'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center',
|
||||
backgroundColor: a0 ? colors.BACKGROUND_MOD_SUBTLE : colors.BACKGROUND_BASE_LOWER};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function GroupAvatar({users, guildId}) { // fn#79731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4973, offset: 0x01e6011d, size: 571 bytes, params: 2, frame: 27
|
||||
let env0_3 = undefined;
|
||||
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('GroupAvatar'));
|
||||
const {theme, primaryColor} = (require(4002) /* metro dependency 4002: shared */).useThemeContext();
|
||||
const sharedModule = require(4002) /* metro dependency 4002: shared */;
|
||||
let r10 = sharedModule.isThemeLight(theme) ? styles.shadowContainerBackgroundLight : styles.shadowContainerBackgroundDark;
|
||||
let binding = env0_3;
|
||||
const value4 = binding.useRef(false);
|
||||
env0_3.useEffect(_fun79732, []);
|
||||
let Math = global.Math;
|
||||
const min = Math.min;
|
||||
binding = env0_12;
|
||||
const value7 = Reflect.apply(min, Math, [binding.length - 1, users.length - 1]);
|
||||
Math = global.Math;
|
||||
const property = binding[Math.max(0, value7)];
|
||||
env0_3 = users.length > 4;
|
||||
const env0_5 = users.length - 3 >= 10 ? 1 : 2;
|
||||
const env0_6 = (importDefault(6619) /* metro dependency 6619: useRefValue */)(value4);
|
||||
const value10 = property.map(_fun79733);
|
||||
r10 = primaryColor == null ? styles.shadowContainerBackground : r10;
|
||||
return (
|
||||
<View style={styles.groupContainer}>
|
||||
<View style={[styles.shadowContainer, r10]}>
|
||||
<View style={styles.gradientContainer}>
|
||||
{primaryColor == null && <View style={styles.gradientDimOverlay} />}
|
||||
</View>
|
||||
<View style={styles.gradientImageBorder} />
|
||||
</View>
|
||||
{value10}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun79725() { // fn#79725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:3723, offset: 0x01e5fa32, size: 78 bytes, params: 1, frame: 12
|
||||
let binding = env0_4;
|
||||
binding.set(1);
|
||||
binding = env0_7;
|
||||
binding.set(scale);
|
||||
binding = env0_5;
|
||||
binding.set(translateY);
|
||||
binding = env0_6;
|
||||
binding.set(translateX);
|
||||
}
|
||||
|
||||
function AnimatedContainerT() { // fn#79726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:3821, owner: AnimatedContainer.T, offset: 0x01e5fa80, size: 310 bytes, params: 1, frame: 19
|
||||
var r1;
|
||||
var r5;
|
||||
var r3;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
const object2 = {};
|
||||
const value = environment.__proto__;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const binding = env0_4;
|
||||
const get = binding.get;
|
||||
object2.opacity = Reflect.apply(withTiming, timingModule, [Reflect.apply(get, binding, [])]);
|
||||
if (useReducedMotion) {
|
||||
r1 = env0_6.get();
|
||||
} else {
|
||||
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
|
||||
r1 = moduleValue2.withSpring(env0_6.get(), env1_10);
|
||||
}
|
||||
const items2 = [{translateX: r1}];
|
||||
if (useReducedMotion) {
|
||||
r5 = env0_5.get();
|
||||
} else {
|
||||
moduleValue3 = require(4577) /* metro dependency 4577: spring */;
|
||||
r5 = moduleValue3.withSpring(env0_5.get(), env1_10);
|
||||
}
|
||||
items2[1] = {translateY: r5};
|
||||
if (useReducedMotion) {
|
||||
r3 = env0_7.get();
|
||||
} else {
|
||||
moduleValue4 = require(4577) /* metro dependency 4577: spring */;
|
||||
r3 = moduleValue4.withSpring(env0_7.get(), env1_9);
|
||||
}
|
||||
items2[2] = {scale: r3};
|
||||
object2.transform = items2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun79729() { // fn#79729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:4717, offset: 0x01e5fd23, size: 46 bytes, params: 1, frame: 16
|
||||
return user?.getAvatarSource(guildId, false, 32);
|
||||
}
|
||||
|
||||
function _fun79733(a0, a1) { // fn#79733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10461:5366, offset: 0x01e6036b, size: 185 bytes, params: 3, frame: 21
|
||||
var r0;
|
||||
var value3;
|
||||
var createElementBinding;
|
||||
var object2;
|
||||
const property = users[a1];
|
||||
const value2 = null;
|
||||
if (value2 == property) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
createElementBinding = createElement;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
object2['key'] = property.id;
|
||||
object2['animateOnMount'] = env0_6;
|
||||
object2['shadow'] = users.length >= 2;
|
||||
r0 = createElementBinding(AnimatedContainer, object2,
|
||||
env0_3 && a1 === env0_5 ? <GroupMemberCount count={env0_4} /> : <GroupMemberAvatar guildId={guildId} user={property} />);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,345 @@
|
||||
/* Metro module 9603; source: modules/main_tabs_v2/native/shared_components/HeaderShared.tsx; dependencies: [31, 27, 9604, 33, 4501, 697, 4573, 3860, 5283, 5287, 9605, 477, 9610, 1585, 1485, 7701, 5465, 628, 9612, 9709, 5278, 1305, 2] */
|
||||
function _fun75258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:6, offset: 0x01da7a2e, size: 699 bytes, params: 8, frame: 28
|
||||
var object2;
|
||||
let env0_0 = require;
|
||||
const closure = GenericHeaderTitle;
|
||||
const closure2 = renderGenericTitle;
|
||||
const closure3 = HeaderTextButton_75262;
|
||||
const closure4 = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return _fun75265;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.View;
|
||||
value2.Platform;
|
||||
const env0_5 = (require(9604) /* metro dependency 9604: MainTabsV2Constants */).MIN_HEADER_HEIGHT;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value3.jsx;
|
||||
const env0_7 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.headerRightContainer = {marginRight: 16};
|
||||
const object4 = {'backgroundColor': null, 'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 0,
|
||||
'flexGrow': 1, 'borderColor': null, 'borderBottomWidth': 1};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object4.borderColor = BORDER_SUBTLE;
|
||||
object2.headerWrapper = object4;
|
||||
object2.actionButtonPressable = {'padding': 8, 'zIndex': 100, 'width': 40, 'height': 40, 'borderRadius': 20};
|
||||
const MOBILE_HEADER_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_HEADER_ICON_DEFAULT;
|
||||
object2.actionButtonIcon = {tintColor: MOBILE_HEADER_ICON_DEFAULT};
|
||||
object2.headerText = {'textAlign': 'center', 'fontSize': 18};
|
||||
object2.subtitleText = {textAlign: 'center'};
|
||||
const object5 = {};
|
||||
const TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet;
|
||||
copyDataProperties(object5, TextStyleSheet['text-md/semibold'], undefined);
|
||||
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
|
||||
object5['color'] = TEXT_BRAND;
|
||||
object2.backButtonLabel = object5;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.titleContainer = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_8};
|
||||
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(HeaderInner, _fun75270);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/HeaderShared.tsx');
|
||||
exports.GenericHeaderTitle = closure;
|
||||
exports.renderGenericTitle = closure2;
|
||||
exports.HeaderTextButton = closure3;
|
||||
exports.getRenderHeaderTextButton = function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
return _fun75272;
|
||||
};
|
||||
exports.renderHeader = renderHeader;
|
||||
exports.getRenderBackImage = closure4;
|
||||
exports.getRenderModalBackImage = getRenderModalBackImage;
|
||||
exports.getRenderModalCloseImage = getRenderModalCloseImage;
|
||||
exports.Header = value;
|
||||
exports.getDefaultStackHeaderProps = function(a0) {
|
||||
var object = {};
|
||||
object.headerLeft = getRenderBackImage(a0);
|
||||
object.headerTitle = renderGenericTitle;
|
||||
object.headerBackVisible = false;
|
||||
return object;
|
||||
};
|
||||
exports.getDefaultChannelStackHeaderProps = getDefaultChannelStackHeaderProps;
|
||||
exports.HeaderIconButton = HeaderIconButton;
|
||||
}
|
||||
|
||||
function GenericHeaderTitle(a0) { // fn#75259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:860, offset: 0x01da7ce9, size: 433 bytes, params: 2, frame: 26
|
||||
var r0;
|
||||
var items2;
|
||||
const env0_0 = a0.title;
|
||||
const subtitle = a0.subtitle;
|
||||
const color = a0.color;
|
||||
let value = undefined;
|
||||
if (color !== value) {
|
||||
}
|
||||
let subtitleColor = a0.subtitleColor;
|
||||
subtitleColor = subtitleColor === value ? 'text-default' : subtitleColor;
|
||||
const env0_2 = a0.icon;
|
||||
let maxFontSizeMultiplier = a0.maxFontSizeMultiplier;
|
||||
maxFontSizeMultiplier = maxFontSizeMultiplier === value ? 2 : maxFontSizeMultiplier;
|
||||
const object2 = {'title': 0, 'subtitle': 0, 'color': 0, 'subtitleColor': 0, 'icon': 0, 'maxFontSizeMultiplier': 0};
|
||||
const value5 = null;
|
||||
silentSetPrototypeOf(object2, value5, undefined);
|
||||
const value6 = copyDataProperties({}, a0, object2, undefined);
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const HEADER_TITLE_TEXT_STYLE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.HEADER_TITLE_TEXT_STYLE;
|
||||
const value8 = Reflect.apply(useToken, useTokenModule, [HEADER_TITLE_TEXT_STYLE]);
|
||||
const variant = value6.variant;
|
||||
const env0_4 = value5 == variant ? value8 : variant;
|
||||
const styles = useStyles();
|
||||
const value9 = (importDefault(5283) /* metro dependency 5283: HeaderDebugOverlayNative */)('os-drawn');
|
||||
const closure = renderTitleContainer;
|
||||
if (value5 != subtitle) {
|
||||
items2 = [closure(value5 != subtitle ? value : 'header')];
|
||||
items2[1] = value5 != subtitle ? ((Text) => <Text lineClamp={1} variant="text-xs/medium" color={subtitleColor} style={styles.subtitleText} maxFontSizeMultiplier={maxFontSizeMultiplier}>{subtitle}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : value5;
|
||||
items2[2] = value9;
|
||||
value = <View accessible accessibilityRole="header">{items2}</View>;
|
||||
r0 = value;
|
||||
} else if (value5 == value9) {
|
||||
r0 = closure('header');
|
||||
} else {
|
||||
items2 = [closure(value5 != subtitle ? value : 'header')];
|
||||
items2[1] = value5 != subtitle ? ((Text) => <Text lineClamp={1} variant="text-xs/medium" color={subtitleColor} style={styles.subtitleText} maxFontSizeMultiplier={maxFontSizeMultiplier}>{subtitle}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : value5;
|
||||
items2[2] = value9;
|
||||
value = <View accessible accessibilityRole="header">{items2}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function renderGenericTitle({children}) { // fn#75261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:1775, offset: 0x01da7fb3, size: 35 bytes, params: 2, frame: 13
|
||||
return <GenericHeaderTitle title={children} />;
|
||||
}
|
||||
|
||||
function HeaderTextButton_75262(a0) { // fn#75262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:1856, offset: 0x01da7fd6, size: 159 bytes, params: 2, frame: 18
|
||||
const labelStyle = a0.labelStyle;
|
||||
const value = Object.create(null);
|
||||
value.labelStyle = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const styles = useStyles();
|
||||
const HeaderBackButton = (require(5287) /* metro dependency 5287 */).HeaderBackButton;
|
||||
return (
|
||||
<HeaderBackButton
|
||||
labelStyle={[styles.backButtonLabel, labelStyle]}
|
||||
labelVisible
|
||||
backImage={function() {
|
||||
return null;
|
||||
}}
|
||||
truncatedLabel={value2.label}
|
||||
accessibilityLabel={value2.label}
|
||||
{...value2}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function getRenderBackImage(a0) { // fn#75264, offset: 0x01da8075, size: 18 bytes, params: 2, frame: 2
|
||||
const env0_0 = a0;
|
||||
return _fun75265;
|
||||
}
|
||||
|
||||
function HeaderChannelActions({route, screenIndex}) { // fn#75266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3063, offset: 0x01da80ce, size: 95 bytes, params: 2, frame: 17
|
||||
const styles = useStyles();
|
||||
return ((Component) => <Component containerStyle={styles.headerRightContainer} {...route.params} {...{['screenIndex']: screenIndex}} />)(importDefault(9612) /* metro dependency 9612: ChannelActions */);
|
||||
}
|
||||
|
||||
function HeaderInner({navigation, options, back, route, shouldHandleSafeArea}) { // fn#75267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2189, offset: 0x01da812d, size: 518 bytes, params: 2, frame: 28
|
||||
var r6;
|
||||
var object;
|
||||
shouldHandleSafeArea = shouldHandleSafeArea === undefined || shouldHandleSafeArea;
|
||||
const styles = useStyles();
|
||||
const r15 = shouldHandleSafeArea ? (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top : 0;
|
||||
const headerLeft = options.headerLeft;
|
||||
const r7 = headerLeft !== undefined ? headerLeft : getRenderBackImage(navigation);
|
||||
const headerTitle = options.headerTitle;
|
||||
const headerRight = options.headerRight;
|
||||
const moduleValue = require(1485) /* metro dependency 1485 */;
|
||||
const useTheme = moduleValue.useTheme;
|
||||
const text = Reflect.apply(useTheme, moduleValue, []).colors.text;
|
||||
const value7 = env0_3.useMemo(_fun75268, [r15,
|
||||
(require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop(), styles]);
|
||||
const value8 = typeof headerTitle === 'string';
|
||||
const r10 = value8 ? renderGenericTitle : headerTitle ?? renderGenericTitle;
|
||||
const value9 = (importDefault(5283) /* metro dependency 5283: HeaderDebugOverlayNative */)('custom-drawn');
|
||||
env0_3.useLayoutEffect(_fun75269);
|
||||
const object3 = {};
|
||||
object3.label = back?.title;
|
||||
object3.canGoBack = navigation.isFocused() && navigation.canGoBack();
|
||||
object3.tintColor = text;
|
||||
const items2 = [r7(object3)];
|
||||
items2[1] = r10({children: value8 ? headerTitle : options.title ?? route.name, tintColor: text});
|
||||
if (headerRight == null) {
|
||||
r6 = undefined;
|
||||
} else {
|
||||
object = {};
|
||||
object.canGoBack = navigation.isFocused() && navigation.canGoBack();
|
||||
object.tintColor = text;
|
||||
r6 = headerRight(object);
|
||||
}
|
||||
items2[2] = r6;
|
||||
items2[3] = value9;
|
||||
return (
|
||||
<View style={value7}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun75270(a0, a1) { // fn#75270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2958, offset: 0x01da83a3, size: 108 bytes, params: 3, frame: 17
|
||||
var r2;
|
||||
var r0;
|
||||
var back;
|
||||
var value;
|
||||
const value2 = (importDefault(628) /* metro dependency 628: shallowEqual */)(a0, a1, ['back']);
|
||||
if (value2) {
|
||||
value = importDefault(628) /* metro dependency 628: shallowEqual */;
|
||||
back = a0.back;
|
||||
r2 = back ?? ({});
|
||||
back = a1.back;
|
||||
value = value(r2, back ?? ({}));
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = !!value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getRenderHeaderTextButton(a0, a1) { // fn#75271, offset: 0x01da840f, size: 25 bytes, params: 3, frame: 2
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return _fun75272;
|
||||
}
|
||||
|
||||
function getRenderModalBackImage(a0) { // fn#75274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3694, offset: 0x01da847d, size: 58 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
const value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isAndroid()) {
|
||||
return undefined;
|
||||
}
|
||||
return _fun75275;
|
||||
}
|
||||
|
||||
function getRenderModalCloseImage(a0) { // fn#75276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3821, offset: 0x01da84ea, size: 58 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
const value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isAndroid()) {
|
||||
return undefined;
|
||||
}
|
||||
return _fun75277;
|
||||
}
|
||||
|
||||
function getDefaultChannelStackHeaderProps(a0, a1) { // fn#75279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4144, offset: 0x01da8589, size: 139 bytes, params: 3, frame: 15
|
||||
var r0;
|
||||
const env0_0 = a1;
|
||||
if (a1.name === 'channel') {
|
||||
r0 = a0.getState().routes.findIndex(function({key}) {
|
||||
return key === require.key;
|
||||
}) ?? 'none';
|
||||
}
|
||||
const object2 = {};
|
||||
object2.headerLeft = getRenderBackImage(a0);
|
||||
object2.headerTitle = headerTitle_75281;
|
||||
object2.headerRight = headerRight_75282;
|
||||
object2.headerBackVisible = false;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function HeaderIconButton({accessibilityLabel, onPress, source, resizeMode, color}) { // fn#75283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4543, offset: 0x01da8693, size: 170 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
style={styles.actionButtonPressable}
|
||||
onPress={onPress}
|
||||
>
|
||||
<Icon
|
||||
color={color ?? styles.actionButtonIcon.tintColor}
|
||||
source={source}
|
||||
resizeMode={resizeMode}
|
||||
/>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function renderTitleContainer(a0) { // fn#75260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:1166, owner: GenericHeaderTitle.renderTitleContainer, offset: 0x01da7e9a, size: 281 bytes, params: 2, frame: 20
|
||||
if (icon != null) {
|
||||
return (
|
||||
<View
|
||||
accessible
|
||||
accessibilityRole={a0}
|
||||
style={styles.titleContainer}
|
||||
>
|
||||
{icon}
|
||||
{((Text) => <Text lineClamp={1} variant={env0_4} color={color} style={styles.headerText} maxFontSizeMultiplier={maxFontSizeMultiplier}>{title}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
|
||||
</View>
|
||||
);
|
||||
} else {
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
accessibilityRole={a0}
|
||||
lineClamp={1}
|
||||
variant={env0_4}
|
||||
color={color}
|
||||
style={styles.headerText}
|
||||
maxFontSizeMultiplier={maxFontSizeMultiplier}
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun75265(a0) { // fn#75265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2112, offset: 0x01da8087, size: 71 bytes, params: 2, frame: 15
|
||||
const PressableNavigatorBackIcon = (require(9605) /* metro dependency 9605: PressableNavigatorBackIcon */).PressableNavigatorBackIcon;
|
||||
return <PressableNavigatorBackIcon {...a0} {...{['navigation']: env0_0}} />;
|
||||
}
|
||||
|
||||
function _fun75268() { // fn#75268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2475, offset: 0x01da8333, size: 66 bytes, params: 1, frame: 4
|
||||
return [styles.headerWrapper, env0_2, {paddingTop: env0_1, minHeight: env0_1 + MIN_HEADER_HEIGHT}];
|
||||
}
|
||||
|
||||
function _fun75269() { // fn#75269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:2641, offset: 0x01da8375, size: 46 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (require(5465) /* metro dependency 5465: DeprecatedLayoutAnimation */).DeprecatedLayoutAnimation({duration: 0});
|
||||
}
|
||||
|
||||
function _fun75272(a0) { // fn#75272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3502, offset: 0x01da8428, size: 52 bytes, params: 2, frame: 14
|
||||
return (
|
||||
<HeaderTextButton_75262
|
||||
label={env0_0}
|
||||
onPress={require}
|
||||
{...a0}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun75275() { // fn#75275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3762, offset: 0x01da84b7, size: 51 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component navigation={env0_0} />)(importDefault(9610) /* metro dependency 9610: PressableNavigatorModalIcon */);
|
||||
}
|
||||
|
||||
function _fun75277() { // fn#75277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:3890, offset: 0x01da8524, size: 59 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component navigation={env0_0} type="close" />)(importDefault(9610) /* metro dependency 9610: PressableNavigatorModalIcon */);
|
||||
}
|
||||
|
||||
function getDefaultChannelStackHeaderPropsHeaderTitle() { // fn#75281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4341, owner: getDefaultChannelStackHeaderProps.headerTitle, offset: 0x01da8614, size: 83 bytes, params: 1, frame: 16
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component {...require.params} {...{['isNavigationScreen']: true}} {...{['screenIndex']: env0_1}} />)(importDefault(9709) /* metro dependency 9709: ChannelHeader */);
|
||||
}
|
||||
|
||||
function getDefaultChannelStackHeaderPropsHeaderRight() { // fn#75282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9789:4434, owner: getDefaultChannelStackHeaderProps.headerRight, offset: 0x01da8667, size: 44 bytes, params: 1, frame: 14
|
||||
return <HeaderChannelActions route={require} screenIndex={env0_1} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
/* Metro module 9697; source: modules/main_tabs_v2/native/shared_components/IconActionButton.tsx; dependencies: [31, 33, 4501, 697, 477, 1305, 1357, 4584, 5278, 4573, 9609, 2] */
|
||||
function _fun76217(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:6, offset: 0x01dc6ae6, size: 231 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = ButtonBadge;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value2.jsx;
|
||||
const env0_5 = value2.jsxs;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun76219);
|
||||
const env0_7 = value.memo(_fun76220);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/IconActionButton.tsx');
|
||||
exports.default = IconActionButton;
|
||||
exports.ICON_ACTION_BUTTON_SIZE = 32;
|
||||
exports.ButtonBadge = closure;
|
||||
}
|
||||
|
||||
function ButtonBadge({badgePosition}) { // fn#76218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1339, offset: 0x01dc6bcd, size: 140 bytes, params: 2, frame: 18
|
||||
badgePosition = badgePosition === undefined ? 'left' : badgePosition;
|
||||
const styles = useStyles(false);
|
||||
const Badge = importDefault(9609) /* metro dependency 9609: Badge */;
|
||||
const CHANNEL_BADGE_SIZE = (require(9609) /* metro dependency 9609: Badge */).CHANNEL_BADGE_SIZE;
|
||||
return (
|
||||
<Badge
|
||||
size={CHANNEL_BADGE_SIZE}
|
||||
maskSize={2}
|
||||
style={badgePosition === 'left' ? styles.unreadBadgeLeft : styles.unreadBadgeRight}
|
||||
maskColor={styles.unreadBadgeMask.color}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun76219(a0) { // fn#76219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:157, offset: 0x01dc6c59, size: 441 bytes, params: 2, frame: 19
|
||||
const object2 = {actionIconButtonPressable: {'minWidth': 32, 'minHeight': 32, 'borderRadius': 20, 'marginEnd': 12,
|
||||
'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'flexDirection': 'row',
|
||||
'paddingRight': 12, 'paddingLeft': 12}};
|
||||
const value = 0;
|
||||
object2.withoutMargin = {marginEnd: value};
|
||||
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = a0 ? undefined : (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
|
||||
object2.filled = {backgroundColor: REDESIGN_BUTTON_TERTIARY_BACKGROUND};
|
||||
const object3 = {};
|
||||
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object3.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object3.borderWidth = 1;
|
||||
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
|
||||
object3.borderColor = INPUT_BACKGROUND_DEFAULT;
|
||||
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object3, SHADOW_LOW, INPUT_BACKGROUND_DEFAULT);
|
||||
object2.outlined = object3;
|
||||
object2.roundButton = {'maxWidth': 32, 'maxHeight': 32};
|
||||
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
object2.actionIcon = {tintColor: a0 ? colors.ICON_SUBTLE : colors.INTERACTIVE_TEXT_DEFAULT};
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object2.actionText = {marginLeft: 4, marginTop: platformUtilsModule.isAndroid() ? -2 : value};
|
||||
object2.unreadBadgeLeft = {'position': 'absolute', 'left': -2, 'top': -1};
|
||||
object2.unreadBadgeRight = {'position': 'absolute', 'right': -2, 'top': -1};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.unreadBadgeMask = {color: BACKGROUND_BASE_LOW};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.countStyle = {position: 'relative', marginLeft: PX_8};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun76220({IconComponent, source, color, isRefreshEnabled}) { // fn#76220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1061, offset: 0x01dc6e12, size: 162 bytes, params: 2, frame: 20
|
||||
const styles = useStyles(isRefreshEnabled);
|
||||
const binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
return IconComponent != null ? <IconComponent size="sm" color={isRefreshEnabled ? (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE : color} /> : Reflect.apply(useCallback,
|
||||
binding, [_fun76221, [styles, color, source]])();
|
||||
}
|
||||
|
||||
function IconActionButton({source, IconComponent, variant, color, buttonText, accessibilityLabel, style, badge, badgePosition, count, noMargin, hitSlop, disabled, onPress, onLongPress}) { // fn#76222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1662, offset: 0x01dc6f2d, size: 559 bytes, params: 2, frame: 34
|
||||
variant = variant === undefined ? 'filled' : variant;
|
||||
badgePosition = badgePosition === undefined ? 'left' : badgePosition;
|
||||
count = count === undefined ? 0 : count;
|
||||
const value6 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('IconActionButton');
|
||||
const styles = useStyles(value6);
|
||||
let r8 = buttonText != null && !((require(4584) /* metro dependency 4584: useFontScale */).useFontScale() > 1.2);
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const items2 = [styles.actionIconButtonPressable];
|
||||
items2[1] = variant === 'outlined' ? styles.outlined : styles.filled;
|
||||
items2[2] = r8 ? undefined : styles.roundButton;
|
||||
items2[3] = noMargin ? styles.withoutMargin : undefined;
|
||||
items2[4] = style;
|
||||
const env0_72 = ((Component) => <Component IconComponent={IconComponent} color={color} source={source} isRefreshEnabled={value6} />)(env0_7);
|
||||
r8 = r8 && ((Text) => <Text variant="text-sm/bold" style={styles.actionText}>{buttonText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
return (
|
||||
<PressableOpacity
|
||||
hitSlop={hitSlop}
|
||||
onPress={onPress}
|
||||
onLongPress={onLongPress}
|
||||
disabled={disabled}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
style={items2}
|
||||
>
|
||||
{env0_72}
|
||||
{r8}
|
||||
{count > 0 ? ((Badge) => <Badge style={styles.countStyle} value={count} />)((require(1305) /* metro dependency 1305: native */).Badge) : null}
|
||||
{badge && <ButtonBadge badgePosition={badgePosition} />}
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun76221() { // fn#76221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9883:1153, offset: 0x01dc6eb4, size: 121 bytes, params: 1, frame: 16
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const SMALL = Sizes.SMALL;
|
||||
return (
|
||||
<Icon
|
||||
size={SMALL}
|
||||
source={source}
|
||||
color={color ?? styles.actionIcon.tintColor}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/* Metro module 9604; source: modules/main_tabs_v2/native/shared_components/MainTabsV2Constants.tsx; dependencies: [27, 1357, 2] */
|
||||
function _fun75284(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9790:6, offset: 0x01da873d, size: 147 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const value = 2 * StyleSheet.hairlineWidth;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/MainTabsV2Constants.tsx');
|
||||
exports.MIN_HEADER_HEIGHT = 56;
|
||||
exports.HEADER_CORNER_RADIUS = 8;
|
||||
exports.getMinHeaderHeight = getMinHeaderHeight;
|
||||
exports.MIDNIGHT_BORDER_WIDTH = value;
|
||||
}
|
||||
|
||||
function getMinHeaderHeight(a0) { // fn#75285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9790:313, offset: 0x01da87d0, size: 50 bytes, params: 2, frame: 11
|
||||
let value = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
|
||||
value = value.isMobileVisualRefreshEnabled(a0);
|
||||
return value ? 64 : 56;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/* Metro module 9608; source: modules/main_tabs_v2/native/shared_components/MaskedBadge.tsx; dependencies: [31, 33, 4501, 697, 1305, 9609, 2] */
|
||||
function _fun75295(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9794:6, offset: 0x01da8efc, size: 272 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PRIMARY_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
|
||||
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{maskStyle: {position: 'relative',
|
||||
right: undefined}, unreadDot: {'width': 0, 'height': 0}, badgeStyle: {'flexGrow': 1, 'flexShrink': 0},
|
||||
unreadBadge: {'position': 'relative', 'bottom': -3}, lowPriorityBadge: {backgroundColor: PRIMARY_400}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/MaskedBadge.tsx');
|
||||
exports.default = MaskedBadge;
|
||||
}
|
||||
|
||||
function MaskedBadge({backgroundColor, unread, value, maxValue, lowPriority, size, style}) { // fn#75296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9794:478, offset: 0x01da900c, size: 274 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
var MaskedBadge;
|
||||
const styles = useStyles();
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
const items = [backgroundColor];
|
||||
if (value > 0) {
|
||||
MaskedBadge = (require(1305) /* metro dependency 1305: native */).MaskedBadge;
|
||||
value = <MaskedBadge maskStyle={[Reflect.apply(useMemo, binding, [function() {
|
||||
return {backgroundColor: backgroundColor};
|
||||
}, items]), styles.maskStyle]} dotStyle={styles.unreadDot} style={[styles.badgeStyle,
|
||||
lowPriority ? styles.lowPriorityBadge : null, style]} value={value} maxValue={maxValue} />;
|
||||
r0 = value;
|
||||
} else {
|
||||
value = null;
|
||||
if (unread) {
|
||||
value = importDefault(9609) /* metro dependency 9609: Badge */;
|
||||
value = ((Component) => <Component size={size} maskColor={backgroundColor} style={styles.unreadBadge} />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
/* Metro module 14463; source: modules/main_tabs_v2/native/shared_components/MessageRequestsButton.tsx; dependencies: [31, 27, 4621, 4622, 33, 4501, 566, 14464, 4578, 1244, 8341, 9697, 9197, 2] */
|
||||
function _fun109455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:6, offset: 0x0234c8da, size: 269 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const useMessageRequestCounts = function() {
|
||||
var object = {};
|
||||
object.requestCount = require(dependencyMap[6]).useStateFromStores([MessageRequestStore], _fun109457);
|
||||
object.spamCount = require(dependencyMap[6]).useStateFromStores([SpamMessageRequestStore], _fun109458);
|
||||
return object;
|
||||
};
|
||||
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 messageRequestStore = importDefault(4621) /* metro dependency 4621: MessageRequestStore */;
|
||||
const spamMessageRequestStore = importDefault(4622) /* metro dependency 4622: SpamMessageRequestStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({buttonContainer: {position: 'relative'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/MessageRequestsButton.tsx');
|
||||
exports.default = MessageRequestsButton;
|
||||
}
|
||||
|
||||
function useMessageRequestCounts() { // fn#109456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:232, offset: 0x0234c9e7, size: 110 bytes, params: 1, frame: 20
|
||||
const object2 = {};
|
||||
object2.requestCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageRequestStore],
|
||||
function() {
|
||||
return MessageRequestStore.getMessageRequestsCount();
|
||||
});
|
||||
object2.spamCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([SpamMessageRequestStore],
|
||||
function() {
|
||||
return SpamMessageRequestStore.getSpamChannelsCount();
|
||||
});
|
||||
return object2;
|
||||
}
|
||||
|
||||
function MessageRequestAnimation({color}) { // fn#109459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:427, offset: 0x0234ca7b, size: 146 bytes, params: 2, frame: 18
|
||||
const value2 = env0_3.useRef(null);
|
||||
env0_3.useEffect(_fun109460, [useMessageRequestCounts().requestCount]);
|
||||
const MessageRequestLottie = (require(14464) /* metro dependency 14464: generated */).MessageRequestLottie;
|
||||
return (
|
||||
<MessageRequestLottie
|
||||
ref={value2}
|
||||
color={color}
|
||||
size="sm"
|
||||
autoPlay
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function MessageRequestsButton(a0) { // fn#109461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:803, offset: 0x0234cb4a, size: 659 bytes, params: 2, frame: 29
|
||||
var r9;
|
||||
var r13;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var IconButton;
|
||||
var Button;
|
||||
var items2;
|
||||
let alternateVariant = a0.alternateVariant;
|
||||
const value = undefined;
|
||||
alternateVariant = !(alternateVariant === value) && alternateVariant;
|
||||
const value3 = Object.create(null);
|
||||
value3.alternateVariant = 0;
|
||||
const value4 = copyDataProperties({}, a0, value3, undefined);
|
||||
const styles = useStyles();
|
||||
const value6 = useMessageRequestCounts();
|
||||
const requestCount = value6.requestCount;
|
||||
if (requestCount === 0) {
|
||||
if (value6.spamCount === 0) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (alternateVariant) {
|
||||
r13 = requestCount > 0 ? requestCount.toString() : value;
|
||||
var viewBindingProps = {style: styles.buttonContainer, collapsable: false};
|
||||
if (r13 != null) {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
r9 = <Button icon={<MessageRequestAnimation />} variant="secondary" text={r13} size="sm" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ)} {...value4} />;
|
||||
} else {
|
||||
IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
r9 = <IconButton variant="secondary" size="sm" icon={<MessageRequestAnimation />} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ)} {...value4} />;
|
||||
}
|
||||
items2 = [r9];
|
||||
items2[1] = requestCount > 0 && ((ButtonBadge) => <ButtonBadge badgePosition="right" />)((require(9697) /* metro dependency 9697: IconActionButton */).ButtonBadge);
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
const IconActionButton = importDefault(9697) /* metro dependency 9697: IconActionButton */;
|
||||
return (
|
||||
<IconActionButton
|
||||
source={importDefault(9197) /* metro dependency 9197 */}
|
||||
IconComponent={MessageRequestAnimation}
|
||||
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e7GWjQ)}
|
||||
buttonText={requestCount > 0 ? requestCount.toString() : value}
|
||||
badge={requestCount > 0}
|
||||
badgePosition="right"
|
||||
{...value4}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun109460() { // fn#109460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14660:553, offset: 0x0234cb0d, size: 61 bytes, params: 1, frame: 12
|
||||
var r0;
|
||||
var r1;
|
||||
var value2;
|
||||
var current;
|
||||
if (requestCount > 0) {
|
||||
value2 = env0_0 == null;
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
r1 = undefined;
|
||||
} else {
|
||||
current = env0_0.current;
|
||||
r0 = current == null;
|
||||
r1 = current;
|
||||
}
|
||||
if (!r0) {
|
||||
r1.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/* Metro module 6983; source: modules/main_tabs_v2/native/shared_components/SearchBarNav.tsx; dependencies: [31, 27, 33, 4501, 5314, 697, 5278, 1244, 477, 5284, 4573, 6984, 2] */
|
||||
function _fun55372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7161:6, offset: 0x013a4b77, size: 405 bytes, params: 8, frame: 25
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_2 = value2.View;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value3.jsx;
|
||||
const env0_4 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {'flexDirection': 'row', 'alignItems': 'center'};
|
||||
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
||||
object4.height = NAV_BAR_HEIGHT;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object4.borderBottomWidth = StyleSheet.hairlineWidth;
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object4.borderColor = BORDER_STRONG;
|
||||
object3.container = object4;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.cancelText = {paddingLeft: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.cancelIcon = {marginRight: PX_16};
|
||||
object3.flex = {flex: 1};
|
||||
const env0_5 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
value = value.forwardRef(_fun55373);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/SearchBarNav.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun55373(a0, a1) { // fn#55373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7161:559, offset: 0x013a4d0c, size: 555 bytes, params: 3, frame: 28
|
||||
const onClose = a0.onClose;
|
||||
const value = null;
|
||||
const value2 = Object.create(value);
|
||||
value2.onClose = 0;
|
||||
const value3 = copyDataProperties({}, a0, value2, undefined);
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const object2 = {accessibilityRole: 'button'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
|
||||
object2.onPress = onClose;
|
||||
object2.hitSlop = {'top': 8, 'right': 8, 'bottom': 8, 'left': 8};
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
const pressableOpacity = <PressableOpacity {...object2}>{platformUtilsModule.isAndroid() ? ((ArrowLargeLeftIcon) => <ArrowLargeLeftIcon style={styles.cancelIcon} />)((require(5284) /* metro dependency 5284: ArrowLargeLeftIcon */).ArrowLargeLeftIcon) : ((Text) => <Text style={styles.cancelText} maxFontSizeMultiplier={2} variant="text-md/semibold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>;
|
||||
const moduleValue2 = platformUtilsModule;
|
||||
const items2 = [moduleValue2.isAndroid() ? pressableOpacity : value];
|
||||
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
|
||||
items2[1] = <View style={styles.flex}><View><SearchField size="md" isRound ref={a1} {...value3} /></View></View>;
|
||||
const moduleValue3 = platformUtilsModule;
|
||||
items2[2] = moduleValue3.isAndroid() ? value : pressableOpacity;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/* Metro module 11837; source: modules/main_tabs_v2/native/shared_components/SearchButton.tsx; dependencies: [31, 27, 33, 4501, 697, 6998, 4573, 1244, 2] */
|
||||
function _fun90737(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12023:6, offset: 0x02043901, size: 305 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).Pressable;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
|
||||
object2.searchButton = {'backgroundColor': null, 'height': 40, 'alignItems': 'center', 'flexDirection': 'row',
|
||||
'paddingHorizontal': 12, backgroundColor: INPUT_BACKGROUND_DEFAULT};
|
||||
object2.roundedCorners = {borderRadius: 20};
|
||||
const object3 = {};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.roundedCornersAlt = object3;
|
||||
object2.text = {marginLeft: 8};
|
||||
const env0_5 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/SearchButton.tsx');
|
||||
exports.SEARCH_BAR_HEIGHT = 40;
|
||||
exports.SearchButtonContent = SearchButtonContent;
|
||||
}
|
||||
|
||||
function SearchButtonContent(a0) { // fn#90738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12023:566, offset: 0x02043a32, size: 293 bytes, params: 2, frame: 23
|
||||
const panelVariant = a0.panelVariant;
|
||||
let value = Object.create(null);
|
||||
value.panelVariant = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const styles = useStyles();
|
||||
const pressableBindingProps = {...value2};
|
||||
pressableBindingProps['style'] = [styles.searchButton,
|
||||
panelVariant ? styles.roundedCornersAlt : styles.roundedCorners, value2.style];
|
||||
const MagnifyingGlassIcon = (require(6998) /* metro dependency 6998: MagnifyingGlassIcon */).MagnifyingGlassIcon;
|
||||
value = <MagnifyingGlassIcon size="xs" />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Pressable {...pressableBindingProps}>
|
||||
{value}
|
||||
<Text
|
||||
variant="text-sm/medium"
|
||||
color="text-muted"
|
||||
style={styles.text}
|
||||
maxFontSizeMultiplier={2}
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])}
|
||||
</Text>
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
/* Metro module 10253; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelAnimationConstants.tsx; dependencies: [4577, 2] */
|
||||
function _fun79625(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10439:6, offset: 0x01e5b7a5, size: 279 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {'damping': 35, 'stiffness': 275, 'mass': 1, 'overshootClamping': true, 'restSpeedThreshold': 0.001,
|
||||
'restDisplacementThreshold': 0.001};
|
||||
const closure = TYPING_ENTERING;
|
||||
const withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
closure.__closure = {withSpring: withSpring, CHANNEL_SPRING_CONFIG: object2};
|
||||
closure.__workletHash = 5885186288311;
|
||||
closure.__initData = {code: 'function ChannelAnimationConstantsTsx1(){const{withSpring,CHANNEL_SPRING_CONFIG}=this.__closure;return{initialValues:{transform:[{scale:0}],opacity:0},animations:{transform:[{scale:withSpring(1,CHANNEL_SPRING_CONFIG)}],opacity:withSpring(1,CHANNEL_SPRING_CONFIG)}};}'};
|
||||
const closure2 = TYPING_EXITING;
|
||||
closure2.__closure = {withSpring: withSpring, CHANNEL_SPRING_CONFIG: object2};
|
||||
closure2.__workletHash = 1746051409364;
|
||||
closure2.__initData = {code: 'function ChannelAnimationConstantsTsx2(){const{withSpring,CHANNEL_SPRING_CONFIG}=this.__closure;return{initialValues:{transform:[{scale:1}],opacity:1},animations:{transform:[{scale:withSpring(0,CHANNEL_SPRING_CONFIG)}],opacity:withSpring(0,CHANNEL_SPRING_CONFIG)}};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelAnimationConstants.tsx');
|
||||
exports.MESSAGE_PREVIEW_DELAY = 350;
|
||||
exports.CHANNEL_SPRING_CONFIG = object2;
|
||||
exports.TYPING_ENTERING = closure;
|
||||
exports.TYPING_EXITING = closure2;
|
||||
}
|
||||
|
||||
function TYPING_ENTERING() { // fn#79626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10439:496, offset: 0x01e5b8bc, size: 126 bytes, params: 1, frame: 20
|
||||
const object = {};
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const binding = env0_2;
|
||||
object.transform = [{scale: Reflect.apply(withSpring, springModule, [1, binding])}];
|
||||
object.opacity = springModule.withSpring(1, binding);
|
||||
return {initialValues: {transform: [{scale: 0}], opacity: 0}, animations: object};
|
||||
}
|
||||
|
||||
function TYPING_EXITING() { // fn#79627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10439:1052, offset: 0x01e5b93a, size: 126 bytes, params: 1, frame: 19
|
||||
const object = {};
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const binding = env0_2;
|
||||
object.transform = [{scale: Reflect.apply(withSpring, springModule, [0, binding])}];
|
||||
object.opacity = springModule.withSpring(0, binding);
|
||||
return {initialValues: {transform: [{scale: 1}], opacity: 1}, animations: object};
|
||||
}
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
/* Metro module 15054; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelContent.tsx; dependencies: [31, 27, 10980, 4865, 33, 4501, 477, 10981, 5107, 15055, 6705, 8129, 14538, 4573, 2] */
|
||||
function _fun113917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15251:6, offset: 0x0240b9ef, size: 442 bytes, params: 8, frame: 26
|
||||
var object4;
|
||||
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 value2 = 2;
|
||||
const SUBTITLE_OPACITY_NORMAL = require(dependencyMap[value2]).SUBTITLE_OPACITY_NORMAL;
|
||||
const env0_5 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value3.jsx;
|
||||
const env0_7 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {flex: 1};
|
||||
object5.marginTop = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() ? value2 : -1;
|
||||
object4.channelContent = object5;
|
||||
object4.channelContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
|
||||
'justifyContent': 'space-between'};
|
||||
object4.leftBox = {'flexDirection': 'column', 'alignItems': 'flex-start', 'flexShrink': 1};
|
||||
object4.rightBox = {'flexDirection': 'column', 'alignItems': 'flex-end'};
|
||||
object4.rightContentAbsolute = {'position': 'absolute', 'right': 0, 'top': 0};
|
||||
object4.channelTraits = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
|
||||
const object6 = {opacity: SUBTITLE_OPACITY_NORMAL, marginRight: 4};
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object6.marginTop = platformUtilsModule.isAndroid() ? value2 : value;
|
||||
object4.channelTraitIcon = object6;
|
||||
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelContent.tsx');
|
||||
exports.renderChannelContent = renderChannelContent;
|
||||
}
|
||||
|
||||
function ChannelContentComponent({name, subtitle, unread, resolvedUnreadSetting, locked, muted, lastMessageTimestampString, channel, connected, layout, mentionCount, mentionBadge, isSubscriptionGated, needSubscriptionToAccess}) { // fn#113918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15251:723, offset: 0x0240bba9, size: 1108 bytes, params: 2, frame: 48
|
||||
var object8;
|
||||
var items4;
|
||||
const styles = useStyles();
|
||||
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
|
||||
let r33 = channel != null && (locked || (importDefault(5107) /* metro dependency 5107: isRoleRequired */)(channel));
|
||||
let r32 = channel?.isNSFW();
|
||||
const isValidElement2 = env0_3.isValidElement(subtitle);
|
||||
const value7 = lastMessageTimestampString != null;
|
||||
let r12 = value7 && mentionBadge == null;
|
||||
const items2 = [styles.leftBox];
|
||||
items2[1] = {justifyContent: isValidElement2 ? 'space-between' : 'center'};
|
||||
const object = {'flexDirection': 'row', 'paddingRight': null, 'alignItems': 'center'};
|
||||
object.paddingRight = r12 ? 30 : 0;
|
||||
const value13 = ((Component) => <Component title={name} muted={muted} unread={unread} resolvedUnreadSetting={resolvedUnreadSetting ?? UnreadSetting.ONLY_MENTIONS} connected={connected} layout={layout} />)(importDefault(15055) /* metro dependency 15055: ChannelTitle */);
|
||||
let r23 = r33 || r32;
|
||||
if (r23) {
|
||||
var viewProps = {style: [styles.channelTraits, {maxWidth: 14 * (r33 && r32 ? 2 : 1)}]};
|
||||
r33 = r33 && ((LockIcon) => <LockIcon size="xxs" color="icon-muted" style={styles.channelTraitIcon} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon);
|
||||
items4 = [r33];
|
||||
r32 = r32 && ((WarningIcon) => <WarningIcon size="xxs" color="icon-muted" style={styles.channelTraitIcon} />)((require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon);
|
||||
items4[1] = r32;
|
||||
items4[2] = isSubscriptionGated && ((Component) => <Component locked={needSubscriptionToAccess} isInMainTabsExperiment />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
|
||||
r23 = <View {...viewProps}>{items4}</View>;
|
||||
}
|
||||
const view = <View style={items2}><View style={object}>{value13}{r23}</View>{isValidElement2 ? <View style={[{paddingRight: (mentionCount ?? 0) > 0 ? 20 : 0},
|
||||
{marginTop: layoutStyles.messagePreview.margin.marginTop}]}>{subtitle}</View> : null}</View>;
|
||||
const r11 = r12 ? styles.rightContentAbsolute : styles.rightBox;
|
||||
const items8 = [value7 && ((Text) => <Text variant="text-xs/medium" color="text-muted" style={{marginLeft: 'auto'}} maxFontSizeMultiplier={1.75}>{lastMessageTimestampString}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
items8[1] = <View style={[{'alignItems': 'center', 'paddingLeft': 4},
|
||||
value7 && ({marginTop: 5})]}>{mentionBadge}</View>;
|
||||
r12 = r12 && <View style={{flex: 1}} />;
|
||||
items8[2] = r12;
|
||||
return (
|
||||
<View style={styles.channelContent}>
|
||||
<View style={styles.channelContainer}>
|
||||
{view}
|
||||
<View style={r11}>
|
||||
{items8}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
/* Metro module 15056; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelItem.tsx; dependencies: [31, 27, 1867, 3793, 1878, 4865, 33, 9122, 1244, 4501, 697, 10981, 566, 6819, 11727, 4788, 14804, 9719, 15054, 4805, 2] */
|
||||
function _fun113923(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:6, offset: 0x0240c267, size: 307 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 env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_7 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.Fragment;
|
||||
const env0_10 = value.jsxs;
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun113926);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelItem.tsx');
|
||||
exports.getChannelAccessibilityProps = getChannelAccessibilityProps;
|
||||
exports.renderChannelItem = renderChannelItem;
|
||||
}
|
||||
|
||||
function LaunchpadChannelIcon({channel, layout}) { // fn#113924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:419, offset: 0x0240c39a, size: 329 bytes, params: 2, frame: 27
|
||||
const styles = useStyles(layout);
|
||||
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(channel.guild_id);
|
||||
});
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
const view = <View style={styles.guildBadgeIcon}>{((Component) => <Component guild={guild} size={layoutStyles.icon.guildBadgeIconSize} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</View>;
|
||||
const ChannelIcon = (require(11727) /* metro dependency 11727: AppLauncherChannelListActionSheet */).ChannelIcon;
|
||||
const r9 = (require(10981) /* metro dependency 10981: ChannelListLayout */).isLayoutCozy(layout) ? 'md' : 'sm';
|
||||
let value = require(10981) /* metro dependency 10981: ChannelListLayout */;
|
||||
value = value.isLayoutCozy(layout);
|
||||
return (
|
||||
<>
|
||||
{view}
|
||||
<ChannelIcon
|
||||
channel={channel}
|
||||
size={r9}
|
||||
wrapperSize={value ? 48 : 32}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun113926(a0) { // fn#113926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:241, offset: 0x0240c4e3, size: 108 bytes, params: 2, frame: 15
|
||||
const object = {'position': 'absolute', 'zIndex': 1, 'bottom': -4, 'right': -4, 'borderColor': null,
|
||||
'borderWidth': 2};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object.borderColor = BACKGROUND_BASE_LOW;
|
||||
let value = require(10981) /* metro dependency 10981: ChannelListLayout */;
|
||||
value = value.isLayoutCozy(a0);
|
||||
object.borderRadius = value ? 9 : 6;
|
||||
return {guildBadgeIcon: object};
|
||||
}
|
||||
|
||||
function getChannelAccessibilityProps({channel, unread, mentionCount, voiceStates, embeddedActivitiesCount}) { // fn#113927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:954, offset: 0x0240c54f, size: 211 bytes, params: 2, frame: 20
|
||||
var r1;
|
||||
var object2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const object4 = {'accessible': true, 'accessibilityRole': 'button'};
|
||||
object4.accessibilityLabel = (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel,
|
||||
unread: unread, mentionCount: mentionCount, voiceStates: voiceStates,
|
||||
embeddedActivitiesCount: embeddedActivitiesCount});
|
||||
if (channel.isGuildVoice()) {
|
||||
object2 = {};
|
||||
object2.accessibilityHint = intl.string(t['9C444m']);
|
||||
r1 = object2;
|
||||
} else if (channel.isGuildStageVoice()) {
|
||||
object2 = {};
|
||||
object2.accessibilityHint = intl.string(t['9C444m']);
|
||||
r1 = object2;
|
||||
} else {
|
||||
r1 = undefined;
|
||||
}
|
||||
copyDataProperties(object4, r1, undefined);
|
||||
return object4;
|
||||
}
|
||||
|
||||
function renderChannelItem({channel, subtitle, unreadBadge, mentionBadge, locked, unread, resolvedUnreadSetting = UnreadSetting.ONLY_MENTIONS, live, muted, latestMessageTimestamp, layout, end, connected, mentionCount, launchpad, channelName, fontScale, isSubscriptionGated, needSubscriptionToAccess, panelVariant}) { // fn#113928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15253:1354, offset: 0x0240c622, size: 770 bytes, params: 2, frame: 48
|
||||
var r30;
|
||||
var moduleValue6;
|
||||
locked = !(locked === undefined) && locked;
|
||||
unread = !(unread === undefined) && unread;
|
||||
live = !(live === undefined) && live;
|
||||
muted = !(muted === undefined) && muted;
|
||||
isSubscriptionGated = !(isSubscriptionGated === undefined) && isSubscriptionGated;
|
||||
needSubscriptionToAccess = !(needSubscriptionToAccess === undefined) && needSubscriptionToAccess;
|
||||
panelVariant = !(panelVariant === undefined) && panelVariant;
|
||||
const r25 = latestMessageTimestamp == null || muted ? null : (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(latestMessageTimestamp);
|
||||
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
|
||||
const channelWrapperModule = require(14804) /* metro dependency 14804: ChannelWrapper */;
|
||||
const renderChannelWrapper = channelWrapperModule.renderChannelWrapper;
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
const items2 = [unreadBadge];
|
||||
const object = {'position': 'relative', 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center',
|
||||
'flexShrink': 0, 'flexGrow': 0};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const channelListLayoutModule = require(10981) /* metro dependency 10981: ChannelListLayout */;
|
||||
copyDataProperties(object, channelListLayoutModule.makeSizeStyle(layoutStyles.icon.wrapper.size), undefined);
|
||||
copyDataProperties(object, layoutStyles.icon.margin, undefined);
|
||||
items2[1] = <View style={object}>{channel.isGroupDM() ? ((Component) => <Component channel={channel} size={layoutStyles.icon.avatarSize} />)(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */) : <LaunchpadChannelIcon channel={channel} layout={layout} />}</View>;
|
||||
const channelContentModule = require(15054) /* metro dependency 15054: ChannelContent */;
|
||||
const renderChannelContent = channelContentModule.renderChannelContent;
|
||||
const object2 = {layout: layout};
|
||||
if (channelName != null) {
|
||||
r30 = channelName;
|
||||
} else {
|
||||
moduleValue6 = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
r30 = moduleValue6.computeChannelName(channel, UserStore, RelationshipStore);
|
||||
}
|
||||
object2.name = r30;
|
||||
object2.subtitle = subtitle;
|
||||
object2.unread = unread;
|
||||
object2.resolvedUnreadSetting = resolvedUnreadSetting;
|
||||
object2.muted = muted;
|
||||
object2.lastMessageTimestampString = r25;
|
||||
object2.channel = channel;
|
||||
object2.locked = locked;
|
||||
object2.connected = connected;
|
||||
object2.live = live;
|
||||
object2.mentionCount = mentionCount;
|
||||
object2.mentionBadge = mentionBadge;
|
||||
object2.isSubscriptionGated = isSubscriptionGated;
|
||||
object2.needSubscriptionToAccess = needSubscriptionToAccess;
|
||||
items2[2] = Reflect.apply(renderChannelContent, channelContentModule, [object2]);
|
||||
items2[3] = end != null ? <View style={{paddingLeft: 8}}>{end}</View> : null;
|
||||
return Reflect.apply(renderChannelWrapper, channelWrapperModule, [<>{items2}</>, {channel: channel, layout: layout,
|
||||
launchpad: launchpad, fontScale: fontScale, panelVariant: panelVariant}]);
|
||||
}
|
||||
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
/* Metro module 14803; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelPressableWrapper.tsx; dependencies: [31, 27, 33, 10981, 2] */
|
||||
function _fun111736(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15000:6, offset: 0x023af619, size: 152 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(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelPressableWrapper.tsx');
|
||||
exports.renderChannelPressableWrapper = renderChannelPressableWrapper;
|
||||
}
|
||||
|
||||
function renderChannelPressableWrapper(a0, {layout, launchpad, isThread, panelVariant}) { // fn#111737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15000:287, offset: 0x023af6b1, size: 159 bytes, params: 3, frame: 18
|
||||
panelVariant = !(panelVariant === undefined) && panelVariant;
|
||||
layout = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout, launchpad).layout;
|
||||
return (
|
||||
<View
|
||||
style={[isThread ? layout.marginThread : panelVariant ? layout.marginPanels : layout.margin, {'flex': 1,
|
||||
'flexDirection': 'row', 'alignItems': 'center'}]}
|
||||
>
|
||||
{a0}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
/* Metro module 15050; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelSubtitle.tsx; dependencies: [31, 33, 10981, 4573, 14694, 10978, 2] */
|
||||
function _fun113906(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15247:6, offset: 0x0240ae4d, size: 142 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/main_tabs_v2/native/shared_components/guild_channels/ChannelSubtitle.tsx');
|
||||
exports.renderChannelSubtitle = renderChannelSubtitle;
|
||||
}
|
||||
|
||||
function ChannelSubtitle({muted, connected, channelId, guildId, layout, subtitle, textProps}) { // fn#113907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15247:118, offset: 0x0240aedb, size: 248 bytes, params: 2, frame: 24
|
||||
let value = environment;
|
||||
const channelSubtitleData = (require(14694) /* metro dependency 14694: getChannelSubtitleData */).getChannelSubtitleData(subtitle);
|
||||
if (channelSubtitleData == null) {
|
||||
return null;
|
||||
}
|
||||
const r8 = channelSubtitleData.type === 'voice' && connected;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const textProps2 = {...textProps};
|
||||
value = Reflect.apply((require(10978) /* metro dependency 10978: MessagePreviewMarkup */).renderMessagePreviewMarkup,
|
||||
value, [{content: channelSubtitleData.subtitle, muted: muted != null && muted, channelId: channelId,
|
||||
guildId: guildId, layout: layout, color: 'text-muted', disableAnimatedEmoji: !r8}]);
|
||||
return (
|
||||
<Text {...textProps2}>
|
||||
{value}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function renderChannelSubtitle({subtitle, muted, layout, channelId, guildId, connected}) { // fn#113908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15247:634, offset: 0x0240afd3, size: 240 bytes, params: 2, frame: 22
|
||||
if (subtitle == null) {
|
||||
return null;
|
||||
}
|
||||
const channelListLayoutModule = require(10981) /* metro dependency 10981: ChannelListLayout */;
|
||||
const getLayoutStyles = channelListLayoutModule.getLayoutStyles;
|
||||
if (typeof subtitle === 'string') {
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant={Reflect.apply(getLayoutStyles, channelListLayoutModule, [layout]).messagePreview.text.variant}
|
||||
color="text-muted"
|
||||
lineClamp={1}
|
||||
maxFontSizeMultiplier={1.75}
|
||||
>
|
||||
{subtitle}
|
||||
</Text>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<ChannelSubtitle
|
||||
channelId={channelId}
|
||||
guildId={guildId}
|
||||
layout={layout}
|
||||
subtitle={subtitle}
|
||||
muted={muted}
|
||||
connected={connected}
|
||||
textProps={object}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/* Metro module 15055; source: modules/main_tabs_v2/native/shared_components/guild_channels/ChannelTitle.tsx; dependencies: [31, 4865, 33, 4501, 697, 10981, 4573, 2] */
|
||||
function _fun113920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15252:6, offset: 0x0240bffd, size: 277 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyleProperties = createStylesModule.createStyleProperties;
|
||||
object2 = {};
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
object2.muted = TEXT_MUTED;
|
||||
const REDESIGN_CHANNEL_NAME_MUTED_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_CHANNEL_NAME_MUTED_TEXT;
|
||||
object2.normal = REDESIGN_CHANNEL_NAME_MUTED_TEXT;
|
||||
const REDESIGN_CHANNEL_NAME_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_CHANNEL_NAME_TEXT;
|
||||
object2.unreadOrConnected = REDESIGN_CHANNEL_NAME_TEXT;
|
||||
const env0_5 = Reflect.apply(createStyleProperties, createStylesModule, [object2]);
|
||||
value = value.memo(ChannelTitle_113921);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/main_tabs_v2/native/shared_components/guild_channels/ChannelTitle.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function ChannelTitle_113921({title, muted, unread, resolvedUnreadSetting, connected, layout}) { // fn#113921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15252:340, offset: 0x0240c112, size: 239 bytes, params: 2, frame: 24
|
||||
const env0_2 = resolvedUnreadSetting;
|
||||
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(layout);
|
||||
const value4 = env0_2.useMemo(_fun113922, [unread, env0_5(), connected, muted, resolvedUnreadSetting]);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant={layoutStyles.channelName.text.variant}
|
||||
lineClamp={1}
|
||||
maxFontSizeMultiplier={1.75}
|
||||
style={value4}
|
||||
>
|
||||
{title ?? ''}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun113922() { // fn#113922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15252:487, offset: 0x0240c201, size: 102 bytes, params: 1, frame: 5
|
||||
var r2;
|
||||
var r1;
|
||||
if (muted) {
|
||||
r1 = env0_4.muted;
|
||||
} else {
|
||||
r2 = unread && resolvedUnreadSetting === UnreadSetting.ALL_MESSAGES;
|
||||
r2 = !r2 ? connected : r2;
|
||||
r1 = r2 ? env0_4.unreadOrConnected : env0_4.normal;
|
||||
}
|
||||
return {'color': null, 'paddingRight': 4, 'flexShrink': 1, color: r1};
|
||||
}
|
||||
|
||||
Loaded 100 of 16065 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user