Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,737 @@
|
||||
/* Metro module 15562; source: modules/voice_panel/native/pip/VoicePanelPIP.tsx; dependencies: [57, 31, 27, 1378, 8065, 7710, 11795, 11793, 15440, 8044, 33, 4577, 4501, 11794, 15444, 4017, 15439, 5321, 11282, 15446, 10684, 566, 3774, 8087, 7860, 8621, 1244, 8141, 15563, 15564, 6821, 15566, 4508, 2] */
|
||||
function _fun119107(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:6, offset: 0x024fcef3, size: 795 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
value2.Platform;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const framesStore = importDefault(8065) /* metro dependency 8065: FramesStore */;
|
||||
const voicePanelStore = importDefault(7710) /* metro dependency 7710: VoicePanelStore */;
|
||||
const voicePanelConstantsModule = require(11795) /* metro dependency 11795: VoicePanelConstants */;
|
||||
const env0_10 = voicePanelConstantsModule.DRAWER_SPRING_PHYSICS;
|
||||
const env0_11 = voicePanelConstantsModule.VoicePanelModes;
|
||||
const SECONDARY_PIP_TOP_MARGIN = voicePanelConstantsModule.SECONDARY_PIP_TOP_MARGIN;
|
||||
const env0_12 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
|
||||
const env0_13 = (require(15440) /* metro dependency 15440: VoicePanelPIPConstants */).VoicePanelPIPModes;
|
||||
const env0_14 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_15 = value4.jsx;
|
||||
const env0_16 = value4.jsxs;
|
||||
const env0_17 = {'mass': 0.3, 'damping': 80, 'stiffness': 150};
|
||||
object = {code: 'function layoutTransition_VoicePanelPIPTsx1(values){const{withSpring,LAYOUT_PHYSICS}=this.__closure;return{animations:{originX:withSpring(values.targetOriginX,LAYOUT_PHYSICS),originY:withSpring(values.targetOriginY,LAYOUT_PHYSICS),width:withSpring(values.targetWidth,LAYOUT_PHYSICS),height:withSpring(values.targetHeight,LAYOUT_PHYSICS)},initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight}};}'};
|
||||
const env0_19 = _fun119140();
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
|
||||
object2['overflow'] = 'hidden';
|
||||
const env0_20 = Reflect.apply(createStyles, createStylesModule, [{pipContentWrapper: {backgroundColor: 'black'},
|
||||
inAppElevationShadow: {}, pipMask: object2, multiPIPContainer: {'position': 'absolute', 'zIndex': 10,
|
||||
'flexDirection': 'column', 'alignItems': 'center', gap: SECONDARY_PIP_TOP_MARGIN}}]);
|
||||
object = {code: 'function VoicePanelPIPTsx2(){const{pipState,getClampedPIPPosition,wrapperDimensions,windowDimensions,safeArea,pipAvoidanceSpecs,initialGestureOffset,opacity,withSpring,DRAWER_SPRING_PHYSICS,LAYOUT_PHYSICS,getVoicePanelPIPBorderRadius}=this.__closure;const width=pipState.width;const height=!pipState.showSecondaryPIP?pipState.height:pipState.containerHeight;const{x:x,y:y}=getClampedPIPPosition({pipX:wrapperDimensions.get().pipX,pipY:wrapperDimensions.get().pipY,width:width,height:height,windowDimensions:windowDimensions.get(),safeArea:safeArea.get(),bottomAvoidanceRegion:pipAvoidanceSpecs.get().bottom,topAvoidanceRegion:pipAvoidanceSpecs.get().top,positionOffset:initialGestureOffset.get().active?initialGestureOffset.get():undefined});return{width:width,height:height,opacity:opacity.get(),transform:[{translateX:withSpring(x,initialGestureOffset.get().active?DRAWER_SPRING_PHYSICS:LAYOUT_PHYSICS)},{translateY:withSpring(y,initialGestureOffset.get().active?DRAWER_SPRING_PHYSICS:LAYOUT_PHYSICS)}],borderRadius:getVoicePanelPIPBorderRadius(width,height)};}'};
|
||||
object = {code: 'function VoicePanelPIPTsx3(){const{pipState,getVoicePanelPIPBorderRadius}=this.__closure;const{width:width,height:height}=pipState;return{width:width,height:height,borderRadius:getVoicePanelPIPBorderRadius(width,height)};}'};
|
||||
object = {code: 'function VoicePanelPIPTsx4(){const{updateSharedValueIfChanged,initialGestureOffset}=this.__closure;updateSharedValueIfChanged(initialGestureOffset,{active:false,pressed:false});}'};
|
||||
object = {code: 'function VoicePanelPIPTsx5(){const{updateSharedValueIfChanged,initialGestureOffset}=this.__closure;updateSharedValueIfChanged(initialGestureOffset,{active:false,pressed:false});}'};
|
||||
object = {code: 'function VoicePanelPIPTsx6({velocityX:velocityX,velocityY:velocityY,absoluteX:absoluteX,absoluteY:absoluteY}){const{calculatePIPPositionFromVelocity,windowDimensions,safeArea,updateSharedValueIfChanged,wrapperDimensions,wrapperOffset,initialGestureOffset,runOnJS,updateSourceTrackingView}=this.__closure;const{pipX:pipX,pipY:pipY}=calculatePIPPositionFromVelocity({velocityX:velocityX,velocityY:velocityY,absoluteX:absoluteX,absoluteY:absoluteY,windowDimensions:windowDimensions.get(),safeArea:safeArea.get()});updateSharedValueIfChanged(wrapperDimensions,{pipX:pipX,pipY:pipY});updateSharedValueIfChanged(wrapperOffset,{gestureActive:false});updateSharedValueIfChanged(initialGestureOffset,{active:false,pressed:false});runOnJS(updateSourceTrackingView)();}'};
|
||||
object = {code: 'function VoicePanelPIPTsx7({absoluteX:absoluteX,absoluteY:absoluteY}){const{updateSharedValueIfChanged,initialGestureOffset}=this.__closure;updateSharedValueIfChanged(initialGestureOffset,{x:absoluteX-initialGestureOffset.get().absoluteX,y:absoluteY-initialGestureOffset.get().absoluteY});}'};
|
||||
object = {code: 'function VoicePanelPIPTsx8(event,manager){const{State,initialGestureOffset,MIN_GESTURE_START,updateSharedValueIfChanged,wrapperOffset,runOnJS,triggerIOSHaptic}=this.__closure;if(event.state!==State.BEGAN||initialGestureOffset.get().active)return;const{absoluteY:absoluteY,absoluteX:absoluteX}=event.changedTouches[0];if(Math.abs(initialGestureOffset.get().absoluteX-absoluteX)>MIN_GESTURE_START||Math.abs(initialGestureOffset.get().absoluteY-absoluteY)>MIN_GESTURE_START){initialGestureOffset.set({x:0,y:0,absoluteX:absoluteX,absoluteY:absoluteY,pressed:true,active:true});updateSharedValueIfChanged(wrapperOffset,{gestureActive:true,x:0,y:0});manager.activate();runOnJS(triggerIOSHaptic)();}}'};
|
||||
object = {code: 'function VoicePanelPIPTsx9(){const{updateSharedValueIfChanged,initialGestureOffset}=this.__closure;updateSharedValueIfChanged(initialGestureOffset,{pressed:false});}'};
|
||||
object = {code: 'function VoicePanelPIPTsx10({absoluteX:absoluteX,absoluteY:absoluteY}){const{initialGestureOffset}=this.__closure;initialGestureOffset.set({x:0,y:0,absoluteX:absoluteX,absoluteY:absoluteY,active:false,pressed:true});}'};
|
||||
object = {code: 'function VoicePanelPIPTsx11(){const{runOnJS,setFocused}=this.__closure;runOnJS(setFocused)(null);}'};
|
||||
object = {code: 'function VoicePanelPIPTsx12(){const{pipMode,VoicePanelPIPModes,runOnJS,setMode,VoicePanelModes,controlsSpecs,VoicePanelControlsModes,showControls,hideControls}=this.__closure;if(pipMode===VoicePanelPIPModes.IN_APP){runOnJS(setMode)(VoicePanelModes.PANEL);}else{if(controlsSpecs.get().mode===VoicePanelControlsModes.HIDDEN){runOnJS(showControls)();}else{runOnJS(hideControls)();}}}'};
|
||||
object = {code: 'function VoicePanelPIPTsx13(){const{runOnJS,handleSecondaryPIPTap}=this.__closure;runOnJS(handleSecondaryPIPTap)();}'};
|
||||
object = {code: 'function VoicePanelPIPTsx14(){const{getVoicePanelPIPBorderRadius,pipState}=this.__closure;return{borderRadius:getVoicePanelPIPBorderRadius(pipState.width,pipState.height)};}'};
|
||||
object = {code: 'function VoicePanelPIPTsx15(){const{transitionState,TransitionStates,panelCardStillInPIP}=this.__closure;return transitionState===TransitionStates.YEETED&&!panelCardStillInPIP.get();}'};
|
||||
object = {code: 'function VoicePanelPIPTsx16(ready,prev){const{runOnJS,fireCleanup}=this.__closure;if(ready&&prev!==ready){runOnJS(fireCleanup)();}}'};
|
||||
const env0_36 = value.memo(_fun119142);
|
||||
value = value.memo(VoicePanelPIPWrapper);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIP.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function VoicePanelPIP() { // fn#119108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:6384, offset: 0x024fd20e, size: 1117 bytes, params: 1, frame: 37
|
||||
var r5;
|
||||
var defaultImport2;
|
||||
var object2;
|
||||
const GestureDetector = require(dependencyMap[17]).GestureDetector;
|
||||
var defaultImport6;
|
||||
var defaultImport7;
|
||||
var object;
|
||||
var defaultImport8;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
let binding = env0_5;
|
||||
const {controlsSpecs, setMode} = binding.useContext(importDefault(dependencyMap[13]));
|
||||
const value3 = require(dependencyMap[14]).usePIPState();
|
||||
let mode = value3.mode;
|
||||
const {multiPIPWrapperStyles, mainPIPWrapperStyles, secondaryPIPWrapperStyles, mainPIPGesture,
|
||||
secondaryPIPGesture} = usePIPGesture(mode);
|
||||
const pushToTalk = importDefault(dependencyMap[25])(controlsSpecs).pushToTalk;
|
||||
binding = env0_5;
|
||||
const useState = binding.useState;
|
||||
mode = value3.mode;
|
||||
const value5 = null;
|
||||
const value7 = env0_4(Reflect.apply(useState, binding, [value5 != mode]), 2);
|
||||
const property = value7[0];
|
||||
const env0_3 = value7[1];
|
||||
env0_5.useEffect(_fun119131, [value3.mode, property]);
|
||||
let r6 = value5 != value3.mode || property;
|
||||
const value9 = require(dependencyMap[21]).useStateFromStoresObject([FramesStore], _fun119132);
|
||||
const moduleValue3 = require(dependencyMap[15]);
|
||||
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
|
||||
const closure = VoicePanelPIPZ;
|
||||
const getVoicePanelPIPBorderRadius = require(dependencyMap[16]).getVoicePanelPIPBorderRadius;
|
||||
closure.__closure = {getVoicePanelPIPBorderRadius: getVoicePanelPIPBorderRadius, pipState: value3};
|
||||
closure.__workletHash = 9598016909682;
|
||||
closure.__initData = env0_33;
|
||||
const value10 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
|
||||
const value11 = env0_5.useMemo(function() {
|
||||
var object = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'button'};
|
||||
object.accessibilityLabel = require(dependencyMap[26]).intl.string(require(dependencyMap[26]).t.oN8bqe);
|
||||
object.accessibilityActions = [{name: 'activate'}];
|
||||
object.onAccessibilityAction = _fun119135;
|
||||
return object;
|
||||
}, [setMode]);
|
||||
const value12 = env0_5.useMemo(function() {
|
||||
var object = {accessible: true};
|
||||
object.accessibilityLabel = require(dependencyMap[26]).intl.string(require(dependencyMap[26]).t['3ejJer']);
|
||||
object.accessibilityActions = [{name: 'activate'}];
|
||||
object.onAccessibilityAction = _fun119137;
|
||||
return object;
|
||||
}, [value9]);
|
||||
const r17 = pushToTalk && (value3.mode !== VoicePanelPIPModes.IN_PANEL || VoicePanelStore(function(a0) {
|
||||
return a0.isActivityFocused;
|
||||
}));
|
||||
const defaultImport = importDefault(dependencyMap[27]);
|
||||
const defaultImportProps = {pointerEvents: 'box-none', style: [styles.multiPIPContainer, multiPIPWrapperStyles],
|
||||
layout: env0_19};
|
||||
if (r6) {
|
||||
defaultImport2 = importDefault(dependencyMap[27]);
|
||||
r6 = ((Component) => <Component style={[styles.pipContentWrapper, styles.inAppElevationShadow,
|
||||
mainPIPWrapperStyles]} pointerEvents="box-none" layout={env0_19} {...value11}><GestureDetector gesture={mainPIPGesture}>{((Component) => <Component style={[styles.pipMask,
|
||||
|
||||
value10]} layout={env0_19}>{((Component) => <Component />)(importDefault(dependencyMap[28]))}</Component>)(importDefault(dependencyMap[27]))}</GestureDetector>{r17 ? ((Component) => <Component />)(importDefault(dependencyMap[29])) : value5}</Component>)(defaultImport2);
|
||||
}
|
||||
const showSecondaryPIP = value3.showSecondaryPIP;
|
||||
if (showSecondaryPIP) {
|
||||
defaultImport6 = importDefault(dependencyMap[30]);
|
||||
var defaultImport6Props = {style: secondaryPIPWrapperStyles, ...value12};
|
||||
defaultImport7 = importDefault(dependencyMap[27]);
|
||||
var defaultImport7Props = {style: [styles.pipMask, value10]};
|
||||
object = {gesture: secondaryPIPGesture};
|
||||
defaultImport8 = importDefault(dependencyMap[30]);
|
||||
var defaultImport8Props = {style: StyleSheet.absoluteFill};
|
||||
value = importDefault(dependencyMap[31]);
|
||||
value = ((Component) => <Component {...defaultImport7Props}><GestureDetector {...object}>{((Component) => <Component {...defaultImport8Props}>{((Component) => <Component />)(value)}</Component>)(defaultImport8)}</GestureDetector></Component>)(defaultImport7);
|
||||
value = ((Component) => <Component {...defaultImport6Props}>{value}</Component>)(defaultImport6);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = showSecondaryPIP;
|
||||
}
|
||||
return ((Component) => <Component {...defaultImportProps}>{r6}{r5}</Component>)(defaultImport);
|
||||
}
|
||||
|
||||
function renderPIPWrapper(a0, a1, a2, a3) { // fn#119139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:15479, offset: 0x024fe9a2, size: 57 bytes, params: 5, frame: 15
|
||||
return ((Component) => <Component pipMode={a1.pipMode} transitionState={a2} transitionCleanUp={a3} key={a0} />)(env0_36);
|
||||
}
|
||||
|
||||
function _fun119140() { // fn#119140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:910, offset: 0x024fe9db, size: 88 bytes, params: 1, frame: 14
|
||||
const closure = layoutTransition_119141;
|
||||
const object2 = {};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.LAYOUT_PHYSICS = env0_17;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 9346092352642;
|
||||
closure.__initData = env0_18;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun119142({pipMode, transitionState, transitionCleanUp}) { // fn#119142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:14490, offset: 0x024feb0c, size: 497 bytes, params: 2, frame: 24
|
||||
var object2;
|
||||
let binding = undefined;
|
||||
const useState = binding.useState;
|
||||
const IN_PANEL = VoicePanelPIPModes.IN_PANEL;
|
||||
const value5 = undefined(Reflect.apply(useState, binding,
|
||||
[pipMode === IN_PANEL || transitionState === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.MOUNTED]),
|
||||
2);
|
||||
const property = value5[0];
|
||||
const env0_2 = value5[1];
|
||||
binding = undefined;
|
||||
let closure = function() {
|
||||
var env0_0 = global.setTimeout(_fun119144, 400);
|
||||
return _fun119145;
|
||||
};
|
||||
binding.useEffect(closure, []);
|
||||
const env0_3 = undefined.useRef(null);
|
||||
const value7 = undefined.useCallback(_fun119146, [transitionCleanUp]);
|
||||
undefined.useEffect(_fun119147, [transitionState, value7]);
|
||||
binding = undefined;
|
||||
const useContext = binding.useContext;
|
||||
const panelCardStillInPIP = Reflect.apply(useContext, binding,
|
||||
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).panelCardStillInPIP;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
closure = I_119149;
|
||||
object2 = {transitionState: transitionState};
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
object2.TransitionStates = TransitionStates;
|
||||
object2.panelCardStillInPIP = panelCardStillInPIP;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 10653972388666;
|
||||
closure.__initData = env0_34;
|
||||
const closure2 = f_119150;
|
||||
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, fireCleanup: value7};
|
||||
closure2.__workletHash = 1599147342710;
|
||||
closure2.__initData = env0_35;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
return property ? <VoicePanelPIP /> : null;
|
||||
}
|
||||
|
||||
function VoicePanelPIPWrapper() { // fn#119151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:15600, offset: 0x024fee8a, size: 112 bytes, params: 1, frame: 17
|
||||
const value2 = undefined;
|
||||
const {mode,
|
||||
showSecondaryPIP} = (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState();
|
||||
const TransitionItem = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionItem;
|
||||
return (
|
||||
<TransitionItem item={mode != null || showSecondaryPIP ? {pipMode: mode} : value2} renderItem={renderPIPWrapper} />
|
||||
);
|
||||
}
|
||||
|
||||
function usePIPGesture(a0) { // fn#119109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:6501, owner: VoicePanelPIP.usePIPGesture, offset: 0x024fd66b, size: 892 bytes, params: 2, frame: 36
|
||||
var object2;
|
||||
let env0_0 = a0;
|
||||
const styles = useStyles();
|
||||
let binding = env1_5;
|
||||
const value2 = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
|
||||
const controlsSpecs = value2.controlsSpecs;
|
||||
const hideControls = value2.hideControls;
|
||||
const pipAvoidanceSpecs = value2.pipAvoidanceSpecs;
|
||||
const safeArea = value2.safeArea;
|
||||
const setFocused = value2.setFocused;
|
||||
const setMode = value2.setMode;
|
||||
const showControls = value2.showControls;
|
||||
const windowDimensions = value2.windowDimensions;
|
||||
const wrapperDimensions = value2.wrapperDimensions;
|
||||
const wrapperOffset = value2.wrapperOffset;
|
||||
const env0_12 = value2.channelId;
|
||||
const value3 = (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState();
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({'x': 0, 'y': 0,
|
||||
'absoluteX': 0, 'absoluteY': 0, 'active': false, 'pressed': false});
|
||||
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
env1_5.useEffect(function() {
|
||||
var env0_0 = global.setTimeout(_fun119111, 200);
|
||||
return _fun119112;
|
||||
}, [value5]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = usePIPGestureU;
|
||||
object2 = {pipState: value3};
|
||||
const getClampedPIPPosition = (require(15439) /* metro dependency 15439: VoicePanelPIPUtils */).getClampedPIPPosition;
|
||||
object2.getClampedPIPPosition = getClampedPIPPosition;
|
||||
object2.wrapperDimensions = wrapperDimensions;
|
||||
object2.windowDimensions = windowDimensions;
|
||||
object2.safeArea = safeArea;
|
||||
object2.pipAvoidanceSpecs = pipAvoidanceSpecs;
|
||||
object2.initialGestureOffset = value4;
|
||||
object2.opacity = value5;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.DRAWER_SPRING_PHYSICS = DRAWER_SPRING_PHYSICS;
|
||||
object2.LAYOUT_PHYSICS = env1_17;
|
||||
const getVoicePanelPIPBorderRadius = (require(15439) /* metro dependency 15439: VoicePanelPIPUtils */).getVoicePanelPIPBorderRadius;
|
||||
object2.getVoicePanelPIPBorderRadius = getVoicePanelPIPBorderRadius;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 6729444248940;
|
||||
closure.__initData = env1_21;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
closure = usePIPGestureJ;
|
||||
closure.__closure = {pipState: value3, getVoicePanelPIPBorderRadius: getVoicePanelPIPBorderRadius};
|
||||
closure.__workletHash = 1914976453427;
|
||||
closure.__initData = env1_22;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
binding = env1_5;
|
||||
let useMemo = binding.useMemo;
|
||||
const value8 = Reflect.apply(useMemo, binding, [_fun119115, [styles, value3.width, value3.height]]);
|
||||
const value9 = env1_5.useCallback(_fun119116, [value4, safeArea, windowDimensions, wrapperDimensions,
|
||||
wrapperOffset]);
|
||||
const value10 = env1_5.useMemo(_fun119124, [controlsSpecs, hideControls, setFocused, showControls, a0, setMode,
|
||||
value9]);
|
||||
const {currentEmbeddedActivityIsNotInCurrentChannel,
|
||||
hasFrame} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore,
|
||||
FramesStore], _fun119127);
|
||||
const value12 = env1_5.useCallback(_fun119128, [currentEmbeddedActivityIsNotInCurrentChannel, hasFrame, setMode,
|
||||
setFocused]);
|
||||
binding = env1_5;
|
||||
useMemo = binding.useMemo;
|
||||
return {multiPIPWrapperStyles: value6, mainPIPWrapperStyles: value7, secondaryPIPWrapperStyles: value8,
|
||||
mainPIPGesture: value10, secondaryPIPGesture: Reflect.apply(useMemo, binding, [_fun119129, [value9, value12]])};
|
||||
}
|
||||
|
||||
function _fun119131() { // fn#119131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:12651, offset: 0x024fe7a5, size: 45 bytes, params: 1, frame: 11
|
||||
if (!(env0_1.mode == null || env0_2)) {
|
||||
env0_3(true);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119132() { // fn#119132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:12759, offset: 0x024fe7d2, size: 25 bytes, params: 1, frame: 9
|
||||
const value = environment.__proto__;
|
||||
return FramesStore.getConnectedFrame() != null;
|
||||
}
|
||||
|
||||
function VoicePanelPIPZ() { // fn#119133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:12826, owner: VoicePanelPIP.Z, offset: 0x024fe7eb, size: 62 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(15439) /* metro dependency 15439: VoicePanelPIPUtils */;
|
||||
const getVoicePanelPIPBorderRadius = value.getVoicePanelPIPBorderRadius;
|
||||
const binding = env0_1;
|
||||
return {borderRadius: Reflect.apply(getVoicePanelPIPBorderRadius, value, [binding.width, binding.height])};
|
||||
}
|
||||
|
||||
function _fun119134() { // fn#119134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:13057, offset: 0x024fe829, size: 121 bytes, params: 1, frame: 15
|
||||
const object2 = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'button'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oN8bqe);
|
||||
object2.accessibilityActions = [{name: 'activate'}];
|
||||
object2.onAccessibilityAction = function() {
|
||||
setMode(VoicePanelModes.PANEL);
|
||||
};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun119136() { // fn#119136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:13265, offset: 0x024fe8bf, size: 111 bytes, params: 1, frame: 15
|
||||
const object2 = {accessible: true};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3ejJer']);
|
||||
object2.accessibilityActions = [{name: 'activate'}];
|
||||
object2.onAccessibilityAction = onAccessibilityAction_119137;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function layoutTransition_119141({targetOriginX, targetOriginY, targetWidth, targetHeight, currentOriginX, currentOriginY, currentWidth, currentHeight}) { // fn#119141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:942, offset: 0x024fea33, size: 217 bytes, params: 2, frame: 21
|
||||
const object = {};
|
||||
object.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX, env1_17);
|
||||
object.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY, env1_17);
|
||||
object.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth, env1_17);
|
||||
object.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight, env1_17);
|
||||
return {animations: object, initialValues: {originX: currentOriginX, originY: currentOriginY, width: currentWidth,
|
||||
height: currentHeight}};
|
||||
}
|
||||
|
||||
function _fun119143() { // fn#119143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:14658, offset: 0x024fecfd, size: 44 bytes, params: 1, frame: 14
|
||||
const env0_0 = global.setTimeout(_fun119144, 400);
|
||||
return _fun119145;
|
||||
}
|
||||
|
||||
function _fun119146() { // fn#119146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:14769, offset: 0x024fed29, size: 64 bytes, params: 1, frame: 13
|
||||
if (env0_3.current != null) {
|
||||
global.clearTimeout(env0_3.current);
|
||||
env0_3.current = null;
|
||||
}
|
||||
transitionCleanUp();
|
||||
}
|
||||
|
||||
function _fun119147() { // fn#119147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:14856, offset: 0x024fed69, size: 95 bytes, params: 1, frame: 14
|
||||
const transitionStateBinding = transitionState;
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
const YEETED = TransitionStates.YEETED;
|
||||
if (transitionStateBinding === YEETED) {
|
||||
env0_3.current = global.setTimeout(env0_4, 500);
|
||||
return _fun119148;
|
||||
}
|
||||
}
|
||||
|
||||
function I_119149() { // fn#119149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:15102, offset: 0x024fee00, size: 69 bytes, params: 1, frame: 13
|
||||
const transitionStateBinding = transitionState;
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
const YEETED = TransitionStates.YEETED;
|
||||
return transitionStateBinding === YEETED && !panelCardStillInPIP.get();
|
||||
}
|
||||
|
||||
function f_119150(a0, a1) { // fn#119150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:15301, offset: 0x024fee45, size: 69 bytes, params: 3, frame: 12
|
||||
var r0;
|
||||
let value = a0;
|
||||
if (value) {
|
||||
value = a1 !== value;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
if (r0) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env0_4)();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119110() { // fn#119110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:6900, offset: 0x024fd9e7, size: 41 bytes, params: 1, frame: 14
|
||||
const env0_0 = global.setTimeout(_fun119111, 200);
|
||||
return _fun119112;
|
||||
}
|
||||
|
||||
function usePIPGestureU() { // fn#119113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:7019, owner: VoicePanelPIP.usePIPGesture.U, offset: 0x024fda28, size: 473 bytes, params: 1, frame: 24
|
||||
let binding = env0_13;
|
||||
const width = binding.width;
|
||||
const showSecondaryPIP = binding.showSecondaryPIP;
|
||||
binding = env0_13;
|
||||
const r3 = showSecondaryPIP ? binding.containerHeight : binding.height;
|
||||
const value3 = undefined;
|
||||
const voicePanelPIPUtilsModule = require(15439) /* metro dependency 15439: VoicePanelPIPUtils */;
|
||||
const getClampedPIPPosition = voicePanelPIPUtilsModule.getClampedPIPPosition;
|
||||
let object2 = {};
|
||||
const wrapperDimensionsBinding = wrapperDimensions;
|
||||
let get = wrapperDimensionsBinding.get;
|
||||
object2.pipX = Reflect.apply(get, wrapperDimensionsBinding, []).pipX;
|
||||
get = wrapperDimensionsBinding.get;
|
||||
object2.pipY = Reflect.apply(get, wrapperDimensionsBinding, []).pipY;
|
||||
object2.width = width;
|
||||
object2.height = r3;
|
||||
object2.windowDimensions = windowDimensions.get();
|
||||
object2.safeArea = safeArea.get();
|
||||
const pipAvoidanceSpecsBinding = pipAvoidanceSpecs;
|
||||
get = pipAvoidanceSpecsBinding.get;
|
||||
object2.bottomAvoidanceRegion = Reflect.apply(get, pipAvoidanceSpecsBinding, []).bottom;
|
||||
get = pipAvoidanceSpecsBinding.get;
|
||||
object2.topAvoidanceRegion = Reflect.apply(get, pipAvoidanceSpecsBinding, []).top;
|
||||
binding = env0_14;
|
||||
get = binding.get;
|
||||
object2.positionOffset = Reflect.apply(get, binding, []).active ? env0_14.get() : value3;
|
||||
const {x, y} = Reflect.apply(getClampedPIPPosition, voicePanelPIPUtilsModule, [object2]);
|
||||
object2 = {width: width, height: r3};
|
||||
object2.opacity = env0_15.get();
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
binding = env0_14;
|
||||
get = binding.get;
|
||||
const items2 = [{translateX: Reflect.apply(withSpring, springModule, [x, Reflect.apply(get, binding,
|
||||
[]).active ? DRAWER_SPRING_PHYSICS : env2_17])}];
|
||||
const moduleValue3 = springModule;
|
||||
withSpring = moduleValue3.withSpring;
|
||||
binding = env0_14;
|
||||
get = binding.get;
|
||||
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue3, [y, Reflect.apply(get, binding,
|
||||
[]).active ? DRAWER_SPRING_PHYSICS : env2_17])};
|
||||
object2.transform = items2;
|
||||
object2.borderRadius = voicePanelPIPUtilsModule.getVoicePanelPIPBorderRadius(width, r3);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function usePIPGestureJ() { // fn#119114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:7968, owner: VoicePanelPIP.usePIPGesture.j, offset: 0x024fdc01, size: 70 bytes, params: 1, frame: 15
|
||||
const {width, height} = env0_13;
|
||||
const object2 = {width: width, height: height};
|
||||
const value = environment.__proto__.__proto__;
|
||||
object2.borderRadius = (require(15439) /* metro dependency 15439: VoicePanelPIPUtils */).getVoicePanelPIPBorderRadius(width,
|
||||
height);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun119115() { // fn#119115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:8239, offset: 0x024fdc47, size: 112 bytes, params: 1, frame: 16
|
||||
const stylesBinding = styles;
|
||||
const items2 = [stylesBinding.pipContentWrapper];
|
||||
const object2 = {};
|
||||
const binding = env0_13;
|
||||
object2.width = binding.width;
|
||||
object2.height = binding.height;
|
||||
const value = environment.__proto__.__proto__;
|
||||
object2.borderRadius = (require(15439) /* metro dependency 15439: VoicePanelPIPUtils */).getVoicePanelPIPBorderRadius(binding.width,
|
||||
binding.height);
|
||||
items2[1] = object2;
|
||||
items2[2] = stylesBinding.inAppElevationShadow;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun119116() { // fn#119116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:8429, offset: 0x024fdcb7, size: 765 bytes, params: 1, frame: 24
|
||||
var object2;
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const shouldCancelWhenOutside2 = Gesture.Pan().enabled(true).manualActivation(true).maxPointers(1).shouldCancelWhenOutside(false);
|
||||
const onBegin = shouldCancelWhenOutside2.onBegin;
|
||||
let closure = c_119117;
|
||||
const binding = env0_14;
|
||||
closure.__closure = {initialGestureOffset: binding};
|
||||
closure.__workletHash = 4684366251999;
|
||||
closure.__initData = env2_29;
|
||||
const value7 = Reflect.apply(onBegin, shouldCancelWhenOutside2, [closure]);
|
||||
const onTouchesUp = value7.onTouchesUp;
|
||||
closure = l_119118;
|
||||
object2 = {};
|
||||
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
||||
object2.initialGestureOffset = binding;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 17295075038028;
|
||||
closure.__initData = env2_28;
|
||||
const value8 = Reflect.apply(onTouchesUp, value7, [closure]);
|
||||
const onTouchesMove = value8.onTouchesMove;
|
||||
closure = u_119119;
|
||||
object2 = {};
|
||||
const State = (require(5321) /* metro dependency 5321 */).State;
|
||||
object2.State = State;
|
||||
object2.initialGestureOffset = binding;
|
||||
object2.MIN_GESTURE_START = 10;
|
||||
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
||||
const wrapperOffsetBinding = wrapperOffset;
|
||||
object2.wrapperOffset = wrapperOffsetBinding;
|
||||
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.runOnJS = runOnJS;
|
||||
object2.triggerIOSHaptic = importDefault(15446) /* metro dependency 15446: triggerIOSHaptic */;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 16714994610987;
|
||||
closure.__initData = env2_27;
|
||||
const value9 = Reflect.apply(onTouchesMove, value8, [closure]);
|
||||
const onChange = value9.onChange;
|
||||
closure = o_119120;
|
||||
closure.__closure = {updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */,
|
||||
initialGestureOffset: binding};
|
||||
closure.__workletHash = 7822444262980;
|
||||
closure.__initData = env2_26;
|
||||
const value10 = Reflect.apply(onChange, value9, [closure]);
|
||||
const onEnd = value10.onEnd;
|
||||
closure = s_119121;
|
||||
object2 = {};
|
||||
object2.calculatePIPPositionFromVelocity = (require(15439) /* metro dependency 15439: VoicePanelPIPUtils */).calculatePIPPositionFromVelocity;
|
||||
object2.windowDimensions = windowDimensions;
|
||||
object2.safeArea = safeArea;
|
||||
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
||||
object2.wrapperDimensions = wrapperDimensions;
|
||||
object2.wrapperOffset = wrapperOffsetBinding;
|
||||
object2.initialGestureOffset = binding;
|
||||
object2.runOnJS = runOnJS;
|
||||
object2.updateSourceTrackingView = (importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */).updateSourceTrackingView;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 1502716164658;
|
||||
closure.__initData = env2_25;
|
||||
const value11 = Reflect.apply(onEnd, value10, [closure]);
|
||||
const onTouchesCancelled = value11.onTouchesCancelled;
|
||||
closure = n_119122;
|
||||
closure.__closure = {updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */,
|
||||
initialGestureOffset: binding};
|
||||
closure.__workletHash = 4606005866023;
|
||||
closure.__initData = env2_24;
|
||||
const value12 = Reflect.apply(onTouchesCancelled, value11, [closure]);
|
||||
const onFinalize = value12.onFinalize;
|
||||
closure = t_119123;
|
||||
closure.__closure = {updateSharedValueIfChanged: importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */,
|
||||
initialGestureOffset: binding};
|
||||
closure.__workletHash = 5443656412422;
|
||||
closure.__initData = env2_23;
|
||||
return Reflect.apply(onFinalize, value12, [closure]);
|
||||
}
|
||||
|
||||
function _fun119124() { // fn#119124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:10868, offset: 0x024fe334, size: 408 bytes, params: 1, frame: 27
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const Exclusive = Gesture.Exclusive;
|
||||
const Gesture2 = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value2 = Gesture2.Tap();
|
||||
const enabled = value2.enabled;
|
||||
const binding = env0_0;
|
||||
const IN_APP = VoicePanelPIPModes.IN_APP;
|
||||
const value5 = Reflect.apply(enabled, value2, [binding !== IN_APP]).maxDistance(30);
|
||||
let onStart = value5.onStart;
|
||||
let closure = s_119125;
|
||||
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
closure.__closure = {runOnJS: runOnJS, setFocused: setFocused};
|
||||
closure.__workletHash = 10703348418884;
|
||||
closure.__initData = env2_30;
|
||||
const value7 = Reflect.apply(onStart, value5, [closure]).numberOfTaps(2);
|
||||
const Gesture3 = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value10 = Gesture3.Tap().enabled(true).maxDistance(30);
|
||||
onStart = value10.onStart;
|
||||
closure = n_119126;
|
||||
closure.__closure = {pipMode: binding, VoicePanelPIPModes: VoicePanelPIPModes, runOnJS: runOnJS, setMode: setMode,
|
||||
VoicePanelModes: VoicePanelModes, controlsSpecs: controlsSpecs,
|
||||
VoicePanelControlsModes: VoicePanelControlsModes, showControls: showControls, hideControls: hideControls};
|
||||
closure.__workletHash = 9532493963151;
|
||||
closure.__initData = env2_31;
|
||||
return Reflect.apply(Exclusive, Gesture, [value7, Reflect.apply(onStart, value10, [closure]), env0_16()]);
|
||||
}
|
||||
|
||||
function _fun119127() { // fn#119127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:11612, offset: 0x024fe5c2, size: 107 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__.__proto__;
|
||||
const embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(EmbeddedActivitiesStore.getCurrentEmbeddedActivity()?.location);
|
||||
const getConnectedFrame = FramesStore.getConnectedFrame;
|
||||
return {currentEmbeddedActivityIsNotInCurrentChannel: embeddedActivityLocationChannelId !== channelId,
|
||||
hasFrame: Reflect.apply(getConnectedFrame, FramesStore, []) != null};
|
||||
}
|
||||
|
||||
function _fun119128() { // fn#119128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:11914, offset: 0x024fe62d, size: 147 bytes, params: 1, frame: 12
|
||||
var setModeBinding;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var defaultImport;
|
||||
if (currentEmbeddedActivityIsNotInCurrentChannel) {
|
||||
setModeBinding = setMode;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
setModeBinding(VoicePanelModes.PIP);
|
||||
setFocused(null);
|
||||
}
|
||||
if (hasFrame) {
|
||||
defaultImport = importDefault(8087) /* metro dependency 8087: FramesActionCreatorsNative */;
|
||||
defaultImport.updateFramePanelMode(ActivityPanelModes.PANEL);
|
||||
} else {
|
||||
moduleValue = importAll(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */;
|
||||
moduleValue.updateActivityPanelMode(ActivityPanelModes.PANEL);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119129() { // fn#119129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:12171, offset: 0x024fe6c0, size: 181 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const Exclusive = Gesture.Exclusive;
|
||||
const Gesture2 = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value3 = Gesture2.Tap().maxDistance(30);
|
||||
const onStart = value3.onStart;
|
||||
const closure = t_119130;
|
||||
const object2 = {};
|
||||
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.handleSecondaryPIPTap = env0_19;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 8361527940381;
|
||||
closure.__initData = env2_32;
|
||||
return Reflect.apply(Exclusive, Gesture, [Reflect.apply(onStart, value3, [closure]), env0_16()]);
|
||||
}
|
||||
|
||||
function onAccessibilityAction_119137() { // fn#119137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:13410, offset: 0x024fe92e, size: 105 bytes, params: 1, frame: 12
|
||||
var moduleValue;
|
||||
var defaultImport;
|
||||
if (env1_4) {
|
||||
defaultImport = importDefault(8087) /* metro dependency 8087: FramesActionCreatorsNative */;
|
||||
defaultImport.updateFramePanelMode(ActivityPanelModes.PANEL);
|
||||
} else {
|
||||
moduleValue = importAll(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */;
|
||||
moduleValue.updateActivityPanelMode(ActivityPanelModes.PANEL);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119148() { // fn#119148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:14936, offset: 0x024fedc8, size: 56 bytes, params: 1, frame: 13
|
||||
if (env1_3.current != null) {
|
||||
global.clearTimeout(env1_3.current);
|
||||
env1_3.current = null;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119111() { // fn#119111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:6923, offset: 0x024fda10, size: 24 bytes, params: 1, frame: 11
|
||||
env1_15.set(1);
|
||||
}
|
||||
|
||||
function c_119117({absoluteX, absoluteY}) { // fn#119117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:8551, offset: 0x024fdfb4, size: 62 bytes, params: 2, frame: 13
|
||||
env1_14.set({'x': 0, 'y': 0, 'absoluteX': null, 'absoluteY': null, 'active': false, 'pressed': true,
|
||||
absoluteX: absoluteX, absoluteY: absoluteY});
|
||||
}
|
||||
|
||||
function l_119118() { // fn#119118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:8751, offset: 0x024fdff2, size: 49 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_14, {pressed: false});
|
||||
}
|
||||
|
||||
function u_119119(a0, a1) { // fn#119119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:8927, offset: 0x024fe023, size: 347 bytes, params: 3, frame: 21
|
||||
var value2;
|
||||
var binding;
|
||||
var property;
|
||||
var absoluteY;
|
||||
var absoluteX;
|
||||
var Math;
|
||||
var abs;
|
||||
const state = a0.state;
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
const State = (require(5321) /* metro dependency 5321 */).State;
|
||||
const BEGAN = State.BEGAN;
|
||||
if (state === BEGAN) {
|
||||
value2 = environment.__proto__;
|
||||
binding = env1_14;
|
||||
if (!binding.get().active) {
|
||||
property = a0.changedTouches[0];
|
||||
absoluteY = property.absoluteY;
|
||||
absoluteX = property.absoluteX;
|
||||
Math = global.Math;
|
||||
abs = Math.abs;
|
||||
binding = env1_14;
|
||||
if (Reflect.apply(abs, Math,
|
||||
[binding.get().absoluteX - absoluteX]) > 10 || global.Math.abs(env1_14.get().absoluteY - absoluteY) > 10) {
|
||||
env1_14.set({'x': 0, 'y': 0, 'absoluteX': null, 'absoluteY': null, 'pressed': true, 'active': true,
|
||||
absoluteX: absoluteX, absoluteY: absoluteY});
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
|
||||
{'gestureActive': true, 'x': 0, 'y': 0});
|
||||
a1.activate();
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(importDefault(15446) /* metro dependency 15446: triggerIOSHaptic */)();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function o_119120({absoluteX, absoluteY}) { // fn#119120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:9507, offset: 0x024fe17e, size: 103 bytes, params: 2, frame: 16
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
||||
const binding = env1_14;
|
||||
const object2 = {};
|
||||
let get = binding.get;
|
||||
object2.x = absoluteX - Reflect.apply(get, binding, []).absoluteX;
|
||||
get = binding.get;
|
||||
object2.y = absoluteY - Reflect.apply(get, binding, []).absoluteY;
|
||||
value(binding, object2);
|
||||
}
|
||||
|
||||
function s_119121({velocityX, velocityY, absoluteX, absoluteY}) { // fn#119121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:9733, offset: 0x024fe1e5, size: 281 bytes, params: 2, frame: 20
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
const voicePanelPIPUtilsModule = require(15439) /* metro dependency 15439: VoicePanelPIPUtils */;
|
||||
const calculatePIPPositionFromVelocity = voicePanelPIPUtilsModule.calculatePIPPositionFromVelocity;
|
||||
const object2 = {velocityX: velocityX, velocityY: velocityY, absoluteX: absoluteX, absoluteY: absoluteY};
|
||||
object2.windowDimensions = windowDimensions.get();
|
||||
object2.safeArea = safeArea.get();
|
||||
const value3 = Reflect.apply(calculatePIPPositionFromVelocity, voicePanelPIPUtilsModule, [object2]);
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperDimensions,
|
||||
{pipX: value3.pipX, pipY: value3.pipY});
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(wrapperOffset,
|
||||
{gestureActive: false});
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_14, {'active': false,
|
||||
'pressed': false});
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS((importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */).updateSourceTrackingView)();
|
||||
}
|
||||
|
||||
function n_119122() { // fn#119122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:10470, offset: 0x024fe2fe, size: 54 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_14, {'active': false,
|
||||
'pressed': false});
|
||||
}
|
||||
|
||||
function s_119125() { // fn#119125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:10979, offset: 0x024fe4cc, size: 51 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value, [setFocused]);
|
||||
value(null);
|
||||
}
|
||||
|
||||
function n_119126() { // fn#119126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:11197, offset: 0x024fe4ff, size: 195 bytes, params: 1, frame: 14
|
||||
var controlsSpecsBinding;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_0;
|
||||
const IN_APP = VoicePanelPIPModes.IN_APP;
|
||||
if (binding === IN_APP) {
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue3.runOnJS(setMode)(VoicePanelModes.PANEL);
|
||||
} else {
|
||||
controlsSpecsBinding = controlsSpecs;
|
||||
if (controlsSpecsBinding.get().mode === VoicePanelControlsModes.HIDDEN) {
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue2.runOnJS(showControls)();
|
||||
} else {
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS(hideControls)();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function t_119130() { // fn#119130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15759:12261, offset: 0x024fe775, size: 48 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env1_19)();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 15440; source: modules/voice_panel/native/pip/VoicePanelPIPConstants.tsx; dependencies: [2] */
|
||||
function _fun118146(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15637:6, offset: 0x024cdb4a, size: 182 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPConstants.tsx');
|
||||
exports.VoicePanelPIPModes = {IN_APP: 'IN_APP', IN_PANEL: 'IN_PANEL'};
|
||||
exports.PIP_OFFSET_BOTTOM = 44;
|
||||
exports.PIPReferenceDimensions = {'width': 200, 'height': 200};
|
||||
exports.SquarePIPReferenceDimensions = {'width': 120, 'height': 120};
|
||||
exports.SquareActivityPIPReferenceDimensions = {'width': 96, 'height': 96};
|
||||
exports.DEFAULT_PIP_POSITION_OFFSET = 72;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,837 @@
|
||||
/* Metro module 15563; source: modules/voice_panel/native/pip/VoicePanelPIPContent.tsx; dependencies: [57, 31, 27, 1378, 4606, 7730, 4492, 1226, 1379, 1878, 11795, 15440, 661, 4237, 4299, 33, 4501, 697, 11794, 15434, 10688, 1239, 4508, 15444, 6821, 15439, 632, 1478, 4017, 10704, 8468, 10678, 10692, 1305, 9149, 11797, 8141, 15357, 10684, 10674, 9933, 2] */
|
||||
function _fun119152(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:6, offset: 0x024feefa, size: 1090 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_119155 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const markContentReady = function() {
|
||||
var ComponentDispatch = require(dependencyMap[21]).ComponentDispatch;
|
||||
ComponentDispatch.dispatch(ComponentActions.VOICE_PANEL_PIP_CONTENT_READY);
|
||||
};
|
||||
const getFocusedKey = function(a0) {
|
||||
return a0.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 */;
|
||||
let value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.PixelRatio;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
|
||||
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_13 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
|
||||
const env0_14 = (require(15440) /* metro dependency 15440: VoicePanelPIPConstants */).VoicePanelPIPModes;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_15 = constantsModule.ApplicationStreamStates;
|
||||
const env0_16 = constantsModule.ComponentActions;
|
||||
const constantsModule2 = require(4237) /* metro dependency 4237: Constants */;
|
||||
const env0_17 = constantsModule2.ActivityLayoutMode;
|
||||
const env0_18 = constantsModule2.OrientationLockState;
|
||||
const callConstantsModule = require(4299) /* metro dependency 4299: CallConstants */;
|
||||
const env0_19 = callConstantsModule.ParticipantTypes;
|
||||
const env0_20 = callConstantsModule.isActivityParticipant;
|
||||
const value6 = require(33) /* metro dependency 33 */;
|
||||
const env0_21 = value6.jsx;
|
||||
const env0_22 = value6.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {contentWrapper: {'position': 'absolute', 'width': '100%', 'height': '100%', 'overflow': 'hidden',
|
||||
'alignItems': 'center', 'justifyContent': 'center'}};
|
||||
object2.userOpacity = {opacity: 0.1};
|
||||
object2.activity = {'position': 'absolute', 'width': '100%', 'height': '100%'};
|
||||
object2.user = {'position': 'absolute', 'width': '100%', 'height': '100%', 'alignItems': 'center',
|
||||
'justifyContent': 'center'};
|
||||
object2.video = {'position': 'absolute', 'width': '100%', 'height': '100%'};
|
||||
object2.avatarWrapper = {'position': 'relative', 'width': '56%', 'height': '56%', 'alignItems': 'center',
|
||||
'justifyContent': 'center'};
|
||||
const object4 = {'width': 22, 'height': 22, 'backgroundColor': 'rgba(78, 80, 88, 0.48)', 'borderRadius': null,
|
||||
'justifyContent': 'center', 'alignItems': 'center', 'position': 'absolute', 'top': 6, 'left': 6};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.thermalAlertIconContainer = object4;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.thermalAlertIcon = {'width': 14, 'height': 14, color: WHITE};
|
||||
object2.onTop = {zIndex: 1};
|
||||
object2.onBottom = {zIndex: 0};
|
||||
object2.streamEmptyImage = {width: '50%'};
|
||||
const object5 = {};
|
||||
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object5['backgroundColor'] = BLACK;
|
||||
object2.emptyPip = object5;
|
||||
object2.innerStroke = {'position': 'absolute', 'top': -1, 'left': -1, 'bottom': -1, 'right': -1, 'borderWidth': 2,
|
||||
'borderColor': 'white', 'zIndex': 1, 'opacity': 0.3};
|
||||
object2.blackBackground = {backgroundColor: 'black'};
|
||||
const env0_23 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
object2 = {code: 'function VoicePanelPIPContentTsx1(){const{windowDimensions}=this.__closure;return windowDimensions.get();}'};
|
||||
object2 = {code: 'function VoicePanelPIPContentTsx2(windowDimensionsVal,previousWindowDimensionsVal){const{runOnJS,handleTargetAspectRatioParams}=this.__closure;if(windowDimensionsVal!==previousWindowDimensionsVal){runOnJS(handleTargetAspectRatioParams)(windowDimensionsVal);}}'};
|
||||
object2 = {code: 'function VoicePanelPIPContentTsx3(){const{focused}=this.__closure;var _focused$get;return(_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id;}'};
|
||||
object2 = {code: 'function VoicePanelPIPContentTsx4(focusedParticipantId,previousFocusedParticipantId){const{runOnJS,updateIsActivityFocused,mode}=this.__closure;if(focusedParticipantId!==previousFocusedParticipantId){runOnJS(updateIsActivityFocused)(focusedParticipantId,mode.get());}}'};
|
||||
object2 = {code: 'function VoicePanelPIPContentTsx5(){const{mode}=this.__closure;return mode.get();}'};
|
||||
object2 = {code: 'function VoicePanelPIPContentTsx6(modeVal,previousModeVal){const{runOnJS,updateIsActivityFocused,focused}=this.__closure;if(modeVal!==previousModeVal){var _focused$get;runOnJS(updateIsActivityFocused)((_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id,modeVal);}}'};
|
||||
object2 = {code: "function VoicePanelPIPContentTsx7(){const{targetDimensions}=this.__closure;const{width:targetWidth,height:targetHeight}=targetDimensions.get();let height='100%';let width='100%';if(targetHeight<targetWidth){width='auto';}else{height='auto';}return{position:'absolute',aspectRatio:targetWidth/targetHeight,width:width,height:height};}"};
|
||||
const env0_31 = value.memo(EmptyPIP);
|
||||
value = value.memo(VoicePanelPIPContent);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPContent.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_119153(a0, a1) { // fn#119153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:500, offset: 0x024ff33c, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun119154;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_119155(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_119155(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_119155(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun119154;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function VideoStream(a0) { // fn#119156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:2479, offset: 0x024ff4b0, size: 162 bytes, params: 2, frame: 20
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
env0_4.useEffect(_fun119157,
|
||||
[(require(15434) /* metro dependency 15434: VoicePanelStreamOutputSinkStack */).useSetHasActiveVideoOutputSink(Reflect.apply(useContext,
|
||||
binding, [importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).streamOutputSinkStack),
|
||||
a0.streamId]);
|
||||
return ((Component) => <Component {...a0} />)(importDefault(10688) /* metro dependency 10688: VideoRendererNativeComponent */);
|
||||
}
|
||||
|
||||
function useTransitionStyles(a0, a1, a2) { // fn#119160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:2804, offset: 0x024ff5cc, size: 110 bytes, params: 4, frame: 18
|
||||
const env0_0 = a1;
|
||||
const env0_1 = a2;
|
||||
env0_4.useEffect(_fun119161, [a1, a2]);
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
const YEETED = TransitionStates.YEETED;
|
||||
return a1 === YEETED ? a0.onTop : a0.onBottom;
|
||||
}
|
||||
|
||||
function InnerStroke({style}) { // fn#119166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:3312, offset: 0x024ff78c, size: 161 bytes, params: 2, frame: 21
|
||||
const {width, height} = (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState();
|
||||
const styles = useStyles();
|
||||
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
|
||||
const binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
return (
|
||||
<NativeView
|
||||
style={Reflect.apply(useMemo, binding, [function() {
|
||||
var items = [styles.innerStroke];
|
||||
var object = {};
|
||||
object.borderRadius = require(dependencyMap[25]).getVoicePanelPIPBorderRadius(width, height) + 1;
|
||||
items[1] = object;
|
||||
items[2] = style;
|
||||
return items;
|
||||
}, [width, height, styles.innerStroke, style]])}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ActivityInVoice({participantId, transitionState, transitionCleanUp}) { // fn#119168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:3939, offset: 0x024ff88a, size: 779 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
const value2 = useTransitionStyles(styles, transitionState, transitionCleanUp);
|
||||
let binding = env0_4;
|
||||
const {channelId, layoutManager,
|
||||
windowDimensions} = binding.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
|
||||
const env0_3 = windowDimensions;
|
||||
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
|
||||
function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
const MOUNTED = TransitionStates.MOUNTED;
|
||||
const value5 = env0_3(Reflect.apply(useState, binding, [transitionState === MOUNTED]), 2);
|
||||
const property = value5[0];
|
||||
var env0_4 = property;
|
||||
const env0_5 = value5[1];
|
||||
const value6 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelRTCStore],
|
||||
function() {
|
||||
var value3 = ChannelRTCStore.getParticipant(channelId, participantId);
|
||||
return value3 == null || value3.type !== ParticipantTypes.ACTIVITY ? participantId : value3.applicationId;
|
||||
}, [channelId, participantId]);
|
||||
const value8 = env0_4.useCallback(_fun119172, [layoutManager,
|
||||
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([EmbeddedActivitiesStore],
|
||||
_fun119171, [value6]), value6]);
|
||||
env0_4.useLayoutEffect(_fun119173, [value8]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
const closure = function() {
|
||||
return windowDimensions.get();
|
||||
};
|
||||
closure.__closure = {windowDimensions: windowDimensions};
|
||||
closure.__workletHash = 20962628184;
|
||||
closure.__initData = env0_24;
|
||||
const closure2 = ActivityInVoiceU;
|
||||
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, handleTargetAspectRatioParams: value8};
|
||||
closure2.__workletHash = 10001753822389;
|
||||
closure2.__initData = env0_25;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
const value10 = channel != null;
|
||||
env0_4.useEffect(_fun119176, [value10, property]);
|
||||
return property ? null : value10 ? ((Component) => <Component style={[styles.activity,
|
||||
value2]}>{((Component) => <Component channel={channel} layoutMode={ActivityLayoutMode.PIP} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */)}<InnerStroke /></Component>)(importDefault(6821) /* metro dependency 6821: NativeView */) : <User_119179 participantId={AuthenticationStore.getId()} />;
|
||||
}
|
||||
|
||||
function User_119179({participantId, transitionState, transitionCleanUp}) { // fn#119179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:6315, offset: 0x024ffdac, size: 1507 bytes, params: 2, frame: 40
|
||||
var object5;
|
||||
var r18;
|
||||
var NativeView;
|
||||
var Avatar;
|
||||
var object2;
|
||||
var moduleValue8;
|
||||
var AvatarSizes;
|
||||
var items2;
|
||||
var NativeView2;
|
||||
var Icon;
|
||||
var object4;
|
||||
var thermalAlertIcon;
|
||||
var items4;
|
||||
const styles = useStyles();
|
||||
let value3 = useTransitionStyles(styles, transitionState, transitionCleanUp);
|
||||
let value4 = env0_4.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
|
||||
const channelId = value4.channelId;
|
||||
const env0_3 = channelId;
|
||||
const guildId = value4.guildId;
|
||||
const focused = value4.focused;
|
||||
var env0_4 = focused;
|
||||
const mode = value4.mode;
|
||||
const layoutManager = value4.layoutManager;
|
||||
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelRTCStore],
|
||||
function() {
|
||||
var value3 = ChannelRTCStore.getParticipant(channelId, participantId);
|
||||
var value4 = undefined;
|
||||
var r1 = value3 ?? value4;
|
||||
return (r1 == null ? value4 : r1.type) !== ParticipantTypes.USER ? value4 : r1;
|
||||
});
|
||||
const user = value5?.user;
|
||||
const r28 = user ?? UserStore.getCurrentUser();
|
||||
const value10 = env0_4.useMemo(_fun119181, [styles, value3,
|
||||
(require(8468) /* metro dependency 8468: DominantColorUtils */).useDominantColorFromImage(r28?.getAvatarURL(guildId,
|
||||
80, false))]);
|
||||
const [property, env0_8] = env0_3(env0_4.useState(false), 2);
|
||||
const value13 = (require(10678) /* metro dependency 10678: SurfaceDirectRendererExperiment */).useSurfaceDirectRendererExperiment(value5 == null || value5.user == null ? undefined : value5.user.id,
|
||||
{location: 'VoicePanelPIPContent'});
|
||||
const value14 = env0_4.useCallback(_fun119182, [channelId]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
let closure = User_119179P;
|
||||
closure.__closure = {focused: focused};
|
||||
closure.__workletHash = 3980010676581;
|
||||
closure.__initData = env0_26;
|
||||
const closure2 = User_119179L;
|
||||
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, updateIsActivityFocused: value14, mode: mode};
|
||||
closure2.__workletHash = 5971237403457;
|
||||
closure2.__initData = env0_27;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
useAnimatedReaction = moduleValue5.useAnimatedReaction;
|
||||
closure = function() {
|
||||
return mode.get();
|
||||
};
|
||||
closure.__closure = {mode: mode};
|
||||
closure.__workletHash = 8288240256860;
|
||||
closure.__initData = env0_28;
|
||||
const closure3 = User_119179S;
|
||||
closure3.__closure = {runOnJS: reanimatedRexportModule.runOnJS, updateIsActivityFocused: value14, focused: focused};
|
||||
closure3.__workletHash = 12552370107483;
|
||||
closure3.__initData = env0_29;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue5, [closure, closure3]);
|
||||
const {isReactingToThermalState,
|
||||
consumedRequestToRespondToSeriousThermalState} = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([ChannelCallLifecycleStore],
|
||||
function() {
|
||||
var object = {};
|
||||
object.isReactingToThermalState = ChannelCallLifecycleStore.isReactingToThermalState();
|
||||
object.consumedRequestToRespondToSeriousThermalState = ChannelCallLifecycleStore.consumedRequestToRespondToSeriousThermalState();
|
||||
return object;
|
||||
});
|
||||
const value16 = env0_4.useCallback(function({nativeEvent}) {
|
||||
var width = nativeEvent.width;
|
||||
nativeEvent = nativeEvent.height;
|
||||
layoutManager.setTargetDimensions(participantId, width, nativeEvent);
|
||||
}, [layoutManager, participantId]);
|
||||
let r5 = (require(10692) /* metro dependency 10692: participantHasVideo */).useCanRenderParticipantVideo(value5) && !(property && isReactingToThermalState);
|
||||
env0_4.useEffect(_fun119189, [r5]);
|
||||
const NativeView3 = importDefault(6821) /* metro dependency 6821: NativeView */;
|
||||
object5 = {};
|
||||
if (r5) {
|
||||
object5.style = [styles.blackBackground, styles.user];
|
||||
items4 = [<AnimatedVideoWrapper style={value3} participantId={participantId}><VideoStream useSurfaceDirectRenderer={value13} streamId={value5.streamId} style={[styles.video,
|
||||
|
||||
undefined]} onSize={value16} onReady={markContentReady} /></AnimatedVideoWrapper>];
|
||||
items4[1] = <InnerStroke />;
|
||||
object5.children = items4;
|
||||
} else {
|
||||
object5.style = value10;
|
||||
NativeView = NativeView3;
|
||||
var defaultImport2Props = {style: styles.avatarWrapper};
|
||||
if (r28 != null) {
|
||||
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
object2 = {};
|
||||
moduleValue8 = require(8468) /* metro dependency 8468: DominantColorUtils */;
|
||||
object2.source = moduleValue8.getCachedSourceFromURI(r28.getAvatarURL(guildId, 80, false));
|
||||
AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
object2.size = property ? AvatarSizes.LARGE : AvatarSizes.XLARGE;
|
||||
object2.avatarDecoration = value5?.userAvatarDecoration;
|
||||
r18 = <Avatar {...object2} />;
|
||||
} else {
|
||||
r18 = null;
|
||||
}
|
||||
items2 = [<NativeView {...defaultImport2Props}>{r18}</NativeView>];
|
||||
items2[1] = <InnerStroke style={styles.userOpacity} />;
|
||||
if (property) {
|
||||
if (consumedRequestToRespondToSeriousThermalState) {
|
||||
NativeView2 = importDefault(6821) /* metro dependency 6821: NativeView */;
|
||||
var defaultImport3Props = {style: styles.thermalAlertIconContainer};
|
||||
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
object4 = {};
|
||||
thermalAlertIcon = styles.thermalAlertIcon;
|
||||
object4.style = thermalAlertIcon;
|
||||
object4.source = importDefault(9149) /* metro dependency 9149 */;
|
||||
thermalAlertIcon = styles.thermalAlertIcon;
|
||||
object4.color = thermalAlertIcon.color;
|
||||
r5 = <NativeView2 {...defaultImport3Props}><Icon {...object4} /></NativeView2>;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
items2[2] = r5;
|
||||
object5.children = items2;
|
||||
}
|
||||
return <NativeView3 {...object5} />;
|
||||
}
|
||||
|
||||
function AnimatedVideoWrapper({participantId, style, children}) { // fn#119190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:9353, offset: 0x025005ab, size: 214 bytes, params: 2, frame: 21
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const value2 = (require(11797) /* metro dependency 11797: VoicePanelCardLayoutManager */).useTargetDimensionsSubscription(participantId,
|
||||
Reflect.apply(useContext, binding,
|
||||
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).layoutManager);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = AnimatedVideoWrapperA;
|
||||
closure.__closure = {targetDimensions: value2};
|
||||
closure.__workletHash = 10377220209728;
|
||||
closure.__initData = env0_30;
|
||||
return ((Component) => <Component style={[style, Reflect.apply(useAnimatedStyle, reanimatedRexportModule,
|
||||
[closure])]}>{children}</Component>)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
|
||||
}
|
||||
|
||||
function Stream({participantId, transitionState, transitionCleanUp}) { // fn#119192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:9822, offset: 0x025006d5, size: 758 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const voicePanelPIPStateContextModule = require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */;
|
||||
const usePIPState = voicePanelPIPStateContextModule.usePIPState;
|
||||
const mode = Reflect.apply(usePIPState, voicePanelPIPStateContextModule, []).mode;
|
||||
const value2 = useTransitionStyles(styles, transitionState, transitionCleanUp);
|
||||
const value3 = env0_4.useContext(importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */);
|
||||
const env0_2 = value3.channelId;
|
||||
const layoutManager = value3.layoutManager;
|
||||
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([ChannelRTCStore],
|
||||
_fun119193);
|
||||
const streamId = value4.streamId;
|
||||
var env0_4 = streamId;
|
||||
const userId = value4.userId;
|
||||
const value5 = (require(10678) /* metro dependency 10678: SurfaceDirectRendererExperiment */).useSurfaceDirectRendererExperiment(userId,
|
||||
{location: 'VoicePanelPIPContent.Stream'});
|
||||
const value6 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ApplicationStreamingStore],
|
||||
_fun119194);
|
||||
const value7 = env0_4.useCallback(function({nativeEvent}) {
|
||||
var width = nativeEvent.width;
|
||||
nativeEvent = nativeEvent.height;
|
||||
layoutManager.setTargetDimensions(participantId, width, nativeEvent);
|
||||
}, [layoutManager, participantId]);
|
||||
const value8 = PixelRatio.get();
|
||||
const env0_6 = env0_4.useRef(0);
|
||||
const env0_7 = env0_4.useRef(0);
|
||||
const value9 = env0_4.useCallback(_fun119196, [streamId, value8, mode]);
|
||||
env0_4.useEffect(_fun119198, [env0_4.useCallback(_fun119197, [streamId, value8, mode])]);
|
||||
const value11 = streamId != null;
|
||||
env0_4.useEffect(_fun119200, [value11]);
|
||||
const ENDED = ApplicationStreamStates.ENDED;
|
||||
if (value6 === ENDED) {
|
||||
const StreamEnded = (require(10674) /* metro dependency 10674: StreamEnded */).StreamEnded;
|
||||
return <StreamEnded style={styles.streamEmptyImage} resizeMode="contain" />;
|
||||
} else if (value6 === ApplicationStreamStates.FAILED) {
|
||||
const StreamFailed = (require(9933) /* metro dependency 9933: StreamFailed */).StreamFailed;
|
||||
return <StreamFailed style={styles.streamEmptyImage} resizeMode="contain" />;
|
||||
} else {
|
||||
return value11 ? <AnimatedVideoWrapper style={value2} participantId={participantId}><VideoStream useSurfaceDirectRenderer={value5} streamId={streamId} style={styles.video} onSize={value7} onLayout={value9} /></AnimatedVideoWrapper> : <User_119179 participantId={participantId} />;
|
||||
}
|
||||
}
|
||||
|
||||
function renderFocusedParticipant(a0, a1, a2, a3) { // fn#119202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:11669, offset: 0x02500c27, size: 239 bytes, params: 5, frame: 19
|
||||
if (a1.id === '--voice-panel-pip-empty') {
|
||||
return ((Component) => <Component transitionState={a2} transitionCleanUp={a3} key={a0} />)(env0_31);
|
||||
}
|
||||
const object2 = {participantId: a1.id, transitionState: a2, transitionCleanUp: a3};
|
||||
const type = a1.type;
|
||||
const ACTIVITY = ParticipantTypes.ACTIVITY;
|
||||
if (ACTIVITY === type) {
|
||||
return <ActivityInVoice {...object2} key={a0} />;
|
||||
}
|
||||
const STREAM = ParticipantTypes.STREAM;
|
||||
if (STREAM === type) {
|
||||
return <Stream {...object2} key={a0} />;
|
||||
}
|
||||
const USER = ParticipantTypes.USER;
|
||||
if (USER !== type) {
|
||||
ParticipantTypes.HIDDEN_STREAM;
|
||||
}
|
||||
return <User_119179 {...object2} key={a0} />;
|
||||
}
|
||||
|
||||
function areParticipantsEqual_119203(a0, a1) { // fn#119203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:12039, offset: 0x02500d16, size: 129 bytes, params: 3, frame: 18
|
||||
var id;
|
||||
var id2;
|
||||
var property;
|
||||
var value6;
|
||||
let length = a0.length;
|
||||
if (length === a1.length) {
|
||||
length = a0.length;
|
||||
var value = 0;
|
||||
if (value === length) {
|
||||
return true;
|
||||
}
|
||||
var _createForOfIteratorHelperLoose_119153Binding = _createForOfIteratorHelperLoose_119153;
|
||||
var value3 = undefined;
|
||||
var value4 = _createForOfIteratorHelperLoose_119153Binding(a0);
|
||||
var value5 = value4();
|
||||
var done = value5.done;
|
||||
if (done) {
|
||||
return true;
|
||||
}
|
||||
var r1 = value5;
|
||||
var r5 = value;
|
||||
while (true) {
|
||||
value = r1.value;
|
||||
id2 = value.id;
|
||||
property = a1[r5];
|
||||
id = property == null ? value3 : property.id;
|
||||
if (id2 !== id) {
|
||||
break;
|
||||
}
|
||||
value = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
|
||||
value6 = value4();
|
||||
done = value6.done;
|
||||
if (done) {
|
||||
return true;
|
||||
}
|
||||
r1 = value6;
|
||||
r5 = value;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function EmptyPIP({transitionState, transitionCleanUp}) { // fn#119204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:11451, offset: 0x02500d97, size: 116 bytes, params: 2, frame: 18
|
||||
const styles = useStyles();
|
||||
env0_4.useEffect(function() {
|
||||
if (transitionState === require(dependencyMap[22]).TransitionStates.YEETED) {
|
||||
transitionCleanUp();
|
||||
}
|
||||
}, [transitionState, transitionCleanUp]);
|
||||
return ((Component) => <Component style={styles.emptyPip} />)(importDefault(6821) /* metro dependency 6821: NativeView */);
|
||||
}
|
||||
|
||||
function VoicePanelPIPContent() { // fn#119206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:12285, offset: 0x02500e45, size: 343 bytes, params: 1, frame: 27
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const channelId = Reflect.apply(useContext, binding,
|
||||
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).channelId;
|
||||
const {id, width, height} = (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState();
|
||||
const styles = useStyles();
|
||||
var env0_4 = styles;
|
||||
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelRTCStore],
|
||||
_fun119207, [id, channelId, AuthenticationStore.getId()], areParticipantsEqual_119203);
|
||||
const value5 = env0_4.useMemo(function() {
|
||||
var items = [styles.contentWrapper];
|
||||
var object = {};
|
||||
object.borderRadius = require(dependencyMap[25]).getVoicePanelPIPBorderRadius(width, height);
|
||||
items[1] = object;
|
||||
return [items];
|
||||
}, [width, height, styles.contentWrapper]);
|
||||
const NativeView = importDefault(6821) /* metro dependency 6821: NativeView */;
|
||||
const TransitionGroup = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionGroup;
|
||||
return (
|
||||
<NativeView style={value5} pointerEvents="none">
|
||||
<TransitionGroup
|
||||
items={value4}
|
||||
renderItem={renderFocusedParticipant}
|
||||
getItemKey={getFocusedKey}
|
||||
/>
|
||||
</NativeView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun119157() { // fn#119157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:2633, offset: 0x024ff552, size: 46 bytes, params: 1, frame: 13
|
||||
if (streamId != null) {
|
||||
env0_1(streamId, true);
|
||||
return _fun119158;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119161() { // fn#119161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:2860, offset: 0x024ff63a, size: 151 bytes, params: 1, frame: 16
|
||||
var ComponentDispatch;
|
||||
const closure = handleVideoReady;
|
||||
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
||||
const YEETED = TransitionStates.YEETED;
|
||||
if (require === YEETED) {
|
||||
var env0_0 = global.setTimeout(_fun119164, 500);
|
||||
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
ComponentDispatch.subscribe(ComponentActions.VOICE_PANEL_PIP_CONTENT_READY, closure);
|
||||
return _fun119165;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119171() { // fn#119171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:4444, offset: 0x024ffbd9, size: 27 bytes, params: 1, frame: 11
|
||||
return EmbeddedActivitiesStore.getPipOrientationLockStateForApp(env0_6);
|
||||
}
|
||||
|
||||
function _fun119172({width, height}) { // fn#119172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:4509, offset: 0x024ffbf4, size: 179 bytes, params: 2, frame: 18
|
||||
var layoutManagerBinding;
|
||||
var value4;
|
||||
const value = width > height;
|
||||
const binding = env0_7;
|
||||
const LANDSCAPE = OrientationLockState.LANDSCAPE;
|
||||
if (LANDSCAPE === binding) {
|
||||
layoutManager.setTargetDimensions(env0_6, 16, 9);
|
||||
} else if (OrientationLockState.PORTRAIT === binding) {
|
||||
layoutManager.setTargetDimensions(env0_6, 9, 16);
|
||||
} else if (OrientationLockState.UNLOCKED === binding) {
|
||||
layoutManagerBinding = layoutManager;
|
||||
value4 = 9;
|
||||
layoutManagerBinding.setTargetDimensions(env0_6, value ? 16 : value4, value ? value4 : 16);
|
||||
} else if (binding === null) {
|
||||
layoutManagerBinding = layoutManager;
|
||||
value4 = 9;
|
||||
layoutManagerBinding.setTargetDimensions(env0_6, value ? 16 : value4, value ? value4 : 16);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119173() { // fn#119173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:4747, offset: 0x024ffca7, size: 84 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
|
||||
value = value.getWindowDimensions();
|
||||
const binding = env0_8;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
object2['landscape'] = value.width > value.height;
|
||||
binding(object2);
|
||||
}
|
||||
|
||||
function ActivityInVoiceU(a0, a1) { // fn#119175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:4962, owner: ActivityInVoice.u, offset: 0x024ffcfb, 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_8)(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119176() { // fn#119176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:5162, offset: 0x024ffd38, size: 87 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
if (!env0_4) {
|
||||
if (result) {
|
||||
value = environment.__proto__;
|
||||
markContentReady();
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
if (env0_4) {
|
||||
var env0_0 = global.setTimeout(_fun119177, 500);
|
||||
return _fun119178;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119181() { // fn#119181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:6814, offset: 0x025003de, size: 44 bytes, params: 1, frame: 3
|
||||
const user = styles.user;
|
||||
return [user, env0_2, {backgroundColor: env0_7}];
|
||||
}
|
||||
|
||||
function _fun119182(a0, a1) { // fn#119182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:7036, offset: 0x0250040a, size: 98 bytes, params: 3, frame: 16
|
||||
const value = undefined;
|
||||
const r4 = a0 != null ? ChannelRTCStore.getParticipant(channelId, a0) : value;
|
||||
env0_8(r4 != null && isActivityParticipant(r4) && a1 === VoicePanelModes.PANEL);
|
||||
return value;
|
||||
}
|
||||
|
||||
function User_119179P() { // fn#119183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:7158, owner: User_119179.p, offset: 0x0250046c, size: 34 bytes, params: 1, frame: 10
|
||||
return focused.get()?.id;
|
||||
}
|
||||
|
||||
function User_119179L(a0, a1) { // fn#119184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:7282, owner: User_119179.l, offset: 0x0250048e, size: 75 bytes, params: 3, frame: 15
|
||||
var value;
|
||||
var modeBinding;
|
||||
if (a0 !== a1) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value = value.runOnJS(env0_9);
|
||||
modeBinding = mode;
|
||||
value(a0, modeBinding.get());
|
||||
}
|
||||
}
|
||||
|
||||
function User_119179S(a0, a1) { // fn#119186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:7575, owner: User_119179.S, offset: 0x025004d9, size: 91 bytes, params: 3, frame: 15
|
||||
var value;
|
||||
var value3;
|
||||
var value4;
|
||||
if (a0 !== a1) {
|
||||
value = environment.__proto__;
|
||||
value = undefined;
|
||||
value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_9);
|
||||
value4 = focused.get();
|
||||
value3(value4 == null ? value : value4.id, a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119189() { // fn#119189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:8231, offset: 0x02500590, size: 27 bytes, params: 1, frame: 9
|
||||
if (!env0_10) {
|
||||
value = environment.__proto__;
|
||||
markContentReady();
|
||||
}
|
||||
}
|
||||
|
||||
function AnimatedVideoWrapperA() { // fn#119191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:9548, owner: AnimatedVideoWrapper.a, offset: 0x02500681, size: 84 bytes, params: 1, frame: 14
|
||||
var r1;
|
||||
var r2;
|
||||
let value = env0_0.get();
|
||||
const width = value.width;
|
||||
const height = value.height;
|
||||
value = 'auto';
|
||||
const value2 = '100%';
|
||||
if (height < width) {
|
||||
r1 = value2;
|
||||
r2 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
r2 = value2;
|
||||
}
|
||||
return {position: 'absolute', aspectRatio: width / height, width: r2, height: r1};
|
||||
}
|
||||
|
||||
function _fun119193() { // fn#119193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:10064, offset: 0x025009cb, size: 109 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
const participant = ChannelRTCStore.getParticipant(channelId, participantId);
|
||||
const r5 = participant != null && participant.type === ParticipantTypes.STREAM;
|
||||
value = undefined;
|
||||
return {streamId: r5 ? participant.streamId : value,
|
||||
userId: r5 ? participant.user == null ? value : participant.user.id : value};
|
||||
}
|
||||
|
||||
function _fun119194() { // fn#119194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:10364, offset: 0x02500a38, size: 43 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return ApplicationStreamingStore.getActiveStreamForStreamKey(participantId)?.state;
|
||||
}
|
||||
|
||||
function _fun119196(a0) { // fn#119196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:10590, offset: 0x02500a92, size: 182 bytes, params: 2, frame: 17
|
||||
var layout;
|
||||
var width;
|
||||
var height;
|
||||
var modeBinding;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var updateVideoSize;
|
||||
var binding;
|
||||
let streamIdBinding = streamId;
|
||||
if (streamIdBinding != null) {
|
||||
layout = a0.nativeEvent.layout;
|
||||
width = layout.width;
|
||||
height = layout.height;
|
||||
if (!(width === env0_6.current && height === env0_7.current)) {
|
||||
env0_6.current = width;
|
||||
env0_7.current = height;
|
||||
modeBinding = mode;
|
||||
value4 = environment.__proto__;
|
||||
if (modeBinding === VoicePanelPIPModes.IN_APP) {
|
||||
moduleValue = require(15357) /* metro dependency 15357: VideoActionCreators */;
|
||||
updateVideoSize = moduleValue.updateVideoSize;
|
||||
streamIdBinding = streamId;
|
||||
binding = env0_5;
|
||||
Reflect.apply(updateVideoSize, moduleValue, [streamIdBinding, {width: width * binding,
|
||||
height: height * binding},
|
||||
1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119197(a0) { // fn#119197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:10807, offset: 0x02500b48, size: 138 bytes, params: 2, frame: 17
|
||||
var modeBinding;
|
||||
var updateVideoSize;
|
||||
var object2;
|
||||
var current;
|
||||
var binding;
|
||||
let value = a0;
|
||||
let r1 = streamId == null || value;
|
||||
if (!r1) {
|
||||
modeBinding = mode;
|
||||
value = environment.__proto__;
|
||||
value = modeBinding !== VoicePanelPIPModes.IN_APP;
|
||||
r1 = value;
|
||||
}
|
||||
if (!r1) {
|
||||
value = environment.__proto__;
|
||||
value = require(15357) /* metro dependency 15357: VideoActionCreators */;
|
||||
updateVideoSize = value.updateVideoSize;
|
||||
streamIdBinding = streamId;
|
||||
object2 = {};
|
||||
current = env0_6.current;
|
||||
binding = env0_5;
|
||||
object2.width = current * binding;
|
||||
current = env0_7.current;
|
||||
object2.height = current * binding;
|
||||
Reflect.apply(updateVideoSize, value, [streamIdBinding, object2, 1]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119198() { // fn#119198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:10931, offset: 0x02500bd2, size: 58 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const env0_0 = (importDefault(10684) /* metro dependency 10684: ExternalPipAndroid */).addOnPipModeChangedListener(env0_8);
|
||||
return _fun119199;
|
||||
}
|
||||
|
||||
function _fun119200() { // fn#119200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:11055, offset: 0x02500c0c, size: 27 bytes, params: 1, frame: 9
|
||||
if (result) {
|
||||
value = environment.__proto__;
|
||||
markContentReady();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun119207() { // fn#119207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:12464, offset: 0x02500f9c, size: 113 bytes, params: 1, frame: 16
|
||||
const idBinding = id;
|
||||
let r0 = idBinding != null ? ChannelRTCStore.getParticipant(channelId, idBinding)?.type : ParticipantTypes.USER;
|
||||
r0 = r0 ?? ParticipantTypes.USER;
|
||||
return [{id: idBinding ?? env0_5, type: r0}];
|
||||
}
|
||||
|
||||
function _fun119158() { // fn#119158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:2664, offset: 0x024ff580, size: 23 bytes, params: 1, frame: 13
|
||||
env1_1(streamId, false);
|
||||
}
|
||||
|
||||
function handleVideoReady() { // fn#119162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:3161, offset: 0x024ff6d1, size: 48 bytes, params: 1, frame: 13
|
||||
global.clearTimeout(env0_0);
|
||||
global.setTimeout(_fun119163, 17);
|
||||
}
|
||||
|
||||
function _fun119164() { // fn#119164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:2925, offset: 0x024ff71f, size: 30 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return importDefault?.();
|
||||
}
|
||||
|
||||
function _fun119165() { // fn#119165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:3049, offset: 0x024ff73d, size: 79 bytes, params: 1, frame: 15
|
||||
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
const unsubscribe = ComponentDispatch.unsubscribe;
|
||||
const VOICE_PANEL_PIP_CONTENT_READY = ComponentActions.VOICE_PANEL_PIP_CONTENT_READY;
|
||||
Reflect.apply(unsubscribe, ComponentDispatch, [VOICE_PANEL_PIP_CONTENT_READY, handleVideoReady]);
|
||||
global.clearTimeout(env0_0);
|
||||
}
|
||||
|
||||
function _fun119177() { // fn#119177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:5224, offset: 0x024ffd8f, size: 29 bytes, params: 1, frame: 11
|
||||
env1_5(false);
|
||||
markContentReady();
|
||||
}
|
||||
|
||||
function _fun119163() { // fn#119163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15760:3217, offset: 0x024ff701, size: 30 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return importDefault?.();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
/* Metro module 15564; source: modules/voice_panel/native/pip/VoicePanelPIPPushToTalkOverlay.tsx; dependencies: [57, 31, 27, 11795, 33, 4017, 6821, 1305, 4501, 697, 10750, 15444, 4577, 15439, 5321, 15565, 2] */
|
||||
function _fun119209(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:6, offset: 0x02501063, size: 533 bytes, params: 8, frame: 23
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const env0_5 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).PUSH_TO_TALK_PIP_PHYSICS;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.Fragment;
|
||||
const env0_8 = value.jsxs;
|
||||
value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let createAnimatedComponent = value.createAnimatedComponent;
|
||||
const env0_9 = Reflect.apply(createAnimatedComponent, value,
|
||||
[importDefault(6821) /* metro dependency 6821: NativeView */]);
|
||||
value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
createAnimatedComponent = value.createAnimatedComponent;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const env0_10 = Reflect.apply(createAnimatedComponent, value, [Icon]);
|
||||
const env0_11 = {'top': 6, 'bottom': 6, 'left': 6, 'right': 6};
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {'position': 'absolute', 'width': 32, 'height': 32, 'alignItems': 'center',
|
||||
'justifyContent': 'center'};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object4.iconContainer = object5;
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object6['backgroundColor'] = BLACK;
|
||||
object4.overlay = object6;
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object4]);
|
||||
object4 = {code: "function VoicePanelPIPPushToTalkOverlayTsx1(){const{isPushingToTalk,EXPANDED_ICON_SIZE,BASE_ICON_SIZE,withSpring,PUSH_TO_TALK_PIP_PHYSICS,white}=this.__closure;const padding=isPushingToTalk.get()?8*EXPANDED_ICON_SIZE/BASE_ICON_SIZE+8:8;return{right:withSpring(padding,PUSH_TO_TALK_PIP_PHYSICS),bottom:withSpring(padding,PUSH_TO_TALK_PIP_PHYSICS),transform:[{scale:withSpring(isPushingToTalk.get()?EXPANDED_ICON_SIZE/BASE_ICON_SIZE:1,PUSH_TO_TALK_PIP_PHYSICS)}],backgroundColor:withSpring(isPushingToTalk.get()?white:'rgba(0, 0, 0, 0.54)',PUSH_TO_TALK_PIP_PHYSICS)};}"};
|
||||
object4 = {code: 'function VoicePanelPIPPushToTalkOverlayTsx2(){const{withSpring,isPushingToTalk,black,white,PUSH_TO_TALK_PIP_PHYSICS}=this.__closure;return{tintColor:withSpring(isPushingToTalk.get()?black:white,PUSH_TO_TALK_PIP_PHYSICS)};}'};
|
||||
object4 = {code: 'function VoicePanelPIPPushToTalkOverlayTsx3(){const{withSpring,isPushingToTalk,PUSH_TO_TALK_PIP_PHYSICS,getVoicePanelPIPBorderRadius,pipState}=this.__closure;return{opacity:withSpring(isPushingToTalk.get()?0.5:0,PUSH_TO_TALK_PIP_PHYSICS),borderRadius:getVoicePanelPIPBorderRadius(pipState.width,pipState.height)};}'};
|
||||
object4 = {code: 'function VoicePanelPIPPushToTalkOverlayTsx4(event,success){const{runOnJS,handlePushToTalk}=this.__closure;if(!success){return;}runOnJS(handlePushToTalk)(false);}'};
|
||||
object4 = {code: 'function VoicePanelPIPPushToTalkOverlayTsx5(){const{runOnJS,handlePushToTalk}=this.__closure;runOnJS(handlePushToTalk)(false);}'};
|
||||
object4 = {code: 'function VoicePanelPIPPushToTalkOverlayTsx6(){const{runOnJS,handlePushToTalk}=this.__closure;runOnJS(handlePushToTalk)(true);}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPPushToTalkOverlay.tsx');
|
||||
exports.default = VoicePanelPIPPushToTalkOverlay;
|
||||
}
|
||||
|
||||
function VoicePanelPIPPushToTalkOverlay() { // fn#119210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2268, offset: 0x02501278, size: 743 bytes, params: 1, frame: 30
|
||||
const value2 = (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState();
|
||||
const styles = useStyles();
|
||||
const value4 = env0_3(usePushToTalk(), 2);
|
||||
const property = value4[0];
|
||||
const property2 = value4[1];
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
|
||||
const env0_4 = BLACK;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = VoicePanelPIPPushToTalkOverlayO;
|
||||
let object2 = {'isPushingToTalk': null, 'EXPANDED_ICON_SIZE': 48, 'BASE_ICON_SIZE': 32};
|
||||
object2.isPushingToTalk = property;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.PUSH_TO_TALK_PIP_PHYSICS = PUSH_TO_TALK_PIP_PHYSICS;
|
||||
object2.white = WHITE;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 3936373516983;
|
||||
closure.__initData = env0_13;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue3.useAnimatedStyle;
|
||||
closure = VoicePanelPIPPushToTalkOverlayP;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
isPushingToTalk: property, black: BLACK, white: WHITE, PUSH_TO_TALK_PIP_PHYSICS: PUSH_TO_TALK_PIP_PHYSICS};
|
||||
closure.__workletHash = 11469896791985;
|
||||
closure.__initData = env0_14;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = VoicePanelPIPPushToTalkOverlayH;
|
||||
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isPushingToTalk: property,
|
||||
PUSH_TO_TALK_PIP_PHYSICS: PUSH_TO_TALK_PIP_PHYSICS};
|
||||
const getVoicePanelPIPBorderRadius = (require(15439) /* metro dependency 15439: VoicePanelPIPUtils */).getVoicePanelPIPBorderRadius;
|
||||
object2.getVoicePanelPIPBorderRadius = getVoicePanelPIPBorderRadius;
|
||||
object2.pipState = value2;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 450590017248;
|
||||
closure.__initData = env0_15;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
let binding = env0_4;
|
||||
const value8 = binding.useMemo(_fun119216, [property2]);
|
||||
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
||||
binding = env0_9;
|
||||
const binding3 = ((Component) => <Component pointerEvents="none" style={[styles.overlay, value7]} />)(binding);
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
const bindingProps = {style: [styles.iconContainer, value5], hitSlop: env0_11};
|
||||
const binding2 = env0_10;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon.Sizes;
|
||||
const SMALL_20 = Sizes.SMALL_20;
|
||||
return (
|
||||
<>
|
||||
{binding3}
|
||||
<GestureDetector gesture={value8}>
|
||||
{((Component) => <Component {...bindingProps}>{((Component) => <Component style={value6} size={SMALL_20} source={importDefault(15565) /* metro dependency 15565 */} disableColor />)(binding2)}</Component>)(binding)}
|
||||
</GestureDetector>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function usePushToTalk() { // fn#119211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2353, owner: VoicePanelPIPPushToTalkOverlay.usePushToTalk, offset: 0x0250155f, size: 102 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const binding = env1_4;
|
||||
const env0_1 = binding.useRef(false);
|
||||
const useCallback = binding.useCallback;
|
||||
let items2 = [value2];
|
||||
items2 = [value2, Reflect.apply(useCallback, binding, [_fun119212, items2])];
|
||||
return items2;
|
||||
}
|
||||
|
||||
function VoicePanelPIPPushToTalkOverlayO() { // fn#119213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2658, owner: VoicePanelPIPPushToTalkOverlay.o, offset: 0x02501618, size: 231 bytes, params: 1, frame: 20
|
||||
const r10 = env0_1.get() ? 20 : 8;
|
||||
const object3 = {};
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
object3.right = Reflect.apply(withSpring, springModule, [r10, PUSH_TO_TALK_PIP_PHYSICS]);
|
||||
object3.bottom = springModule.withSpring(r10, PUSH_TO_TALK_PIP_PHYSICS);
|
||||
const object4 = {};
|
||||
const moduleValue3 = springModule;
|
||||
object4.scale = moduleValue3.withSpring(env0_1.get() ? 1.5 : 1, PUSH_TO_TALK_PIP_PHYSICS);
|
||||
object3.transform = [object4];
|
||||
const moduleValue4 = springModule;
|
||||
withSpring = moduleValue4.withSpring;
|
||||
const WHITE2 = env0_1.get() ? WHITE : 'rgba(0, 0, 0, 0.54)';
|
||||
object3.backgroundColor = Reflect.apply(withSpring, moduleValue4, [WHITE2, PUSH_TO_TALK_PIP_PHYSICS]);
|
||||
return object3;
|
||||
}
|
||||
|
||||
function VoicePanelPIPPushToTalkOverlayP() { // fn#119214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3105, owner: VoicePanelPIPPushToTalkOverlay.P, offset: 0x025016ff, size: 78 bytes, params: 1, frame: 16
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const binding = env0_1;
|
||||
const get = binding.get;
|
||||
return {tintColor: Reflect.apply(withSpring, springModule, [Reflect.apply(get, binding, []) ? BLACK : WHITE,
|
||||
PUSH_TO_TALK_PIP_PHYSICS])};
|
||||
}
|
||||
|
||||
function VoicePanelPIPPushToTalkOverlayH() { // fn#119215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3355, owner: VoicePanelPIPPushToTalkOverlay.H, offset: 0x0250174d, size: 129 bytes, params: 1, frame: 17
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
let binding = env0_1;
|
||||
object2.opacity = Reflect.apply(withSpring, springModule, [binding.get() ? 0.5 : 0, PUSH_TO_TALK_PIP_PHYSICS]);
|
||||
value = require(15439) /* metro dependency 15439: VoicePanelPIPUtils */;
|
||||
const getVoicePanelPIPBorderRadius = value.getVoicePanelPIPBorderRadius;
|
||||
binding = env0_0;
|
||||
object2.borderRadius = Reflect.apply(getVoicePanelPIPBorderRadius, value, [binding.width, binding.height]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun119216() { // fn#119216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3716, offset: 0x025017ce, size: 373 bytes, params: 1, frame: 24
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const Exclusive = Gesture.Exclusive;
|
||||
const Gesture2 = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value3 = Gesture2.Tap().maxDistance(30);
|
||||
const onEnd = value3.onEnd;
|
||||
let closure = o_119217;
|
||||
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
const binding = env0_2;
|
||||
closure.__closure = {runOnJS: runOnJS, handlePushToTalk: binding};
|
||||
closure.__workletHash = 13736796804739;
|
||||
closure.__initData = env1_16;
|
||||
const value5 = Reflect.apply(onEnd, value3, [closure]);
|
||||
const Gesture3 = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const shouldCancelWhenOutside2 = Gesture3.Pan().maxPointers(1).shouldCancelWhenOutside(false);
|
||||
const onBegin = shouldCancelWhenOutside2.onBegin;
|
||||
closure = t_119218;
|
||||
closure.__closure = {runOnJS: runOnJS, handlePushToTalk: binding};
|
||||
closure.__workletHash = 246779667986;
|
||||
closure.__initData = env1_18;
|
||||
const value8 = Reflect.apply(onBegin, shouldCancelWhenOutside2, [closure]);
|
||||
const onFinalize = value8.onFinalize;
|
||||
closure = n_119219;
|
||||
closure.__closure = {runOnJS: runOnJS, handlePushToTalk: binding};
|
||||
closure.__workletHash = 12223608557562;
|
||||
closure.__initData = env1_17;
|
||||
return Reflect.apply(Exclusive, Gesture, [value5, Reflect.apply(onFinalize, value8, [closure])]);
|
||||
}
|
||||
|
||||
function _fun119212(a0) { // fn#119212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:2443, offset: 0x025015c5, size: 83 bytes, params: 2, frame: 13
|
||||
var value2;
|
||||
if (a0 !== env0_1.current) {
|
||||
env0_1.current = a0;
|
||||
value2 = environment.__proto__.__proto__;
|
||||
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(a0);
|
||||
env0_0.set(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function o_119217(a0, a1) { // fn#119217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:3804, offset: 0x02501943, size: 59 bytes, params: 3, frame: 12
|
||||
var value;
|
||||
var runOnJS;
|
||||
var value2;
|
||||
if (a1) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = value.runOnJS;
|
||||
value2 = environment.__proto__;
|
||||
value = Reflect.apply(runOnJS, value, [env1_2]);
|
||||
value(false);
|
||||
}
|
||||
}
|
||||
|
||||
function t_119218() { // fn#119218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:4027, offset: 0x0250197e, size: 51 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value = value.runOnJS(env1_2);
|
||||
value(true);
|
||||
}
|
||||
|
||||
function n_119219() { // fn#119219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15761:4182, offset: 0x025019b1, size: 51 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value = value.runOnJS(env1_2);
|
||||
value(false);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 15444; source: modules/voice_panel/native/pip/VoicePanelPIPStateContext.tsx; dependencies: [31, 2] */
|
||||
function _fun118169(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15641:6, offset: 0x024ce7f1, size: 153 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
value = value.createContext({'id': null, 'mode': null, 'width': 0, 'height': 0, 'containerHeight': 0,
|
||||
'showSecondaryPIP': false, id: undefined, mode: undefined});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPStateContext.tsx');
|
||||
exports.VoicePanelPIPStateContext = value;
|
||||
exports.usePIPState = usePIPState;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,965 @@
|
||||
/* Metro module 15439; source: modules/voice_panel/native/pip/VoicePanelPIPUtils.tsx; dependencies: [4606, 4492, 1226, 11795, 15440, 4299, 11796, 10692, 12711, 697, 2] */
|
||||
function _fun118125(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:6, offset: 0x024cc96e, size: 635 bytes, params: 8, frame: 25
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_118128 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
let value = require(11795) /* metro dependency 11795: VoicePanelConstants */;
|
||||
const env0_5 = value.SECONDARY_PIP_TOP_MARGIN;
|
||||
const env0_6 = value.VoicePanelModes;
|
||||
value = require(15440) /* metro dependency 15440: VoicePanelPIPConstants */;
|
||||
const env0_7 = value.VoicePanelPIPModes;
|
||||
const PIPReferenceDimensions = value.PIPReferenceDimensions;
|
||||
const SquarePIPReferenceDimensions = value.SquarePIPReferenceDimensions;
|
||||
const SquareActivityPIPReferenceDimensions = value.SquareActivityPIPReferenceDimensions;
|
||||
const env0_11 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
|
||||
value = require(11796) /* metro dependency 11796: MorphablePanelConstants */;
|
||||
const env0_12 = value.MIN_PIP_TOSS_VELOCITY;
|
||||
const env0_13 = value.PIP_WINDOW_OFFSET;
|
||||
const Set = global.Set;
|
||||
let set = new Set();
|
||||
object = {code: 'function clamp_VoicePanelPIPUtilsTsx1(value,min,max){return Math.min(Math.max(value,min),max);}'};
|
||||
const env0_16 = _fun118129();
|
||||
object = {code: 'function getPIPWindowDimensions_VoicePanelPIPUtilsTsx2(windowDimensions,safeArea){const{PIP_WINDOW_OFFSET}=this.__closure;const xOffset=Math.max(safeArea.left,PIP_WINDOW_OFFSET);const yOffset=Math.max(safeArea.top,PIP_WINDOW_OFFSET);return{xOffset:xOffset,yOffset:yOffset,xRange:windowDimensions.width-xOffset-Math.max(safeArea.right,PIP_WINDOW_OFFSET),yRange:windowDimensions.height-yOffset-Math.max(safeArea.bottom,PIP_WINDOW_OFFSET)};}'};
|
||||
set = _fun118131();
|
||||
object = {code: 'function pipXYtoAbsoluteXY_VoicePanelPIPUtilsTsx3({pipX:pipX,pipY:pipY,windowDimensions:windowDimensions,safeArea:safeArea}){const{getPIPWindowDimensions}=this.__closure;const{xOffset:xOffset,yOffset:yOffset,xRange:xRange,yRange:yRange}=getPIPWindowDimensions(windowDimensions,safeArea);return{x:xOffset+pipX*xRange,y:yOffset+pipY*yRange};}'};
|
||||
let value2 = _fun118133();
|
||||
object = {code: 'function getClampedPIPPosition_VoicePanelPIPUtilsTsx4({pipX:pipX,pipY:pipY,width:width,height:height,windowDimensions:windowDimensions,safeArea:safeArea,bottomAvoidanceRegion=0,topAvoidanceRegion=0,positionOffset={x:0,y:0}}){const{pipXYtoAbsoluteXY,getPIPWindowDimensions,clamp}=this.__closure;let{x:x,y:y}=pipXYtoAbsoluteXY({pipX:pipX===-1?1:pipX,pipY:pipY===-1?0:pipY,windowDimensions:windowDimensions,safeArea:safeArea});const halfWidth=width/2;const halfHeight=height/2;x-=halfWidth;if(pipY===-1){y+=72;}else{y-=halfHeight;}const pipRegion=getPIPWindowDimensions(windowDimensions,safeArea);x=clamp(x,pipRegion.xOffset,pipRegion.xOffset+pipRegion.xRange-width);y=clamp(y,pipRegion.yOffset+topAvoidanceRegion,pipRegion.yOffset+pipRegion.yRange-bottomAvoidanceRegion-height);x+=positionOffset.x;y+=positionOffset.y;return{x:x,y:y};}'};
|
||||
let value3 = _fun118135();
|
||||
object = {code: "function calculatePIPPositionFromVelocity_VoicePanelPIPUtilsTsx5({velocityX:velocityX,velocityY:velocityY,absoluteX:absoluteX,absoluteY:absoluteY,windowDimensions:windowDimensions,safeArea:safeArea}){const{getPIPWindowDimensions,MIN_PIP_TOSS_VELOCITY,clamp}=this.__closure;const pipRegion=getPIPWindowDimensions(windowDimensions,safeArea);const{xRange:xRange,yRange:yRange}=pipRegion;const x=absoluteX-pipRegion.xOffset;const y=absoluteY-pipRegion.yOffset;let pipX=0;let pipY=0;if(Math.max(Math.abs(velocityY),Math.abs(velocityX))<MIN_PIP_TOSS_VELOCITY){const closestEdge=function(specs){const minValue=Math.min(...Object.values(specs));if(specs.left===minValue){return'left';}if(specs.top===minValue){return'top';}if(specs.right===minValue){return'right';}return'bottom';}({left:clamp(x,0,xRange),right:clamp(xRange-x,0,xRange),top:clamp(y,0,yRange),bottom:clamp(yRange-y,0,yRange)});switch(closestEdge){case'left':pipX=0;pipY=y/yRange;break;case'right':pipX=1;pipY=y/yRange;break;case'top':pipY=0;pipX=x/xRange;break;case'bottom':pipY=1;pipX=x/xRange;break;}}else{const slope=velocityY/velocityX;let intersectionY=0;let intersectionX=0;intersectionX=velocityX>0?xRange:0;intersectionY=y+slope*(intersectionX-x);if(intersectionY>=0&&intersectionY<=yRange){pipX=intersectionX/xRange;pipY=intersectionY/yRange;}else{intersectionY=velocityY>0?yRange:0;intersectionX=x+1/slope*(intersectionY-y);pipX=intersectionX/xRange;pipY=intersectionY/yRange;}}return{pipX:clamp(pipX,0,1),pipY:clamp(pipY,0,1)};}"};
|
||||
let value4 = _fun118137();
|
||||
const env0_23 = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
const env0_24 = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object = {code: 'function getVoicePanelPIPBorderRadius_VoicePanelPIPUtilsTsx6(width,height){const{SquareActivityPIPReferenceDimensions,lg,xl}=this.__closure;if(width<=SquareActivityPIPReferenceDimensions.width&&height<=SquareActivityPIPReferenceDimensions.height){return lg;}return xl;}'};
|
||||
let value5 = _fun118139();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPUtils.tsx');
|
||||
exports.PIPReferenceDimensions = PIPReferenceDimensions;
|
||||
exports.SquarePIPReferenceDimensions = SquarePIPReferenceDimensions;
|
||||
exports.SquareActivityPIPReferenceDimensions = SquareActivityPIPReferenceDimensions;
|
||||
exports.computePIPSize = computePIPSize;
|
||||
exports.computePIPParticipantToShow = computePIPParticipantToShow;
|
||||
exports.getPIPMode = getPIPMode;
|
||||
exports.getPIPWindowDimensions = set;
|
||||
exports.pipXYtoAbsoluteXY = value2;
|
||||
exports.getClampedPIPPosition = value3;
|
||||
exports.calculatePIPPositionFromVelocity = value4;
|
||||
exports.getVoicePanelPIPBorderRadius = value5;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_118126(a0, a1) { // fn#118126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:412, offset: 0x024ccbe9, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun118127;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_118128(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_118128(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_118128(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun118127;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function _fun118129() { // fn#118129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:1445, offset: 0x024ccd5d, size: 48 bytes, params: 1, frame: 2
|
||||
const closure = function(a0, a1, a2) {
|
||||
var Math = global.Math;
|
||||
var Math2 = global.Math;
|
||||
return Math.min(Math2.max(a0, a1), a2);
|
||||
};
|
||||
closure.__closure = {};
|
||||
closure.__workletHash = 10301627783217;
|
||||
closure.__initData = env0_15;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun118131() { // fn#118131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:2060, offset: 0x024ccd8d, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = getPIPWindowDimensions_118132;
|
||||
closure.__closure = {PIP_WINDOW_OFFSET: PIP_WINDOW_OFFSET};
|
||||
closure.__workletHash = 10369369214675;
|
||||
closure.__initData = env0_17;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun118133() { // fn#118133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:2791, offset: 0x024cce5f, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = pipXYtoAbsoluteXY_118134;
|
||||
closure.__closure = {getPIPWindowDimensions: env0_18};
|
||||
closure.__workletHash = 13405407399530;
|
||||
closure.__initData = env0_19;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun118135() { // fn#118135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:3963, offset: 0x024ccef6, size: 75 bytes, params: 1, frame: 4
|
||||
const closure = getClampedPIPPosition_118136;
|
||||
closure.__closure = {pipXYtoAbsoluteXY: env0_20, getPIPWindowDimensions: env0_18, clamp: env0_16};
|
||||
closure.__workletHash = 10462021389431;
|
||||
closure.__initData = env0_21;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun118137() { // fn#118137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:6097, offset: 0x024cd071, size: 75 bytes, params: 1, frame: 4
|
||||
const closure = calculatePIPPositionFromVelocity_118138;
|
||||
closure.__closure = {getPIPWindowDimensions: env0_18, MIN_PIP_TOSS_VELOCITY: MIN_PIP_TOSS_VELOCITY, clamp: env0_16};
|
||||
closure.__workletHash = 14615762848981;
|
||||
closure.__initData = env0_22;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun118139() { // fn#118139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:7342, offset: 0x024cd2b8, size: 75 bytes, params: 1, frame: 4
|
||||
const closure = function(a0, a1) {
|
||||
return a0 <= SquareActivityPIPReferenceDimensions.width && a1 <= SquareActivityPIPReferenceDimensions.height ? lg : xl;
|
||||
};
|
||||
closure.__closure = {SquareActivityPIPReferenceDimensions: SquareActivityPIPReferenceDimensions, lg: lg, xl: xl};
|
||||
closure.__workletHash = 16698745361037;
|
||||
closure.__initData = env0_25;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function computePIPSize(a0, a1, a2, a3) { // fn#118141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:7875, offset: 0x024cd332, size: 259 bytes, params: 5, frame: 17
|
||||
var r0;
|
||||
var r1;
|
||||
var r3;
|
||||
var value;
|
||||
var Math;
|
||||
let width = a0.width;
|
||||
let height = a0.height;
|
||||
if (a1) {
|
||||
r0 = a2 ? SquareActivityPIPReferenceDimensions : SquarePIPReferenceDimensions;
|
||||
width = r0.width;
|
||||
height = r0.height;
|
||||
r1 = width;
|
||||
r3 = height;
|
||||
} else if (width === height) {
|
||||
r0 = a2 ? SquareActivityPIPReferenceDimensions : SquarePIPReferenceDimensions;
|
||||
width = r0.width;
|
||||
height = r0.height;
|
||||
r1 = width;
|
||||
r3 = height;
|
||||
} else if (width >= height) {
|
||||
width = a2 ? SquareActivityPIPReferenceDimensions.width : PIPReferenceDimensions.width;
|
||||
Math = global.Math;
|
||||
value = width * Math.max(0.5, a0.height / a0.width);
|
||||
r1 = width;
|
||||
r3 = value;
|
||||
} else {
|
||||
height = a2 ? SquareActivityPIPReferenceDimensions.height : PIPReferenceDimensions.height;
|
||||
Math = global.Math;
|
||||
r1 = height * Math.max(0.5, a0.width / a0.height);
|
||||
r3 = height;
|
||||
}
|
||||
const object2 = {width: r1, height: r3};
|
||||
if (a3) {
|
||||
value = 2 * r3;
|
||||
value += SECONDARY_PIP_TOP_MARGIN;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = r3;
|
||||
}
|
||||
object2.containerHeight = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function computePIPParticipantToShow({channelId, panelMode, lastParticipantId, speakingUserId, focusedParticipantId, blockList, showSecondaryPIP}) { // fn#118142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:8182, offset: 0x024cd435, size: 1295 bytes, params: 2, frame: 27
|
||||
var environment;
|
||||
var r8;
|
||||
var r2;
|
||||
var type;
|
||||
var userVideo;
|
||||
var r10;
|
||||
var r6;
|
||||
var r9;
|
||||
var r1;
|
||||
var value2;
|
||||
var binding;
|
||||
var getParticipant;
|
||||
var value5;
|
||||
var STREAM;
|
||||
var has;
|
||||
var user;
|
||||
var id;
|
||||
var value6;
|
||||
var moduleValue;
|
||||
var canRenderParticipantVideo;
|
||||
var USER;
|
||||
var _createForOfIteratorHelperLoose_118126Binding;
|
||||
var getActivityParticipants;
|
||||
var value7;
|
||||
var value8;
|
||||
var done;
|
||||
var value9;
|
||||
var participants;
|
||||
var some;
|
||||
var value10;
|
||||
var value13;
|
||||
var getActiveStreamForUser;
|
||||
var stream;
|
||||
var guildId;
|
||||
var value14;
|
||||
var value15;
|
||||
var moduleValue2;
|
||||
var participant;
|
||||
var moduleValue3;
|
||||
var getVideoParticipants;
|
||||
var value17;
|
||||
var value18;
|
||||
var value19;
|
||||
var moduleValue4;
|
||||
var value20;
|
||||
reducibleJoin2: while (true) {
|
||||
if (blockList !== undefined) {
|
||||
r8 = blockList;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value2 = environment;
|
||||
binding = env0_14;
|
||||
r8 = binding;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
const id2 = AuthenticationStore.getId();
|
||||
reducibleJoin4: while (true) {
|
||||
if (focusedParticipantId != null) {
|
||||
getParticipant = ChannelRTCStore.getParticipant;
|
||||
value5 = Reflect.apply(getParticipant, ChannelRTCStore, [channelId, focusedParticipantId]);
|
||||
r2 = value5;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r2 = undefined;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
let PANEL = VoicePanelModes.PANEL;
|
||||
if (panelMode === PANEL) {
|
||||
reducibleJoin6: while (true) {
|
||||
if (r2 == null) {
|
||||
return undefined;
|
||||
}
|
||||
break reducibleJoin6;
|
||||
}
|
||||
}
|
||||
PANEL = VoicePanelModes.PANEL;
|
||||
if (panelMode === PANEL) {
|
||||
reducibleJoin18: while (true) {
|
||||
if (focusedParticipantId == null) {
|
||||
break reducibleJoin18;
|
||||
}
|
||||
reducibleJoin10: while (true) {
|
||||
if (r2 == null) {
|
||||
type = undefined;
|
||||
break reducibleJoin10;
|
||||
}
|
||||
type = r2.type;
|
||||
break reducibleJoin10;
|
||||
}
|
||||
STREAM = ParticipantTypes.STREAM;
|
||||
if (type !== STREAM) {
|
||||
break reducibleJoin18;
|
||||
}
|
||||
reducibleJoin13: while (true) {
|
||||
if (r2 == null) {
|
||||
userVideo = undefined;
|
||||
break reducibleJoin13;
|
||||
}
|
||||
userVideo = r2.userVideo;
|
||||
break reducibleJoin13;
|
||||
}
|
||||
if (userVideo !== true) {
|
||||
break reducibleJoin18;
|
||||
}
|
||||
has = r8.has;
|
||||
user = r2.user;
|
||||
id = user.id;
|
||||
if (Reflect.apply(has, r8, [id])) {
|
||||
break reducibleJoin18;
|
||||
}
|
||||
getParticipant = ChannelRTCStore.getParticipant;
|
||||
user = r2.user;
|
||||
id = user.id;
|
||||
value6 = Reflect.apply(getParticipant, ChannelRTCStore, [channelId, id]);
|
||||
if (value6 == null) {
|
||||
break reducibleJoin18;
|
||||
}
|
||||
moduleValue = require(10692) /* metro dependency 10692: participantHasVideo */;
|
||||
canRenderParticipantVideo = moduleValue.canRenderParticipantVideo;
|
||||
if (Reflect.apply(canRenderParticipantVideo, moduleValue, [value6])) {
|
||||
return {id: value6.id, type: ParticipantTypes.USER};
|
||||
}
|
||||
break reducibleJoin18;
|
||||
}
|
||||
}
|
||||
if (focusedParticipantId != null) {
|
||||
reducibleJoin22: while (true) {
|
||||
if (r2 == null) {
|
||||
break reducibleJoin22;
|
||||
}
|
||||
has = r8.has;
|
||||
if (!Reflect.apply(has, r8, [focusedParticipantId])) {
|
||||
return {id: focusedParticipantId, type: r2.type};
|
||||
}
|
||||
break reducibleJoin22;
|
||||
}
|
||||
}
|
||||
reducibleJoin24: while (true) {
|
||||
if (r2 == null) {
|
||||
type = undefined;
|
||||
break reducibleJoin24;
|
||||
}
|
||||
type = r2.type;
|
||||
break reducibleJoin24;
|
||||
}
|
||||
let ACTIVITY = ParticipantTypes.ACTIVITY;
|
||||
if (type !== ACTIVITY) {
|
||||
reducibleJoin31: while (true) {
|
||||
if (showSecondaryPIP) {
|
||||
break reducibleJoin31;
|
||||
}
|
||||
_createForOfIteratorHelperLoose_118126Binding = _createForOfIteratorHelperLoose_118126;
|
||||
getActivityParticipants = ChannelRTCStore.getActivityParticipants;
|
||||
value7 = _createForOfIteratorHelperLoose_118126Binding(Reflect.apply(getActivityParticipants,
|
||||
ChannelRTCStore,
|
||||
[channelId]));
|
||||
value8 = value7();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
break reducibleJoin31;
|
||||
}
|
||||
r10 = value8;
|
||||
reducibleLoop27: while (true) {
|
||||
value9 = r10.value;
|
||||
participants = value9.participants;
|
||||
some = participants.some;
|
||||
if (Reflect.apply(some, participants, [_fun118143])) {
|
||||
has = r8.has;
|
||||
id = value9.id;
|
||||
reducibleJoin30: while (true) {
|
||||
if (!Reflect.apply(has, r8, [id])) {
|
||||
return {id: value9.id, type: value9.type};
|
||||
}
|
||||
break reducibleJoin30;
|
||||
}
|
||||
}
|
||||
value10 = value7();
|
||||
done = value10.done;
|
||||
if (done) {
|
||||
break reducibleJoin31;
|
||||
}
|
||||
r10 = value10;
|
||||
continue reducibleLoop27;
|
||||
}
|
||||
}
|
||||
}
|
||||
_createForOfIteratorHelperLoose_118126Binding = _createForOfIteratorHelperLoose_118126;
|
||||
const getStreamParticipants = ChannelRTCStore.getStreamParticipants;
|
||||
const value11 = _createForOfIteratorHelperLoose_118126Binding(Reflect.apply(getStreamParticipants, ChannelRTCStore,
|
||||
[channelId]));
|
||||
const value12 = value11();
|
||||
done = value12.done;
|
||||
if (!done) {
|
||||
r10 = value12;
|
||||
reducibleLoop32: while (true) {
|
||||
value13 = r10.value;
|
||||
has = r8.has;
|
||||
id = value13.id;
|
||||
if (!Reflect.apply(has, r8, [id])) {
|
||||
getActiveStreamForUser = ApplicationStreamingStore.getActiveStreamForUser;
|
||||
user = value13.user;
|
||||
id = user.id;
|
||||
stream = value13.stream;
|
||||
guildId = stream.guildId;
|
||||
reducibleJoin35: while (true) {
|
||||
if (Reflect.apply(getActiveStreamForUser, ApplicationStreamingStore, [id, guildId]) != null) {
|
||||
return {id: value13.id, type: value13.type};
|
||||
}
|
||||
break reducibleJoin35;
|
||||
}
|
||||
}
|
||||
value14 = value11();
|
||||
done = value14.done;
|
||||
if (done) {
|
||||
break reducibleLoop32;
|
||||
}
|
||||
r10 = value14;
|
||||
continue reducibleLoop32;
|
||||
}
|
||||
}
|
||||
if (speakingUserId != null) {
|
||||
reducibleJoin40: while (true) {
|
||||
if (r8.has(speakingUserId)) {
|
||||
break reducibleJoin40;
|
||||
}
|
||||
getParticipant = ChannelRTCStore.getParticipant;
|
||||
if (Reflect.apply(getParticipant, ChannelRTCStore, [channelId, speakingUserId]) != null) {
|
||||
return {id: speakingUserId, type: ParticipantTypes.USER};
|
||||
}
|
||||
break reducibleJoin40;
|
||||
}
|
||||
}
|
||||
reducibleJoin42: while (true) {
|
||||
if (lastParticipantId != null) {
|
||||
getParticipant = ChannelRTCStore.getParticipant;
|
||||
value15 = Reflect.apply(getParticipant, ChannelRTCStore, [channelId, lastParticipantId]);
|
||||
r6 = value15;
|
||||
break reducibleJoin42;
|
||||
}
|
||||
r6 = undefined;
|
||||
break reducibleJoin42;
|
||||
}
|
||||
if (r6 != null) {
|
||||
has = r8.has;
|
||||
id = r6.id;
|
||||
reducibleJoin53: while (true) {
|
||||
if (!Reflect.apply(has, r8, [id])) {
|
||||
type = r6.type;
|
||||
STREAM = ParticipantTypes.STREAM;
|
||||
if (STREAM !== type) {
|
||||
ACTIVITY = ParticipantTypes.ACTIVITY;
|
||||
if (ACTIVITY === type) {
|
||||
participants = r6.participants;
|
||||
some = participants.some;
|
||||
if (Reflect.apply(some, participants, [_fun118144])) {
|
||||
return {id: r6.id, type: r6.type};
|
||||
}
|
||||
break reducibleJoin53;
|
||||
}
|
||||
USER = ParticipantTypes.USER;
|
||||
if (USER === type) {
|
||||
return {id: r6.id, type: r6.type};
|
||||
}
|
||||
break reducibleJoin53;
|
||||
}
|
||||
getActiveStreamForUser = ApplicationStreamingStore.getActiveStreamForUser;
|
||||
user = r6.user;
|
||||
id = user.id;
|
||||
stream = r6.stream;
|
||||
guildId = stream.guildId;
|
||||
reducibleJoin54: while (true) {
|
||||
reducibleJoin69: while (true) {
|
||||
if (Reflect.apply(getActiveStreamForUser, ApplicationStreamingStore, [id, guildId]) == null) {
|
||||
break reducibleJoin53;
|
||||
}
|
||||
moduleValue2 = require(10692) /* metro dependency 10692: participantHasVideo */;
|
||||
canRenderParticipantVideo = moduleValue2.canRenderParticipantVideo;
|
||||
if (Reflect.apply(canRenderParticipantVideo, moduleValue2, [r6])) {
|
||||
return {id: r6.id, type: r6.type};
|
||||
}
|
||||
break reducibleJoin53;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
if (participant != null) {
|
||||
moduleValue3 = require(10692) /* metro dependency 10692: participantHasVideo */;
|
||||
canRenderParticipantVideo = moduleValue3.canRenderParticipantVideo;
|
||||
reducibleJoin57: while (true) {
|
||||
if (Reflect.apply(canRenderParticipantVideo, moduleValue3, [participant])) {
|
||||
return {id: id2, type: ParticipantTypes.USER};
|
||||
}
|
||||
break reducibleJoin57;
|
||||
}
|
||||
}
|
||||
_createForOfIteratorHelperLoose_118126Binding = _createForOfIteratorHelperLoose_118126;
|
||||
getVideoParticipants = ChannelRTCStore.getVideoParticipants;
|
||||
value17 = _createForOfIteratorHelperLoose_118126Binding(Reflect.apply(getVideoParticipants,
|
||||
ChannelRTCStore,
|
||||
[channelId]));
|
||||
value18 = value17();
|
||||
done = value18.done;
|
||||
if (!done) {
|
||||
r9 = value18;
|
||||
reducibleLoop58: while (true) {
|
||||
value19 = r9.value;
|
||||
has = r8.has;
|
||||
id = value19.id;
|
||||
if (!Reflect.apply(has, r8, [id])) {
|
||||
moduleValue4 = require(10692) /* metro dependency 10692: participantHasVideo */;
|
||||
canRenderParticipantVideo = moduleValue4.canRenderParticipantVideo;
|
||||
reducibleJoin61: while (true) {
|
||||
if (Reflect.apply(canRenderParticipantVideo, moduleValue4, [value19])) {
|
||||
return {id: value19.id, type: value19.type};
|
||||
}
|
||||
break reducibleJoin61;
|
||||
}
|
||||
}
|
||||
value20 = value17();
|
||||
done = value20.done;
|
||||
if (done) {
|
||||
break reducibleLoop58;
|
||||
}
|
||||
r9 = value20;
|
||||
continue reducibleLoop58;
|
||||
}
|
||||
}
|
||||
has = r8.has;
|
||||
reducibleJoin69: while (true) {
|
||||
if (Reflect.apply(has, r8, [id2])) {
|
||||
r1 = undefined;
|
||||
break reducibleJoin69;
|
||||
}
|
||||
if (participant == null) {
|
||||
r1 = undefined;
|
||||
break reducibleJoin69;
|
||||
}
|
||||
PANEL = VoicePanelModes.PANEL;
|
||||
if (panelMode === PANEL) {
|
||||
reducibleJoin67: while (true) {
|
||||
if (r2 == null) {
|
||||
type = undefined;
|
||||
break reducibleJoin67;
|
||||
}
|
||||
type = r2.type;
|
||||
break reducibleJoin67;
|
||||
}
|
||||
ACTIVITY = ParticipantTypes.ACTIVITY;
|
||||
if (type !== ACTIVITY) {
|
||||
r1 = undefined;
|
||||
break reducibleJoin69;
|
||||
}
|
||||
}
|
||||
USER = ParticipantTypes.USER;
|
||||
r1 = {id: id2, type: USER};
|
||||
break reducibleJoin69;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
break reducibleJoin53;
|
||||
}
|
||||
}
|
||||
participant = ChannelRTCStore.getParticipant(channelId, id2);
|
||||
if (!r8.has(id2)) {
|
||||
reducibleJoin57: while (true) {
|
||||
if (participant == null) {
|
||||
break reducibleJoin57;
|
||||
}
|
||||
moduleValue3 = require(10692) /* metro dependency 10692: participantHasVideo */;
|
||||
canRenderParticipantVideo = moduleValue3.canRenderParticipantVideo;
|
||||
if (Reflect.apply(canRenderParticipantVideo, moduleValue3, [participant])) {
|
||||
return {id: id2, type: ParticipantTypes.USER};
|
||||
}
|
||||
break reducibleJoin57;
|
||||
}
|
||||
}
|
||||
_createForOfIteratorHelperLoose_118126Binding = _createForOfIteratorHelperLoose_118126;
|
||||
getVideoParticipants = ChannelRTCStore.getVideoParticipants;
|
||||
value17 = _createForOfIteratorHelperLoose_118126Binding(Reflect.apply(getVideoParticipants, ChannelRTCStore,
|
||||
[channelId]));
|
||||
value18 = value17();
|
||||
done = value18.done;
|
||||
if (!done) {
|
||||
r9 = value18;
|
||||
reducibleLoop58: while (true) {
|
||||
value19 = r9.value;
|
||||
has = r8.has;
|
||||
id = value19.id;
|
||||
if (!Reflect.apply(has, r8, [id])) {
|
||||
moduleValue4 = require(10692) /* metro dependency 10692: participantHasVideo */;
|
||||
canRenderParticipantVideo = moduleValue4.canRenderParticipantVideo;
|
||||
reducibleJoin61: while (true) {
|
||||
if (Reflect.apply(canRenderParticipantVideo, moduleValue4, [value19])) {
|
||||
return {id: value19.id, type: value19.type};
|
||||
}
|
||||
break reducibleJoin61;
|
||||
}
|
||||
}
|
||||
value20 = value17();
|
||||
done = value20.done;
|
||||
if (done) {
|
||||
break reducibleLoop58;
|
||||
}
|
||||
r9 = value20;
|
||||
continue reducibleLoop58;
|
||||
}
|
||||
}
|
||||
reducibleJoin69: while (true) {
|
||||
if (r8.has(id2)) {
|
||||
r1 = undefined;
|
||||
break reducibleJoin69;
|
||||
}
|
||||
if (participant == null) {
|
||||
r1 = undefined;
|
||||
break reducibleJoin69;
|
||||
}
|
||||
PANEL = VoicePanelModes.PANEL;
|
||||
if (panelMode === PANEL) {
|
||||
reducibleJoin67: while (true) {
|
||||
if (r2 == null) {
|
||||
type = undefined;
|
||||
break reducibleJoin67;
|
||||
}
|
||||
type = r2.type;
|
||||
break reducibleJoin67;
|
||||
}
|
||||
ACTIVITY = ParticipantTypes.ACTIVITY;
|
||||
if (type !== ACTIVITY) {
|
||||
r1 = undefined;
|
||||
break reducibleJoin69;
|
||||
}
|
||||
}
|
||||
USER = ParticipantTypes.USER;
|
||||
r1 = {id: id2, type: USER};
|
||||
break reducibleJoin69;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function getPIPMode({channelId, connected, manuallyFocusedId, mode, selfHasVideo}) { // fn#118145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:10095, offset: 0x024cd96d, size: 477 bytes, params: 2, frame: 21
|
||||
var r2;
|
||||
var r5;
|
||||
var IN_APP;
|
||||
var value2;
|
||||
var getParticipant;
|
||||
var value3;
|
||||
var type;
|
||||
var ACTIVITY;
|
||||
var STREAM;
|
||||
var userVideo;
|
||||
var moduleValue;
|
||||
var canRenderParticipantVideo;
|
||||
var user;
|
||||
var id;
|
||||
var value5;
|
||||
var getId;
|
||||
var _createForOfIteratorHelperLoose_118126Binding;
|
||||
var getVideoParticipants;
|
||||
var value6;
|
||||
var value7;
|
||||
var done;
|
||||
var value8;
|
||||
var moduleValue2;
|
||||
var value9;
|
||||
if (connected) {
|
||||
reducibleJoin4: while (true) {
|
||||
if (manuallyFocusedId != null) {
|
||||
value2 = environment;
|
||||
getParticipant = ChannelRTCStore.getParticipant;
|
||||
value3 = Reflect.apply(getParticipant, ChannelRTCStore, [channelId, manuallyFocusedId]);
|
||||
r2 = value3;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r2 = undefined;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
if (mode === VoicePanelModes.PANEL) {
|
||||
reducibleJoin20: while (true) {
|
||||
if (r2 == null) {
|
||||
break reducibleJoin20;
|
||||
}
|
||||
type = r2.type;
|
||||
ACTIVITY = ParticipantTypes.ACTIVITY;
|
||||
if (type === ACTIVITY) {
|
||||
return VoicePanelPIPModes.IN_PANEL;
|
||||
}
|
||||
type = r2.type;
|
||||
STREAM = ParticipantTypes.STREAM;
|
||||
if (type === STREAM) {
|
||||
userVideo = r2.userVideo;
|
||||
reducibleJoin11: while (true) {
|
||||
if (userVideo) {
|
||||
moduleValue = require(10692) /* metro dependency 10692: participantHasVideo */;
|
||||
canRenderParticipantVideo = moduleValue.canRenderParticipantVideo;
|
||||
getParticipant = ChannelRTCStore.getParticipant;
|
||||
user = r2.user;
|
||||
id = user.id;
|
||||
value5 = Reflect.apply(getParticipant, ChannelRTCStore, [channelId, id]);
|
||||
r5 = value5 ?? undefined;
|
||||
if (Reflect.apply(canRenderParticipantVideo, moduleValue, [r5])) {
|
||||
return VoicePanelPIPModes.IN_PANEL;
|
||||
}
|
||||
break reducibleJoin11;
|
||||
}
|
||||
break reducibleJoin11;
|
||||
}
|
||||
}
|
||||
if (!selfHasVideo) {
|
||||
return undefined;
|
||||
}
|
||||
id = r2.id;
|
||||
getId = AuthenticationStore.getId;
|
||||
if (id !== Reflect.apply(getId, AuthenticationStore, [])) {
|
||||
return VoicePanelPIPModes.IN_PANEL;
|
||||
}
|
||||
_createForOfIteratorHelperLoose_118126Binding = _createForOfIteratorHelperLoose_118126;
|
||||
getVideoParticipants = ChannelRTCStore.getVideoParticipants;
|
||||
value6 = _createForOfIteratorHelperLoose_118126Binding(Reflect.apply(getVideoParticipants,
|
||||
ChannelRTCStore,
|
||||
[channelId]));
|
||||
value7 = value6();
|
||||
done = value7.done;
|
||||
if (!done) {
|
||||
r5 = value7;
|
||||
reducibleLoop15: while (true) {
|
||||
value8 = r5.value;
|
||||
id = value8.id;
|
||||
getId = AuthenticationStore.getId;
|
||||
if (id !== Reflect.apply(getId, AuthenticationStore, [])) {
|
||||
moduleValue2 = require(10692) /* metro dependency 10692: participantHasVideo */;
|
||||
canRenderParticipantVideo = moduleValue2.canRenderParticipantVideo;
|
||||
reducibleJoin17: while (true) {
|
||||
if (Reflect.apply(canRenderParticipantVideo, moduleValue2, [value8])) {
|
||||
return VoicePanelPIPModes.IN_PANEL;
|
||||
}
|
||||
break reducibleJoin17;
|
||||
}
|
||||
}
|
||||
value9 = value6();
|
||||
done = value9.done;
|
||||
if (done) {
|
||||
break reducibleLoop15;
|
||||
}
|
||||
r5 = value9;
|
||||
continue reducibleLoop15;
|
||||
}
|
||||
}
|
||||
id = r2.id;
|
||||
getId = AuthenticationStore.getId;
|
||||
if (id !== Reflect.apply(getId, AuthenticationStore, [])) {
|
||||
return VoicePanelPIPModes.IN_PANEL;
|
||||
}
|
||||
break reducibleJoin20;
|
||||
}
|
||||
}
|
||||
reducibleJoin22: while (true) {
|
||||
if (mode !== VoicePanelModes.PIP) {
|
||||
IN_APP = undefined;
|
||||
break reducibleJoin22;
|
||||
}
|
||||
IN_APP = VoicePanelPIPModes.IN_APP;
|
||||
break reducibleJoin22;
|
||||
}
|
||||
return IN_APP;
|
||||
}
|
||||
}
|
||||
|
||||
function getPIPWindowDimensions_118132({width, height}, {left, top, right, bottom}) { // fn#118132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:2098, offset: 0x024ccdc6, size: 153 bytes, params: 3, frame: 19
|
||||
let Math = global.Math;
|
||||
const max = Math.max;
|
||||
let value = environment.__proto__;
|
||||
value = Reflect.apply(max, Math, [left, PIP_WINDOW_OFFSET]);
|
||||
Math = global.Math;
|
||||
const value2 = Math.max(top, PIP_WINDOW_OFFSET);
|
||||
const object2 = {xOffset: value, yOffset: value2};
|
||||
value = width - value;
|
||||
Math = global.Math;
|
||||
object2.xRange = value - Math.max(right, PIP_WINDOW_OFFSET);
|
||||
value = height - value2;
|
||||
Math = global.Math;
|
||||
object2.yRange = value - Math.max(bottom, PIP_WINDOW_OFFSET);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function pipXYtoAbsoluteXY_118134({pipX, pipY, windowDimensions, safeArea}) { // fn#118134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:2824, offset: 0x024cce98, size: 94 bytes, params: 2, frame: 16
|
||||
let value = environment.__proto__;
|
||||
value = env1_18(windowDimensions, safeArea);
|
||||
return {x: value.xOffset + pipX * value.xRange, y: value.yOffset + pipY * value.yRange};
|
||||
}
|
||||
|
||||
function getClampedPIPPosition_118136({pipX, pipY, width, height, windowDimensions, safeArea, bottomAvoidanceRegion, topAvoidanceRegion, positionOffset = {'x': 0, 'y': 0}}) { // fn#118136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:4000, offset: 0x024ccf41, size: 304 bytes, params: 2, frame: 26
|
||||
bottomAvoidanceRegion = bottomAvoidanceRegion === undefined ? 0 : bottomAvoidanceRegion;
|
||||
topAvoidanceRegion = topAvoidanceRegion === undefined ? 0 : topAvoidanceRegion;
|
||||
const value = environment.__proto__;
|
||||
let binding = env1_20;
|
||||
const value3 = pipY === -1;
|
||||
const {x, y} = binding({pipX: pipX === -1 ? 1 : pipX, pipY: value3 ? 0 : pipY, windowDimensions: windowDimensions,
|
||||
safeArea: safeArea});
|
||||
const value6 = x - width / 2;
|
||||
const r5 = value3 ? y + 72 : y - height / 2;
|
||||
const value9 = env1_18(windowDimensions, safeArea);
|
||||
binding = env1_16;
|
||||
return {x: binding(value6, value9.xOffset, value9.xOffset + value9.xRange - width) + positionOffset.x,
|
||||
y: binding(r5, value9.yOffset + topAvoidanceRegion,
|
||||
value9.yOffset + value9.yRange - bottomAvoidanceRegion - height) + positionOffset.y};
|
||||
}
|
||||
|
||||
function calculatePIPPositionFromVelocity_118138({velocityX, velocityY, absoluteX, absoluteY, windowDimensions, safeArea}) { // fn#118138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:6145, offset: 0x024cd0bc, size: 508 bytes, params: 2, frame: 25
|
||||
var r10;
|
||||
var r4;
|
||||
var r6;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var value11;
|
||||
var value13;
|
||||
var object2;
|
||||
var binding;
|
||||
var value15;
|
||||
var min;
|
||||
var value16;
|
||||
var items2;
|
||||
var value17;
|
||||
var left;
|
||||
var value18;
|
||||
var value22;
|
||||
var value24;
|
||||
var value25;
|
||||
var value26;
|
||||
const value2 = env1_18(windowDimensions, safeArea);
|
||||
const xRange = value2.xRange;
|
||||
const yRange = value2.yRange;
|
||||
const value3 = absoluteX - value2.xOffset;
|
||||
const value4 = absoluteY - value2.yOffset;
|
||||
let Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
const value5 = Math2.abs(velocityY);
|
||||
const Math3 = global.Math;
|
||||
if (Reflect.apply(max, Math, [value5, Math3.abs(velocityX)]) < MIN_PIP_TOSS_VELOCITY) {
|
||||
object2 = {};
|
||||
binding = env1_16;
|
||||
value15 = 0;
|
||||
object2.left = binding(value3, value15, xRange);
|
||||
object2.right = binding(xRange - value3, value15, xRange);
|
||||
object2.top = binding(value4, value15, yRange);
|
||||
object2.bottom = binding(yRange - value4, value15, yRange);
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
value16 = global.Object.values(object2);
|
||||
items2 = [];
|
||||
arraySpread(items2, value16, value15, undefined);
|
||||
value17 = apply(min, items2, Math, undefined);
|
||||
left = object2.left;
|
||||
value18 = 'left';
|
||||
r10 = left === value17 ? value18 : object2.top === value17 ? 'top' : object2.right !== value17 ? 'bottom' : 'right';
|
||||
if (value18 === r10) {
|
||||
r4 = value4 / yRange;
|
||||
r6 = value15;
|
||||
} else if (r10 === 'right') {
|
||||
value25 = value4 / yRange;
|
||||
value26 = 1;
|
||||
r4 = value25;
|
||||
r6 = value26;
|
||||
} else if (r10 === 'top') {
|
||||
value24 = value3 / xRange;
|
||||
r4 = value15;
|
||||
r6 = value24;
|
||||
} else if (r10 !== 'bottom') {
|
||||
r4 = value15;
|
||||
r6 = value15;
|
||||
} else {
|
||||
value22 = value3 / xRange;
|
||||
r4 = 1;
|
||||
r6 = value22;
|
||||
}
|
||||
} else {
|
||||
value7 = velocityY / velocityX;
|
||||
value8 = 0;
|
||||
r10 = velocityX > value8 ? xRange : value8;
|
||||
value9 = value4 + value7 * (r10 - value3);
|
||||
if (value9 >= value8) {
|
||||
if (value9 <= yRange) {
|
||||
value13 = r10 / xRange;
|
||||
r4 = value9 / yRange;
|
||||
r6 = value13;
|
||||
} else {
|
||||
value10 = 1 / value7;
|
||||
r4 = velocityY > value8 ? yRange : value8;
|
||||
value11 = (value3 + value10 * (r4 - value4)) / xRange;
|
||||
r4 = r4 / yRange;
|
||||
r6 = value11;
|
||||
}
|
||||
} else {
|
||||
value10 = 1 / value7;
|
||||
r4 = velocityY > value8 ? yRange : value8;
|
||||
value11 = (value3 + value10 * (r4 - value4)) / xRange;
|
||||
r4 = r4 / yRange;
|
||||
r6 = value11;
|
||||
}
|
||||
}
|
||||
object2 = {};
|
||||
binding = env1_16;
|
||||
object2.pipX = binding(r6, 0, 1);
|
||||
object2.pipY = binding(r4, 0, 1);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun118143(a0) { // fn#118143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15636:8879, offset: 0x024cd944, size: 41 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (require(12711) /* metro dependency 12711: isActivityParticipantCurrentUserCurrentSession */).isActivityParticipantCurrentUserCurrentSession(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
/* Metro module 15566; source: modules/voice_panel/native/pip/VoicePanelSecondaryPIPContent.tsx; dependencies: [31, 1378, 8065, 1379, 4237, 8044, 8066, 33, 4501, 11794, 15444, 566, 3774, 11624, 8102, 4017, 15373, 6821, 8141, 15397, 10704, 2] */
|
||||
function _fun119221(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:6, offset: 0x02501a2a, size: 311 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const framesStore = importDefault(8065) /* metro dependency 8065: FramesStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_7 = (require(4237) /* metro dependency 4237: Constants */).ActivityLayoutMode;
|
||||
const env0_8 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
|
||||
const env0_9 = (require(8066) /* metro dependency 8066: FramesConstants */).FrameLayoutModes;
|
||||
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({activityContainer: {flex: 1}});
|
||||
object = {code: "function VoicePanelSecondaryPIPContentTsx1(){const{getActivityContainerPipStylesSpec,pipState,activePipOrientationLockState,windowDimensions}=this.__closure;const{width:width,height:height,shouldVerticallyCenter:shouldVerticallyCenter,shouldHorizontallyCenter:shouldHorizontallyCenter,marginLeft:marginLeft,marginTop:marginTop}=getActivityContainerPipStylesSpec({pipWidth:pipState.width,pipHeight:pipState.height,pipOrientationLockState:activePipOrientationLockState,isLandscape:windowDimensions.get().landscape});return{width:width,height:height,left:shouldHorizontallyCenter?'50%':'0%',top:shouldVerticallyCenter?'50%':'0%',marginLeft:marginLeft,marginTop:marginTop};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelSecondaryPIPContent.tsx');
|
||||
exports.default = VoicePanelSecondaryPIPContent;
|
||||
}
|
||||
|
||||
function VoicePanelSecondaryPIPContent() { // fn#119222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:1079, offset: 0x02501b61, size: 702 bytes, params: 1, frame: 28
|
||||
var r7;
|
||||
var r0;
|
||||
var defaultImport;
|
||||
var defaultImport2;
|
||||
const binding = env0_3;
|
||||
const useContext = binding.useContext;
|
||||
const windowDimensions = Reflect.apply(useContext, binding,
|
||||
[importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).windowDimensions;
|
||||
const value2 = (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState();
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
|
||||
let object = [EmbeddedActivitiesStore];
|
||||
const {connectedEmbeddedActivityChannelId, connectedEmbeddedActivity, pipOrientationLockState,
|
||||
panelMode} = Reflect.apply(useStateFromStoresObject, fluxModule, [object, _fun119223]);
|
||||
const {connectedFrame, framePanelMode,
|
||||
framePipOrientationLockState} = fluxModule.useStateFromStoresObject([FramesStore], _fun119224);
|
||||
const channel = fluxModule.useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(connectedEmbeddedActivityChannelId);
|
||||
});
|
||||
const value5 = binding.useMemo(_fun119226, [value2.width, value2.height]);
|
||||
const value6 = null;
|
||||
const r1 = value6 != connectedEmbeddedActivity && !(importDefault(8102) /* metro dependency 8102: isVoiceEmbeddedActivity */)(connectedEmbeddedActivityChannelId) && panelMode === ActivityPanelModes.PIP;
|
||||
const r12 = value6 != connectedFrame && framePanelMode === ActivityPanelModes.PIP ? framePipOrientationLockState : pipOrientationLockState;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = VoicePanelSecondaryPIPContentP;
|
||||
closure.__closure = {getActivityContainerPipStylesSpec: importDefault(15373) /* metro dependency 15373: getActivityContainerPIPStylesSpec */,
|
||||
pipState: value2, activePipOrientationLockState: r12, windowDimensions: windowDimensions};
|
||||
closure.__workletHash = 12186082276755;
|
||||
closure.__initData = env0_12;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
if (r1) {
|
||||
defaultImport = importDefault(6821) /* metro dependency 6821: NativeView */;
|
||||
object = {style: value5, pointerEvents: 'none'};
|
||||
defaultImport2 = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
var defaultImport2Props = {style: [styles.activityContainer, value12]};
|
||||
r7 = r7 ? ((Component) => <Component layoutMode={FrameLayoutModes.PIP} />)(importDefault(15397) /* metro dependency 15397: FrameView */) : ((Component) => <Component channel={channel} layoutMode={ActivityLayoutMode.PIP} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */);
|
||||
r0 = ((Component) => <Component {...object}>{((Component) => <Component {...defaultImport2Props}>{r7}</Component>)(defaultImport2)}</Component>)(defaultImport);
|
||||
} else if (r7) {
|
||||
defaultImport = importDefault(6821) /* metro dependency 6821: NativeView */;
|
||||
object = {style: value5, pointerEvents: 'none'};
|
||||
defaultImport2 = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
var defaultImport2Props = {style: [styles.activityContainer, value12]};
|
||||
r7 = r7 ? ((Component) => <Component layoutMode={FrameLayoutModes.PIP} />)(importDefault(15397) /* metro dependency 15397: FrameView */) : ((Component) => <Component channel={channel} layoutMode={ActivityLayoutMode.PIP} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */);
|
||||
r0 = ((Component) => <Component {...object}>{((Component) => <Component {...defaultImport2Props}>{r7}</Component>)(defaultImport2)}</Component>)(defaultImport);
|
||||
} else {
|
||||
r0 = value6;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun119223() { // fn#119223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:1239, offset: 0x02501e1f, size: 139 bytes, params: 1, frame: 18
|
||||
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
|
||||
const selfEmbeddedActivityForLocation = EmbeddedActivitiesStore.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
|
||||
const value4 = undefined;
|
||||
const applicationId = selfEmbeddedActivityForLocation == null ? value4 : selfEmbeddedActivityForLocation.applicationId;
|
||||
const object2 = {};
|
||||
object2.connectedEmbeddedActivityChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
|
||||
object2.connectedEmbeddedActivity = selfEmbeddedActivityForLocation;
|
||||
object2.pipOrientationLockState = applicationId == null ? value4 : EmbeddedActivitiesStore.getPipOrientationLockStateForApp(applicationId);
|
||||
object2.panelMode = EmbeddedActivitiesStore.getActivityPanelMode();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun119224() { // fn#119224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:1745, offset: 0x02501eaa, size: 90 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
const connectedFrame = FramesStore.getConnectedFrame();
|
||||
const value3 = undefined;
|
||||
const applicationId = connectedFrame == null ? value3 : connectedFrame.applicationId;
|
||||
const object2 = {connectedFrame: connectedFrame};
|
||||
object2.framePanelMode = FramesStore.getActivityPanelMode();
|
||||
object2.framePipOrientationLockState = applicationId == null ? value3 : FramesStore.getPipOrientationLockStateForApp(applicationId);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun119226() { // fn#119226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:2123, offset: 0x02501f1e, size: 118 bytes, params: 1, frame: 17
|
||||
const object2 = {'width': null, 'height': null, 'position': 'absolute', 'left': '50%', 'marginLeft': null,
|
||||
'top': '50%'};
|
||||
const widthBinding = width;
|
||||
object2.width = widthBinding;
|
||||
const heightBinding = height;
|
||||
object2.height = heightBinding;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
|
||||
value = value(widthBinding / 2);
|
||||
object2.marginLeft = -1 * value;
|
||||
object2.marginTop = -1 * (importDefault(11624) /* metro dependency 11624: roundToNearestPixel */)(heightBinding / 2);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function VoicePanelSecondaryPIPContentP() { // fn#119227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15763:2348, owner: VoicePanelSecondaryPIPContent.P, offset: 0x02501f94, size: 181 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(15373) /* metro dependency 15373: getActivityContainerPIPStylesSpec */;
|
||||
let {width, height} = env0_1;
|
||||
const windowDimensionsBinding = windowDimensions;
|
||||
const get = windowDimensionsBinding.get;
|
||||
value = value({pipWidth: width, pipHeight: height, pipOrientationLockState: env0_5, isLandscape: Reflect.apply(get,
|
||||
windowDimensionsBinding, []).landscape});
|
||||
width = value.width;
|
||||
height = value.height;
|
||||
const shouldVerticallyCenter = value.shouldVerticallyCenter;
|
||||
const shouldHorizontallyCenter = value.shouldHorizontallyCenter;
|
||||
const value3 = '0%';
|
||||
return {width: width, height: height, left: shouldHorizontallyCenter ? '50%' : value3,
|
||||
top: shouldVerticallyCenter ? '50%' : value3, marginLeft: value.marginLeft, marginTop: value.marginTop};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,440 @@
|
||||
/* Metro module 15436; source: modules/voice_panel/native/pip/useControllerPIPState.tsx; dependencies: [57, 31, 1378, 4606, 8065, 1379, 4607, 11795, 8044, 15390, 566, 3774, 8448, 7739, 15437, 11383, 15438, 15439, 15441, 2] */
|
||||
function _fun118098(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:6, offset: 0x024cbbe5, size: 283 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_118101 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const framesStore = importDefault(8065) /* metro dependency 8065: FramesStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const speakingStore = importDefault(4607) /* metro dependency 4607: SpeakingStore */;
|
||||
const env0_10 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
|
||||
const env0_11 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/useControllerPIPState.tsx');
|
||||
exports.useControllerPIPState = useControllerPIPState;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_118099(a0, a1) { // fn#118099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:228, offset: 0x024cbd00, size: 372 bytes, params: 3, frame: 20
|
||||
var r6;
|
||||
var r9;
|
||||
var r5;
|
||||
var value3;
|
||||
var regexp;
|
||||
const env0_0 = a0;
|
||||
const Symbol = global.Symbol;
|
||||
let value = typeof Symbol !== 'undefined';
|
||||
let r1 = value && a0[global.Symbol.iterator];
|
||||
r1 = !r1 ? a0['@@iterator'] : r1;
|
||||
if (r1) {
|
||||
value = r1.call(a0);
|
||||
return value.next.bind(value);
|
||||
}
|
||||
const Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
if (r1) {
|
||||
}
|
||||
return _fun118100;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_118101(a0, value);
|
||||
r5 = value;
|
||||
} else {
|
||||
value3 = ({}).toString.call(a0).slice(8, -1);
|
||||
r6 = value3 === 'Object' && a0.constructor;
|
||||
r9 = r6 ? a0.constructor.name : value3;
|
||||
if (r9 === 'Map') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Set') {
|
||||
r6 = global.Array.from(a0);
|
||||
} else if (r9 === 'Arguments') {
|
||||
value = _arrayLikeToArray_118101(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_118101(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun118100;
|
||||
}
|
||||
const TypeError = global.TypeError;
|
||||
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
||||
}
|
||||
|
||||
function useControllerPIPState({channelId, connected, focusedId, layoutManager, mode}) { // fn#118102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1255, offset: 0x024cbe74, size: 613 bytes, params: 2, frame: 35
|
||||
var object2;
|
||||
let binding = env0_4;
|
||||
const value3 = binding.useRef({'id': null, 'mode': null, 'width': 0, 'height': 0, 'containerHeight': 0,
|
||||
'showSecondaryPIP': false, id: undefined, mode: undefined});
|
||||
let useState = binding.useState;
|
||||
const value4 = Reflect.apply(useState, binding, [undefined]);
|
||||
const binding2 = env0_3;
|
||||
const value5 = binding2(value4, 2);
|
||||
const property = value5[0];
|
||||
var env0_4 = value5[1];
|
||||
const env0_5 = binding.useRef(property);
|
||||
binding.useInsertionEffect(_fun118103);
|
||||
const value6 = useShowSecondaryPIP({channelId: channelId, mode: mode});
|
||||
const value7 = (importDefault(15437) /* metro dependency 15437: useSelfHasVideo */)(channelId);
|
||||
useState = binding.useState;
|
||||
const property2 = binding2(Reflect.apply(useState, binding, [_fun118106]), 1)[0];
|
||||
binding.useLayoutEffect(function() {
|
||||
return _fun118109;
|
||||
}, [property2]);
|
||||
useState = binding.useState;
|
||||
const value8 = binding2(Reflect.apply(useState, binding, [function() {
|
||||
return layoutManager.getTargetDimensions(focusedId);
|
||||
}]), 2);
|
||||
const property3 = value8[0];
|
||||
const env0_7 = value8[1];
|
||||
const {participant, dimensions} = (importDefault(15438) /* metro dependency 15438: calculatePIPState */)(channelId,
|
||||
layoutManager, focusedId, property, {connected: connected, mode: mode, focusedId: focusedId,
|
||||
participantTargetDimensions: property3, selfHasVideo: value7, showSecondaryPIP: value6});
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value3.current, focusedId);
|
||||
copyDataProperties(object2, dimensions, focusedId);
|
||||
object2['id'] = participant?.id;
|
||||
object2['showSecondaryPIP'] = value6;
|
||||
const voicePanelPIPUtilsModule = require(15439) /* metro dependency 15439: VoicePanelPIPUtils */;
|
||||
const getPIPMode = voicePanelPIPUtilsModule.getPIPMode;
|
||||
object2['mode'] = Reflect.apply(getPIPMode, voicePanelPIPUtilsModule, [{channelId: channelId, connected: connected,
|
||||
manuallyFocusedId: focusedId, mode: mode, selfHasVideo: value7}]);
|
||||
const value11 = useCachedPipState(object2, value3);
|
||||
binding = env0_4;
|
||||
binding.useEffect(_fun118113, [channelId, property2]);
|
||||
binding.useEffect(function() {
|
||||
var closure = _fun118118;
|
||||
closure();
|
||||
return layoutManager.subscribeFromItem(closure);
|
||||
}, [focusedId, layoutManager, property3]);
|
||||
(importDefault(15441) /* metro dependency 15441: useExternalPipAspectRatioUpdaterNative */)(channelId,
|
||||
layoutManager, focusedId);
|
||||
return value11;
|
||||
}
|
||||
|
||||
function useShowSecondaryPIP({channelId, mode}) { // fn#118104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1549, owner: useControllerPIPState.useShowSecondaryPIP, offset: 0x024cc0d9, size: 138 bytes, params: 2, frame: 19
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore, FramesStore,
|
||||
ChannelStore], _fun118105, [channelId,
|
||||
(importDefault(15390) /* metro dependency 15390: useIsConnectedToVoiceChannel */)(channelId), mode]);
|
||||
}
|
||||
|
||||
function _fun118106() { // fn#118106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2171, offset: 0x024cc2b1, size: 58 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(11383) /* metro dependency 11383 */)(function(a0) {
|
||||
return a0();
|
||||
}, 1000, {leading: true});
|
||||
}
|
||||
|
||||
function _fun118108() { // fn#118108, offset: 0x024cc2eb, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun118109;
|
||||
}
|
||||
|
||||
function useCachedPipState(a0, a1) { // fn#118111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2665, owner: useControllerPIPState.useCachedPipState, offset: 0x024cc321, size: 96 bytes, params: 3, frame: 16
|
||||
const value = a0;
|
||||
const env0_1 = a1;
|
||||
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
||||
const value3 = cheapWorkletShallowEqualModule.cheapWorkletShallowEqual(value, a1.current);
|
||||
const result = !value3;
|
||||
env1_4.useEffect(_fun118112);
|
||||
return value3 ? a1.current : value;
|
||||
}
|
||||
|
||||
function _fun118113() { // fn#118113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2830, offset: 0x024cc39d, size: 138 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const BatchedStoreListener = (require(566) /* metro dependency 566: flux */).BatchedStoreListener;
|
||||
const batchedStoreListener = new BatchedStoreListener([SpeakingStore, ChannelRTCStore], _fun118114);
|
||||
batchedStoreListener.attach('pipstate-change-listeners-' + channelId);
|
||||
return _fun118116;
|
||||
}
|
||||
|
||||
function _fun118117() { // fn#118117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3188, offset: 0x024cc4e8, size: 35 bytes, params: 1, frame: 11
|
||||
const closure = updateParticipantDimensions;
|
||||
closure();
|
||||
return layoutManager.subscribeFromItem(closure);
|
||||
}
|
||||
|
||||
function _fun118105() { // fn#118105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1662, offset: 0x024cc163, size: 334 bytes, params: 1, frame: 18
|
||||
var r0;
|
||||
var connectedFrame;
|
||||
var activityPanelMode;
|
||||
var PIP;
|
||||
var modeBinding;
|
||||
var connectedActivityLocation;
|
||||
var embeddedActivityLocationChannelId;
|
||||
var channel;
|
||||
var activityPanelMode2;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const channel2 = ChannelStore.getChannel(channelId);
|
||||
if (channel2 == null) {
|
||||
connectedFrame = FramesStore.getConnectedFrame();
|
||||
activityPanelMode = FramesStore.getActivityPanelMode();
|
||||
if (connectedFrame == null) {
|
||||
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
|
||||
if (connectedActivityLocation == null) {
|
||||
return false;
|
||||
}
|
||||
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
|
||||
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
|
||||
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
|
||||
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
|
||||
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
|
||||
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
|
||||
return r0;
|
||||
}
|
||||
PIP = ActivityPanelModes.PIP;
|
||||
if (activityPanelMode !== PIP) {
|
||||
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
|
||||
if (connectedActivityLocation == null) {
|
||||
return false;
|
||||
}
|
||||
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
|
||||
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
|
||||
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
|
||||
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
|
||||
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
|
||||
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
|
||||
return r0;
|
||||
}
|
||||
modeBinding = mode;
|
||||
PIP = VoicePanelModes.PIP;
|
||||
if (modeBinding === PIP) {
|
||||
return true;
|
||||
}
|
||||
if (mode === VoicePanelModes.PANEL) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (channel2.isVocal()) {
|
||||
if (env0_2) {
|
||||
connectedFrame = FramesStore.getConnectedFrame();
|
||||
activityPanelMode = FramesStore.getActivityPanelMode();
|
||||
if (connectedFrame == null) {
|
||||
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
|
||||
if (connectedActivityLocation == null) {
|
||||
return false;
|
||||
}
|
||||
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
|
||||
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
|
||||
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
|
||||
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
|
||||
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
|
||||
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
|
||||
return r0;
|
||||
}
|
||||
PIP = ActivityPanelModes.PIP;
|
||||
if (activityPanelMode !== PIP) {
|
||||
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
|
||||
if (connectedActivityLocation == null) {
|
||||
return false;
|
||||
}
|
||||
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
|
||||
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
|
||||
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
|
||||
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
|
||||
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
|
||||
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
|
||||
return r0;
|
||||
}
|
||||
modeBinding = mode;
|
||||
PIP = VoicePanelModes.PIP;
|
||||
if (modeBinding === PIP) {
|
||||
return true;
|
||||
}
|
||||
if (mode === VoicePanelModes.PANEL) {
|
||||
return true;
|
||||
}
|
||||
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
|
||||
if (connectedActivityLocation == null) {
|
||||
return false;
|
||||
}
|
||||
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
|
||||
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
|
||||
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
|
||||
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
|
||||
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
|
||||
PIP = ActivityPanelModes.PIP;
|
||||
r0 = r0 && (activityPanelMode2 === PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
|
||||
return r0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
connectedFrame = FramesStore.getConnectedFrame();
|
||||
activityPanelMode = FramesStore.getActivityPanelMode();
|
||||
if (connectedFrame == null) {
|
||||
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
|
||||
if (connectedActivityLocation == null) {
|
||||
return false;
|
||||
}
|
||||
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
|
||||
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
|
||||
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
|
||||
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
|
||||
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
|
||||
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
|
||||
return r0;
|
||||
}
|
||||
PIP = ActivityPanelModes.PIP;
|
||||
if (activityPanelMode !== PIP) {
|
||||
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
|
||||
if (connectedActivityLocation == null) {
|
||||
return false;
|
||||
}
|
||||
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
|
||||
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
|
||||
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
|
||||
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel);
|
||||
r0 = r0 && embeddedActivityLocationChannelId !== channelId;
|
||||
r0 = r0 && (activityPanelMode2 === ActivityPanelModes.PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
|
||||
return r0;
|
||||
}
|
||||
modeBinding = mode;
|
||||
PIP = VoicePanelModes.PIP;
|
||||
if (modeBinding === PIP) {
|
||||
return true;
|
||||
}
|
||||
if (mode === VoicePanelModes.PANEL) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
|
||||
if (connectedActivityLocation == null) {
|
||||
return false;
|
||||
}
|
||||
embeddedActivityLocationChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
|
||||
channel = ChannelStore.getChannel(embeddedActivityLocationChannelId);
|
||||
activityPanelMode2 = EmbeddedActivitiesStore.getActivityPanelMode();
|
||||
r0 = channel != null && (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).isActivityInTextSupportedForChannel(channel) && embeddedActivityLocationChannelId !== channelId;
|
||||
PIP = ActivityPanelModes.PIP;
|
||||
r0 = r0 && (activityPanelMode2 === PIP && (mode === VoicePanelModes.PIP || embeddedActivityLocationChannelId !== channelId));
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun118109() { // fn#118109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2248, offset: 0x024cc2f6, size: 19 bytes, params: 1, frame: 9
|
||||
return env1_6.cancel();
|
||||
}
|
||||
|
||||
function _fun118112() { // fn#118112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2772, offset: 0x024cc381, size: 28 bytes, params: 1, frame: 2
|
||||
if (result) {
|
||||
require.current = env0_0;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun118114() { // fn#118114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:2884, offset: 0x024cc427, size: 170 bytes, params: 1, frame: 21
|
||||
var environment;
|
||||
var r6;
|
||||
var r2;
|
||||
var value7;
|
||||
var getParticipant;
|
||||
var value8;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const _createForOfIteratorHelperLoose_118099Binding = _createForOfIteratorHelperLoose_118099;
|
||||
const speakers = SpeakingStore.getSpeakers();
|
||||
const value3 = undefined;
|
||||
const value4 = _createForOfIteratorHelperLoose_118099Binding(speakers);
|
||||
const value5 = value4();
|
||||
let done = value5.done;
|
||||
if (done) {
|
||||
r2 = value3;
|
||||
} else {
|
||||
r6 = value5;
|
||||
while (true) {
|
||||
value7 = r6.value;
|
||||
getParticipant = ChannelRTCStore.getParticipant;
|
||||
if (Reflect.apply(getParticipant, ChannelRTCStore, [channelId, value7]) != null) {
|
||||
r2 = value7;
|
||||
break;
|
||||
}
|
||||
value8 = value4();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
r2 = value3;
|
||||
break;
|
||||
}
|
||||
r6 = value8;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (r2 !== env1_5.current && r2 != null) {
|
||||
if (env1_5.current == null) {
|
||||
env1_4(r2);
|
||||
} else {
|
||||
env1_6(_fun118115);
|
||||
}
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function updateParticipantDimensions() { // fn#118118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3225, offset: 0x024cc50b, size: 25 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
env1_7(function(a0) {
|
||||
var value = a0;
|
||||
var value3 = layoutManager.getTargetDimensions(focusedId);
|
||||
return require(dependencyMap[13]).cheapWorkletShallowEqual(value, value3) ? value : value3;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun118115() { // fn#118115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3086, offset: 0x024cc4d1, size: 23 bytes, params: 1, frame: 11
|
||||
return env2_4(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/* Metro module 15442; source: modules/voice_panel/native/pip/usePIPAvoidanceSpecs.tsx; dependencies: [11795, 11793, 11796, 4017, 15319, 15364, 3860, 697, 7739, 15263, 15365, 11799, 11282, 2] */
|
||||
function _fun118152(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:6, offset: 0x024cddad, size: 200 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(11795) /* metro dependency 11795: VoicePanelConstants */).VoicePanelModes;
|
||||
const env0_4 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes;
|
||||
const env0_5 = (require(11796) /* metro dependency 11796: MorphablePanelConstants */).PIP_WINDOW_OFFSET;
|
||||
object = {code: 'function usePIPAvoidanceSpecsTsx1(){const{mode,controlsSpecs,keyboardHeight,safeArea,screenName}=this.__closure;return{mode:mode.get(),controlsSpecs:controlsSpecs.get(),keyboardHeight:keyboardHeight.get(),safeArea:safeArea.get(),screenName:screenName.get()};}'};
|
||||
object = {code: 'function usePIPAvoidanceSpecsTsx2(props,previous){const{cheapWorkletShallowEqual,VoicePanelModes,VoicePanelControlsModes,DEFAULT_CHANNEL_INPUT_HEIGHT,PIP_WINDOW_OFFSET,getPIPBottomOffsetForPIPMode,getAdjustedBottomOffsets,calculateVoicePanelHeaderSpecs,edgeGutter,updateSharedValueIfChanged,pipAvoidanceSpecs}=this.__closure;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{mode:mode,controlsSpecs:controlsSpecs,keyboardHeight:keyboardHeight,safeArea:safeArea,screenName:screenName}=props;const screenBottomOffset=function(){if(mode!==VoicePanelModes.PIP){if(mode===VoicePanelModes.PANEL&&controlsSpecs.mode===VoicePanelControlsModes.DRAWER){return DEFAULT_CHANNEL_INPUT_HEIGHT+PIP_WINDOW_OFFSET;}return 0;}return getPIPBottomOffsetForPIPMode(screenName);}();let{bottomOffset:bottomOffset}=getAdjustedBottomOffsets({screenBottomOffset:screenBottomOffset,safeAreaBottom:safeArea.bottom,keyboardHeight:keyboardHeight});if(keyboardHeight<=0&&mode===VoicePanelModes.PANEL&&controlsSpecs.mode===VoicePanelControlsModes.FLOATING_DEFAULT){bottomOffset+=controlsSpecs.height+PIP_WINDOW_OFFSET;}const{height:headerHeight}=calculateVoicePanelHeaderSpecs(safeArea,edgeGutter);updateSharedValueIfChanged(pipAvoidanceSpecs,{top:mode===VoicePanelModes.PANEL&&controlsSpecs.mode===VoicePanelControlsModes.FLOATING_DEFAULT?headerHeight:0,bottom:bottomOffset});}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/pip/usePIPAvoidanceSpecs.tsx');
|
||||
exports.default = usePIPAvoidanceSpecs_118153;
|
||||
}
|
||||
|
||||
function usePIPAvoidanceSpecs_118153({mode, controlsSpecs, safeArea}) { // fn#118153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:1965, offset: 0x024cde75, size: 450 bytes, params: 2, frame: 26
|
||||
var object2;
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({'top': 0,
|
||||
'bottom': 0});
|
||||
const value3 = (importDefault(15319) /* metro dependency 15319: useAnimatedKeyboardHeight */)();
|
||||
const value4 = (importDefault(15364) /* metro dependency 15364: useScreenNameSharedValue */)();
|
||||
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 value5 = Reflect.apply(useToken, useTokenModule, [VOICE_PANEL_GUTTER]);
|
||||
const env0_6 = value5;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
const closure = usePIPAvoidanceSpecs_118153P;
|
||||
closure.__closure = {mode: mode, controlsSpecs: controlsSpecs, keyboardHeight: value3, safeArea: safeArea,
|
||||
screenName: value4};
|
||||
closure.__workletHash = 17017598468922;
|
||||
closure.__initData = env0_6;
|
||||
const closure2 = usePIPAvoidanceSpecs_118153U;
|
||||
object2 = {};
|
||||
object2.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
|
||||
object2.VoicePanelModes = VoicePanelModes;
|
||||
object2.VoicePanelControlsModes = VoicePanelControlsModes;
|
||||
object2.DEFAULT_CHANNEL_INPUT_HEIGHT = 60;
|
||||
object2.PIP_WINDOW_OFFSET = PIP_WINDOW_OFFSET;
|
||||
object2.getPIPBottomOffsetForPIPMode = importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */;
|
||||
object2.getAdjustedBottomOffsets = importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */;
|
||||
object2.calculateVoicePanelHeaderSpecs = importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */;
|
||||
object2.edgeGutter = value5;
|
||||
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
||||
object2.pipAvoidanceSpecs = value2;
|
||||
closure2.__closure = object2;
|
||||
closure2.__workletHash = 13029906729161;
|
||||
closure2.__initData = env0_7;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function usePIPAvoidanceSpecs_118153P() { // fn#118154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:2208, owner: usePIPAvoidanceSpecs_118153.p, offset: 0x024ce037, size: 96 bytes, params: 1, frame: 11
|
||||
const object2 = {};
|
||||
object2.mode = mode.get();
|
||||
object2.controlsSpecs = controlsSpecs.get();
|
||||
object2.keyboardHeight = env0_4.get();
|
||||
object2.safeArea = safeArea.get();
|
||||
object2.screenName = env0_5.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function usePIPAvoidanceSpecs_118153U(a0, a1) { // fn#118155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15639:2439, owner: usePIPAvoidanceSpecs_118153.u, offset: 0x024ce097, size: 417 bytes, params: 3, frame: 21
|
||||
var r4;
|
||||
var mode;
|
||||
var controlsSpecs;
|
||||
var keyboardHeight;
|
||||
var safeArea;
|
||||
var bottomOffset;
|
||||
let value = a1;
|
||||
const value3 = undefined;
|
||||
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
||||
const cheapWorkletShallowEqual = cheapWorkletShallowEqualModule.cheapWorkletShallowEqual;
|
||||
let r1 = value ?? value3;
|
||||
if (!Reflect.apply(cheapWorkletShallowEqual, cheapWorkletShallowEqualModule, [a0, r1])) {
|
||||
mode = a0.mode;
|
||||
controlsSpecs = a0.controlsSpecs;
|
||||
keyboardHeight = a0.keyboardHeight;
|
||||
safeArea = a0.safeArea;
|
||||
r4 = mode !== VoicePanelModes.PIP ? mode !== VoicePanelModes.PANEL || controlsSpecs.mode !== VoicePanelControlsModes.DRAWER ? 0 : 60 + PIP_WINDOW_OFFSET : (importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */)(a0.screenName);
|
||||
value = importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */;
|
||||
bottomOffset = value({screenBottomOffset: r4, safeAreaBottom: safeArea.bottom,
|
||||
keyboardHeight: keyboardHeight}).bottomOffset;
|
||||
value = 0;
|
||||
r1 = keyboardHeight <= value && mode === VoicePanelModes.PANEL;
|
||||
r1 = r1 && controlsSpecs.mode === VoicePanelControlsModes.FLOATING_DEFAULT;
|
||||
r4 = r1 ? bottomOffset + (controlsSpecs.height + PIP_WINDOW_OFFSET) : bottomOffset;
|
||||
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env0_3,
|
||||
{top: mode !== VoicePanelModes.PANEL || controlsSpecs.mode !== VoicePanelControlsModes.FLOATING_DEFAULT ? value : (importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */)(safeArea,
|
||||
|
||||
env0_6).height, bottom: r4});
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user