Initial commit

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

No files matched your search

@@ -0,0 +1,146 @@
/* Metro module 11792; source: modules/voice_panel/native/controls/VoicePanelChatView.tsx; dependencies: [31, 27, 11793, 661, 33, 4501, 7712, 1239, 8341, 1244, 4067, 11794, 4017, 8141, 7704, 7701, 1478, 1585, 11801, 4603, 4003, 11337, 3868, 4556, 11802, 11273, 2] */
function _fun90308(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:6, offset: 0x0203408b, size: 387 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
(require(27) /* metro dependency 27 */).Platform;
const CONTROLS_DRAWER_HEADER_SIZE = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).CONTROLS_DRAWER_HEADER_SIZE;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.ComponentActions;
const env0_5 = constantsModule.ME;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
'overflow': 'hidden', paddingTop: CONTROLS_DRAWER_HEADER_SIZE}, gradientWrapper: {'position': 'absolute',
'top': null, 'left': 0, top: CONTROLS_DRAWER_HEADER_SIZE}, titleBlur: {opacity: 0}});
const value5 = value.memo(VoicePanelDismissChatButton);
object = {code: 'function VoicePanelChatViewTsx1(){const{windowDimensions}=this.__closure;return{width:windowDimensions.get().width,height:windowDimensions.get().height};}'};
const env0_10 = value.memo(_fun90312);
value = value.memo(VoicePanelChatView);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelChatView.tsx');
exports.default = value;
exports.MemoedVoicePanelDismissChatButton = value5;
}
function updateChatOpen_90309(a0, a1) { // fn#90309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:377, offset: 0x0203420e, size: 45 bytes, params: 3, frame: 14
(importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */).updateChatOpen(a0, a1);
}
function VoicePanelDismissChatButton() { // fn#90310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:448, offset: 0x0203423b, size: 160 bytes, params: 1, frame: 20
const value2 = env0_3.useCallback(function() {
var ComponentDispatch = require(dependencyMap[7]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.VOICE_PANEL_TIV_CLOSE);
}, []);
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<IconButton
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5MstTl'])}
icon={importDefault(4067) /* metro dependency 4067 */}
onPress={value2}
variant="primary-overlay"
/>
);
}
function _fun90312() { // fn#90312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:899, offset: 0x02034310, size: 212 bytes, params: 1, frame: 19
const binding = env0_3;
const useContext = binding.useContext;
const windowDimensions = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).windowDimensions;
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
var windowDimensionsBinding = windowDimensions;
object.width = windowDimensionsBinding.get().width;
object.height = windowDimensionsBinding.get().height;
return object;
};
closure.__closure = {windowDimensions: windowDimensions};
closure.__workletHash = 16775846409623;
closure.__initData = env0_9;
return ((Component) => <Component style={[styles.gradientWrapper, Reflect.apply(useAnimatedStyle,
reanimatedRexportModule,
[closure])]}>{((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */)}</Component>)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
}
function VoicePanelChatView({shown}) { // fn#90314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:1228, offset: 0x02034413, size: 625 bytes, params: 2, frame: 34
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useRef(null);
const {guildId,
channelId} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value4 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop();
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const value5 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const controlsDrawerOpenWidth = (require(11801) /* metro dependency 11801: VoicePanelControlsUtils */).getControlsDrawerOpenWidth(width,
value5.left, value5.right);
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[19]);
defaultImport.preload(guildId ?? ME, channelId);
return _fun90316;
}, [guildId, channelId]);
binding.useEffect(_fun90317, [channelId, shown]);
const value7 = binding.useCallback(function() {
var ComponentDispatch = require(dependencyMap[7]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.VOICE_PANEL_TIV_CLOSE);
}, []);
const value8 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const Provider = (importDefault(11337) /* metro dependency 11337: ChatViewWidthContext */).Provider;
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const AccessibilityView = (require(4556) /* metro dependency 4556: AccessibilityViewNative */).AccessibilityView;
const items3 = [styles.container, value4];
const items2 = [((Component) => <Component />)(env0_10)];
const VoicePanelControlsDrawerTitle = importDefault(11802) /* metro dependency 11802: VoicePanelControlsDrawerTitle */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <VoicePanelControlsDrawerTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/VQax8'])} disablePill blurStyle={styles.titleBlur} />;
items2[2] = ((Component) => <Component disableGradient alwaysRespectKeyboard={false} setNoExtractUI={false} guildId={guildId ?? ME} channelId={channelId} chatInputRef={value2} screenIndex="voice-panel" />)(importDefault(11273) /* metro dependency 11273: ChatView */);
return (
<Provider value={controlsDrawerOpenWidth}>
<ThemeContextProvider gradient={value8}>
<AccessibilityView
nativeID="voice-panel-chat-view"
accessibilityViewIsModal={shown}
onAccessibilityEscape={value7}
style={items3}
>
{items2}
</AccessibilityView>
</ThemeContextProvider>
</Provider>
);
}
function _fun90315() { // fn#90315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:1474, offset: 0x02034684, size: 75 bytes, params: 1, frame: 15
const defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
defaultImport.preload(guildId ?? ME, channelId);
return function() {
updateChatOpen_90309(channelId, false);
};
}
function _fun90317() { // fn#90317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11978:1560, offset: 0x020346e9, size: 95 bytes, params: 1, frame: 14
const updateChatOpen_90309Binding = updateChatOpen_90309;
const channelIdBinding = channelId;
const shownBinding = shown;
updateChatOpen_90309Binding(channelIdBinding, shownBinding);
let current = env0_1.current;
if (shownBinding) {
if (current != null) {
current.chatInputTrackerRegister();
}
} else {
if (current != null) {
current.chatInputTrackerUnregister();
}
current = env0_1.current;
if (current != null) {
current.blur();
}
}
}
@@ -0,0 +1,189 @@
/* Metro module 15522; source: modules/voice_panel/native/controls/VoicePanelConsoleStatus.tsx; dependencies: [31, 11795, 11798, 11793, 33, 4501, 697, 11794, 15517, 4017, 4508, 15523, 4577, 6821, 1305, 4573, 5278, 9422, 1244, 15524, 2] */
function _fun118857(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:6, offset: 0x024f1b51, size: 502 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const closure = VoicePanelConsoleStatus;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const MODE_CHANGE_PHYSICS = (require(11795) /* metro dependency 11795: VoicePanelConstants */).MODE_CHANGE_PHYSICS;
const env0_4 = (require(11798) /* metro dependency 11798: VoicePanelCardConstants */).EDGE_GUTTER;
const CONTROLS_HEIGHT = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).CONTROLS_HEIGHT;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {consoleParentContainer: {'zIndex': 1, 'position': 'absolute', 'bottom': 0, 'overflow': 'hidden',
'left': -0.5, 'right': 0, 'alignItems': 'center'}};
let VOICE_PANEL_CONTROLS_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_CONTROLS_BORDER_RADIUS;
object2.consoleContainer = {borderRadius: VOICE_PANEL_CONTROLS_BORDER_RADIUS, overflow: 'hidden'};
object2.consoleItemContainer = {'flexDirection': 'row', 'alignItems': 'center', 'height': 36,
'marginHorizontal': 18};
object2.consoleText = {'textAlign': 'left', 'marginStart': 4, 'flex': 1};
VOICE_PANEL_CONTROLS_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_CONTROLS_BORDER_RADIUS;
object2.blockingControlCover = {'position': 'absolute', 'bottom': 0, 'borderRadius': null, 'flex': 1,
'height': null, 'overflow': 'hidden', borderRadius: VOICE_PANEL_CONTROLS_BORDER_RADIUS, height: CONTROLS_HEIGHT};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
object2 = {};
copyDataProperties(object2, MODE_CHANGE_PHYSICS, undefined);
object2['overshootClamping'] = true;
object2 = {code: "function VoicePanelConsoleStatusTsx1(){const{color,windowDimensions,EDGE_GUTTER,CONTROLS_HEIGHT,CONSOLE_STATUS_HEIGHT,withSpring,shouldShow,FADE_IN_MODE_PHYSICS,runOnJS,cleanUp}=this.__closure;return{backgroundColor:color,width:windowDimensions.get().width-EDGE_GUTTER*2,height:CONTROLS_HEIGHT+CONSOLE_STATUS_HEIGHT,borderRadius:32,transform:[{translateY:withSpring(shouldShow.get()?0:100,FADE_IN_MODE_PHYSICS,'respect-motion-settings',function(finished){if(finished&&!shouldShow.get()){runOnJS(cleanUp)();}})}]};}"};
object2 = {code: 'function VoicePanelConsoleStatusTsx2(finished){const{shouldShow,runOnJS,cleanUp}=this.__closure;if(finished&&!shouldShow.get()){runOnJS(cleanUp)();}}'};
object2 = {code: 'function VoicePanelConsoleStatusTsx3(){const{windowDimensions,EDGE_GUTTER}=this.__closure;return{width:windowDimensions.get().width-EDGE_GUTTER*2};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelConsoleStatus.tsx');
exports.default = closure;
exports.CONSOLE_STATUS_HEIGHT = 36;
exports.renderVoicePanelConsoleStatus = renderVoicePanelConsoleStatus;
}
function VoicePanelConsoleStatus({wrapperSpecs, accessoryHeights, state, cleanUp}) { // fn#118858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:1646, offset: 0x024f1d47, size: 1063 bytes, params: 2, frame: 40
var object2;
var r18;
var PressableOpacity;
var intl;
const styles = useStyles();
const {channelId, windowDimensions,
mode} = env0_3.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value3 = (importDefault(15517) /* metro dependency 15517: useConsoleConnectingInfo */)(channelId);
const icon = value3.icon;
const text = value3.text;
const color = value3.color;
var env0_3 = color;
const displayCancel = value3.displayCancel;
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
env0_3.useEffect(_fun118859, [value4, state]);
const value5 = (importDefault(15523) /* metro dependency 15523: useControlsTranslation */)(mode, wrapperSpecs,
accessoryHeights);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = VoicePanelConsoleStatusV;
object2 = {color: color, windowDimensions: windowDimensions};
object2.EDGE_GUTTER = EDGE_GUTTER;
object2.CONTROLS_HEIGHT = CONTROLS_HEIGHT;
object2.CONSOLE_STATUS_HEIGHT = 36;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.shouldShow = value4;
object2.FADE_IN_MODE_PHYSICS = env0_9;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
closure.__closure = object2;
closure.__workletHash = 14156265059426;
closure.__initData = env0_10;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = function() {
var object = {};
object.width = windowDimensions.get().width - 2 * EDGE_GUTTER;
return object;
};
closure.__closure = {windowDimensions: windowDimensions, EDGE_GUTTER: EDGE_GUTTER};
closure.__workletHash = 2418678233810;
closure.__initData = env0_12;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [styles.consoleParentContainer, value5];
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const items2 = [styles.consoleContainer];
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const defaultImport2 = NativeView;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const SMALL = IconSizes.SMALL;
const items3 = [<Icon source={icon} color={WHITE} size={SMALL} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items3[1] = <Text variant="text-sm/medium" color="always-white" style={styles.consoleText}>{text}</Text>;
if (displayCancel) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var pressableOpacityProps = {hitSlop: 4,
onPress: (require(9422) /* metro dependency 9422: GameConsoleActionCreators */).disconnectRemote};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r18 = <PressableOpacity {...pressableOpacityProps}><Text variant="text-sm/medium" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}</Text></PressableOpacity>;
} else {
r18 = null;
}
items3[2] = r18;
const nativeView = <NativeView style={items2}><View2 style={value6}>{((Component) => <Component style={styles.consoleItemContainer}>{items3}</Component>)(defaultImport2)}</View2></NativeView>;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items5 = [styles.blockingControlCover, value7];
const VoicePanelVisualEffectView = (require(15524) /* metro dependency 15524: VoicePanelVisualEffectView */).VoicePanelVisualEffectView;
return (
<View style={items4}>
{nativeView}
<View3 style={items5}>
<VoicePanelVisualEffectView />
</View3>
</View>
);
}
function renderVoicePanelConsoleStatus(a0, a1, a2, a3) { // fn#118863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:3690, offset: 0x024f232c, size: 61 bytes, params: 5, frame: 15
return (
<VoicePanelConsoleStatus
{...a1}
{...{['state']: a2}}
{...{['cleanUp']: a3}}
key={a0}
/>
);
}
function _fun118859() { // fn#118859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:1913, offset: 0x024f216e, size: 64 bytes, params: 1, frame: 14
const binding = env0_4;
const set = binding.set;
const stateBinding = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
Reflect.apply(set, binding, [stateBinding !== YEETED]);
}
function VoicePanelConsoleStatusV() { // fn#118860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:2028, owner: VoicePanelConsoleStatus.V, offset: 0x024f21ae, size: 257 bytes, params: 1, frame: 25
const object2 = {};
object2.backgroundColor = color;
const windowDimensionsBinding = windowDimensions;
const get = windowDimensionsBinding.get;
object2.width = Reflect.apply(get, windowDimensionsBinding, []).width - 2 * EDGE_GUTTER;
object2.height = CONTROLS_HEIGHT + 36;
object2.borderRadius = 32;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
let binding = env0_4;
const r5 = binding.get() ? 0 : 100;
binding = env1_9;
const closure = VN_118861;
const object4 = {shouldShow: env0_4};
object4.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object4.cleanUp = cleanUp;
closure.__closure = object4;
closure.__workletHash = 9820708059867;
closure.__initData = env1_11;
object2.transform = [{translateY: Reflect.apply(withSpring, springModule, [r5, binding, 'respect-motion-settings',
closure])}];
return object2;
}
function VN_118861(a0) { // fn#118861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15719:2204, owner: VoicePanelConsoleStatus.V.n, offset: 0x024f22af, size: 78 bytes, params: 2, frame: 12
var r0;
var binding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
binding = env1_4;
value = !binding.get();
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,109 @@
/* Metro module 15561; source: modules/voice_panel/native/controls/VoicePanelControlsAppLauncher.tsx; dependencies: [31, 1379, 11793, 661, 33, 4501, 7701, 11794, 8621, 566, 44, 11801, 1239, 8774, 8048, 4017, 11622, 11802, 1244, 2] */
function _fun119100(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15758:6, offset: 0x024fc937, size: 334 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const voicePanelControlsConstantsModule = require(11793) /* metro dependency 11793: VoicePanelControlsConstants */;
const env0_5 = voicePanelControlsConstantsModule.VoicePanelControlsModes;
const CONTROLS_DRAWER_HEADER_SIZE = voicePanelControlsConstantsModule.CONTROLS_DRAWER_HEADER_SIZE;
const env0_6 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
const env0_9 = value3.Fragment;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {width: '100%',
paddingTop: CONTROLS_DRAWER_HEADER_SIZE}});
object = {code: 'function VoicePanelControlsAppLauncherTsx1(){const{gestureSpecs}=this.__closure;return gestureSpecs.get().active;}'};
object = {code: 'function VoicePanelControlsAppLauncherTsx2(){const{gestureSpecs}=this.__closure;return gestureSpecs.get().isDrawer;}'};
object = {code: "function VoicePanelControlsAppLauncherTsx3(){const{isGestureActive,isGestureDrawerMode,windowDimensions,safeArea}=this.__closure;const height=isGestureActive.get()||!isGestureDrawerMode.get()?windowDimensions.height-safeArea.top:'100%';return{height:height};}"};
value = value.memo(VoicePanelControlsAppLauncher);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsAppLauncher.tsx');
exports.default = value;
}
function VoicePanelControlsAppLauncher({gestureSpecs}) { // fn#119101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15758:856, offset: 0x024fca85, size: 908 bytes, params: 2, frame: 37
const styles = useStyles();
const value2 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientTop();
const binding = env0_3;
const value3 = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const setControlsMode = value3.setControlsMode;
const safeArea = value3.safeArea;
const windowDimensions = value3.windowDimensions;
const env0_2 = value3.channelId;
const value4 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(windowDimensions);
const value5 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(safeArea);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(importDefault(44) /* metro dependency 44 */)(channel != null, 'channel should not be null');
const controlsDrawerOpenWidth = (require(11801) /* metro dependency 11801: VoicePanelControlsUtils */).getControlsDrawerOpenWidth(value4.width,
value5.left, value5.right);
const value7 = binding.useCallback(function() {
var ComponentDispatch = require(dependencyMap[12]).ComponentDispatch;
ComponentDispatch.dispatch(ComponentActions.SELECT_ACTIVITY);
setControlsMode({mode: VoicePanelControlsModes.HIDDEN});
}, [setControlsMode]);
const value8 = (require(8774) /* metro dependency 8774: AppLauncherContext */).useAppLauncherChatInputRefDummy({noop: true});
const AppLauncherEntrypoint = (require(8048) /* metro dependency 8048: AppLauncherTypes */).AppLauncherEntrypoint;
const VOICE = AppLauncherEntrypoint.VOICE;
const useRef = binding.useRef;
const AppLauncherKeyboardCloseReason = (require(8774) /* metro dependency 8774: AppLauncherContext */).AppLauncherKeyboardCloseReason;
const DISMISSED = AppLauncherKeyboardCloseReason.DISMISSED;
const value9 = Reflect.apply(useRef, binding, [DISMISSED]);
const value10 = binding.useRef(undefined);
const value11 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value12 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = function() {
return gestureSpecs.get().active;
};
closure.__closure = {gestureSpecs: gestureSpecs};
closure.__workletHash = 1130089519653;
closure.__initData = env0_11;
const value13 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue8 = reanimatedRexportModule;
useDerivedValue = moduleValue8.useDerivedValue;
closure = function() {
return gestureSpecs.get().isDrawer;
};
closure.__closure = {gestureSpecs: gestureSpecs};
closure.__workletHash = 13970291088135;
closure.__initData = env0_12;
const value14 = Reflect.apply(useDerivedValue, moduleValue8, [closure]);
const moduleValue9 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue9.useAnimatedStyle;
closure = VoicePanelControlsAppLauncherL;
closure.__closure = {isGestureActive: value13, isGestureDrawerMode: value14, windowDimensions: value4,
safeArea: value5};
closure.__workletHash = 3671157204025;
closure.__initData = env0_13;
const value15 = Reflect.apply(useAnimatedStyle, moduleValue9, [closure]);
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [styles.container, value2, value15];
let value = importDefault(11622) /* metro dependency 11622: AppLauncherNavigator */;
value = ((Component) => <Component bottomSheetIndex={value12} bottomSheetPosition={value11} bottomSheetExpandReasonRef={value10} context={{type: 'channel',
channel: channel}} chatInputRef={value8} entrypoint={VOICE} keyboardCloseReasonRef={value9} onActivityItemSelected={value7} width={controlsDrawerOpenWidth} />)(value);
const items2 = [value];
value = importDefault(11802) /* metro dependency 11802: VoicePanelControlsDrawerTitle */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = ((Component) => <Component title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.shUONg)} disablePill />)(value);
return (
<>
<View style={items3}>
{items2}
</View>
</>
);
}
function VoicePanelControlsAppLauncherL() { // fn#119106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15758:1866, owner: VoicePanelControlsAppLauncher.L, offset: 0x024fceac, size: 71 bytes, params: 1, frame: 11
const binding = env0_5;
const get = binding.get;
return {height: Reflect.apply(get, binding,
[]) ? env0_3.height - env0_4.top : env0_6.get() ? '100%' : env0_3.height - env0_4.top};
}
@@ -0,0 +1,18 @@
/* Metro module 11793; source: modules/voice_panel/native/controls/VoicePanelControlsConstants.tsx; dependencies: [2] */
function _fun90319(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11979:6, offset: 0x02034748, size: 218 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsConstants.tsx');
exports.VoicePanelControlsModes = {FLOATING_DEFAULT: 'floating-default', DRAWER: 'drawer', HIDDEN: 'hidden',
RESET: 'reset'};
exports.CONTROLS_HEIGHT_PTT = 112;
exports.CONTROLS_HEIGHT = 80;
exports.CONTROLS_MAX_WIDTH = 400;
exports.CONTROLS_HIDE_TIMEOUT = 3000;
exports.CONTROLS_BACKGROUND_OPACITY_ANDROID = 0.9;
exports.CONTROLS_BUTTON_SIZE_NORMAL = 48;
exports.CONTROLS_BUTTON_SIZE_LARGE = 72;
exports.CONTROLS_DRAWER_HEADER_SIZE = 60;
exports.CONTROLS_DRAWER_HEADER_EXPANDED_SIZE = 104;
}
@@ -0,0 +1,142 @@
/* Metro module 15548; source: modules/voice_panel/native/controls/VoicePanelControlsDimOverlay.tsx; dependencies: [31, 12760, 11795, 11793, 33, 11794, 4017, 15516, 4577, 12991, 4562, 2] */
function _fun118983(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:6, offset: 0x024f7be0, size: 292 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(12760) /* metro dependency 12760: BackdropConstants */).BACKDROP_OPAQUE_MAX_OPACITY;
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const env0_5 = voicePanelConstantsModule.PANEL_CONTROLS_HEIGHT_PHYSICS;
const env0_6 = voicePanelConstantsModule.VoicePanelModes;
const env0_7 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
object = {code: "function VoicePanelControlsDimOverlayTsx1(){const{windowDimensions,getDrawerSpec,safeArea,controlsSpecs,VoicePanelControlsModes,mode,VoicePanelModes,interpolate,wrapperSpecs,BACKDROP_OPAQUE_MAX_OPACITY}=this.__closure;const{height:height}=windowDimensions.get();const{minHeight:minHeight,maxHeight:maxHeight}=getDrawerSpec(height,safeArea.get().top);if(controlsSpecs.get().mode!==VoicePanelControlsModes.DRAWER||mode.get()!==VoicePanelModes.PANEL){return 0;}return interpolate(wrapperSpecs.get().height,[minHeight,maxHeight],[0,BACKDROP_OPAQUE_MAX_OPACITY],'clamp');}"};
object = {code: 'function VoicePanelControlsDimOverlayTsx2(){const{overlayOpacity}=this.__closure;return overlayOpacity.get()>=0.35;}'};
object = {code: "function VoicePanelControlsDimOverlayTsx3(){const{withSpring,overlayOpacity,PANEL_CONTROLS_HEIGHT_PHYSICS,accessibilityPreferencesSharedValue,overlayActive}=this.__closure;return{zIndex:1,opacity:withSpring(overlayOpacity.get(),PANEL_CONTROLS_HEIGHT_PHYSICS),display:accessibilityPreferencesSharedValue.get().screenReaderEnabled&&!overlayActive.get()?'none':'flex'};}"};
object = {code: "function VoicePanelControlsDimOverlayTsx4(){const{overlayActive}=this.__closure;return{pointerEvents:!overlayActive.get()?'none':'auto'};}"};
value = value.memo(VoicePanelControlsDimOverlay);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsDimOverlay.tsx');
exports.default = value;
}
function VoicePanelControlsDimOverlay({wrapperSpecs}) { // fn#118984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:1506, offset: 0x024f7d04, size: 614 bytes, params: 2, frame: 26
const binding = env0_3;
const {windowDimensions, setControlsMode, controlsSpecs, safeArea,
mode} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = VoicePanelControlsDimOverlayA;
const object2 = {windowDimensions: windowDimensions};
const getDrawerSpec = (require(15516) /* metro dependency 15516: VoicePanelControlUtils */).getDrawerSpec;
object2.getDrawerSpec = getDrawerSpec;
object2.safeArea = safeArea;
object2.controlsSpecs = controlsSpecs;
object2.VoicePanelControlsModes = VoicePanelControlsModes;
object2.mode = mode;
object2.VoicePanelModes = VoicePanelModes;
object2.interpolate = reanimatedRexportModule.interpolate;
object2.wrapperSpecs = wrapperSpecs;
object2.BACKDROP_OPAQUE_MAX_OPACITY = BACKDROP_OPAQUE_MAX_OPACITY;
closure.__closure = object2;
closure.__workletHash = 17386741533055;
closure.__initData = env0_9;
const value3 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
useDerivedValue = moduleValue2.useDerivedValue;
closure = VoicePanelControlsDimOverlayY;
closure.__closure = {overlayOpacity: value3};
closure.__workletHash = 733654137262;
closure.__initData = env0_10;
const value4 = Reflect.apply(useDerivedValue, moduleValue2, [closure]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = VoicePanelControlsDimOverlayS;
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
overlayOpacity: value3, PANEL_CONTROLS_HEIGHT_PHYSICS: PANEL_CONTROLS_HEIGHT_PHYSICS,
accessibilityPreferencesSharedValue: (require(12991) /* metro dependency 12991: AccessibilityPreferencesSharedValue */).accessibilityPreferencesSharedValue,
overlayActive: value4};
closure.__workletHash = 7500180433000;
closure.__initData = env0_11;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const moduleValue4 = reanimatedRexportModule;
const useAnimatedProps = moduleValue4.useAnimatedProps;
closure = VoicePanelControlsDimOverlayV;
closure.__closure = {overlayActive: value4};
closure.__workletHash = 873976025930;
closure.__initData = env0_12;
const value6 = Reflect.apply(useAnimatedProps, moduleValue4, [closure]);
const value7 = binding.useCallback(function() {
setControlsMode({mode: VoicePanelControlsModes.FLOATING_DEFAULT});
}, [setControlsMode]);
const Backdrop = (require(4562) /* metro dependency 4562: BackdropNative */).Backdrop;
return (
<Backdrop
onDismiss={value7}
style={value5}
animatedProps={value6}
opaque
{...{['aria-hidden']: true}}
/>
);
}
function VoicePanelControlsDimOverlayA() { // fn#118985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:1709, owner: VoicePanelControlsDimOverlay.A, offset: 0x024f7f6a, size: 244 bytes, params: 1, frame: 20
var r0;
var moduleValue2;
var interpolate;
var wrapperSpecsBinding;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const height = Reflect.apply(get, windowDimensionsBinding, []).height;
const voicePanelControlUtilsModule = require(15516) /* metro dependency 15516: VoicePanelControlUtils */;
const getDrawerSpec = voicePanelControlUtilsModule.getDrawerSpec;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const {minHeight, maxHeight} = Reflect.apply(getDrawerSpec, voicePanelControlUtilsModule, [height,
Reflect.apply(get, safeAreaBinding, []).top]);
const controlsSpecsBinding = controlsSpecs;
get = controlsSpecsBinding.get;
const mode2 = Reflect.apply(get, controlsSpecsBinding, []).mode;
const DRAWER = VoicePanelControlsModes.DRAWER;
const value4 = 0;
if (mode2 !== DRAWER) {
r0 = value4;
} else if (mode.get() !== VoicePanelModes.PANEL) {
r0 = value4;
} else {
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = moduleValue2.interpolate;
wrapperSpecsBinding = wrapperSpecs;
r0 = Reflect.apply(interpolate, moduleValue2, [wrapperSpecsBinding.get().height, [minHeight, maxHeight], [0,
BACKDROP_OPAQUE_MAX_OPACITY], 'clamp']);
}
return r0;
}
function VoicePanelControlsDimOverlayY() { // fn#118986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:2219, owner: VoicePanelControlsDimOverlay.y, offset: 0x024f805e, size: 32 bytes, params: 1, frame: 9
return env0_6.get() >= 0.35;
}
function VoicePanelControlsDimOverlayS() { // fn#118987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:2345, owner: VoicePanelControlsDimOverlay.S, offset: 0x024f807e, size: 143 bytes, params: 1, frame: 19
const object2 = {zIndex: 1};
let value = environment.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const binding = env0_6;
let get = binding.get;
object2.opacity = Reflect.apply(withSpring, springModule, [Reflect.apply(get, binding, []),
PANEL_CONTROLS_HEIGHT_PHYSICS]);
const accessibilityPreferencesSharedValue = (require(12991) /* metro dependency 12991: AccessibilityPreferencesSharedValue */).accessibilityPreferencesSharedValue;
get = accessibilityPreferencesSharedValue.get;
const screenReaderEnabled = Reflect.apply(get, accessibilityPreferencesSharedValue, []).screenReaderEnabled;
value = 'flex';
object2.display = screenReaderEnabled ? env0_7.get() ? value : 'none' : value;
return object2;
}
function VoicePanelControlsDimOverlayV() { // fn#118988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15745:2781, owner: VoicePanelControlsDimOverlay.v, offset: 0x024f810d, size: 36 bytes, params: 1, frame: 10
const object2 = {};
object2.pointerEvents = env0_7.get() ? 'auto' : 'none';
return object2;
}
@@ -0,0 +1,219 @@
/* Metro module 15549; source: modules/voice_panel/native/controls/VoicePanelControlsDrawer.tsx; dependencies: [57, 31, 27, 11795, 33, 4501, 697, 6619, 4521, 11792, 11794, 4017, 11801, 4577, 7739, 15550, 15561, 2] */
function _fun118990(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:6, offset: 0x024f8154, size: 451 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_6 = value2.View;
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const env0_7 = voicePanelConstantsModule.MODE_CHANGE_PHYSICS;
const env0_8 = voicePanelConstantsModule.VoicePanelModes;
const value4 = require(33) /* metro dependency 33 */;
const env0_9 = value4.jsx;
const env0_10 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object2.drawer = {'flex': 1, 'zIndex': 1, backgroundColor: BACKGROUND_BASE_LOWER};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4['backgroundColor'] = BACKGROUND_BASE_LOWER;
object2.tabOverlay = object4;
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object2]);
const value6 = value.memo(_fun118992);
object2 = {code: 'function VoicePanelControlsDrawerTsx1(){const{getControlsDrawerOpenWidth,windowDimensions,safeArea,withSpring,wrapperSpecs,TRANSITIONAL_HEIGHT,MODE_CHANGE_PHYSICS}=this.__closure;return{width:getControlsDrawerOpenWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right),opacity:withSpring(wrapperSpecs.get().height>=TRANSITIONAL_HEIGHT?1:0,MODE_CHANGE_PHYSICS)};}'};
object2 = {code: 'function VoicePanelControlsDrawerTsx2(){const{wrapperSpecs,mode}=this.__closure;return[wrapperSpecs.get().drawerMode,mode.get()];}'};
object2 = {code: 'function VoicePanelControlsDrawerTsx3(props,previous){const{cheapWorkletArrayShallowEqual,VoicePanelModes,runOnJS,setFreeze}=this.__closure;if(cheapWorkletArrayShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const[isDrawer,mode]=props;if(previous!=null&&isDrawer===previous[0]&&mode===previous[1]){return;}if(mode!==VoicePanelModes.PANEL||!isDrawer){runOnJS(setFreeze)(true);}else{runOnJS(setFreeze)(false);}}'};
value = value.memo(VoicePanelControlsDrawer);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsDrawer.tsx');
exports.default = value;
exports.LazyContentFreezer = value6;
}
function renderChat(a0) { // fn#118991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:726, offset: 0x024f8317, size: 88 bytes, params: 2, frame: 17
return (
<View collapsable={false} style={StyleSheet.absoluteFill}>
{((Component) => <Component shown={a0} />)(importDefault(11792) /* metro dependency 11792: VoicePanelChatView */)}
</View>
);
}
function _fun118992({shown, renderContent}) { // fn#118992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:435, offset: 0x024f836f, size: 273 bytes, params: 2, frame: 20
let binding = env0_4;
const value3 = undefined(binding.useState(!shown), 2);
const property = value3[0];
if (shown && property) {
value3[1](false);
}
binding = env0_4;
const value4 = binding.useRef(shown);
binding.useEffect(_fun118993);
binding.useEffect(_fun118994, [shown]);
if ((importDefault(6619) /* metro dependency 6619: useRefValue */)(value4) || shown) {
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
return (
<Freeze freeze={property}>
{binding.useMemo(function() {
return renderContent(shown);
}, [renderContent, shown])}
</Freeze>
);
} else {
return null;
}
}
function VoicePanelControlsDrawer({tab, sharedTab, wrapperSpecs, gestureSpecs, openTab}) { // fn#118996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:1838, offset: 0x024f84b8, size: 782 bytes, params: 2, frame: 30
let binding = env0_4;
const value2 = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const mode = value2.mode;
const env0_3 = mode;
const windowDimensions = value2.windowDimensions;
var env0_4 = windowDimensions;
const safeArea = value2.safeArea;
const styles = useStyles();
const [property, property2] = env0_3(binding.useState(tab == null), 2);
const get = sharedTab.get;
if (tab !== Reflect.apply(get, sharedTab, []) && property) {
property2(false);
}
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = VoicePanelControlsDrawerK;
const object2 = {};
const getControlsDrawerOpenWidth = (require(11801) /* metro dependency 11801: VoicePanelControlsUtils */).getControlsDrawerOpenWidth;
object2.getControlsDrawerOpenWidth = getControlsDrawerOpenWidth;
object2.windowDimensions = windowDimensions;
object2.safeArea = safeArea;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.wrapperSpecs = wrapperSpecs;
object2.TRANSITIONAL_HEIGHT = 200;
object2.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 8777106499672;
closure.__initData = env0_13;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue2 = reanimatedRexportModule;
const useAnimatedReaction = moduleValue2.useAnimatedReaction;
closure = function() {
var items = [wrapperSpecs.get().drawerMode];
items[1] = mode.get();
return items;
};
closure.__closure = {wrapperSpecs: wrapperSpecs, mode: mode};
closure.__workletHash = 16802013961309;
closure.__initData = env0_14;
const closure2 = VoicePanelControlsDrawerM;
closure2.__closure = {cheapWorkletArrayShallowEqual: (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletArrayShallowEqual,
VoicePanelModes: VoicePanelModes, runOnJS: reanimatedRexportModule.runOnJS, setFreeze: property2};
closure2.__workletHash = 10375596551326;
closure2.__initData = env0_15;
Reflect.apply(useAnimatedReaction, moduleValue2, [closure, closure2]);
binding = env0_4;
const value7 = binding.useCallback(_fun119000, [openTab, styles]);
const value8 = binding.useCallback(_fun119001, [gestureSpecs, styles]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
binding = env0_12;
const value9 = !property;
return (
<View style={[styles.drawer, value6]}>
{((Component) => <Component shown={property ? value9 : tab === 'chat'} renderContent={renderChat} />)(binding)}
{((Component) => <Component shown={property ? value9 : tab === 'settings'} renderContent={value7} />)(env0_12)}
{((Component) => <Component shown={property ? value9 : tab === 'app_launcher'} renderContent={value8} />)(env0_12)}
</View>
);
}
function _fun118993() { // fn#118993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:558, offset: 0x024f8480, size: 29 bytes, params: 1, frame: 4
const binding = env0_3;
binding.current = binding.current || shown;
}
function _fun118994() { // fn#118994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:602, offset: 0x024f849d, size: 27 bytes, params: 1, frame: 11
if (!shown) {
env0_2(true);
}
}
function VoicePanelControlsDrawerK() { // fn#118997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:2120, owner: VoicePanelControlsDrawer.k, offset: 0x024f87c6, size: 163 bytes, params: 1, frame: 22
const object2 = {};
const voicePanelControlsUtilsModule = require(11801) /* metro dependency 11801: VoicePanelControlsUtils */;
const getControlsDrawerOpenWidth = voicePanelControlsUtilsModule.getControlsDrawerOpenWidth;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const left = Reflect.apply(get, safeAreaBinding, []).left;
get = safeAreaBinding.get;
object2.width = Reflect.apply(getControlsDrawerOpenWidth, voicePanelControlsUtilsModule, [width, left,
Reflect.apply(get, safeAreaBinding, []).right]);
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
object2.opacity = Reflect.apply(withSpring, springModule, [Reflect.apply(get, wrapperSpecsBinding,
[]).height >= 200 ? 1 : 0, MODE_CHANGE_PHYSICS]);
return object2;
}
function VoicePanelControlsDrawerM(a0, a1) { // fn#118999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:2667, owner: VoicePanelControlsDrawer.M, offset: 0x024f889a, size: 227 bytes, params: 3, frame: 18
var r3;
var value4;
var property;
var property2;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
if (!cheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
value4 = env1_3(a0, 2);
property = value4[0];
property2 = value4[1];
r3 = value != null && property === value[0];
if (r3) {
value = property2 === value[1];
r3 = value;
}
if (!r3) {
if (property2 !== VoicePanelModes.PANEL) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_7);
value(true);
} else if (property) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_7);
value(false);
} else {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_7);
value(true);
}
}
}
return value3;
}
function _fun119000(a0) { // fn#119000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:3075, offset: 0x024f897d, size: 93 bytes, params: 2, frame: 18
const value = environment.__proto__;
return (
<View style={styles.tabOverlay}>
{((Component) => <Component isVisible={a0} openTab={openTab} />)(importDefault(15550) /* metro dependency 15550: VoicePanelVoiceControls */)}
</View>
);
}
function _fun119001() { // fn#119001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15746:3174, offset: 0x024f89da, size: 85 bytes, params: 1, frame: 17
const value = environment.__proto__;
return (
<View style={styles.tabOverlay}>
{((Component) => <Component gestureSpecs={gestureSpecs} />)(importDefault(15561) /* metro dependency 15561: VoicePanelControlsAppLauncher */)}
</View>
);
}
@@ -0,0 +1,69 @@
/* Metro module 11802; source: modules/voice_panel/native/controls/VoicePanelControlsDrawerTitle.tsx; dependencies: [31, 27, 11793, 33, 4501, 697, 4017, 6821, 11803, 8141, 4573, 2] */
function _fun90395(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11988:6, offset: 0x02037924, size: 342 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 env0_3 = (require(27) /* metro dependency 27 */).StyleSheet;
const CONTROLS_DRAWER_HEADER_SIZE = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).CONTROLS_DRAWER_HEADER_SIZE;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.titleWrapper = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'justifyContent': 'center',
'alignItems': 'center', 'padding': 16, height: CONTROLS_DRAWER_HEADER_SIZE};
const object4 = {'borderRadius': null, 'paddingHorizontal': 12, 'paddingTop': 1, 'paddingBottom': 2};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.titlePill = object4;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.titlePillBG = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: "function VoicePanelControlsDrawerTitleTsx1(){const{shown,_shown,disablePill,backgroundColor}=this.__closure;const showBGColor=shown!=null?shown.get():_shown.get();return{backgroundColor:showBGColor&&!disablePill?backgroundColor:'transparent'};}"};
value = value.memo(VoicePanelControlsDrawerTitle);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelControlsDrawerTitle.tsx');
exports.default = value;
}
function VoicePanelControlsDrawerTitle({title, shown, disablePill, style, blurStyle}) { // fn#90396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11988:772, offset: 0x02037a7a, size: 430 bytes, params: 2, frame: 25
disablePill = !(disablePill === undefined) && disablePill;
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(true);
const backgroundColor = styles.titlePillBG.backgroundColor;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = VoicePanelControlsDrawerTitleP;
closure.__closure = {shown: shown, _shown: value2, disablePill: disablePill, backgroundColor: backgroundColor};
closure.__workletHash = 14837285839887;
closure.__initData = env0_7;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const items2 = [styles.titleWrapper, style];
const value4 = ((Component) => <Component shown={shown ?? value2} style={StyleSheet.absoluteFillObject} blurStyle={blurStyle} />)(importDefault(11803) /* metro dependency 11803: VoicePanelHeaderGlassBlur */);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items3 = [styles.titlePill, value3];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<NativeView style={items2}>
{value4}
<ReanimatedNativeView style={items3}>
<Text
variant="redesign/heading-18/bold"
color="mobile-text-heading-primary"
accessibilityRole="header"
>
{title}
</Text>
</ReanimatedNativeView>
</NativeView>
);
}
function VoicePanelControlsDrawerTitleP() { // fn#90397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11988:971, owner: VoicePanelControlsDrawerTitle.p, offset: 0x02037c28, size: 73 bytes, params: 1, frame: 12
const r3 = shown != null ? shown.get() : env0_2.get();
const value4 = 'transparent';
return {backgroundColor: r3 ? disablePill ? value4 : backgroundColor : value4};
}
@@ -0,0 +1,249 @@
/* Metro module 15521; source: modules/voice_panel/native/controls/VoicePanelFloatingCTAContainer.tsx; dependencies: [57, 31, 1379, 11795, 11798, 482, 33, 1357, 697, 4501, 4572, 7975, 3868, 11794, 15414, 7014, 632, 15410, 4017, 11801, 4508, 11624, 4577, 8141, 10357, 2] */
function _fun118847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:6, offset: 0x024f1280, size: 414 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const closure = VoicePanelFloatingCTAContainer;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const MODE_CHANGE_PHYSICS = value.MODE_CHANGE_PHYSICS;
const env0_6 = value.UI_SHOW_HIDE_PHYSICS;
const env0_7 = (require(11798) /* metro dependency 11798: VoicePanelCardConstants */).CALL_TILE_GUTTER;
const env0_8 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object4 = {'zIndex': 1, 'position': 'absolute', 'bottom': 0, 'left': '50%', 'overflow': 'hidden',
'alignItems': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const env0_10 = Reflect.apply(createStyles, value, [{container: object4}]);
object3 = {};
copyDataProperties(object3, MODE_CHANGE_PHYSICS, undefined);
object3['overshootClamping'] = true;
object3 = {code: "function VoicePanelFloatingCTAContainerTsx1(){const{getControlsDefaultWidth,windowDimensions,safeArea,state,TransitionStates,controlsSpecs,roundToNearestPixel,withSpring,OPACITY_CHANGE_PHYSICS,runOnJS,cleanUp,wrapperSpecs,UI_SHOW_HIDE_PHYSICS,gestureState,CALL_TILE_GUTTER,accessoryHeights}=this.__closure;const width=getControlsDefaultWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right);const opacity=state===TransitionStates.YEETED?0:1;return{bottom:controlsSpecs.get().height+16,width:width,marginLeft:roundToNearestPixel(width/2)*-1,opacity:withSpring(opacity,OPACITY_CHANGE_PHYSICS,'respect-motion-settings',function(finished){if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}),transform:[{translateX:withSpring(wrapperSpecs.get().x,UI_SHOW_HIDE_PHYSICS)},{translateY:withSpring(wrapperSpecs.get().hidden||gestureState.get().active&&!gestureState.get().requiresPop?wrapperSpecs.get().height+CALL_TILE_GUTTER+accessoryHeights.get():wrapperSpecs.get().y,UI_SHOW_HIDE_PHYSICS)}]};}"};
object3 = {code: 'function VoicePanelFloatingCTAContainerTsx2(finished){const{state,TransitionStates,runOnJS,cleanUp}=this.__closure;if(finished&&state===TransitionStates.YEETED){runOnJS(cleanUp)();}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelFloatingCTAContainer.tsx');
exports.default = closure;
exports.getFloatingCTATotalViewHeight = getFloatingCTATotalViewHeight;
exports.renderVoicePanelFloatingCTA = renderVoicePanelFloatingCTA;
}
function FloatingCTA(a0) { // fn#118848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:406, offset: 0x024f141e, size: 140 bytes, params: 2, frame: 21
const trailing = a0.trailing;
const value = Object.create(null);
value.trailing = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const RowButton = (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton;
return (
<Stack>
<RowButton
experimental_withBlurBackground
arrow={trailing == null}
trailing={trailing}
{...value2}
/>
</Stack>
);
}
function VoicePanelFloatingCTAContainer({wrapperSpecs, accessoryHeights, controlsSpecs, state, cleanUp, gestureState}) { // fn#118849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:1837, offset: 0x024f14aa, size: 691 bytes, params: 2, frame: 33
var object2;
var r4;
const env0_3 = state;
const env0_4 = cleanUp;
var value;
const styles = useStyles();
const {windowDimensions, channelId,
safeArea} = env0_4.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value3 = (importDefault(15414) /* metro dependency 15414: useChannelFloatingCTAContent */)(channelId);
const property = env0_3((require(7014) /* metro dependency 7014: useGetDismissibleContent */).useGetDismissibleContent(value3),
1)[0];
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
function() {
return ChannelStore.getChannel(channelId);
});
const value6 = env0_4.useMemo(_fun118851, [property, channel]);
const env0_11 = value6;
const value7 = (require(15410) /* metro dependency 15410: VoicePanelFloatingCTAUtils */).useFloatingCTAProps(channel);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = VoicePanelFloatingCTAContainerA;
object2 = {};
const getControlsDefaultWidth = (require(11801) /* metro dependency 11801: VoicePanelControlsUtils */).getControlsDefaultWidth;
object2.getControlsDefaultWidth = getControlsDefaultWidth;
object2.windowDimensions = windowDimensions;
object2.safeArea = safeArea;
object2.state = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
object2.TransitionStates = TransitionStates;
object2.controlsSpecs = controlsSpecs;
object2.roundToNearestPixel = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.OPACITY_CHANGE_PHYSICS = env0_11;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.cleanUp = cleanUp;
object2.wrapperSpecs = wrapperSpecs;
object2.UI_SHOW_HIDE_PHYSICS = UI_SHOW_HIDE_PHYSICS;
object2.gestureState = gestureState;
object2.CALL_TILE_GUTTER = CALL_TILE_GUTTER;
object2.accessoryHeights = accessoryHeights;
closure.__closure = object2;
closure.__workletHash = 3338259366067;
closure.__initData = env0_12;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items2 = [styles.container, value8];
if (value6 != null) {
value = importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */;
value = ((Component) => <Component contentTypes={value3}>{children_118854}</Component>)(value);
r4 = value;
} else {
r4 = value7 != null ? <FloatingCTA {...value7} /> : null;
}
return (
<ReanimatedNativeView style={items2}>
{r4}
</ReanimatedNativeView>
);
}
function getFloatingCTATotalViewHeight(a0) { // fn#118855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:3766, offset: 0x024f1a89, size: 83 bytes, params: 2, frame: 15
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const resolveRefreshToken = mobileVisualRefreshExperimentModule.resolveRefreshToken;
const TABLE_ROW_HEIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_HEIGHT;
return Reflect.apply(resolveRefreshToken, mobileVisualRefreshExperimentModule, [TABLE_ROW_HEIGHT, a0]) + 16;
}
function renderVoicePanelFloatingCTA(a0, a1, a2, a3) { // fn#118856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:3920, offset: 0x024f1adc, size: 117 bytes, params: 5, frame: 19
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
return (
<ThemeContextProvider theme={DARK} key={a0}>
<VoicePanelFloatingCTAContainer
{...a1}
{...{['state']: a2}}
{...{['cleanUp']: a3}}
/>
</ThemeContextProvider>
);
}
function _fun118851() { // fn#118851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:2183, offset: 0x024f1777, size: 60 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(15410) /* metro dependency 15410: VoicePanelFloatingCTAUtils */).getDismissableCTAProps({dismissableContent: env0_9,
channel: channel});
}
function VoicePanelFloatingCTAContainerA() { // fn#118852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:2327, owner: VoicePanelFloatingCTAContainer.A, offset: 0x024f17b3, size: 582 bytes, params: 1, frame: 26
var r4;
var gestureStateBinding;
var value7;
var accessoryHeightsBinding;
const voicePanelControlsUtilsModule = require(11801) /* metro dependency 11801: VoicePanelControlsUtils */;
const getControlsDefaultWidth = voicePanelControlsUtilsModule.getControlsDefaultWidth;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const left = Reflect.apply(get, safeAreaBinding, []).left;
get = safeAreaBinding.get;
const value3 = Reflect.apply(getControlsDefaultWidth, voicePanelControlsUtilsModule, [width, left,
Reflect.apply(get, safeAreaBinding, []).right]);
const stateBinding = state;
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
const YEETED = TransitionStates.YEETED;
const r12 = stateBinding !== YEETED ? 1 : 0;
const object3 = {};
const controlsSpecsBinding = controlsSpecs;
get = controlsSpecsBinding.get;
object3.bottom = Reflect.apply(get, controlsSpecsBinding, []).height + 16;
object3.width = value3;
object3.marginLeft = -1 * (importDefault(11624) /* metro dependency 11624: roundToNearestPixel */)(value3 / 2);
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
const binding = env1_11;
const closure = AT_118853;
const object4 = {};
object4.state = state;
object4.TransitionStates = TransitionStates;
object4.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object4.cleanUp = cleanUp;
closure.__closure = object4;
closure.__workletHash = 7334460639890;
closure.__initData = env1_13;
object3.opacity = Reflect.apply(withSpring, springModule, [r12, binding, 'respect-motion-settings', closure]);
const moduleValue3 = springModule;
withSpring = moduleValue3.withSpring;
let wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
const items2 = [{translateX: Reflect.apply(withSpring, moduleValue3, [Reflect.apply(get, wrapperSpecsBinding, []).x,
UI_SHOW_HIDE_PHYSICS])}];
const moduleValue4 = springModule;
withSpring = moduleValue4.withSpring;
get = wrapperSpecsBinding.get;
if (Reflect.apply(get, wrapperSpecsBinding, []).hidden) {
wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
value7 = Reflect.apply(get, wrapperSpecsBinding, []).height + CALL_TILE_GUTTER;
accessoryHeightsBinding = accessoryHeights;
get = accessoryHeightsBinding.get;
r4 = value7 + Reflect.apply(get, accessoryHeightsBinding, []);
} else {
get = gestureState.get;
if (Reflect.apply(get, gestureStateBinding, []).active) {
gestureStateBinding = gestureState;
get = gestureStateBinding.get;
if (Reflect.apply(get, gestureStateBinding, []).requiresPop) {
wrapperSpecsBinding = wrapperSpecs;
r4 = wrapperSpecsBinding.get().y;
} else {
wrapperSpecsBinding = wrapperSpecs;
get = wrapperSpecsBinding.get;
value7 = Reflect.apply(get, wrapperSpecsBinding, []).height + CALL_TILE_GUTTER;
accessoryHeightsBinding = accessoryHeights;
get = accessoryHeightsBinding.get;
r4 = value7 + Reflect.apply(get, accessoryHeightsBinding, []);
}
} else {
wrapperSpecsBinding = wrapperSpecs;
r4 = wrapperSpecsBinding.get().y;
}
}
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue4, [r4, UI_SHOW_HIDE_PHYSICS])};
object3.transform = items2;
return object3;
}
function VoicePanelFloatingCTAContainerChildren() { // fn#118854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:3523, owner: VoicePanelFloatingCTAContainer.children, offset: 0x024f1a64, size: 37 bytes, params: 1, frame: 13
return <FloatingCTA {...env0_11} />;
}
function AT_118853(a0) { // fn#118853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15718:2593, owner: VoicePanelFloatingCTAContainer.A.t, offset: 0x024f19f9, size: 107 bytes, params: 2, frame: 13
var r0;
var stateBinding;
var runOnJS;
var value2;
let value = a0;
if (value) {
value = environment.__proto__;
stateBinding = state;
value = environment.__proto__.__proto__;
value = stateBinding === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [cleanUp])();
}
}
@@ -0,0 +1,188 @@
/* Metro module 15550; source: modules/voice_panel/native/controls/VoicePanelVoiceControls.tsx; dependencies: [31, 27, 1379, 11793, 33, 4501, 697, 4017, 11794, 15390, 9467, 3829, 15453, 10269, 12113, 4572, 6231, 15551, 1244, 10823, 566, 11644, 4559, 5321, 1581, 6821, 6618, 11803, 2] */
function _fun119002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:6, offset: 0x024f8a2f, size: 422 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const NOOP_119003 = function() {
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const ScrollView = (require(27) /* metro dependency 27 */).ScrollView;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const CONTROLS_DRAWER_HEADER_EXPANDED_SIZE = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).CONTROLS_DRAWER_HEADER_EXPANDED_SIZE;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const env0_7 = value2.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.scrollView = {flex: 1, paddingHorizontal: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.scrollViewScreenReader = {flex: 1, paddingHorizontal: PX_16,
marginTop: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE};
object2.blurRegion = {height: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_9 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(ScrollView);
const env0_10 = value.memo(_fun119004);
object2 = {top: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE};
object2 = {code: 'function VoicePanelVoiceControlsTsx1({offset:offset}){const{isScrolled}=this.__closure;isScrolled.set(offset>0);}'};
value = value.memo(VoicePanelVoiceControls);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelVoiceControls.tsx');
exports.default = value;
}
function _fun119004({channel, openTab}) { // fn#119004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:459, offset: 0x024f8bd5, size: 1355 bytes, params: 2, frame: 36
var r6;
var r5;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
var items4;
var object15;
var value;
const binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const value2 = (importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(channelId);
const value3 = (require(9467) /* metro dependency 9467: getEmbeddedActivityLaunchability */).useEmbeddedActivityLaunchability(channelId);
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const value4 = DeveloperMode.useSetting();
const defaultImport = importDefault(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */;
let useConfig = defaultImport.useConfig;
const treatment = Reflect.apply(useConfig, defaultImport, [{location: 'VoicePanelVoiceControls'}]).treatment;
const defaultImport2 = importDefault(10269) /* metro dependency 10269: MobileAudioOutputExperiment */;
useConfig = defaultImport2.useConfig;
const nonContextualStreamOutputPresent = Reflect.apply(useConfig, defaultImport2,
[{location: 'VoicePanelVoiceControls'}]).nonContextualStreamOutputPresent;
const value5 = (importDefault(12113) /* metro dependency 12113: useSelectedActiveStream */)(channel);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
if (value2) {
items4 = [((ActivitiesButton) => <ActivitiesButton openTab={openTab} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ActivitiesButton)];
items4[1] = (require(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */).MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_CHAT === treatment ? ((ChatButton) => <ChatButton openTab={openTab} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ChatButton) : (require(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */).MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_SOUNDBOARD === treatment ? ((SoundboardButton) => <SoundboardButton channel={channel} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).SoundboardButton) : ((ScreenshareButton) => <ScreenshareButton channel={channel} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ScreenshareButton);
r6 = <TableRowGroup hasIcons>{items4}</TableRowGroup>;
} else {
r6 = value2;
}
const items2 = [r6];
const GameConsoles = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).GameConsoles;
items2[1] = <GameConsoles channel={channel} connected={value2} />;
items2[2] = nonContextualStreamOutputPresent && ((StreamVolumeItem) => <StreamVolumeItem />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).StreamVolumeItem);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const NiTd0e = (require(1244) /* metro dependency 1244: indexNative */).t.NiTd0e;
const DeafenSwitch = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).DeafenSwitch;
const items3 = [<DeafenSwitch />];
const AudioRouteButton = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).AudioRouteButton;
items3[1] = <AudioRouteButton channel={channel} connected={value2} />;
const HideNonVideoParticipants = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).HideNonVideoParticipants;
items3[2] = <HideNonVideoParticipants channelId={channelId} />;
const HideSelfVideo = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).HideSelfVideo;
items3[3] = <HideSelfVideo />;
items3[4] = value2 && ((InviteButton) => <InviteButton channel={channel} connected={value2} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).InviteButton);
items2[3] = <TableRowGroup title={Reflect.apply(string, intl, [NiTd0e])} hasIcons>{items3}</TableRowGroup>;
const VoiceProcessingOptions = (require(10823) /* metro dependency 10823: UserSettingsVoiceProcessing */).VoiceProcessingOptions;
items2[4] = <VoiceProcessingOptions />;
const VoiceSettingsButton = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).VoiceSettingsButton;
items2[5] = <TableRowGroup hasIcons><VoiceSettingsButton guildId={channel.guild_id} />{value5 != null && ((ReportStreamIssueButton) => <ReportStreamIssueButton stream={value5} />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ReportStreamIssueButton)}</TableRowGroup>;
if (value2) {
if (value4) {
if (value3 !== (require(9467) /* metro dependency 9467: getEmbeddedActivityLaunchability */).EmbeddedActivityLaunchability.CAN_LAUNCH) {
r5 = null;
} else {
var tableRowGroupProps = {title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.J6rqB7),
hasIcons: true};
const LeaveActivitiesButton = (require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).LeaveActivitiesButton;
value = <LeaveActivitiesButton />;
value = <TableRowGroup {...tableRowGroupProps}>{value}{((ShareActivityLogsButton) => <ShareActivityLogsButton />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ShareActivityLogsButton)}{((ToggleShowActivitiesDebugOverlay) => <ToggleShowActivitiesDebugOverlay />)((require(15551) /* metro dependency 15551: VoicePanelVoiceControlsButtons */).ToggleShowActivitiesDebugOverlay)}</TableRowGroup>;
r5 = value;
}
} else {
r5 = null;
}
} else {
r5 = null;
}
items2[6] = r5;
return (
<Stack spacing={24}>
{items2}
</Stack>
);
}
function VoicePanelVoiceControls({isVisible, openTab}) { // fn#119005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:2315, offset: 0x024f9120, size: 723 bytes, params: 2, frame: 29
var r5;
var value;
const styles = useStyles();
let binding = env0_3;
let useContext = binding.useContext;
const env0_1 = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const useCallback = binding.useCallback;
const closure = VoicePanelVoiceControlsS;
closure.__closure = {isScrolled: value2};
closure.__workletHash = 16758626276795;
closure.__initData = env0_12;
const value3 = Reflect.apply(useCallback, binding, [closure, [value2]]);
useContext = binding.useContext;
const ControlsGestureScrollLock = (require(11644) /* metro dependency 11644: createUseAnimatedScrollLock */).ControlsGestureScrollLock;
const {onScroll, gestureRef, scrollerRef, animatedProps} = Reflect.apply(useContext, binding,
[ControlsGestureScrollLock])({onScrollHandlerWorkletized: value3});
const value6 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
binding.useEffect(function() {
var current;
if (isVisible && scrollerRef != null) {
current = scrollerRef.current;
if (current != null) {
current.scrollTo({'x': 0, 'y': 0, 'animated': false});
}
}
}, [isVisible, scrollerRef]);
const value7 = binding.useMemo(_fun119009, [gestureRef]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
binding = env0_9;
const bindingProps = {style: value6 ? styles.scrollViewScreenReader : styles.scrollView, ref: scrollerRef,
onScroll: onScroll, animatedProps: animatedProps, onMomentumScrollEnd: NOOP_119003,
scrollEventThrottle: 8.333333333333334, scrollIndicatorInsets: env0_11};
const value8 = !value6;
const items2 = [value6 ? value8 : ((Component) => <Component style={styles.blurRegion} />)(importDefault(6821) /* metro dependency 6821: NativeView */)];
items2[1] = channel != null && ((Component) => <Component channel={channel} openTab={openTab} />)(env0_10);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
items2[2] = <SafeAreaPaddingView bottom />;
const gestureDetector = <GestureDetector gesture={value7}>{((Component) => <Component {...bindingProps}>{items2}</Component>)(binding)}</GestureDetector>;
if (value6) {
r5 = value8;
} else {
value = importDefault(11803) /* metro dependency 11803: VoicePanelHeaderGlassBlur */;
value = ((Component) => <Component shown={value2} style={styles.blurRegion} />)(value);
r5 = value;
}
return (
<>
{gestureDetector}
{r5}
</>
);
}
function VoicePanelVoiceControlsS({offset}) { // fn#119007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:2525, owner: VoicePanelVoiceControls.s, offset: 0x024f93f3, size: 36 bytes, params: 2, frame: 12
env0_2.set(offset > 0);
}
function _fun119009() { // fn#119009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15747:2939, offset: 0x024f945a, size: 109 bytes, params: 1, frame: 14
let value = environment.__proto__;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const enabled = Gesture.Native().enabled;
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
value = Reflect.apply(enabled, value, [!metaQuestUtilsAndroidModule.isMetaQuest()]);
return gestureRef == null ? value : value.simultaneousWithExternalGesture(gestureRef);
}
@@ -0,0 +1,549 @@
/* Metro module 15551; source: modules/voice_panel/native/controls/VoicePanelVoiceControlsButtons.tsx; dependencies: [57, 31, 1378, 4606, 1312, 7730, 4492, 1226, 4259, 4297, 661, 15552, 4291, 33, 4496, 15553, 1962, 1244, 9324, 6231, 10785, 566, 3857, 9326, 9436, 6238, 6242, 11794, 15515, 8840, 6682, 15542, 10284, 10794, 683, 10268, 10272, 477, 697, 8899, 6808, 9248, 15469, 9228, 9239, 6243, 15454, 15413, 10859, 10832, 7712, 9759, 10793, 15554, 7960, 11299, 8092, 15555, 8151, 694, 10813, 7002, 15468, 2] */
function _fun119010(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:6, offset: 0x024f94c7, size: 602 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = GameConsoleAccountButton;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const unsyncedUserSettingsStore = importDefault(1312) /* metro dependency 1312: UnsyncedUserSettingsStore */;
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_13 = constantsModule.AnalyticEvents;
const env0_14 = constantsModule.PlatformTypes;
const env0_15 = (require(15552) /* metro dependency 15552: HideSelfStreamAndVideoConstants */).SelfStreamAndVideoAlertType;
const env0_16 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
const env0_17 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/VoicePanelVoiceControlsButtons.tsx');
exports.GameConsoles = GameConsoles;
exports.GameConsoleAccountButton = closure;
exports.ActivitiesButton = ActivitiesButton;
exports.ChatButton = ChatButton_119021;
exports.SoundboardButton = SoundboardButton_119024;
exports.ScreenshareButton = ScreenshareButton_119025;
exports.StreamVolumeItem = StreamVolumeItem_119027;
exports.DeafenSwitch = DeafenSwitch;
exports.AudioRouteButton = AudioRouteButton_119032;
exports.InviteButton = InviteButton;
exports.HideNonVideoParticipants = HideNonVideoParticipants;
exports.HideSelfVideo = HideSelfVideo;
exports.LeaveActivitiesButton = LeaveActivitiesButton;
exports.ShareActivityLogsButton = ShareActivityLogsButton_119048;
exports.ToggleShowActivitiesDebugOverlay = ToggleShowActivitiesDebugOverlay;
exports.VoiceSettingsButton = VoiceSettingsButton;
exports.ReportStreamIssueButton = ReportStreamIssueButton;
exports.RTCDebugPanelButton = RTCDebugPanelButton;
}
function GameConsoleAccountButton({channel, account, connected}) { // fn#119011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:333, offset: 0x024f9721, size: 705 bytes, params: 2, frame: 24
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let value = undefined;
const value3 = (importDefault(10785) /* metro dependency 10785: useIsVoiceChannelFull */)(channel);
const r3 = (require(10785) /* metro dependency 10785: useIsVoiceChannelFull */).useIsVoiceChannelLocked(channel) && !channel.isPrivate();
let r7 = !(require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
return VoiceStateStore.isInChannel(channel.id);
}) && value3;
r7 = !r7 ? r3 : r7;
const value8 = env0_4.useCallback(_fun119013, [r3]);
const value10 = env0_4.useCallback(_fun119014,
[(require(9326) /* metro dependency 9326: useOnConnectToConsole */).useOnConnectToConsole(channel, account)]);
const type = account.type;
const XBOX = PlatformTypes.XBOX;
const r8 = type === XBOX ? connected ? intl.string(t['qVE/VF']) : intl.string(t.E8euSk) : type === PlatformTypes.PLAYSTATION ? connected ? intl.string(t.vzfxmY) : intl.string(t.QxEYDj) : type !== PlatformTypes.PLAYSTATION_STAGING ? value : connected ? intl.string(t.BDiXtV) : intl.string(t['bhdB9+']);
const value17 = (importDefault(9436) /* metro dependency 9436: getConsoleIcon */)(account.type);
if (r8 == null) {
r0 = null;
} else {
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
value = <TableRow icon={value17 != null ? ((TableRowIcon) => <TableRowIcon source={value17} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon) : value} label={r8} disabled={r7} onPress={r7 ? value8 : value10} />;
r0 = value;
}
return r0;
}
function toggleDeaf() { // fn#119015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:1354, offset: 0x024f9ac8, size: 37 bytes, params: 1, frame: 11
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).toggleSelfDeaf();
}
function GameConsoles({channel, connected}) { // fn#119016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:1522, offset: 0x024f9aed, size: 190 bytes, params: 2, frame: 21
var r0;
var TableRowGroup;
var intl;
const value2 = (importDefault(9324) /* metro dependency 9324: useGameConsoleAccounts */)();
if (value2.length > 0) {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['mbi/fB'])} hasIcons>{value2.map(_fun119017)}</TableRowGroup>;
} else {
r0 = null;
}
return r0;
}
function ActivitiesButton({openTab}) { // fn#119018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:1860, offset: 0x024f9be4, size: 246 bytes, params: 2, frame: 19
var object2;
const binding = env0_4;
const useContext = binding.useContext;
const value2 = env0_4.useCallback(function() {
dismissPanel();
global.setTimeout(_fun119020, 200);
}, [Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).dismissPanel, openTab]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {onPress: value2};
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
const AppsIcon = (require(8840) /* metro dependency 8840: AppsIcon */).AppsIcon;
object2.icon = <TableRowIcon IconComponent={AppsIcon} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aeuOoh);
return <TableRow {...object2} />;
}
function ChatButton_119021({openTab}) { // fn#119021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:2249, offset: 0x024f9d47, size: 246 bytes, params: 2, frame: 19
var object2;
const binding = env0_4;
const useContext = binding.useContext;
const value2 = env0_4.useCallback(function() {
dismissPanel();
global.setTimeout(_fun119023, 200);
}, [Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).dismissPanel, openTab]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {onPress: value2};
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
object2.icon = <TableRowIcon IconComponent={ChatIcon} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5KxXrK']);
return <TableRow {...object2} />;
}
function SoundboardButton_119024({channel}) { // fn#119024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:2633, offset: 0x024f9ea8, size: 249 bytes, params: 2, frame: 22
var r0;
var TableRow;
var intl;
const defaultImport = importDefault(15542) /* metro dependency 15542: useSoundboardConfig */;
const id = channel.id;
const SoundboardButtonLocation = (require(15542) /* metro dependency 15542: useSoundboardConfig */).SoundboardButtonLocation;
const VOICE_CONTROLS = SoundboardButtonLocation.VOICE_CONTROLS;
const value2 = defaultImport(id, VOICE_CONTROLS);
if (value2.visible) {
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ABjMWI)} onPress={value2.handlePress} disabled={value2.disabled} icon={((TableRowIcon) => <TableRowIcon IconComponent={(require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon)} />;
} else {
r0 = null;
}
return r0;
}
function ScreenshareButton_119025({channel}) { // fn#119025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:2978, offset: 0x024f9fa1, size: 199 bytes, params: 2, frame: 21
const {onPress, imgSource, text, isFeatureEnabled,
isActive} = (importDefault(10794) /* metro dependency 10794: useScreenshareUtils */)(channel);
const value3 = env0_4.useCallback(function() {
var defaultImport = importDefault(dependencyMap[34]);
var VOICE_PANEL_SCREENSHARE_BUTTON_TAPPED = AnalyticEvents.VOICE_PANEL_SCREENSHARE_BUTTON_TAPPED;
defaultImport.track(VOICE_PANEL_SCREENSHARE_BUTTON_TAPPED, {source: 'voice controls', was_active: isActive});
onPress();
}, [isActive, onPress]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
return (
<TableRow
disabled={!isFeatureEnabled}
onPress={value3}
icon={<TableRowIcon source={imgSource} />}
label={text}
/>
);
}
function StreamVolumeItem_119027() { // fn#119027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:3356, offset: 0x024fa0b8, size: 410 bytes, params: 1, frame: 27
var r0;
var TableRowGroup;
var intl;
var TableRow;
var VolumeSlider;
var object2;
var moduleValue2;
var unsafe_rawColors;
let value2 = undefined;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [ApplicationStreamingStore];
object[1] = AuthenticationStore;
let value3 = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
var value2 = ApplicationStreamingStore.getLastActiveStream();
var value3 = null;
return value3 != value2 ? value2.ownerId === AuthenticationStore.getId() ? value3 : value2 : value3;
}]);
const defaultImport = importDefault(10268) /* metro dependency 10268: useMuteAwareLocalVolume */;
const value4 = null;
const ownerId = value4 == value3 ? value2 : value3.ownerId;
const STREAM = MediaEngineContextTypes.STREAM;
const value5 = defaultImport(ownerId, STREAM);
if (value4 == value3) {
r0 = value4;
} else {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pEAl4b);
object.hasIcons = false;
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
VolumeSlider = importDefault(10272) /* metro dependency 10272: VolumeSlider */;
object2 = {};
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
object2.onResponderGrant = moduleValue2.isAndroid() ? function() {
return true;
} : value2;
object2.value = value5.effectiveVolume;
object2.onValueChange = value5.handleVolumeChange;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object2.color = unsafe_rawColors.WHITE;
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
object2.maxTrackTintColor = unsafe_rawColors.PRIMARY_300;
r0 = <TableRowGroup {...object}><TableRow label={<VolumeSlider {...object2} />} /></TableRowGroup>;
}
return r0;
}
function DeafenSwitch() { // fn#119030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:3941, offset: 0x024fa28d, size: 327 bytes, params: 1, frame: 22
var object2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
return MediaEngineStore.isSelfDeaf();
});
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
object2 = {};
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
const HeadphonesSlashIcon = (require(9248) /* metro dependency 9248: HeadphonesSlashIcon */).HeadphonesSlashIcon;
object2.icon = <TableRowIcon IconComponent={HeadphonesSlashIcon} source={importDefault(15469) /* metro dependency 15469 */} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.accessibilityHint = Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.wjcRFX]);
object2.value = value2;
object2.onValueChange = toggleDeaf;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wjcRFX);
string = intl.string;
const M3VN2U = (require(1244) /* metro dependency 1244: indexNative */).t.M3VN2U;
object2.subLabel = Reflect.apply(string, intl, [M3VN2U]);
return <TableSwitchRow {...object2} />;
}
function AudioRouteButton_119032({channel, connected}) { // fn#119032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:4358, offset: 0x024fa3e7, size: 232 bytes, params: 2, frame: 21
const callsUtilsModule = require(9228) /* metro dependency 9228: CallsUtils */;
const useMaskedSpeakerStates = callsUtilsModule.useMaskedSpeakerStates;
const routeSource = Reflect.apply(useMaskedSpeakerStates, callsUtilsModule, []).routeSource;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
object2.icon = <TableRowIcon source={routeSource} />;
object2.onPress = onPress_119033;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['A/Ly/2']);
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object2.trailing = <TableRowArrow />;
return <TableRow {...object2} />;
}
function InviteButton({channel, connected}) { // fn#119034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:4690, offset: 0x024fa506, size: 334 bytes, params: 2, frame: 22
var r0;
var TableRow;
var intl;
if ((importDefault(10785) /* metro dependency 10785: useIsVoiceChannelFull */)(channel)) {
r0 = null;
} else if ((require(15454) /* metro dependency 15454: useCanInviteMembers */).useCanInviteMembers(channel.id)) {
if (connected) {
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {onPress: (require(15413) /* metro dependency 15413: useInviteMembersCallback */).useInviteMembersCallback(channel.id),
icon: ((TableRowIcon) => <TableRowIcon IconComponent={(require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon} source={importDefault(10832) /* metro dependency 10832 */} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['f1+QIK']);
tableRowProps.trailing = ((TableRowArrow) => <TableRowArrow />)((require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow);
r0 = <TableRow {...tableRowProps} />;
} else {
r0 = null;
}
} else {
r0 = null;
}
return r0;
}
function HideNonVideoParticipants({channelId}) { // fn#119035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:5087, offset: 0x024fa654, size: 373 bytes, params: 2, frame: 22
var object2;
const voiceParticipantsHidden = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore],
function() {
return ChannelRTCStore.getVoiceParticipantsHidden(channelId);
});
const value2 = env0_4.useCallback(_fun119037, [channelId, voiceParticipantsHidden]);
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
object2 = {};
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
const VideoIcon = (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon;
object2.icon = <TableRowIcon IconComponent={VideoIcon} source={importDefault(10793) /* metro dependency 10793 */} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let ZMTRyc = (require(1244) /* metro dependency 1244: indexNative */).t.ZMTRyc;
object2.accessibilityHint = Reflect.apply(string, intl, [ZMTRyc]);
object2.value = voiceParticipantsHidden;
object2.onValueChange = value2;
string = intl.string;
ZMTRyc = (require(1244) /* metro dependency 1244: indexNative */).t.ZMTRyc;
object2.label = Reflect.apply(string, intl, [ZMTRyc]);
string = intl.string;
const MlpCFS = (require(1244) /* metro dependency 1244: indexNative */).t.MlpCFS;
object2.subLabel = Reflect.apply(string, intl, [MlpCFS]);
return <TableSwitchRow {...object2} />;
}
function HideSelfVideo() { // fn#119038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:5600, offset: 0x024fa819, size: 311 bytes, params: 1, frame: 22
var r0;
var TableSwitchRow;
var intl;
const defaultImport = importDefault(15554) /* metro dependency 15554: useHideSelfVideo */;
const getId = AuthenticationStore.getId;
const value3 = env0_3(defaultImport(Reflect.apply(getId, AuthenticationStore, [])), 3);
const property = value3[0];
const property2 = value3[1];
const env0_1 = value3[2];
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const items = [UnsyncedUserSettingsStore];
const env0_2 = Reflect.apply(useStateFromStores, fluxModule, [items, function() {
return UnsyncedUserSettingsStore.disableHideSelfStreamAndVideoConfirmationAlert;
}]);
if (property) {
TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
var tableSwitchRowProps = {icon: ((TableRowIcon) => <TableRowIcon IconComponent={(require(7960) /* metro dependency 7960: UserSquareIcon */).UserSquareIcon} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon),
value: !property2, onValueChange: onValueChange_119040};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableSwitchRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.MH8ESU);
r0 = <TableSwitchRow {...tableSwitchRowProps} />;
} else {
r0 = null;
}
return r0;
}
function LeaveActivitiesButton() { // fn#119046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:6197, offset: 0x024faa9e, size: 163 bytes, params: 1, frame: 20
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
object2.icon = <TableRowIcon source={importDefault(11299) /* metro dependency 11299 */} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R/FK4A']);
object2.onPress = onPress_119047;
return <TableRow {...object2} />;
}
function ShareActivityLogsButton_119048() { // fn#119048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:6541, offset: 0x024fab9d, size: 147 bytes, params: 1, frame: 21
const value2 = undefined;
const {label, icon, onPress} = (require(15555) /* metro dependency 15555: ChannelCallUtils */).shareActivityLogs();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
icon={icon != null ? ((TableRowIcon) => <TableRowIcon source={icon} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon) : value2}
label={label}
onPress={onPress}
/>
);
}
function ToggleShowActivitiesDebugOverlay() { // fn#119049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:6782, offset: 0x024fac30, size: 210 bytes, params: 1, frame: 22
var object2;
const showActivitiesDebugOverlay = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelCallLifecycleStore],
function() {
return ChannelCallLifecycleStore.getShowActivitiesDebugOverlay();
});
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
object2 = {};
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
object2.icon = <TableRowIcon source={importDefault(8151) /* metro dependency 8151 */} />;
object2.value = showActivitiesDebugOverlay;
object2.onValueChange = onValueChange_119051;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['qv5/SP']);
return <TableSwitchRow {...object2} />;
}
function VoiceSettingsButton({guildId}) { // fn#119052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:7173, offset: 0x024fad4e, size: 304 bytes, params: 2, frame: 21
var object2;
const value2 = env0_4.useCallback(_fun119053, [guildId]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
object2 = {onPress: value2};
const TableRowIcon = (require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon;
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
object2.icon = <TableRowIcon IconComponent={SettingsIcon} source={importDefault(15468) /* metro dependency 15468 */} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const NiTd0e = (require(1244) /* metro dependency 1244: indexNative */).t.NiTd0e;
object2.label = Reflect.apply(string, intl, [NiTd0e]);
object2.subLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['16SG+O']);
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object2.trailing = <TableRowArrow />;
return <TableRow {...object2} />;
}
function ReportStreamIssueButton({stream}) { // fn#119054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:7576, offset: 0x024faeab, size: 157 bytes, params: 2, frame: 21
const {label, icon,
onPress} = (require(15555) /* metro dependency 15555: ChannelCallUtils */).reportStreamIssue(stream);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
icon={icon != null ? ((TableRowIcon) => <TableRowIcon source={icon} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon) : undefined}
label={label}
onPress={onPress}
/>
);
}
function RTCDebugPanelButton() { // fn#119055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:7815, offset: 0x024faf48, size: 157 bytes, params: 1, frame: 21
const value2 = undefined;
const {label, onPress,
icon} = (require(15555) /* metro dependency 15555: ChannelCallUtils */).rtcDebugPanel(function() {
});
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
icon={icon != null ? ((TableRowIcon) => <TableRowIcon source={icon} />)((require(6242) /* metro dependency 6242: TableRowIconNative */).TableRowIcon) : value2}
label={label}
onPress={onPress}
/>
);
}
function _fun119013() { // fn#119013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:559, offset: 0x024f9a02, size: 198 bytes, params: 1, frame: 20
const value = environment.__proto__;
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
const open = defaultImport.open;
const object2 = {};
let binding = env0_1;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.key = binding ? Reflect.apply(string, intl, [t.rimHDW]) : Reflect.apply(string, intl, [t.rZfiNq]);
binding = env0_1;
string = intl.string;
object2.content = binding ? Reflect.apply(string, intl, [t.rimHDW]) : Reflect.apply(string, intl, [t.rZfiNq]);
Reflect.apply(open, defaultImport, [object2]);
}
function _fun119017(a0) { // fn#119017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:1707, offset: 0x024f9bab, size: 57 bytes, params: 2, frame: 16
return (
<GameConsoleAccountButton
account={a0}
channel={channel}
connected={connected}
key={a0.type}
/>
);
}
function _fun119019() { // fn#119019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:1958, offset: 0x024f9cda, size: 41 bytes, params: 1, frame: 13
dismissPanel();
global.setTimeout(function() {
var openTabBinding = openTab;
var object = {tab: 'app_launcher'};
object.source = require(dependencyMap[28]).VoicePanelTabAnalyticsSources.VOICE_CONTROLS;
openTabBinding(object);
}, 200);
}
function _fun119022() { // fn#119022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:2341, offset: 0x024f9e3d, size: 41 bytes, params: 1, frame: 13
dismissPanel();
global.setTimeout(function() {
var openTabBinding = openTab;
var object = {tab: 'chat'};
object.source = require(dependencyMap[28]).VoicePanelTabAnalyticsSources.VOICE_CONTROLS;
openTabBinding(object);
}, 200);
}
function AudioRouteButton_119032OnPress() { // fn#119033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:4538, owner: AudioRouteButton_119032.onPress, offset: 0x024fa4cf, size: 55 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(9239) /* metro dependency 9239: showAudioOutputSelector */;
value.showAudioOutputSelector(channel.id, connected);
}
function _fun119037() { // fn#119037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:5230, offset: 0x024fa7e4, size: 53 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.toggleVoiceParticipantsHidden(channelId, !voiceParticipantsHidden);
}
function HideSelfVideoOnValueChange() { // fn#119040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:5900, owner: HideSelfVideo.onValueChange, offset: 0x024fa95f, size: 76 bytes, params: 1, frame: 14
if (disableHideSelfStreamAndVideoConfirmationAlert) {
return env0_1(!env0_0);
}
if (env0_0) {
return env0_1(!env0_0);
}
const VIDEO = SelfStreamAndVideoAlertType.VIDEO;
onValueChangeOpenHideSelfStreamAndVideoConfirmDialog(VIDEO, _fun119045);
}
function LeaveActivitiesButtonOnPress() { // fn#119047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:6363, owner: LeaveActivitiesButton.onPress, offset: 0x024fab41, size: 92 bytes, params: 1, frame: 16
let value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
value = undefined;
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: currentEmbeddedActivity == null ? value : currentEmbeddedActivity.location,
applicationId: currentEmbeddedActivity == null ? value : currentEmbeddedActivity.applicationId});
return value;
}
function ToggleShowActivitiesDebugOverlayOnValueChange(a0) { // fn#119051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:7009, owner: ToggleShowActivitiesDebugOverlay.onValueChange, offset: 0x024fad15, size: 57 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EMBEDDED_ACTIVITY_SET_DEBUG_OVERLAY_VISIBILITY',
visible: a0});
}
function _fun119053() { // fn#119053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:7236, offset: 0x024fae7e, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(10813) /* metro dependency 10813: ChannelCallConnectingScreen */;
value.showVoiceSettingsActionSheet(guildId);
}
function onValueChangeOpenHideSelfStreamAndVideoConfirmDialog(a0, a1) { // fn#119041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:5927, owner: HideSelfVideo.onValueChange.openHideSelfStreamAndVideoConfirmDialog, offset: 0x024fa9ab, size: 68 bytes, params: 3, frame: 13
var environment;
const env0_0 = a0;
const env0_1 = a1;
let value = environment.__proto__.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_119042});
}
function _fun119045() { // fn#119045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:6106, offset: 0x024faa87, size: 23 bytes, params: 1, frame: 11
return env1_1(!env1_0);
}
function openHideSelfStreamAndVideoConfirmDialogImporter_119042() { // fn#119042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:6009, owner: HideSelfVideo.onValueChange.openHideSelfStreamAndVideoConfirmDialog.importer, offset: 0x024fa9ef, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__.__proto__;
value = require(dependencyMap[16]);
value = value(dependencyMap[15], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun119044;
});
}
function _fun119043({default: env0_0}) { // fn#119043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:6043, offset: 0x024faa2f, size: 23 bytes, params: 2, frame: 2
return _fun119044;
}
function _fun119044(a0) { // fn#119044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15748:6058, offset: 0x024faa46, size: 65 bytes, params: 2, frame: 15
return ((Component) => <Component {...a0} {...{['type']: env2_0}} {...{['onConfirm']: require}} />)(env0_0);
}
@@ -0,0 +1,63 @@
/* Metro module 15499; source: modules/voice_panel/native/controls/activities/ActivityItemMissingCard.tsx; dependencies: [5, 31, 27, 33, 4501, 697, 11794, 6771, 8106, 10718, 5278, 15500, 15501, 6821, 2] */
function _fun118676(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:6, offset: 0x024e793f, size: 327 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).ActivityIndicator;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.loadingActivity = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center',
backgroundColor: BACKGROUND_SURFACE_HIGH};
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.disabledActivity = {'width': '100%', 'height': '100%', backgroundColor: BACKGROUND_SURFACE_HIGH};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.memo(ActivityItemMissingCard);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityItemMissingCard.tsx');
exports.default = value;
}
function ActivityItemEmptyCard({activity, application}) { // fn#118677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:442, offset: 0x024e7a86, size: 403 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = env0_4.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const channelId = value2.channelId;
const {width, height} = value2.layoutManager.getTargetDimensions(undefined);
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const value5 = env0_4.useCallback(analyticsLocations(_fun118679), [activity.launchId, analyticsLocations,
application, channelId]);
const value6 = (importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */)({applicationId: activity.applicationId,
size: width, names: ['embedded_background']});
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
activeOpacity={0.7}
onPress={value5}
style={styles.disabledActivity}
>
{((Component) => <Component imageBackground={value6} aspectRatio={width / height} />)(importDefault(15500) /* metro dependency 15500: ActivityShelfItemBackground */)}
{((Component) => <Component channelId={channelId} applicationId={application.id} applicationName={application.name} />)(importDefault(15501) /* metro dependency 15501: ActivityShelfItemSummary */)}
</PressableOpacity>
);
}
function ActivityItemMissingCard({activity, application}) { // fn#118680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:1146, offset: 0x024e7c99, size: 136 bytes, params: 2, frame: 18
const styles = useStyles();
return activity == null || application == null ? ((Component) => <Component style={styles.loadingActivity}><ActivityIndicator size="large" /></Component>)(importDefault(6821) /* metro dependency 6821: NativeView */) : <ActivityItemEmptyCard activity={activity} application={application} />;
}
function* _fun118679() { // fn#118679, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15696:666, offset: 0x024e7c24, size: 117 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__;
value = env2_0(env2_2[8]);
yield value.maybeJoinEmbeddedActivity({channelId: dependencyMap, applicationId: importDefault.id,
launchId: require.launchId, inputApplication: importDefault, analyticsLocations: env1_3});
}
}
@@ -0,0 +1,186 @@
/* Metro module 15503; source: modules/voice_panel/native/controls/activities/ActivityShelfItem.tsx; dependencies: [31, 1309, 33, 4501, 697, 4000, 11680, 11598, 6821, 15501, 1852, 8092, 5068, 10718, 7502, 5278, 3868, 15500, 11627, 1305, 15504, 15502, 4617, 12070, 4573, 11684, 1244, 2] */
function _fun118694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:6, offset: 0x024e84d6, size: 542 bytes, params: 8, frame: 25
var object5;
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(1309) /* metro dependency 1309: FormConstants */).ANDROID_FOREGROUND_RIPPLE;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object6 = {'borderRadius': null, 'overflow': 'hidden', 'height': 120, 'position': 'relative',
'backgroundColor': 'black', 'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object5.container = object6;
object5.imageOuterContainer = {'justifyContent': 'center', 'alignItems': 'center'};
object5.ongoingActivityJoinedContainer = {'position': 'absolute', 'width': '100%', 'height': '100%',
'backgroundColor': 'rgba(255,255,255,0.5)', 'zIndex': 1};
const object7 = {};
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object7.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [BLACK, 0.5]);
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.overlayBubble = object7;
object5.participantsContainer = {'paddingHorizontal': 8, 'position': 'absolute', 'left': 8, 'bottom': 8,
'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'height': 20};
object5.participantsText = {'marginLeft': 4, 'lineHeight': 20};
const object8 = {'position': 'absolute', 'top': 4, 'right': 4, 'width': 22, 'height': 22, 'borderRadius': null,
'backgroundColor': null, 'alignItems': 'center', 'justifyContent': 'center'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object8.backgroundColor = BACKGROUND_MOD_STRONG;
object5.developerIconContainer = object8;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object5.developerIconColor = {color: WHITE};
const env0_8 = Reflect.apply(createStyles, value, [object5]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityShelfItem.tsx');
exports.default = ActivityShelfItem;
}
function ActivityActionOverlay({action, applicationId, context, activityItem, launchingComponentId}) { // fn#118695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:1133, offset: 0x024e86f4, size: 360 bytes, params: 2, frame: 24
var jsxRuntimeEnv0_6Binding;
var items2;
const submitting = (importDefault(11680) /* metro dependency 11680: useLaunchingActivityButtonState */)({applicationId: applicationId,
context: context, launchingComponentId: launchingComponentId}).submitting;
const styles = useStyles();
const application = activityItem.application;
const id2 = application.id;
const name = application.name;
const ActivityAction = (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction;
const JOIN = ActivityAction.JOIN;
if (JOIN === action) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items2 = [action === (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction.LEAVE && ((Component) => <Component style={styles.ongoingActivityJoinedContainer} />)(importDefault(6821) /* metro dependency 6821: NativeView */)];
items2[1] = ((Component) => <Component channelId={context.type !== 'channel' ? undefined : context.channel.id} applicationId={id2} applicationName={name} submitting={submitting} />)(importDefault(15501) /* metro dependency 15501: ActivityShelfItemSummary */);
return (
<>
{items2}
</>
);
}
const LEAVE = ActivityAction.LEAVE;
if (LEAVE === action) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items2 = [action === (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction.LEAVE && ((Component) => <Component style={styles.ongoingActivityJoinedContainer} />)(importDefault(6821) /* metro dependency 6821: NativeView */)];
items2[1] = ((Component) => <Component channelId={context.type !== 'channel' ? undefined : context.channel.id} applicationId={id2} applicationName={name} submitting={submitting} />)(importDefault(15501) /* metro dependency 15501: ActivityShelfItemSummary */);
return (
<>
{items2}
</>
);
}
return null;
}
function ParticipantsText({action, activityItem, channelId, guildId}) { // fn#118696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:1673, offset: 0x024e885c, size: 512 bytes, params: 2, frame: 30
var r8;
var intl;
var value;
const styles = useStyles();
const value3 = (importDefault(15502) /* metro dependency 15502: useActivityUsers */)(activityItem.application.id,
channelId);
const name = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(guildId, channelId,
value3?.[0]);
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const items2 = [styles.participantsContainer];
items2[1] = styles.overlayBubble;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const object = {source: importDefault(12070) /* metro dependency 12070 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const EXTRA_SMALL = Sizes.EXTRA_SMALL;
object.size = EXTRA_SMALL;
object.color = 'white';
const icon = <Icon {...object} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const ActivityAction = (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction;
const START = ActivityAction.START;
if (action === START) {
value = require(11684) /* metro dependency 11684: getItemSubtitleForMaxPlayers */;
value = value.getItemSubtitleForMaxPlayersShort(activityItem.application.maxParticipants ?? 0);
r8 = value;
} else if (value3.length <= 1) {
r8 = name;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r8 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.cpe6CK,
{count: value3.length - 1, username: name});
}
return (
<NativeView style={items2}>
{icon}
<Text
lineClamp={1}
style={styles.participantsText}
variant="text-xxs/medium"
color="always-white"
>
{r8}
</Text>
</NativeView>
);
}
function ActivityShelfItem({itemDimensions, activityItem, context, guildId, locationObject, onActivityItemSelected, disableBadges}) { // fn#118697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15700:2443, offset: 0x024e8a5c, size: 1136 bytes, params: 2, frame: 42
var r17;
const ActivityAction = (require(11598) /* metro dependency 11598: useActivityShelfItem */).ActivityAction;
disableBadges = !(disableBadges === undefined) && disableBadges;
const styles = useStyles();
const channel = context.type !== 'channel' ? null : context.channel;
const width = itemDimensions.width;
const height = itemDimensions.height;
const value5 = width * (importDefault(1852) /* metro dependency 1852: getDevicePixelRatioNative */)();
const value6 = env0_3.useId();
const defaultImport = importDefault(11598) /* metro dependency 11598: useActivityShelfItem */;
let object = {activityItem: activityItem, context: context, guildId: guildId, locationObject: locationObject,
onActivityItemSelected: onActivityItemSelected,
embeddedActivitiesManager: importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */,
backgroundResolution: value5, assetNames: ['embedded_cover'], launchingComponentId: value6};
const CommandOrigin = (require(5068) /* metro dependency 5068: ApplicationCommandTypes */).CommandOrigin;
const VOICE_UI = CommandOrigin.VOICE_UI;
object.commandOrigin = VOICE_UI;
var {imageBackground, activityAction, onActivityItemSelected, labelType} = defaultImport(object);
const value8 = (importDefault(10718) /* metro dependency 10718: useEmbeddedActivityBackground */)({applicationId: activityItem.application.id,
size: value5, names: ['embedded_background']});
if (disableBadges) {
r17 = !disableBadges;
} else {
object = [ActivityAction.LEAVE];
object[1] = ActivityAction.JOIN;
r17 = !object.includes(activityAction);
}
const value11 = (require(7502) /* metro dependency 7502: TestModeUtils */).useIsTestModeForApplication(activityItem.application.id);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const LEAVE = ActivityAction.LEAVE;
const items2 = [styles.container];
items2[1] = {width: width, height: height};
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const ActivityShelfItemBackground = importDefault(15500) /* metro dependency 15500: ActivityShelfItemBackground */;
const name = activityItem.application.name;
let START = ActivityAction.START;
const items3 = [<NativeView style={styles.imageOuterContainer}><ActivityShelfItemBackground accessibilityLabel={name} imageBackground={activityAction !== START ? value8 : imageBackground} aspectRatio={width / height} /><ActivityActionOverlay action={activityAction} applicationId={activityItem.application.id} context={context} activityItem={activityItem} launchingComponentId={value6} /></NativeView>];
items3[1] = r17 ? ((Component) => <Component labelType={labelType} />)(importDefault(11627) /* metro dependency 11627: ActivityShelfBadge */) : null;
items3[2] = r17 && value11 ? <NativeView style={styles.developerIconContainer}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(15504) /* metro dependency 15504 */} color={styles.developerIconColor.color} />)((require(1305) /* metro dependency 1305: native */).Icon)}</NativeView> : null;
const themeContextProvider = <ThemeContextProvider theme="dark">{items3}</ThemeContextProvider>;
START = ActivityAction.START;
return (
<PressableOpacity
activeOpacity={0.7}
onPress={onActivityItemSelected}
disabled={activityAction === LEAVE}
androidRippleConfig={ANDROID_FOREGROUND_RIPPLE}
style={items2}
>
{themeContextProvider}
{activityAction === START && <ParticipantsText action={activityAction} channelId={channel?.id} guildId={channel?.getGuildId() ?? undefined} activityItem={activityItem} />}
</PressableOpacity>
);
}
@@ -0,0 +1,48 @@
/* Metro module 15500; source: modules/voice_panel/native/controls/activities/ActivityShelfItemBackground.tsx; dependencies: [57, 31, 27, 33, 4501, 6821, 11626, 2] */
function _fun118681(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15697:6, offset: 0x024e7d21, size: 219 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).Image;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
return {previewImage: {'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': 'black'},
activityImage: {width: '100%', aspectRatio: a0}};
});
value = value.memo(ActivityShelfItemBackground);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityShelfItemBackground.tsx');
exports.default = value;
}
function ActivityShelfItemBackground({imageBackground, aspectRatio, accessibilityLabel}) { // fn#118683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15697:319, offset: 0x024e7e2c, size: 371 bytes, params: 2, frame: 21
var r0;
var NativeView;
var value;
const styles = useStyles(aspectRatio);
const [property, env0_0] = env0_2(env0_3.useState(false), 2);
if (imageBackground.state === 'not-found') {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage}>{((Component) => <Component />)(importDefault(11626) /* metro dependency 11626: BrokenImage */)}</Component>)(value);
r0 = value;
} else if (property) {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage}>{((Component) => <Component />)(importDefault(11626) /* metro dependency 11626: BrokenImage */)}</Component>)(value);
r0 = value;
} else if (imageBackground.state === 'loading') {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage} />)(value);
r0 = value;
} else if (imageBackground.url == null) {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={styles.previewImage} />)(value);
r0 = value;
} else {
NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
value = '';
value = <NativeView style={styles.previewImage}><Image onError={onError} source={{uri: imageBackground.url}} style={styles.activityImage} accessibilityRole="image" accessibilityLabel={accessibilityLabel ?? value} /></NativeView>;
r0 = value;
}
return r0;
}
@@ -0,0 +1,74 @@
/* Metro module 15501; source: modules/voice_panel/native/controls/activities/ActivityShelfItemSummary.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 4000, 15502, 10881, 1305, 4587, 4573, 4017, 4593, 2] */
function _fun118685(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15698:6, offset: 0x024e7f9f, size: 414 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {ongoingActivityContainer: {'position': 'absolute', 'width': '100%', 'height': '100%',
'backgroundColor': 'rgba(0,0,0,0.4)', 'alignItems': 'center', 'justifyContent': 'center'}};
const object4 = {'paddingHorizontal': 12, 'paddingVertical': 4, 'borderRadius': null, 'backgroundColor': null,
'marginBottom': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = colorUtilsModule.hexWithOpacity;
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object4.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [BLACK, 0.64]);
object3.overlayActivityName = object4;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object3.overlayActivityNameText = {color: MOBILE_TEXT_HEADING_PRIMARY};
object3.loadingTextColor = {color: 'transparent'};
object3.ellipsis = {'flex': 1, 'flexShrink': 1, 'flexGrow': 0, 'justifyContent': 'center', 'alignItems': 'center',
'top': -12};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/activities/ActivityShelfItemSummary.tsx');
exports.default = ActivityShelfItemSummary;
}
function ParticipantsSummary({applicationId, channelId}) { // fn#118686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15698:728, offset: 0x024e813d, size: 150 bytes, params: 2, frame: 17
const value2 = (importDefault(15502) /* metro dependency 15502: useActivityUsers */)(applicationId, channelId);
const UserSummaryItem = importDefault(10881) /* metro dependency 10881: UserSummaryItem */;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
return (
<UserSummaryItem
users={value2}
max={5}
avatarSize={REFRESH_MEDIUM_32}
withPlusCount
style={{marginBottom: 8}}
cutout={{inset: -8}}
/>
);
}
function ActivityShelfItemSummary({channelId, applicationId, applicationName, submitting}) { // fn#118687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15698:1068, offset: 0x024e81d3, size: 392 bytes, params: 2, frame: 26
submitting = !(submitting === undefined) && submitting;
const styles = useStyles();
const value3 = env0_3((require(4587) /* metro dependency 4587: ButtonPillNative */).useLoadingStyles(submitting,
'md'), 2);
value3[0];
const property = value3[1];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-md/semibold" style={submitting ? styles.loadingTextColor : styles.overlayActivityNameText} lineClamp={2}>{applicationName}</Text>;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={styles.ongoingActivityContainer}>
<View style={styles.overlayActivityName}>
{text}
<View2 style={[styles.ellipsis, property]}>
{submitting && ((Ellipsis) => <Ellipsis variant="active" size="md" />)((require(4593) /* metro dependency 4593: ButtonEllipsisNative */).Ellipsis)}
</View2>
</View>
<ParticipantsSummary channelId={channelId} applicationId={applicationId} />
</View>
);
}
@@ -0,0 +1,132 @@
/* Metro module 15528; source: modules/voice_panel/native/controls/buttons/VoicePanelAnimatedButtonWrapper.tsx; dependencies: [31, 27, 11795, 33, 4501, 697, 4017, 15447, 477, 4577, 4504, 2] */
function _fun118909(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:6, offset: 0x024f421c, size: 318 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const Pressable = (require(27) /* metro dependency 27 */).Pressable;
const env0_4 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).MODE_CHANGE_PHYSICS;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BORDER_RADIUS_LG = (importDefault(697) /* metro dependency 697: native */).modules.button.BORDER_RADIUS_LG;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{pressableWrapper: {'justifyContent': 'center',
'alignItems': 'center', borderRadius: BORDER_RADIUS_LG}}]);
const env0_7 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).createAnimatedComponent(Pressable);
object = {code: 'function VoicePanelAnimatedButtonWrapperTsx1(values){const{offsetFromCenter,withSpring,MODE_CHANGE_PHYSICS,withTiming}=this.__closure;offsetFromCenter.set(values.windowWidth/2-values.targetGlobalOriginX-values.targetWidth/2);return{initialValues:{originX:values.targetOriginX+offsetFromCenter.get(),opacity:0,transform:[{scale:0.5}]},animations:{originX:withSpring(values.targetOriginX,MODE_CHANGE_PHYSICS),opacity:withTiming(1,{duration:100}),transform:[{scale:withSpring(1,MODE_CHANGE_PHYSICS)}]}};}'};
object = {code: 'function VoicePanelAnimatedButtonWrapperTsx2(values){const{withSpring,offsetFromCenter,MODE_CHANGE_PHYSICS,withTiming}=this.__closure;return{initialValues:{originX:values.currentOriginX,opacity:1,transform:[{scale:1}]},animations:{originX:withSpring(values.currentOriginX+offsetFromCenter.get(),MODE_CHANGE_PHYSICS),opacity:withTiming(0,{duration:100}),transform:[{scale:withSpring(0.5,MODE_CHANGE_PHYSICS)}]}};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelAnimatedButtonWrapper.tsx');
exports.default = AnimatedButtonWrapper;
}
function AnimatedButtonWrapper({props, onPress, onLongPress, onPressIn, onPressOut, accessibilityLabel, style, children, pressed, disabled}) { // fn#118910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1410, offset: 0x024f435a, size: 463 bytes, params: 2, frame: 29
const r19 = pressed ?? (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const env0_3 = r19;
const value3 = (importDefault(15447) /* metro dependency 15447: useControlsLock */)();
const styles = useStyles();
const binding = env0_3;
const value4 = binding.useMemo(function() {
return {onPressIn: onPressIn ?? _fun118912, onPressOut: onPressOut ?? _fun118913};
}, [r19, value3, onPressIn, onPressOut]);
const width = props.width;
const height = props.height;
const env0_7 = height;
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
return ((Component) => <Component entering={binding.useMemo(_fun118914,
[value5])} exiting={binding.useMemo(_fun118916,
[value5])} onPress={onPress} onLongPress={onLongPress} disabled={disabled} {...value4} {...{['accessibilityRole']: 'button'}} {...{['accessibilityLabel']: accessibilityLabel}} {...{['style']: binding.useMemo(function() {
return [styles.pressableWrapper, {width: width, height: height}, style];
}, [style, styles.pressableWrapper, width, height])}}>{children}</Component>)(env0_7);
}
function _fun118911() { // fn#118911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1640, offset: 0x024f4529, size: 63 bytes, params: 1, frame: 6
return {onPressIn: onPressIn ?? _fun118912, onPressOut: onPressOut ?? _fun118913};
}
function _fun118914() { // fn#118914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1815, offset: 0x024f45b2, size: 156 bytes, params: 1, frame: 15
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
return undefined;
}
const closure = t_118915;
const object2 = {};
object2.offsetFromCenter = env0_8;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure.__closure = object2;
closure.__workletHash = 16238937246135;
closure.__initData = env1_8;
return closure;
}
function _fun118916() { // fn#118916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:2354, offset: 0x024f475b, size: 156 bytes, params: 1, frame: 15
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
return undefined;
}
const closure = t_118917;
const object2 = {};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.offsetFromCenter = env0_8;
object2.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
closure.__closure = object2;
closure.__workletHash = 17504057367727;
closure.__initData = env1_9;
return closure;
}
function _fun118912() { // fn#118912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1666, offset: 0x024f4568, size: 37 bytes, params: 1, frame: 11
env1_4.lock();
env1_3.set(true);
}
function _fun118913() { // fn#118913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1712, offset: 0x024f458d, size: 37 bytes, params: 1, frame: 11
env1_4.unlock();
env1_3.set(false);
}
function t_118915(a0) { // fn#118915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:1859, offset: 0x024f464e, size: 269 bytes, params: 2, frame: 20
let value = environment.__proto__;
let binding = env1_8;
binding.set(a0.windowWidth / 2 - a0.targetGlobalOriginX - a0.targetWidth / 2);
const object2 = {};
const targetOriginX = a0.targetOriginX;
binding = env1_8;
const get = binding.get;
object2.initialValues = {originX: targetOriginX + Reflect.apply(get, binding, []), opacity: 0,
transform: [{scale: 0.5}]};
const object3 = {};
value = environment.__proto__.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
object3.originX = springModule.withSpring(a0.targetOriginX, MODE_CHANGE_PHYSICS);
object3.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(1, {duration: 100});
const object5 = {};
object5.scale = springModule.withSpring(1, MODE_CHANGE_PHYSICS);
object3.transform = [object5];
object2.animations = object3;
return object2;
}
function t_118917(a0) { // fn#118917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15725:2398, offset: 0x024f47f7, size: 216 bytes, params: 2, frame: 21
const object2 = {};
let currentOriginX = a0.currentOriginX;
object2.initialValues = {originX: currentOriginX, opacity: 1, transform: [{scale: 1}]};
const object3 = {};
const value = environment.__proto__.__proto__;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
currentOriginX = a0.currentOriginX;
const binding = env1_8;
const get = binding.get;
object3.originX = Reflect.apply(withSpring, springModule, [currentOriginX + Reflect.apply(get, binding, []),
MODE_CHANGE_PHYSICS]);
object3.opacity = (require(4504) /* metro dependency 4504: timing */).withTiming(0, {duration: 100});
const object5 = {};
object5.scale = springModule.withSpring(0.5, MODE_CHANGE_PHYSICS);
object3.transform = [object5];
object2.animations = object3;
return object2;
}
@@ -0,0 +1,88 @@
/* Metro module 15535; source: modules/voice_panel/native/controls/buttons/VoicePanelChatButton.tsx; dependencies: [31, 33, 4501, 697, 11794, 15527, 15482, 15515, 15528, 1244, 15536, 6821, 6682, 2] */
function _fun118936(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:6, offset: 0x024f574e, size: 286 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {iconContainer: {'position': 'absolute', 'justifyContent': 'center', 'alignItems': 'center',
'width': '100%', 'height': '100%'}};
const object4 = {'position': 'absolute', 'zIndex': 1, 'width': 10, 'height': 10, 'borderRadius': null, 'top': 0,
'right': 0};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.badge = object4;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object3.redBG = {backgroundColor: RED_400};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelChatButton.tsx');
exports.default = ChatButton_118937;
}
function ChatButton_118937({props, openTab, wrapperSpecs}) { // fn#118937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:552, offset: 0x024f586c, size: 411 bytes, params: 2, frame: 26
var object2;
const binding = env0_3;
const {channelId,
connected} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const styles = useStyles();
const value3 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const value4 = (importDefault(15482) /* metro dependency 15482: useChatBadge */)(channelId);
const backgroundColor = value3.iconBg.backgroundColor;
let useMemo = binding.useMemo;
const value5 = Reflect.apply(useMemo, binding, [_fun118938, [value4, styles.redBG, value3.iconBadgeIndicator]]);
const value6 = binding.useCallback(_fun118939, [openTab, connected]);
const voicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
object2 = {onPress: value6, props: props};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5KxXrK']);
useMemo = binding.useMemo;
return ((Component) => <Component {...object2}>{Reflect.apply(useMemo, binding, [_fun118940, [backgroundColor,
props.width, value4, styles.iconContainer, styles.badge, value3.iconFill.color,
value5]])}</Component>)(voicePanelAnimatedButtonWrapper);
}
function _fun118938() { // fn#118938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:762, offset: 0x024f5a07, size: 39 bytes, params: 1, frame: 3
return env0_5 === 'mention' ? styles.redBG : env0_4.iconBadgeIndicator;
}
function _fun118939() { // fn#118939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:861, offset: 0x024f5a2e, size: 90 bytes, params: 1, frame: 14
const openTabBinding = openTab;
const value = connected.get();
const VoicePanelTabAnalyticsSources = (require(15515) /* metro dependency 15515: trackVoicePanelTabOpened */).VoicePanelTabAnalyticsSources;
openTabBinding({tab: 'chat',
source: value ? VoicePanelTabAnalyticsSources.CONNECTED_BUTTON : VoicePanelTabAnalyticsSources.PREJOIN_BUTTON});
}
function _fun118940() { // fn#118940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15732:1130, offset: 0x024f5a88, size: 291 bytes, params: 1, frame: 25
var r5;
let value = environment.__proto__;
const jsxRuntimeEnv1_5Binding = jsxRuntimeEnv1_5;
const CircleWithCutout = importDefault(15536) /* metro dependency 15536: CircleWithCutout */;
const backgroundColorBinding = backgroundColor;
const width = props.width;
const binding = env0_5;
const items2 = [<CircleWithCutout fill={backgroundColorBinding} circleRadius={width / 2} cutoutRadius={8} enableCutout={binding != null} cutoutPositionInDegrees={45} alignBadgeEdgeWithCircleEdge badgeRadius={5} scaleToPixelDensity />];
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
items2[1] = <NativeView style={styles.iconContainer}><ChatIcon color={env0_4.iconFill.color} /></NativeView>;
const value4 = binding != null;
if (value4) {
value = NativeView;
value = ((Component) => <Component style={[styles.badge, env0_7]} />)(value);
r5 = value;
} else {
r5 = value4;
}
items2[2] = r5;
return (
<>
{items2}
</>
);
}
@@ -0,0 +1,184 @@
/* Metro module 15529; source: modules/voice_panel/native/controls/buttons/VoicePanelConnectButton.tsx; dependencies: [31, 1379, 33, 4501, 697, 11794, 15478, 566, 5072, 5087, 4796, 4497, 15530, 15533, 15534, 9441, 15528, 1244, 4573, 2] */
function _fun118919(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:6, offset: 0x024f4904, size: 283 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object.backgroundColor = GREEN_360;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.paddingLeft = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.paddingRight = PX_8;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{connectButton: object,
connectText: {textAlign: 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelConnectButton.tsx');
exports.default = ConnectButton;
}
function ConnectButton({props}) { // fn#118920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:435, offset: 0x024f4a1f, size: 462 bytes, params: 2, frame: 24
const styles = useStyles();
let binding = env0_3;
const {channelId,
guildId} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value3 = (importDefault(15478) /* metro dependency 15478: useCanConnect */)(channelId);
const canConnect = value3.canConnect;
var env0_3 = canConnect;
const isAtMaxCapacity = value3.isAtMaxCapacity;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const r10 = (require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel) && guildId != null && channelId != null;
const r9 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel) && guildId != null && channelId != null;
binding = env0_3;
const value10 = binding.useCallback(_fun118922, [canConnect, isAtMaxCapacity, channelId, r10, r9, guildId]);
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const useMemo = binding.useMemo;
return (
<VoicePanelAnimatedButtonWrapper
onPress={value10}
props={props}
accessibilityLabel={Reflect.apply(string, intl, [t['96ANUN']])}
style={styles.connectButton}
>
{Reflect.apply(useMemo, binding, [_fun118923, [styles.connectText]])}
</VoicePanelAnimatedButtonWrapper>
);
}
function _fun118922() { // fn#118922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:762, offset: 0x024f4bed, size: 478 bytes, params: 1, frame: 18
var value2;
var defaultImport;
var moduleValue;
var openAlert;
const VOICE_PANEL_NO_JOIN_PERMS_KEY = (require(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */).VOICE_PANEL_NO_JOIN_PERMS_KEY;
var value3;
const VOICE_PANEL_SPOILER_KEY = (require(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */).VOICE_PANEL_SPOILER_KEY;
var value4;
const VOICE_PANEL_NSFW_KEY = (require(15534) /* metro dependency 15534: VoicePanelNsfwAlert */).VOICE_PANEL_NSFW_KEY;
var value5;
const VOICE_PANEL_MAX_CAPACITY_KEY = (require(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */).VOICE_PANEL_MAX_CAPACITY_KEY;
var value;
if (canConnect) {
if (isAtMaxCapacity) {
if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (env0_5) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
} else if (env0_6) {
value3 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_SPOILER_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */));
}
} else {
value = environment.__proto__;
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY,
((Component) => <Component />)(value)]);
}
} else if (env0_5) {
if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (env0_5) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
} else if (env0_6) {
value3 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_SPOILER_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */));
}
} else {
value = environment.__proto__;
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY,
((Component) => <Component />)(value)]);
}
} else if (env0_6) {
if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (env0_5) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
} else if (env0_6) {
value3 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_SPOILER_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */));
}
} else {
value = environment.__proto__;
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY,
((Component) => <Component />)(value)]);
}
} else {
value2 = environment.__proto__;
defaultImport = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */;
defaultImport.selectVoiceChannel(channelId);
}
} else if (canConnect) {
if (isAtMaxCapacity) {
value5 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_MAX_CAPACITY_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(15533) /* metro dependency 15533: VoicePanelMaxCapacityAlert */));
} else if (env0_5) {
value4 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_NSFW_KEY,
((Component) => <Component guildId={guildId} channelId={channelId} />)(importDefault(15534) /* metro dependency 15534: VoicePanelNsfwAlert */));
} else if (env0_6) {
value3 = environment.__proto__;
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert(VOICE_PANEL_SPOILER_KEY,
((Component) => <Component channelId={channelId} />)(importDefault(9441) /* metro dependency 9441: VoicePanelSpoilerAlert */));
}
} else {
value = environment.__proto__;
moduleValue = require(4497) /* metro dependency 4497: useAlertStoreNative */;
openAlert = moduleValue.openAlert;
value = importDefault(15530) /* metro dependency 15530: VoicePanelNoJoinPermissionsAlert */;
Reflect.apply(openAlert, moduleValue, [VOICE_PANEL_NO_JOIN_PERMS_KEY, ((Component) => <Component />)(value)]);
}
}
function _fun118923() { // fn#118923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15726:1300, offset: 0x024f4dcb, size: 124 bytes, params: 1, frame: 18
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Text
variant="text-sm/semibold"
color="always-white"
style={styles.connectText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['96ANUN'])}
</Text>
);
}
@@ -0,0 +1,168 @@
/* Metro module 15537; source: modules/voice_panel/native/controls/buttons/VoicePanelDisconnectCancelButton.tsx; dependencies: [57, 31, 1378, 4492, 7710, 11795, 33, 4501, 697, 11794, 4610, 4017, 8092, 7712, 8913, 4796, 10633, 15538, 9616, 15528, 1244, 2] */
function _fun118943(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:6, offset: 0x024f5e8f, size: 433 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const voicePanelStore = importDefault(7710) /* metro dependency 7710: VoicePanelStore */;
const env0_8 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
object3 = {USER: 0};
object3[0] = 'USER';
object3.STREAM = 1;
object3[1] = 'STREAM';
object3.ACTIVITY = 2;
object3[2] = 'ACTIVITY';
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
const VOICE_PANEL_DISCONNECT_BUTTON_MIN_WIDTH = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_DISCONNECT_BUTTON_MIN_WIDTH;
object4.minWidth = VOICE_PANEL_DISCONNECT_BUTTON_MIN_WIDTH;
const CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
object4.backgroundColor = CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
object3.disconnectCancelBG = object4;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.icon = {tintColor: WHITE};
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object3]);
object3 = {code: 'function VoicePanelDisconnectCancelButtonTsx1(){const{mode,VoicePanelModes,focused}=this.__closure;var _focused$get$id,_focused$get;if(mode.get()!==VoicePanelModes.PANEL){return null;}return(_focused$get$id=(_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id)!==null&&_focused$get$id!==void 0?_focused$get$id:null;}'};
object3 = {code: 'function VoicePanelDisconnectCancelButtonTsx2(focusId,lastFocusId){const{runOnJS,handleFocusChange}=this.__closure;if(focusId!==lastFocusId){runOnJS(handleFocusChange)(focusId);}}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelDisconnectCancelButton.tsx');
exports.default = DisconnectCancelButton;
}
function DisconnectCancelButton({props}) { // fn#118944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1191, offset: 0x024f6040, size: 764 bytes, params: 2, frame: 27
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
let binding = env0_4;
const {channelId, focused,
mode} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value4 = mode(binding.useState(null), 2);
const property = value4[0];
var env0_4 = property;
const env0_5 = value4[1];
let closure = _fun118945;
const value5 = binding.useCallback(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
closure = DisconnectCancelButtonA;
closure.__closure = {mode: mode, VoicePanelModes: VoicePanelModes, focused: focused};
closure.__workletHash = 1109426015268;
closure.__initData = env0_12;
const closure2 = DisconnectCancelButtonV;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, handleFocusChange: value5};
closure2.__workletHash = 16719769067952;
closure2.__initData = env0_13;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const value6 = binding.useCallback(_fun118948, [channelId, property, focused]);
let ACTIVITY = env0_10.ACTIVITY;
const r9 = property === ACTIVITY ? (require(10633) /* metro dependency 10633: DoorExitIcon */).DoorExitIcon : property === env0_10.STREAM ? (require(15538) /* metro dependency 15538: ScreenXIcon */).ScreenXIcon : (require(9616) /* metro dependency 9616: PhoneHangUpIcon */).PhoneHangUpIcon;
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
ACTIVITY = env0_10.ACTIVITY;
const r6 = property === ACTIVITY ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R/FK4A']) : property === env0_10.STREAM ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q3O3J8) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6vrfgt']);
binding = env0_4;
const useMemo = binding.useMemo;
return (
<VoicePanelAnimatedButtonWrapper
onPress={value6}
props={props}
style={styles.disconnectCancelBG}
accessibilityLabel={r6}
>
{Reflect.apply(useMemo, binding, [_fun118949, [r9, styles.icon]])}
</VoicePanelAnimatedButtonWrapper>
);
}
function _fun118945(a0) { // fn#118945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1366, offset: 0x024f633c, size: 203 bytes, params: 2, frame: 17
var value;
var currentEmbeddedActivity;
var moduleValue;
var getEmbeddedActivityParticipantId;
var object2;
if (a0 != null) {
value = environment.__proto__;
currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
if (currentEmbeddedActivity?.applicationId == null) {
env0_5(ApplicationStreamingStore.getActiveStreamForStreamKey(a0) == null ? env1_10.USER : env1_10.STREAM);
} else {
moduleValue = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
getEmbeddedActivityParticipantId = moduleValue.getEmbeddedActivityParticipantId;
object2 = {};
object2.applicationId = currentEmbeddedActivity.applicationId;
object2.instanceId = currentEmbeddedActivity.compositeInstanceId;
if (a0 !== Reflect.apply(getEmbeddedActivityParticipantId, moduleValue, [object2])) {
env0_5(ApplicationStreamingStore.getActiveStreamForStreamKey(a0) == null ? env1_10.USER : env1_10.STREAM);
} else {
env0_5(env1_10.ACTIVITY);
}
}
} else {
env0_5(null);
}
}
function DisconnectCancelButtonA() { // fn#118946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1712, owner: DisconnectCancelButton.A, offset: 0x024f6407, size: 81 bytes, params: 1, frame: 12
var id;
var r0;
var value;
const value2 = mode.get();
const PANEL = VoicePanelModes.PANEL;
const value4 = null;
if (value2 !== PANEL) {
r0 = value4;
} else {
value = focused.get();
id = value4 == value ? undefined : value.id;
r0 = value4 != id ? id : value4;
}
return r0;
}
function DisconnectCancelButtonV(a0, a1) { // fn#118947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:1909, owner: DisconnectCancelButton.v, offset: 0x024f6458, size: 61 bytes, params: 3, frame: 13
var value;
if (a0 !== a1) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_6)(a0);
}
}
function _fun118948() { // fn#118948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:2082, offset: 0x024f6495, size: 310 bytes, params: 1, frame: 21
var state;
var defaultImport3;
var currentEmbeddedActivity;
const value2 = focused.get();
const value3 = undefined;
const id = value2 == null ? value3 : value2.id;
const binding = env0_4;
const ACTIVITY = env1_10.ACTIVITY;
if (binding !== ACTIVITY) {
if (env0_4 === env1_10.STREAM) {
defaultImport3 = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
defaultImport3.selectParticipant(channelId, null);
if (id != null) {
(require(8913) /* metro dependency 8913: StreamActionCreators */).stopStream(id);
}
return value3;
}
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).disconnect();
state = VoicePanelStore.getState();
state.closeChannel(channelId);
} else {
currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: currentEmbeddedActivity == null ? value3 : currentEmbeddedActivity.location,
applicationId: (require(4610) /* metro dependency 4610: ChannelRTCParticipants */).activityParticipantIdToApplicationId(id)});
}
return value3;
}
function _fun118949() { // fn#118949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15734:2828, offset: 0x024f65cb, size: 39 bytes, params: 1, frame: 13
return ((Component) => <Component style={styles.icon} />)(env0_7);
}
@@ -0,0 +1,30 @@
/* Metro module 15546; source: modules/voice_panel/native/controls/buttons/VoicePanelDrawerToggleButton.tsx; dependencies: [31, 33, 4501, 697, 15527, 15514, 15528, 6821, 8708, 12298, 2] */
function _fun118976(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15743:6, offset: 0x024f7747, size: 239 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'width': '100%', 'height': '100%'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_5 = Reflect.apply(createStyles, value, [{circle: object, iconContainer: {'position': 'absolute',
'justifyContent': 'center', 'alignItems': 'center', 'width': '100%', 'height': '100%'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelDrawerToggleButton.tsx');
exports.default = VoicePanelDrawerToggleButton;
}
function VoicePanelDrawerToggleButton({props, openTab, wrapperSpecs}) { // fn#118977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15743:454, offset: 0x024f7836, size: 322 bytes, params: 2, frame: 26
const styles = useStyles();
const value2 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const backgroundColor = value2.iconBg.backgroundColor;
const color = value2.iconFill.color;
const {isDrawerOpen, handlePress,
accessibilityLabel} = (importDefault(15514) /* metro dependency 15514: useDrawerToggle */)(openTab);
return ((Component) => <Component onPress={handlePress} props={props} accessibilityLabel={accessibilityLabel}>{((Component) => <Component style={[styles.circle,
{backgroundColor: backgroundColor}]} />)(importDefault(6821) /* metro dependency 6821: NativeView */)}{((Component) => <Component style={styles.iconContainer}>{((Component) => <Component color={color} />)(isDrawerOpen ? (require(8708) /* metro dependency 8708: ChevronSmallDownIcon */).ChevronSmallDownIcon : (require(12298) /* metro dependency 12298: ChevronSmallUpIcon */).ChevronSmallUpIcon)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)}</Component>)(importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */);
}
@@ -0,0 +1,287 @@
/* Metro module 15526; source: modules/voice_panel/native/controls/buttons/VoicePanelMicButton.tsx; dependencies: [57, 31, 4295, 1937, 1226, 1379, 4259, 3784, 1878, 4297, 33, 3, 4501, 566, 6952, 10834, 10845, 11794, 4017, 15447, 4081, 10750, 5321, 15527, 15528, 1244, 10280, 4573, 9250, 10835, 2] */
function _fun118888(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:6, offset: 0x024f327a, size: 449 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
let value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.Fragment;
const env0_15 = value.jsxs;
value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('VoicePanelMicButton');
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({text: {'position': 'absolute',
'left': 0, 'right': 0, 'bottom': 4, 'textAlign': 'center', 'opacity': 0.5}});
object = {code: 'function VoicePanelMicButtonTsx1(){const{runOnJS,handlePTTEnd}=this.__closure;runOnJS(handlePTTEnd)();}'};
object = {code: 'function VoicePanelMicButtonTsx2(event,manager){const{State,runOnJS,handleDragStart}=this.__closure;if(event.state!==State.BEGAN)return;manager.activate();runOnJS(handleDragStart)();}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelMicButton.tsx');
exports.PTTButton = PTTButton;
exports.MicButton = MicButton;
}
function useMuteHandlers(a0) { // fn#118889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:384, offset: 0x024f343b, size: 144 bytes, params: 2, frame: 17
const env0_0 = a0;
const env0_1 = env0_4.useRef(null);
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore, AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore, GameConsoleStore], _fun118890, [a0]);
}
function PTTButton({props, wrapperSpecs}) { // fn#118891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1401, offset: 0x024f3614, size: 913 bytes, params: 2, frame: 28
const env0_3 = undefined;
let env0_4 = undefined;
const styles = useStyles();
const binding = env0_4;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
let [property, env0_0] = env0_3(env0_4.useState(false), 2);
const {mute, onPress} = useMuteHandlers(channelId);
const value6 = ((a0) => {
var env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore,
AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore], _fun118893, [a0]);
})(channelId);
const r4 = value6.deaf ? value6.onPress : mute ? onPress : undefined;
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
const value8 = (importDefault(15447) /* metro dependency 15447: useControlsLock */)();
env0_4 = env0_4.useRef({'active': false, 'dragging': false});
const value9 = env0_4.useCallback(_fun118894, [value8, value7, r4]);
const value10 = env0_4.useCallback(_fun118895, [value8, value7]);
const value11 = env0_4.useCallback(_fun118896, [value10]);
const value13 = env0_4.useMemo(_fun118898, [env0_4.useCallback(_fun118897, [value9]), value10]);
env0_4.useEffect(function() {
return _fun118902;
}, [value10]);
const value14 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
let Q8gkVL = (require(1244) /* metro dependency 1244: indexNative */).t.Q8gkVL;
const r13 = property ? value14.iconBgSelected : value14.iconBg;
const MicrophoneIcon = (require(10280) /* metro dependency 10280: MicrophoneIcon */).MicrophoneIcon;
const gestureDetector = <GestureDetector gesture={value13}><VoicePanelAnimatedButtonWrapper onPressIn={value9} onPressOut={value11} props={props} pressed={value7} accessibilityLabel={Reflect.apply(string,
intl,
[Q8gkVL])} style={r13}><MicrophoneIcon color={property ? value14.iconFillSelected.color : value14.iconFill.color} size="lg" /></VoicePanelAnimatedButtonWrapper></GestureDetector>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [styles.text];
items2[1] = value14.iconFill;
string = intl.string;
Q8gkVL = (require(1244) /* metro dependency 1244: indexNative */).t.Q8gkVL;
return (
<>
{gestureDetector}
<Text style={items2} variant="text-xxs/medium">
{Reflect.apply(string, intl, [Q8gkVL])}
</Text>
</>
);
}
function MicButton({props, wrapperSpecs}) { // fn#118903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:3410, offset: 0x024f3dc5, size: 298 bytes, params: 2, frame: 23
const binding = env0_4;
const useContext = binding.useContext;
const {mute, onPress, dominantMuteState} = useMuteHandlers(Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId);
const value3 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const value4 = env0_4.useMemo(_fun118904, [value3, mute, dominantMuteState]);
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<VoicePanelAnimatedButtonWrapper
props={props}
onPress={onPress}
accessibilityLabel={mute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl,
[t.w4m945])}
style={mute ? value3.iconBgVoiceMuted : value3.iconBg}
>
{value4}
</VoicePanelAnimatedButtonWrapper>
);
}
function _fun118890() { // fn#118890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:491, offset: 0x024f34cb, size: 329 bytes, params: 1, frame: 22
var r2;
var r7;
var currentUser;
var binding;
var info;
const channel = ChannelStore.getChannel(env0_0);
const r3 = channel != null ? (require(6952) /* metro dependency 6952: useMuteStates */).getMuteStates({channel: channel,
authenticationStore: AuthenticationStore, voiceStateStore: VoiceStateStore, mediaEngineStore: MediaEngineStore,
permissionStore: PermissionStore, impersonateStore: ImpersonateStore}) : {'selfMute': false, 'suppress': false,
'mute': false};
let current = env0_1.current;
const value5 = undefined;
const value6 = (current == null ? value5 : current.selfMute) !== r3.selfMute;
if (value6) {
currentUser = UserStore.getCurrentUser();
r2 = currentUser != null;
r7 = currentUser;
} else {
r2 = value6;
r7 = value5;
}
r2 = r2 && r7.isStaff();
if (r2) {
binding = env1_16;
info = binding.info;
current = env0_1.current;
Reflect.apply(info, binding, ['Self mute changed', current == null ? value5 : current.selfMute, '>',
r3.selfMute]);
}
env0_1.current = r3;
const voiceActionUtilsModule = require(10834) /* metro dependency 10834: VoiceActionUtils */;
const createMuteHandler = voiceActionUtilsModule.createMuteHandler;
const getAwaitingRemoteSessionInfo = GameConsoleStore.getAwaitingRemoteSessionInfo;
return Reflect.apply(createMuteHandler, voiceActionUtilsModule, [r3, Reflect.apply(getAwaitingRemoteSessionInfo,
GameConsoleStore, []) != null]);
}
function useDeafHandlers(a0) { // fn#118892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1575, owner: PTTButton.useDeafHandlers, offset: 0x024f39a5, size: 116 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore, AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore], _fun118893, [a0]);
}
function _fun118894() { // fn#118894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1932, offset: 0x024f3a9c, size: 182 bytes, params: 1, frame: 16
var value2;
var moduleValue;
var binding;
if (!env0_4.current.active) {
if (env0_1 != null) {
env0_1();
}
env0_4.current.active = true;
value2 = environment.__proto__;
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM);
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(true);
binding = env0_3;
binding.lock();
binding = env0_2;
binding.set(true);
env0_0(true);
}
}
function _fun118895() { // fn#118895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2150, offset: 0x024f3b52, size: 130 bytes, params: 1, frame: 13
var value2;
var binding;
let current = env0_4.current;
if (current.active) {
current = env0_4.current;
current.active = false;
current = env0_4.current;
current.dragging = false;
value2 = environment.__proto__;
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(false);
binding = env0_3;
binding.unlock();
binding = env0_2;
binding.set(false);
env0_0(false);
}
}
function _fun118896() { // fn#118896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2302, offset: 0x024f3bd4, size: 35 bytes, params: 1, frame: 9
if (!env0_4.current.dragging) {
env0_6();
}
}
function _fun118897() { // fn#118897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2355, offset: 0x024f3bf7, size: 52 bytes, params: 1, frame: 10
if (!env0_4.current.dragging) {
env0_4.current.dragging = true;
env0_5();
}
}
function _fun118898() { // fn#118898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2428, offset: 0x024f3c2b, size: 246 bytes, params: 1, frame: 20
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value3 = Gesture.Pan().manualActivation(true);
const onTouchesMove = value3.onTouchesMove;
let closure = n_118899;
const object2 = {};
const State = (require(5321) /* metro dependency 5321 */).State;
object2.State = State;
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.runOnJS = runOnJS;
object2.handleDragStart = env0_7;
closure.__closure = object2;
closure.__workletHash = 13866422602014;
closure.__initData = env1_19;
const value5 = Reflect.apply(onTouchesMove, value3, [closure]);
const onFinalize = value5.onFinalize;
closure = t_118900;
closure.__closure = {runOnJS: runOnJS, handlePTTEnd: env0_6};
closure.__workletHash = 12941114426646;
closure.__initData = env1_18;
return Reflect.apply(onFinalize, value5, [closure]);
}
function _fun118901() { // fn#118901, offset: 0x024f3dba, size: 11 bytes, params: 1, frame: 1
return _fun118902;
}
function _fun118904() { // fn#118904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:3607, offset: 0x024f3eef, size: 195 bytes, params: 1, frame: 18
var r0;
var VoicePanelRiveMicButton;
var muteBinding;
var binding;
const dominantMuteStateBinding = dominantMuteState;
const DominantMuteState = (require(10834) /* metro dependency 10834: VoiceActionUtils */).DominantMuteState;
const SERVER_MUTE = DominantMuteState.SERVER_MUTE;
if (dominantMuteStateBinding === SERVER_MUTE) {
const MicrophoneDenyIcon = (require(9250) /* metro dependency 9250: MicrophoneDenyIcon */).MicrophoneDenyIcon;
r0 = <MicrophoneDenyIcon color={env0_2.iconFillRed.color} />;
} else {
VoicePanelRiveMicButton = (require(10835) /* metro dependency 10835: VoicePanelRiveMicButton */).VoicePanelRiveMicButton;
muteBinding = mute;
binding = env0_2;
r0 = <VoicePanelRiveMicButton color={muteBinding ? binding.iconFillRed.color : binding.iconFill.color} muted={mute} />;
}
return r0;
}
function _fun118893() { // fn#118893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:1659, offset: 0x024f3a19, size: 131 bytes, params: 1, frame: 19
const value = environment.__proto__.__proto__;
const channel = ChannelStore.getChannel(env0_0);
return (require(10834) /* metro dependency 10834: VoiceActionUtils */).createDeafHandler(channel != null ? (require(10845) /* metro dependency 10845: useDeafStates */).getDeafStates(channel,
VoiceStateStore, MediaEngineStore, AuthenticationStore) : {'selfDeaf': false, 'deaf': false});
}
function n_118899({state}, a1) { // fn#118899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2501, offset: 0x024f3d21, size: 105 bytes, params: 3, frame: 14
var runOnJS;
var value2;
let value = environment.__proto__.__proto__;
const State = (require(5321) /* metro dependency 5321 */).State;
const BEGAN = State.BEGAN;
if (state === BEGAN) {
a1.activate();
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [env1_7])();
}
}
function t_118900() { // fn#118900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15723:2727, offset: 0x024f3d8a, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env1_6)();
}
@@ -0,0 +1,25 @@
/* Metro module 10835; source: modules/voice_panel/native/controls/buttons/VoicePanelRiveMicButton.tsx; dependencies: [31, 27, 33, 3868, 9252, 10280, 2] */
function _fun83090(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11021:6, offset: 0x01f0cf44, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelRiveMicButton.tsx');
exports.VoicePanelRiveMicButton = VoicePanelRiveMicButton;
}
function VoicePanelRiveMicButton({color, muted}) { // fn#83091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11021:264, offset: 0x01f0cfdc, size: 203 bytes, params: 2, frame: 21
const MicrophoneRive = (require(3868) /* metro dependency 3868: native */).MicrophoneRive;
return (
<View style={{'width': 24, 'height': 24, 'pointerEvents': 'none'}}>
<MicrophoneRive
dataBinding={{fill: color, on: !muted}}
defaultViewModelInstance={muted ? 'Off' : 'On'}
fallback={((Component) => <Component color={color} />)(muted ? (require(9252) /* metro dependency 9252: MicrophoneSlashIcon */).MicrophoneSlashIcon : (require(10280) /* metro dependency 10280: MicrophoneIcon */).MicrophoneIcon)}
/>
</View>
);
}
@@ -0,0 +1,82 @@
/* Metro module 15543; source: modules/voice_panel/native/controls/buttons/VoicePanelScreenshareButton.tsx; dependencies: [31, 27, 1379, 661, 33, 1581, 12323, 15544, 4501, 697, 11794, 15527, 566, 44, 10794, 683, 1357, 15528, 1244, 6821, 2] */
function _fun118969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15740:6, offset: 0x024f7204, size: 388 bytes, params: 8, frame: 21
var MobilePhoneShareIcon;
var ScreenArrowIcon;
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 */).Image;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
if (value.isMetaQuest()) {
ScreenArrowIcon = (require(12323) /* metro dependency 12323: ScreenArrowIcon */).ScreenArrowIcon;
} else {
MobilePhoneShareIcon = (require(15544) /* metro dependency 15544: MobilePhoneShareIcon */).MobilePhoneShareIcon;
}
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'width': '100%', 'height': '100%'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_10 = Reflect.apply(createStyles, value, [{circle: object, iconContainer: {'position': 'absolute',
'justifyContent': 'center', 'alignItems': 'center', 'width': '100%', 'height': '100%'}, icon: {'width': 24,
'height': 24}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelScreenshareButton.tsx');
exports.default = ScreenshareButton_118970;
}
function ScreenshareButton_118970({props, wrapperSpecs}) { // fn#118970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15740:609, offset: 0x024f7388, size: 662 bytes, params: 2, frame: 27
const binding = env0_3;
const useContext = binding.useContext;
const env0_0 = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const styles = useStyles();
const value3 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(importDefault(44) /* metro dependency 44 */)(channel != null, 'null channel in VoicePanelScreenshareButton');
const {isActive, isFeatureEnabled, onPress,
imgSource} = (importDefault(10794) /* metro dependency 10794: useScreenshareUtils */)(channel);
const value5 = binding.useCallback(_fun118972, [isActive, isFeatureEnabled, onPress]);
let color = isFeatureEnabled ? value3.iconFill.color : value3.iconFillMuted.color;
const backgroundColor = isActive ? value3.iconBgSelected.backgroundColor : value3.iconBg.backgroundColor;
color = isActive ? value3.iconFillSelected.color : color;
const value6 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('ScreenshareButton');
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<VoicePanelAnimatedButtonWrapper
onPress={value5}
disabled={!isFeatureEnabled}
props={props}
accessibilityLabel={isActive ? Reflect.apply(string, intl, [t.CpkXwZ]) : Reflect.apply(string, intl,
[t.fjBNo1])}
style={isActive ? value3.iconBgSelected : undefined}
>
{((Component) => <Component style={[styles.circle,
{backgroundColor: backgroundColor}]} />)(importDefault(6821) /* metro dependency 6821: NativeView */)}
{((Component) => <Component style={styles.iconContainer}>{value6 ? ((Component) => <Component color={color} />)(env0_9) : <Image source={imgSource} style={[styles.icon,
{tintColor: color}]} />}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */)}
</VoicePanelAnimatedButtonWrapper>
);
}
function _fun118972() { // fn#118972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15740:963, offset: 0x024f761e, size: 89 bytes, params: 1, frame: 16
var value2;
var defaultImport;
if (isFeatureEnabled) {
value2 = environment.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.VOICE_PANEL_SCREENSHARE_BUTTON_TAPPED, {source: 'connected button',
was_active: isActive});
onPress();
}
}
@@ -0,0 +1,55 @@
/* Metro module 15541; source: modules/voice_panel/native/controls/buttons/VoicePanelSoundboardButton.tsx; dependencies: [31, 33, 4501, 697, 11794, 15527, 15542, 15528, 1244, 6821, 10284, 2] */
function _fun118963(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15738:6, offset: 0x024f6d3e, size: 243 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'width': '100%', 'height': '100%'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_6 = Reflect.apply(createStyles, value, [{circle: object, iconContainer: {'position': 'absolute',
'justifyContent': 'center', 'alignItems': 'center', 'width': '100%', 'height': '100%'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelSoundboardButton.tsx');
exports.default = SoundboardButton;
}
function SoundboardButton({props, wrapperSpecs}) { // fn#118964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15738:454, offset: 0x024f6e31, size: 448 bytes, params: 2, frame: 26
var r0;
var VoicePanelAnimatedButtonWrapper;
var object2;
var intl;
var items2;
var value;
const binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const styles = useStyles();
const value2 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const backgroundColor = value2.iconBg.backgroundColor;
const defaultImport = importDefault(15542) /* metro dependency 15542: useSoundboardConfig */;
const SoundboardButtonLocation = (require(15542) /* metro dependency 15542: useSoundboardConfig */).SoundboardButtonLocation;
const VOICE_PANEL_CONTROLS = SoundboardButtonLocation.VOICE_PANEL_CONTROLS;
const {handlePress, disabled, visible} = defaultImport(channelId, VOICE_PANEL_CONTROLS);
if (visible) {
VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
object2 = {onPress: handlePress, disabled: disabled, props: props};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6EJvHt']);
value = importDefault(6821) /* metro dependency 6821: NativeView */;
value = ((Component) => <Component style={[styles.circle, {backgroundColor: backgroundColor}]} />)(value);
items2 = [value];
value = importDefault(6821) /* metro dependency 6821: NativeView */;
items2[1] = ((Component) => <Component style={styles.iconContainer}>{((SoundboardIcon) => <SoundboardIcon color={disabled ? (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED : value2.iconFill.color} />)((require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon)}</Component>)(value);
value = <VoicePanelAnimatedButtonWrapper {...object2}>{items2}</VoicePanelAnimatedButtonWrapper>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
@@ -0,0 +1,45 @@
/* Metro module 15527; source: modules/voice_panel/native/controls/buttons/VoicePanelStyles.tsx; dependencies: [4501, 697, 8621, 1357, 2] */
function _fun118905(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15724:6, offset: 0x024f3fb2, size: 135 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun118906);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelStyles.tsx');
exports.useVoicePanelButtonStyles = function(a0) {
return useStyles(require(dependencyMap[2]).useDerivedStateFromSharedValue(a0, _fun118908),
importDefault(dependencyMap[3])('VoicePanelStyles'));
};
}
function _fun118906(a0, a1) { // fn#118906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15724:120, offset: 0x024f4039, size: 384 bytes, params: 3, frame: 18
const object2 = {};
const BACKGROUND_MOD_STRONG = a1 ? 'transparent' : (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
object2.iconBg = {backgroundColor: BACKGROUND_MOD_STRONG};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.iconBgSelected = {backgroundColor: WHITE};
const object3 = {borderWidth: 1};
let BACKGROUND_VOICE_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_VOICE_MUTED;
object3.borderColor = BACKGROUND_VOICE_MUTED;
BACKGROUND_VOICE_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_VOICE_MUTED;
object3.backgroundColor = BACKGROUND_VOICE_MUTED;
object2.iconBgVoiceMuted = object3;
let colors = (importDefault(697) /* metro dependency 697: native */).colors;
object2.iconFill = {color: a0 ? colors.INTERACTIVE_TEXT_DEFAULT : a1 ? colors.ICON_STRONG : colors.WHITE};
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object2.iconFillMuted = {color: ICON_MUTED};
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.iconFillRed = {color: RED_400};
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.iconFillSelected = {color: BLACK};
colors = (importDefault(697) /* metro dependency 697: native */).colors;
object2.iconBadgeIndicator = {backgroundColor: a0 ? colors.CONTROL_BRAND_FOREGROUND : colors.WHITE};
return object2;
}
function useVoicePanelButtonStyles(a0) { // fn#118907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15724:884, offset: 0x024f41b9, size: 88 bytes, params: 2, frame: 16
return useStyles((require(8621) /* metro dependency 8621: useStateFromSharedValue */).useDerivedStateFromSharedValue(a0,
function(a0) {
return a0.drawerMode;
}), (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('VoicePanelStyles'));
}
@@ -0,0 +1,109 @@
/* Metro module 15539; source: modules/voice_panel/native/controls/buttons/VoicePanelVideoButton.tsx; dependencies: [31, 27, 7730, 1379, 1867, 4259, 3784, 33, 11794, 15527, 566, 7118, 4497, 15540, 9228, 10661, 15528, 1244, 3868, 9759, 10286, 2] */
function _fun118952(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:6, offset: 0x024f667c, size: 254 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 channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/buttons/VoicePanelVideoButton.tsx');
exports.default = VideoButton_118954;
}
function VideoButtonRive({isVideoEnabled, color}) { // fn#118953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:185, offset: 0x024f677a, size: 204 bytes, params: 2, frame: 22
const CameraRive = (require(3868) /* metro dependency 3868: native */).CameraRive;
return (
<View style={{'width': 24, 'height': 24, 'pointerEvents': 'none'}}>
<CameraRive
dataBinding={{fill: color, on: isVideoEnabled}}
defaultViewModelInstance={isVideoEnabled ? 'CamOn' : 'CamOff'}
fallback={((Component) => <Component color={color} />)(isVideoEnabled ? (require(9759) /* metro dependency 9759: VideoIcon */).VideoIcon : (require(10286) /* metro dependency 10286: VideoSlashIcon */).VideoSlashIcon)}
/>
</View>
);
}
function VideoButton_118954({props, wrapperSpecs}) { // fn#118954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:585, offset: 0x024f6846, size: 433 bytes, params: 2, frame: 24
var object2;
let binding = env0_3;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const value2 = (require(15527) /* metro dependency 15527: VoicePanelStyles */).useVoicePanelButtonStyles(wrapperSpecs);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, PermissionStore,
ChannelStore], _fun118955);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
return MediaEngineStore.isVideoEnabled();
});
var env0_3 = value4;
const value5 = binding.useCallback(_fun118957, [channelId, value4, value3]);
const VoicePanelAnimatedButtonWrapper = importDefault(15528) /* metro dependency 15528: VoicePanelAnimatedButtonWrapper */;
object2 = {onPress: value5, props: props};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.accessibilityLabel = value4 ? Reflect.apply(string, intl, [t.EnX2Jl]) : Reflect.apply(string, intl,
[t['v8K+8W']]);
object2.style = value4 ? value2.iconBgSelected : value2.iconBg;
binding = env0_3;
const useMemo = binding.useMemo;
return (
<VoicePanelAnimatedButtonWrapper {...object2}>
{Reflect.apply(useMemo, binding, [_fun118960, [value2.iconFill.color, value2.iconFillSelected.color,
value4]])}
</VoicePanelAnimatedButtonWrapper>
);
}
function _fun118955() { // fn#118955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:748, offset: 0x024f69f7, size: 99 bytes, params: 1, frame: 19
const value = environment.__proto__;
const channel = ChannelStore.getChannel(channelId);
return channel != null && (channel.isPrivate() || (require(7118) /* metro dependency 7118: StreamPermissionUtils */).canStreamInChannel(channel,
GuildStore, PermissionStore, false));
}
function _fun118957() { // fn#118957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:926, offset: 0x024f6a6d, size: 209 bytes, params: 1, frame: 20
var closure;
var value;
if (env0_2) {
if (ChannelStore.getChannel(channelId) != null) {
closure = animateToggleVideo;
if (env0_3) {
closure();
} else if (ChannelCallLifecycleStore.isReactingToThermalState()) {
(require(10661) /* metro dependency 10661: openIgnoreThermalStateAlert */).openIgnoreThermalStateAlert(function() {
return animateToggleVideo();
});
} else {
closure();
}
}
} else {
value = require(4497) /* metro dependency 4497: useAlertStoreNative */;
value.openAlert((require(15540) /* metro dependency 15540: VoicePanelNoVideoPermissionsAlert */).VOICE_PANEL_NO_VIDEO_PERMS_KEY,
((Component) => <Component />)(importDefault(15540) /* metro dependency 15540: VoicePanelNoVideoPermissionsAlert */));
}
}
function _fun118960() { // fn#118960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:1436, offset: 0x024f6b6b, size: 70 bytes, params: 1, frame: 15
const binding = env0_3;
const binding2 = env0_1;
return (
<VideoButtonRive
isVideoEnabled={binding}
color={binding ? binding2.iconFillSelected.color : binding2.iconFill.color}
/>
);
}
function animateToggleVideo() { // fn#118958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15736:994, offset: 0x024f6b3e, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(require(9228) /* metro dependency 9228: CallsUtils */).handleToggleVideo(env0_0);
}
@@ -0,0 +1,18 @@
/* Metro module 15515; source: modules/voice_panel/native/controls/trackVoicePanelTabOpened.tsx; dependencies: [4605, 661, 683, 2] */
function _fun118827(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15712:6, offset: 0x024f0979, size: 212 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/trackVoicePanelTabOpened.tsx');
exports.default = function(a0, a1, a2) {
var r5;
r5 = ReadStateStore.hasUnread(a0) || ReadStateStore.getMentionCount(a0) > 0;
var defaultImport = importDefault(dependencyMap[2]);
var VOICE_PANEL_TAB_OPENED = AnalyticEvents.VOICE_PANEL_TAB_OPENED;
defaultImport.track(VOICE_PANEL_TAB_OPENED, {tab: a1, source: a2, is_chat_badged: r5});
};
exports.VoicePanelTabAnalyticsSources = {STORE: 'store', GESTURE: 'gesture', PREJOIN_BUTTON: 'prejoin button',
CONNECTED_BUTTON: 'connected button', VOICE_CONTROLS: 'voice controls', HEADER_BUTTON: 'header button'};
}
@@ -0,0 +1,336 @@
/* Metro module 15525; source: modules/voice_panel/native/controls/useControlsButtons.tsx; dependencies: [31, 4259, 11793, 661, 33, 15526, 15529, 15535, 15537, 15539, 15541, 15543, 15546, 15453, 1581, 11794, 15390, 566, 4017, 11801, 8621, 2] */
function _fun118869(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:6, offset: 0x024f27dc, size: 376 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_118872 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const voicePanelControlsConstantsModule = require(11793) /* metro dependency 11793: VoicePanelControlsConstants */;
const env0_5 = voicePanelControlsConstantsModule.CONTROLS_BUTTON_SIZE_LARGE;
const env0_6 = voicePanelControlsConstantsModule.CONTROLS_BUTTON_SIZE_NORMAL;
const env0_7 = (require(661) /* metro dependency 661: Constants */).InputModes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
object = {mic: mic, ptt: ptt, micConnected: micConnected, connect: connect_118876, chat: chat,
disconnectCancel: disconnectCancel, video: video, soundboard: soundboard, screenshare: screenshare,
drawerToggle: drawerToggle};
object = {code: 'function useControlsButtonsTsx1(){const{getControlsDefaultWidth,windowDimensions,safeArea}=this.__closure;return getControlsDefaultWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/useControlsButtons.tsx');
exports.default = useControlsButtons;
}
function _createForOfIteratorHelperLoose_118870(a0, a1) { // fn#118870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:232, offset: 0x024f2954, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun118871;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_118872(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_118872(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_118872(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun118871;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function mic(a0, a1) { // fn#118873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1153, offset: 0x024f2ac8, size: 59 bytes, params: 3, frame: 15
const MicButton = (require(15526) /* metro dependency 15526: VoicePanelMicButton */).MicButton;
return <MicButton {...a1} key={a0} />;
}
function ptt(a0, a1) { // fn#118874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1195, offset: 0x024f2b03, size: 59 bytes, params: 3, frame: 15
const PTTButton = (require(15526) /* metro dependency 15526: VoicePanelMicButton */).PTTButton;
return <PTTButton {...a1} key={a0} />;
}
function connect_118876(a0, a1) { // fn#118876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1292, offset: 0x024f2b3e, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15529) /* metro dependency 15529: VoicePanelConnectButton */);
}
function chat(a0, a1) { // fn#118877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1324, offset: 0x024f2b73, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15535) /* metro dependency 15535: VoicePanelChatButton */);
}
function disconnectCancel(a0, a1) { // fn#118878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1368, offset: 0x024f2ba8, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15537) /* metro dependency 15537: VoicePanelDisconnectCancelButton */);
}
function video(a0, a1) { // fn#118879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1401, offset: 0x024f2bdd, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15539) /* metro dependency 15539: VoicePanelVideoButton */);
}
function soundboard(a0, a1) { // fn#118880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1439, offset: 0x024f2c12, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15541) /* metro dependency 15541: VoicePanelSoundboardButton */);
}
function screenshare(a0, a1) { // fn#118881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1479, offset: 0x024f2c47, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15543) /* metro dependency 15543: VoicePanelScreenshareButton */);
}
function drawerToggle(a0, a1) { // fn#118882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1520, offset: 0x024f2c7c, size: 53 bytes, params: 3, frame: 15
return ((Component) => <Component {...a1} key={a0} />)(importDefault(15546) /* metro dependency 15546: VoicePanelDrawerToggleButton */);
}
function useControlsButtons() { // fn#118883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:1879, offset: 0x024f2cb1, size: 341 bytes, params: 1, frame: 26
const binding = env0_3;
const {channelId, windowDimensions,
safeArea} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value3 = (importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(channelId);
const defaultImport = importDefault(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */;
const useConfig = defaultImport.useConfig;
const treatment = Reflect.apply(useConfig, defaultImport, [{location: 'VoicePanelControlButtons'}]).treatment;
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
return MediaEngineStore.getMode() === InputModes.PUSH_TO_TALK;
});
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
const closure = useControlsButtonsN;
const getControlsDefaultWidth = (require(11801) /* metro dependency 11801: VoicePanelControlsUtils */).getControlsDefaultWidth;
closure.__closure = {getControlsDefaultWidth: getControlsDefaultWidth, windowDimensions: windowDimensions,
safeArea: safeArea};
closure.__workletHash = 16456936876254;
closure.__initData = env0_10;
let value = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
value = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(value);
return binding.useMemo(_fun118886, [value3, value4, value, treatment]);
}
function useControlsButtonsN() { // fn#118885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:2175, owner: useControlsButtons.n, offset: 0x024f2e27, size: 93 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(11801) /* metro dependency 11801: VoicePanelControlsUtils */;
const getControlsDefaultWidth = value.getControlsDefaultWidth;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const left = Reflect.apply(get, safeAreaBinding, []).left;
get = safeAreaBinding.get;
return Reflect.apply(getControlsDefaultWidth, value, [width, left, Reflect.apply(get, safeAreaBinding, []).right]);
}
function _fun118886() { // fn#118886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:2437, offset: 0x024f2e84, size: 875 bytes, params: 1, frame: 25
var environment;
var r8;
var r2;
var r9;
var r1;
var value2;
var value3;
const MobileGoLiveEntrypointTreatment = (require(15453) /* metro dependency 15453: MobileGoLiveEntrypointExperiment */).MobileGoLiveEntrypointTreatment;
var value7;
var length;
var value9;
var value14;
var width;
var value15;
var value16;
var value17;
var value18;
var value19;
var value20;
var value21;
var value22;
var value23;
const env0_0 = false;
const env0_1 = 0;
let binding = env0_2;
const binding2 = env0_4;
const treatmentBinding = treatment;
const items2 = [];
const push = items2.push;
if (binding) {
value3 = environment.__proto__;
Reflect.apply(push, items2, [{'type': 'icon-normal', 'key': 'connected-video', render: env1_9.video}]);
if (!binding2) {
items2.push({'type': 'icon-normal', 'key': 'connected-mic', render: env1_9.micConnected});
}
if (treatmentBinding === MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_CHAT) {
items2.push({'type': 'icon-normal', 'key': 'connected-screenshare', render: env1_9.screenshare});
} else {
items2.push({'type': 'icon-normal', 'key': 'connected-chat', render: env1_9.chat});
}
if (binding2) {
items2.push({'type': 'icon-large', 'key': 'connected-ptt', render: env1_9.ptt});
}
if (treatmentBinding === MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_SOUNDBOARD) {
items2.push({'type': 'icon-normal', 'key': 'connected-screenshare', render: env1_9.screenshare});
} else {
items2.push({'type': 'icon-normal', 'key': 'connected-soundboard', render: env1_9.soundboard});
}
items2.push({'type': 'icon-normal', 'key': 'connected-disconnect', render: env1_9.disconnectCancel});
} else {
value2 = environment.__proto__;
binding = env1_9;
Reflect.apply(push, items2, [{'type': 'icon-normal', 'key': 'disconnected-mute', render: binding.mic}]);
items2.push({'type': 'label', 'key': 'disconnected-connect', render: binding.connect});
items2.push({'type': 'icon-normal', 'key': 'disconnected-chat', render: binding.chat});
}
const metaQuestUtilsAndroidModule = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
if (metaQuestUtilsAndroidModule.isMetaQuest()) {
items2.push({'type': 'icon-normal', 'key': 'drawer-toggle', render: env1_9.drawerToggle});
}
const value5 = items2.map(_fun118887);
const value6 = 16;
if (env0_0) {
r8 = value6;
} else {
binding = env0_5;
value7 = binding - env0_1 * CONTROLS_BUTTON_SIZE_LARGE;
length = value5.length;
value9 = (length - env0_1) * CONTROLS_BUTTON_SIZE_NORMAL;
length = value5.length;
r8 = (value7 - value9 - 32) / (length - 1);
}
const value12 = _createForOfIteratorHelperLoose_118870(value5);
const value13 = value12();
let done = value13.done;
if (!done) {
r2 = value13;
r9 = value6;
while (true) {
value14 = r2.value;
width = value14.width;
if (width !== -1) {
r1 = width;
} else {
length = value5.length;
value15 = length - 1;
value16 = value15 * CONTROLS_BUTTON_SIZE_NORMAL;
length = value5.length;
value17 = length - 1;
binding = env0_5;
value18 = 32 + value16;
value19 = binding - (value18 + value17 * r8);
value14.width = value19;
r1 = value19;
}
value20 = env0_5 / 2;
value21 = r1 / 2;
value14.x = r9 - value20 + value21;
value22 = r9 + (r1 + r8);
value23 = value12();
done = value23.done;
if (done) {
break;
}
r2 = value23;
r9 = value22;
continue;
}
}
return value5;
}
function _fun118887(a0) { // fn#118887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15722:3555, offset: 0x024f31ef, size: 139 bytes, params: 2, frame: 16
var r6;
var r1;
var binding;
if (a0.type !== 'label') {
}
const value = environment.__proto__.__proto__;
if (a0.type !== 'icon-large') {
r1 = CONTROLS_BUTTON_SIZE_NORMAL;
} else {
binding = env0_1;
env0_1 = binding + 1;
r1 = CONTROLS_BUTTON_SIZE_LARGE;
r6 = binding;
}
const object2 = {};
copyDataProperties(object2, a0, r6);
object2['height'] = r1;
object2['width'] = a0.type === 'label' ? -1 : r1;
object2['x'] = 0;
object2['y'] = 0;
return object2;
}
@@ -0,0 +1,30 @@
/* Metro module 15447; source: modules/voice_panel/native/controls/useControlsLock.tsx; dependencies: [31, 11794, 2] */
function _fun118235(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15644:6, offset: 0x024d275f, size: 117 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/useControlsLock.tsx');
exports.default = useControlsLock;
}
function useControlsLock(a0) { // fn#118236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15644:205, offset: 0x024d27d4, size: 115 bytes, params: 2, frame: 15
const env0_0 = a0;
const binding = env0_2;
const useContext = binding.useContext;
const env0_1 = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).generateStateLocker;
const property = binding.useState(_fun118237)[0];
binding.useLayoutEffect(function() {
return _fun118239;
}, [property]);
return property;
}
function _fun118238() { // fn#118238, offset: 0x024d2847, size: 11 bytes, params: 1, frame: 1
return _fun118239;
}
function _fun118239() { // fn#118239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15644:339, offset: 0x024d2852, size: 19 bytes, params: 1, frame: 9
return env1_2.unlock();
}
@@ -0,0 +1,59 @@
/* Metro module 15514; source: modules/voice_panel/native/controls/useDrawerToggle.tsx; dependencies: [31, 11793, 11794, 4017, 8621, 15515, 1244, 2] */
function _fun118823(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15711:6, offset: 0x024f06df, size: 159 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
object = {code: 'function useDrawerToggleTsx1(){const{controlsSpecs,VoicePanelControlsModes}=this.__closure;return controlsSpecs.get().mode===VoicePanelControlsModes.DRAWER;}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/useDrawerToggle.tsx');
exports.default = useDrawerToggle;
}
function useDrawerToggle(a0) { // fn#118824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15711:408, offset: 0x024f077e, size: 331 bytes, params: 2, frame: 24
var object2;
const env0_0 = a0;
const binding = env0_3;
const {controlsSpecs, connected,
dismissPanel} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
const closure = function() {
return controlsSpecs.get().mode === VoicePanelControlsModes.DRAWER;
};
closure.__closure = {controlsSpecs: controlsSpecs, VoicePanelControlsModes: VoicePanelControlsModes};
closure.__workletHash = 900483810235;
closure.__initData = env0_5;
const value4 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(Reflect.apply(useDerivedValue,
reanimatedRexportModule, [closure]));
const value5 = binding.useCallback(_fun118826, [a0, dismissPanel, connected, controlsSpecs]);
const value6 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(connected);
object2 = {isDrawerOpen: value4, handlePress: value5};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.accessibilityLabel = value4 ? Reflect.apply(string, intl, [t['awDmr/']]) : Reflect.apply(string, intl,
[t.OXW7dL]);
object2.ariaHidden = !value6;
return object2;
}
function _fun118826() { // fn#118826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15711:706, offset: 0x024f08f1, size: 136 bytes, params: 1, frame: 15
var binding;
var VoicePanelTabAnalyticsSources;
var value;
const controlsSpecsBinding = controlsSpecs;
const get = controlsSpecsBinding.get;
const mode = Reflect.apply(get, controlsSpecsBinding, []).mode;
const DRAWER = VoicePanelControlsModes.DRAWER;
if (mode === DRAWER) {
dismissPanel();
} else {
binding = env0_0;
value = connected.get();
VoicePanelTabAnalyticsSources = (require(15515) /* metro dependency 15515: trackVoicePanelTabOpened */).VoicePanelTabAnalyticsSources;
binding({tab: 'settings',
source: value ? VoicePanelTabAnalyticsSources.CONNECTED_BUTTON : VoicePanelTabAnalyticsSources.PREJOIN_BUTTON});
}
}
@@ -0,0 +1,26 @@
/* Metro module 15516; source: modules/voice_panel/native/controls/utils/VoicePanelControlUtils.tsx; dependencies: [11624, 2] */
function _fun118829(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15713:6, offset: 0x024f0abf, size: 119 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {code: 'function getDrawerSpec_VoicePanelControlUtilsTsx1(height,top){const{roundToNearestPixel}=this.__closure;const maxHeight=height-top;return{minHeight:roundToNearestPixel(maxHeight*0.65),maxHeight:maxHeight};}'};
const value = _fun118830();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/utils/VoicePanelControlUtils.tsx');
exports.getDrawerSpec = value;
}
function _fun118830() { // fn#118830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15713:316, offset: 0x024f0b36, size: 74 bytes, params: 1, frame: 14
const closure = function(a0, a1) {
var value = a0 - a1;
var object = {};
object.minHeight = importDefault(dependencyMap[0])(0.65 * value);
object.maxHeight = value;
return object;
};
const object2 = {};
object2.roundToNearestPixel = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
closure.__closure = object2;
closure.__workletHash = 3647675988513;
closure.__initData = env0_2;
return closure;
}
@@ -0,0 +1,300 @@
/* Metro module 15410; source: modules/voice_panel/native/controls/utils/VoicePanelFloatingCTAUtils.tsx; dependencies: [57, 31, 27, 4606, 15411, 4117, 1379, 1385, 33, 4048, 11794, 15390, 9127, 632, 9077, 9039, 9035, 4080, 9052, 15412, 9219, 7975, 9133, 1244, 5312, 15413, 10859, 15414, 7014, 8621, 3968, 7684, 1365, 15415, 10284, 7212, 2] */
function _fun117870(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:6, offset: 0x024c3af9, size: 381 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = useFloatingCTAProps;
const closure2 = getBadConnectionCTAProps;
const closure3 = getDismissableCTAProps;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).Pressable;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const eventBannerStore = importDefault(15411) /* metro dependency 15411: EventBannerStore */;
const env0_8 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildScheduledEventActive;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_10 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/utils/VoicePanelFloatingCTAUtils.tsx');
exports.FLOATING_CTA_HIDE_TIMEOUT = 5000;
exports.OverrideFloatingCTA = {BAD_CONNECTION: 'BAD_CONNECTION'};
exports.useShouldShowFloatingCTA = useShouldShowFloatingCTA;
exports.useFloatingCTAProps = closure;
exports.getBadConnectionCTAProps = closure2;
exports.getDismissableCTAProps = closure3;
}
function useFloatingCTAProps(a0) { // fn#117871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:321, offset: 0x024c3c76, size: 122 bytes, params: 2, frame: 16
const binding = env0_4;
const useContext = binding.useContext;
let value = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(Reflect.apply(useContext,
binding, [importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).showFloatingCTA);
value = useOverrideFloatingCTAProps(value);
return value ?? useGuildEventControlsProps(a0) ?? useCallInviteProps(a0);
}
function getBadConnectionCTAProps(a0) { // fn#117882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:2391, offset: 0x024c437e, size: 348 bytes, params: 2, frame: 21
const env0_0 = a0;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uv1tVh);
object2.subLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['gQ14+g']);
const RowButton = (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton;
const Icon = RowButton.Icon;
const CircleErrorIcon = (require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon;
object2.icon = <Icon IconComponent={CircleErrorIcon} variant="translucent" />;
object2.onPress = onPress_117883;
const pressableProps = {'accessibilityRole': 'button', 'accessibilityLabel': null, 'hitSlop': 4,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq),
onPress: onPress_117884};
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
object2.trailing = <Pressable {...pressableProps}><XSmallIcon color="interactive-icon-default" /></Pressable>;
return object2;
}
function handleSoundboardMobileFloatingCtaClose() { // fn#117885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3008, offset: 0x024c454b, size: 62 bytes, params: 1, frame: 14
const value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = value.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const SOUNDBOARD_MOBILE_FLOATING_CTA = DismissibleContent.SOUNDBOARD_MOBILE_FLOATING_CTA;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, value, [SOUNDBOARD_MOBILE_FLOATING_CTA]);
}
function getDismissableCTAProps({dismissableContent, channel}) { // fn#117886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3420, offset: 0x024c4589, size: 310 bytes, params: 2, frame: 19
var object2;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const VOICE_PANEL_BAD_CONNECTION_CTA = DismissibleContent.VOICE_PANEL_BAD_CONNECTION_CTA;
if (VOICE_PANEL_BAD_CONNECTION_CTA === dismissableContent) {
return getBadConnectionCTAProps();
}
const SOUNDBOARD_MOBILE_FLOATING_CTA = DismissibleContent.SOUNDBOARD_MOBILE_FLOATING_CTA;
if (SOUNDBOARD_MOBILE_FLOATING_CTA === dismissableContent) {
object2 = {};
object2.icon = ((SoundboardIcon) => <SoundboardIcon color="interactive-icon-default" />)((require(10284) /* metro dependency 10284: SoundboardIcon */).SoundboardIcon);
object2.onPress = onPress_117887;
object2.label = (require(7212) /* metro dependency 7212: getDeviceSpecificString */).getDeviceSpecificString({quest: t.XLlWUe},
t.IJgkPX);
object2.trailing = <CloseSoundboardMobileFloatingCtaIcon />;
return object2;
}
DismissibleContent.DONUT_MOBILE_NUX;
return null;
}
function CloseSoundboardMobileFloatingCtaIcon() { // fn#117888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3209, offset: 0x024c470e, size: 142 bytes, params: 1, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const handleSoundboardMobileFloatingCtaCloseBinding = handleSoundboardMobileFloatingCtaClose;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
return (
<Pressable
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
onPress={handleSoundboardMobileFloatingCtaCloseBinding}
>
<XSmallIcon color="interactive-icon-default" />
</Pressable>
);
}
function useShouldShowFloatingCTA(a0) { // fn#117889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:4355, offset: 0x024c479c, size: 193 bytes, params: 2, frame: 17
const env0_0 = a0;
const property = env0_3((require(7014) /* metro dependency 7014: useGetDismissibleContent */).useGetDismissibleContent((importDefault(15414) /* metro dependency 15414: useChannelFloatingCTAContent */)(a0)),
1)[0];
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
_fun117890);
return env0_4.useMemo(_fun117891, [property, channel]) != null || useFloatingCTAProps(channel) != null;
}
function useOverrideFloatingCTAProps(a0) { // fn#117872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:402, owner: useFloatingCTAProps.useOverrideFloatingCTAProps, offset: 0x024c3cf0, size: 95 bytes, params: 2, frame: 17
const env0_0 = a0;
const binding = env1_4;
const useContext = binding.useContext;
return env1_4.useMemo(_fun117873, [Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).setShowFloatingCTA, a0]);
}
function useGuildEventControlsProps(a0) { // fn#117875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:602, owner: useFloatingCTAProps.useGuildEventControlsProps, offset: 0x024c3d91, size: 842 bytes, params: 2, frame: 28
var scheduled_start_time;
var name;
var entity_type;
var STAGE_INSTANCE;
var moduleValue5;
var getGuildScheduledEventHeaderProps;
var text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value2 = undefined;
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
let binding = env1_4;
const useContext = binding.useContext;
const value4 = (importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(Reflect.apply(useContext,
binding, [importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId);
const value5 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useImminentUpcomingGuildEvents(a0 == null ? value2 : a0.id);
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let object = [EventBannerStore];
const value6 = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, _fun117876, [value5]]);
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const canManageGuildEvent2 = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[a0]).canManageGuildEvent(value6);
const r1 = value6 != null && isGuildScheduledEventActive(value6);
const r3 = (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(value6) ?? value2;
const value9 = (importDefault(9035) /* metro dependency 9035: useGuildScheduledEventUserCount */)(value6 == null ? value2 : value6.guild_id,
value6 == null ? value2 : value6.id, r3);
binding = env1_4;
let useCallback = binding.useCallback;
const value10 = Reflect.apply(useCallback, binding, [_fun117878, [value6, r3]]);
binding = env1_4;
useCallback = binding.useCallback;
if (value4) {
if (value6 == null) {
return value2;
}
if (canManageGuildEvent2) {
if (r1) {
return value2;
}
scheduled_start_time = value6.scheduled_start_time;
name = value6.name;
entity_type = value6.entity_type;
STAGE_INSTANCE = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
moduleValue5 = require(9219) /* metro dependency 9219: GuildScheduledEventHeaderUtils */;
getGuildScheduledEventHeaderProps = moduleValue5.getGuildScheduledEventHeaderProps;
object = {};
object.eventTimeData = (require(9039) /* metro dependency 9039: ScheduleUtils */).getEventTimeData(scheduled_start_time);
object.isStage = entity_type === STAGE_INSTANCE;
object.theme = value3;
object.event = value6;
text = Reflect.apply(getGuildScheduledEventHeaderProps, moduleValue5, [object]).text;
object = {onPress: value10};
object.icon = ((Icon) => <Icon IconComponent={(require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon} variant="translucent" />)((require(7975) /* metro dependency 7975: RowButtonNative */).RowButton.Icon);
object.label = name;
object.subLabel = '' + text + ' • ' + intl.formatToPlainString(t.NywdIj, {count: value9});
object.trailing = <Pressable accessibilityRole="button" accessibilityLabel={intl.string(t.cpT0Cq)} onPress={Reflect.apply(useCallback,
binding, [_fun117879,
[value6]])}>{((XSmallIcon) => <XSmallIcon color="interactive-icon-default" />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)}</Pressable>;
return object;
}
}
return value2;
}
function useCallInviteProps(a0) { // fn#117880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1880, owner: useFloatingCTAProps.useCallInviteProps, offset: 0x024c41bb, size: 376 bytes, params: 2, frame: 20
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_0 = a0;
const binding = env1_4;
const useContext = binding.useContext;
const value2 = undefined;
const value3 = (importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(Reflect.apply(useContext,
binding, [importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId);
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let object = [ChannelRTCStore];
const value4 = Reflect.apply(useStateFromStores, useStateFromStoresModule, [object, _fun117881]);
const useInviteMembersCallbackModule = require(15413) /* metro dependency 15413: useInviteMembersCallback */;
const useInviteMembersCallback = useInviteMembersCallbackModule.useInviteMembersCallback;
if (a0 != null) {
if (value3) {
if (value4) {
object = {};
object.label = intl.string(t.N4nebq);
object.subLabel = intl.string(t.o2XPr2);
object.icon = ((Icon) => <Icon IconComponent={(require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon} variant="translucent" />)((require(7975) /* metro dependency 7975: RowButtonNative */).RowButton.Icon);
object.onPress = Reflect.apply(useInviteMembersCallback, useInviteMembersCallbackModule,
[a0 == null ? value2 : a0.id]);
r0 = object;
} else {
r0 = value2;
}
} else {
r0 = value2;
}
} else {
r0 = value2;
}
return r0;
}
function getBadConnectionCTAPropsOnPress() { // fn#117883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:2636, owner: getBadConnectionCTAProps.onPress, offset: 0x024c44da, size: 30 bytes, params: 1, frame: 11
return env0_0?.();
}
function getBadConnectionCTAPropsOnPress_117884() { // fn#117884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:2777, owner: getBadConnectionCTAProps.onPress, offset: 0x024c44f8, size: 83 bytes, params: 1, frame: 13
const value = environment.__proto__;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const VOICE_PANEL_BAD_CONNECTION_CTA = DismissibleContent.VOICE_PANEL_BAD_CONNECTION_CTA;
(require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */).UNSAFE_markDismissibleContentAsDismissed(VOICE_PANEL_BAD_CONNECTION_CTA);
if (env0_0 != null) {
env0_0();
}
}
function getDismissableCTAPropsOnPress() { // fn#117887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:3740, owner: getDismissableCTAProps.onPress, offset: 0x024c46bf, size: 79 bytes, params: 1, frame: 12
var value;
const channelBinding = channel;
if (channelBinding != null) {
value = environment.__proto__;
value = require(15415) /* metro dependency 15415: SoundboardActionCreators */;
value.showSoundboardSoundPickerActionSheet({channel: channelBinding,
analyticsSource: 'SOUNDBOARD_MOBILE_FLOATING_CTA'});
}
value = environment.__proto__;
handleSoundboardMobileFloatingCtaClose();
}
function _fun117891() { // fn#117891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:4531, offset: 0x024c485d, size: 38 bytes, params: 1, frame: 12
return getDismissableCTAProps({dismissableContent: env0_1, channel: channel});
}
function _fun117873() { // fn#117873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:508, offset: 0x024c3d4f, size: 48 bytes, params: 1, frame: 12
var environment;
const binding = env0_0;
const value = environment.__proto__.__proto__;
const BAD_CONNECTION = env2_12.BAD_CONNECTION;
return binding !== BAD_CONNECTION ? null : getBadConnectionCTAProps(function() {
return setShowFloatingCTA(null);
});
}
function _fun117876() { // fn#117876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:806, offset: 0x024c40db, size: 41 bytes, params: 1, frame: 11
const value = env0_0.find(function(a0) {
return !EventBannerStore.isEventDismissed(a0.id);
});
const value2 = null;
return value2 != value ? value : value2;
}
function _fun117878() { // fn#117878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1110, offset: 0x024c4125, size: 88 bytes, params: 1, frame: 15
var value2;
var moduleValue;
if (env0_1 != null) {
value2 = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
moduleValue = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue.openStartGuildEventModal(env0_1, env0_2);
}
}
function _fun117879() { // fn#117879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1218, offset: 0x024c417d, size: 62 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (env0_1 != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(15412) /* metro dependency 15412: GuildScheduledEventsNoticesActionCreators */;
moduleValue.dismissEventBanner(env0_1.id);
}
}
function _fun117881() { // fn#117881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15607:1999, offset: 0x024c4333, size: 75 bytes, params: 1, frame: 12
return env0_0?.id != null && ChannelRTCStore.getParticipants(env0_0.id).length === 1;
}
@@ -0,0 +1,192 @@
/* Metro module 11644; source: modules/voice_panel/native/controls/utils/createUseAnimatedScrollLock.tsx; dependencies: [31, 477, 4017, 2] */
function _fun89251(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:6, offset: 0x020067d7, size: 240 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
let env0_2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
value = value.createContext(function() {
return {};
});
object = {code: 'function onBeginDrag_createUseAnimatedScrollLockTsx1(_,context){const{isDragScrolling}=this.__closure;context.momentumEndCount=0;isDragScrolling.set(true);}'};
object = {code: 'function onEndDrag_createUseAnimatedScrollLockTsx2(event){const{isDragScrolling,scrollLocked}=this.__closure;var _event$velocity$y,_event$velocity;isDragScrolling.set(false);if(Math.abs((_event$velocity$y=(_event$velocity=event.velocity)===null||_event$velocity===void 0?void 0:_event$velocity.y)!==null&&_event$velocity$y!==void 0?_event$velocity$y:0)===0){scrollLocked.set(false);}}'};
object = {code: 'function onMomentumEnd_createUseAnimatedScrollLockTsx3(event,context){const{IS_ANDROID,scrollLocked}=this.__closure;if(IS_ANDROID){var _context$momentumEndC;let count=(_context$momentumEndC=context===null||context===void 0?void 0:context.momentumEndCount)!==null&&_context$momentumEndC!==void 0?_context$momentumEndC:0;count+=1;if(count===3){scrollLocked.set(false);}else if(context!=null){context.momentumEndCount=count;}}else{scrollLocked.set(false);}}'};
object = {code: 'function onScroll_createUseAnimatedScrollLockTsx4(event){const{isDragScrolling,IS_ANDROID,scrollTo,scrollerRef,scrollOffsetValue,scrollLocked,onScrollHandler,runOnJS,onScrollHandlerWorkletized}=this.__closure;var _onScrollHandlerWorkl;const newScrollPosition=event.contentOffset.y;if(isDragScrolling.get()!==true){let scrollPosition=newScrollPosition;if(IS_ANDROID&&scrollPosition<0){scrollPosition=0;scrollTo(scrollerRef,0,0,false);}scrollOffsetValue.set(scrollPosition);}else{const isUp=newScrollPosition<scrollOffsetValue.get();if(scrollLocked.get()||isUp&&newScrollPosition<=0){if(!scrollLocked.get()){scrollLocked.set(true);}scrollTo(scrollerRef,0,0,false);scrollOffsetValue.set(0);}else{scrollOffsetValue.set(newScrollPosition);}}const{width:width,height:height}=event.layoutMeasurement;const{width:contentWidth,height:contentHeight}=event.contentSize;onScrollHandler!=null&&runOnJS(onScrollHandler)({width:width,height:height,offset:newScrollPosition,contentWidth:contentWidth,contentHeight:contentHeight});(_onScrollHandlerWorkl=onScrollHandlerWorkletized)===null||_onScrollHandlerWorkl===void 0||_onScrollHandlerWorkl({width:width,height:height,offset:newScrollPosition,contentWidth:contentWidth,contentHeight:contentHeight});}'};
object = {code: 'function createUseAnimatedScrollLockTsx5(){const{scrollLocked}=this.__closure;return{showsVerticalScrollIndicator:!scrollLocked.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/controls/utils/createUseAnimatedScrollLock.tsx');
exports.ControlsGestureScrollLock = value;
exports.createUseAnimatedScrollLock = function(a0, a1, a2, a3) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
var env0_3 = a3;
return _fun89254;
};
}
function createUseAnimatedScrollLock(a0, a1, a2, a3) { // fn#89253, offset: 0x020068c7, size: 39 bytes, params: 5, frame: 2
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = a3;
return _fun89254;
}
function _fun89254() { // fn#89254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:2804, offset: 0x020068ee, size: 491 bytes, params: 1, frame: 28
var environment;
let value = a0;
const r0 = value !== undefined ? value : {};
const onScrollHandler = r0.onScrollHandler;
const env0_0 = onScrollHandler;
const onScrollHandlerWorkletized = r0.onScrollHandlerWorkletized;
value = environment.__proto__;
let value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useAnimatedRef();
const object3 = {};
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedScrollHandler = reanimatedRexportModule.useAnimatedScrollHandler;
const object4 = {};
let closure = function(a0, a1) {
a1.momentumEndCount = 0;
importAll.set(true);
};
closure.__closure = {isDragScrolling: importAll};
closure.__workletHash = 16433590303176;
closure.__initData = env1_3;
object4.onBeginDrag = closure;
closure = function(a0) {
var r7;
importAll.set(false);
var Math = global.Math;
var abs = Math.abs;
var velocity = a0.velocity;
var value2 = undefined;
r7 = velocity == null ? value2 : velocity.y;
var value3 = 0;
if (value3 === Reflect.apply(abs, Math, [r7 ?? value3])) {
require.set(false);
}
return value2;
};
closure.__closure = {isDragScrolling: importAll, scrollLocked: require};
closure.__workletHash = 1594981610850;
closure.__initData = env1_4;
object4.onEndDrag = closure;
closure = onMomentumEnd;
const binding = env1_2;
closure.__closure = {IS_ANDROID: binding, scrollLocked: require};
closure.__workletHash = 17525906195822;
closure.__initData = env1_5;
object4.onMomentumEnd = closure;
closure = onScroll_89258;
const object5 = {isDragScrolling: importAll, IS_ANDROID: binding};
object5.scrollTo = reanimatedRexportModule.scrollTo;
object5.scrollerRef = value2;
object5.scrollOffsetValue = importDefault;
object5.scrollLocked = require;
object5.onScrollHandler = onScrollHandler;
object5.runOnJS = reanimatedRexportModule.runOnJS;
object5.onScrollHandlerWorkletized = onScrollHandlerWorkletized;
closure.__closure = object5;
closure.__workletHash = 13271628494164;
closure.__initData = env1_6;
object4.onScroll = closure;
object3.onScroll = Reflect.apply(useAnimatedScrollHandler, reanimatedRexportModule, [object4]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedProps = moduleValue3.useAnimatedProps;
closure = function() {
var object = {};
object.showsVerticalScrollIndicator = !require.get();
return object;
};
closure.__closure = {scrollLocked: require};
closure.__workletHash = 3670657775473;
closure.__initData = env1_7;
object3.animatedProps = Reflect.apply(useAnimatedProps, moduleValue3, [closure]);
object3.scrollerRef = value2;
object3.gestureRef = env0_0;
return object3;
}
function onMomentumEnd(a0, a1) { // fn#89257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:3325, offset: 0x02006b5e, size: 112 bytes, params: 3, frame: 13
var momentumEndCount;
let value = environment.__proto__.__proto__;
if (env2_2) {
value = undefined;
momentumEndCount = a1 == null ? value : a1.momentumEndCount;
value = 0;
value = (momentumEndCount ?? value) + 1;
if (value === 3) {
value = environment.__proto__;
require.set(false);
} else if (a1 != null) {
a1.momentumEndCount = value;
}
} else {
value = environment.__proto__;
require.set(false);
}
}
function onScroll_89258({contentOffset, layoutMeasurement, contentSize}) { // fn#89258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11830:3572, offset: 0x02006bce, size: 447 bytes, params: 2, frame: 22
var r3;
var value3;
var value4;
var value6;
var moduleValue2;
var value9;
var value10;
var moduleValue3;
const y = contentOffset.y;
if (importAll.get() !== true) {
value6 = environment.__proto__.__proto__;
if (env2_2 && y < 0) {
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value9 = 0;
moduleValue2.scrollTo(env0_2, value9, value9, false);
r3 = value9;
} else {
r3 = y;
}
importDefault.set(r3);
} else {
get = importDefault.get;
value3 = y < Reflect.apply(get, importDefault, []);
get = require.get;
if (Reflect.apply(get, require, [])) {
if (!require.get()) {
require.set(true);
}
value4 = environment.__proto__.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).scrollTo(env0_2, 0, 0, false);
importDefault.set(0);
} else if (value3) {
if (y <= 0) {
if (!require.get()) {
require.set(true);
}
value4 = environment.__proto__.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).scrollTo(env0_2, 0, 0, false);
importDefault.set(0);
} else {
importDefault.set(y);
}
} else {
importDefault.set(y);
}
}
const width = layoutMeasurement.width;
const height = layoutMeasurement.height;
const width2 = contentSize.width;
const height2 = contentSize.height;
if (onScrollHandler != null) {
value10 = environment.__proto__.__proto__;
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue3.runOnJS(onScrollHandler)({width: width, height: height, offset: y, contentWidth: width2,
contentHeight: height2});
}
if (onScrollHandlerWorkletized != null) {
onScrollHandlerWorkletized({width: width, height: height, offset: y, contentWidth: width2,
contentHeight: height2});
}
}