Initial commit

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

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -0,0 +1,43 @@
/* Metro module 11324; source: modules/launchpad/native/LaunchPadConstants.tsx; dependencies: [27, 477, 4092, 2] */
function _fun86452(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11510:6, offset: 0x01f9504a, size: 428 bytes, params: 8, frame: 20
var r1;
var r3;
var Math;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Dimensions = (require(27) /* metro dependency 27 */).Dimensions;
let value = Dimensions.get('screen');
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid()) {
r3 = 24;
} else {
if ((require(4092) /* metro dependency 4092: DeviceUtils */).isIpadOS()) {
r1 = 13;
} else {
Math = global.Math;
value = Math.min(value.width, value.height);
value = 0.09 * value;
r1 = value;
}
r3 = r1;
}
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadConstants.tsx');
exports.LAUNCH_PAD_SPRING_CONFIG = {'damping': 20, 'stiffness': 280, 'mass': 0.5, 'restSpeedThreshold': 0.001,
'restDisplacementThreshold': 0.001};
exports.LAUNCH_PAD_PULL_TAB_HEIGHT = 96;
exports.LAUNCH_PAD_PULL_TAB_WIDTH = 26;
exports.LAUNCH_PAD_PULL_TAB_MINIMIZED_OFFSET = 18;
exports.LAUNCH_PAD_PULL_TAB_BORDER_RADIUS = 13;
exports.LAUNCH_PAD_PULL_TAB_SCALE_FACTOR = 1.1;
exports.LAUNCH_PAD_PULL_TAB_SCALE_OFFSET = 4.800000000000004;
exports.LAUNCH_PAD_PULL_TAB_POSITION_MARGIN = 32;
exports.LAUNCH_PAD_PULL_TAB_MAX_POSITION = 300.8;
exports.LAUNCH_PAD_PULL_TAB_INITIAL_POSITION = 150.4;
exports.LAUNCH_PAD_MARGIN = 16;
exports.LAUNCH_PAD_PULL_TAB_HIT_SLOP = 16;
exports.LAUNCH_PAD_END_TRANSLATION_THRESHOLD = 14;
exports.LAUNCH_PAD_END_VELOCITY_THRESHOLD = 100;
exports.LAUNCH_PAD_EDGE_GESTURE_AFFORDANCE = r3;
exports.LaunchPadTypes = {GESTURE_FULL: 'gesture-full', GESTURE_EDGE: 'gesture-edge', PULL_TAB: 'pull-tab',
DISABLED: 'disabled'};
}
@@ -0,0 +1,142 @@
/* Metro module 15313; source: modules/launchpad/native/LaunchPadContainer.tsx; dependencies: [31, 27, 11324, 33, 4501, 11325, 15314, 15316, 14283, 4017, 4577, 4013, 14366, 5321, 15317, 2] */
function _fun117059(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15510:6, offset: 0x024a1caa, size: 347 bytes, params: 8, frame: 22
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 StyleSheet = value.StyleSheet;
value = require(11324) /* metro dependency 11324: LaunchPadConstants */;
const env0_4 = value.LAUNCH_PAD_SPRING_CONFIG;
const env0_5 = value.LaunchPadTypes;
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;
object4 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['backgroundColor'] = 'transparent';
object4.wrapper = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['overflow'] = 'hidden';
object4.container = object6;
const env0_8 = Reflect.apply(createStyles, value, [object4]);
object4 = {code: 'function LaunchPadContainerTsx1(){const{windowDimensions}=this.__closure;return windowDimensions.get().height;}'};
object4 = {code: 'function LaunchPadContainerTsx2(height,lastHeight){const{updaters}=this.__closure;if(lastHeight==null)return;if(lastHeight<=height)return;updaters.onWindowHeightChange();}'};
object4 = {code: "function LaunchPadContainerTsx3(){const{interpolate,launchPadSharedState,withSpring,windowDimensions,LAUNCH_PAD_SPRING_CONFIG}=this.__closure;return{borderRadius:interpolate(launchPadSharedState.get(),[0,1],[0,16]),transform:[{scale:withSpring(interpolate(launchPadSharedState.get(),[0,1],[1,(windowDimensions.get().width-16*3)/windowDimensions.get().width]),LAUNCH_PAD_SPRING_CONFIG,'animate-always')},{translateY:withSpring(interpolate(launchPadSharedState.get(),[0,1],[0,-4]),LAUNCH_PAD_SPRING_CONFIG,'animate-always')}]};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadContainer.tsx');
exports.default = LaunchPadContainer;
}
function LaunchPadContainer({children}) { // fn#117060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15510:1303, offset: 0x024a1e05, size: 713 bytes, params: 2, frame: 33
var r10;
var value;
const styles = useStyles();
const value3 = (importDefault(11325) /* metro dependency 11325: useLaunchPadType */)();
const {launchPadSharedState, launchPadPullTabState, launchPadShown, gestureState,
updaters} = (importDefault(15314) /* metro dependency 15314: useLaunchPadStateNative */)();
const {gesture,
gestureRef} = (importDefault(15316) /* metro dependency 15316: useLaunchPadGesture */)({launchPadType: value3,
launchPadSharedState: launchPadSharedState, launchPadPullTabState: launchPadPullTabState,
launchPadShown: launchPadShown, gestureState: gestureState, updaters: updaters});
const value6 = (importDefault(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */)();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure = LaunchPadContainerO;
closure.__closure = {windowDimensions: value6};
closure.__workletHash = 9985296176902;
closure.__initData = env0_9;
const closure2 = LaunchPadContainerL;
closure2.__closure = {updaters: updaters};
closure2.__workletHash = 418963589215;
closure2.__initData = env0_10;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const moduleValue2 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
closure = LaunchPadContainerV;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, launchPadSharedState: launchPadSharedState,
withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, windowDimensions: value6,
LAUNCH_PAD_SPRING_CONFIG: LAUNCH_PAD_SPRING_CONFIG};
closure.__workletHash = 13886247172712;
closure.__initData = env0_11;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
const MobileHomeDrawerExperiment = (require(4013) /* metro dependency 4013: HomeDrawerExperiment */).MobileHomeDrawerExperiment;
const useConfig = MobileHomeDrawerExperiment.useConfig;
const enableHome = Reflect.apply(useConfig, MobileHomeDrawerExperiment, [{location: 'guilds'}]).enableHome;
const Provider = (importDefault(14366) /* metro dependency 14366: LaunchPadGestureRefContext */).Provider;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const view = <View2 style={[styles.container, value7]}>{children}</View2>;
const DISABLED = LaunchPadTypes.DISABLED;
if (value3 !== DISABLED) {
value = importDefault(15317) /* metro dependency 15317: LaunchPadWrapper */;
value = ((Component) => <Component launchPadType={value3} gestureState={gestureState} launchPadShown={launchPadShown} launchPadSharedState={launchPadSharedState} launchPadPullTabState={launchPadPullTabState} updaters={updaters} />)(value);
r10 = value;
} else if (enableHome) {
value = importDefault(15317) /* metro dependency 15317: LaunchPadWrapper */;
value = ((Component) => <Component launchPadType={value3} gestureState={gestureState} launchPadShown={launchPadShown} launchPadSharedState={launchPadSharedState} launchPadPullTabState={launchPadPullTabState} updaters={updaters} />)(value);
r10 = value;
} else {
r10 = undefined;
}
return (
<Provider value={gestureRef}>
<GestureDetector gesture={gesture}>
<View style={styles.wrapper}>
{view}
{r10}
</View>
</GestureDetector>
</Provider>
);
}
function LaunchPadContainerO() { // fn#117061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15510:1673, owner: LaunchPadContainer.o, offset: 0x024a20ce, size: 23 bytes, params: 1, frame: 9
const binding = env0_2;
const get = binding.get;
return Reflect.apply(get, binding, []).height;
}
function LaunchPadContainerL(a0, a1) { // fn#117062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15510:1776, owner: LaunchPadContainer.l, offset: 0x024a20e5, size: 37 bytes, params: 3, frame: 9
if (a1 != null) {
if (!(a1 <= a0)) {
updaters.onWindowHeightChange();
}
}
}
function LaunchPadContainerV() { // fn#117063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15510:1942, owner: LaunchPadContainer.v, offset: 0x024a210a, size: 326 bytes, params: 1, frame: 27
const object2 = {};
let value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let interpolate = reanimatedRexportModule.interpolate;
const launchPadSharedStateBinding = launchPadSharedState;
let get = launchPadSharedStateBinding.get;
object2.borderRadius = Reflect.apply(interpolate, reanimatedRexportModule, [Reflect.apply(get,
launchPadSharedStateBinding, []), [0, 1], [0, 16]]);
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const moduleValue3 = reanimatedRexportModule;
interpolate = moduleValue3.interpolate;
const value4 = launchPadSharedStateBinding.get();
const binding = env0_2;
get = binding.get;
const value5 = Reflect.apply(get, binding, []).width - 48;
get = binding.get;
const items3 = [{scale: Reflect.apply(withSpring, springModule, [Reflect.apply(interpolate, moduleValue3, [value4,
[0, 1], [1, value5 / Reflect.apply(get, binding, []).width]]), LAUNCH_PAD_SPRING_CONFIG, 'animate-always'])}];
value = springModule;
withSpring = value.withSpring;
const moduleValue4 = reanimatedRexportModule;
items3[1] = {translateY: Reflect.apply(withSpring, value,
[moduleValue4.interpolate(launchPadSharedStateBinding.get(), [0, 1], [0, -4]), LAUNCH_PAD_SPRING_CONFIG,
'animate-always'])};
object2.transform = items3;
return object2;
}
@@ -0,0 +1,10 @@
/* Metro module 14366; source: modules/launchpad/native/LaunchPadGestureRefContext.tsx; dependencies: [31, 2] */
function _fun108729(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14563:6, offset: 0x0232bdc7, size: 110 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
value = value.createContext({current: undefined});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadGestureRefContext.tsx');
exports.default = value;
}
@@ -0,0 +1,105 @@
/* Metro module 15350; source: modules/launchpad/native/LaunchPadMembers.tsx; dependencies: [31, 27, 1379, 1934, 33, 4501, 632, 11725, 15080, 11382, 4573, 1244, 2] */
function _fun117344(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15547:6, offset: 0x024afbe4, size: 284 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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {minHeight: 16},
listStyle: {flex: 0}, emptyWrapper: {padding: 20}, emptyText: {textAlign: 'center'}});
value = value.memo(LaunchPadMembers);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadMembers.tsx');
exports.default = value;
}
function LaunchPadMembers() { // fn#117345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15547:294, offset: 0x024afd00, size: 579 bytes, params: 1, frame: 24
var r0;
var Text;
var intl;
var object;
var channelId;
var object2;
var object6;
var value;
const styles = useStyles();
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([SelectedChannelStore,
ChannelStore], _fun117346);
if (value2.type === 'private') {
var viewBindingProps = {style: styles.wrapper};
value = importDefault(11725) /* metro dependency 11725: PrivateChannelUserList */;
object6 = {};
channelId = value2.channelId;
object6.channelId = channelId;
object6.listStyleOverride = styles.listStyle;
object6.disableBottomSafeZone = true;
object6.insetEnd = 20;
channelId = value2.channelId;
value = <View {...viewBindingProps}>{((Component) => <Component {...object6} key={channelId} />)(value)}</View>;
r0 = value;
} else if (value2.type === 'thread') {
var viewBindingProps = {style: styles.wrapper};
value = importDefault(15080) /* metro dependency 15080: ThreadChannelUserList */;
object2 = {};
channelId = value2.channelId;
object2.channelId = channelId;
object2.guildId = value2.guildId;
object2.listStyleOverride = styles.listStyle;
object2.disableBottomSafeZone = true;
object2.insetEnd = 20;
channelId = value2.channelId;
value = <View {...viewBindingProps}>{((Component) => <Component {...object2} key={channelId} />)(value)}</View>;
r0 = value;
} else if (value2.type === 'guild') {
var viewBindingProps = {style: styles.wrapper};
value = importDefault(11382) /* metro dependency 11382: GuildChannelUserList */;
object = {};
channelId = value2.channelId;
object.channelId = channelId;
object.guildId = value2.guildId;
object.listStyleOverride = styles.listStyle;
object.disableBottomSafeZone = true;
object.insetEnd = 20;
channelId = value2.channelId;
value = <View {...viewBindingProps}>{((Component) => <Component {...object} key={channelId} />)(value)}</View>;
r0 = value;
} else {
var viewBindingProps = {style: styles.emptyWrapper};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {style: styles.emptyText, variant: 'text-md/semibold'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View {...viewBindingProps}><Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+7wtJq'])}</Text></View>;
}
return r0;
}
function _fun117346() { // fn#117346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15547:374, offset: 0x024aff43, size: 154 bytes, params: 1, frame: 14
var object2;
let value = environment.__proto__;
const currentlySelectedChannelId = SelectedChannelStore.getCurrentlySelectedChannelId();
const value3 = undefined;
const r2 = currentlySelectedChannelId ?? value3;
value = ChannelStore.getChannel(r2);
if (r2 == null) {
object2 = {channelId: value3, type: 'none'};
} else {
if (value == null) {
return {channelId: value3, type: 'none'};
}
if (value.isPrivate()) {
return {channelId: r2, type: 'private'};
}
var guild_id = value.guild_id;
value = value.isThread();
object2 = {channelId: r2, guildId: guild_id};
if (value) {
object2.type = 'thread';
} else {
object2.type = 'guild';
}
}
return object2;
}
@@ -0,0 +1,17 @@
/* Metro module 15351; source: modules/launchpad/native/LaunchPadNotificationCenter.tsx; dependencies: [31, 33, 4501, 14762, 2] */
function _fun117347(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15548:6, offset: 0x024affdd, size: 189 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {height: '100%'}});
value = value.memo(NotificationsContent);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadNotificationCenter.tsx');
exports.default = value;
}
function NotificationsContent() { // fn#117348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15548:184, offset: 0x024b009a, size: 64 bytes, params: 1, frame: 15
const styles = useStyles();
return ((Component) => <Component style={styles.wrapper} nestedInLaunchPad />)(importDefault(14762) /* metro dependency 14762: Notifications */);
}
@@ -0,0 +1,269 @@
/* Metro module 15320; source: modules/launchpad/native/LaunchPadPullTab.tsx; dependencies: [31, 27, 11324, 11529, 33, 4501, 697, 15319, 4017, 14283, 14937, 15321, 4577, 1244, 15264, 12376, 2] */
function _fun117114(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15517:6, offset: 0x024a4713, size: 513 bytes, params: 8, frame: 26
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_3 = (require(27) /* metro dependency 27 */).Pressable;
const launchPadConstantsModule = require(11324) /* metro dependency 11324: LaunchPadConstants */;
const env0_4 = launchPadConstantsModule.LAUNCH_PAD_MARGIN;
const LAUNCH_PAD_PULL_TAB_BORDER_RADIUS = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_BORDER_RADIUS;
const LAUNCH_PAD_PULL_TAB_HEIGHT = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_HEIGHT;
const env0_7 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_HIT_SLOP;
const env0_8 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_MINIMIZED_OFFSET;
const env0_9 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_SCALE_FACTOR;
const env0_10 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_SCALE_OFFSET;
const LAUNCH_PAD_PULL_TAB_WIDTH = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_WIDTH;
const env0_11 = launchPadConstantsModule.LAUNCH_PAD_SPRING_CONFIG;
const env0_12 = (require(11529) /* metro dependency 11529: ChatInputConstants */).CHAT_INPUT_HEIGHT;
const env0_13 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'position': 'absolute', 'right': 0};
object4.width = LAUNCH_PAD_PULL_TAB_WIDTH;
object4.height = LAUNCH_PAD_PULL_TAB_HEIGHT;
object4.borderTopLeftRadius = LAUNCH_PAD_PULL_TAB_BORDER_RADIUS;
object4.borderBottomLeftRadius = LAUNCH_PAD_PULL_TAB_BORDER_RADIUS;
object4.borderWidth = 1;
object4.borderTopWidth = 1;
object4.borderColor = 'rgba(0, 0, 0, 0.08)';
const SHADOW_MOBILE_NAVIGATOR_X = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_MOBILE_NAVIGATOR_X;
copyDataProperties(object4, SHADOW_MOBILE_NAVIGATOR_X, undefined);
object3.pullTab = object4;
object3.pullTabButton = {width: LAUNCH_PAD_PULL_TAB_WIDTH, height: LAUNCH_PAD_PULL_TAB_HEIGHT,
justifyContent: 'center', alignItems: 'center'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.launchPad = {color: BACKGROUND_BASE_LOW};
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object3]);
object3 = {code: 'function LaunchPadPullTabTsx1(){const{keyboardHeight}=this.__closure;return keyboardHeight.get();}'};
object3 = {code: 'function LaunchPadPullTabTsx2(keyboardHeight,keyboardHeightPrev){const{launchPadSharedState,updaters,keyboardHeightOpened,launchPadPullTabState,CHAT_INPUT_HEIGHT,LAUNCH_PAD_MARGIN,getWindowDimensionsWorklet,LAUNCH_PAD_PULL_TAB_HEIGHT,LAUNCH_PAD_PULL_TAB_SCALE_OFFSET}=this.__closure;if(launchPadSharedState.get()!==0){updaters.setLaunchPadPullTabMinimized(false);return;}if(keyboardHeightPrev==null||keyboardHeight===keyboardHeightPrev){return;}if(keyboardHeight<keyboardHeightPrev){var _keyboardHeightOpened;if(keyboardHeight===0){updaters.setLaunchPadPullTabMinimized(false);}if(keyboardHeightOpened.get()==null){keyboardHeightOpened.set(keyboardHeightPrev);}const keyboardClosePercent=1-keyboardHeight/((_keyboardHeightOpened=keyboardHeightOpened.get())!==null&&_keyboardHeightOpened!==void 0?_keyboardHeightOpened:keyboardHeightPrev);const keyboardOffsetRetractionAmount=launchPadPullTabState.get().offset*keyboardClosePercent;updaters.setLaunchPadPullTabPosition(launchPadPullTabState.get().position+keyboardOffsetRetractionAmount,launchPadPullTabState.get().offset-keyboardOffsetRetractionAmount);}else{updaters.setLaunchPadPullTabMinimized(true);if(keyboardHeightOpened.get()!=null){keyboardHeightOpened.set(undefined);}const keyboardWithChatInput=keyboardHeight+CHAT_INPUT_HEIGHT+LAUNCH_PAD_MARGIN*2;const spaceUnderPullTab=getWindowDimensionsWorklet({ignoreKeyboard:true}).height-(launchPadPullTabState.get().position+LAUNCH_PAD_PULL_TAB_HEIGHT+LAUNCH_PAD_PULL_TAB_SCALE_OFFSET);const offset=spaceUnderPullTab>keyboardWithChatInput?0:keyboardWithChatInput-spaceUnderPullTab;if(offset>0){updaters.setLaunchPadPullTabPosition(launchPadPullTabState.get().position-offset,launchPadPullTabState.get().offset+offset);}}}'};
object3 = {code: 'function LaunchPadPullTabTsx3(){const{isMinimized,gestureState,LAUNCH_PAD_PULL_TAB_MINIMIZED_OFFSET,interpolate,launchPadSharedState,windowDimensions,launchPadPullTabState,LAUNCH_PAD_PULL_TAB_BORDER_RADIUS,interpolateColor,LAUNCH_PAD_MARGIN,backgroundColorTabBar,backgroundColorLaunchPad,withSpring,LAUNCH_PAD_SPRING_CONFIG}=this.__closure;let translateX=isMinimized.get()&&!gestureState.get().active?LAUNCH_PAD_PULL_TAB_MINIMIZED_OFFSET:interpolate(launchPadSharedState.get(),[0,1],[0,-(windowDimensions.get().width-16)]);if(launchPadSharedState.get()>0.9){translateX=-windowDimensions.get().width;}else if(gestureState.get().active){if(gestureState.get().requiresPop){translateX+=gestureState.get().positionOffsetX*0.3;}else{translateX-=4;}}const translateY=launchPadPullTabState.get().position;const borderRadius=launchPadSharedState.get()<=0&&!gestureState.get().active?0:LAUNCH_PAD_PULL_TAB_BORDER_RADIUS;const backgroundColor=interpolateColor(launchPadSharedState.get()*windowDimensions.get().width,[0,LAUNCH_PAD_MARGIN],[backgroundColorTabBar,backgroundColorLaunchPad]);return{transform:[{translateX:withSpring(translateX,LAUNCH_PAD_SPRING_CONFIG)},{translateY:withSpring(translateY,LAUNCH_PAD_SPRING_CONFIG)},{scale:withSpring(launchPadPullTabState.get().scale,LAUNCH_PAD_SPRING_CONFIG)}],borderTopRightRadius:withSpring(borderRadius,LAUNCH_PAD_SPRING_CONFIG),borderBottomRightRadius:withSpring(borderRadius,LAUNCH_PAD_SPRING_CONFIG),backgroundColor:backgroundColor};}'};
value = value.memo(LaunchPadPullTab);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadPullTab.tsx');
exports.default = value;
}
function LaunchPadPullTab({launchPadSharedState, launchPadPullTabState, gestureState, updaters}) { // fn#117115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15517:4195, offset: 0x024a4914, size: 618 bytes, params: 2, frame: 29
var object4;
const styles = useStyles();
const value2 = (require(14937) /* metro dependency 14937: useTabBarStyles */).useTabBarStyles();
const value3 = (importDefault(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */)();
const color = styles.launchPad.color;
const backgroundColor = value2.tabBar.backgroundColor;
const value4 = (importDefault(15321) /* metro dependency 15321: useLaunchPadPullTabMinimized */)({launchPadSharedState: launchPadSharedState,
launchPadPullTabState: launchPadPullTabState});
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = LaunchPadPullTabF;
object4 = {isMinimized: value4, gestureState: gestureState};
object4.LAUNCH_PAD_PULL_TAB_MINIMIZED_OFFSET = LAUNCH_PAD_PULL_TAB_MINIMIZED_OFFSET;
object4.interpolate = reanimatedRexportModule.interpolate;
object4.launchPadSharedState = launchPadSharedState;
object4.windowDimensions = value3;
object4.launchPadPullTabState = launchPadPullTabState;
object4.LAUNCH_PAD_PULL_TAB_BORDER_RADIUS = LAUNCH_PAD_PULL_TAB_BORDER_RADIUS;
object4.interpolateColor = reanimatedRexportModule.interpolateColor;
object4.LAUNCH_PAD_MARGIN = LAUNCH_PAD_MARGIN;
object4.backgroundColorTabBar = backgroundColor;
object4.backgroundColorLaunchPad = color;
object4.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object4.LAUNCH_PAD_SPRING_CONFIG = LAUNCH_PAD_SPRING_CONFIG;
closure.__closure = object4;
closure.__workletHash = 17461120174889;
closure.__initData = env0_17;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
useLaunchPadPullTabKeyboardListener({launchPadSharedState: launchPadSharedState,
launchPadPullTabState: launchPadPullTabState, updaters: updaters});
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.pullTab, value5];
const object3 = {accessibilityRole: 'button'};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object3.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yTnIfb);
object3.hitSlop = LAUNCH_PAD_PULL_TAB_HIT_SLOP;
object3.style = styles.pullTabButton;
object3.onTouchStart = function() {
updaters.setLaunchPadPullTabScale(LAUNCH_PAD_PULL_TAB_SCALE_FACTOR);
};
object3.onPress = importDefault(15264) /* metro dependency 15264: showLaunchPad */;
const ChannelListMagnifyingGlassIcon = (require(12376) /* metro dependency 12376: ChannelListMagnifyingGlassIcon */).ChannelListMagnifyingGlassIcon;
return (
<View style={items2}>
<Pressable {...object3}>
<ChannelListMagnifyingGlassIcon size="xs" />
</Pressable>
</View>
);
}
function LaunchPadPullTabF() { // fn#117116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15517:4489, owner: LaunchPadPullTab.f, offset: 0x024a4b7e, size: 663 bytes, params: 1, frame: 24
var r2;
var gestureStateBinding;
var value2;
var value3;
var moduleValue;
var interpolate;
var value4;
let binding = env0_7;
let get = binding.get;
if (Reflect.apply(get, binding, [])) {
gestureStateBinding = gestureState;
if (gestureStateBinding.get().active) {
value3 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue.interpolate;
value4 = launchPadSharedState.get();
binding = env0_4;
r2 = Reflect.apply(interpolate, moduleValue, [value4, [0, 1], [0, -(binding.get().width - 16)]]);
} else {
value2 = environment.__proto__;
r2 = LAUNCH_PAD_PULL_TAB_MINIMIZED_OFFSET;
}
} else {
value3 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue.interpolate;
value4 = launchPadSharedState.get();
binding = env0_4;
r2 = Reflect.apply(interpolate, moduleValue, [value4, [0, 1], [0, -(binding.get().width - 16)]]);
}
const r12 = launchPadSharedState.get() > 0.9 ? -env0_4.get().width : gestureState.get().active ? gestureState.get().requiresPop ? r2 + 0.3 * gestureState.get().positionOffsetX : r2 - 4 : r2;
let launchPadPullTabStateBinding = launchPadPullTabState;
get = launchPadPullTabStateBinding.get;
const position = Reflect.apply(get, launchPadPullTabStateBinding, []).position;
const value11 = launchPadSharedState.get();
const value12 = 0;
const LAUNCH_PAD_PULL_TAB_BORDER_RADIUS2 = value11 <= value12 ? gestureState.get().active ? LAUNCH_PAD_PULL_TAB_BORDER_RADIUS : value12 : LAUNCH_PAD_PULL_TAB_BORDER_RADIUS;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolateColor = reanimatedRexportModule.interpolateColor;
const value15 = launchPadSharedState.get();
binding = env0_4;
get = binding.get;
const value17 = Reflect.apply(interpolateColor, reanimatedRexportModule, [value15 * Reflect.apply(get, binding,
[]).width, [0, LAUNCH_PAD_MARGIN], [backgroundColor, color]]);
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const items2 = [{translateX: Reflect.apply(withSpring, springModule, [r12, LAUNCH_PAD_SPRING_CONFIG])}];
const object4 = {};
object4.translateY = springModule.withSpring(position, LAUNCH_PAD_SPRING_CONFIG);
items2[1] = object4;
const moduleValue5 = springModule;
withSpring = moduleValue5.withSpring;
launchPadPullTabStateBinding = launchPadPullTabState;
get = launchPadPullTabStateBinding.get;
items2[2] = {scale: Reflect.apply(withSpring, moduleValue5, [Reflect.apply(get, launchPadPullTabStateBinding,
[]).scale, LAUNCH_PAD_SPRING_CONFIG])};
object2.transform = items2;
object2.borderTopRightRadius = springModule.withSpring(LAUNCH_PAD_PULL_TAB_BORDER_RADIUS2, LAUNCH_PAD_SPRING_CONFIG);
object2.borderBottomRightRadius = springModule.withSpring(LAUNCH_PAD_PULL_TAB_BORDER_RADIUS2,
LAUNCH_PAD_SPRING_CONFIG);
object2.backgroundColor = value17;
return object2;
}
function useLaunchPadPullTabKeyboardListener({launchPadSharedState, launchPadPullTabState, updaters}) { // fn#117117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15517:5509, owner: LaunchPadPullTab.useLaunchPadPullTabKeyboardListener, offset: 0x024a4e15, size: 290 bytes, params: 2, frame: 23
var object2;
const value2 = (importDefault(15319) /* metro dependency 15319: useAnimatedKeyboardHeight */)();
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(undefined);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
const closure = useLaunchPadPullTabKeyboardListener_;
closure.__closure = {keyboardHeight: value2};
closure.__workletHash = 14545769097570;
closure.__initData = env1_15;
const closure2 = useLaunchPadPullTabKeyboardListenerS;
object2 = {launchPadSharedState: launchPadSharedState, updaters: updaters, keyboardHeightOpened: value3,
launchPadPullTabState: launchPadPullTabState};
object2.CHAT_INPUT_HEIGHT = CHAT_INPUT_HEIGHT;
object2.LAUNCH_PAD_MARGIN = LAUNCH_PAD_MARGIN;
const getWindowDimensionsWorklet = (require(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */).getWindowDimensionsWorklet;
object2.getWindowDimensionsWorklet = getWindowDimensionsWorklet;
object2.LAUNCH_PAD_PULL_TAB_HEIGHT = LAUNCH_PAD_PULL_TAB_HEIGHT;
object2.LAUNCH_PAD_PULL_TAB_SCALE_OFFSET = LAUNCH_PAD_PULL_TAB_SCALE_OFFSET;
closure2.__closure = object2;
closure2.__workletHash = 8060927175361;
closure2.__initData = env1_16;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
}
function useLaunchPadPullTabKeyboardListenerS(a0, a1) { // fn#117119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15517:5793, owner: LaunchPadPullTab.useLaunchPadPullTabKeyboardListener.s, offset: 0x024a4f37, size: 474 bytes, params: 3, frame: 20
var r9;
var updatersBinding;
var binding;
var value6;
var moduleValue;
var height;
var launchPadPullTabStateBinding;
var setLaunchPadPullTabPosition;
var offset;
var value9;
let value = a1;
const value3 = launchPadSharedState.get();
const value4 = 0;
if (value4 === value3) {
if (value != null) {
if (a0 !== value) {
if (a0 < value) {
if (value4 === a0) {
updaters.setLaunchPadPullTabMinimized(false);
}
binding = env0_4;
get = binding.get;
if (Reflect.apply(get, binding, []) == null) {
env0_4.set(value);
}
binding = env0_4;
value = 1 - a0 / (binding.get() ?? value);
launchPadPullTabStateBinding = launchPadPullTabState;
get = launchPadPullTabStateBinding.get;
offset = Reflect.apply(get, launchPadPullTabStateBinding, []).offset;
value = offset * value;
updatersBinding = updaters;
setLaunchPadPullTabPosition = updatersBinding.setLaunchPadPullTabPosition;
get = launchPadPullTabStateBinding.get;
value9 = Reflect.apply(get, launchPadPullTabStateBinding, []).position + value;
get = launchPadPullTabStateBinding.get;
offset = Reflect.apply(get, launchPadPullTabStateBinding, []).offset;
Reflect.apply(setLaunchPadPullTabPosition, updatersBinding, [value9, offset - value]);
} else {
updaters.setLaunchPadPullTabMinimized(true);
binding = env0_4;
get = binding.get;
if (Reflect.apply(get, binding, []) != null) {
env0_4.set(undefined);
}
value = environment.__proto__.__proto__;
value6 = a0 + CHAT_INPUT_HEIGHT + 2 * LAUNCH_PAD_MARGIN;
moduleValue = require(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */;
height = moduleValue.getWindowDimensionsWorklet({ignoreKeyboard: true}).height;
launchPadPullTabStateBinding = launchPadPullTabState;
get = launchPadPullTabStateBinding.get;
value = height - (Reflect.apply(get, launchPadPullTabStateBinding,
[]).position + LAUNCH_PAD_PULL_TAB_HEIGHT + LAUNCH_PAD_PULL_TAB_SCALE_OFFSET);
if (value > value6) {
r9 = value4;
} else {
value = value6 - value;
r9 = value;
}
if (r9 > value4) {
updatersBinding = updaters;
setLaunchPadPullTabPosition = updatersBinding.setLaunchPadPullTabPosition;
launchPadPullTabStateBinding = launchPadPullTabState;
get = launchPadPullTabStateBinding.get;
value = Reflect.apply(get, launchPadPullTabStateBinding, []).position - r9;
get = launchPadPullTabStateBinding.get;
Reflect.apply(setLaunchPadPullTabPosition, updatersBinding, [value, Reflect.apply(get,
launchPadPullTabStateBinding,
[]).offset + r9]);
}
}
}
}
} else {
updaters.setLaunchPadPullTabMinimized(false);
}
}
@@ -0,0 +1,85 @@
/* Metro module 15315; source: modules/launchpad/native/LaunchPadPullTabCache.tsx; dependencies: [11324, 587, 477, 4671, 1478, 2] */
function _fun117075(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15512:6, offset: 0x024a2907, size: 228 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = getLaunchPadPullTabPositionCached;
const closure2 = setLaunchPadPullTabPositionCached;
const closure3 = setLaunchPadPullTabExclusionRect;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const launchPadConstantsModule = require(11324) /* metro dependency 11324: LaunchPadConstants */;
const env0_3 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_HEIGHT;
const env0_4 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_INITIAL_POSITION;
const env0_5 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_WIDTH;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadPullTabCache.tsx');
exports.getLaunchPadPullTabPositionCached = closure;
exports.setLaunchPadPullTabPositionCached = closure2;
exports.persistLaunchPadPullTabPosition = persistLaunchPadPullTabPosition;
exports.clearLaunchPadPullTabExclusionRect = clearLaunchPadPullTabExclusionRect;
exports.setLaunchPadPullTabExclusionRect = closure3;
}
function getLaunchPadPullTabPositionCached() { // fn#117076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15512:264, offset: 0x024a29eb, size: 57 bytes, params: 1, frame: 12
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
return Storage.get(env0_6) ?? LAUNCH_PAD_PULL_TAB_INITIAL_POSITION;
}
function setLaunchPadPullTabPositionCached(a0) { // fn#117077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15512:359, offset: 0x024a2a24, size: 51 bytes, params: 2, frame: 14
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set(env0_6, a0);
}
function setLaunchPadPullTabExclusionRect() { // fn#117078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15512:430, offset: 0x024a2a57, size: 303 bytes, params: 1, frame: 19
var r2;
var moduleValue2;
var getWindowDimensions;
var width;
var value3;
var moduleValue3;
var value4;
var binding;
const value = a0;
const value2 = undefined;
const r4 = value !== value2 ? value : getLaunchPadPullTabPositionCached();
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
moduleValue2 = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
getWindowDimensions = moduleValue2.getWindowDimensions;
width = Reflect.apply(getWindowDimensions, moduleValue2, []).width;
value3 = width - LAUNCH_PAD_PULL_TAB_WIDTH;
moduleValue3 = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
getWindowDimensions = moduleValue3.getWindowDimensions;
width = Reflect.apply(getWindowDimensions, moduleValue3, []).width;
value4 = r4 + LAUNCH_PAD_PULL_TAB_HEIGHT;
binding = env0_8;
r2 = (binding == null ? value2 : binding.left) === value3 && (env0_8 == null ? value2 : env0_8.right) === width;
r2 = r2 && (env0_8 == null ? value2 : env0_8.top) === r4;
r2 = r2 && (env0_8 == null ? value2 : env0_8.bottom) === value4;
if (!r2) {
(importDefault(4671) /* metro dependency 4671: NativeDeviceSettingsModule */).setSystemGestureExclusionRects([{left: value3,
right: width, top: r4, bottom: value4}]);
}
}
return value2;
}
function persistLaunchPadPullTabPosition(a0) { // fn#117079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15512:1112, offset: 0x024a2b86, size: 62 bytes, params: 2, frame: 15
const env0_0 = a0;
global.clearTimeout(env0_7);
env0_7 = global.setTimeout(_fun117080, 300);
}
function clearLaunchPadPullTabExclusionRect() { // fn#117081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15512:1309, offset: 0x024a2be4, size: 92 bytes, params: 1, frame: 13
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && env0_8 != null) {
(importDefault(4671) /* metro dependency 4671: NativeDeviceSettingsModule */).setSystemGestureExclusionRects([]);
}
}
function _fun117080() { // fn#117080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15512:1186, offset: 0x024a2bc4, size: 32 bytes, params: 1, frame: 12
const setLaunchPadPullTabPositionCachedBinding = setLaunchPadPullTabPositionCached;
const binding = env0_0;
setLaunchPadPullTabPositionCachedBinding(binding);
setLaunchPadPullTabExclusionRect(binding);
}
@@ -0,0 +1,138 @@
/* Metro module 15349; source: modules/launchpad/native/LaunchPadSearchResultUser.tsx; dependencies: [31, 4502, 1949, 1379, 4396, 11532, 4864, 661, 4865, 33, 4501, 697, 15332, 4603, 4584, 566, 21, 4788, 15333, 5278, 15334, 15336, 1305, 8419, 15337, 3995, 10975, 3834, 15339, 14436, 13775, 2] */
function _fun117332(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15546:6, offset: 0x024af32d, size: 406 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const typingStore = importDefault(11532) /* metro dependency 11532: TypingStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_10 = (require(661) /* metro dependency 661: Constants */).StatusTypes;
const env0_11 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const value2 = require(33) /* metro dependency 33 */;
const env0_12 = value2.jsx;
const env0_13 = value2.Fragment;
const env0_14 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
const env0_15 = Reflect.apply(createStyles, createStylesModule, [{pressable: {flex: 1},
pressableUnderlayColor: {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE}}]);
value = value.memo(_fun117341);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadSearchResultUser.tsx');
exports.default = value;
}
function UserResult({user, comparator, channel, lastMessage, unread, mentionCount, muted, isTyping}) { // fn#117333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15546:385, offset: 0x024af4c3, size: 1093 bytes, params: 2, frame: 44
var r3;
var defaultImport;
unread = !(unread === undefined) && unread;
mentionCount = mentionCount === undefined ? 0 : mentionCount;
muted = !(muted === undefined) && muted;
isTyping = !(isTyping === undefined) && isTyping;
const styles = useStyles();
const value7 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
const value8 = env0_3.useCallback(_fun117334, [user.id]);
const value9 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const {isMobileOnline, isVROnline, status,
activities} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore],
function() {
var object = {};
var userBinding = user;
object.isMobileOnline = PresenceStore.isMobileOnline(userBinding.id);
object.isVROnline = PresenceStore.isVROnline(userBinding.id);
object.status = PresenceStore.getStatus(userBinding.id);
object.activities = PresenceStore.getActivities(userBinding.id);
return object;
});
if (lastMessage != null) {
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r3 = defaultImport.extractTimestamp(lastMessage.id);
} else {
r3 = undefined;
}
const r14 = r3 != null ? (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(r3) : null;
const value14 = 'text-muted';
const r23 = unread ? muted ? value14 : 'text-default' : value14;
const defaultImport2 = importDefault(15333) /* metro dependency 15333: renderChannelPressableWrapper */;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const backgroundColor = styles.pressableUnderlayColor.backgroundColor;
const items3 = [styles.pressable];
items3[1] = {borderRadius: value7.container.borderRadius};
const defaultImport3 = importDefault(15334) /* metro dependency 15334: renderChannelWrapper */;
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const UnreadBadge = importDefault(15336) /* metro dependency 15336: UnreadBadge */;
let ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
const items2 = [<UnreadBadge unread={unread} resolvedUnreadSetting={ALL_MESSAGES} />];
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
items2[1] = <Avatar user={user} guildId={undefined} isMobileOnline={isMobileOnline} isVROnline={isVROnline} status={user.isSystemUser() || status === StatusTypes.OFFLINE ? null : status} streaming={(importDefault(8419) /* metro dependency 8419: isStreaming */)(activities)} style={value7.icon.margin} size={value7.icon.avatarSize} animate={!useReducedMotion && (isTyping || unread)} typing={isTyping} autoStatusCutout />;
const defaultImport5 = importDefault(15337) /* metro dependency 15337: renderChannelContent */;
let object = {};
object.name = comparator ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user);
object.subtitle = lastMessage != null && channel != null ? ((ChannelRowPreview) => <ChannelRowPreview channel={channel} message={lastMessage} color={r23} muted={muted} layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COMPACT} />)((require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview) : undefined;
object.unread = unread;
ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
object.resolvedUnreadSetting = ALL_MESSAGES;
object.muted = muted;
object.lastMessageTimestampString = r14;
object.mentionCount = mentionCount;
object.mentionBadge = (importDefault(15339) /* metro dependency 15339: renderChannelBadge */)({mentionCount: mentionCount,
locale: locale});
items2[2] = defaultImport5(object);
return defaultImport2(<PressableHighlight onPress={value8} underlayColor={backgroundColor} style={items3}>{defaultImport3(<>{items2}</>,
{fontScale: value9})}</PressableHighlight>);
}
function UserResultWithChannel(a0) { // fn#117338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15546:1981, offset: 0x024af9ba, size: 266 bytes, params: 2, frame: 22
const env0_0 = a0.user;
const channel = a0.channel;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
function() {
return UserGuildSettingsStore.isChannelMuted(undefined, channel.id);
});
const {unread,
mentionCount} = (require(14436) /* metro dependency 14436: useChannelUnreadBadgeState */).useBaseChannelUnreadBadgeState(channel,
value2);
return (
<UserResult
{...a0}
{...{['channel']: channel}}
{...{['lastMessage']: (importDefault(13775) /* metro dependency 13775: useMessagePreviews */)(channel,
{unread: unread})}}
{...{['unread']: unread}}
{...{['mentionCount']: mentionCount}}
{...{['muted']: value2}}
{...{['isTyping']: (require(566) /* metro dependency 566: flux */).useStateFromStores([TypingStore],
function() {
return TypingStore.isTyping(channel.id, user.id);
})}}
/>
);
}
function _fun117341(a0) { // fn#117341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15546:2383, offset: 0x024afb11, size: 179 bytes, params: 2, frame: 21
const env0_0 = a0.user;
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getDMFromUserId(user.id);
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(dMFromUserId);
});
return channel != null ? <UserResultWithChannel {...a0} {...{['channel']: channel}} /> : <UserResult {...a0} />;
}
function _fun117334() { // fn#117334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15546:546, offset: 0x024af908, size: 65 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).openPrivateChannel({recipientIds: [user.id]});
}
@@ -0,0 +1,303 @@
/* Metro module 15331; source: modules/launchpad/native/LaunchPadSearchResults.tsx; dependencies: [31, 27, 1949, 5214, 1867, 4865, 33, 4501, 697, 15332, 6947, 566, 4584, 15333, 5278, 15334, 15336, 6819, 15337, 15339, 7234, 15340, 15346, 15347, 15349, 14532, 4573, 1357, 1244, 1478, 15335, 8140, 2] */
function _fun117237(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:6, offset: 0x024aa538, size: 531 bytes, params: 8, frame: 24
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_4 = (require(27) /* metro dependency 27 */).View;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const env0_8 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const value2 = require(33) /* metro dependency 33 */;
const env0_9 = value2.jsx;
const env0_10 = value2.Fragment;
const env0_11 = value2.jsxs;
object2 = {bottom: 24};
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.listContainer = {minHeight: 16};
object2.list = {'flex': -1, 'marginTop': 8};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.guildIcon = object4;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.categoryWrapper = {backgroundColor: BACKGROUND_BASE_LOW};
object2.pressable = {flex: 1};
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object2.pressableUnderlayColor = {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_14 = value.memo(_fun117240);
const env0_15 = value.memo(_fun117244);
const value4 = value.memo(InitialResultsInner);
value = value.memo(SearchResultsInner);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadSearchResults.tsx');
exports.InitialResults = value4;
exports.SearchResults = value;
}
function renderItemJSX({result, categoryStyles, isRefreshEnabled}) { // fn#117238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:1414, offset: 0x024aa74b, size: 612 bytes, params: 2, frame: 19
if (result == null) {
return null;
}
const type = result.type;
const AutocompleterResultTypes = (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes;
const GUILD = AutocompleterResultTypes.GUILD;
if (GUILD === type) {
return ((Component) => <Component guild={result.record} />)(env0_14);
}
const TEXT_CHANNEL = AutocompleterResultTypes.TEXT_CHANNEL;
if (TEXT_CHANNEL === type) {
return ((Component) => <Component channel={result.record} navigationReplace showGuildBadgeIcon />)(importDefault(15340) /* metro dependency 15340: TextChannel */);
}
const GROUP_DM = AutocompleterResultTypes.GROUP_DM;
if (GROUP_DM === type) {
return ((Component) => <Component channel={result.record} navigationReplace />)(importDefault(15346) /* metro dependency 15346: DMChannel */);
}
const VOICE_CHANNEL = AutocompleterResultTypes.VOICE_CHANNEL;
if (VOICE_CHANNEL === type) {
return ((Component) => <Component channel={result.record} />)(importDefault(15347) /* metro dependency 15347: VoiceOrStageChannel */);
}
const USER = AutocompleterResultTypes.USER;
if (USER === type) {
return ((Component) => <Component user={result.record} comparator={result.comparator} />)(importDefault(15349) /* metro dependency 15349: LaunchPadSearchResultUser */);
}
const HEADER = AutocompleterResultTypes.HEADER;
if (HEADER === type) {
return (require(14532) /* metro dependency 14532: RedesignCategory */).renderCategoryItem({name: result.record.text,
styles: categoryStyles, isRefreshEnabled: isRefreshEnabled});
}
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-sm/semibold">
{result.type}
</Text>
);
}
function renderSearchResultsSection() { // fn#117239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:4144, offset: 0x024aa9af, size: 82 bytes, params: 1, frame: 18
const binding = env0_15;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return ((Component) => <Component name={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['zkoeq/'])} />)(binding);
}
function _fun117240({guild}) { // fn#117240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:537, offset: 0x024aaa01, size: 571 bytes, params: 2, frame: 32
const styles = useStyles();
const value2 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
const value3 = env0_3.useCallback(_fun117241, [guild.id]);
const {unread, mentionCount,
isMentionLowImportance} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildReadStateStore],
function() {
var object = {};
var guildBinding = guild;
object.unread = GuildReadStateStore.hasUnread(guildBinding.id);
object.mentionCount = GuildReadStateStore.getMentionCount(guildBinding.id);
object.isMentionLowImportance = GuildReadStateStore.getIsMentionLowImportance(guildBinding.id);
return object;
});
const value5 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const defaultImport = importDefault(15333) /* metro dependency 15333: renderChannelPressableWrapper */;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const backgroundColor = styles.pressableUnderlayColor.backgroundColor;
const items3 = [styles.pressable];
items3[1] = {borderRadius: value2.container.borderRadius};
const defaultImport2 = importDefault(15334) /* metro dependency 15334: renderChannelWrapper */;
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const UnreadBadge = importDefault(15336) /* metro dependency 15336: UnreadBadge */;
const ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
const items2 = [<UnreadBadge unread={unread} resolvedUnreadSetting={ALL_MESSAGES} />];
items2[1] = ((Component) => <Component size={value2.icon.guildIconSize} guild={guild} style={[styles.guildIcon,
value2.icon.margin]} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
value = importDefault(15337) /* metro dependency 15337: renderChannelContent */;
let object = {};
object.name = guild.name;
object.mentionBadge = (importDefault(15339) /* metro dependency 15339: renderChannelBadge */)({mentionCount: mentionCount,
locale: locale, isMentionLowImportance: isMentionLowImportance});
items2[2] = value(object);
return defaultImport(<PressableHighlight onPress={value3} underlayColor={backgroundColor} style={items3}>{defaultImport2(<>{items2}</>,
{fontScale: value5})}</PressableHighlight>);
}
function _fun117244({name, onPress, note}) { // fn#117244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:2254, offset: 0x024aacbf, size: 166 bytes, params: 2, frame: 21
const styles = useStyles();
const value2 = (require(14532) /* metro dependency 14532: RedesignCategory */).useCategoryStyles();
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('WrappedCategoryItem');
const redesignCategoryModule = require(14532) /* metro dependency 14532: RedesignCategory */;
return (
<View style={styles.categoryWrapper}>
{redesignCategoryModule.renderCategoryItem({name: name, onPress: onPress, note: note, styles: value2,
isRefreshEnabled: value3})}
</View>
);
}
function InitialResultsInner({history, unreads, toggleExpandedHistory, expandedHistory, selectedGuildId}) { // fn#117245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:2516, offset: 0x024aad65, size: 669 bytes, params: 2, frame: 30
var r4;
var defaultImport2;
const env0_3 = expandedHistory;
var value;
const styles = useStyles();
const value2 = (require(14532) /* metro dependency 14532: RedesignCategory */).useCategoryStyles();
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('InitialResults');
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun117246);
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
const binding = env0_3;
const value5 = binding.useCallback(_fun117247, [history, unreads, value2, value3]);
const value7 = binding.useCallback(_fun117249, [toggleExpandedHistory, expandedHistory, value4,
unreads.some(function({type}) {
return type === require(dependencyMap[20]).AutocompleterResultTypes.VOICE_CHANNEL;
})]);
const value8 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
const value10 = binding.useCallback(_fun117250,
[(require(4584) /* metro dependency 4584: useFontScale */).useFontScale(), history, unreads, value8]);
const Math = global.Math;
const value12 = Math.min(history.length, expandedHistory ? history.length : global.Math.max(5 - unreads.length, 2));
if (history.length > 0) {
defaultImport2 = importDefault(8140) /* metro dependency 8140: FastList */;
value = 'default';
value = ((Component) => <Component optimizeListItemRender batchesToRender={6} style={styles.list} sectionSize={value8.category.height} itemSize={value10} renderItem={value5} renderSection={value7} sections={[value12,
unreads.length]} sectionFooterSize={8} footerSize={8} scrollIndicatorInsets={env0_12} chunkBase={height} keyboardShouldPersistTaps="always" key={selectedGuildId ?? value} />)(defaultImport2);
r4 = value;
} else if (unreads.length > 0) {
defaultImport2 = importDefault(8140) /* metro dependency 8140: FastList */;
value = 'default';
value = ((Component) => <Component optimizeListItemRender batchesToRender={6} style={styles.list} sectionSize={value8.category.height} itemSize={value10} renderItem={value5} renderSection={value7} sections={[value12,
unreads.length]} sectionFooterSize={8} footerSize={8} scrollIndicatorInsets={env0_12} chunkBase={height} keyboardShouldPersistTaps="always" key={selectedGuildId ?? value} />)(defaultImport2);
r4 = value;
} else {
r4 = null;
}
return (
<View style={styles.listContainer}>
{r4}
</View>
);
}
function SearchResultsInner({results, query}) { // fn#117251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:4258, offset: 0x024ab341, size: 470 bytes, params: 2, frame: 26
const styles = useStyles();
const value2 = (require(14532) /* metro dependency 14532: RedesignCategory */).useCategoryStyles();
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('SearchResults');
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
const binding = env0_3;
const value4 = binding.useCallback(_fun117252, [results, value2, value3]);
const value6 = binding.useRef(null);
binding.useEffect(_fun117253, [query]);
const value7 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
return (
<View style={styles.listContainer}>
{results.length > 0 ? ((Component) => <Component ref={value6} optimizeListItemRender batchesToRender={6} style={styles.list} sectionSize={value7.category.height} itemSize={binding.useCallback(_fun117254,
[(require(4584) /* metro dependency 4584: useFontScale */).useFontScale(), results,
value7])} renderSection={renderSearchResultsSection} renderItem={value4} sections={[results.length]} footerSize={16} scrollIndicatorInsets={env0_12} chunkBase={height} keyboardShouldPersistTaps="always" />)(importDefault(8140) /* metro dependency 8140: FastList */) : null}
</View>
);
}
function _fun117241() { // fn#117241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:596, offset: 0x024aac3c, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(6947) /* metro dependency 6947: transitionToGuildNative */;
value.transitionToGuild(guild.id);
}
function _fun117246() { // fn#117246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:2733, offset: 0x024ab002, size: 55 bytes, params: 1, frame: 12
var value2;
if (selectedGuildId != null) {
value2 = environment.__proto__;
return GuildStore.getGuild(selectedGuildId)?.name;
}
}
function _fun117247(a0, a1) { // fn#117247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:2840, offset: 0x024ab039, size: 80 bytes, params: 3, frame: 13
return renderItemJSX({result: a0 === 0 ? history[a1] : unreads[a1], categoryStyles: env0_5,
isRefreshEnabled: env0_6});
}
function _fun117249(a0) { // fn#117249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:3024, offset: 0x024ab0bc, size: 452 bytes, params: 2, frame: 24
var r0;
var r1;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var expandedHistoryBinding;
var Text;
var object4;
const value = environment.__proto__;
const binding = env1_15;
if (a0 === 0) {
object2 = {};
object2.name = intl.string(t['Xmh+5e']);
expandedHistoryBinding = expandedHistory;
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object4 = {'variant': 'text-xs/semibold', 'color': 'text-brand'};
string = intl.string;
if (expandedHistoryBinding) {
object4.children = Reflect.apply(string, intl, [t['3BdvgI']]);
} else {
object4.children = Reflect.apply(string, intl, [t['/XSoJ+']]);
}
object2.note = <Text {...object4} />;
object2.onPress = toggleExpandedHistory;
r1 = object2;
} else {
if (env0_7 != null) {
r0 = intl.formatToPlainString(env0_8 ? t['+DrQVp'] : t['+lFj35'], {guildName: env0_7});
} else {
string = intl.string;
r0 = env0_8 ? t.C5viSQ : t.ieCAhD;
r0 = Reflect.apply(string, intl, [r0]);
}
r1 = {name: r0};
}
return ((Component) => <Component {...r1} />)(binding);
}
function _fun117250(a0, a1) { // fn#117250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:3578, offset: 0x024ab280, size: 193 bytes, params: 3, frame: 14
var r1;
var r0;
var type;
let value = 0;
if (a1 == null) {
r0 = value;
} else {
r1 = value === a0 ? history[a1] : unreads[a1];
type = r1.type;
value = environment.__proto__;
if (type === (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes.VOICE_CHANNEL) {
value = importDefault(15335) /* metro dependency 15335: getScaledChannelRowHeight */;
value = value(env0_10);
value = value + env0_9.voiceUsers.height - 2;
r1 = value;
} else {
value = importDefault(15335) /* metro dependency 15335: getScaledChannelRowHeight */;
value = value(env0_10);
r1 = value;
}
r0 = r1;
}
return r0;
}
function _fun117252(a0, a1) { // fn#117252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:4413, offset: 0x024ab517, size: 55 bytes, params: 3, frame: 13
return renderItemJSX({result: results[a1], categoryStyles: env0_1, isRefreshEnabled: env0_2});
}
function _fun117253() { // fn#117253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:4525, offset: 0x024ab54e, size: 51 bytes, params: 1, frame: 12
const current = env0_3.current;
if (!(current == null || current.scrollToTop == null)) {
current.scrollToTop(false);
}
}
function _fun117254(a0, a1) { // fn#117254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15528:4662, offset: 0x024ab581, size: 165 bytes, params: 3, frame: 15
return a1 == null ? 0 : results[a1].type === (require(7234) /* metro dependency 7234: autocompleter */).AutocompleterResultTypes.VOICE_CHANNEL ? (importDefault(15335) /* metro dependency 15335: getScaledChannelRowHeight */)(env0_5) + env0_4.voiceUsers.height - 2 : (importDefault(15335) /* metro dependency 15335: getScaledChannelRowHeight */)(env0_5);
}
@@ -0,0 +1,316 @@
/* Metro module 15324; source: modules/launchpad/native/LaunchPadUnreadServers.tsx; dependencies: [31, 27, 1379, 4605, 1878, 661, 33, 4501, 697, 6947, 15325, 566, 1305, 9719, 5475, 10254, 4603, 4601, 9608, 14532, 1357, 1478, 15330, 1244, 8140, 2] */
function _fun117189(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:6, offset: 0x024a78e6, size: 579 bytes, params: 8, frame: 23
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.Pressable;
const env0_5 = value2.View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_10 = value3.jsx;
const env0_11 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.listWrapper = {marginTop: 8};
object2.list = {'marginBottom': 4, 'flexShrink': 0};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.maskStrokeStyle = {backgroundColor: BACKGROUND_BASE_LOW};
object2.privateChannelWrapper = {'position': 'relative', 'paddingVertical': 2, 'justifyContent': 'center',
'alignItems': 'center'};
object2.privateChannelIcon = {'width': 48, 'height': 48, 'borderRadius': 24, 'overflow': 'hidden'};
object2.badgeWrapper = {'position': 'absolute', 'top': '50%', 'left': '50%', 'marginLeft': 6, 'marginTop': 6};
object2.guildWrapper = {'paddingVertical': 2, 'justifyContent': 'center', 'alignItems': 'center'};
object2.guildHistorySeparatorWrapper = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center'};
const object3 = {'width': 2, 'height': 32};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object3.backgroundColor = BACKGROUND_MOD_STRONG;
object2.guildHistorySeparator = object3;
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_13 = value.memo(GuildItemInner);
const env0_14 = value.memo(PrivateChannelItemInner);
value = value.memo(LaunchPadUnreadServers);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadUnreadServers.tsx');
exports.default = value;
}
function HistorySeparator() { // fn#117190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:2345, offset: 0x024a7b29, size: 71 bytes, params: 1, frame: 17
const styles = useStyles();
return (
<View style={styles.guildHistorySeparatorWrapper}>
<View style={styles.guildHistorySeparator} />
</View>
);
}
function renderHistorySection() { // fn#117191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:2480, offset: 0x024a7b70, size: 23 bytes, params: 1, frame: 13
return <HistorySeparator />;
}
function GuildItemInner({guildId, selected, onGuildSelect}) { // fn#117192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:937, offset: 0x024a7b87, size: 212 bytes, params: 2, frame: 22
const styles = useStyles();
const binding = env0_3;
return (
<View style={styles.guildWrapper}>
{((Component) => <Component size={48} borderRadius={16} guildId={guildId} selected={selected} onPress={binding.useCallback(function() {
onGuildSelect(guildId);
}, [guildId, onGuildSelect])} onLongPress={binding.useCallback(_fun117194,
[guildId])} backgroundColor={styles.maskStrokeStyle.backgroundColor} />)(importDefault(15325) /* metro dependency 15325: SimpleGuild */)}
</View>
);
}
function PrivateChannelItemInner({channelId}) { // fn#117195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:1299, offset: 0x024a7c88, size: 669 bytes, params: 2, frame: 26
var r0;
var items2;
var value10;
var value;
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], _fun117197);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ReadStateStore], _fun117198);
const type = channel?.type;
const DM = ChannelTypes.DM;
let r6 = type !== DM ? channel == null ? channel != null ? ((Component) => <Component style={[styles.privateChannelIcon]} source={(require(10254) /* metro dependency 10254: getChannelIcon */).getChannelIconSource(channel)} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : undefined : channel.isGroupDM() ? ((Component) => <Component channel={channel} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48} />)(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */) : channel != null ? ((Component) => <Component style={[styles.privateChannelIcon]} source={(require(10254) /* metro dependency 10254: getChannelIcon */).getChannelIconSource(channel)} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : undefined : value3 != null ? ((Avatar) => <Avatar style={styles.privateChannelIcon} user={value3} guildId={undefined} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48} />)((require(1305) /* metro dependency 1305: native */).Avatar) : channel == null ? channel != null ? ((Component) => <Component style={[styles.privateChannelIcon]} source={(require(10254) /* metro dependency 10254: getChannelIcon */).getChannelIconSource(channel)} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : undefined : channel.isGroupDM() ? ((Component) => <Component channel={channel} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48} />)(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */) : channel != null ? ((Component) => <Component style={[styles.privateChannelIcon]} source={(require(10254) /* metro dependency 10254: getChannelIcon */).getChannelIconSource(channel)} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : undefined;
const binding = env0_3;
const useCallback = binding.useCallback;
if (channel != null) {
var pressableBindingProps = {onPress: Reflect.apply(useCallback, binding, [_fun117199, [value3, channel]]),
style: styles.privateChannelWrapper, accessibilityRole: 'button', accessible: true};
items2 = [r6];
value10 = value4 > 0;
if (value10) {
var viewBindingProps = {style: styles.badgeWrapper};
value = importDefault(9608) /* metro dependency 9608: MaskedBadge */;
value = <View {...viewBindingProps}>{((Component) => <Component value={value4} unread backgroundColor={styles.maskStrokeStyle.backgroundColor} />)(value)}</View>;
r6 = value;
} else {
r6 = value10;
}
items2[1] = r6;
value = <Pressable {...pressableBindingProps}>{items2}</Pressable>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function LaunchPadUnreadServers({selectedGuildId, setSelectedGuild, unreadPrivateChannelIds, unreadGuilds, guildHistory, visible}) { // fn#117200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:2556, offset: 0x024a8040, size: 742 bytes, params: 2, frame: 35
var r0;
var moduleValue2;
var renderCategoryItem;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
const AnimatedFastList = (require(8140) /* metro dependency 8140: FastList */).AnimatedFastList;
var items2;
const env0_3 = unreadGuilds;
const styles = useStyles();
const value2 = (require(14532) /* metro dependency 14532: RedesignCategory */).useCategoryStyles();
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('LaunchPadUnreadServers');
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const binding = env0_3;
const env0_6 = binding.useRef(-1);
let useCallback = binding.useCallback;
const value4 = Reflect.apply(useCallback, binding, [_fun117201, [setSelectedGuild, selectedGuildId]]);
binding.useEffect(function() {
return _fun117204;
}, []);
const value6 = binding.useRef(null);
binding.useEffect(_fun117205, [visible]);
const value7 = binding.useCallback(_fun117206, [unreadGuilds, unreadPrivateChannelIds, selectedGuildId, value4,
guildHistory]);
useCallback = binding.useCallback;
let length = unreadGuilds.length;
const value8 = Reflect.apply(useCallback, binding, [function(a0) {
var value = 0;
return a0 !== 2 ? value : guildHistory.length > value && (unreadPrivateChannelIds.length > value || unreadGuilds.length > value) ? 10 : value;
}, [length, unreadPrivateChannelIds.length, guildHistory.length]]);
let r20 = unreadGuilds.length > 0 || unreadPrivateChannelIds.length > 0;
if (r20) {
var viewBindingProps = {style: styles.listWrapper};
moduleValue2 = require(14532) /* metro dependency 14532: RedesignCategory */;
renderCategoryItem = moduleValue2.renderCategoryItem;
string = intl.string;
r20 = r20 ? Reflect.apply(string, intl, [t.xSY9BH]) : Reflect.apply(string, intl, [t.kCt2zG]);
items3 = [Reflect.apply(renderCategoryItem, moduleValue2, [{name: r20, styles: value2,
isRefreshEnabled: value3}])];
var animatedFastListProps = {ref: value6, style: styles.list, horizontal: true, renderItem: value7,
renderSection: renderHistorySection, sectionSize: value8};
length = unreadPrivateChannelIds.length;
items2 = [length];
length = unreadGuilds.length;
items2[1] = length;
length = guildHistory.length;
items2[2] = length;
animatedFastListProps.sections = items2;
animatedFastListProps.itemSize = 58;
animatedFastListProps.headerSize = 19;
animatedFastListProps.footerSize = 19;
animatedFastListProps.chunkBase = width;
animatedFastListProps.showsHorizontalScrollIndicator = false;
animatedFastListProps.showsVerticalScrollIndicator = false;
animatedFastListProps.stickySectionsVariant = 'disabled';
animatedFastListProps.keyboardShouldPersistTaps = 'always';
items3[1] = <AnimatedFastList {...animatedFastListProps} />;
r0 = <View {...viewBindingProps}>{items3}</View>;
} else {
length = guildHistory.length;
if (length > 0) {
var viewBindingProps = {style: styles.listWrapper};
moduleValue2 = require(14532) /* metro dependency 14532: RedesignCategory */;
renderCategoryItem = moduleValue2.renderCategoryItem;
string = intl.string;
r20 = r20 ? Reflect.apply(string, intl, [t.xSY9BH]) : Reflect.apply(string, intl, [t.kCt2zG]);
items3 = [Reflect.apply(renderCategoryItem, moduleValue2, [{name: r20, styles: value2,
isRefreshEnabled: value3}])];
var animatedFastListProps = {ref: value6, style: styles.list, horizontal: true, renderItem: value7,
renderSection: renderHistorySection, sectionSize: value8};
length = unreadPrivateChannelIds.length;
items2 = [length];
length = unreadGuilds.length;
items2[1] = length;
length = guildHistory.length;
items2[2] = length;
animatedFastListProps.sections = items2;
animatedFastListProps.itemSize = 58;
animatedFastListProps.headerSize = 19;
animatedFastListProps.footerSize = 19;
animatedFastListProps.chunkBase = width;
animatedFastListProps.showsHorizontalScrollIndicator = false;
animatedFastListProps.showsVerticalScrollIndicator = false;
animatedFastListProps.stickySectionsVariant = 'disabled';
animatedFastListProps.keyboardShouldPersistTaps = 'always';
items3[1] = <AnimatedFastList {...animatedFastListProps} />;
r0 = <View {...viewBindingProps}>{items3}</View>;
} else {
r0 = null;
}
}
return r0;
}
function _fun117194() { // fn#117194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:1064, offset: 0x024a7c5b, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(6947) /* metro dependency 6947: transitionToGuildNative */;
value.transitionToGuild(guildId);
}
function _fun117197() { // fn#117197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:1451, offset: 0x024a7f25, size: 71 bytes, params: 1, frame: 13
return channel != null && channel.isPrivate() ? UserStore.getUser(channel.getRecipientId()) : undefined;
}
function _fun117198() { // fn#117198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:1552, offset: 0x024a7f6c, size: 47 bytes, params: 1, frame: 12
return channel != null ? ReadStateStore.getMentionCount(channel.id) : 0;
}
function _fun117199() { // fn#117199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:1940, offset: 0x024a7f9b, size: 165 bytes, params: 1, frame: 16
var type;
var value2;
var moduleValue;
if (channel != null) {
type = channel.type;
value2 = environment.__proto__;
if (type !== ChannelTypes.DM) {
moduleValue = require(4601) /* metro dependency 4601: transitionToChannel */;
moduleValue.transitionToChannel(channel.id, {navigationReplace: true});
} else if (env0_2 != null) {
(importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).openPrivateChannel({recipientIds: [env0_2.id]});
} else {
moduleValue = require(4601) /* metro dependency 4601: transitionToChannel */;
moduleValue.transitionToChannel(channel.id, {navigationReplace: true});
}
}
}
function _fun117201(a0) { // fn#117201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:2823, offset: 0x024a8326, size: 191 bytes, params: 2, frame: 16
var environment;
var binding;
var clearTimeout;
var value5;
const value = a0;
if (env0_6.current >= 0) {
clearTimeout = global.clearTimeout;
binding = env0_6;
clearTimeout(binding.current);
binding.current = -1;
value5 = environment.__proto__;
} else {
var value4 = undefined;
if ((importDefault(15330) /* metro dependency 15330: isGuildSelectable */)(value)) {
setSelectedGuild(value === selectedGuildId ? value4 : value);
env0_6.current = global.setTimeout(_fun117202, 400);
return value4;
}
clearTimeout = global.clearTimeout;
binding = env0_6;
clearTimeout(binding.current);
binding.current = -1;
}
(require(6947) /* metro dependency 6947: transitionToGuildNative */).transitionToGuild(value);
}
function _fun117203() { // fn#117203, offset: 0x024a840e, size: 11 bytes, params: 1, frame: 1
return _fun117204;
}
function _fun117205() { // fn#117205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:3117, offset: 0x024a8419, size: 42 bytes, params: 1, frame: 11
var current;
if (visible) {
current = env0_8.current;
if (current != null) {
current.scrollToTop(false);
}
}
}
function _fun117206(a0, a1) { // fn#117206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:3200, offset: 0x024a8443, size: 159 bytes, params: 3, frame: 17
var r7;
var r0;
var value;
var property;
if (a0 === 0) {
property = unreadPrivateChannelIds[a1];
value = property != null;
if (value) {
value = environment.__proto__;
value = ((Component) => <Component channelId={property} />)(env1_14);
r0 = value;
} else {
r0 = value;
}
return r0;
}
if (a0 >= 1) {
r7 = a0 === 1 ? unreadGuilds[a1] : guildHistory[a1];
value = r7 != null;
if (value) {
value = environment.__proto__;
value = ((Component) => <Component guildId={r7} selected={selectedGuildId === r7} onGuildSelect={env0_7} />)(env1_13);
r0 = value;
} else {
r0 = value;
}
return r0;
}
return null;
}
function _fun117202() { // fn#117202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15521:2975, offset: 0x024a83e5, size: 41 bytes, params: 1, frame: 12
const clearTimeout = global.clearTimeout;
const binding = env1_6;
clearTimeout(binding.current);
binding.current = -1;
}
@@ -0,0 +1,187 @@
/* Metro module 15317; source: modules/launchpad/native/LaunchPadWrapper.tsx; dependencies: [57, 31, 27, 11324, 661, 33, 4501, 697, 12080, 1239, 15318, 8621, 683, 15315, 4081, 4571, 6619, 4017, 15320, 4556, 1244, 4521, 15322, 2] */
function _fun117091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:6, offset: 0x024a39a4, size: 388 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.Pressable;
const env0_7 = value.TouchableOpacity;
const env0_8 = value.StyleSheet;
const env0_9 = (require(11324) /* metro dependency 11324: LaunchPadConstants */).LaunchPadTypes;
value = require(661) /* metro dependency 661: Constants */;
const env0_10 = value.AnalyticEvents;
const env0_11 = value.ComponentActions;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.modalWrapper = {'height': '100%', 'width': '100%', paddingTop: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.a11yDismiss = {'position': 'absolute', 'top': 0, 'width': '100%', height: PX_8};
const env0_14 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadWrapper.tsx');
exports.default = LaunchPadWrapper;
}
function LaunchPadWrapper({launchPadType, gestureState, launchPadShown, launchPadSharedState, launchPadPullTabState, updaters}) { // fn#117092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:554, offset: 0x024a3b28, size: 946 bytes, params: 2, frame: 34
const styles = useStyles();
const {launchPadCoverStyles,
launchPadStyles} = (importDefault(15318) /* metro dependency 15318: useLaunchPadAnimatedStylesNative */)({launchPadSharedState: launchPadSharedState,
launchPadShown: launchPadShown, gestureState: gestureState});
const value4 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(launchPadShown);
const binding = env0_4;
const useRef = binding.useRef;
const value5 = !value4;
const value6 = Reflect.apply(useRef, binding, [value5]);
var env0_4 = value6(binding.useState({}), 2)[1];
binding.useEffect(_fun117093, [value4]);
const value9 = binding.useCallback(function() {
return updaters.setLaunchPadPosition(0);
}, [updaters]);
binding.useEffect(_fun117097, [value4]);
binding.useEffect(_fun117098, [launchPadType, value4]);
binding.useEffect(function() {
return _fun117100;
}, [launchPadShown]);
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(_fun117101);
useLaunchPadComponentDispatchListeners(updaters);
const value10 = (importDefault(6619) /* metro dependency 6619: useRefValue */)(value6);
const absoluteFill = StyleSheet.absoluteFill;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const value11 = 'none';
const view = <View2 style={launchPadCoverStyles} pointerEvents={value11} />;
const PULL_TAB = LaunchPadTypes.PULL_TAB;
const r5 = launchPadType !== PULL_TAB ? null : ((Component) => <Component gestureState={gestureState} launchPadSharedState={launchPadSharedState} launchPadPullTabState={launchPadPullTabState} updaters={updaters} />)(importDefault(15320) /* metro dependency 15320: LaunchPadPullTab */);
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const r8 = value4 ? undefined : value11;
const AccessibilityView = (require(4556) /* metro dependency 4556: AccessibilityViewNative */).AccessibilityView;
const r13 = value4 ? 'yes' : 'no';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
const items2 = [<Pressable importantForAccessibility={r13} accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
intl, [WAI6xu])} onPress={value9} style={styles.a11yDismiss} />];
items2[1] = <TouchableOpacity accessible={false} {...{'aria-hidden': true}} onPress={value9} style={StyleSheet.absoluteFillObject} />;
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
items2[2] = <Freeze freeze={value4 ? value5 : value10}>{((Component) => <Component visible={value4} sharedState={launchPadSharedState} />)(importDefault(15322) /* metro dependency 15322: LaunchPad */)}</Freeze>;
return (
<View style={absoluteFill} pointerEvents="box-none">
{view}
{r5}
<View3 style={launchPadStyles} pointerEvents={r8}>
<AccessibilityView
nativeID="launch-pad"
style={styles.modalWrapper}
onAccessibilityEscape={value9}
accessibilityViewIsModal={value4}
>
{items2}
</AccessibilityView>
</View3>
</View>
);
}
function _fun117093() { // fn#117093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:884, offset: 0x024a3eda, size: 70 bytes, params: 1, frame: 15
if (env0_2) {
env0_3.current = false;
return undefined;
}
const env0_0 = global.setTimeout(_fun117094, 1000);
return _fun117095;
}
function _fun117097() { // fn#117097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1061, offset: 0x024a3f54, size: 59 bytes, params: 1, frame: 12
var defaultImport;
if (env0_2) {
value = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.LAUNCHPAD_OPENED);
}
}
function _fun117098() { // fn#117098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1124, offset: 0x024a3f8f, size: 153 bytes, params: 1, frame: 15
var value;
const launchPadTypeBinding = launchPadType;
const PULL_TAB = LaunchPadTypes.PULL_TAB;
if (launchPadTypeBinding !== PULL_TAB) {
(require(15315) /* metro dependency 15315: LaunchPadPullTabCache */).clearLaunchPadPullTabExclusionRect();
} else {
(require(15315) /* metro dependency 15315: LaunchPadPullTabCache */).setLaunchPadPullTabExclusionRect();
if (env0_2) {
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
value.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_LIGHT);
}
}
}
function _fun117099() { // fn#117099, offset: 0x024a4028, size: 11 bytes, params: 1, frame: 1
return _fun117100;
}
function _fun117101() { // fn#117101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1405, offset: 0x024a4058, size: 26 bytes, params: 1, frame: 10
if (env0_2) {
env0_5();
}
return env0_2;
}
function useLaunchPadComponentDispatchListeners(a0) { // fn#117102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1422, owner: LaunchPadWrapper.useLaunchPadComponentDispatchListeners, offset: 0x024a4072, size: 46 bytes, params: 2, frame: 14
const env0_0 = a0;
env1_4.useEffect(_fun117103, [a0]);
}
function _fun117094() { // fn#117094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:914, offset: 0x024a3f20, size: 30 bytes, params: 1, frame: 11
env1_3.current = true;
env1_4({});
}
function _fun117100() { // fn#117100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1339, offset: 0x024a4033, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (require(15315) /* metro dependency 15315: LaunchPadPullTabCache */).clearLaunchPadPullTabExclusionRect();
}
function _fun117103() { // fn#117103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1486, offset: 0x024a40a0, size: 150 bytes, params: 1, frame: 20
const closure = showLaunchPad_117104;
const closure2 = hideLaunchPad_117105;
const env0_2 = (importDefault(12080) /* metro dependency 12080: RouteManager */).addRouteChangeListener(closure2);
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
let subscribe = ComponentDispatch.subscribe;
const LAUNCH_PAD_SHOW = ComponentActions.LAUNCH_PAD_SHOW;
Reflect.apply(subscribe, ComponentDispatch, [LAUNCH_PAD_SHOW, closure]);
subscribe = ComponentDispatch.subscribe;
const LAUNCH_PAD_HIDE = ComponentActions.LAUNCH_PAD_HIDE;
Reflect.apply(subscribe, ComponentDispatch, [LAUNCH_PAD_HIDE, closure2]);
return _fun117106;
}
function showLaunchPad_117104() { // fn#117104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1509, offset: 0x024a4136, size: 38 bytes, params: 1, frame: 11
const binding = env1_0;
binding.setLaunchPadShown(true);
binding.setLaunchPadPosition(1);
}
function hideLaunchPad_117105() { // fn#117105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1579, offset: 0x024a415c, size: 37 bytes, params: 1, frame: 11
const binding = env1_0;
binding.setLaunchPadShown(false);
binding.setLaunchPadPosition(0);
}
function _fun117106() { // fn#117106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15514:1828, offset: 0x024a4181, size: 107 bytes, params: 1, frame: 19
env0_2();
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
let unsubscribe = ComponentDispatch.unsubscribe;
const LAUNCH_PAD_SHOW = ComponentActions.LAUNCH_PAD_SHOW;
Reflect.apply(unsubscribe, ComponentDispatch, [LAUNCH_PAD_SHOW, showLaunchPad_117104]);
unsubscribe = ComponentDispatch.unsubscribe;
const LAUNCH_PAD_HIDE = ComponentActions.LAUNCH_PAD_HIDE;
Reflect.apply(unsubscribe, ComponentDispatch, [LAUNCH_PAD_HIDE, hideLaunchPad_117105]);
}
@@ -0,0 +1,13 @@
/* Metro module 15323; source: modules/launchpad/native/hideLaunchPad.tsx; dependencies: [661, 1239, 2] */
function _fun117187(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15520:6, offset: 0x024a783c, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/hideLaunchPad.tsx');
exports.default = function() {
var ComponentDispatch = require(dependencyMap[1]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.LAUNCH_PAD_HIDE);
};
}
@@ -0,0 +1,45 @@
/* Metro module 15330; source: modules/launchpad/native/isGuildSelectable.tsx; dependencies: [1384, 4492, 5214, 4864, 2] */
function _fun117234(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15527:6, offset: 0x024aa408, size: 154 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/isGuildSelectable.tsx');
exports.default = isGuildSelectable;
}
function isGuildSelectable(a0) { // fn#117235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15527:226, offset: 0x024aa4a2, size: 150 bytes, params: 2, frame: 17
var r2;
var r1;
var r0;
var hasUnread2;
var Object;
var value4;
const env0_0 = a0;
var value;
const isMuted2 = UserGuildSettingsStore.isMuted(a0);
if (isMuted2) {
r0 = !isMuted2;
} else {
hasUnread2 = GuildReadStateStore.hasUnread(a0);
if (hasUnread2) {
r1 = !!hasUnread2;
} else {
Object = global.Object;
value4 = Object.keys(StageInstanceStore.getStageInstancesByGuild(a0)).length > 0;
if (value4) {
r2 = value4;
} else {
value = ApplicationStreamingStore.getAllApplicationStreams();
value = !!value.some(_fun117236);
r2 = value;
}
r1 = r2;
}
r0 = r1;
}
return r0;
}
@@ -0,0 +1,60 @@
/* Metro module 15343; source: modules/launchpad/native/shared/ChannelSubtitle.tsx; dependencies: [31, 10980, 33, 15332, 4573, 14694, 10978, 2] */
function _fun117284(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15540:6, offset: 0x024ad419, size: 171 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_3 = (require(10980) /* metro dependency 10980: RedesignChannelListConstants */).SUBTITLE_OPACITY_NORMAL;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/ChannelSubtitle.tsx');
exports.renderChannelSubtitle = renderChannelSubtitle_117286;
}
function ChannelSubtitle_117285({muted, connected, channelId, guildId, subtitle, textProps}) { // fn#117285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15540:152, offset: 0x024ad4c4, size: 246 bytes, params: 2, frame: 23
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, disableAnimatedEmoji: !r8, color: muted ? 'text-muted' : 'text-subtle'}]);
return (
<Text {...textProps2}>
{value}
</Text>
);
}
function renderChannelSubtitle_117286({subtitle, muted, channelId, guildId, connected}) { // fn#117286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15540:637, offset: 0x024ad5ba, size: 242 bytes, params: 2, frame: 21
if (subtitle == null) {
return null;
}
const textProps = {'variant': null, 'color': 'text-muted', 'lineClamp': 1, 'maxFontSizeMultiplier': 1.75,
variant: (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)().messagePreview.text.variant};
const SUBTITLE_OPACITY_NORMAL2 = muted ? 1 : SUBTITLE_OPACITY_NORMAL;
textProps.style = {opacity: SUBTITLE_OPACITY_NORMAL2};
if (typeof subtitle === 'string') {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text {...textProps}>
{subtitle}
</Text>
);
} else {
return (
<ChannelSubtitle_117285
channelId={channelId}
guildId={guildId}
subtitle={subtitle}
muted={muted}
connected={connected}
textProps={textProps}
/>
);
}
}
@@ -0,0 +1,54 @@
/* Metro module 15338; source: modules/launchpad/native/shared/ChannelTitle.tsx; dependencies: [31, 4865, 33, 4501, 697, 15332, 4573, 2] */
function _fun117269(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15535:6, offset: 0x024ac600, size: 281 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_4 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_5 = (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_6 = Reflect.apply(createStyleProperties, createStylesModule, [object2]);
value = value.memo(ChannelTitle_117270);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/ChannelTitle.tsx');
exports.default = value;
}
function ChannelTitle_117270({title, muted, unread, resolvedUnreadSetting, connected}) { // fn#117270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15535:340, offset: 0x024ac719, size: 230 bytes, params: 2, frame: 23
const env0_3 = connected;
const value2 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
const value4 = env0_3.useMemo(_fun117271, [unread, env0_6(), connected, muted, resolvedUnreadSetting]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant={value2.channelName.text.variant}
lineClamp={1}
maxFontSizeMultiplier={1.75}
style={value4}
>
{title ?? ''}
</Text>
);
}
function _fun117271() { // fn#117271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15535:461, offset: 0x024ac7ff, 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};
}
@@ -0,0 +1,97 @@
/* Metro module 15328; source: modules/launchpad/native/shared/CutoutImage.tsx; dependencies: [57, 31, 27, 33, 491, 7744, 10255, 2] */
function _fun117226(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15525:6, offset: 0x024a99e0, size: 199 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 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).Image;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
value = value.memo(CutoutImage);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/CutoutImage.tsx');
exports.default = value;
}
function CutoutImage({style, cutoutTopLeftSize, cutoutTopLeftInsetX, cutoutTopLeftInsetY, cutoutTopRightSize, cutoutTopRightInsetX, cutoutTopRightInsetY, cutoutBottomLeftSize, cutoutBottomLeftInsetX, cutoutBottomLeftInsetY, cutoutBottomRightSize, cutoutBottomRightInsetX, cutoutBottomRightInsetY, imageSize, imageSource, imageBorderRadius = imageSize / 2, imageBackgroundColor, imageTintColor, clipInnerAmount, clipOuterAmount, borderStroke, borderStrokeColor}) { // fn#117227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15525:173, offset: 0x024a9aa7, size: 1937 bytes, params: 2, frame: 53
var r17;
var ClipPath;
var object;
cutoutTopLeftSize = cutoutTopLeftSize === undefined ? 0 : cutoutTopLeftSize;
cutoutTopLeftInsetX = cutoutTopLeftInsetX === undefined ? 0 : cutoutTopLeftInsetX;
cutoutTopLeftInsetY = cutoutTopLeftInsetY === undefined ? 0 : cutoutTopLeftInsetY;
cutoutTopRightSize = cutoutTopRightSize === undefined ? 0 : cutoutTopRightSize;
cutoutTopRightInsetX = cutoutTopRightInsetX === undefined ? 0 : cutoutTopRightInsetX;
cutoutTopRightInsetY = cutoutTopRightInsetY === undefined ? 0 : cutoutTopRightInsetY;
cutoutBottomLeftSize = cutoutBottomLeftSize === undefined ? 0 : cutoutBottomLeftSize;
cutoutBottomLeftInsetX = cutoutBottomLeftInsetX === undefined ? 0 : cutoutBottomLeftInsetX;
cutoutBottomLeftInsetY = cutoutBottomLeftInsetY === undefined ? 0 : cutoutBottomLeftInsetY;
cutoutBottomRightSize = cutoutBottomRightSize === undefined ? 0 : cutoutBottomRightSize;
cutoutBottomRightInsetX = cutoutBottomRightInsetX === undefined ? 0 : cutoutBottomRightInsetX;
cutoutBottomRightInsetY = cutoutBottomRightInsetY === undefined ? 0 : cutoutBottomRightInsetY;
clipInnerAmount = clipInnerAmount === undefined ? 0 : clipInnerAmount;
clipOuterAmount = clipOuterAmount === undefined ? 0 : clipOuterAmount;
let binding = env0_4;
const useState = binding.useState;
const moduleValue = require(491) /* metro dependency 491 */;
const value19 = env0_3(Reflect.apply(useState, binding, [moduleValue.v4()]), 2);
const property = value19[0];
const env0_1 = value19[1];
const r11 = property != null ? 'url(#' + property + ')' : undefined;
let r24 = clipOuterAmount > 0 ? moduleValue.v4() : undefined;
const r10 = r24 != null ? 'url(#' + r24 + ')' : undefined;
binding = env0_4;
const value24 = binding.useCallback(_fun117228, []);
binding.useLayoutEffect(_fun117229, [imageTintColor]);
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
const Defs = (require(7744) /* metro dependency 7744 */).Defs;
const Mask = (require(7744) /* metro dependency 7744 */).Mask;
const items2 = [imageBorderRadius === imageSize / 2 ? ((Circle) => <Circle cx={imageSize / 2} cy={imageSize / 2} r={imageSize / 2} fill="white" />)((require(7744) /* metro dependency 7744 */).Circle) : ((Rect) => <Rect x={0} y={0} width={imageSize} height={imageSize} rx={imageBorderRadius} ry={imageBorderRadius} fill="white" />)((require(7744) /* metro dependency 7744 */).Rect)];
items2[1] = cutoutTopLeftSize > 0 ? ((Circle) => <Circle cx={cutoutTopLeftInsetX} cy={cutoutTopLeftInsetY} r={cutoutTopLeftSize} fill="black" />)((require(7744) /* metro dependency 7744 */).Circle) : null;
items2[2] = cutoutTopRightSize > 0 ? ((Circle) => <Circle cx={imageSize - cutoutTopRightInsetX} cy={cutoutTopRightInsetY} r={cutoutTopRightSize} fill="black" />)((require(7744) /* metro dependency 7744 */).Circle) : null;
items2[3] = cutoutBottomLeftSize > 0 ? ((Circle) => <Circle cx={cutoutBottomLeftInsetX} cy={imageSize - cutoutBottomLeftInsetY} r={cutoutBottomLeftSize} fill="black" />)((require(7744) /* metro dependency 7744 */).Circle) : null;
items2[4] = cutoutBottomRightSize > 0 ? ((Circle) => <Circle cx={imageSize - cutoutBottomRightInsetX} cy={imageSize - cutoutBottomRightInsetY} r={cutoutBottomRightSize} fill="black" />)((require(7744) /* metro dependency 7744 */).Circle) : null;
items2[5] = clipInnerAmount > 0 ? imageBorderRadius === imageSize / 2 ? ((Circle) => <Circle cx={imageSize / 2} cy={imageSize / 2} r={clipInnerAmount / 2} fill="black" />)((require(7744) /* metro dependency 7744 */).Circle) : ((Rect) => <Rect x={(imageSize - clipInnerAmount) / 2} y={(imageSize - clipInnerAmount) / 2} width={clipInnerAmount} height={clipInnerAmount} rx={imageBorderRadius * (clipInnerAmount / imageSize)} ry={imageBorderRadius * (clipInnerAmount / imageSize)} fill="black" />)((require(7744) /* metro dependency 7744 */).Rect) : null;
const mask = <Mask width={imageSize} height={imageSize} id={property}>{items2}</Mask>;
if (r24 != null) {
ClipPath = (require(7744) /* metro dependency 7744 */).ClipPath;
object = {id: r24};
if (imageBorderRadius === imageSize / 2) {
const Circle = (require(7744) /* metro dependency 7744 */).Circle;
r24 = <Circle cx={imageSize / 2} cy={imageSize / 2} r={imageSize / 4} fill="white" />;
} else {
const Rect = (require(7744) /* metro dependency 7744 */).Rect;
r24 = <Rect x={clipOuterAmount} y={clipOuterAmount} width={imageSize - 2 * clipOuterAmount} height={imageSize - 2 * clipOuterAmount} rx={imageBorderRadius * ((imageSize - 2 * clipOuterAmount) / imageSize)} ry={imageBorderRadius * ((imageSize - 2 * clipOuterAmount) / imageSize)} fill="white" />;
}
r17 = <ClipPath {...object}>{r24}</ClipPath>;
} else {
r17 = null;
}
const items3 = [<Defs>{mask}{r17}</Defs>];
items3[1] = imageBackgroundColor != null ? ((Rect) => <Rect height={imageSize} width={imageSize} fill={imageBackgroundColor} mask={r11} clipPath={r10} />)((require(7744) /* metro dependency 7744 */).Rect) : null;
items3[2] = imageSource != null ? typeof imageSource !== 'number' ? ((Image) => <Image height={imageSize} width={imageSize} href={(importDefault(10255) /* metro dependency 10255: getReactNativeSVGImageSource */)(imageSource)} mask={r11} clipPath={r10} />)((require(7744) /* metro dependency 7744 */).Image) : imageTintColor != null ? ((ForeignObject) => <ForeignObject height={imageSize} width={imageSize} mask={r11} clipPath={r10}><Image style={{width: imageSize,
height: imageSize,
tintColor: imageTintColor}} source={imageSource} onLoad={value24} /></ForeignObject>)((require(7744) /* metro dependency 7744 */).ForeignObject) : ((Image) => <Image height={imageSize} width={imageSize} href={(importDefault(10255) /* metro dependency 10255: getReactNativeSVGImageSource */)(imageSource)} mask={r11} clipPath={r10} />)((require(7744) /* metro dependency 7744 */).Image) : null;
items3[3] = borderStroke != null ? ((Rect) => <Rect height={imageSize} width={imageSize} fill="transparent" stroke={borderStrokeColor} strokeWidth={2 * borderStroke} mask={r11} clipPath={r10} rx={imageBorderRadius} ry={imageBorderRadius} />)((require(7744) /* metro dependency 7744 */).Rect) : null;
return ((Component) => <Component style={style} height={imageSize} width={imageSize}>{items3}</Component>)(defaultImport);
}
function _fun117228() { // fn#117228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15525:831, offset: 0x024aa238, size: 49 bytes, params: 1, frame: 12
const binding = env0_1;
let value = environment.__proto__;
value = require(491) /* metro dependency 491 */;
binding(value.v4());
}
function _fun117229() { // fn#117229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15525:884, offset: 0x024aa269, size: 61 bytes, params: 1, frame: 12
var binding;
var value;
if (imageTintColor != null) {
binding = env0_1;
value = environment.__proto__;
value = require(491) /* metro dependency 491 */;
binding(value.v4());
}
}
@@ -0,0 +1,83 @@
/* Metro module 15346; source: modules/launchpad/native/shared/DMChannel.tsx; dependencies: [31, 4865, 33, 4601, 12129, 4501, 697, 15332, 14436, 13775, 21, 4584, 15333, 5278, 15345, 15336, 10975, 3834, 4805, 2] */
function _fun117297(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15543:6, offset: 0x024ade6c, size: 258 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_4 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{pressable: {flex: 1},
pressableUnderlayColor: {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE}}]);
value = value.memo(DMChannel);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/DMChannel.tsx');
exports.default = value;
}
function usePrivateChannelPressEvents(a0, a1) { // fn#117298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15543:144, offset: 0x024adf6e, size: 106 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const object2 = {};
object2.onPress = env0_3.useCallback(_fun117299, [a0.id, a1]);
object2.onLongPress = env0_3.useCallback(_fun117300, [a0.id]);
return object2;
}
function DMChannel({channel, muted, navigationReplace}) { // fn#117301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15543:526, offset: 0x024ae048, size: 603 bytes, params: 2, frame: 31
var object4;
var r10;
var defaultImport2;
muted = !(muted === undefined) && muted;
navigationReplace = !(navigationReplace === undefined) && navigationReplace;
const styles = useStyles();
const value5 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
const {unread,
mentionCount} = (require(14436) /* metro dependency 14436: useChannelUnreadBadgeState */).useBaseChannelUnreadBadgeState(channel,
muted);
const value7 = (importDefault(13775) /* metro dependency 13775: useMessagePreviews */)(channel, {unread: unread});
if (value7 != null) {
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
r10 = defaultImport2.extractTimestamp(value7.id);
} else {
r10 = undefined;
}
const value9 = 'text-muted';
const r18 = unread ? muted ? value9 : 'text-default' : value9;
const value11 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const defaultImport3 = importDefault(15333) /* metro dependency 15333: renderChannelPressableWrapper */;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
object4 = {};
const borderRadius = value5.container.borderRadius;
object4.style = [styles.pressable, {borderRadius: borderRadius}];
object4.underlayColor = styles.pressableUnderlayColor.backgroundColor;
copyDataProperties(object4, usePrivateChannelPressEvents(channel, navigationReplace), borderRadius);
const defaultImport4 = importDefault(15345) /* metro dependency 15345: renderChannelItem */;
const object2 = {channel: channel, unread: unread};
let ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
object2.resolvedUnreadSetting = ALL_MESSAGES;
object2.muted = muted;
object2.mentionCount = mentionCount;
const UnreadBadge = importDefault(15336) /* metro dependency 15336: UnreadBadge */;
ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
object2.unreadBadge = <UnreadBadge unread={unread} resolvedUnreadSetting={ALL_MESSAGES} muted={muted} />;
object2.subtitle = value7 != null && ((ChannelRowPreview) => <ChannelRowPreview channel={channel} message={value7} color={r18} muted={muted} layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COMPACT} />)((require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview);
object2.latestMessageTimestamp = r10;
object2.channelName = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
object2.fontScale = value11;
return defaultImport3(<PressableHighlight {...object4}>{defaultImport4(object2)}</PressableHighlight>);
}
function _fun117299() { // fn#117299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15543:217, offset: 0x024adfd8, size: 62 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(4601) /* metro dependency 4601: transitionToChannel */;
value.transitionToChannel(env0_0.id, {navigationReplace: require});
}
function _fun117300() { // fn#117300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15543:317, offset: 0x024ae016, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(12129) /* metro dependency 12129: openChannelLongPressActionSheet */;
return value.openChannelLongPressActionSheet(env0_0.id);
}
@@ -0,0 +1,103 @@
/* Metro module 15325; source: modules/launchpad/native/shared/SimpleGuild.tsx; dependencies: [31, 27, 1422, 5214, 1867, 661, 33, 4501, 6819, 15326, 566, 15327, 15329, 1244, 14421, 6682, 697, 15328, 2] */
function _fun117208(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15522:6, offset: 0x024a8529, size: 286 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(1422) /* metro dependency 1422: GuildRecord */).getGuildIconSource;
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).ME;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({dmsWrapper: {'flex': 1,
'justifyContent': 'center', 'alignItems': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/SimpleGuild.tsx');
exports.default = SimpleGuild;
}
function SimpleGuild({guildIconRef, style, guildId, onPress, onLongPress, onAccessibilityAction, onLayout, backgroundColor, animated, altDefaultBackground, selected, size, iconSize = require(dependencyMap[8]).GuildIconSizes.LARGE, borderRadius, unread, badge}) { // fn#117209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15522:379, offset: 0x024a8647, size: 1128 bytes, params: 2, frame: 47
var color;
var CutoutImage;
var object;
var value23;
var value24;
var ChatIcon;
var colors;
animated = animated === undefined || animated;
altDefaultBackground = !(altDefaultBackground === undefined) && altDefaultBackground;
selected = !(selected === undefined) && selected;
const styles = useStyles();
const {iconStroke, iconBackground,
iconBackgroundBrand} = (importDefault(15326) /* metro dependency 15326: useSimpleGuildDefaultColors */)();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
let r17 = guild?.name ?? '';
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildReadStateStore],
function() {
var object = {};
var guildIdBinding = guildId;
object.unread = GuildReadStateStore.hasUnread(guildIdBinding);
object.badge = GuildReadStateStore.getMentionCount(guildIdBinding);
return object;
}, [guildId]);
const unread2 = value10.unread;
const badge2 = value10.badge;
const env0_3 = badge2;
const simpleGuildContainerModule = require(15327) /* metro dependency 15327: SimpleGuildContainer */;
const r2 = animated ? simpleGuildContainerModule.SimpleGuildContainerAnimated : simpleGuildContainerModule.SimpleGuildContainer;
const {containerSize, containerSizeStyle,
containerStyles} = (importDefault(15329) /* metro dependency 15329: useSimpleGuildSize */)({size: size,
style: style});
const value13 = env0_3.useMemo(_fun117212, [r17, unread2, badge2]);
const value14 = (require(14421) /* metro dependency 14421: GuildsBarActivityIndicator */).useActivityIndicatorState(guildId);
let r4 = unread2 || selected;
r4 = !r4 ? badge2 > 0 : r4;
r4 = (!r4 ? value14.source != null : r4) && backgroundColor === 'transparent';
r17 = guild != null ? getGuildIconSource(guild, containerSize, selected && !r4) : undefined;
const r15 = r17 === null || typeof r17 !== 'object' ? r17 != null : 'uri' in r17 ? r17.uri != null : r17 != null;
const r2Props = {guildIconRef: guildIconRef, guildId: guild?.id, style: containerStyles,
backgroundColor: backgroundColor, selected: selected, size: size, borderRadius: borderRadius, onPress: onPress,
onLongPress: onLongPress, unread: unread ?? unread2, badge: badge ?? badge2, onLayout: onLayout,
onAccessibilityAction: onAccessibilityAction, accessibilityLabel: value13, usingCutout: r4,
activityIndicatorState: value14};
if (guildId === ME) {
var viewBindingProps = {style: styles.dmsWrapper};
ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
r4 = <View {...viewBindingProps}><ChatIcon color={selected ? colors.WHITE : colors.MOBILE_GUILDBAR_ICON_DEFAULT} /></View>;
} else if (r4) {
CutoutImage = importDefault(15328) /* metro dependency 15328: CutoutImage */;
object = {'cutoutBottomRightSize': null, 'cutoutBottomRightInsetX': 6, 'cutoutBottomRightInsetY': 7,
'cutoutTopRightSize': null, 'cutoutTopRightInsetX': 8, 'cutoutTopRightInsetY': 8};
value23 = 0;
value24 = 13;
object.cutoutBottomRightSize = badge2 > value23 ? value24 : unread2 ? 11 : value23;
object.cutoutTopRightSize = value14.source != null ? value24 : value23;
object.imageSize = containerSize;
object.imageSource = r17;
object.imageBorderRadius = borderRadius;
color = r15 ? iconBackground.color : iconBackgroundBrand.color;
object.imageBackgroundColor = color;
object.clipOuterAmount = selected ? 3 : value23;
object.borderStroke = 1;
color = iconStroke.color;
object.borderStrokeColor = color;
r4 = <CutoutImage {...object} />;
} else {
r4 = ((Component) => <Component guild={guild} size={iconSize} selected={selected} animate={selected} TABS_altDefaultBackground={altDefaultBackground} style={size != null ? containerSizeStyle : null} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
}
return ((Component) => <Component {...r2Props}>{r4}</Component>)(r2);
}
function _fun117212() { // fn#117212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15522:1122, offset: 0x024a8ae1, size: 297 bytes, params: 1, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return env0_1 === '' ? env0_1 : badge == null ? unread === true ? intl.formatToPlainString(t.lzqe42,
{guildName: env0_1}) : intl.formatToPlainString(t['/uzRss'], {guildName: env0_1,
mentions: badge}) : badge > 0 ? intl.formatToPlainString(t['/uzRss'], {guildName: env0_1,
mentions: badge}) : unread === true ? intl.formatToPlainString(t.lzqe42,
{guildName: env0_1}) : intl.formatToPlainString(t['/uzRss'], {guildName: env0_1, mentions: badge});
}
@@ -0,0 +1,295 @@
/* Metro module 15327; source: modules/launchpad/native/shared/SimpleGuildContainer.tsx; dependencies: [31, 27, 33, 4501, 9608, 14421, 697, 15326, 3860, 15328, 4017, 4577, 2] */
function _fun117214(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:6, offset: 0x024a8cd3, size: 392 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.Pressable;
const env0_5 = value2.View;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.Fragment;
const env0_8 = value3.jsxs;
const env0_9 = {'mass': 0.2, 'damping': 40, 'stiffness': 300, 'overshootClamping': true, 'restSpeedThreshold': 1};
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({badgeWrapper: {'position': 'absolute',
'right': -4, 'bottom': 0}});
const env0_11 = value.memo(_fun117215);
const env0_12 = value.memo(_fun117216);
object = {code: 'function SimpleGuildContainerTsx1(){const{targetRadius}=this.__closure;return targetRadius;}'};
object = {code: 'function SimpleGuildContainerTsx2(){const{selected}=this.__closure;return selected?1:0;}'};
object = {code: "function SimpleGuildContainerTsx3(){const{withSpring,toRadius,springConfig,GUILD_SIZE,iconBackground}=this.__closure;return{borderRadius:withSpring(toRadius.get(),springConfig),width:GUILD_SIZE,height:GUILD_SIZE,overflow:'hidden',backgroundColor:iconBackground.color};}"};
object = {code: "function SimpleGuildContainerTsx4(){const{withSpring,toRadius,springConfig,interpolate,toStrokeWidth,borderColor,GUILD_SIZE}=this.__closure;return{borderRadius:withSpring(toRadius.get()+2,springConfig),borderWidth:withSpring(interpolate(toStrokeWidth.get(),[0,1],[0,2]),springConfig),borderColor:borderColor,position:'absolute',top:-2,left:-2,width:GUILD_SIZE+4,height:GUILD_SIZE+4};}"};
object = {code: "function SimpleGuildContainerTsx5(){const{withSpring,toRadius,springConfig,interpolate,toStrokeWidth,backgroundColor,GUILD_SIZE}=this.__closure;return{borderRadius:withSpring(toRadius.get(),springConfig),borderWidth:withSpring(interpolate(toStrokeWidth.get(),[0,1],[0,3]),springConfig),borderColor:backgroundColor,position:'absolute',top:0,left:0,width:GUILD_SIZE,height:GUILD_SIZE};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/SimpleGuildContainer.tsx');
exports.SimpleGuildContainer = SimpleGuildContainer;
exports.SimpleGuildContainerAnimated = SimpleGuildContainerAnimated;
}
function _fun117215({badge, unread, backgroundColor}) { // fn#117215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:352, offset: 0x024a8e5b, size: 117 bytes, params: 2, frame: 20
var r0;
var value;
const styles = useStyles();
if (badge <= 0) {
if (unread) {
var viewBindingProps = {style: styles.badgeWrapper};
value = importDefault(9608) /* metro dependency 9608: MaskedBadge */;
value = <View {...viewBindingProps}>{((Component) => <Component value={badge} unread={unread} backgroundColor={backgroundColor} />)(value)}</View>;
r0 = value;
} else {
r0 = null;
}
} else {
var viewBindingProps = {style: styles.badgeWrapper};
value = importDefault(9608) /* metro dependency 9608: MaskedBadge */;
value = <View {...viewBindingProps}>{((Component) => <Component value={badge} unread={unread} backgroundColor={backgroundColor} />)(value)}</View>;
r0 = value;
}
return r0;
}
function _fun117216({guildId, activityIndicatorState, backgroundColor}) { // fn#117216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:528, offset: 0x024a8ed0, size: 183 bytes, params: 2, frame: 18
var r0;
let value = null;
if (value != (value == activityIndicatorState ? undefined : activityIndicatorState.source)) {
const GuildsBarActivityIndicatorBase = (require(14421) /* metro dependency 14421: GuildsBarActivityIndicator */).GuildsBarActivityIndicatorBase;
r0 = <GuildsBarActivityIndicatorBase style={{backgroundColor: backgroundColor}} source={activityIndicatorState.source} IconComponent={activityIndicatorState.IconComponent} isCurrentUserConnected={activityIndicatorState.isCurrentUserConnected} />;
} else if (value != guildId) {
value = importDefault(14421) /* metro dependency 14421: GuildsBarActivityIndicator */;
value = ((Component) => <Component guildId={guildId} style={{backgroundColor: backgroundColor}} />)(value);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function SimpleGuildContainer({guildIconRef, guildId, style, children, selected, size, borderRadius = selected ? importDefault(dependencyMap[6]).radii.lg : 24, badge, unread, backgroundColor, folder, usingCutout, activityIndicatorState, accessibilityLabel, onAccessibilityAction, onLayout}) { // fn#117217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:2256, offset: 0x024a8f87, size: 651 bytes, params: 2, frame: 36
size = size === undefined ? 48 : size;
const env0_3 = badge;
folder = !(folder === undefined) && folder;
usingCutout = !(usingCutout === undefined) && usingCutout;
const {iconStroke,
iconBackground} = (importDefault(15326) /* metro dependency 15326: useSimpleGuildDefaultColors */)();
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
return (
<View
style={style}
accessible
accessibilityState={{selected: selected}}
accessibilityRole="button"
accessibilityLabel={accessibilityLabel}
accessibilityActions={[{name: 'activate'}]}
onAccessibilityAction={onAccessibilityAction}
>
<View
ref={guildIconRef}
onLayout={onLayout}
style={{borderRadius: borderRadius, overflow: 'hidden',
backgroundColor: usingCutout ? 'transparent' : folder ? backgroundColor : iconBackground.color}}
>
{children}
</View>
{env0_3.useMemo(_fun117219, [borderRadius, usingCutout, size, iconStroke])}
{env0_3.useMemo(_fun117218, [selected, usingCutout, activityIndicatorState?.source, badge, unread, size,
Reflect.apply(useToken, useTokenModule, [BACKGROUND_BRAND]), borderRadius, backgroundColor])}
{((Component) => <Component backgroundColor={backgroundColor} guildId={guildId} activityIndicatorState={activityIndicatorState} />)(env0_12)}
{((Component) => <Component backgroundColor={backgroundColor} badge={badge} unread={unread} />)(env0_11)}
</View>
);
}
function SimpleGuildContainerAnimated(a0) { // fn#117220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:3862, offset: 0x024a93f6, size: 1055 bytes, params: 2, frame: 42
var object2;
const guildIconRef = a0.guildIconRef;
const guildId = a0.guildId;
const style = a0.style;
const children = a0.children;
const selected = a0.selected;
a0.size;
const borderRadius = a0.borderRadius;
const badge = a0.badge;
const unread = a0.unread;
const backgroundColor = a0.backgroundColor;
a0.folder;
a0.usingCutout;
const activityIndicatorState = a0.activityIndicatorState;
const accessibilityLabel = a0.accessibilityLabel;
const onAccessibilityAction = a0.onAccessibilityAction;
const onLayout = a0.onLayout;
const onPress = a0.onPress;
const onLongPress = a0.onLongPress;
const iconBackground = (importDefault(15326) /* metro dependency 15326: useSimpleGuildDefaultColors */)().iconBackground;
const r16 = selected ? (importDefault(697) /* metro dependency 697: native */).radii.lg : borderRadius ?? 24;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = SimpleGuildContainerAnimatedV;
closure.__closure = {targetRadius: r16};
closure.__workletHash = 5259600477627;
closure.__initData = env0_13;
const value3 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
useDerivedValue = moduleValue2.useDerivedValue;
closure = SimpleGuildContainerAnimatedZ;
closure.__closure = {selected: selected};
closure.__workletHash = 12318204664732;
closure.__initData = env0_14;
const value4 = Reflect.apply(useDerivedValue, moduleValue2, [closure]);
const moduleValue3 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = SimpleGuildContainerAnimatedH;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, toRadius: value3};
const binding = env0_9;
object2.springConfig = binding;
object2.GUILD_SIZE = 48;
object2.iconBackground = iconBackground;
closure.__closure = object2;
closure.__workletHash = 11339684212259;
closure.__initData = env0_15;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
const moduleValue4 = reanimatedRexportModule;
useAnimatedStyle = moduleValue4.useAnimatedStyle;
closure = SimpleGuildContainerAnimatedJ;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, toRadius: value3,
springConfig: binding, interpolate: reanimatedRexportModule.interpolate, toStrokeWidth: value4,
borderColor: BRAND_500, GUILD_SIZE: 48};
closure.__workletHash = 1481885125958;
closure.__initData = env0_16;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
const moduleValue5 = reanimatedRexportModule;
useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = SimpleGuildContainerAnimatedM;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, toRadius: value3,
springConfig: binding, interpolate: reanimatedRexportModule.interpolate, toStrokeWidth: value4,
backgroundColor: backgroundColor, GUILD_SIZE: 48};
closure.__workletHash = 11592745547551;
closure.__initData = env0_17;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [<View2 style={value5}>{children}</View2>];
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[1] = <View3 style={value7} />;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[2] = <View4 style={value6} />;
items2[3] = ((Component) => <Component backgroundColor={backgroundColor} guildId={guildId} activityIndicatorState={activityIndicatorState} />)(env0_12);
items2[4] = ((Component) => <Component backgroundColor={backgroundColor} badge={badge} unread={unread} />)(env0_11);
const fragment = <>{items2}</>;
return onPress != null ? <Pressable ref={guildIconRef} style={style} onPress={onPress} onLongPress={onLongPress} accessibilityRole="button" accessible accessibilityLabel={accessibilityLabel} accessibilityState={{selected: selected}} onAccessibilityAction={onAccessibilityAction} onLayout={onLayout}>{fragment}</Pressable> : <View style={style}>{fragment}</View>;
}
function _fun117218() { // fn#117218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:2653, offset: 0x024a9212, size: 397 bytes, params: 1, frame: 24
var source;
var r6;
var r1;
var r0;
var usingCutoutBinding;
var value3;
var jsxRuntimeEnv1_7Binding;
var binding;
var sizeBinding;
var items2;
var value5;
var CutoutImage;
var value6;
const selectedBinding = selected;
const value2 = null;
if (selectedBinding) {
usingCutoutBinding = usingCutout;
value3 = environment.__proto__;
if (usingCutoutBinding) {
value5 = undefined;
CutoutImage = importDefault(15328) /* metro dependency 15328: CutoutImage */;
var defaultImportProps = {'style': null, 'cutoutTopRightSize': null, 'cutoutTopRightInsetX': 8,
'cutoutTopRightInsetY': 8, 'cutoutBottomRightSize': null, 'cutoutBottomRightInsetX': 6,
'cutoutBottomRightInsetY': 7, style: {'position': 'absolute', 'top': -2, 'left': -2}};
source = value2 == activityIndicatorState ? value5 : activityIndicatorState.source;
value6 = 0;
r6 = value2 != source ? 13 : value6;
defaultImportProps.cutoutTopRightSize = r6;
r6 = badge > value6 ? 13 : unread ? 11 : value6;
defaultImportProps.cutoutBottomRightSize = r6;
sizeBinding = size;
defaultImportProps.imageSize = sizeBinding + 4;
defaultImportProps.imageBackgroundColor = env0_9;
defaultImportProps.imageBorderRadius = env0_2 + 2;
defaultImportProps.clipInnerAmount = sizeBinding;
r1 = <CutoutImage {...defaultImportProps} />;
} else {
jsxRuntimeEnv1_7Binding = jsxRuntimeEnv1_7;
binding = env0_2;
sizeBinding = size;
items2 = [<View style={{'borderRadius': null, 'borderWidth': 2, 'borderColor': null, 'position': 'absolute',
'top': -2, 'left': -2, borderRadius: binding + 2, borderColor: env0_9, width: sizeBinding + 4,
height: sizeBinding + 4}} />];
items2[1] = <View style={{'borderRadius': null, 'borderWidth': 3, 'borderColor': null,
'position': 'absolute',
'top': 0, 'left': 0, borderRadius: binding, borderColor: backgroundColor, width: sizeBinding,
height: sizeBinding}} />;
r1 = <>{items2}</>;
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
}
function _fun117219() { // fn#117219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:3288, offset: 0x024a939f, size: 87 bytes, params: 1, frame: 16
return usingCutout ? null : <View style={{'position': 'absolute', 'borderWidth': 1, borderColor: iconStroke.color,
borderRadius: env0_2, width: size, height: size}} />;
}
function SimpleGuildContainerAnimatedZ() { // fn#117222, owner: SimpleGuildContainerAnimated.z, offset: 0x024a9815, size: 17 bytes, params: 1, frame: 2
return selected ? 1 : 0;
}
function SimpleGuildContainerAnimatedH() { // fn#117223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:4478, owner: SimpleGuildContainerAnimated.H, offset: 0x024a9826, size: 91 bytes, params: 1, frame: 16
const object2 = {'borderRadius': null, 'width': 48, 'height': 48, 'overflow': 'hidden'};
const springModule = require(4577) /* metro dependency 4577: spring */;
object2.borderRadius = springModule.withSpring(env0_4.get(), env1_9);
object2.backgroundColor = iconBackground.color;
return object2;
}
function SimpleGuildContainerAnimatedJ() { // fn#117224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:4807, owner: SimpleGuildContainerAnimated.j, offset: 0x024a9881, size: 179 bytes, params: 1, frame: 21
const object2 = {'borderRadius': null, 'borderWidth': null, 'borderColor': null, 'position': 'absolute', 'top': -2,
'left': -2, 'width': 52, 'height': 52};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
let binding = env0_4;
const value4 = binding.get() + 2;
binding = env1_9;
object2.borderRadius = Reflect.apply(withSpring, springModule, [value4, binding]);
value = springModule;
withSpring = value.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.borderWidth = Reflect.apply(withSpring, value, [reanimatedRexportModule.interpolate(env0_5.get(), [0, 1],
[0, 2]), binding]);
object2.borderColor = BRAND_500;
return object2;
}
function SimpleGuildContainerAnimatedM() { // fn#117225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15524:5233, owner: SimpleGuildContainerAnimated.M, offset: 0x024a9934, size: 172 bytes, params: 1, frame: 21
const object2 = {'borderRadius': null, 'borderWidth': null, 'borderColor': null, 'position': 'absolute', 'top': 0,
'left': 0, 'width': 48, 'height': 48};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
let binding = env0_4;
const value3 = binding.get();
binding = env1_9;
object2.borderRadius = Reflect.apply(withSpring, springModule, [value3, binding]);
value = springModule;
withSpring = value.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.borderWidth = Reflect.apply(withSpring, value, [reanimatedRexportModule.interpolate(env0_5.get(), [0, 1],
[0, 3]), binding]);
object2.borderColor = backgroundColor;
return object2;
}
@@ -0,0 +1,131 @@
/* Metro module 15340; source: modules/launchpad/native/shared/TextChannel.tsx; dependencies: [31, 27, 5071, 1949, 1379, 1309, 4865, 33, 4501, 15332, 697, 14436, 6860, 566, 4805, 9619, 13775, 5087, 4584, 15341, 6632, 11600, 10975, 3834, 15343, 8448, 14700, 15333, 5278, 15344, 15345, 15336, 15339, 2] */
function _fun117274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:6, offset: 0x024acabe, size: 307 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const activeJoinedThreadsStore = importDefault(5071) /* metro dependency 5071: ActiveJoinedThreadsStore */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_8 = (require(1309) /* metro dependency 1309: FormConstants */).getThemedRippleConfig;
const env0_9 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const value2 = require(33) /* metro dependency 33 */;
const env0_10 = value2.jsx;
const env0_11 = value2.jsxs;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun117275);
value = value.memo(TextChannel);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/TextChannel.tsx');
exports.default = value;
}
function _fun117275() { // fn#117275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:258, offset: 0x024acbf1, size: 194 bytes, params: 1, frame: 15
const object5 = {};
const object6 = {'flex': 1, 'borderRadius': null, 'marginBottom': 1};
object6.borderRadius = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)().container.borderRadius;
object5.pressable = object6;
const object7 = {'position': 'absolute', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0, 'borderWidth': 1};
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object7.borderColor = BORDER_MUTED;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object5.selectedBorder = object7;
const object8 = {};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object8.backgroundColor = BACKGROUND_MOD_MUTED;
object5.rowSelected = object8;
return object5;
}
function TextChannel({channel, subtitle, muted, navigationReplace, showGuildBadgeIcon, selected}) { // fn#117276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:613, offset: 0x024accb3, size: 1341 bytes, params: 2, frame: 47
var r33;
var moduleValue9;
muted = !(muted === undefined) && muted;
navigationReplace = !(navigationReplace === undefined) && navigationReplace;
selected = !(selected === undefined) && selected;
const id = channel.id;
const isForumLikeChannel2 = channel.isForumLikeChannel();
const guild_id = channel.guild_id;
const {newChannel, optInEnabled, unread, resolvedUnreadSetting, mentionCount,
isMentionLowImportance} = (require(14436) /* metro dependency 14436: useChannelUnreadBadgeState */).useChannelUnreadBadgeState(channel,
muted);
const styles = useStyles(muted, unread);
const threadHooksModule = require(6860) /* metro dependency 6860: ThreadHooks */;
const useHasActiveThreads = threadHooksModule.useHasActiveThreads;
const hasActiveThreads = Reflect.apply(useHasActiveThreads, threadHooksModule, [channel]).hasActiveThreads;
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const newThreadCount = Reflect.apply(useStateFromStores, fluxModule, [[ActiveJoinedThreadsStore], function() {
var channelBinding = channel;
return ActiveJoinedThreadsStore.getNewThreadCount(channelBinding.guild_id, channelBinding.id);
}]);
const moduleValue4 = fluxModule;
useStateFromStores = moduleValue4.useStateFromStores;
const r34 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(Reflect.apply(useStateFromStores,
moduleValue4, [[ChannelStore], function() {
return ChannelStore.getChannel(channel.parent_id);
}])) ?? undefined;
const value9 = (require(9619) /* metro dependency 9619: ForumHooks */).useUnreadThreadsCountForParent(channel.guild_id,
channel.id);
const value11 = (importDefault(13775) /* metro dependency 13775: useMessagePreviews */)(channel,
{unread: unread && !muted});
const value12 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel);
const value13 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const locale = fluxModule.useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const value14 = (importDefault(15341) /* metro dependency 15341: usePressUnderlayColor */)();
const {isSubscriptionGated,
needSubscriptionToAccess} = (importDefault(6632) /* metro dependency 6632: useChannelRoleSubscriptionStatus */)(channel.id);
const value16 = (importDefault(11600) /* metro dependency 11600: useEmbeddedAppsForChannel */)(channel);
if (value11 == null) {
moduleValue9 = require(15343) /* metro dependency 15343: ChannelSubtitle */;
r33 = moduleValue9.renderChannelSubtitle({subtitle: subtitle, muted: muted, channelId: id, guildId: guild_id});
} else if (value12) {
moduleValue9 = require(15343) /* metro dependency 15343: ChannelSubtitle */;
r33 = moduleValue9.renderChannelSubtitle({subtitle: subtitle, muted: muted, channelId: id, guildId: guild_id});
} else {
const ChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview;
r33 = <ChannelRowPreview channel={channel} message={value11} color="text-muted" muted={muted} layout={(require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes.COMPACT} />;
}
const value19 = (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).useIsActivitiesInTextEnabled(channel.id);
const value21 = env0_3.useMemo(_fun117280, [value16.length > 0, value16]);
const defaultImport3 = importDefault(15333) /* metro dependency 15333: renderChannelPressableWrapper */;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const pressableHighlightProps = {style: [styles.pressable, selected ? styles.rowSelected : undefined],
underlayColor: value14, androidRippleConfig: getThemedRippleConfig({color: value14})};
const useTextChannelPressEventsModule = require(15344) /* metro dependency 15344: useTextChannelPressEvents */;
const useTextChannelPressEvents = useTextChannelPressEventsModule.useTextChannelPressEvents;
copyDataProperties(pressableHighlightProps, Reflect.apply(useTextChannelPressEvents,
useTextChannelPressEventsModule, [channel, navigationReplace]), undefined);
const renderChannelItemModule = require(15345) /* metro dependency 15345: renderChannelItem */;
const getChannelAccessibilityProps = renderChannelItemModule.getChannelAccessibilityProps;
copyDataProperties(pressableHighlightProps, Reflect.apply(getChannelAccessibilityProps, renderChannelItemModule,
[{channel: channel, unread: unread, mentionCount: mentionCount}]), undefined);
const items2 = [selected && <View style={styles.selectedBorder} pointerEvents="none" />];
const defaultImport4 = importDefault(15345) /* metro dependency 15345: renderChannelItem */;
const object = {channel: channel, channelCategoryName: r34, subtitle: r33, hasActiveThreads: hasActiveThreads};
object.unreadBadge = ((Component) => <Component unread={unread} resolvedUnreadSetting={resolvedUnreadSetting} muted={muted} />)(importDefault(15336) /* metro dependency 15336: UnreadBadge */);
object.mentionBadge = (importDefault(15339) /* metro dependency 15339: renderChannelBadge */)({newChannel: newChannel && optInEnabled,
mentionCount: mentionCount, isMentionLowImportance: isMentionLowImportance,
postsWithUnreadsCount: isForumLikeChannel2 && value9 > 0 ? muted || resolvedUnreadSetting !== UnreadSetting.ALL_MESSAGES ? undefined : value9 : undefined,
newPostCount: isForumLikeChannel2 && value9 > 0 ? muted ? undefined : newThreadCount : undefined,
locale: locale});
object.unread = unread;
object.resolvedUnreadSetting = resolvedUnreadSetting;
object.mentionCount = mentionCount;
object.muted = muted;
object.channelName = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
object.fontScale = value13;
object.isSubscriptionGated = isSubscriptionGated;
object.needSubscriptionToAccess = needSubscriptionToAccess;
object.showGuildBadgeIcon = showGuildBadgeIcon;
object.end = value19 ? value21 : null;
items2[1] = defaultImport4(object);
return defaultImport3(<PressableHighlight {...pressableHighlightProps}>{items2}</PressableHighlight>);
}
function _fun117280() { // fn#117280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:1764, offset: 0x024ad238, size: 60 bytes, params: 1, frame: 15
return env0_2 ? ((Component) => <Component embeddedApps={env0_1} />)(importDefault(14700) /* metro dependency 14700: ChannelItemEmbeddedActivities */) : null;
}
@@ -0,0 +1,61 @@
/* Metro module 15336; source: modules/launchpad/native/shared/UnreadBadge.tsx; dependencies: [31, 27, 10980, 4865, 33, 4501, 15332, 4584, 9609, 2] */
function _fun117264(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15533:6, offset: 0x024abd44, size: 260 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(10980) /* metro dependency 10980: RedesignChannelListConstants */).MUTED_OPACITY_CONTENT;
const env0_5 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({unreadBadge: {'flexGrow': 0,
'flexShrink': 0, 'position': 'absolute'}});
value = value.memo(UnreadBadge);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/UnreadBadge.tsx');
exports.default = value;
}
function UnreadBadge({unread, resolvedUnreadSetting, muted}) { // fn#117265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15533:289, offset: 0x024abe48, size: 307 bytes, params: 2, frame: 24
var r0;
var object4;
var unreadBadge;
var items2;
var object5;
var size;
var Badge;
var object3;
var CHANNEL_BADGE_SIZE;
var Math;
var max;
var value5;
const styles = useStyles();
const value2 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
if (unread) {
object4 = {};
unreadBadge = styles.unreadBadge;
items2 = [unreadBadge];
unreadBadge = value2.unreadBadge;
items2[1] = unreadBadge.position;
object5 = {};
unreadBadge = value2.unreadBadge;
size = unreadBadge.size;
object5.width = size;
unreadBadge = value2.unreadBadge;
size = unreadBadge.size;
object5.height = size;
items2[2] = object5;
object4.style = items2;
Badge = importDefault(9609) /* metro dependency 9609: Badge */;
CHANNEL_BADGE_SIZE = (require(9609) /* metro dependency 9609: Badge */).CHANNEL_BADGE_SIZE;
Math = global.Math;
max = Math.max;
value5 = 1;
r0 = <View {...object4}><Badge classic size={CHANNEL_BADGE_SIZE * Reflect.apply(max, Math,
[(require(4584) /* metro dependency 4584: useFontScale */).useFontScale(),
value5])} badgeStyle={[{opacity: resolvedUnreadSetting !== UnreadSetting.ALL_MESSAGES || muted ? MUTED_OPACITY_CONTENT : value5}]} /></View>;
} else {
r0 = null;
}
return r0;
}
@@ -0,0 +1,278 @@
/* Metro module 15347; source: modules/launchpad/native/shared/VoiceOrStageChannel.tsx; dependencies: [5, 31, 27, 4810, 1384, 1949, 4864, 4300, 661, 1309, 1386, 33, 1244, 8113, 1962, 7709, 6632, 6664, 8919, 1230, 6947, 15323, 12129, 4501, 4048, 7702, 4002, 15332, 7721, 14436, 566, 6273, 6268, 11600, 15345, 4805, 15341, 4584, 10978, 15333, 5278, 15343, 15339, 14700, 11814, 15348, 14705, 2] */
function _fun117302(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:6, offset: 0x024ae2a3, size: 450 bytes, params: 8, frame: 19
const env0_0 = require;
const handleVoiceOrStageChannelConnectPress_117304 = function() {
return _handleVoiceOrStageChannelConnectPress_117305.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const stageChannelParticipantStore = importDefault(4810) /* metro dependency 4810: StageChannelParticipantStore */;
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).Routes;
const env0_12 = (require(1309) /* metro dependency 1309: FormConstants */).getThemedRippleConfig;
const env0_13 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
const value2 = require(33) /* metro dependency 33 */;
const env0_14 = value2.jsx;
const env0_15 = value2.jsxs;
const env0_16 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
return {voiceUsers: {'display': 'flex', 'flexDirection': 'row', 'paddingRight': 16, 'marginTop': -2},
pressable: {flex: 1}};
});
const env0_17 = [];
const env0_18 = value.memo(UnmemoedVoiceOrStageChannelBase);
value = value.memo(VoiceOrStageChannel);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/VoiceOrStageChannel.tsx');
exports.default = value;
}
function getStageChannelAccessibilityProps_117303({channelName, channel, userCount}) { // fn#117303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:288, offset: 0x024ae465, size: 283 bytes, params: 2, frame: 21
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const TPPk2T = t.TPPk2T;
const value2 = Reflect.apply(formatToPlainString, intl, [TPPk2T, {channelName: channelName}]);
const userLimit = channel.userLimit;
return {'accessible': true, 'accessibilityRole': 'button',
accessibilityLabel: userLimit == null ? userCount > 0 ? intl.formatToPlainString(t['7yr3Qc'],
{channelName: channelName,
userCount: userCount}) : value2 : channel.userLimit > 0 ? intl.formatToPlainString(t.rhh6Ev,
{channelName: channelName, userCount: userCount,
limit: channel.userLimit}) : userCount > 0 ? intl.formatToPlainString(t['7yr3Qc'], {channelName: channelName,
userCount: userCount}) : value2};
}
function _handleVoiceOrStageChannelConnectPress_117305() { // fn#117305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:860, offset: 0x024ae580, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun117307).apply(this, arguments);
}
function useVoiceChannelPressEvents(a0) { // fn#117308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:1148, offset: 0x024ae653, size: 111 bytes, params: 2, frame: 18
const env0_0 = a0;
const value = useVoiceChannelPressEventsUseVoiceChannelOnPressHandler();
const object2 = {};
object2.onPress = env0_4.useCallback(_fun117315, [a0, value]);
object2.onLongPress = env0_4.useCallback(_fun117316, [a0.id]);
return object2;
}
function UnmemoedVoiceOrStageChannelBase({channel, subtitle, voiceStates = env0_17, speakerVoiceStates = env0_17}) { // fn#117318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:2099, offset: 0x024ae8ea, size: 1368 bytes, params: 2, frame: 48
var r38;
var r5;
var voiceUsers;
var items4;
const id = channel.id;
const guild_id = channel.guild_id;
const value5 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const value6 = (importDefault(7702) /* metro dependency 7702: useIsUsingClientTheme */)();
const sharedModule = require(4002) /* metro dependency 4002: shared */;
const styles = useStyles(value6, sharedModule.isThemeLight(value5));
const value7 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
const value8 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
const {unread,
mentionCount} = (require(14436) /* metro dependency 14436: useChannelUnreadBadgeState */).useBaseChannelUnreadBadgeState(channel,
!value8);
const value10 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
function() {
return UserGuildSettingsStore.resolveUnreadSetting(channel);
});
const stageChannelParticipantStoreHooksModule = require(6273) /* metro dependency 6273: StageChannelParticipantStoreHooks */;
const useStageParticipantsCount = stageChannelParticipantStoreHooksModule.useStageParticipantsCount;
const id2 = channel.id;
const StageChannelParticipantNamedIndex = (require(6268) /* metro dependency 6268: StageChannelParticipants */).StageChannelParticipantNamedIndex;
const AUDIENCE = StageChannelParticipantNamedIndex.AUDIENCE;
const value11 = Reflect.apply(useStageParticipantsCount, stageChannelParticipantStoreHooksModule, [id2, AUDIENCE]);
const r28 = value11 + voiceStates.length ?? 0;
const value15 = useVoiceChannelPressEvents(channel);
const value16 = (importDefault(11600) /* metro dependency 11600: useEmbeddedAppsForChannel */)(channel);
const channelAccessibilityProps = (require(15345) /* metro dependency 15345: renderChannelItem */).getChannelAccessibilityProps({channel: channel,
unread: unread, mentionCount: mentionCount, voiceStates: voiceStates, embeddedActivitiesCount: value16.length});
const value18 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore],
function() {
return StageInstanceStore.getStageInstanceByChannel(channel.id);
}, [channel.id]);
const topic = value18?.topic;
const value19 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, false);
const value20 = (channel.isGuildStageVoice() ? speakerVoiceStates : voiceStates).map(function(a0) {
return a0.user;
});
const value21 = (importDefault(15341) /* metro dependency 15341: usePressUnderlayColor */)();
const value22 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const {isSubscriptionGated,
needSubscriptionToAccess} = (importDefault(6632) /* metro dependency 6632: useChannelRoleSubscriptionStatus */)(channel.id);
env0_4.useEffect(_fun117323, [value8, subtitle]);
const defaultImport3 = importDefault(15333) /* metro dependency 15333: renderChannelPressableWrapper */;
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
const pressableHighlightProps = {style: [styles.pressable, {paddingBottom: voiceStates.length > 0 ? 6 : 0,
borderRadius: value7.container.borderRadius}], underlayColor: value21,
androidRippleConfig: getThemedRippleConfig({color: value21}), ...value15,
...(channel.isGuildStageVoice() ? getStageChannelAccessibilityProps_117303({channelName: value19,
channel: channel, userCount: r28}) : channelAccessibilityProps)};
const defaultImport4 = importDefault(15345) /* metro dependency 15345: renderChannelItem */;
const object = {channel: channel};
object.subtitle = (require(15343) /* metro dependency 15343: ChannelSubtitle */).renderChannelSubtitle({subtitle: topic ?? subtitle,
channelId: id, guildId: guild_id, connected: value8});
object.unread = unread || mentionCount > 0;
object.resolvedUnreadSetting = value10;
object.mentionCount = mentionCount;
object.mentionBadge = (importDefault(15339) /* metro dependency 15339: renderChannelBadge */)({mentionCount: mentionCount,
locale: locale});
object.live = value18 != null;
object.end = value16.length > 0 ? ((Component) => <Component embeddedApps={value16} size={value7.joinVoiceButton.icon.gameSize} />)(importDefault(14700) /* metro dependency 14700: ChannelItemEmbeddedActivities */) : ((VocalChannelJoinButton) => <VocalChannelJoinButton channel={channel} voiceStates={voiceStates} />)((require(11814) /* metro dependency 11814: components */).VocalChannelJoinButton);
object.connected = value8;
object.fontScale = value22;
object.isSubscriptionGated = isSubscriptionGated;
object.needSubscriptionToAccess = needSubscriptionToAccess;
object.showGuildBadgeIcon = true;
const value29 = defaultImport4(object);
if (voiceStates.length > 0) {
voiceUsers = styles.voiceUsers;
items4 = [voiceUsers];
voiceUsers = value7.voiceUsers;
items4[1] = voiceUsers.margin;
r5 = <View style={items4}>{((Component) => <Component users={value20} max={5} guildId={channel.guild_id} audienceCount={value11} />)(importDefault(15348) /* metro dependency 15348: VoiceOrStageSummaryRow */)}</View>;
} else {
r5 = null;
}
return defaultImport3(<PressableHighlight {...pressableHighlightProps}>{value29}{r5}</PressableHighlight>);
}
function VoiceOrStageChannel({channel, customSubtitle}) { // fn#117324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:4155, offset: 0x024aeeea, size: 154 bytes, params: 2, frame: 21
return ((Component) => <Component channel={channel} voiceStates={(require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
function() {
return SortedVoiceStateStore.getVoiceStatesForChannel(channel);
})} speakerVoiceStates={(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([StageChannelParticipantStore],
_fun117326)} subtitle={customSubtitle} />)(env0_18);
}
function* _fun117307(a0) { // fn#117307, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:959, offset: 0x024ae5bd, size: 150 bytes, params: 2, frame: 17
if (true) {
value = a0.isGuildStageVoice();
var binding = env2_0;
var binding2 = env2_2;
var value4 = binding(binding2[14]);
if (value) {
yield value4(binding2[13], binding2.paths);
value = undefined;
if (false) {
return value;
}
value.connectAndOpen(a0);
} else {
yield value4(binding2[15], binding2.paths);
value = undefined;
if (false) {
return value;
}
value.openGuildVoiceModal(a0, 'Channel List');
}
}
}
function useVoiceChannelPressEventsUseVoiceChannelOnPressHandler() { // fn#117309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:1193, owner: useVoiceChannelPressEvents.useVoiceChannelOnPressHandler, offset: 0x024ae6c2, size: 39 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_4.useCallback(_fun117310(), []);
}
function _fun117315() { // fn#117315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:1770, offset: 0x024ae828, size: 107 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (env0_0.guild_id != null) {
value2 = environment.__proto__;
moduleValue = require(6947) /* metro dependency 6947: transitionToGuildNative */;
moduleValue.transitionToGuild(env0_0.guild_id);
}
(importDefault(15323) /* metro dependency 15323: hideLaunchPad */)();
env0_1(env0_0);
}
function _fun117316() { // fn#117316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:1884, offset: 0x024ae893, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(12129) /* metro dependency 12129: openChannelLongPressActionSheet */;
return value.openChannelLongPressActionSheet(env0_0.id);
}
function _fun117323() { // fn#117323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:3128, offset: 0x024aee7d, size: 109 bytes, params: 1, frame: 12
var value5;
var messagePreviewASTCache;
if (subtitle != null && typeof subtitle !== 'string' && subtitle.type === 'voice') {
value5 = environment.__proto__;
messagePreviewASTCache = (require(10978) /* metro dependency 10978: MessagePreviewMarkup */).messagePreviewASTCache;
messagePreviewASTCache.del(subtitle.text);
}
}
function _fun117326() { // fn#117326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:4329, offset: 0x024aef9f, size: 114 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
const getMutableParticipants = StageChannelParticipantStore.getMutableParticipants;
const id = channel.id;
const StageChannelParticipantNamedIndex = (require(6268) /* metro dependency 6268: StageChannelParticipants */).StageChannelParticipantNamedIndex;
const SPEAKER = StageChannelParticipantNamedIndex.SPEAKER;
value = Reflect.apply(getMutableParticipants, StageChannelParticipantStore, [id, SPEAKER]);
value = value.filter(function({type}) {
return type === require(dependencyMap[32]).StageChannelParticipantTypes.VOICE;
});
return value.map((require(14705) /* metro dependency 14705: useStageChannelSpeakerVoiceStates */).transformParticipantToSortedVoiceState);
}
function _fun117310() { // fn#117310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:1255, offset: 0x024ae6e9, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun117312);
return _fun117314;
}
function* _fun117312(a0) { // fn#117312, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15544:1275, offset: 0x024ae718, size: 272 bytes, params: 2, frame: 21
var environment;
var r2;
var value7;
var transitionTo;
var binding2;
if (false) {
return undefined;
}
const env0_0 = a0;
value = environment.__proto__.__proto__.__proto__.__proto__;
let binding = env4_0;
const value3 = undefined;
const value4 = binding(env4_2[16]);
const getChannelRoleSubscriptionStatus = value4.getChannelRoleSubscriptionStatus;
const needSubscriptionToAccess = Reflect.apply(getChannelRoleSubscriptionStatus, value4,
[a0.id]).needSubscriptionToAccess;
const guildId = a0.getGuildId();
if (guildId != null) {
binding = env4_0;
var value6 = binding(env4_2[17]);
if (value6.shouldShowMembershipVerificationGate(guildId)) {
binding = env4_0;
binding2 = env4_2;
value = binding(binding2[14]);
yield value(binding2[18], binding2.paths);
value = undefined;
if (false) {
return value;
}
value = value.openMemberVerificationModal(guildId, _fun117313);
return value;
}
}
if (needSubscriptionToAccess) {
binding = env4_0;
value7 = binding(env4_2[19]);
transitionTo = value7.transitionTo;
binding = env4_11;
r2 = Reflect.apply(transitionTo, value7, [binding.CHANNEL(a0.guild_id, env4_13.ROLE_SUBSCRIPTIONS)]);
} else {
env4_20(a0);
r2 = value3;
}
return r2;
}
@@ -0,0 +1,46 @@
/* Metro module 15348; source: modules/launchpad/native/shared/VoiceOrStageSummaryRow.tsx; dependencies: [31, 27, 33, 4501, 697, 15332, 4573, 1305, 15052, 2] */
function _fun117328(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15545:6, offset: 0x024af044, size: 211 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const 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(_fun117329);
value = value.memo(VoiceOrStageSummaryRow_117330);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/VoiceOrStageSummaryRow.tsx');
exports.default = value;
}
function VoiceOrStageSummaryRow_117330({users, max, guildId, audienceCount}) { // fn#117330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15545:809, offset: 0x024af117, size: 534 bytes, params: 2, frame: 30
var object3;
var object5;
max = max === undefined ? 5 : max;
var value;
const size = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)().voiceOrStageSummaryRow.size;
const Math = global.Math;
const env0_3 = Math.max(users.length - max, 0);
const styles = useStyles(size);
const items2 = [styles.container];
items2[1] = {height: size + 4};
const value3 = users.map(_fun117331);
let r5 = audienceCount != null && audienceCount > 0;
if (r5) {
var viewProps = {style: [styles.wrapper, users.length > 0 && ({marginLeft: -12})]};
var viewProps2 = {style: [styles.badge, styles.audienceBadge]};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
value = <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.CUSTOM} style={{'height': 14,
'width': 14}} source={importDefault(15052) /* metro dependency 15052 */} />;
value = <View {...viewProps}><View {...viewProps2}>{value}{((Text) => <Text variant="text-sm/bold" style={{marginLeft: 4}}>{audienceCount}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View></View>;
r5 = value;
}
return (
<View style={items2}>
{value3}
{r5}
</View>
);
}
@@ -0,0 +1,59 @@
/* Metro module 15332; source: modules/launchpad/native/shared/getLayoutStyles.tsx; dependencies: [697, 1305, 6819, 6780, 2] */
function _fun117255(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15529:6, offset: 0x024ab626, size: 926 bytes, params: 8, frame: 25
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
object2.layout = {margin: {'marginLeft': 8, 'marginRight': 8, 'marginVertical': 0}};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object4.padding = {'paddingVertical': 4, 'paddingLeft': 8, 'paddingRight': 8};
object2.container = object4;
object2.voiceUsers = {height: 36, margin: {marginLeft: 60}};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
object2.voiceOrStageSummaryRow = {size: 24, avatarSize: XSMALL};
object2.channelName = {height: 20, text: {variant: 'redesign/channel-title/semibold'}};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
let EXTRA_SMALL = IconSizes.EXTRA_SMALL;
object2.messagePreview = {'messageTypeIconSize': null, 'messageTypeIconSizeNew': 'xxs', 'height': 16,
messageTypeIconSize: EXTRA_SMALL, text: {variant: 'text-xs/medium'}, margin: {marginTop: 0}};
object2.timestamp = {text: {variant: 'text-xs/medium'}};
object2.inviteRow = {text: {variant: 'text-sm/semibold'}};
const object5 = {};
let REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object5.avatarSize = REFRESH_MEDIUM_32;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const SMALL_32 = GuildIconSizes.SMALL_32;
object5.guildIconSize = SMALL_32;
const XXSMALL_12 = GuildIconSizes.XXSMALL_12;
object5.guildBadgeIconSize = XXSMALL_12;
object5.wrapper = {size: 32};
object5.channelIcon = {size: 16};
object5.margin = {marginRight: 8};
object5.emoji = {'size': 16, 'lineHeight': 24};
object2.icon = object5;
object2.unreadBadge = {size: 8, position: {left: -12}};
object2.mentionBadge = {position: {top: 28}};
object2.category = {height: 30, margin: {marginTop: 16}, text: {size: 14}};
REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object2.typing = {position: {'top': 3, 'left': 3}, typingIndicator: {position: {'top': 20, 'left': 10}},
avatarSize: REFRESH_MEDIUM_32};
object2.activeThreadCount = {text: {variant: 'text-xs/bold'}};
const object6 = {};
EXTRA_SMALL = IconSizes.EXTRA_SMALL;
object6.size = EXTRA_SMALL;
const GameIconSizes = (require(6780) /* metro dependency 6780: GameIcon */).GameIconSizes;
const SIZE_24 = GameIconSizes.SIZE_24;
object6.gameSize = SIZE_24;
object2.joinVoiceButton = {text: {variant: 'text-xs/bold'}, layout: {'paddingVertical': 4, 'paddingRight': 8,
'paddingLeft': 8, 'height': 24}, icon: object6};
object2.threadSpine = {'left': 38, 'startAndEndHeight': 15, 'transform': null, 'topOffset': -2,
transform: [{translateY: 10}]};
object2.happeningNow = {margin: {'marginTop': 16, 'marginBottom': 16}};
object2.separator = {margin: {marginVertical: 12}};
object2.searchButton = {margin: {marginHorizontal: 12}};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/getLayoutStyles.tsx');
exports.default = getLayoutStyle;
}
@@ -0,0 +1,18 @@
/* Metro module 15335; source: modules/launchpad/native/shared/getScaledChannelRowHeight.tsx; dependencies: [15332, 2] */
function _fun117262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15532:6, offset: 0x024abc1a, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/getScaledChannelRowHeight.tsx');
exports.default = getScaledChannelRowHeight_117263;
}
function getScaledChannelRowHeight_117263(a0) { // fn#117263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15532:197, offset: 0x024abc7d, size: 199 bytes, params: 2, frame: 16
const value = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
return Reflect.apply(max, Math, [Math2.max(a0,
1) * (value.channelName.height + (value.messagePreview.margin.marginTop + value.messagePreview.height)),
value.icon.wrapper.size]) + 2 * value.container.padding.paddingVertical + 2 * value.layout.margin.marginVertical + 4;
}
@@ -0,0 +1,115 @@
/* Metro module 15339; source: modules/launchpad/native/shared/renderChannelBadge.tsx; dependencies: [31, 33, 1305, 11819, 4573, 1244, 1856, 2] */
function _fun117272(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15536:6, offset: 0x024ac865, size: 138 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_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/renderChannelBadge.tsx');
exports.default = renderChannelBadge_117273;
}
function renderChannelBadge_117273({newChannel, mentionCount, isMentionLowImportance, postsWithUnreadsCount, newPostCount, eventsMentionCount, locale}) { // fn#117273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15536:216, offset: 0x024ac8ef, size: 463 bytes, params: 2, frame: 25
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
var GkAbqY;
var object;
newChannel = !(newChannel === undefined) && newChannel;
mentionCount = mentionCount === undefined ? 0 : mentionCount;
let value = null;
if (value == mentionCount) {
if (newChannel) {
value = importDefault(11819) /* metro dependency 11819: NewBadge */;
value = ((Component) => <Component />)(value);
r0 = value;
} else if (value == newPostCount) {
if (value == postsWithUnreadsCount) {
if (value != eventsMentionCount && eventsMentionCount > 0) {
const Badge = (require(1305) /* metro dependency 1305: native */).Badge;
r0 = <Badge value={eventsMentionCount} eventsMentionBadge />;
} else {
r0 = value;
}
} else if (postsWithUnreadsCount > 0) {
r0 = <Text variant="text-xs/bold" color="text-muted">{postsWithUnreadsCount}</Text>;
} else if (value != eventsMentionCount && eventsMentionCount > 0) {
const Badge2 = (require(1305) /* metro dependency 1305: native */).Badge;
r0 = <Badge2 value={eventsMentionCount} eventsMentionBadge />;
} else {
r0 = value;
}
} else if (newPostCount > 0) {
format = intl.format;
GkAbqY = (require(1244) /* metro dependency 1244: indexNative */).t.GkAbqY;
object = {};
value = require(1856) /* metro dependency 1856: NumberUtils */;
object.count = value.humanizeValue(newPostCount, locale);
value = <Text variant="text-xs/bold" color="text-brand">{Reflect.apply(format, intl, [GkAbqY,
object])}</Text>;
r0 = value;
} else if (value == postsWithUnreadsCount) {
if (value != eventsMentionCount && eventsMentionCount > 0) {
const Badge3 = (require(1305) /* metro dependency 1305: native */).Badge;
r0 = <Badge3 value={eventsMentionCount} eventsMentionBadge />;
} else {
r0 = value;
}
} else if (postsWithUnreadsCount > 0) {
r0 = <Text variant="text-xs/bold" color="text-muted">{postsWithUnreadsCount}</Text>;
} else if (value != eventsMentionCount && eventsMentionCount > 0) {
const Badge4 = (require(1305) /* metro dependency 1305: native */).Badge;
r0 = <Badge4 value={eventsMentionCount} eventsMentionBadge />;
} else {
r0 = value;
}
} else if (mentionCount > 0) {
const Badge5 = (require(1305) /* metro dependency 1305: native */).Badge;
r0 = <Badge5 value={mentionCount} isMentionLowImportance={isMentionLowImportance} />;
} else if (newChannel) {
value = importDefault(11819) /* metro dependency 11819: NewBadge */;
value = ((Component) => <Component />)(value);
r0 = value;
} else if (value == newPostCount) {
if (value == postsWithUnreadsCount) {
if (value != eventsMentionCount && eventsMentionCount > 0) {
const Badge6 = (require(1305) /* metro dependency 1305: native */).Badge;
r0 = <Badge6 value={eventsMentionCount} eventsMentionBadge />;
} else {
r0 = value;
}
} else if (postsWithUnreadsCount > 0) {
r0 = <Text variant="text-xs/bold" color="text-muted">{postsWithUnreadsCount}</Text>;
} else if (value != eventsMentionCount && eventsMentionCount > 0) {
const Badge7 = (require(1305) /* metro dependency 1305: native */).Badge;
r0 = <Badge7 value={eventsMentionCount} eventsMentionBadge />;
} else {
r0 = value;
}
} else if (newPostCount > 0) {
format = intl.format;
GkAbqY = (require(1244) /* metro dependency 1244: indexNative */).t.GkAbqY;
object = {};
value = require(1856) /* metro dependency 1856: NumberUtils */;
object.count = value.humanizeValue(newPostCount, locale);
value = <Text variant="text-xs/bold" color="text-brand">{Reflect.apply(format, intl, [GkAbqY, object])}</Text>;
r0 = value;
} else if (value == postsWithUnreadsCount) {
if (value != eventsMentionCount && eventsMentionCount > 0) {
const Badge8 = (require(1305) /* metro dependency 1305: native */).Badge;
r0 = <Badge8 value={eventsMentionCount} eventsMentionBadge />;
} else {
r0 = value;
}
} else if (postsWithUnreadsCount > 0) {
r0 = <Text variant="text-xs/bold" color="text-muted">{postsWithUnreadsCount}</Text>;
} else if (value != eventsMentionCount && eventsMentionCount > 0) {
const Badge9 = (require(1305) /* metro dependency 1305: native */).Badge;
r0 = <Badge9 value={eventsMentionCount} eventsMentionBadge />;
} else {
r0 = value;
}
return r0;
}
@@ -0,0 +1,89 @@
/* Metro module 15337; source: modules/launchpad/native/shared/renderChannelContent.tsx; dependencies: [31, 27, 10980, 4865, 33, 4501, 477, 15332, 5107, 15338, 4573, 6705, 8129, 14538, 2] */
function _fun117266(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15534:6, offset: 0x024abf7b, size: 446 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_6 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = 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_9 = Reflect.apply(createStyles, createStylesModule, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/renderChannelContent.tsx');
exports.default = renderChannelContent_117268;
}
function ChannelContent({name, subtitle, unread, resolvedUnreadSetting, locked, muted, lastMessageTimestampString, channel, channelCategoryName, connected, mentionCount, mentionBadge, isSubscriptionGated, needSubscriptionToAccess}) { // fn#117267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15534:723, offset: 0x024ac139, size: 1190 bytes, params: 2, frame: 49
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object10;
var items4;
const styles = useStyles();
const value3 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
let r34 = channel != null && (locked || (importDefault(5107) /* metro dependency 5107: isRoleRequired */)(channel));
let r33 = channel?.isNSFW();
const isValidElement2 = env0_3.isValidElement(subtitle);
const value7 = lastMessageTimestampString != null;
let r12 = value7 && mentionBadge == null;
const items3 = [styles.leftBox];
items3[1] = {justifyContent: isValidElement2 ? 'space-between' : 'center'};
const object = {'flexDirection': 'row', 'paddingRight': null, 'alignItems': 'center'};
object.paddingRight = r12 ? 30 : 0;
const items2 = [((Component) => <Component title={name} muted={muted} unread={unread} resolvedUnreadSetting={resolvedUnreadSetting ?? UnreadSetting.ONLY_MENTIONS} connected={connected} />)(importDefault(15338) /* metro dependency 15338: ChannelTitle */)];
items2[1] = channelCategoryName != null ? <Text variant="text-xs/bold" color="text-muted" style={{marginRight: 4}}>{channelCategoryName}</Text> : null;
let r24 = r34 || r33;
if (r24) {
var viewProps = {style: [styles.channelTraits, {maxWidth: 14 * (r34 && r33 ? 2 : 1)}]};
r34 = r34 && ((LockIcon) => <LockIcon size="xxs" color="icon-muted" style={styles.channelTraitIcon} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon);
items4 = [r34];
r33 = r33 && ((WarningIcon) => <WarningIcon size="xxs" color="icon-muted" style={styles.channelTraitIcon} />)((require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon);
items4[1] = r33;
items4[2] = isSubscriptionGated && ((Component) => <Component locked={needSubscriptionToAccess} isInMainTabsExperiment />)(importDefault(14538) /* metro dependency 14538: GuildRoleSubscriptionGatedChannelIcon */);
r24 = <View {...viewProps}>{items4}</View>;
}
items2[2] = r24;
const view = <View style={items3}><View style={object}>{items2}</View>{isValidElement2 ? <View style={[{paddingRight: (mentionCount ?? 0) > 0 ? 20 : 0},
{marginTop: value3.messagePreview.margin.marginTop}]}>{subtitle}</View> : null}</View>;
const r11 = r12 ? styles.rightContentAbsolute : styles.rightBox;
const items8 = [value7 && <Text variant="text-xs/medium" color="text-muted" style={{marginLeft: 'auto',
opacity: muted ? 1 : SUBTITLE_OPACITY_NORMAL}} maxFontSizeMultiplier={1.75}>{lastMessageTimestampString}</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>
);
}
function renderChannelContent_117268(a0) { // fn#117268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15534:2368, offset: 0x024ac5df, size: 33 bytes, params: 2, frame: 13
return <ChannelContent {...a0} />;
}
@@ -0,0 +1,92 @@
/* Metro module 15345; source: modules/launchpad/native/shared/renderChannelItem.tsx; dependencies: [31, 27, 1867, 3793, 1878, 4865, 33, 9122, 4501, 697, 15332, 566, 6819, 11727, 4788, 15334, 9719, 15337, 4805, 2] */
function _fun117291(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15542:6, offset: 0x024ad8d4, size: 305 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(function() {
var object2 = {'position': 'absolute', 'zIndex': 1, 'bottom': -4, 'right': -4, 'borderColor': null,
'borderWidth': 2, 'borderRadius': 6};
object2.borderColor = importDefault(dependencyMap[9]).colors.BACKGROUND_BASE_LOW;
return {guildBadgeIcon: object2};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/renderChannelItem.tsx');
exports.default = renderChannelItem_117295;
exports.getChannelAccessibilityProps = getChannelAccessibilityProps_117296;
}
function LaunchpadChannelIcon_117292({channel}) { // fn#117292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15542:392, offset: 0x024ada05, size: 252 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
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={value2.icon.guildBadgeIconSize} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}</View>;
const ChannelIcon = (require(11727) /* metro dependency 11727: AppLauncherChannelListActionSheet */).ChannelIcon;
return (
<>
{view}
<ChannelIcon
channel={channel}
size="sm"
wrapperSize={32}
/>
</>
);
}
function renderChannelItem_117295({channel, channelCategoryName, subtitle, unreadBadge, mentionBadge, locked, unread, resolvedUnreadSetting = UnreadSetting.ONLY_MENTIONS, live, muted, latestMessageTimestamp, end, connected, mentionCount, channelName, fontScale, isSubscriptionGated, needSubscriptionToAccess}) { // fn#117295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15542:798, offset: 0x024adb42, size: 702 bytes, params: 2, frame: 44
var r26;
var moduleValue2;
locked = !(locked === undefined) && locked;
unread = !(unread === undefined) && unread;
live = !(live === undefined) && live;
muted = !(muted === undefined) && muted;
isSubscriptionGated = !(isSubscriptionGated === undefined) && isSubscriptionGated;
needSubscriptionToAccess = !(needSubscriptionToAccess === undefined) && needSubscriptionToAccess;
const r21 = latestMessageTimestamp == null || muted ? null : (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(latestMessageTimestamp);
const value5 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
const defaultImport = importDefault(15334) /* metro dependency 15334: 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;
object.width = value5.icon.wrapper.size;
object.height = value5.icon.wrapper.size;
copyDataProperties(object, value5.icon.margin, undefined);
items2[1] = <View style={object}>{channel.isGroupDM() ? ((Component) => <Component channel={channel} size={value5.icon.avatarSize} />)(importDefault(9719) /* metro dependency 9719: GroupDMAvatar */) : <LaunchpadChannelIcon_117292 channel={channel} />}</View>;
const defaultImport3 = importDefault(15337) /* metro dependency 15337: renderChannelContent */;
if (channelName != null) {
r26 = channelName;
} else {
moduleValue2 = require(4805) /* metro dependency 4805: useChannelName */;
r26 = moduleValue2.computeChannelName(channel, UserStore, RelationshipStore);
}
items2[2] = defaultImport3({name: r26, subtitle: subtitle, unread: unread,
resolvedUnreadSetting: resolvedUnreadSetting, muted: muted, lastMessageTimestampString: r21, channel: channel,
channelCategoryName: channelCategoryName, locked: locked, connected: connected, live: live,
mentionCount: mentionCount, mentionBadge: mentionBadge, isSubscriptionGated: isSubscriptionGated,
needSubscriptionToAccess: needSubscriptionToAccess});
items2[3] = end != null ? <View style={{paddingLeft: 8}}>{end}</View> : null;
return defaultImport(<>{items2}</>, {fontScale: fontScale});
}
function getChannelAccessibilityProps_117296({channel, unread, mentionCount, voiceStates, embeddedActivitiesCount}) { // fn#117296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15542:1922, offset: 0x024ade00, size: 108 bytes, params: 2, frame: 17
const object2 = {'accessible': true, 'accessibilityRole': 'button'};
object2.accessibilityLabel = (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel,
unread: unread, mentionCount: mentionCount, voiceStates: voiceStates,
embeddedActivitiesCount: embeddedActivitiesCount});
return object2;
}
@@ -0,0 +1,21 @@
/* Metro module 15333; source: modules/launchpad/native/shared/renderChannelPressableWrapper.tsx; dependencies: [31, 27, 33, 15332, 2] */
function _fun117257(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15530:6, offset: 0x024ab9c4, size: 205 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_0 = (require(27) /* metro dependency 27 */).View;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
object = [(importDefault(15332) /* metro dependency 15332: getLayoutStyles */)().layout.margin, {'flex': 1,
'flexDirection': 'row', 'alignItems': 'center'}];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/renderChannelPressableWrapper.tsx');
exports.default = renderChannelPressableWrapper_117258;
}
function renderChannelPressableWrapper_117258(a0) { // fn#117258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15530:319, offset: 0x024aba91, size: 38 bytes, params: 2, frame: 13
return (
<View style={env0_2}>
{a0}
</View>
);
}
@@ -0,0 +1,27 @@
/* Metro module 15334; source: modules/launchpad/native/shared/renderChannelWrapper.tsx; dependencies: [31, 27, 33, 15332, 15335, 2] */
function _fun117259(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15531:6, offset: 0x024abab7, size: 186 bytes, params: 8, frame: 19
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;
const env0_4 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/renderChannelWrapper.tsx');
exports.default = renderChannelWrapper_117261;
}
function getStyles(a0) { // fn#117260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15531:145, offset: 0x024abb71, size: 92 bytes, params: 2, frame: 5
return [{'flex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'position': 'relative'},
{minHeight: a0 - 2 * env0_4.layout.margin.marginVertical}, env0_4.container.padding];
}
function renderChannelWrapper_117261(a0, a1) { // fn#117261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15531:411, offset: 0x024abbcd, size: 77 bytes, params: 3, frame: 15
return (
<View
style={getStyles((importDefault(15335) /* metro dependency 15335: getScaledChannelRowHeight */)(a1.fontScale))}
>
{a0}
</View>
);
}
@@ -0,0 +1,61 @@
/* Metro module 14436; source: modules/launchpad/native/shared/useChannelUnreadBadgeState.tsx; dependencies: [5096, 4605, 4864, 566, 5102, 2] */
function _fun109255(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:6, offset: 0x023434ad, size: 163 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[3]).useStateFromStoresObject([ReadStateStore], _fun109257);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const newChannelsStore = importDefault(5096) /* metro dependency 5096: NewChannelsStore */;
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/useChannelUnreadBadgeState.tsx');
exports.useChannelUnreadBadgeState = useChannelUnreadBadgeState;
exports.useBaseChannelUnreadBadgeState = closure;
}
function useBaseChannelUnreadBadgeState(a0, a1) { // fn#109256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:126, offset: 0x02343550, size: 74 bytes, params: 3, frame: 14
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ReadStateStore], _fun109257);
}
function useChannelUnreadBadgeState(a0, a1) { // fn#109258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:508, offset: 0x0234361e, size: 219 bytes, params: 3, frame: 25
var object2;
const env0_0 = a0;
const {unread, mentionCount, isMentionLowImportance} = useBaseChannelUnreadBadgeState(a0, a1);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NewChannelsStore], _fun109259,
[a0.guild_id, a0.id]);
const value4 = (require(5102) /* metro dependency 5102: isOptInEnabled */).useOptInEnabledForGuild(a0.guild_id);
object2 = {unread: unread};
object2.resolvedUnreadSetting = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun109260);
object2.newChannel = value3;
object2.optInEnabled = value4;
object2.mentionCount = mentionCount;
object2.isMentionLowImportance = isMentionLowImportance;
return object2;
}
function _fun109257() { // fn#109257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:216, offset: 0x0234359a, size: 132 bytes, params: 1, frame: 15
const getMentionCount = ReadStateStore.getMentionCount;
const binding = env0_0;
const getIsMentionLowImportance = ReadStateStore.getIsMentionLowImportance;
return {ackMessageId: ReadStateStore.ackMessageId(env0_0.id),
unread: !require && ReadStateStore.hasUnread(env0_0.id), mentionCount: Reflect.apply(getMentionCount,
ReadStateStore, [binding.id]), isMentionLowImportance: Reflect.apply(getIsMentionLowImportance, ReadStateStore,
[binding.id])};
}
function _fun109259() { // fn#109259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:680, offset: 0x023436f9, size: 38 bytes, params: 1, frame: 13
const shouldIndicateNewChannel = NewChannelsStore.shouldIndicateNewChannel;
const binding = env0_0;
return Reflect.apply(shouldIndicateNewChannel, NewChannelsStore, [binding.guild_id, binding.id]);
}
function _fun109260() { // fn#109260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14633:864, offset: 0x0234371f, size: 27 bytes, params: 1, frame: 11
return UserGuildSettingsStore.resolveUnreadSetting(env0_0);
}
@@ -0,0 +1,19 @@
/* Metro module 15326; source: modules/launchpad/native/shared/useSimpleGuildDefaultColors.tsx; dependencies: [4501, 697, 2] */
function _fun117213(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15523:6, offset: 0x024a8c0a, size: 201 bytes, params: 8, frame: 21
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object2.iconBackground = {color: BACKGROUND_MOD_STRONG};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.iconBackgroundBrand = {color: BACKGROUND_BRAND};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.iconStroke = {color: BORDER_SUBTLE};
value = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/useSimpleGuildDefaultColors.tsx');
exports.default = value;
}
@@ -0,0 +1,31 @@
/* Metro module 15329; source: modules/launchpad/native/shared/useSimpleGuildSize.tsx; dependencies: [31, 2] */
function _fun117230(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15526:6, offset: 0x024aa2a6, size: 106 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/useSimpleGuildSize.tsx');
exports.default = useSimpleGuildSize;
}
function useSimpleGuildSize({size, style}) { // fn#117231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15526:204, offset: 0x024aa310, size: 142 bytes, params: 2, frame: 17
const env0_0 = size;
const r3 = size ?? 48;
const binding = env0_0;
let useMemo = binding.useMemo;
value = Reflect.apply(useMemo, binding, [_fun117232, [r3]]);
useMemo = binding.useMemo;
return {containerSize: r3, containerSizeStyle: value, containerStyles: Reflect.apply(useMemo, binding, [_fun117233,
[style, size, value]])};
}
function _fun117232() { // fn#117232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15526:282, offset: 0x024aa39e, size: 23 bytes, params: 1, frame: 3
return {width: env0_2, height: env0_2};
}
function _fun117233() { // fn#117233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15526:326, offset: 0x024aa3b5, size: 83 bytes, params: 1, frame: 6
const sizeBinding = size;
const value2 = 0;
return [{position: 'relative', marginLeft: sizeBinding == null ? 4 : value2,
marginRight: size == null ? 4 : value2}, env0_3, style];
}
@@ -0,0 +1,13 @@
/* Metro module 15264; source: modules/launchpad/native/showLaunchPad.tsx; dependencies: [661, 1239, 2] */
function _fun116708(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15461:6, offset: 0x02494532, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/showLaunchPad.tsx');
exports.default = function() {
var ComponentDispatch = require(dependencyMap[1]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.LAUNCH_PAD_SHOW);
};
}
@@ -0,0 +1,112 @@
/* Metro module 15318; source: modules/launchpad/native/useLaunchPadAnimatedStyles.native.tsx; dependencies: [11324, 477, 4501, 15319, 14283, 1585, 4017, 4577, 2] */
function _fun117107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15515:6, offset: 0x024a41ec, size: 264 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(11324) /* metro dependency 11324: LaunchPadConstants */).LAUNCH_PAD_SPRING_CONFIG;
const env0_4 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({launchPad: {'position': 'absolute',
'top': 0, 'left': 0, 'width': '100%', 'zIndex': 1}, launchPadCover: {'position': 'absolute', 'top': 0,
'left': 0, 'right': 0, 'bottom': 0, 'backgroundColor': '#000'}});
object = {code: "function useLaunchPadAnimatedStylesNativeTsx1(){const{withSpring,interpolate,launchPadSharedState,windowDimensions,LAUNCH_PAD_SPRING_CONFIG,gestureState,launchPadShown,IS_ANDROID,height}=this.__closure;return{transform:[{translateX:withSpring(interpolate(launchPadSharedState.get(),[0,1],[windowDimensions.get().width-16,0]),LAUNCH_PAD_SPRING_CONFIG,'animate-always',function(finished){'worklet';if(!finished||gestureState.get().active)return;if(launchPadSharedState.get()===1||launchPadSharedState.get()===0){launchPadShown.set(launchPadSharedState.get()===1);}})}],bottom:IS_ANDROID?0:height.get()};}"};
object = {code: 'function useLaunchPadAnimatedStylesNativeTsx2(finished){const{gestureState,launchPadSharedState,launchPadShown}=this.__closure;if(!finished||gestureState.get().active)return;if(launchPadSharedState.get()===1||launchPadSharedState.get()===0){launchPadShown.set(launchPadSharedState.get()===1);}}'};
object = {code: "function useLaunchPadAnimatedStylesNativeTsx3(){const{withSpring,interpolate,launchPadSharedState,LAUNCH_PAD_SPRING_CONFIG}=this.__closure;return{opacity:withSpring(interpolate(launchPadSharedState.get(),[0,1],[0,0.6]),LAUNCH_PAD_SPRING_CONFIG,'animate-always')};}"};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/useLaunchPadAnimatedStyles.native.tsx');
exports.default = useLaunchpadAnimatedStyles;
}
function useLaunchpadAnimatedStyles({launchPadSharedState, gestureState, launchPadShown}) { // fn#117108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15515:1638, offset: 0x024a42f4, size: 438 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = (importDefault(15319) /* metro dependency 15319: useAnimatedKeyboardHeight */)();
const value3 = (importDefault(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */)();
const env0_4 = value3;
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = useLaunchpadAnimatedStyles_;
const object2 = {};
const withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.withSpring = withSpring;
const interpolate = reanimatedRexportModule.interpolate;
object2.interpolate = interpolate;
object2.launchPadSharedState = launchPadSharedState;
object2.windowDimensions = value3;
object2.LAUNCH_PAD_SPRING_CONFIG = LAUNCH_PAD_SPRING_CONFIG;
object2.gestureState = gestureState;
object2.launchPadShown = launchPadShown;
object2.IS_ANDROID = env0_4;
object2.height = value2;
closure.__closure = object2;
closure.__workletHash = 1628632614770;
closure.__initData = env0_6;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
useAnimatedStyle = moduleValue2.useAnimatedStyle;
closure = function() {
var object = {};
object.opacity = require(dependencyMap[7]).withSpring(require(dependencyMap[6]).interpolate(launchPadSharedState.get(),
[0, 1], [0, 0.6]), LAUNCH_PAD_SPRING_CONFIG, 'animate-always');
return object;
};
closure.__closure = {withSpring: withSpring, interpolate: interpolate, launchPadSharedState: launchPadSharedState,
LAUNCH_PAD_SPRING_CONFIG: LAUNCH_PAD_SPRING_CONFIG};
closure.__workletHash = 6964438968188;
closure.__initData = env0_8;
return {launchPadCoverStyles: [styles.launchPadCover, Reflect.apply(useAnimatedStyle, moduleValue2, [closure])],
launchPadStyles: [styles.launchPad, value4, {paddingTop: top}]};
}
function useLaunchpadAnimatedStyles_() { // fn#117109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15515:1817, owner: useLaunchpadAnimatedStyles._, offset: 0x024a44aa, size: 253 bytes, params: 1, frame: 24
var environment;
const object2 = {};
const value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
const launchPadSharedStateBinding = launchPadSharedState;
let get = launchPadSharedStateBinding.get;
const value3 = Reflect.apply(get, launchPadSharedStateBinding, []);
const binding = env0_4;
get = binding.get;
const value5 = 0;
const value6 = Reflect.apply(interpolate, reanimatedRexportModule, [value3, [0, 1], [Reflect.apply(get, binding,
[]).width - 16, value5]]);
const closure = _H;
closure.__closure = {gestureState: gestureState, launchPadSharedState: launchPadSharedStateBinding,
launchPadShown: launchPadShown};
closure.__workletHash = 7028378249389;
closure.__initData = env1_7;
object2.transform = [{translateX: Reflect.apply(withSpring, springModule, [value6, LAUNCH_PAD_SPRING_CONFIG,
'animate-always', closure])}];
object2.bottom = env1_4 ? value5 : env0_3.get();
return object2;
}
function _H(a0) { // fn#117110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15515:1949, owner: useLaunchpadAnimatedStyles._.h, offset: 0x024a45a7, size: 117 bytes, params: 2, frame: 13
var r0;
var gestureStateBinding;
var launchPadSharedStateBinding;
var launchPadShownBinding;
var set;
let value = a0;
if (value) {
value = environment.__proto__;
gestureStateBinding = gestureState;
value = !gestureStateBinding.get().active;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__;
if (!(launchPadSharedState.get() !== 1 && launchPadSharedState.get() !== 0)) {
launchPadShownBinding = launchPadShown;
set = launchPadShownBinding.set;
launchPadSharedStateBinding = launchPadSharedState;
Reflect.apply(set, launchPadShownBinding, [launchPadSharedStateBinding.get() === 1]);
}
}
}
@@ -0,0 +1,510 @@
/* Metro module 15316; source: modules/launchpad/native/useLaunchPadGesture.tsx; dependencies: [31, 11324, 4007, 1585, 5321, 477, 14283, 11282, 4017, 4081, 2] */
function _fun117082(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15513:6, offset: 0x024a2c40, size: 309 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 launchPadConstantsModule = require(11324) /* metro dependency 11324: LaunchPadConstants */;
const env0_4 = launchPadConstantsModule.LAUNCH_PAD_EDGE_GESTURE_AFFORDANCE;
const env0_5 = launchPadConstantsModule.LAUNCH_PAD_END_TRANSLATION_THRESHOLD;
const env0_6 = launchPadConstantsModule.LAUNCH_PAD_END_VELOCITY_THRESHOLD;
const env0_7 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_HEIGHT;
const env0_8 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_HIT_SLOP;
const env0_9 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_SCALE_FACTOR;
const env0_10 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_WIDTH;
const env0_11 = launchPadConstantsModule.LaunchPadTypes;
object = {code: 'function useLaunchPadGestureTsx1(){const{updateSharedValueIfChanged,gestureState,updaters}=this.__closure;updateSharedValueIfChanged(gestureState,{active:false,initialLaunchPadPosition:0,initialPullTabPosition:0,initialTouchX:0,initialTouchY:0,positionOffsetX:0,positionOffsetY:0,startTime:-1});updaters.setLaunchPadPullTabScale(1.0);}'};
object = {code: 'function useLaunchPadGestureTsx2(){const{gestureState,updaters,updateSharedValueIfChanged}=this.__closure;const{initialLaunchPadPosition:initialLaunchPadPosition,active:active}=gestureState.get();if(active){if(initialLaunchPadPosition===1){updaters.setLaunchPadPosition(1);}else{updaters.setLaunchPadPosition(0);}}updateSharedValueIfChanged(gestureState,{active:false,initialLaunchPadPosition:0,initialPullTabPosition:0,initialTouchX:0,initialTouchY:0,positionOffsetX:0,positionOffsetY:0,startTime:-1});}'};
object = {code: 'function useLaunchPadGestureTsx3({velocityX:velocityX,velocityY:velocityY,translationX:translationX,translationY:translationY}){const{gestureState,launchPadType,LaunchPadTypes,LAUNCH_PAD_END_TRANSLATION_THRESHOLD,LAUNCH_PAD_END_VELOCITY_THRESHOLD,updaters,launchPadSharedState}=this.__closure;const{requiresPop:requiresPop,startShown:startShown}=gestureState.get();if(requiresPop){if(!startShown){const isPullTabTapComplete=launchPadType===LaunchPadTypes.PULL_TAB&&Math.abs(translationX)<=LAUNCH_PAD_END_TRANSLATION_THRESHOLD&&Math.abs(translationY)<=LAUNCH_PAD_END_TRANSLATION_THRESHOLD&&Math.abs(velocityX)<=LAUNCH_PAD_END_VELOCITY_THRESHOLD&&Math.abs(velocityY)<=LAUNCH_PAD_END_VELOCITY_THRESHOLD;if(isPullTabTapComplete){updaters.setLaunchPadPosition(1);}else{updaters.setLaunchPadPosition(0);}}else{updaters.setLaunchPadPosition(1);}}else if(Math.abs(velocityX)<LAUNCH_PAD_END_VELOCITY_THRESHOLD){if(launchPadSharedState.get()>=0.5){updaters.setLaunchPadPosition(1);}else{updaters.setLaunchPadPosition(0);}}else if(velocityX>0){updaters.setLaunchPadPosition(0);}else{updaters.setLaunchPadPosition(1);}}'};
object = {code: 'function useLaunchPadGestureTsx4({translationX:translationX,translationY:translationY,absoluteX:absoluteX}){const{gestureState,getWindowDimensionsWorklet,POP_RESISTANCE,launchPadType,LaunchPadTypes,PIP_POP_DISTANCE,updaters,updateSharedValueIfChanged,runOnJS,triggerHapticFeedback,HapticFeedbackTypes}=this.__closure;if(!gestureState.get().active)return;const{initialTouchX:initialTouchX,requiresPop:requiresPop}=gestureState.get();const{width:windowWidth}=getWindowDimensionsWorklet();const newXOffset=absoluteX-initialTouchX;const distance=Math.max(newXOffset*-1,0);const resistance=distance*POP_RESISTANCE;const positionOffsetX=absoluteX-gestureState.get().initialTouchX;const launchPadPosition=1-(gestureState.get().initialTouchX+translationX-(launchPadType!==LaunchPadTypes.PULL_TAB?40:0))/windowWidth;if(requiresPop&&distance<=PIP_POP_DISTANCE){if(launchPadType!==LaunchPadTypes.PULL_TAB){const a=(distance-resistance)/windowWidth;updaters.setLaunchPadPosition(a);}else{updaters.setLaunchPadPullTabTranslation(translationY);}updateSharedValueIfChanged(gestureState,{positionOffsetX:positionOffsetX});}else{if(requiresPop){updateSharedValueIfChanged(gestureState,{requiresPop:false,positionOffsetX:positionOffsetX});runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);}else{updateSharedValueIfChanged(gestureState,{positionOffsetX:positionOffsetX});}updaters.setLaunchPadPosition(launchPadPosition);}}'};
object = {code: 'function useLaunchPadGestureTsx5(event,manager){const{gestureState,State,getWindowDimensionsWorklet,launchPadType,LaunchPadTypes,LAUNCH_PAD_EDGE_GESTURE_AFFORDANCE,LAUNCH_PAD_PULL_TAB_WIDTH,LAUNCH_PAD_PULL_TAB_HIT_SLOP,launchPadPullTabState,LAUNCH_PAD_PULL_TAB_HEIGHT,updaters,LAUNCH_PAD_PULL_TAB_SCALE_FACTOR,launchPadSharedState,MANUAL_ACTIVATION_THRESHOLD}=this.__closure;const{active:active,initialLaunchPadPosition:initialLaunchPadPosition,initialTouchX:initialTouchX,initialTouchY:initialTouchY}=gestureState.get();if(event.state!==State.BEGAN||active)return;const currentTouch=event.changedTouches[0];const{x:x,y:y}=currentTouch;const{width:windowWidth}=getWindowDimensionsWorklet();if(currentTouch==null||launchPadType===LaunchPadTypes.GESTURE_EDGE&&initialLaunchPadPosition===0&&initialTouchX<windowWidth-LAUNCH_PAD_EDGE_GESTURE_AFFORDANCE||launchPadType===LaunchPadTypes.DISABLED){manager.fail();return;}if(launchPadType===LaunchPadTypes.PULL_TAB&&initialLaunchPadPosition===0){const inPullTabX=x>windowWidth-LAUNCH_PAD_PULL_TAB_WIDTH-LAUNCH_PAD_PULL_TAB_HIT_SLOP&&x<windowWidth;const inPullTabY=y>launchPadPullTabState.get().position-LAUNCH_PAD_PULL_TAB_HIT_SLOP&&y<launchPadPullTabState.get().position+LAUNCH_PAD_PULL_TAB_HEIGHT+LAUNCH_PAD_PULL_TAB_HIT_SLOP;if(inPullTabX&&inPullTabY){gestureState.set({...gestureState.get(),initialPullTabPosition:launchPadPullTabState.get().position,active:true});updaters.setLaunchPadPullTabScale(LAUNCH_PAD_PULL_TAB_SCALE_FACTOR);updaters.setLaunchPadShown(true);manager.activate();return;}}if(launchPadType!==LaunchPadTypes.PULL_TAB||launchPadType===LaunchPadTypes.PULL_TAB&&initialLaunchPadPosition>0){const horizontalDistance=x-initialTouchX;const verticalDistance=Math.abs(y-initialTouchY);const hasMovedCorrectDirection=launchPadSharedState.get()>0&&horizontalDistance>0||launchPadSharedState.get()<=0&&horizontalDistance<0;if(hasMovedCorrectDirection&&Math.abs(horizontalDistance)>verticalDistance){if(Math.abs(horizontalDistance)<MANUAL_ACTIVATION_THRESHOLD){return;}gestureState.set({...gestureState.get(),active:true});updaters.setLaunchPadShown(true);manager.activate();return;}}manager.fail();}'};
object = {code: 'function useLaunchPadGestureTsx6(event){const{gestureState,launchPadSharedState}=this.__closure;const{x:x,y:y}=event.changedTouches[0];gestureState.set({active:false,initialLaunchPadPosition:launchPadSharedState.get(),initialPullTabPosition:0,initialTouchX:x,initialTouchY:y,positionOffsetX:0,positionOffsetY:0,startTime:Date.now(),requiresPop:launchPadSharedState.get()===0,startShown:!(launchPadSharedState.get()===0)});}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/useLaunchPadGesture.tsx');
exports.default = useLaunchPadGesture;
}
function useLaunchPadGesture({launchPadType, launchPadSharedState, launchPadPullTabState, gestureState, updaters}) { // fn#117083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15513:6492, offset: 0x024a2d75, size: 200 bytes, params: 2, frame: 22
const env0_3 = gestureState;
const value2 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useIsModalOpen();
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const binding = env0_3;
const value = binding.useRef(undefined);
const useMemo = binding.useMemo;
return {gesture: Reflect.apply(useMemo, binding, [_fun117084, [gestureState, value3, value2, launchPadPullTabState,
launchPadSharedState, launchPadType, updaters]]), gestureRef: value};
}
function _fun117084() { // fn#117084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15513:6701, offset: 0x024a2e3d, size: 975 bytes, params: 1, frame: 26
var object2;
var environment;
var value;
let launchPadTypeBinding = launchPadType;
let value2 = environment.__proto__;
const GESTURE_FULL = LaunchPadTypes.GESTURE_FULL;
const value3 = 0;
const r6 = launchPadTypeBinding !== GESTURE_FULL ? value3 : -1 * LAUNCH_PAD_EDGE_GESTURE_AFFORDANCE;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value5 = Gesture.Pan();
const enabled = value5.enabled;
let binding = env0_5;
const value11 = Reflect.apply(enabled, value5,
[!binding && launchPadType !== LaunchPadTypes.DISABLED]).withRef(env0_7).minDistance(value3).maxPointers(1);
const manualActivation = value11.manualActivation;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const value12 = Reflect.apply(manualActivation, value11, [platformUtilsModule.isAndroid()]);
const hitSlop = value12.hitSlop;
binding = env0_6;
const value13 = Reflect.apply(hitSlop, value12, [{top: -1 * binding.top, left: value3, bottom: -1 * binding.bottom,
right: r6}]);
const onTouchesDown = value13.onTouchesDown;
let closure = y_117085;
const gestureStateBinding = gestureState;
const launchPadSharedStateBinding = launchPadSharedState;
closure.__closure = {gestureState: gestureStateBinding, launchPadSharedState: launchPadSharedStateBinding};
closure.__workletHash = 14359599806316;
closure.__initData = env1_17;
const value14 = Reflect.apply(onTouchesDown, value13, [closure]);
const onTouchesMove = value14.onTouchesMove;
closure = X_117086;
object2 = {gestureState: gestureStateBinding};
const State = (require(5321) /* metro dependency 5321 */).State;
object2.State = State;
const getWindowDimensionsWorklet = (require(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */).getWindowDimensionsWorklet;
object2.getWindowDimensionsWorklet = getWindowDimensionsWorklet;
launchPadTypeBinding = launchPadType;
object2.launchPadType = launchPadTypeBinding;
object2.LaunchPadTypes = LaunchPadTypes;
object2.LAUNCH_PAD_EDGE_GESTURE_AFFORDANCE = LAUNCH_PAD_EDGE_GESTURE_AFFORDANCE;
object2.LAUNCH_PAD_PULL_TAB_WIDTH = LAUNCH_PAD_PULL_TAB_WIDTH;
object2.LAUNCH_PAD_PULL_TAB_HIT_SLOP = LAUNCH_PAD_PULL_TAB_HIT_SLOP;
object2.launchPadPullTabState = launchPadPullTabState;
object2.LAUNCH_PAD_PULL_TAB_HEIGHT = LAUNCH_PAD_PULL_TAB_HEIGHT;
const updatersBinding = updaters;
object2.updaters = updatersBinding;
object2.LAUNCH_PAD_PULL_TAB_SCALE_FACTOR = LAUNCH_PAD_PULL_TAB_SCALE_FACTOR;
object2.launchPadSharedState = launchPadSharedStateBinding;
object2.MANUAL_ACTIVATION_THRESHOLD = 3;
closure.__closure = object2;
closure.__workletHash = 5887887666279;
closure.__initData = env1_16;
const onChange = Reflect.apply(onTouchesMove, value14, [closure]).onChange;
closure = I_117087;
object2 = {gestureState: gestureStateBinding};
object2.getWindowDimensionsWorklet = getWindowDimensionsWorklet;
object2.POP_RESISTANCE = 0.5;
object2.launchPadType = launchPadTypeBinding;
object2.LaunchPadTypes = LaunchPadTypes;
object2.PIP_POP_DISTANCE = 70;
object2.updaters = updatersBinding;
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
object2.HapticFeedbackTypes = HapticFeedbackTypes;
closure.__closure = object2;
closure.__workletHash = 8073380735713;
closure.__initData = env1_15;
value = Reflect.apply(onChange, value, [closure]);
const onEnd = value.onEnd;
closure = v_117088;
closure.__closure = {gestureState: gestureStateBinding, launchPadType: launchPadTypeBinding,
LaunchPadTypes: LaunchPadTypes, LAUNCH_PAD_END_TRANSLATION_THRESHOLD: LAUNCH_PAD_END_TRANSLATION_THRESHOLD,
LAUNCH_PAD_END_VELOCITY_THRESHOLD: LAUNCH_PAD_END_VELOCITY_THRESHOLD, updaters: updatersBinding,
launchPadSharedState: launchPadSharedStateBinding};
closure.__workletHash = 13108163303108;
closure.__initData = env1_14;
value = Reflect.apply(onEnd, value, [closure]);
const onTouchesCancelled = value.onTouchesCancelled;
closure = function() {
var value2 = gestureState.get();
if (value2.active) {
if (value2.initialLaunchPadPosition === 1) {
updaters.setLaunchPadPosition(1);
} else {
updaters.setLaunchPadPosition(0);
}
}
importDefault(dependencyMap[7])(gestureState, {'active': false, 'initialLaunchPadPosition': 0,
'initialPullTabPosition': 0, 'initialTouchX': 0, 'initialTouchY': 0, 'positionOffsetX': 0,
'positionOffsetY': 0,
'startTime': -1});
};
closure.__closure = {gestureState: gestureStateBinding, updaters: updatersBinding,
updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */};
closure.__workletHash = 11677880944102;
closure.__initData = env1_13;
value = Reflect.apply(onTouchesCancelled, value, [closure]);
const onFinalize = value.onFinalize;
closure = t_117090;
closure.__closure = {updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */,
gestureState: gestureStateBinding, updaters: updatersBinding};
closure.__workletHash = 14463491499289;
closure.__initData = env1_12;
return Reflect.apply(onFinalize, value, [closure]);
}
function y_117085({changedTouches}) { // fn#117085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15513:6961, offset: 0x024a320c, size: 152 bytes, params: 2, frame: 16
const {x, y} = changedTouches[0];
const gestureStateBinding = gestureState;
const set = gestureStateBinding.set;
const object2 = {'active': false, 'initialLaunchPadPosition': null, 'initialPullTabPosition': 0,
'initialTouchX': null, 'initialTouchY': null, 'positionOffsetX': 0, 'positionOffsetY': 0};
const launchPadSharedStateBinding = launchPadSharedState;
let get = launchPadSharedStateBinding.get;
object2.initialLaunchPadPosition = Reflect.apply(get, launchPadSharedStateBinding, []);
object2.initialTouchX = x;
object2.initialTouchY = y;
const Date = global.Date;
object2.startTime = Date.now();
get = launchPadSharedStateBinding.get;
object2.requiresPop = Reflect.apply(get, launchPadSharedStateBinding, []) === 0;
get = launchPadSharedStateBinding.get;
object2.startShown = !(Reflect.apply(get, launchPadSharedStateBinding, []) === 0);
Reflect.apply(set, gestureStateBinding, [object2]);
}
function X_117086(a0, a1) { // fn#117086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15513:7346, offset: 0x024a32a4, size: 717 bytes, params: 3, frame: 23
var r9;
var r13;
var changedTouches;
var property;
var x;
var y;
var moduleValue;
var getWindowDimensionsWorklet;
var width;
var launchPadTypeBinding;
var GESTURE_EDGE;
var DISABLED;
var PULL_TAB;
var launchPadPullTabStateBinding;
var position;
var value4;
var value5;
var value6;
var value7;
var value8;
var Math;
var abs;
var value9;
var launchPadSharedStateBinding;
var fail;
var set;
var object2;
var updatersBinding;
const {active, initialLaunchPadPosition, initialTouchX, initialTouchY} = gestureState.get();
const state = a0.state;
const State = require(dependencyMap[4]).State;
const BEGAN = State.BEGAN;
if (state === BEGAN) {
reducibleJoin28: while (true) {
if (active) {
break reducibleJoin28;
}
changedTouches = a0.changedTouches;
property = changedTouches[0];
x = property.x;
y = property.y;
moduleValue = require(dependencyMap[6]);
getWindowDimensionsWorklet = moduleValue.getWindowDimensionsWorklet;
width = Reflect.apply(getWindowDimensionsWorklet, moduleValue, []).width;
if (property != null) {
launchPadTypeBinding = launchPadType;
GESTURE_EDGE = LaunchPadTypes.GESTURE_EDGE;
reducibleJoin27: while (true) {
reducibleJoin6: while (true) {
if (launchPadTypeBinding !== GESTURE_EDGE) {
break reducibleJoin6;
}
if (initialLaunchPadPosition !== 0) {
break reducibleJoin6;
}
if (initialTouchX < width - LAUNCH_PAD_EDGE_GESTURE_AFFORDANCE) {
break reducibleJoin27;
}
break reducibleJoin6;
}
launchPadTypeBinding = launchPadType;
DISABLED = LaunchPadTypes.DISABLED;
if (launchPadTypeBinding === DISABLED) {
break reducibleJoin27;
}
launchPadTypeBinding = launchPadType;
PULL_TAB = LaunchPadTypes.PULL_TAB;
if (launchPadTypeBinding !== PULL_TAB) {
r13 = dependencyMap;
} else {
reducibleJoin14: while (true) {
if (initialLaunchPadPosition !== 0) {
r13 = dependencyMap;
break reducibleJoin14;
}
launchPadPullTabStateBinding = launchPadPullTabState;
get = launchPadPullTabStateBinding.get;
position = Reflect.apply(get, launchPadPullTabStateBinding, []).position;
value4 = y > position - LAUNCH_PAD_PULL_TAB_HIT_SLOP;
reducibleJoin11: while (true) {
if (value4) {
launchPadPullTabStateBinding = launchPadPullTabState;
get = launchPadPullTabStateBinding.get;
position = Reflect.apply(get, launchPadPullTabStateBinding, []).position;
value5 = position + LAUNCH_PAD_PULL_TAB_HEIGHT;
value6 = y < value5 + LAUNCH_PAD_PULL_TAB_HIT_SLOP;
r9 = value6;
break reducibleJoin11;
}
r9 = value4;
break reducibleJoin11;
}
value7 = width - LAUNCH_PAD_PULL_TAB_WIDTH;
if (x > value7 - LAUNCH_PAD_PULL_TAB_HIT_SLOP) {
if (x < width) {
if (r9) {
gestureStateBinding = gestureState;
set = gestureStateBinding.set;
object2 = {};
get = gestureStateBinding.get;
copyDataProperties(object2, Reflect.apply(get, gestureStateBinding, []),
value7);
launchPadPullTabStateBinding = launchPadPullTabState;
get = launchPadPullTabStateBinding.get;
object2['initialPullTabPosition'] = Reflect.apply(get,
launchPadPullTabStateBinding,
[]).position;
object2['active'] = true;
Reflect.apply(set, gestureStateBinding, [object2]);
updatersBinding = updaters;
updatersBinding.setLaunchPadPullTabScale(LAUNCH_PAD_PULL_TAB_SCALE_FACTOR);
updatersBinding.setLaunchPadShown(true);
a1.activate();
return undefined;
}
r13 = value7;
break reducibleJoin14;
}
r13 = value7;
break reducibleJoin14;
}
r13 = value7;
break reducibleJoin14;
}
}
launchPadTypeBinding = launchPadType;
PULL_TAB = LaunchPadTypes.PULL_TAB;
if (launchPadTypeBinding === PULL_TAB) {
launchPadTypeBinding = launchPadType;
PULL_TAB = LaunchPadTypes.PULL_TAB;
reducibleJoin17: while (true) {
reducibleJoin28: while (true) {
if (launchPadTypeBinding !== PULL_TAB) {
a1.fail();
break reducibleJoin28;
}
if (initialLaunchPadPosition > 0) {
break reducibleJoin17;
}
fail = a1.fail;
Reflect.apply(fail, a1, []);
break reducibleJoin28;
}
return undefined;
}
}
value8 = x - initialTouchX;
Math = global.Math;
abs = Math.abs;
value9 = Reflect.apply(abs, Math, [y - initialTouchY]);
launchPadSharedStateBinding = launchPadSharedState;
get = launchPadSharedStateBinding.get;
if (Reflect.apply(get, launchPadSharedStateBinding, []) > 0) {
reducibleJoin19: while (true) {
if (value8 > 0) {
Math = global.Math;
abs = Math.abs;
if (Reflect.apply(abs, Math, [value8]) > value9) {
Math = global.Math;
if (Math.abs(value8) < 3) {
return undefined;
}
gestureStateBinding = gestureState;
set = gestureStateBinding.set;
object2 = {};
copyDataProperties(object2, gestureStateBinding.get(), r13);
object2['active'] = true;
Reflect.apply(set, gestureStateBinding, [object2]);
updatersBinding = updaters;
updatersBinding.setLaunchPadShown(true);
a1.activate();
return undefined;
}
fail = a1.fail;
Reflect.apply(fail, a1, []);
break reducibleJoin28;
}
break reducibleJoin19;
}
}
launchPadSharedStateBinding = launchPadSharedState;
get = launchPadSharedStateBinding.get;
if (Reflect.apply(get, launchPadSharedStateBinding, []) <= 0) {
reducibleJoin22: while (true) {
if (value8 < 0) {
Math = global.Math;
abs = Math.abs;
if (Reflect.apply(abs, Math, [value8]) > value9) {
Math = global.Math;
if (Math.abs(value8) < 3) {
return undefined;
}
gestureStateBinding = gestureState;
set = gestureStateBinding.set;
object2 = {};
copyDataProperties(object2, gestureStateBinding.get(), r13);
object2['active'] = true;
Reflect.apply(set, gestureStateBinding, [object2]);
updatersBinding = updaters;
updatersBinding.setLaunchPadShown(true);
a1.activate();
return undefined;
}
break reducibleJoin22;
}
break reducibleJoin22;
}
}
fail = a1.fail;
Reflect.apply(fail, a1, []);
break reducibleJoin28;
}
}
fail = a1.fail;
Reflect.apply(fail, a1, []);
break reducibleJoin28;
}
}
}
function I_117087({translationX, translationY, absoluteX}) { // fn#117087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15513:8579, offset: 0x024a3571, size: 498 bytes, params: 2, frame: 23
var value2;
var initialTouchX;
var requiresPop;
var value3;
var moduleValue;
var width;
var Math;
var value4;
var value5;
var value6;
var value9;
var defaultImport;
const triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
let get = gestureState.get;
if (Reflect.apply(get, gestureStateBinding, []).active) {
gestureStateBinding = gestureState;
value2 = gestureStateBinding.get();
initialTouchX = value2.initialTouchX;
requiresPop = value2.requiresPop;
value3 = environment.__proto__.__proto__;
moduleValue = require(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */;
width = moduleValue.getWindowDimensionsWorklet().width;
Math = global.Math;
value4 = 0;
value5 = Math.max(-1 * (absoluteX - initialTouchX), value4);
get = gestureStateBinding.get;
initialTouchX = Reflect.apply(get, gestureStateBinding, []).initialTouchX;
value6 = absoluteX - initialTouchX;
get = gestureStateBinding.get;
initialTouchX = Reflect.apply(get, gestureStateBinding, []).initialTouchX;
value9 = (initialTouchX + translationX - (launchPadType === LaunchPadTypes.PULL_TAB ? value4 : 40)) / width;
if (requiresPop) {
if (value5 <= 70) {
if (launchPadType !== LaunchPadTypes.PULL_TAB) {
updaters.setLaunchPadPosition((value5 - 0.5 * value5) / width);
} else {
updaters.setLaunchPadPullTabTranslation(translationY);
}
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(gestureState,
{positionOffsetX: value6});
} else {
defaultImport = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
gestureStateBinding = gestureState;
if (requiresPop) {
defaultImport(gestureStateBinding, {requiresPop: false, positionOffsetX: value6});
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);
} else {
defaultImport(gestureStateBinding, {positionOffsetX: value6});
}
updaters.setLaunchPadPosition(1 - value9);
}
} else {
defaultImport = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
gestureStateBinding = gestureState;
if (requiresPop) {
defaultImport(gestureStateBinding, {requiresPop: false, positionOffsetX: value6});
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);
} else {
defaultImport(gestureStateBinding, {positionOffsetX: value6});
}
updaters.setLaunchPadPosition(1 - value9);
}
}
}
function v_117088({velocityX, velocityY, translationX, translationY}) { // fn#117088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15513:9567, offset: 0x024a3763, size: 382 bytes, params: 2, frame: 18
var value3;
var value4;
var launchPadTypeBinding;
var value6;
const value2 = gestureState.get();
if (value2.requiresPop) {
if (value2.startShown) {
updaters.setLaunchPadPosition(1);
} else {
launchPadTypeBinding = launchPadType;
value6 = environment.__proto__.__proto__;
if (launchPadTypeBinding !== LaunchPadTypes.PULL_TAB) {
updaters.setLaunchPadPosition(0);
} else if (global.Math.abs(translationX) <= LAUNCH_PAD_END_TRANSLATION_THRESHOLD) {
if (global.Math.abs(translationY) <= LAUNCH_PAD_END_TRANSLATION_THRESHOLD) {
if (global.Math.abs(velocityX) <= LAUNCH_PAD_END_VELOCITY_THRESHOLD) {
if (global.Math.abs(velocityY) <= LAUNCH_PAD_END_VELOCITY_THRESHOLD) {
updaters.setLaunchPadPosition(1);
} else {
updaters.setLaunchPadPosition(0);
}
} else {
updaters.setLaunchPadPosition(0);
}
} else {
updaters.setLaunchPadPosition(0);
}
} else {
updaters.setLaunchPadPosition(0);
}
}
} else {
value3 = global.Math.abs(velocityX);
value4 = environment.__proto__.__proto__;
if (value3 < LAUNCH_PAD_END_VELOCITY_THRESHOLD) {
if (launchPadSharedState.get() >= 0.5) {
updaters.setLaunchPadPosition(1);
} else {
updaters.setLaunchPadPosition(0);
}
} else if (velocityX > 0) {
updaters.setLaunchPadPosition(0);
} else {
updaters.setLaunchPadPosition(1);
}
}
}
function t_117090() { // fn#117090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15513:10611, offset: 0x024a395c, size: 72 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__;
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(gestureState,
{'active': false, 'initialLaunchPadPosition': 0, 'initialPullTabPosition': 0, 'initialTouchX': 0,
'initialTouchY': 0, 'positionOffsetX': 0, 'positionOffsetY': 0, 'startTime': -1});
updaters.setLaunchPadPullTabScale(1);
}
@@ -0,0 +1,78 @@
/* Metro module 15321; source: modules/launchpad/native/useLaunchPadPullTabMinimized.tsx; dependencies: [31, 27, 4017, 7713, 2] */
function _fun117121(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15518:6, offset: 0x024a512e, size: 194 bytes, params: 8, frame: 19
var nativeEventEmitter;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_2 = importAll(31) /* metro dependency 31 */;
const {NativeEventEmitter, NativeModules} = require(27) /* metro dependency 27 */;
const DCDScrollTracker = NativeModules.DCDScrollTracker;
if (DCDScrollTracker) {
nativeEventEmitter = new NativeEventEmitter(DCDScrollTracker);
}
object = {code: 'function useLaunchPadPullTabMinimizedTsx1(){const{launchPadPullTabState,isVoicePanelOpen,launchPadSharedState,isMinimizedDuringScroll}=this.__closure;const isMinimized=(launchPadPullTabState.get().minimized||isVoicePanelOpen)&&launchPadSharedState.get()<=0;return isMinimized||isMinimizedDuringScroll.get();}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/useLaunchPadPullTabMinimized.tsx');
exports.default = useLaunchPadPullTabMinimized;
return value;
}
function useLaunchPadPullTabMinimized({launchPadSharedState, launchPadPullTabState}) { // fn#117122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15518:619, offset: 0x024a51f0, size: 169 bytes, params: 2, frame: 18
const value2 = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelFullscreen();
const value3 = useIsMinimizedDuringScroll();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
const closure = useLaunchPadPullTabMinimizedU;
closure.__closure = {launchPadPullTabState: launchPadPullTabState, isVoicePanelOpen: value2,
launchPadSharedState: launchPadSharedState, isMinimizedDuringScroll: value3};
closure.__workletHash = 14263056934448;
closure.__initData = env0_4;
return Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
}
function useIsMinimizedDuringScroll() { // fn#117123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15518:753, owner: useLaunchPadPullTabMinimized.useIsMinimizedDuringScroll, offset: 0x024a5299, size: 76 bytes, params: 1, frame: 15
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
env1_2.useEffect(_fun117124, [value2]);
return value2;
}
function useLaunchPadPullTabMinimizedU() { // fn#117128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15518:1106, owner: useLaunchPadPullTabMinimized.u, offset: 0x024a53ce, size: 69 bytes, params: 1, frame: 11
const launchPadPullTabStateBinding = launchPadPullTabState;
const get = launchPadPullTabStateBinding.get;
let r0 = (Reflect.apply(get, launchPadPullTabStateBinding,
[]).minimized || env0_2) && launchPadSharedState.get() <= 0;
r0 = !r0 ? env0_3.get() : r0;
return r0;
}
function _fun117124() { // fn#117124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15518:844, offset: 0x024a52e5, size: 72 bytes, params: 1, frame: 15
var environment;
let value = environment.__proto__.__proto__;
if (env2_3 != null) {
value = env2_3.addListener('isScrollingOrDragging', _fun117125);
}
return _fun117127;
}
function _fun117125({isScrollingOrDragging}) { // fn#117125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15518:914, offset: 0x024a532d, size: 90 bytes, params: 2, frame: 15
var environment;
global.clearTimeout(env0_0);
if (isScrollingOrDragging) {
value = environment.__proto__;
env1_0.set(true);
} else {
env0_0 = global.setTimeout(_fun117126, 1000);
}
}
function _fun117127() { // fn#117127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15518:1017, offset: 0x024a539e, size: 48 bytes, params: 1, frame: 12
global.clearTimeout(env0_0);
if (env0_1 != null) {
env0_1.remove();
}
}
function _fun117126() { // fn#117126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15518:986, offset: 0x024a5387, size: 23 bytes, params: 1, frame: 11
env2_0.set(false);
}
@@ -0,0 +1,161 @@
/* Metro module 15314; source: modules/launchpad/native/useLaunchPadState.native.tsx; dependencies: [31, 11324, 15315, 4017, 14283, 11281, 11282, 2] */
function _fun117064(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:6, offset: 0x024a2250, size: 345 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 launchPadConstantsModule = require(11324) /* metro dependency 11324: LaunchPadConstants */;
const env0_4 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_MAX_POSITION;
const env0_5 = launchPadConstantsModule.LAUNCH_PAD_PULL_TAB_SCALE_OFFSET;
const env0_6 = {'active': false, 'initialLaunchPadPosition': 0, 'initialPullTabPosition': 0, 'initialTouchX': 0,
'initialTouchY': 0, 'positionOffsetX': 0, 'positionOffsetY': 0, 'startTime': -1, 'requiresPop': false,
'startShown': false};
({'position': null, 'scale': 1, 'offset': 0,
'minimized': false}).position = (require(15315) /* metro dependency 15315: LaunchPadPullTabCache */).getLaunchPadPullTabPositionCached();
object = {code: 'function useLaunchPadStateNativeTsx1(shown){const{launchPadShown}=this.__closure;launchPadShown.set(shown);}'};
object = {code: 'function useLaunchPadStateNativeTsx2(value){const{launchPadSharedState}=this.__closure;launchPadSharedState.set(Math.max(Math.min(value,1),0));}'};
object = {code: 'function useLaunchPadStateNativeTsx3(positionY){const{getWindowDimensionsWorklet,launchPadPullTabState,LAUNCH_PAD_PULL_TAB_MAX_POSITION,getSafeAreaInsetsWorklet,LAUNCH_PAD_PULL_TAB_SCALE_OFFSET,updateSharedValueIfChanged,runOnJS,persistLaunchPadPullTabPosition}=this.__closure;const positionYMax=getWindowDimensionsWorklet().height-launchPadPullTabState.get().offset-LAUNCH_PAD_PULL_TAB_MAX_POSITION;const positionYMin=getSafeAreaInsetsWorklet().top+LAUNCH_PAD_PULL_TAB_SCALE_OFFSET;const position=Math.max(Math.min(positionY,positionYMax),positionYMin);updateSharedValueIfChanged(launchPadPullTabState,{position:position});runOnJS(persistLaunchPadPullTabPosition)(position);}'};
object = {code: 'function useLaunchPadStateNativeTsx4(translationY){const{gestureState,setLaunchPadPullTabBoundedPosition}=this.__closure;const positionY=gestureState.get().initialPullTabPosition+translationY;setLaunchPadPullTabBoundedPosition(positionY);}'};
object = {code: 'function useLaunchPadStateNativeTsx5(position,offset){const{updateSharedValueIfChanged,launchPadPullTabState}=this.__closure;updateSharedValueIfChanged(launchPadPullTabState,{position:position,offset:offset});}'};
object = {code: 'function useLaunchPadStateNativeTsx6(scale){const{updateSharedValueIfChanged,launchPadPullTabState}=this.__closure;updateSharedValueIfChanged(launchPadPullTabState,{scale:scale});}'};
object = {code: 'function useLaunchPadStateNativeTsx7(minimized){const{updateSharedValueIfChanged,launchPadPullTabState}=this.__closure;updateSharedValueIfChanged(launchPadPullTabState,{minimized:minimized});}'};
object = {code: 'function useLaunchPadStateNativeTsx8(){const{launchPadPullTabState,setLaunchPadPullTabBoundedPosition}=this.__closure;const positionY=launchPadPullTabState.get().position;setLaunchPadPullTabBoundedPosition(positionY);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/useLaunchPadState.native.tsx');
exports.default = useLaunchPadState;
}
function useLaunchPadState() { // fn#117065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:2613, offset: 0x024a23a9, size: 197 bytes, params: 1, frame: 20
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(env0_6);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(env0_7);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const binding = value5;
const useMemo = binding.useMemo;
let object = [value2, value3, value4, value5];
object = {launchPadSharedState: value4, launchPadPullTabState: value3, launchPadShown: value5, gestureState: value2,
updaters: Reflect.apply(useMemo, binding, [_fun117066, object])};
return object;
}
function _fun117066() { // fn#117066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:2772, offset: 0x024a246e, size: 626 bytes, params: 1, frame: 22
var object2;
let closure = setLaunchPadShown;
closure.__closure = {launchPadShown: env0_3};
closure.__workletHash = 17051366113851;
closure.__initData = env1_8;
const closure2 = setLaunchPadPosition;
closure2.__closure = {launchPadSharedState: env0_2};
closure2.__workletHash = 128574367175;
closure2.__initData = env1_9;
const closure3 = setLaunchPadPullTabBoundedPosition;
object2 = {};
const getWindowDimensionsWorklet = (require(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */).getWindowDimensionsWorklet;
object2.getWindowDimensionsWorklet = getWindowDimensionsWorklet;
const binding = env0_1;
object2.launchPadPullTabState = binding;
object2.LAUNCH_PAD_PULL_TAB_MAX_POSITION = LAUNCH_PAD_PULL_TAB_MAX_POSITION;
const getSafeAreaInsetsWorklet = (require(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */).getSafeAreaInsetsWorklet;
object2.getSafeAreaInsetsWorklet = getSafeAreaInsetsWorklet;
object2.LAUNCH_PAD_PULL_TAB_SCALE_OFFSET = LAUNCH_PAD_PULL_TAB_SCALE_OFFSET;
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.persistLaunchPadPullTabPosition = (require(15315) /* metro dependency 15315: LaunchPadPullTabCache */).persistLaunchPadPullTabPosition;
closure3.__closure = object2;
closure3.__workletHash = 10962658404039;
closure3.__initData = env1_10;
object2 = {setLaunchPadShown: closure, setLaunchPadPosition: closure2};
closure = setLaunchPadPullTabTranslation;
closure.__closure = {gestureState: env0_0, setLaunchPadPullTabBoundedPosition: closure3};
closure.__workletHash = 14133148345236;
closure.__initData = env1_11;
object2.setLaunchPadPullTabTranslation = closure;
closure = setLaunchPadPullTabPosition;
closure.__closure = {updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */,
launchPadPullTabState: binding};
closure.__workletHash = 2910499659585;
closure.__initData = env1_12;
object2.setLaunchPadPullTabPosition = closure;
closure = setLaunchPadPullTabScale;
closure.__closure = {updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */,
launchPadPullTabState: binding};
closure.__workletHash = 2074690206772;
closure.__initData = env1_13;
object2.setLaunchPadPullTabScale = closure;
closure = setLaunchPadPullTabMinimized;
closure.__closure = {updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */,
launchPadPullTabState: binding};
closure.__workletHash = 6903049267633;
closure.__initData = env1_14;
object2.setLaunchPadPullTabMinimized = closure;
closure = onWindowHeightChange;
closure.__closure = {launchPadPullTabState: binding, setLaunchPadPullTabBoundedPosition: closure3};
closure.__workletHash = 11005162001151;
closure.__initData = env1_15;
object2.onWindowHeightChange = closure;
return object2;
}
function setLaunchPadShown(a0) { // fn#117067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:2803, offset: 0x024a26e0, size: 24 bytes, params: 2, frame: 11
env1_3.set(a0);
}
function setLaunchPadPosition(a0) { // fn#117068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:2909, offset: 0x024a26f8, size: 65 bytes, params: 2, frame: 17
const value = environment.__proto__;
const binding = env1_2;
const set = binding.set;
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
Reflect.apply(set, binding, [Reflect.apply(max, Math, [Math2.min(a0, 1), 0])]);
}
function setLaunchPadPullTabBoundedPosition(a0) { // fn#117069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:3044, offset: 0x024a2739, size: 223 bytes, params: 2, frame: 21
let value = environment.__proto__.__proto__;
const useWindowDimensionsSharedValueNativeModule = require(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */;
const getWindowDimensionsWorklet = useWindowDimensionsSharedValueNativeModule.getWindowDimensionsWorklet;
const height = Reflect.apply(getWindowDimensionsWorklet, useWindowDimensionsSharedValueNativeModule, []).height;
const binding = env1_1;
const get = binding.get;
const value4 = height - Reflect.apply(get, binding, []).offset - LAUNCH_PAD_PULL_TAB_MAX_POSITION;
const useSafeAreaInsetsSharedValueNativeModule = require(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */;
const getSafeAreaInsetsWorklet = useSafeAreaInsetsSharedValueNativeModule.getSafeAreaInsetsWorklet;
const value5 = Reflect.apply(getSafeAreaInsetsWorklet, useSafeAreaInsetsSharedValueNativeModule,
[]).top + LAUNCH_PAD_PULL_TAB_SCALE_OFFSET;
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const value6 = Reflect.apply(max, Math, [Math2.min(a0, value4), value5]);
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(binding, {position: value6});
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS((require(15315) /* metro dependency 15315: LaunchPadPullTabCache */).persistLaunchPadPullTabPosition)(value6);
}
function setLaunchPadPullTabTranslation(a0) { // fn#117070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:3770, offset: 0x024a2818, size: 45 bytes, params: 2, frame: 11
const value = environment.__proto__;
const binding = env1_0;
const get = binding.get;
setLaunchPadPullTabBoundedPosition(Reflect.apply(get, binding, []).initialPullTabPosition + a0);
}
function setLaunchPadPullTabPosition(a0, a1) { // fn#117071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:3972, offset: 0x024a2845, size: 57 bytes, params: 3, frame: 14
const value = environment.__proto__.__proto__;
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_1, {position: a0,
offset: a1});
}
function setLaunchPadPullTabScale(a0) { // fn#117072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:4169, offset: 0x024a287e, size: 50 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_1, {scale: a0});
}
function setLaunchPadPullTabMinimized(a0) { // fn#117073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:4356, offset: 0x024a28b0, size: 50 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__;
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_1, {minimized: a0});
}
function onWindowHeightChange() { // fn#117074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15511:4539, offset: 0x024a28e2, size: 37 bytes, params: 1, frame: 11
const binding = env1_1;
const get = binding.get;
setLaunchPadPullTabBoundedPosition(Reflect.apply(get, binding, []).position);
}
@@ -0,0 +1,32 @@
/* Metro module 11325; source: modules/launchpad/native/useLaunchPadType.tsx; dependencies: [11324, 3829, 1314, 2] */
function _fun86453(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11511:6, offset: 0x01f951f6, size: 117 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(11324) /* metro dependency 11324: LaunchPadConstants */).LaunchPadTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/useLaunchPadType.tsx');
exports.default = useLaunchPadType;
}
function useLaunchPadType() { // fn#86454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11511:210, offset: 0x01f9526b, size: 221 bytes, params: 1, frame: 14
const LaunchPadModeSetting = (require(3829) /* metro dependency 3829: UserSettings */).LaunchPadModeSetting;
const value2 = LaunchPadModeSetting.useSetting();
const LaunchPadMode = (require(1314) /* metro dependency 1314: preloaded_user_settings */).LaunchPadMode;
const LAUNCH_PAD_DISABLED = LaunchPadMode.LAUNCH_PAD_DISABLED;
if (LAUNCH_PAD_DISABLED === value2) {
return LaunchPadTypes.DISABLED;
}
const LAUNCH_PAD_GESTURE_FULL_SCREEN = LaunchPadMode.LAUNCH_PAD_GESTURE_FULL_SCREEN;
if (LAUNCH_PAD_GESTURE_FULL_SCREEN === value2) {
return LaunchPadTypes.GESTURE_FULL;
}
const LAUNCH_PAD_GESTURE_RIGHT_EDGE = LaunchPadMode.LAUNCH_PAD_GESTURE_RIGHT_EDGE;
if (LAUNCH_PAD_GESTURE_RIGHT_EDGE === value2) {
return LaunchPadTypes.GESTURE_EDGE;
}
const LAUNCH_PAD_PULL_TAB = LaunchPadMode.LAUNCH_PAD_PULL_TAB;
if (LAUNCH_PAD_PULL_TAB === value2) {
return LaunchPadTypes.PULL_TAB;
}
}