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,104 @@
/* Metro module 8468; source: modules/voice_panel/native/card/DominantColorUtils.tsx; dependencies: [57, 31, 27, 1393, 4000, 697, 628, 2] */
function _fun67250(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:6, offset: 0x01c1b512, size: 296 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = getCachedSourceFromURI;
const closure2 = useDominantRGBFromImage_67252;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.NativeModules;
const env0_6 = value.Image;
value = importDefault(1393) /* metro dependency 1393 */;
value = new value({max: 1000});
value = importDefault(1393) /* metro dependency 1393 */;
value = new value({max: 1000});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/DominantColorUtils.tsx');
exports.getCachedSourceFromURI = closure;
exports.useDominantRGBFromImage = closure2;
exports.useDominantColorFromImage = useDominantColorFromImage_67259;
}
function getCachedSourceFromURI(a0) { // fn#67251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:209, offset: 0x01c1b63a, size: 101 bytes, params: 2, frame: 17
const value = a0;
const value3 = env0_8.get(value);
const value4 = null;
const r0 = value4 != value3 ? value3 : typeof value === 'number' ? value : value4 == value || value.trim() === '' ? value4 : {uri: value};
env0_8.set(value, r0);
return r0;
}
function useDominantRGBFromImage_67252(a0) { // fn#67252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:387, offset: 0x01c1b69f, size: 223 bytes, params: 2, frame: 21
var moduleValue;
const env0_0 = a0;
let binding = env0_4;
const env0_1 = binding.useRef(true);
env0_4.useEffect(function() {
return _fun67254;
}, []);
binding = env0_4;
const useState = binding.useState;
let r0 = a0 != null ? env0_7.get(a0) : undefined;
if (r0 == null) {
moduleValue = require(4000) /* metro dependency 4000: ColorUtils */;
r0 = moduleValue.hexToRgb((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800);
}
const value6 = env0_3(Reflect.apply(useState, binding, [r0]), 2);
const property = value6[0];
const env0_2 = value6[1];
env0_4.useEffect(_fun67255, [a0]);
return property;
}
function useDominantColorFromImage_67259(a0) { // fn#67259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:1244, offset: 0x01c1b926, size: 76 bytes, params: 2, frame: 20
const value = useDominantRGBFromImage_67252(a0);
return 'rgb(' + value.r + ', ' + value.g + ', ' + value.b + ')';
}
function _fun67253() { // fn#67253, offset: 0x01c1b77e, size: 11 bytes, params: 1, frame: 1
return _fun67254;
}
function _fun67255() { // fn#67255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:638, offset: 0x01c1b79c, size: 225 bytes, params: 1, frame: 16
var environment;
var value5;
var value;
const value2 = undefined;
const r2 = env0_0 != null ? env1_7.get(env0_0) : value2;
var env0_0 = r2;
if (env0_0 != null) {
if (r2 == null) {
value5 = environment.__proto__;
value = getCachedSourceFromURI(env0_0);
if (value != null) {
value = (typeof value === 'number' ? NativeModules.ImageManager.getDominantColorsLocalAsset(Image.resolveAssetSource(value)) : NativeModules.ImageManager.getDominantColors(Image.resolveAssetSource(value))).then(_fun67256);
value.catch(function() {
});
}
} else {
env0_2(_fun67258);
}
}
return value2;
}
function _fun67254() { // fn#67254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:461, offset: 0x01c1b789, size: 19 bytes, params: 1, frame: 2
env1_1.current = false;
}
function _fun67256(a0) { // fn#67256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:892, offset: 0x01c1b87d, size: 105 bytes, params: 2, frame: 15
const value2 = env2_3(a0[0], 3);
const object2 = {r: value2[0], g: value2[1], b: value2[2]};
env2_7.set(env1_0, object2);
if (env1_1.current) {
env1_2(object2);
}
}
function _fun67258(a0) { // fn#67258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8653:991, offset: 0x01c1b8e6, size: 64 bytes, params: 2, frame: 15
const value = a0;
return env0_0 === value || (importDefault(628) /* metro dependency 628: shallowEqual */)(env0_0,
value) ? value : env0_0;
}
@@ -0,0 +1,399 @@
/* Metro module 15496; source: modules/voice_panel/native/card/VoicePanelAnimatedActivityCard.tsx; dependencies: [57, 31, 1378, 7730, 1379, 11795, 11793, 661, 4237, 33, 4501, 697, 11794, 15319, 566, 15497, 7860, 6777, 10701, 6771, 6789, 8620, 12711, 4017, 4610, 5321, 1478, 10703, 8141, 10704, 15498, 15499, 15503, 3868, 2] */
function _fun118643(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6, offset: 0x024e6309, size: 544 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const env0_8 = voicePanelConstantsModule.IS_IOS;
const env0_9 = voicePanelConstantsModule.VoicePanelModes;
const env0_10 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
const env0_11 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const constantsModule = require(4237) /* metro dependency 4237: Constants */;
const env0_12 = constantsModule.ACTIVITY_PORTRAIT_ASPECT_RATIO;
const env0_13 = constantsModule.ActivityLayoutMode;
const env0_14 = constantsModule.OrientationLockState;
const value4 = require(33) /* metro dependency 33 */;
const env0_15 = value4.jsx;
const env0_16 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const env0_17 = Reflect.apply(createStyles, createStylesModule,
[{activityContainerBackground: {backgroundColor: BACKGROUND_SURFACE_HIGH}}]);
object = {code: 'function VoicePanelAnimatedActivityCardTsx1(){const{sharedVisible,mode}=this.__closure;return{visible:sharedVisible.get(),mode:mode.get()};}'};
object = {code: 'function VoicePanelAnimatedActivityCardTsx2({visible:visible,mode:mode},prev){const{VoicePanelModes,runOnJS,incrementActivityKey}=this.__closure;if(visible===1&&prev!=null&&prev.visible===0||mode!==VoicePanelModes.PIP&&(prev===null||prev===void 0?void 0:prev.mode)===VoicePanelModes.PIP){runOnJS(incrementActivityKey)();}}'};
object = {code: 'function VoicePanelAnimatedActivityCardTsx3(){const{activityParticipantId,focused,mode,VoicePanelModes}=this.__closure;var _focused$get;return activityParticipantId!=null&&((_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id)===activityParticipantId&&mode.get()===VoicePanelModes.PANEL;}'};
object = {code: 'function VoicePanelAnimatedActivityCardTsx4(isActivityFocused,wasActivityFocused){const{runOnJS,setIsActivityFocused}=this.__closure;if(isActivityFocused!==wasActivityFocused){runOnJS(setIsActivityFocused)(isActivityFocused);}}'};
object = {code: 'function VoicePanelAnimatedActivityCardTsx5(){const{windowDimensions}=this.__closure;return windowDimensions.get();}'};
object = {code: 'function VoicePanelAnimatedActivityCardTsx6(windowDimensionsValue,prevWindowDimensionsValue){const{runOnJS,handleTargetAspectRatioParams,gridOrientationLockState,hasJoined,updateNotJoinedActivityDimensions}=this.__closure;if(windowDimensionsValue.landscape!==(prevWindowDimensionsValue===null||prevWindowDimensionsValue===void 0?void 0:prevWindowDimensionsValue.landscape)){runOnJS(handleTargetAspectRatioParams)(windowDimensionsValue.landscape,gridOrientationLockState,hasJoined);}runOnJS(updateNotJoinedActivityDimensions)();}'};
object = {code: "function VoicePanelAnimatedActivityCardTsx7(){const{IS_IOS,animatedKeyboardHeight,windowDimensions,isTabletActivitySurface,focusedOrientationLockState,OrientationLockState,ACTIVITY_PORTRAIT_ASPECT_RATIO,isActivityFocused,backgroundColor}=this.__closure;const keyboardHeight=IS_IOS?animatedKeyboardHeight.get():0;const isScreenLandscape=windowDimensions.get().landscape;const screenWidth=windowDimensions.get().width;const screenHeight=windowDimensions.get().height;const shouldLetterBox=isTabletActivitySurface&&focusedOrientationLockState===OrientationLockState.LANDSCAPE&&!isScreenLandscape;const shouldPillarBox=isTabletActivitySurface&&focusedOrientationLockState===OrientationLockState.PORTRAIT&&isScreenLandscape;let containerPaddingVertical=0;let containerPaddingHorizontal=0;if(shouldLetterBox){containerPaddingVertical=(screenHeight-screenWidth*ACTIVITY_PORTRAIT_ASPECT_RATIO)/2;}else if(shouldPillarBox){containerPaddingHorizontal=(screenWidth-screenHeight*ACTIVITY_PORTRAIT_ASPECT_RATIO)/2;}return{flex:isActivityFocused?0:1,backgroundColor:backgroundColor,paddingVertical:containerPaddingVertical,paddingHorizontal:containerPaddingHorizontal,width:isActivityFocused?screenWidth:'auto',height:isActivityFocused?screenHeight-keyboardHeight:'auto',maxHeight:'100%',maxWidth:'100%'};}"};
object = {code: 'function VoicePanelAnimatedActivityCardTsx8(event,manager){const{controlsSpecs,VoicePanelControlsModes,runOnJS,hideControls}=this.__closure;manager.fail();if(controlsSpecs.get().mode!==VoicePanelControlsModes.HIDDEN){runOnJS(hideControls)({debounce:true});}}'};
value = value.memo(VoicePanelAnimatedActivityCard);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelAnimatedActivityCard.tsx');
exports.default = value;
}
function VoicePanelAnimatedActivityCardInner({applicationId, sharedVisible, layout}) { // fn#118644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:3773, offset: 0x024e6529, size: 2256 bytes, params: 2, frame: 50
var object4;
var r13;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
var ReanimatedNativeView;
var object2;
var items2;
const env0_18 = undefined;
const env0_19 = undefined;
const env0_21 = undefined;
const styles = useStyles();
let binding = env0_4;
let useState = binding.useState;
const value4 = env0_3(Reflect.apply(useState, binding, [0]), 2);
const property = value4[0];
const env0_2 = value4[1];
const value5 = env0_4.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
var env0_3 = value5.channelId;
const focused = value5.focused;
var env0_4 = focused;
const layoutManager = value5.layoutManager;
const mode = value5.mode;
const windowDimensions = value5.windowDimensions;
const hideControls = value5.hideControls;
const controlsSpecs = value5.controlsSpecs;
const value6 = (importDefault(15319) /* metro dependency 15319: useAnimatedKeyboardHeight */)();
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const value7 = env0_4.useMemo(function() {
return {channel: channel, type: 'channel'};
}, [channel]);
const guild_id = channel?.guild_id;
const useActivityShelfItemDataModule = require(15497) /* metro dependency 15497: useActivityShelfItemData */;
const useActivityShelfItemData = useActivityShelfItemDataModule.useActivityShelfItemData;
let r5 = channel?.guild_id ?? null;
const value9 = Reflect.apply(useActivityShelfItemData, useActivityShelfItemDataModule, [r5, applicationId]);
env0_4.useEffect(_fun118647, [guild_id]);
const property2 = env0_3((importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)([applicationId]),
1)[0];
const {gridOrientationLockState,
focusedOrientationLockState} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore],
function() {
var object = {};
var applicationIdBinding = applicationId;
object.gridOrientationLockState = EmbeddedActivitiesStore.getGridOrientationLockStateForApp(applicationIdBinding);
object.focusedOrientationLockState = EmbeddedActivitiesStore.getOrientationLockStateForApp(applicationIdBinding);
return object;
}, [applicationId]);
const value12 = (importDefault(10701) /* metro dependency 10701: useCurrentEmbeddedApplication */)();
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun118649);
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const ACTIVITY_TILE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ACTIVITY_TILE;
const analyticsLocations = defaultImport2(ACTIVITY_TILE).analyticsLocations;
const value14 = (require(8620) /* metro dependency 8620: analytics */).useAnalyticsContext();
let r2 = value12 != null && value12.id === property2?.id;
r2 = !r2 ? (value13 == null || value13.participants == null ? undefined : value13.participants.find(_fun118652)) != null : r2;
const value19 = env0_4.useCallback(_fun118653, [r2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure = function() {
var object = {};
object.visible = sharedVisible.get();
object.mode = mode.get();
return object;
};
closure.__closure = {sharedVisible: sharedVisible, mode: mode};
closure.__workletHash = 2072430391020;
closure.__initData = env0_18;
const closure2 = VoicePanelAnimatedActivityCardInnerQ;
closure2.__closure = {VoicePanelModes: VoicePanelModes, runOnJS: reanimatedRexportModule.runOnJS,
incrementActivityKey: value19};
closure2.__workletHash = 9732208421749;
closure2.__initData = env0_19;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const [property3, property4] = env0_3(env0_4.useState(false), 2);
const r39 = value13 != null ? (require(4610) /* metro dependency 4610: ChannelRTCParticipants */).getEmbeddedActivityParticipantId({applicationId: value13.applicationId,
instanceId: value13.compositeInstanceId}) : null;
const env0_20 = r39;
const moduleValue8 = reanimatedRexportModule;
useAnimatedReaction = moduleValue8.useAnimatedReaction;
closure = VoicePanelAnimatedActivityCardInnerUe;
object4 = {activityParticipantId: r39, focused: focused, mode: mode};
object4.VoicePanelModes = VoicePanelModes;
closure.__closure = object4;
closure.__workletHash = 2833167890519;
closure.__initData = env0_20;
const closure3 = VoicePanelAnimatedActivityCardInnerLe;
closure3.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setIsActivityFocused: property4};
closure3.__workletHash = 12291590020155;
closure3.__initData = env0_21;
Reflect.apply(useAnimatedReaction, moduleValue8, [closure, closure3]);
const value23 = env0_4.useMemo(function() {
var Gesture = require(dependencyMap[25]).Gesture;
return Gesture.Tap();
}, []);
const value24 = env0_4.useCallback(_fun118660, [layoutManager, applicationId]);
env0_4.useLayoutEffect(_fun118661, [value24, windowDimensions, gridOrientationLockState, r2]);
binding = env0_4;
useState = binding.useState;
const getDefaultTargetDimensions = layoutManager.getDefaultTargetDimensions;
const value26 = env0_3(Reflect.apply(useState, binding, [Reflect.apply(getDefaultTargetDimensions, layoutManager,
[])]), 2);
const property5 = value26[0];
const property6 = value26[1];
const env0_22 = property6;
const value27 = env0_4.useCallback(_fun118662, [layoutManager, property6]);
const env0_23 = value27;
const moduleValue9 = reanimatedRexportModule;
useAnimatedReaction = moduleValue9.useAnimatedReaction;
closure = function() {
return windowDimensions.get();
};
closure.__closure = {windowDimensions: windowDimensions};
closure.__workletHash = 12220613662042;
closure.__initData = env0_22;
const closure4 = VoicePanelAnimatedActivityCardInnerPe;
closure4.__closure = {runOnJS: reanimatedRexportModule.runOnJS, handleTargetAspectRatioParams: value24,
gridOrientationLockState: gridOrientationLockState, hasJoined: r2, updateNotJoinedActivityDimensions: value27};
closure4.__workletHash = 13125606009235;
closure4.__initData = env0_23;
Reflect.apply(useAnimatedReaction, moduleValue9, [closure, closure4]);
const isTabletActivitySurface = (require(10703) /* metro dependency 10703: getDefaultOrientationLockState */).getIsTabletActivitySurface();
const env0_24 = isTabletActivitySurface;
const backgroundColor = styles.activityContainerBackground.backgroundColor;
const moduleValue11 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue11.useAnimatedStyle;
closure = Ce;
closure.__closure = {IS_IOS: IS_IOS, animatedKeyboardHeight: value6, windowDimensions: windowDimensions,
isTabletActivitySurface: isTabletActivitySurface, focusedOrientationLockState: focusedOrientationLockState,
OrientationLockState: OrientationLockState, ACTIVITY_PORTRAIT_ASPECT_RATIO: ACTIVITY_PORTRAIT_ASPECT_RATIO,
isActivityFocused: property3, backgroundColor: backgroundColor};
closure.__workletHash = 13392050824169;
closure.__initData = env0_24;
const value29 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
const showActivitiesDebugOverlay = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelCallLifecycleStore],
function() {
return ChannelCallLifecycleStore.getShowActivitiesDebugOverlay();
});
const value30 = env0_4.useMemo(_fun118667, [controlsSpecs, property3, hideControls]);
if (channel == null) {
return null;
}
if (r2) {
object4 = {gesture: value30};
ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
object2 = {layout: layout};
r13 = property3 ? 'auto' : 'none';
object2.pointerEvents = r13;
object2.style = value29;
items2 = [((Component) => <Component channel={channel} layoutMode={property3 ? ActivityLayoutMode.FOCUSED : ActivityLayoutMode.GRID} key={property} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */)];
r13 = showActivitiesDebugOverlay ? ((Component) => <Component />)(importDefault(15498) /* metro dependency 15498: ActivitiesDebugOverlay */) : null;
items2[1] = r13;
r5 = <GestureDetector {...object4}><ReanimatedNativeView {...object2}>{items2}</ReanimatedNativeView></GestureDetector>;
} else {
r5 = value9 == null ? ((Component) => <Component activity={value13} application={property2} />)(importDefault(15499) /* metro dependency 15499: ActivityItemMissingCard */) : <GestureDetector gesture={value23}>{((Component) => <Component context={value7} guildId={channel.guild_id} activityItem={value9} locationObject={value14.location} itemDimensions={property5} disableBadges />)(importDefault(15503) /* metro dependency 15503: ActivityShelfItem */)}</GestureDetector>;
}
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{r5}
</AnalyticsLocationProvider>
);
}
function VoicePanelAnimatedActivityCard(a0) { // fn#118669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:8950, offset: 0x024e74b6, size: 89 bytes, params: 2, frame: 17
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
return (
<ThemeContextProvider theme={DARK}>
<VoicePanelAnimatedActivityCardInner {...a0} />
</ThemeContextProvider>
);
}
function _fun118647() { // fn#118647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:4294, offset: 0x024e6e10, size: 51 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */).fetchShelf({guildId: guild_id});
}
function _fun118649() { // fn#118649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:4674, offset: 0x024e6e7b, size: 92 bytes, params: 1, frame: 14
var environment;
var r0;
let value = environment.__proto__;
const getEmbeddedActivitiesForChannel = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel;
const value4 = Reflect.apply(getEmbeddedActivitiesForChannel, EmbeddedActivitiesStore, [channelId]).find(_fun118650);
if (value4 != null) {
r0 = value4;
} else {
value = EmbeddedActivitiesStore.getEmbeddedActivitiesForStartingChannel(channelId);
value = value.find(_fun118651);
r0 = value;
}
return r0;
}
function _fun118652(a0) { // fn#118652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5088, offset: 0x024e6f00, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(12711) /* metro dependency 12711: isActivityParticipantCurrentUserCurrentSession */).isActivityParticipantCurrentUserCurrentSession(a0);
}
function _fun118653() { // fn#118653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5171, offset: 0x024e6f29, size: 34 bytes, params: 1, frame: 11
if (env0_16) {
env0_2(function(a0) {
return typeof a0 === 'bigint' ? a0 + 1n : +a0 + 1;
});
}
}
function VoicePanelAnimatedActivityCardInnerQ({visible, mode}, a1) { // fn#118656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5357, owner: VoicePanelAnimatedActivityCardInner.Q, offset: 0x024e6f7d, size: 157 bytes, params: 3, frame: 14
let value = visible === 1;
let r0 = value && a1 != null && a1.visible === 0;
if (!r0) {
value = environment.__proto__;
r0 = mode !== VoicePanelModes.PIP && a1?.mode === VoicePanelModes.PIP;
}
if (r0) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_17)();
}
}
function VoicePanelAnimatedActivityCardInnerUe() { // fn#118657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:5837, owner: VoicePanelAnimatedActivityCardInner.ue, offset: 0x024e701a, size: 86 bytes, params: 1, frame: 12
var value6;
var value;
let r0 = env0_20 != null && focused.get()?.id === env0_20;
if (r0) {
value = mode.get();
value6 = environment.__proto__;
value = value === VoicePanelModes.PANEL;
r0 = value;
}
return r0;
}
function VoicePanelAnimatedActivityCardInnerLe(a0, a1) { // fn#118658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6056, owner: VoicePanelAnimatedActivityCardInner.le, offset: 0x024e7070, 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_19)(a0);
}
}
function _fun118660(a0, a1, a2) { // fn#118660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6286, offset: 0x024e70d8, size: 195 bytes, params: 4, frame: 14
var value;
var layoutManagerBinding;
if (a2) {
value = environment.__proto__;
if (OrientationLockState.LANDSCAPE === a1) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, 'landscape');
} else if (OrientationLockState.PORTRAIT === a1) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, 'portrait');
} else if (OrientationLockState.UNLOCKED === a1) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, a0 ? 'landscape' : 'portrait');
} else if (a1 === null) {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, a0 ? 'landscape' : 'portrait');
}
} else {
layoutManagerBinding = layoutManager;
layoutManagerBinding.setTargetAspectRatio(applicationId, 'square');
}
}
function _fun118661() { // fn#118661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6576, offset: 0x024e719b, size: 73 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
value = value.getWindowDimensions();
value = value.width > value.height;
env0_21(value, gridOrientationLockState, env0_16);
}
function _fun118662() { // fn#118662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6768, offset: 0x024e71e4, size: 30 bytes, params: 1, frame: 11
env0_22(layoutManager.getDefaultTargetDimensions());
}
function VoicePanelAnimatedActivityCardInnerPe(a0, a1) { // fn#118664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:6952, owner: VoicePanelAnimatedActivityCardInner.pe, offset: 0x024e7202, size: 142 bytes, params: 3, frame: 16
var value2;
const landscape2 = a0.landscape;
const value = undefined;
if (landscape2 !== (a1 == null ? value : a1.landscape)) {
value2 = environment.__proto__;
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_21)(a0.landscape,
gridOrientationLockState, env0_16);
}
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
reanimatedRexportModule.runOnJS(env0_23)();
return value;
}
function Ce() { // fn#118665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:7406, owner: VoicePanelAnimatedActivityCardInner.Ce, offset: 0x024e7290, size: 283 bytes, params: 1, frame: 18
var r5;
let value = environment.__proto__;
const value2 = 0;
const r3 = IS_IOS ? env0_10.get() : value2;
const windowDimensionsBinding = windowDimensions;
let get = windowDimensionsBinding.get;
const landscape = Reflect.apply(get, windowDimensionsBinding, []).landscape;
get = windowDimensionsBinding.get;
const width = Reflect.apply(get, windowDimensionsBinding, []).width;
get = windowDimensionsBinding.get;
const height = Reflect.apply(get, windowDimensionsBinding, []).height;
let r1 = env0_24 && focusedOrientationLockState === OrientationLockState.LANDSCAPE && !landscape;
if (r1) {
value = (height - width * ACTIVITY_PORTRAIT_ASPECT_RATIO) / 2;
r1 = value2;
r5 = value;
} else if (env0_24 && focusedOrientationLockState === OrientationLockState.PORTRAIT && landscape) {
r1 = (width - height * ACTIVITY_PORTRAIT_ASPECT_RATIO) / 2;
r5 = value2;
} else {
r1 = value2;
r5 = value2;
}
value = 'auto';
return {flex: env0_18 ? value2 : 1, backgroundColor: backgroundColor, paddingVertical: r5, paddingHorizontal: r1,
width: env0_18 ? width : value, height: env0_18 ? height - r3 : value, maxHeight: '100%', maxWidth: '100%'};
}
function _fun118667() { // fn#118667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:8092, offset: 0x024e73ab, size: 162 bytes, params: 1, frame: 18
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value4 = Gesture.Manual().enabled(env0_18);
const onTouchesDown = value4.onTouchesDown;
const closure = t_118668;
const object2 = {};
object2.controlsSpecs = controlsSpecs;
object2.VoicePanelControlsModes = VoicePanelControlsModes;
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.hideControls = hideControls;
closure.__closure = object2;
closure.__workletHash = 14924492513532;
closure.__initData = env1_25;
return Reflect.apply(onTouchesDown, value4, [closure]);
}
function _fun118650({applicationId}) { // fn#118650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:4744, offset: 0x024e6ed7, size: 41 bytes, params: 2, frame: 4
return applicationId === env1_13?.id;
}
function t_118668(a0, a1) { // fn#118668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15693:8160, offset: 0x024e744d, size: 105 bytes, params: 3, frame: 12
var moduleValue;
a1.fail();
const value = environment.__proto__;
const controlsSpecsBinding = controlsSpecs;
const get = controlsSpecsBinding.get;
const mode = Reflect.apply(get, controlsSpecsBinding, []).mode;
const HIDDEN = VoicePanelControlsModes.HIDDEN;
if (mode !== HIDDEN) {
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(hideControls)({debounce: true});
}
}
@@ -0,0 +1,104 @@
/* Metro module 15494; source: modules/voice_panel/native/card/VoicePanelCTACardCallerDisconnected.tsx; dependencies: [57, 31, 1226, 1379, 1878, 33, 4501, 697, 11794, 566, 4617, 6821, 5475, 4573, 1244, 2] */
function _fun118635(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15691:6, offset: 0x024e58e0, size: 445 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const getSourceFromURI = function(a0) {
var value = a0;
return typeof value === 'number' ? value : {uri: value};
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_8 = value2.jsx;
const env0_9 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const VOICE_VIDEO_VIDEO_TILE_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.VOICE_VIDEO_VIDEO_TILE_BACKGROUND;
object2.container = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center',
backgroundColor: VOICE_VIDEO_VIDEO_TILE_BACKGROUND};
object2.avatarContainer = {'flexDirection': 'row', 'gap': 24};
const object4 = {'width': 80, 'height': 80, 'borderRadius': null, 'overflow': 'hidden'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.avatarWrapper = object4;
object2.avatar = {'width': 80, 'height': 80};
object2.disconnectedAvatar = {opacity: 0.2};
object2.textContainer = {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'padding': 16, 'width': '100%'};
object2.text = {textAlign: 'center'};
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.memo(VoicePanelCTACardCallerDisconnected);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelCTACardCallerDisconnected.tsx');
exports.default = value;
}
function VoicePanelCTACardCallerDisconnected() { // fn#118637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15691:726, offset: 0x024e5ab9, size: 819 bytes, params: 1, frame: 31
var r8;
var NativeView;
var FastImage;
let binding = env0_4;
const useContext = binding.useContext;
const value2 = undefined;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const styles = useStyles();
const channel = ChannelStore.getChannel(channelId);
const r2 = (channel == null ? value2 : channel.recipients) ?? [];
binding = env0_3;
let property = binding(r2, 1)[0];
const id = AuthenticationStore.getId();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value7 = binding(Reflect.apply(useStateFromStoresArray, fluxModule, [[UserStore], _fun118638, [channelId, id,
property]]), 3);
property = value7[0];
const property2 = value7[1];
const property3 = value7[2];
const NativeView2 = importDefault(6821) /* metro dependency 6821: NativeView */;
const defaultImport2 = NativeView2;
const items2 = [property != null && <NativeView2 style={styles.avatarWrapper}>{((Component) => <Component source={getSourceFromURI(property)} style={styles.avatar} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</NativeView2>];
const value10 = property2 != null;
if (value10) {
NativeView = NativeView2;
var defaultImport5Props = {style: styles.avatarWrapper};
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
r8 = <NativeView {...defaultImport5Props}><FastImage source={getSourceFromURI(property2)} style={[styles.avatar,
styles.disconnectedAvatar]} /></NativeView>;
} else {
r8 = value10;
}
items2[1] = r8;
const defaultImport22 = ((Component) => <Component style={styles.avatarContainer}>{items2}</Component>)(defaultImport2);
const defaultImport7 = NativeView2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WkAgPU = (require(1244) /* metro dependency 1244: indexNative */).t.WkAgPU;
return (
<NativeView2 style={styles.container}>
{defaultImport22}
{((Component) => <Component style={styles.textContainer}><Text style={styles.text} variant="heading-sm/semibold" color="always-white">{Reflect.apply(string,
intl,
[WkAgPU])}</Text>{property3 != null && <Text style={styles.text} variant="text-xs/medium" color="always-white">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.kXrAqz,
{username: property3})}</Text>}</Component>)(defaultImport7)}
</NativeView2>
);
}
function _fun118638() { // fn#118638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15691:947, offset: 0x024e5dec, size: 147 bytes, params: 1, frame: 19
let value = environment.__proto__;
const user = UserStore.getUser(env0_2);
const user2 = UserStore.getUser(env0_1);
const value5 = undefined;
const items2 = [user == null ? value5 : user.getAvatarURL(value5, 80)];
items2[1] = user2 == null ? value5 : user2.getAvatarURL(value5, 80);
value = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
const getName = value.getName;
items2[2] = Reflect.apply(getName, value, [value5, channelId, user2]);
return items2;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,22 @@
/* Metro module 11798; source: modules/voice_panel/native/card/VoicePanelCardConstants.tsx; dependencies: [697, 2] */
function _fun90382(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11984:6, offset: 0x020371cd, size: 187 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelCardConstants.tsx');
exports.CARD_SIZE = 165;
exports.CALL_TILE_GUTTER = 12;
exports.EDGE_GUTTER = 12;
exports.getCallTileGutter = getCallTileGutter;
exports.getEdgeGutter = getEdgeGutter;
exports.CARD_BACKGROUND_OPACITY_ANDROID = 0.32;
exports.VOICE_PANEL_CONTROLS_OPACITY_ANDROID = 0.54;
exports.VOICE_PANEL_CARD_INNER_PADDING = 8;
}
function getCallTileGutter() { // fn#90383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11984:260, offset: 0x02037288, size: 72 bytes, params: 1, frame: 13
const value = a0;
const r3 = value !== undefined ? value : [];
const VOICE_PANEL_GUTTER = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_GUTTER;
return VOICE_PANEL_GUTTER.resolve({enabledExperiments: r3});
}
@@ -0,0 +1,697 @@
/* Metro module 15505; source: modules/voice_panel/native/card/VoicePanelCardFloatingControls.tsx; dependencies: [31, 27, 4502, 1378, 4492, 4294, 11795, 11793, 11798, 661, 4299, 33, 4017, 1305, 4501, 697, 1357, 11794, 15460, 15506, 10890, 15507, 15458, 10273, 9244, 6821, 7684, 1244, 9245, 4577, 15456, 8913, 4285, 8092, 15388, 15508, 15509, 566, 15492, 8141, 15510, 3868, 4559, 6771, 8743, 9256, 4635, 8699, 4573, 9299, 9322, 15433, 2] */
function _fun118699(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:6, offset: 0x024e8f12, size: 890 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 value2 = require(27) /* metro dependency 27 */;
value2.Platform;
const Pressable = value2.Pressable;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const env0_9 = voicePanelConstantsModule.MODE_CHANGE_PHYSICS;
const env0_10 = voicePanelConstantsModule.VoicePanelModes;
const env0_11 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
const env0_12 = (require(11798) /* metro dependency 11798: VoicePanelCardConstants */).VOICE_PANEL_CARD_INNER_PADDING;
const env0_13 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const callConstantsModule = require(4299) /* metro dependency 4299: CallConstants */;
const env0_14 = callConstantsModule.ParticipantTypes;
const env0_15 = callConstantsModule.VoicePlatforms;
const value5 = require(33) /* metro dependency 33 */;
const env0_16 = value5.jsx;
const env0_17 = value5.jsxs;
const env0_18 = value5.Fragment;
const reanimatedRexport = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
const createAnimatedComponent = reanimatedRexport.createAnimatedComponent;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const env0_19 = Reflect.apply(createAnimatedComponent, reanimatedRexport, [Icon]);
const env0_20 = reanimatedRexport.createAnimatedComponent(Pressable);
const env0_21 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun118706);
object = {code: 'function VoicePanelCardFloatingControlsTsx1(){const{controlsSpecs,VoicePanelControlsModes,GAP}=this.__closure;const hidden=controlsSpecs.get().mode===VoicePanelControlsModes.HIDDEN;return{marginLeft:hidden?2:GAP,marginRight:hidden?2:0};}'};
object = {code: "function VoicePanelCardFloatingControlsTsx2(){const{controlsHidden,FLOATING_BAR_HEIGHT,VOICE_PANEL_CARD_INNER_PADDING,withSpring,MODE_CHANGE_PHYSICS}=this.__closure;const hidden=controlsHidden.get();return{position:'absolute',top:hidden?-(FLOATING_BAR_HEIGHT+VOICE_PANEL_CARD_INNER_PADDING*2):VOICE_PANEL_CARD_INNER_PADDING,left:VOICE_PANEL_CARD_INNER_PADDING,opacity:withSpring(hidden?0:1,MODE_CHANGE_PHYSICS),zIndex:1};}"};
const env0_24 = value.memo(_fun118707);
object = {code: "function VoicePanelCardFloatingControlsTsx3(){const{controlsHidden,mode,VoicePanelModes,FLOATING_BAR_HEIGHT,VOICE_PANEL_CARD_INNER_PADDING,withSpring,MODE_CHANGE_PHYSICS}=this.__closure;const hidden=controlsHidden.get()||mode.get()===VoicePanelModes.PIP;return{position:'absolute',top:hidden?-(FLOATING_BAR_HEIGHT+VOICE_PANEL_CARD_INNER_PADDING*2):VOICE_PANEL_CARD_INNER_PADDING,right:VOICE_PANEL_CARD_INNER_PADDING,opacity:withSpring(hidden?0:1,MODE_CHANGE_PHYSICS),zIndex:1};}"};
const env0_26 = value.memo(_fun118711);
const env0_27 = {'mass': 0.1, 'stiffness': 400, 'overshootClamping': true};
object = {code: 'function VoicePanelCardFloatingControlsTsx4(){const{flip}=this.__closure;return flip.get();}'};
object = {code: "function VoicePanelCardFloatingControlsTsx5(flipped){const{angle,withSpring,getRandomNumberInRange,RING_PHYSICS,flip}=this.__closure;if(flipped){angle.set(withSpring(getRandomNumberInRange(45-10,45+10),RING_PHYSICS,'respect-motion-settings',function(finished){if(!finished)return;flip.set(!flip.get());}));}else{angle.set(withSpring(getRandomNumberInRange(0-10,0+10),RING_PHYSICS,'respect-motion-settings',function(finished){if(!finished)return;flip.set(!flip.get());}));}}"};
object = {code: 'function VoicePanelCardFloatingControlsTsx6(finished){const{flip}=this.__closure;if(!finished)return;flip.set(!flip.get());}'};
object = {code: 'function VoicePanelCardFloatingControlsTsx7(finished){const{flip}=this.__closure;if(!finished)return;flip.set(!flip.get());}'};
object = {code: 'function VoicePanelCardFloatingControlsTsx8(){const{controlsHidden,FLOATING_BAR_HEIGHT,VOICE_PANEL_CARD_INNER_PADDING}=this.__closure;return{top:controlsHidden.get()?-(FLOATING_BAR_HEIGHT+VOICE_PANEL_CARD_INNER_PADDING*2):0};}'};
object = {code: 'function VoicePanelCardFloatingControlsTsx9(){const{angle}=this.__closure;return{transform:[{rotate:angle.get()+"deg"}]};}'};
const env0_34 = value.memo(_fun118714);
const env0_35 = value.memo(_fun118722);
object = {code: 'function VoicePanelCardFloatingControlsTsx10(){const{hasHiddenVisibleIcon,focused,connected,mode,VoicePanelModes,controlsHidden}=this.__closure;const showIcon=hasHiddenVisibleIcon&&focused.get()==null;return!connected.get()||mode.get()===VoicePanelModes.PIP||!showIcon&&controlsHidden.get();}'};
object = {code: 'function VoicePanelCardFloatingControlsTsx11(){const{isPillHidden}=this.__closure;return isPillHidden.get();}'};
object = {code: 'function VoicePanelCardFloatingControlsTsx12(hidden){const{pillOpacity,withSpring,MODE_CHANGE_PHYSICS}=this.__closure;pillOpacity.set(withSpring(hidden?0:1,MODE_CHANGE_PHYSICS));}'};
object = {code: "function VoicePanelCardFloatingControlsTsx13(){const{pillOpacity,isPillHidden,FLOATING_BAR_HEIGHT,VOICE_PANEL_CARD_INNER_PADDING}=this.__closure;return{opacity:pillOpacity.get(),top:isPillHidden.get()?FLOATING_BAR_HEIGHT+VOICE_PANEL_CARD_INNER_PADDING:0,height:FLOATING_BAR_HEIGHT,pointerEvents:isPillHidden.get()?'none':'auto'};}"};
object = {code: "function VoicePanelCardFloatingControlsTsx14(){const{connected,isScreenReaderEnabled,controlsSpecs,VoicePanelControlsModes,hasIcon,GAP}=this.__closure;const hidden=!connected.get()||!isScreenReaderEnabled&&controlsSpecs.get().mode===VoicePanelControlsModes.HIDDEN&&hasIcon;const shouldCollapseWidth=hidden&&hasIcon;return{width:shouldCollapseWidth?0:'auto',marginRight:hidden?-GAP:0};}"};
const env0_41 = value.memo(_fun118723);
object = {code: 'function VoicePanelCardFloatingControlsTsx15(){const{controlsSpecs,VoicePanelControlsModes,focused,mode,VoicePanelModes}=this.__closure;return controlsSpecs.get().mode===VoicePanelControlsModes.HIDDEN||focused.get()!=null||mode.get()===VoicePanelModes.PIP;}'};
value = value.memo(FloatingControls);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelCardFloatingControls.tsx');
exports.default = value;
}
function StreamIcon({voicePlatform}) { // fn#118700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:2008, offset: 0x024e928c, size: 345 bytes, params: 2, frame: 20
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('VoicePanelCardFloatingControls'));
const binding = env0_3;
const useContext = binding.useContext;
const controlsSpecs = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).controlsSpecs;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = StreamIconO;
closure.__closure = {controlsSpecs: controlsSpecs, VoicePanelControlsModes: VoicePanelControlsModes, GAP: 4};
closure.__workletHash = 3270040588948;
closure.__initData = env0_22;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const defaultImport2 = importDefault(15460) /* metro dependency 15460 */;
const XBOX = VoicePlatforms.XBOX;
return ((Component) => <Component source={voicePlatform === XBOX ? importDefault(15506) /* metro dependency 15506 */ : voicePlatform === VoicePlatforms.MOBILE ? importDefault(10890) /* metro dependency 10890 */ : voicePlatform !== VoicePlatforms.QUEST ? defaultImport2 : importDefault(15507) /* metro dependency 15507 */} style={[styles.iconWithoutBackground,
value3]} />)(env0_19);
}
function AnimatedLabelIcon({icon}) { // fn#118702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:2511, offset: 0x024e942a, size: 723 bytes, params: 2, frame: 23
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('VoicePanelCardFloatingControls'));
const type = icon.type;
const VoicePanelCardUserStateIconType = (require(15458) /* metro dependency 15458: useVoicePanelCardUserStateIcons */).VoicePanelCardUserStateIconType;
const STREAM_ICON = VoicePanelCardUserStateIconType.STREAM_ICON;
if (STREAM_ICON === type) {
return <StreamIcon voicePlatform={icon.voicePlatform} />;
}
const SPEAKER_MUTE_ICON = VoicePanelCardUserStateIconType.SPEAKER_MUTE_ICON;
if (SPEAKER_MUTE_ICON === type) {
return (
<Pressable
style={styles.speakerMuteIcon}
hitSlop={12}
onPress={icon.onPress}
>
{((VoiceXIcon) => <VoiceXIcon style={styles.iconWithoutBackground} />)((require(10273) /* metro dependency 10273: VoiceXIcon */).VoiceXIcon)}
</Pressable>
);
}
const USER_VIDEO_ICON = VoicePanelCardUserStateIconType.USER_VIDEO_ICON;
if (USER_VIDEO_ICON === type) {
return (
<Pressable style={styles.iconContainer} onPress={icon.onPress}>
{((VideoIcon) => <VideoIcon style={styles.icon} state={icon.videoIconState} />)((require(9244) /* metro dependency 9244: VoiceStateIcons */).VideoIcon)}
</Pressable>
);
}
const MUTE_DEAFEN_ICON = VoicePanelCardUserStateIconType.MUTE_DEAFEN_ICON;
if (MUTE_DEAFEN_ICON === type) {
return ((Component) => <Component style={styles.iconContainer}><Pressable onPress={icon.onPress} hitSlop={12}>{((MuteDeafenIcon) => <MuteDeafenIcon style={styles.icon} state={icon.muteDeafenIconState} alwaysWhite />)((require(9244) /* metro dependency 9244: VoiceStateIcons */).MuteDeafenIcon)}</Pressable></Component>)(importDefault(6821) /* metro dependency 6821: NativeView */);
}
const USER_DISCONNECTED_ICON = VoicePanelCardUserStateIconType.USER_DISCONNECTED_ICON;
if (USER_DISCONNECTED_ICON === type) {
return (
<Pressable style={styles.iconContainer} onPress={icon.onPress}>
{((CircleErrorIcon) => <CircleErrorIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_WARNING} />)((require(7684) /* metro dependency 7684: CircleErrorIcon */).CircleErrorIcon)}
</Pressable>
);
}
}
function getAccessibilityLabel_118703(a0, a1) { // fn#118703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:3572, offset: 0x024e96fd, size: 343 bytes, params: 3, frame: 17
var muteDeafenIconState;
const MuteDeafenIconState = (require(9245) /* metro dependency 9245: VoiceStateIconUtils */).MuteDeafenIconState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
if (a0.find(function({type}) {
return type === require(dependencyMap[22]).VoicePanelCardUserStateIconType.STREAM_ICON;
}) != null) {
return intl.formatToPlainString(t.I0mOAs, {username: a1});
}
value = a0.find(function({type}) {
return type === require(dependencyMap[22]).VoicePanelCardUserStateIconType.MUTE_DEAFEN_ICON;
});
if (value != null) {
muteDeafenIconState = value.muteDeafenIconState;
if (MuteDeafenIconState.DEAFENED === muteDeafenIconState) {
return intl.formatToPlainString(t['9hDjai'], {username: a1});
}
if (MuteDeafenIconState.DEAFENED_SERVER === muteDeafenIconState) {
return intl.formatToPlainString(t['9hDjai'], {username: a1});
}
return intl.formatToPlainString(t.Hd1oVG, {username: a1});
}
return a1;
}
function _fun118706(a0) { // fn#118706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:543, offset: 0x024e98ba, size: 450 bytes, params: 2, frame: 16
const object3 = {labelPositionContainer: {'position': 'absolute', 'left': 8, 'right': 8, 'bottom': 8,
'justifyContent': 'center', 'alignItems': 'center', 'marginHorizontal': 8}};
const object4 = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'flex-start', 'alignItems': 'center',
'borderRadius': null, 'overflow': 'hidden', 'paddingHorizontal': 8, 'backgroundColor': null, 'height': 28,
'gap': 4};
const radii = (importDefault(697) /* metro dependency 697: native */).radii;
object4.borderRadius = a0 ? radii.sm : radii.round;
const CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object4.backgroundColor = CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
object3.labelOuterContainer = object4;
object3.initialIcons = {'display': 'flex', 'flexDirection': 'row', 'marginStart': -4, 'marginEnd': -4};
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.icon = {'width': 12, 'height': 12, tintColor: WHITE};
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.iconWithoutBackground = {'width': 16, 'height': 16, tintColor: WHITE};
const object6 = {'width': 20, 'height': 20, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.iconContainer = object6;
object3.speakerMuteIcon = {marginRight: 4};
object3.floatingContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4, 'overflow': 'hidden',
'flexShrink': 1};
object3.floatingText = {'overflow': 'hidden', 'paddingStart': 4, 'paddingEnd': 4, 'flexShrink': 1, 'lineHeight': 14};
const object8 = {'position': 'absolute', 'top': 8, 'right': 8, 'padding': 6};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object8.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.ringingIconContainer = object8;
const STATUS_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE;
object3.ringingIcon = {tintColor: STATUS_POSITIVE};
object3.secureFramesIcon = {marginEnd: -2};
return object3;
}
function _fun118707({participant, controlsHidden, isSelf, layout}) { // fn#118707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:4611, offset: 0x024e9a7c, size: 303 bytes, params: 2, frame: 22
var object2;
const binding = env0_3;
const useContext = binding.useContext;
const guildId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).guildId;
const value2 = useTopLeftButtonStyles(controlsHidden);
const value3 = env0_3.useCallback(_fun118710, [guildId, participant]);
const VoicePanelIconButton = importDefault(15388) /* metro dependency 15388: VoicePanelIconButton */;
object2 = {icon: importDefault(15508) /* metro dependency 15508 */, onPress: value3, style: value2, layout: layout};
const isStableActivityParticipant2 = (require(15456) /* metro dependency 15456: useStableParticipant */).isStableActivityParticipant(participant);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.accessibilityLabel = isStableActivityParticipant2 ? Reflect.apply(string, intl,
[t['R/FK4A']]) : isSelf ? Reflect.apply(string, intl, [t.S5anIc]) : Reflect.apply(string, intl, [t.q3O3J8]);
return <VoicePanelIconButton {...object2} />;
}
function _fun118711({participantId, controlsHidden, targetName, isActivityParticipant, layout}) { // fn#118711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:6204, offset: 0x024e9dbe, size: 529 bytes, params: 2, frame: 23
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const {setFocused,
mode} = env0_3.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
var env0_3 = mode;
const value3 = env0_3.useCallback(function() {
setFocused(participantId);
}, [setFocused, participantId]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = __118713;
object2 = {controlsHidden: controlsHidden, mode: mode};
object2.VoicePanelModes = VoicePanelModes;
object2.FLOATING_BAR_HEIGHT = 28;
object2.VOICE_PANEL_CARD_INNER_PADDING = VOICE_PANEL_CARD_INNER_PADDING;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 12421495364262;
closure.__initData = env0_25;
return ((Component) => <Component icon={importDefault(15509) /* metro dependency 15509 */} onPress={value3} style={Reflect.apply(useAnimatedStyle,
reanimatedRexportModule,
[closure])} layout={layout} accessibilityLabel={isActivityParticipant ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3ejJer']) : targetName != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.OervdV,
{targetName: targetName}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['77cRN4'])} />)(importDefault(15388) /* metro dependency 15388: VoicePanelIconButton */);
}
function _fun118714({controlsHidden}) { // fn#118714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:8314, offset: 0x024ea071, size: 670 bytes, params: 2, frame: 27
var object2;
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('VoicePanelCardFloatingControls'));
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(true);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
let closure = o_118716;
closure.__closure = {flip: value3};
closure.__workletHash = 7663309832237;
closure.__initData = env0_28;
const closure2 = n_118717;
object2 = {angle: value4};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.getRandomNumberInRange = importDefault(15492) /* metro dependency 15492: getRandomNumberInRange */;
object2.RING_PHYSICS = env0_27;
object2.flip = value3;
closure2.__closure = object2;
closure2.__workletHash = 15646860695268;
closure2.__initData = env0_29;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
const moduleValue5 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue5.useAnimatedStyle;
closure = p_118720;
closure.__closure = {controlsHidden: controlsHidden, FLOATING_BAR_HEIGHT: 28,
VOICE_PANEL_CARD_INNER_PADDING: VOICE_PANEL_CARD_INNER_PADDING};
closure.__workletHash = 726627995932;
closure.__initData = env0_32;
const value5 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
const moduleValue6 = reanimatedRexportModule;
useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = C_118721;
closure.__closure = {angle: value4};
closure.__workletHash = 791392364030;
closure.__initData = env0_33;
const value6 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const items2 = [value5];
items2[1] = styles.ringingIconContainer;
const defaultImport3 = ReanimatedNativeView;
const r7 = !useReducedMotion && value6;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(15510) /* metro dependency 15510 */};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const SMALL_20 = IconSizes.SMALL_20;
iconProps.size = SMALL_20;
iconProps.style = styles.ringingIcon;
return (
<ReanimatedNativeView style={items2}>
{((Component) => <Component style={r7} pointerEvents="none"><Icon {...iconProps} /></Component>)(defaultImport3)}
</ReanimatedNativeView>
);
}
function _fun118722({controlsHidden}) { // fn#118722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:9740, offset: 0x024ea4a6, size: 93 bytes, params: 2, frame: 17
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const LIGHT = ThemeTypes.LIGHT;
return (
<ThemeContextProvider theme={LIGHT}>
{((Component) => <Component controlsHidden={controlsHidden} />)(env0_34)}
</ThemeContextProvider>
);
}
function _fun118723({controlsHidden, label, layout, participant}) { // fn#118723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:11226, offset: 0x024ea503, size: 1616 bytes, params: 2, frame: 39
var r12;
var ShieldLockIcon;
var intl;
let binding = env0_3;
const value3 = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const guildId = value3.guildId;
const channelId = value3.channelId;
const controlsSpecs = value3.controlsSpecs;
const focused = value3.focused;
var env0_3 = focused;
const connected = value3.connected;
const mode = value3.mode;
const value4 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
const styles = useStyles((importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('VoicePanelCardFloatingControls'));
const useStableParticipantModule = require(15456) /* metro dependency 15456: useStableParticipant */;
const id = useStableParticipantModule.isStableParticipantWithUser(participant) ? participant.user.id : undefined;
const value6 = env0_3.useCallback(_fun118724, [id, channelId,
(importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations]);
const value7 = (require(9256) /* metro dependency 9256: useIsSecureFramesVerified */).useIsUserSecureFramesVerified({userId: id,
channelId: channelId});
const defaultImport2 = importDefault(15458) /* metro dependency 15458: useVoicePanelCardUserStateIcons */;
let type = participant.type;
const moduleValue4 = useStableParticipantModule;
const value8 = defaultImport2(type,
moduleValue4.isStableParticipantWithUser(participant) ? participant.user.id : undefined, guildId, channelId);
const value10 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: id,
guildId: guildId})});
const value12 = value8.length >= 1;
const value13 = value8.filter(function({type}) {
return type !== require(dependencyMap[22]).VoicePanelCardUserStateIconType.STREAM_ICON;
}).length >= 1;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = c_118726;
closure.__closure = {hasHiddenVisibleIcon: value13, focused: focused, connected: connected, mode: mode,
VoicePanelModes: VoicePanelModes, controlsHidden: controlsHidden};
closure.__workletHash = 14354852732719;
closure.__initData = env0_36;
const value14 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue7 = reanimatedRexportModule;
const useSharedValue = moduleValue7.useSharedValue;
const get = value14.get;
const value16 = Reflect.apply(useSharedValue, moduleValue7, [Reflect.apply(get, value14, []) ? 0 : 1]);
const moduleValue8 = reanimatedRexportModule;
const useAnimatedReaction = moduleValue8.useAnimatedReaction;
closure = u_118727;
closure.__closure = {isPillHidden: value14};
closure.__workletHash = 653298163833;
closure.__initData = env0_37;
const closure2 = __118728;
object = {pillOpacity: value16};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
closure2.__closure = object;
closure2.__workletHash = 158794425133;
closure2.__initData = env0_38;
Reflect.apply(useAnimatedReaction, moduleValue8, [closure, closure2]);
const moduleValue9 = reanimatedRexportModule;
let useAnimatedStyle = moduleValue9.useAnimatedStyle;
closure = Q_118729;
closure.__closure = {pillOpacity: value16, isPillHidden: value14, FLOATING_BAR_HEIGHT: 28,
VOICE_PANEL_CARD_INNER_PADDING: VOICE_PANEL_CARD_INNER_PADDING};
closure.__workletHash = 12355778282621;
closure.__initData = env0_39;
const value17 = Reflect.apply(useAnimatedStyle, moduleValue9, [closure]);
const moduleValue10 = reanimatedRexportModule;
useAnimatedStyle = moduleValue10.useAnimatedStyle;
closure = $_118730;
closure.__closure = {connected: connected, isScreenReaderEnabled: value4, controlsSpecs: controlsSpecs,
VoicePanelControlsModes: VoicePanelControlsModes, hasIcon: value12, GAP: 4};
closure.__workletHash = 10013340978870;
closure.__initData = env0_40;
const value18 = Reflect.apply(useAnimatedStyle, moduleValue10, [closure]);
object = [styles.labelPositionContainer];
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
binding = env0_20;
const r7 = id != null ? value6 : undefined;
const items2 = [styles.labelOuterContainer, value17];
const r9 = value8.length > 0 && ((Component) => <Component style={styles.initialIcons}>{value8.map(_fun118731)}</Component>)(importDefault(6821) /* metro dependency 6821: NativeView */);
const defaultImport6 = ReanimatedNativeView;
const items3 = [styles.floatingContainer, value18];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="heading-sm/semibold" color="always-white" lineClamp={1} style={[styles.floatingText,
value10 != null && ({fontFamily: value10})]} ellipsizeMode="tail" accessibilityLabel={getAccessibilityLabel_118703(value8,
label)}>{label}</Text>;
type = participant.type;
const USER = ParticipantTypes.USER;
const r14 = type === USER && ((Component) => <Component userId={participant.user.id} textColor="always-white" />)(importDefault(9299) /* metro dependency 9299: GuildTag */);
if (value7) {
ShieldLockIcon = (require(9322) /* metro dependency 9322: ShieldLockIcon */).ShieldLockIcon;
var shieldLockIconProps = {style: styles.secureFramesIcon, size: 'xs'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
shieldLockIconProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mR9cf3);
r12 = <ShieldLockIcon {...shieldLockIconProps} />;
} else {
r12 = value7;
}
return (
<ReanimatedNativeView
style={object}
layout={layout}
pointerEvents="box-none"
>
{((Component) => <Component onPress={r7} style={items2} layout={layout}>{r9}{((Component) => <Component style={items3} layout={layout}>{text}{r14}{r12}</Component>)(defaultImport6)}</Component>)(binding)}
</ReanimatedNativeView>
);
}
function FloatingControls({label, participant, isRinging, layout}) { // fn#118732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:14258, offset: 0x024ead85, size: 619 bytes, params: 2, frame: 31
var value;
let binding = env0_3;
const {guildId, channelId, controlsSpecs, focused,
mode} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], function() {
return RTCConnectionStore.isConnected();
});
const isStableParticipantWithUser2 = (require(15456) /* metro dependency 15456: useStableParticipant */).isStableParticipantWithUser(participant);
const r18 = isStableParticipantWithUser2 ? participant.isSelf : !!isStableParticipantWithUser2;
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore,
ApplicationStreamingStore], _fun118734);
const value6 = (importDefault(15433) /* metro dependency 15433: useIsVoicePanelParticipantFocusable */)(guildId,
channelId, participant.id);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
const closure = FloatingControlsI;
closure.__closure = {controlsSpecs: controlsSpecs, VoicePanelControlsModes: VoicePanelControlsModes,
focused: focused, mode: mode, VoicePanelModes: VoicePanelModes};
closure.__workletHash = 8765031976276;
closure.__initData = env0_42;
const value7 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const r5 = label != null && ((Component) => <Component controlsHidden={value7} label={label} layout={layout} participant={participant} />)(env0_41);
const jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
const items2 = [isRinging && ((Component) => <Component controlsHidden={value7} />)(env0_35)];
items2[1] = value3 && value5 && ((Component) => <Component controlsHidden={value7} participant={participant} isSelf={r18} layout={layout} />)(env0_24);
let r6 = value3 && value6;
if (r6) {
binding = env0_26;
var bindingProps = {controlsHidden: value7, participantId: participant.id, targetName: label};
value = require(15456) /* metro dependency 15456: useStableParticipant */;
bindingProps.isActivityParticipant = value.isStableActivityParticipant(participant);
bindingProps.layout = layout;
value = ((Component) => <Component {...bindingProps} />)(binding);
r6 = value;
}
items2[2] = r6;
items2[3] = r5;
return (
<>
{items2}
</>
);
}
function StreamIconO() { // fn#118701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:2176, owner: StreamIcon.o, offset: 0x024e93e5, size: 69 bytes, params: 1, frame: 11
const controlsSpecsBinding = controlsSpecs;
const get = controlsSpecsBinding.get;
const mode = Reflect.apply(get, controlsSpecsBinding, []).mode;
let value = environment.__proto__;
const HIDDEN = VoicePanelControlsModes.HIDDEN;
value = mode === HIDDEN;
return {marginLeft: value ? 2 : 4, marginRight: value ? 2 : 0};
}
function useTopLeftButtonStyles(a0) { // fn#118708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:4711, offset: 0x024e9bab, size: 140 bytes, params: 2, frame: 17
const env0_0 = a0;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useTopLeftButtonStylesN;
const object2 = {controlsHidden: a0, FLOATING_BAR_HEIGHT: 28};
object2.VOICE_PANEL_CARD_INNER_PADDING = VOICE_PANEL_CARD_INNER_PADDING;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.MODE_CHANGE_PHYSICS = MODE_CHANGE_PHYSICS;
closure.__closure = object2;
closure.__workletHash = 4080439075039;
closure.__initData = env1_23;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function _fun118710() { // fn#118710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:5121, offset: 0x024e9cb8, size: 262 bytes, params: 1, frame: 19
var value4;
var moduleValue2;
var stopStream;
var moduleValue3;
var currentEmbeddedActivity;
const value = environment.__proto__;
const value2 = undefined;
const useStableParticipantModule = require(15456) /* metro dependency 15456: useStableParticipant */;
if (useStableParticipantModule.isStableStreamParticipant(participant)) {
value4 = ApplicationStreamingStore.getStreamForUser(participant.user.id, guildId);
if (value4 == null) {
return value2;
}
moduleValue2 = require(8913) /* metro dependency 8913: StreamActionCreators */;
stopStream = moduleValue2.stopStream;
moduleValue3 = require(4285) /* metro dependency 4285: StreamKeyUtils */;
Reflect.apply(stopStream, moduleValue2, [moduleValue3.encodeStreamKey(value4)]);
}
const moduleValue4 = useStableParticipantModule;
if (moduleValue4.isStableActivityParticipant(participant)) {
currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: currentEmbeddedActivity == null ? value2 : currentEmbeddedActivity.location,
applicationId: participant.applicationId});
}
return value2;
}
function __118713() { // fn#118713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:6418, offset: 0x024e9fcf, size: 162 bytes, params: 1, frame: 16
var r6;
var value3;
var value;
const value2 = controlsHidden.get();
if (value2) {
r6 = value2;
} else {
value = mode.get();
value3 = environment.__proto__;
value = value === VoicePanelModes.PIP;
r6 = value;
}
const object2 = {position: 'absolute'};
value = environment.__proto__;
object2.top = r6 ? -(28 + 2 * VOICE_PANEL_CARD_INNER_PADDING) : VOICE_PANEL_CARD_INNER_PADDING;
object2.right = VOICE_PANEL_CARD_INNER_PADDING;
const springModule = require(4577) /* metro dependency 4577: spring */;
const value5 = 1;
object2.opacity = springModule.withSpring(r6 ? 0 : value5, MODE_CHANGE_PHYSICS);
object2.zIndex = value5;
return object2;
}
function n_118717(a0) { // fn#118717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:8639, offset: 0x024ea30f, size: 247 bytes, params: 2, frame: 25
var value3;
var binding2;
var closure;
var value4;
var binding3;
const binding = env0_2;
const set = binding.set;
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const defaultImport = importDefault(15492) /* metro dependency 15492: getRandomNumberInRange */;
if (a0) {
value4 = defaultImport(35, 55);
binding3 = env1_27;
closure = n_118717O;
closure.__closure = {flip: env0_1};
closure.__workletHash = 17264907521028;
closure.__initData = env1_30;
Reflect.apply(set, binding, [Reflect.apply(withSpring, springModule, [value4, binding3,
'respect-motion-settings',
closure])]);
} else {
value3 = defaultImport(-10, 10);
binding2 = env1_27;
closure = n_118717N;
closure.__closure = {flip: env0_1};
closure.__workletHash = 1799436949573;
closure.__initData = env1_31;
Reflect.apply(set, binding, [Reflect.apply(withSpring, springModule, [value3, binding2,
'respect-motion-settings',
closure])]);
}
}
function p_118720() { // fn#118720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:9210, offset: 0x024ea42d, size: 53 bytes, params: 1, frame: 11
var r1;
let value = controlsHidden.get();
if (value) {
value = environment.__proto__;
value = -(28 + 2 * VOICE_PANEL_CARD_INNER_PADDING);
r1 = value;
} else {
r1 = 0;
}
return {top: r1};
}
function C_118721() { // fn#118721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:9406, offset: 0x024ea462, size: 68 bytes, params: 1, frame: 15
const object = {};
object.rotate = '' + env0_2.get() + 'deg';
return {transform: [object]};
}
function _fun118724() { // fn#118724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:11598, offset: 0x024eab53, size: 81 bytes, params: 1, frame: 13
var value2;
if (id != null) {
value2 = environment.__proto__;
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: id, channelId: channelId,
isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
}
}
function c_118726() { // fn#118726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:12072, offset: 0x024eabd7, size: 105 bytes, params: 1, frame: 12
var r0;
var value6;
var value7;
const r3 = env0_10 && focused.get() == null;
const value4 = connected.get();
if (value4) {
value6 = mode.get();
value7 = environment.__proto__;
r0 = value6 === VoicePanelModes.PIP;
} else {
r0 = !value4;
}
r0 = !r0 ? !r3 && controlsHidden.get() : r0;
return r0;
}
function __118728(a0) { // fn#118728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:12464, offset: 0x024eac40, size: 70 bytes, params: 2, frame: 17
const binding = env0_12;
const set = binding.set;
const springModule = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, binding, [springModule.withSpring(a0 ? 0 : 1, MODE_CHANGE_PHYSICS)]);
}
function Q_118729() { // fn#118729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:12681, offset: 0x024eac86, size: 96 bytes, params: 1, frame: 12
const object2 = {};
object2.opacity = env0_12.get();
object2.top = env0_11.get() ? 28 + VOICE_PANEL_CARD_INNER_PADDING : 0;
object2.height = 28;
object2.pointerEvents = env0_11.get() ? 'none' : 'auto';
return object2;
}
function $_118730() { // fn#118730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:12947, offset: 0x024eace6, size: 123 bytes, params: 1, frame: 13
var r0;
var r2;
const value2 = connected.get();
if (value2) {
r0 = !env0_6 && controlsSpecs.get().mode === VoicePanelControlsModes.HIDDEN;
r0 = r0 && env0_9;
r2 = r0;
} else {
r2 = !value2;
}
return {width: r2 && env0_9 ? 0 : 'auto', marginRight: r2 ? -4 : 0};
}
function _fun118731(a0) { // fn#118731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:13452, offset: 0x024ead61, size: 36 bytes, params: 2, frame: 15
return <AnimatedLabelIcon icon={a0} key={a0.type} />;
}
function _fun118734() { // fn#118734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:14574, offset: 0x024eb003, size: 174 bytes, params: 1, frame: 17
var r3;
let value = environment.__proto__;
const value2 = undefined;
const useStableParticipantModule = require(15456) /* metro dependency 15456: useStableParticipant */;
if (useStableParticipantModule.isStableActivityParticipant(participant)) {
value = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
return participant.applicationId === (value == null ? value2 : value.applicationId);
}
const moduleValue2 = useStableParticipantModule;
const isStableStreamParticipant2 = moduleValue2.isStableStreamParticipant(participant);
if (isStableStreamParticipant2) {
value = ApplicationStreamingStore.getActiveStreamForUser(participant.user.id, guildId);
value = value != null;
r3 = value;
} else {
r3 = !!isStableStreamParticipant2;
}
return r3;
}
function FloatingControlsI() { // fn#118735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:14864, owner: FloatingControls.I, offset: 0x024eb0b1, size: 92 bytes, params: 1, frame: 12
var value;
const controlsSpecsBinding = controlsSpecs;
const get = controlsSpecsBinding.get;
const mode2 = Reflect.apply(get, controlsSpecsBinding, []).mode;
const HIDDEN = VoicePanelControlsModes.HIDDEN;
let r0 = mode2 === HIDDEN || focused.get() != null;
if (!r0) {
value = mode.get();
value = value === VoicePanelModes.PIP;
r0 = value;
}
return r0;
}
function useTopLeftButtonStylesN() { // fn#118709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:4783, owner: useTopLeftButtonStyles.n, offset: 0x024e9c37, size: 129 bytes, params: 1, frame: 16
const value = env0_0.get();
const object2 = {position: 'absolute'};
object2.top = value ? -(28 + 2 * VOICE_PANEL_CARD_INNER_PADDING) : VOICE_PANEL_CARD_INNER_PADDING;
object2.left = VOICE_PANEL_CARD_INNER_PADDING;
const springModule = require(4577) /* metro dependency 4577: spring */;
const value4 = 1;
object2.opacity = springModule.withSpring(value ? 0 : value4, MODE_CHANGE_PHYSICS);
object2.zIndex = value4;
return object2;
}
function n_118717O(a0) { // fn#118718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15702:8735, owner: n_118717.o, offset: 0x024ea406, size: 39 bytes, params: 2, frame: 11
var value;
var binding;
if (a0) {
value = environment.__proto__;
binding = env1_1;
binding.set(!binding.get());
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,374 @@
/* Metro module 15483; source: modules/voice_panel/native/card/VoicePanelCardView.tsx; dependencies: [57, 31, 27, 4606, 11795, 11793, 15440, 11798, 4299, 33, 15484, 4017, 7739, 1357, 11794, 3860, 697, 11799, 11624, 4577, 15444, 6619, 8141, 4521, 15435, 566, 22, 3869, 1244, 4508, 2] */
function _fun118477(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6, offset: 0x024dccee, size: 483 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const getCardKey = function({type, id}) {
return '' + type + '-' + id;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.StyleSheet;
const env0_6 = value2.View;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
const UI_SHOW_HIDE_PHYSICS = voicePanelConstantsModule.UI_SHOW_HIDE_PHYSICS;
const VOICE_PANEL_CHUNK_DIVISOR = voicePanelConstantsModule.VOICE_PANEL_CHUNK_DIVISOR;
const env0_8 = voicePanelConstantsModule.LAYOUT_PHYSICS;
const env0_9 = voicePanelConstantsModule.VoicePanelModes;
const env0_10 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
const env0_11 = (require(15440) /* metro dependency 15440: VoicePanelPIPConstants */).VoicePanelPIPModes;
const env0_12 = (require(11798) /* metro dependency 11798: VoicePanelCardConstants */).EDGE_GUTTER;
const env0_13 = (require(4299) /* metro dependency 4299: CallConstants */).isUserParticipant;
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
object2 = {};
copyDataProperties(object2, UI_SHOW_HIDE_PHYSICS, undefined);
object2['mass'] = 1;
object2['restSpeedThreshold'] = 0.00001;
object2 = {start: 0, end: VOICE_PANEL_CHUNK_DIVISOR};
object2 = {code: 'function VoicePanelCardViewTsx1(){const{viewableChunks}=this.__closure;return viewableChunks.get();}'};
object2 = {code: 'function VoicePanelCardViewTsx2(newChunks,previous){const{cheapWorkletShallowEqual,runOnJS,updateValueIfChange}=this.__closure;if(cheapWorkletShallowEqual(newChunks,previous!==null&&previous!==void 0?previous:undefined))return;runOnJS(updateValueIfChange)(newChunks);}'};
object2 = {code: "function VoicePanelCardViewTsx3(){const{controlsSpecs,VoicePanelControlsModes,safeArea,EDGE_GUTTER,calculateVoicePanelHeaderSpecs,edgeGutter,connected,contentDimensions,windowDimensions,mode,VoicePanelModes,focused,isRefreshEnabled,roundToNearestPixel,withSpring,wrapperOffset,LAYOUT_PHYSICS,SCALE_PHYSICS,freeze}=this.__closure;const hidden=controlsSpecs.get().mode===VoicePanelControlsModes.HIDDEN;let height=0;let scale=1;let top=0;const safeAreaBottom=Math.max(safeArea.get().bottom,EDGE_GUTTER);const{height:headerBarHeight,paddingTop:safeAreaTop}=calculateVoicePanelHeaderSpecs(safeArea.get(),edgeGutter);if(connected.get()){height+=safeAreaTop;height+=contentDimensions.get().height;height+=safeAreaBottom;if(height-windowDimensions.get().height<8){height=windowDimensions.get().height;}if(mode.get()!==VoicePanelModes.PIP&&!hidden&&focused.get()==null){const targetHeight=height-headerBarHeight-EDGE_GUTTER-controlsSpecs.get().height-safeAreaBottom;const fullView=windowDimensions.get().height-safeAreaTop-safeAreaBottom;const controlsView=windowDimensions.get().height-headerBarHeight-controlsSpecs.get().height-safeAreaBottom;top=headerBarHeight;scale=function(){if(contentDimensions.get().height>targetHeight){return targetHeight/contentDimensions.get().height;}return isRefreshEnabled?windowDimensions.get().width/windowDimensions.get().width:(windowDimensions.get().width-48)/windowDimensions.get().width;}();if(contentDimensions.get().height<fullView&&contentDimensions.get().height>controlsView){const offsetOriginal=(fullView-contentDimensions.get().height)/2;const scaledContent=contentDimensions.get().height*scale;const scaledOffset=(controlsView-scaledContent)/2;top-=(offsetOriginal-scaledOffset)*scale;}if(contentDimensions.get().height>targetHeight){top+=(height*scale-height)/2;}else{top+=(targetHeight-(windowDimensions.get().height-safeAreaTop-safeAreaBottom))/2;}top-=safeAreaTop*scale;}}return{position:'relative',width:windowDimensions.get().width,height:roundToNearestPixel(height),transform:[{translateY:withSpring(top+wrapperOffset.get().y,wrapperOffset.get().gestureActive||mode.get()===VoicePanelModes.PIP?LAYOUT_PHYSICS:SCALE_PHYSICS)},{scale:withSpring(scale,SCALE_PHYSICS)}],opacity:freeze?0:1};}"};
value = value.memo(VoicePanelCardView);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelCardView.tsx');
exports.default = value;
}
function renderCard_118479(a0, a1, a2, a3) { // fn#118479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:480, offset: 0x024dced1, size: 66 bytes, params: 5, frame: 15
return ((Component) => <Component item={a1} transitionState={a2} cleanUp={a3} key={a0} />)(importDefault(15484) /* metro dependency 15484: VoicePanelCard */);
}
function CardContentFreezer({children}) { // fn#118480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3230, offset: 0x024dcf13, size: 90 bytes, params: 2, frame: 16
const value = useLazyContentFreeze();
return env0_4.useMemo(_fun118487, [useSpacerStyles(value), value, children]);
}
function VoicePanelCardView({viewableChunks}) { // fn#118488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5295, offset: 0x024dd6db, size: 244 bytes, params: 2, frame: 19
const binding = env0_4;
const useContext = binding.useContext;
const channelId = Reflect.apply(useContext, binding,
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
const value3 = (require(15435) /* metro dependency 15435: useVoicePanelParticipants */).useChunkedParticipants(channelId,
useViewableChunkState(viewableChunks));
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelRTCStore],
_fun118494, [channelId]);
const env0_3 = env0_4.useRef(value4);
env0_4.useEffect(_fun118496, [value4, channelId]);
return env0_4.useMemo(_fun118498, [value3]);
}
function useLazyContentFreeze() { // fn#118481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3278, owner: CardContentFreezer.useLazyContentFreeze, offset: 0x024dcf6d, size: 191 bytes, params: 1, frame: 19
var environment;
const value = environment.__proto__;
const voicePanelPIPStateContextModule = require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */;
const usePIPState = voicePanelPIPStateContextModule.usePIPState;
const mode = Reflect.apply(usePIPState, voicePanelPIPStateContextModule, []).mode;
const binding = env1_4;
const useRef = binding.useRef;
let IN_APP = VoicePanelPIPModes.IN_APP;
const value2 = Reflect.apply(useRef, binding, [mode === IN_APP]);
const env0_2 = env1_3(env1_4.useState({}), 2)[1];
env1_4.useEffect(_fun118482, [mode]);
const value5 = (importDefault(6619) /* metro dependency 6619: useRefValue */)(value2);
IN_APP = VoicePanelPIPModes.IN_APP;
return mode === IN_APP && value5;
}
function useSpacerStyles(a0) { // fn#118485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3589, owner: CardContentFreezer.useSpacerStyles, offset: 0x024dd0ac, size: 436 bytes, params: 2, frame: 28
const env0_0 = a0;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('VoicePanelCardView');
const {connected, controlsSpecs, safeArea, contentDimensions, windowDimensions, mode, focused,
wrapperOffset} = env1_4.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const VOICE_PANEL_GUTTER = (importDefault(697) /* metro dependency 697: native */).modules.mobile.VOICE_PANEL_GUTTER;
const value4 = Reflect.apply(useToken, useTokenModule, [VOICE_PANEL_GUTTER]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = useSpacerStylesO;
const object2 = {controlsSpecs: controlsSpecs};
object2.VoicePanelControlsModes = VoicePanelControlsModes;
object2.safeArea = safeArea;
object2.EDGE_GUTTER = EDGE_GUTTER;
object2.calculateVoicePanelHeaderSpecs = importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */;
object2.edgeGutter = value4;
object2.connected = connected;
object2.contentDimensions = contentDimensions;
object2.windowDimensions = windowDimensions;
object2.mode = mode;
object2.VoicePanelModes = VoicePanelModes;
object2.focused = focused;
object2.isRefreshEnabled = value2;
object2.roundToNearestPixel = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.wrapperOffset = wrapperOffset;
object2.LAYOUT_PHYSICS = LAYOUT_PHYSICS;
object2.SCALE_PHYSICS = env1_15;
object2.freeze = a0;
closure.__closure = object2;
closure.__workletHash = 495797244676;
closure.__initData = env1_19;
return Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
}
function _fun118487() { // fn#118487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5143, offset: 0x024dd649, size: 146 bytes, params: 1, frame: 22
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
const defaultImportProps = {style: env0_2};
const Freeze = (require(4521) /* metro dependency 4521 */).Freeze;
return (
<ReanimatedNativeView {...defaultImportProps}>
<Freeze freeze={env0_1}>
<View collapsable={false} style={StyleSheet.absoluteFill}>
{children}
</View>
</Freeze>
</ReanimatedNativeView>
);
}
function useViewableChunkState(a0) { // fn#118489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5384, owner: VoicePanelCardView.useViewableChunkState, offset: 0x024dd7cf, size: 261 bytes, params: 2, frame: 22
var object2;
const env0_0 = a0;
let binding = env1_4;
const [property, env0_1] = env1_3(binding.useState(env1_16), 2);
binding = env1_4;
let closure = _fun118490;
const value4 = binding.useCallback(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
closure = useViewableChunkStateH;
closure.__closure = {viewableChunks: a0};
closure.__workletHash = 1074173860641;
closure.__initData = env1_17;
const closure2 = useViewableChunkStateS;
object2 = {};
object2.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.updateValueIfChange = value4;
closure2.__closure = object2;
closure2.__workletHash = 13543715159803;
closure2.__initData = env1_18;
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
return property;
}
function _fun118494() { // fn#118494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6016, offset: 0x024dd98c, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const getParticipants = ChannelRTCStore.getParticipants;
return Reflect.apply(getParticipants, ChannelRTCStore, [channelId]).filter(function(a0) {
return isUserParticipant(a0);
});
}
function _fun118496() { // fn#118496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6099, offset: 0x024dd9cd, size: 258 bytes, params: 1, frame: 20
var user;
var defaultImport2;
var value3;
var length;
var value4;
var AccessibilityAnnouncer;
var announce;
var intl;
const defaultImport = importDefault(22) /* metro dependency 22 */;
if (!defaultImport.isEqual(env0_3.current, env0_2)) {
defaultImport2 = defaultImport;
value3 = defaultImport2.differenceWith(env0_3.current, env0_2, function({id}, a1) {
return id === a1.id;
});
length = value3.length;
value4 = null;
user = length > 0 ? value3[0].user : value4;
if (value4 != user) {
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['9NqwWZ'],
{username: user.username})]);
}
}
env0_3.current = env0_2;
}
function _fun118498() { // fn#118498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:6392, offset: 0x024ddae5, size: 102 bytes, params: 1, frame: 17
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
return (
<CardContentFreezer>
<TransitionGroup
items={env0_1}
renderItem={renderCard_118479}
getItemKey={getCardKey}
lazyCleanUpDelay={1000}
/>
</CardContentFreezer>
);
}
function _fun118482() { // fn#118482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3411, offset: 0x024dd02c, size: 84 bytes, params: 1, frame: 14
const modeBinding = mode;
const IN_APP = VoicePanelPIPModes.IN_APP;
if (modeBinding === IN_APP) {
var env0_0 = global.setTimeout(_fun118483, 700);
return _fun118484;
}
env0_1.current = false;
}
function useSpacerStylesO() { // fn#118486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3909, owner: CardContentFreezer.useSpacerStyles.o, offset: 0x024dd260, size: 1001 bytes, params: 1, frame: 29
var r5;
var r4;
var r11;
var r13;
var r7;
var r8;
var r9;
var value9;
var contentDimensionsBinding;
var value10;
var windowDimensionsBinding;
var value14;
var value15;
var value16;
var value17;
var value18;
var value23;
var value25;
let controlsSpecsBinding = controlsSpecs;
let get = controlsSpecsBinding.get;
const mode2 = Reflect.apply(get, controlsSpecsBinding, []).mode;
const HIDDEN = VoicePanelControlsModes.HIDDEN;
const Math = global.Math;
const max = Math.max;
const safeAreaBinding = safeArea;
get = safeAreaBinding.get;
const value3 = Reflect.apply(max, Math, [Reflect.apply(get, safeAreaBinding, []).bottom, EDGE_GUTTER]);
let {height,
paddingTop} = (importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */)(safeAreaBinding.get(),
env0_10);
const value6 = connected.get();
const value7 = 0;
const value8 = 1;
if (value6) {
value9 = value7 + paddingTop;
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
value10 = value9 + Reflect.apply(get, contentDimensionsBinding, []).height + value3;
get = windowDimensions.get;
if (value10 - Reflect.apply(get, windowDimensionsBinding, []).height < 8) {
windowDimensionsBinding = windowDimensions;
r5 = windowDimensionsBinding.get().height;
} else {
r5 = value10;
}
if (mode.get() === VoicePanelModes.PIP) {
r7 = value7;
r8 = r5;
r9 = value8;
} else if (mode2 === HIDDEN) {
r7 = value7;
r8 = r5;
r9 = value8;
} else if (focused.get() == null) {
value14 = r5 - height - EDGE_GUTTER;
controlsSpecsBinding = controlsSpecs;
get = controlsSpecsBinding.get;
value15 = value14 - Reflect.apply(get, controlsSpecsBinding, []).height - value3;
windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
value16 = Reflect.apply(get, windowDimensionsBinding, []).height - paddingTop - value3;
get = windowDimensionsBinding.get;
value17 = Reflect.apply(get, windowDimensionsBinding, []).height - height;
get = controlsSpecsBinding.get;
value18 = value17 - Reflect.apply(get, controlsSpecsBinding, []).height - value3;
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
r4 = Reflect.apply(get, contentDimensionsBinding,
[]).height > value15 ? value15 / contentDimensions.get().height : env0_1 ? windowDimensions.get().width / windowDimensions.get().width : (windowDimensions.get().width - 48) / windowDimensions.get().width;
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
value23 = Reflect.apply(get, contentDimensionsBinding, []).height < value16;
if (value23) {
contentDimensionsBinding = contentDimensions;
r11 = contentDimensionsBinding.get().height > value18;
} else {
r11 = value23;
}
if (r11) {
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
value25 = (value16 - Reflect.apply(get, contentDimensionsBinding, []).height) / 2;
get = contentDimensionsBinding.get;
r13 = height - (value25 - (value18 - Reflect.apply(get, contentDimensionsBinding,
[]).height * r4) / 2) * r4;
} else {
r13 = height;
}
contentDimensionsBinding = contentDimensions;
get = contentDimensionsBinding.get;
height = Reflect.apply(get, contentDimensionsBinding, []).height;
r11 = height > value15 ? r13 + (r5 * r4 - r5) / 2 : r13 + (value15 - (windowDimensions.get().height - paddingTop - value3)) / 2;
r7 = r11 - paddingTop * r4;
r8 = r5;
r9 = r4;
} else {
r7 = value7;
r8 = r5;
r9 = value8;
}
} else {
r7 = value7;
r8 = value7;
r9 = value8;
}
const object2 = {position: 'relative'};
windowDimensionsBinding = windowDimensions;
get = windowDimensionsBinding.get;
object2.width = Reflect.apply(get, windowDimensionsBinding, []).width;
object2.height = (importDefault(11624) /* metro dependency 11624: roundToNearestPixel */)(r8);
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const wrapperOffsetBinding = wrapperOffset;
get = wrapperOffsetBinding.get;
const value30 = r7 + Reflect.apply(get, wrapperOffsetBinding, []).y;
get = wrapperOffsetBinding.get;
const items2 = [{translateY: Reflect.apply(withSpring, springModule, [value30, Reflect.apply(get,
wrapperOffsetBinding, []).gestureActive || mode.get() === VoicePanelModes.PIP ? LAYOUT_PHYSICS : env2_15])}];
const object4 = {};
object4.scale = springModule.withSpring(r9, env2_15);
items2[1] = object4;
object2.transform = items2;
object2.opacity = env0_0 ? value7 : value8;
return object2;
}
function _fun118490(a0) { // fn#118490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5482, offset: 0x024dd8d4, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
env0_1(_fun118491);
}
function useViewableChunkStateS(a0, a1) { // fn#118493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5670, owner: VoicePanelCardView.useViewableChunkState.s, offset: 0x024dd924, size: 104 bytes, params: 3, frame: 17
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
if (!cheapWorkletShallowEqualModule.cheapWorkletShallowEqual(a0, value ?? value3)) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env0_2)(a0);
}
return value3;
}
function _fun118483() { // fn#118483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:3451, offset: 0x024dd080, size: 44 bytes, params: 1, frame: 11
if (!env1_1.current) {
env1_1.current = true;
env1_2({});
}
}
function _fun118491(a0) { // fn#118491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15680:5489, offset: 0x024dd8f4, size: 48 bytes, params: 2, frame: 4
const value = a0;
return value.start !== env0_0.start ? env0_0 : value.end === env0_0.end ? value : env0_0;
}
@@ -0,0 +1,63 @@
/* Metro module 15493; source: modules/voice_panel/native/card/VoicePanelNoVideoParticipantsCard.tsx; dependencies: [31, 27, 33, 4501, 697, 11794, 7712, 6821, 4573, 1244, 2] */
function _fun118632(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15690:6, offset: 0x024e55b0, size: 347 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_4 = (require(27) /* metro dependency 27 */).Pressable;
const value2 = require(33) /* metro dependency 33 */;
const env0_5 = value2.jsx;
const env0_6 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const VOICE_VIDEO_VIDEO_TILE_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.VOICE_VIDEO_VIDEO_TILE_BACKGROUND;
object2.container = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center',
'padding': 16, backgroundColor: VOICE_VIDEO_VIDEO_TILE_BACKGROUND};
object2.label = {'marginBottom': 16, 'textAlign': 'center'};
const object4 = {'paddingHorizontal': 20, 'paddingVertical': 12, 'backgroundColor': 'white'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.button = object4;
const PRIMARY_860 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_860;
object2.buttonText = {color: PRIMARY_860};
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.memo(VoicePanelNoVideoParticipantsCard);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/card/VoicePanelNoVideoParticipantsCard.tsx');
exports.default = value;
}
function VoicePanelNoVideoParticipantsCard() { // fn#118633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15690:557, offset: 0x024e570b, size: 421 bytes, params: 1, frame: 26
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 = binding.useCallback(_fun118634, [channelId]);
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text style={styles.label} variant="text-md/semibold" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8eBJ73'])}</Text>;
return (
<NativeView style={styles.container}>
{text}
<Pressable
style={styles.button}
onPress={value2}
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kLQySL)}
>
<Text variant="text-sm/semibold" style={styles.buttonText}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kLQySL)}
</Text>
</Pressable>
</NativeView>
);
}
function _fun118634() { // fn#118634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15690:663, offset: 0x024e58b0, size: 48 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.toggleVoiceParticipantsHidden(channelId, false);
}
File diff suppressed because it is too large. Load diff