This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -1,8 +1,10 @@
/* Metro module 15440; source: modules/voice_panel/native/pip/VoicePanelPIPConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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};
@@ -11,3 +13,4 @@ function _fun118146(global, require, importDefault, importAll, module, exports,
exports.DEFAULT_PIP_POSITION_OFFSET = 72;
}
global.__d(_fun118146, 15440, [2]) /* metro module 15440, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
@@ -1,228 +1,235 @@
/* 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] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import NativeView from '../../../core/native/NativeView.tsx'; /* Metro dependency 6821 */
import Module15565 from '../../../../by-id/module-15565.js'; /* Metro dependency 15565 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as VoicePanelPIPUtilsModule from './VoicePanelPIPUtils.tsx'; /* Metro dependency 15439 */
import * as VoicePanelPIPStateContextModule from './VoicePanelPIPStateContext.tsx'; /* Metro dependency 15444 */
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 StyleSheet = (ReactNativeModule).StyleSheet;
let value = JsxRuntimeModule;
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 */]);
[NativeView]);
value = importDefault(4017) /* metro dependency 4017: ReanimatedRexport */;
createAnimatedComponent = value.createAnimatedComponent;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon = (NativeModule).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',
object = {};
const object2 = {'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;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.iconContainer = object2;
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;
}
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object3['backgroundColor'] = BLACK;
object.overlay = object3;
const env0_12 = Reflect.apply(createStyles, value, [object]);
object = {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)};}"};
object = {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)};}'};
object = {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)};}'};
object = {code: 'function VoicePanelPIPPushToTalkOverlayTsx4(event,success){const{runOnJS,handlePushToTalk}=this.__closure;if(!success){return;}runOnJS(handlePushToTalk)(false);}'};
object = {code: 'function VoicePanelPIPPushToTalkOverlayTsx5(){const{runOnJS,handlePushToTalk}=this.__closure;runOnJS(handlePushToTalk)(false);}'};
object = {code: 'function VoicePanelPIPPushToTalkOverlayTsx6(){const{runOnJS,handlePushToTalk}=this.__closure;runOnJS(handlePushToTalk)(true);}'};
(FileImportTrackerModule).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 = (VoicePanelPIPStateContextModule).usePIPState();
const styles = useStyles();
const value4 = Module00057(usePushToTalk(), 2);
const property = value4[0];
const property2 = value4[1];
const WHITE = (Native).unsafe_rawColors.WHITE;
const BLACK = (Native).unsafe_rawColors.BLACK;
const BLACK2 = BLACK;
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = VoicePanelPIPPushToTalkOverlayO;
let object = {'isPushingToTalk': null, 'EXPANDED_ICON_SIZE': 48, 'BASE_ICON_SIZE': 32};
object.isPushingToTalk = property;
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.PUSH_TO_TALK_PIP_PHYSICS = PUSH_TO_TALK_PIP_PHYSICS;
object.white = WHITE;
closure.__closure = object;
closure.__workletHash = 3936373516983;
closure.__initData = env0_13;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.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, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = VoicePanelPIPPushToTalkOverlayH;
object = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isPushingToTalk: property,
PUSH_TO_TALK_PIP_PHYSICS: PUSH_TO_TALK_PIP_PHYSICS};
const getVoicePanelPIPBorderRadius = (VoicePanelPIPUtilsModule).getVoicePanelPIPBorderRadius;
object.getVoicePanelPIPBorderRadius = getVoicePanelPIPBorderRadius;
object.pipState = value2;
closure.__closure = object;
closure.__workletHash = 450590017248;
closure.__initData = env0_15;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
let binding = BLACK2;
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 = (Module05321Module).GestureDetector;
const bindingProps = {style: [styles.iconContainer, value5], hitSlop: env0_11};
const binding2 = env0_10;
const Icon = (NativeModule).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={Module15565} 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 = (ReanimatedRexportModule).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 _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 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 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 object = {};
let withSpring = SpringModule.withSpring;
object.right = Reflect.apply(withSpring, SpringModule, [r10, PUSH_TO_TALK_PIP_PHYSICS]);
object.bottom = SpringModule.withSpring(r10, PUSH_TO_TALK_PIP_PHYSICS);
const object2 = {};
object2.scale = SpringModule.withSpring(env0_1.get() ? 1.5 : 1, PUSH_TO_TALK_PIP_PHYSICS);
object.transform = [object2];
withSpring = SpringModule.withSpring;
const WHITE2 = env0_1.get() ? WHITE : 'rgba(0, 0, 0, 0.54)';
object.backgroundColor = Reflect.apply(withSpring, SpringModule, [WHITE2, PUSH_TO_TALK_PIP_PHYSICS]);
return object;
}
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 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 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 object = {};
let value = environment.__proto__;
const withSpring = SpringModule.withSpring;
let binding = env0_1;
object.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;
object.borderRadius = Reflect.apply(getVoicePanelPIPBorderRadius, value, [binding.width, binding.height]);
return object;
}
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 = (Module05321Module).Gesture;
const Exclusive = Gesture.Exclusive;
const Gesture2 = (Module05321Module).Gesture;
const value3 = Gesture2.Tap().maxDistance(30);
const onEnd = value3.onEnd;
let closure = o_119217;
const runOnJS = (ReanimatedRexportModule).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 = (Module05321Module).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 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);
}
}
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);
}
global.__d(_fun119209, 15564, [57, 31, 27, 11795, 33, 4017, 6821, 1305, 4501, 697, 10750, 15444, 4577, 15439, 5321,
15565,
2]) /* metro module 15564, dependencies: [57, 31, 27, 11795, 33, 4017, 6821, 1305, 4501, 697, 10750, 15444, 4577, 15439, 5321, 15565, 2] */;
@@ -1,12 +1,20 @@
/* Metro module 15444; source: modules/voice_panel/native/pip/VoicePanelPIPStateContext.tsx; dependencies: [31, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
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 */;
let value = ReactModule;
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');
(FileImportTrackerModule).fileFinishedImporting('modules/voice_panel/native/pip/VoicePanelPIPStateContext.tsx');
exports.VoicePanelPIPStateContext = value;
exports.usePIPState = usePIPState;
function usePIPState() { // fn#118170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15641:342, offset: 0x01ee8a20, size: 24 bytes, params: 1, frame: 11
return env0_0.useContext(env0_1);
}
}
global.__d(_fun118169, 15444, [31, 2]) /* metro module 15444, dependencies: [31, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,128 +1,144 @@
/* 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] */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import FramesStore from '../../../frames/FramesStore.tsx'; /* Metro dependency 8065 */
import VoicePanelStateContext from '../VoicePanelStateContext.tsx'; /* Metro dependency 11794 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ConstantsModule from '../../../activities/Constants.tsx'; /* Metro dependency 4237 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ActivityPanelConstantsModule from '../../../activities/panel/ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
import * as FramesConstantsModule from '../../../frames/FramesConstants.tsx'; /* Metro dependency 8066 */
import * as VoicePanelPIPStateContextModule from './VoicePanelPIPStateContext.tsx'; /* Metro dependency 15444 */
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}});
const env0_11 = (CreateStylesModule).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');
(FileImportTrackerModule).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 useContext = ReactModule.useContext;
const windowDimensions = Reflect.apply(useContext, ReactModule,
[VoicePanelStateContext]).windowDimensions;
const value2 = (VoicePanelPIPStateContextModule).usePIPState();
const styles = useStyles();
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 = ReactModule.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 useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const VoicePanelSecondaryPIPContentP2 = VoicePanelSecondaryPIPContentP;
VoicePanelSecondaryPIPContentP2.__closure = {getActivityContainerPipStylesSpec: importDefault(15373) /* metro dependency 15373: getActivityContainerPIPStylesSpec */,
pipState: value2, activePipOrientationLockState: r12, windowDimensions: windowDimensions};
VoicePanelSecondaryPIPContentP2.__workletHash = 12186082276755;
VoicePanelSecondaryPIPContentP2.__initData = env0_12;
const value12 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [VoicePanelSecondaryPIPContentP2]);
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 embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
const connectedActivityLocation = embeddedActivitiesStoreBinding.getConnectedActivityLocation();
const selfEmbeddedActivityForLocation = embeddedActivitiesStoreBinding.getSelfEmbeddedActivityForLocation(connectedActivityLocation);
const value4 = undefined;
const applicationId = selfEmbeddedActivityForLocation == null ? value4 : selfEmbeddedActivityForLocation.applicationId;
const object = {};
object.connectedEmbeddedActivityChannelId = (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation);
object.connectedEmbeddedActivity = selfEmbeddedActivityForLocation;
object.pipOrientationLockState = applicationId == null ? value4 : EmbeddedActivitiesStore.getPipOrientationLockStateForApp(applicationId);
object.panelMode = EmbeddedActivitiesStore.getActivityPanelMode();
return object;
}
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 object = {connectedFrame: connectedFrame};
object.framePanelMode = FramesStore.getActivityPanelMode();
object.framePipOrientationLockState = applicationId == null ? value3 : FramesStore.getPipOrientationLockStateForApp(applicationId);
return object;
}
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 object = {'width': null, 'height': null, 'position': 'absolute', 'left': '50%', 'marginLeft': null,
'top': '50%'};
const widthBinding = width;
object.width = widthBinding;
const heightBinding = height;
object.height = heightBinding;
let value = environment.__proto__;
value = importDefault(11624) /* metro dependency 11624: roundToNearestPixel */;
value = value(widthBinding / 2);
object.marginLeft = -1 * value;
object.marginTop = -1 * (importDefault(11624) /* metro dependency 11624: roundToNearestPixel */)(heightBinding / 2);
return object;
}
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};
}
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};
}
global.__d(_fun119221, 15566, [31, 1378, 8065, 1379, 4237, 8044, 8066, 33, 4501, 11794, 15444, 566, 3774, 11624,
8102, 4017, 15373, 6821, 8141, 15397, 10704,
2]) /* metro module 15566, dependencies: [31, 1378, 8065, 1379, 4237, 8044, 8066, 33, 4501, 11794, 15444, 566, 3774, 11624, 8102, 4017, 15373, 6821, 8141, 15397, 10704, 2] */;
@@ -1,4 +1,22 @@
/* 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] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import SpeakingStore from '../../../../stores/SpeakingStore.tsx'; /* Metro dependency 4607 */
import FramesStore from '../../../frames/FramesStore.tsx'; /* Metro dependency 8065 */
import UseIsConnectedToVoiceChannel from '../hooks/useIsConnectedToVoiceChannel.tsx'; /* Metro dependency 15390 */
import UseSelfHasVideo from '../utils/useSelfHasVideo.tsx'; /* Metro dependency 15437 */
import CalculatePIPState from '../utils/calculatePIPState.tsx'; /* Metro dependency 15438 */
import UseExternalPipAspectRatioUpdaterNative from '../../../external_pip/useExternalPipAspectRatioUpdater.native.tsx'; /* Metro dependency 15441 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CheapWorkletShallowEqualModule from '../../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
import * as ActivityPanelConstantsModule from '../../../activities/panel/ActivityPanelConstants.tsx'; /* Metro dependency 8044 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as VoicePanelPIPUtilsModule from './VoicePanelPIPUtils.tsx'; /* Metro dependency 15439 */
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) {
@@ -46,262 +64,273 @@ function _fun118098(global, require, importDefault, importAll, module, exports,
};
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');
(FileImportTrackerModule).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)) {
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);
}
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') {
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);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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 {
r6 = value;
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;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun118100;
}
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 _fun118100() { // fn#118100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:799, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
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;
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
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 value5 = Module00057(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 = (UseSelfHasVideo)(channelId);
useState = binding.useState;
const property2 = Module00057(Reflect.apply(useState, binding, [_fun118106]), 1)[0];
binding.useLayoutEffect(function() {
return _fun118109;
}, [property2]);
useState = binding.useState;
const value8 = Module00057(Reflect.apply(useState, binding, [function() {
return layoutManager.getTargetDimensions(focusedId);
}]), 2);
const property3 = value8[0];
const env0_7 = value8[1];
const {participant, dimensions} = (CalculatePIPState)(channelId,
layoutManager, focusedId, property, {connected: connected, mode: mode, focusedId: focusedId,
participantTargetDimensions: property3, selfHasVideo: value7, showSecondaryPIP: value6});
object = {};
copyDataProperties(object, value3.current, focusedId);
copyDataProperties(object, dimensions, focusedId);
object['id'] = participant?.id;
object['showSecondaryPIP'] = value6;
const getPIPMode = VoicePanelPIPUtilsModule.getPIPMode;
object['mode'] = Reflect.apply(getPIPMode, VoicePanelPIPUtilsModule, [{channelId: channelId, connected: connected,
manuallyFocusedId: focusedId, mode: mode, selfHasVideo: value7}]);
const value11 = useCachedPipState(object, value3);
binding = env0_4;
binding.useEffect(_fun118113, [channelId, property2]);
binding.useEffect(function() {
var closure = _fun118118;
closure();
return layoutManager.subscribeFromItem(closure);
}, [focusedId, layoutManager, property3]);
(UseExternalPipAspectRatioUpdaterNative)(channelId,
layoutManager, focusedId);
return value11;
function _fun118103() { // fn#118103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:1523, offset: 0x0100bd4b, size: 21 bytes, params: 1, frame: 2
env0_5.current = Module00057;
}
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) {
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 (FluxModule).useStateFromStores([EmbeddedActivitiesStore, FramesStore,
ChannelStore], _fun118105, [channelId,
(UseIsConnectedToVoiceChannel)(channelId), mode]);
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 framesStoreBinding;
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) {
framesStoreBinding = FramesStore;
connectedFrame = framesStoreBinding.getConnectedFrame();
activityPanelMode = framesStoreBinding.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) {
framesStoreBinding = FramesStore;
connectedFrame = framesStoreBinding.getConnectedFrame();
activityPanelMode = framesStoreBinding.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;
}
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;
framesStoreBinding = FramesStore;
connectedFrame = framesStoreBinding.getConnectedFrame();
activityPanelMode = framesStoreBinding.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;
}
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) {
@@ -310,131 +339,129 @@ function _fun118105() { // fn#118105, source: /ci/build/discord/discord/discord_
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 = 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;
}
return false;
}
connectedFrame = FramesStore.getConnectedFrame();
activityPanelMode = FramesStore.getActivityPanelMode();
if (connectedFrame == null) {
connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
if (connectedActivityLocation == null) {
return false;
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 _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();
}
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;
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 value3 = CheapWorkletShallowEqualModule.cheapWorkletShallowEqual(value, a1.current);
const result = !value3;
env1_4.useEffect(_fun118112);
return value3 ? a1.current : value;
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;
}
}
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 _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 = (FluxModule).BatchedStoreListener;
const batchedStoreListener = new BatchedStoreListener([SpeakingStore, ChannelRTCStore], _fun118114);
batchedStoreListener.attach('pipstate-change-listeners-' + channelId);
return _fun118116;
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 channelRTCStoreBinding;
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;
channelRTCStoreBinding = ChannelRTCStore;
getParticipant = channelRTCStoreBinding.getParticipant;
if (Reflect.apply(getParticipant, channelRTCStoreBinding, [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 _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);
}
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;
function _fun118116() { // fn#118116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15633:3151, offset: 0x00d0ff6d, size: 19 bytes, params: 1, frame: 9
return env0_0.detach();
}
r6 = value8;
continue;
}
}
if (r2 !== env1_5.current && r2 != null) {
if (env1_5.current == null) {
env1_4(r2);
} else {
env1_6(_fun118115);
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 updateParticipantDimensions2 = updateParticipantDimensions;
updateParticipantDimensions2();
return layoutManager.subscribeFromItem(updateParticipantDimensions2);
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;
});
}
}
}
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);
}
global.__d(_fun118098, 15436, [57, 31, 1378, 4606, 8065, 1379, 4607, 11795, 8044, 15390, 566, 3774, 8448, 7739,
15437, 11383, 15438, 15439, 15441,
2]) /* metro module 15436, dependencies: [57, 31, 1378, 4606, 8065, 1379, 4607, 11795, 8044, 15390, 566, 3774, 8448, 7739, 15437, 11383, 15438, 15439, 15441, 2] */;
@@ -1,95 +1,102 @@
/* 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] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseAnimatedKeyboardHeight from '../../../keyboard/native/useAnimatedKeyboardHeight.tsx'; /* Metro dependency 15319 */
import UseScreenNameSharedValue from '../../../panels/morphable/native/useScreenNameSharedValue.tsx'; /* Metro dependency 15364 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CheapWorkletShallowEqualModule from '../../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
import * as VoicePanelControlsConstantsModule from '../controls/VoicePanelControlsConstants.tsx'; /* Metro dependency 11793 */
import * as VoicePanelConstantsModule from '../../VoicePanelConstants.tsx'; /* Metro dependency 11795 */
import * as MorphablePanelConstantsModule from '../../../panels/morphable/native/MorphablePanelConstants.tsx'; /* Metro dependency 11796 */
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');
(FileImportTrackerModule).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
const value2 = (ReanimatedRexportModule).useSharedValue({'top': 0,
'bottom': 0});
const value3 = (UseAnimatedKeyboardHeight)();
const value4 = (UseScreenNameSharedValue)();
const useToken = UseTokenModule.useToken;
const VOICE_PANEL_GUTTER = (Native).modules.mobile.VOICE_PANEL_GUTTER;
const value5 = Reflect.apply(useToken, UseTokenModule, [VOICE_PANEL_GUTTER]);
const env0_6 = value5;
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
const usePIPAvoidanceSpecs_118153P2 = usePIPAvoidanceSpecs_118153P;
usePIPAvoidanceSpecs_118153P2.__closure = {mode: mode, controlsSpecs: controlsSpecs, keyboardHeight: value3,
safeArea: safeArea, screenName: value4};
usePIPAvoidanceSpecs_118153P2.__workletHash = 17017598468922;
usePIPAvoidanceSpecs_118153P2.__initData = env0_6;
const usePIPAvoidanceSpecs_118153U2 = usePIPAvoidanceSpecs_118153U;
object = {};
object.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
object.VoicePanelModes = VoicePanelModes;
object.VoicePanelControlsModes = VoicePanelControlsModes;
object.DEFAULT_CHANNEL_INPUT_HEIGHT = 60;
object.PIP_WINDOW_OFFSET = PIP_WINDOW_OFFSET;
object.getPIPBottomOffsetForPIPMode = importDefault(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */;
object.getAdjustedBottomOffsets = importDefault(15365) /* metro dependency 15365: getAdjustedBottomOffsets */;
object.calculateVoicePanelHeaderSpecs = importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */;
object.edgeGutter = value5;
object.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
object.pipAvoidanceSpecs = value2;
usePIPAvoidanceSpecs_118153U2.__closure = object;
usePIPAvoidanceSpecs_118153U2.__workletHash = 13029906729161;
usePIPAvoidanceSpecs_118153U2.__initData = env0_7;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [usePIPAvoidanceSpecs_118153P2,
usePIPAvoidanceSpecs_118153U2]);
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 object = {};
object.mode = mode.get();
object.controlsSpecs = controlsSpecs.get();
object.keyboardHeight = VoicePanelControlsConstantsModule.VoicePanelControlsModes.get();
object.safeArea = safeArea.get();
object.screenName = MorphablePanelConstantsModule.PIP_WINDOW_OFFSET.get();
return object;
}
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_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 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 */)(VoicePanelConstantsModule.VoicePanelModes,
{top: mode !== VoicePanelModes.PANEL || controlsSpecs.mode !== VoicePanelControlsModes.FLOATING_DEFAULT ? value : (importDefault(11799) /* metro dependency 11799: calculateVoicePanelHeaderSpecs */)(safeArea,
env0_6).height, bottom: r4});
}
return value3;
}
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;
}
global.__d(_fun118152, 15442, [11795, 11793, 11796, 4017, 15319, 15364, 3860, 697, 7739, 15263, 15365, 11799, 11282,
2]) /* metro module 15442, dependencies: [11795, 11793, 11796, 4017, 15319, 15364, 3860, 697, 7739, 15263, 15365, 11799, 11282, 2] */;