Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,224 @@
|
||||
/* Metro module 10700; source: modules/video_calls/native/components/ActivityTile.tsx; dependencies: [5, 57, 31, 27, 1378, 1878, 661, 1309, 4237, 33, 1305, 4501, 697, 566, 1360, 6777, 4617, 3995, 10701, 6771, 6789, 8620, 1244, 8107, 8109, 10703, 8106, 5278, 10704, 10717, 4579, 3868, 2] */
|
||||
function _fun82226(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:6, offset: 0x01eefa39, size: 686 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const Fonts = value.Fonts;
|
||||
const env0_8 = value.ThemeTypes;
|
||||
const getThemedRippleConfig = (require(1309) /* metro dependency 1309: FormConstants */).getThemedRippleConfig;
|
||||
const env0_9 = (require(4237) /* metro dependency 4237: Constants */).ActivityLayoutMode;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const XSMALL = AvatarSizes.XSMALL;
|
||||
const env0_13 = getThemedRippleConfig({foreground: true});
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object2.pressableOpacity = {'width': '100%', 'height': '100%', 'backgroundColor': null, 'justifyContent': 'center',
|
||||
'alignItems': 'center', backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
object2.activityPreview = {'alignItems': 'center', 'display': 'flex', 'width': '100%', 'padding': 16};
|
||||
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object2.activityViewContainer = {flex: 1, backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
let TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
|
||||
object2.titleText = {'fontSize': 16, 'lineHeight': 24, 'color': null, 'fontFamily': null, 'textAlign': 'center',
|
||||
'marginLeft': 16, 'marginRight': 16, color: TEXT_DEFAULT, fontFamily: DISPLAY_EXTRABOLD};
|
||||
TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
const PRIMARY_NORMAL = Fonts.PRIMARY_NORMAL;
|
||||
object2.subtitleText = {'fontSize': 14, 'lineHeight': 18, 'color': null, 'fontFamily': null, 'textAlign': 'center',
|
||||
'marginLeft': 16, 'marginRight': 16, color: TEXT_DEFAULT, fontFamily: PRIMARY_NORMAL};
|
||||
const object3 = {};
|
||||
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
|
||||
object3.height = AVATAR_SIZE_MAP[XSMALL];
|
||||
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
|
||||
object3.backgroundColor = BACKGROUND_MOD_NORMAL;
|
||||
object2.overflow = object3;
|
||||
object2.buttonWrapper = {'marginTop': 8, 'alignSelf': 'center'};
|
||||
object2.buttonPill = {borderRadius: 100};
|
||||
const env0_14 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ActivityTile.tsx');
|
||||
exports.default = ActivityTile;
|
||||
}
|
||||
|
||||
function ActivityTileInner({participant, style, channel, onSingleTap}) { // fn#82227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1155, offset: 0x01eefce7, size: 1566 bytes, params: 2, frame: 39
|
||||
var r11;
|
||||
var r14;
|
||||
var defaultImport3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
var items2;
|
||||
var items3;
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
var BaseTextButton;
|
||||
const env0_4 = undefined;
|
||||
const ActivityTileInnerHandleCanJoin = function() {
|
||||
return _handleCanJoin.apply(this, arguments);
|
||||
};
|
||||
const closure = onPress_82232;
|
||||
const styles = useStyles();
|
||||
const defaultImport = importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */;
|
||||
const items4 = [participant.applicationId];
|
||||
const property = env0_4(defaultImport(items4), 1)[0];
|
||||
const value5 = ((a0) => {
|
||||
var env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun82234);
|
||||
})(participant);
|
||||
const defaultImport2 = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
|
||||
const getName = defaultImport2.getName;
|
||||
const guildId = channel.getGuildId();
|
||||
let id = channel.id;
|
||||
const value8 = Reflect.apply(getName, defaultImport2, [guildId, id, value5?.[0]]);
|
||||
if (value8 != null) {
|
||||
r11 = value8;
|
||||
} else {
|
||||
defaultImport3 = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
r11 = defaultImport3.getName(value5?.[0]);
|
||||
}
|
||||
const value10 = (importDefault(10701) /* metro dependency 10701: useCurrentEmbeddedApplication */)();
|
||||
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
|
||||
_fun82236);
|
||||
const defaultImport4 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const ACTIVITY_TILE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ACTIVITY_TILE;
|
||||
const env0_5 = defaultImport4(ACTIVITY_TILE).analyticsLocations;
|
||||
const env0_6 = (require(8620) /* metro dependency 8620: analytics */).useAnalyticsContext();
|
||||
const r20 = property?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WCNe7F);
|
||||
id = UserStore.getCurrentUser()?.id;
|
||||
let r0 = value10 != null && value10.id === property?.id;
|
||||
r0 = !r0 ? id != null && (value11 == null ? undefined : value11.userIds.has(id)) : r0;
|
||||
const value19 = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).useEmbeddedActivityJoinability({userId: UserStore.getCurrentUser()?.id,
|
||||
channelId: channel.id, application: property});
|
||||
const EmbeddedActivityJoinability = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).EmbeddedActivityJoinability;
|
||||
const CAN_JOIN = EmbeddedActivityJoinability.CAN_JOIN;
|
||||
if (r0) {
|
||||
r0 = <PressableOpacity pointerEvents="box-only" style={styles.activityViewContainer} onPress={onSingleTap} activeOpacity={1}>{((Component) => <Component channel={channel} layoutMode={ActivityLayoutMode.PIP} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */)}</PressableOpacity>;
|
||||
} else {
|
||||
var pressableOpacityProps = {accessibilityRole: 'button',
|
||||
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Yw5Hr2,
|
||||
|
||||
{applicationName: r20}), androidRippleConfig: env0_13, onPress: closure, style: styles.pressableOpacity};
|
||||
items2 = [((Component) => <Component application={property} resizeMode="cover" />)(importDefault(10717) /* metro dependency 10717: EmbeddedActivityBackgroundImageWithOverlay */)];
|
||||
var viewBindingProps = {style: [styles.activityPreview, style]};
|
||||
items3 = [((SummarizedIconRow) => <SummarizedIconRow offsetAmount={-6} overflowStyle={styles.overflow} overflowComponent={(require(1305) /* metro dependency 1305: native */).OverflowText} items={value5} max={4} renderItem={renderItem_82238} />)((require(1305) /* metro dependency 1305: native */).SummarizedIconRow)];
|
||||
items3[1] = <LegacyText style={styles.subtitleText} numberOfLines={2}>{value5.length > 1 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.cpe6CK,
|
||||
|
||||
{username: r11,
|
||||
count: value5.length - 1}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7Uuia2'],
|
||||
|
||||
{username: r11})}</LegacyText>;
|
||||
items3[2] = <LegacyText style={styles.titleText}>{r20}</LegacyText>;
|
||||
if (value19 !== CAN_JOIN) {
|
||||
r14 = null;
|
||||
} else {
|
||||
var viewBinding2Props = {style: styles.buttonWrapper};
|
||||
BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
|
||||
r14 = <View {...viewBinding2Props}><BaseTextButton onPress={closure} pillStyle={styles.buttonPill} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4i2vj+'])} variant="secondary" /></View>;
|
||||
}
|
||||
items3[3] = r14;
|
||||
items2[1] = <View {...viewBindingProps}>{items3}</View>;
|
||||
r0 = <PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ActivityTile(a0) { // fn#82239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:4114, offset: 0x01ef061c, size: 89 bytes, params: 2, frame: 17
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const DARK = ThemeTypes.DARK;
|
||||
return (
|
||||
<ThemeContextProvider theme={DARK}>
|
||||
<ActivityTileInner {...a0} />
|
||||
</ThemeContextProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _handleCanJoin() { // fn#82229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:2283, owner: ActivityTileInner._handleCanJoin, offset: 0x01ef0305, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return env1_3(_fun82231).apply(this, arguments);
|
||||
}
|
||||
|
||||
function ActivityTileInnerOnPress() { // fn#82232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:2546, owner: ActivityTileInner.onPress, offset: 0x01ef03f7, size: 73 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(8106) /* metro dependency 8106: handlePressJoinActivity */)({embeddedActivityJoinability: env0_7,
|
||||
handleCanJoin: ActivityTileInnerHandleCanJoin});
|
||||
if (onSingleTap != null) {
|
||||
onSingleTap();
|
||||
}
|
||||
}
|
||||
|
||||
function useUsersForActivityParticipant(a0) { // fn#82233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1293, owner: ActivityTileInner.useUsersForActivityParticipant, offset: 0x01ef0440, size: 67 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun82234);
|
||||
}
|
||||
|
||||
function _fun82236() { // fn#82236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1653, offset: 0x01ef04fc, size: 52 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const getEmbeddedActivitiesForChannel = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel;
|
||||
return Reflect.apply(getEmbeddedActivitiesForChannel, EmbeddedActivitiesStore, [channel.id]).find(_fun82237);
|
||||
}
|
||||
|
||||
function ActivityTileInnerRenderItem(a0, a1) { // fn#82238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:3467, owner: ActivityTileInner.renderItem, offset: 0x01ef0559, size: 195 bytes, params: 3, frame: 20
|
||||
var object3;
|
||||
const value2 = undefined;
|
||||
const CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
|
||||
const object4 = {user: a0};
|
||||
let r4 = participant.guildId ?? value2;
|
||||
object4.guildId = r4;
|
||||
object4.size = XSMALL;
|
||||
if (a1) {
|
||||
r4 = value2;
|
||||
} else {
|
||||
object3 = {};
|
||||
object3.radius = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[XSMALL] / 2 + 3;
|
||||
object3.direction = (require(1305) /* metro dependency 1305: native */).CutoutDirection.RIGHT;
|
||||
object3.inset = -6;
|
||||
r4 = object3;
|
||||
}
|
||||
object4.cutout = r4;
|
||||
return <CutoutableAvatarImage {...object4} />;
|
||||
}
|
||||
|
||||
function* _fun82231() { // fn#82231, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:2334, offset: 0x01ef0345, size: 178 bytes, params: 1, frame: 15
|
||||
var value5;
|
||||
var binding;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
if (env2_4 != null && env2_3 != null) {
|
||||
value5 = environment.__proto__.__proto__.__proto__;
|
||||
binding = env3_1;
|
||||
yield binding(env3_2[24])({applicationId: env2_4.applicationId, activityChannelId: importDefault.id,
|
||||
locationObject: EmbeddedActivitiesStore.location, analyticsLocations: View});
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
binding = env3_0;
|
||||
binding(env3_2[25]).setOrientationLockState(env2_3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82234() { // fn#82234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1381, offset: 0x01ef0483, size: 93 bytes, params: 1, frame: 13
|
||||
const participants = env0_0.participants;
|
||||
const Array = global.Array;
|
||||
let value = Array.from(participants);
|
||||
value = value.map(function(a0) {
|
||||
return UserStore.getUser(a0.userId);
|
||||
});
|
||||
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
}
|
||||
|
||||
function _fun82237({applicationId}) { // fn#82237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1703, offset: 0x01ef0530, size: 41 bytes, params: 2, frame: 4
|
||||
return applicationId === env1_3?.id;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Metro module 15486; source: modules/video_calls/native/components/AndroidAudioCaptureBugWarning.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 10779, 4573, 1244, 1305, 11299, 4578, 3853, 1948, 2] */
|
||||
function _fun118551(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15683:6, offset: 0x024e1683, size: 481 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.Pressable;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL;
|
||||
object4.backgroundColor = BACKGROUND_FEEDBACK_CRITICAL;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object4.marginHorizontal = PX_32;
|
||||
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object4.marginBottom = PX_32;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.padding = PX_16;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.gap = PX_12;
|
||||
object3.container = object4;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.row = {'flexDirection': 'row', 'alignItems': 'center', 'width': '100%', gap: PX_8};
|
||||
object3.text = {flex: 1};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object3.closeIcon = {tintColor: WHITE};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/AndroidAudioCaptureBugWarning.tsx');
|
||||
exports.default = _default_118552;
|
||||
}
|
||||
|
||||
function _default_118552() { // fn#118552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15683:601, offset: 0x024e1864, size: 555 bytes, params: 1, frame: 28
|
||||
var r0;
|
||||
var Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items3;
|
||||
var object4;
|
||||
var items2;
|
||||
var Button;
|
||||
var view;
|
||||
const styles = useStyles();
|
||||
const value3 = env0_3((require(10779) /* metro dependency 10779: useLocalStorageState */).useLocalStorageState('android-audio-capture-bug-warning-dismissed',
|
||||
false), 2);
|
||||
const property = value3[0];
|
||||
const env0_0 = value3[1];
|
||||
if (property === true) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.container, accessibilityRole: 'alert'};
|
||||
var viewBindingProps2 = {style: styles.row};
|
||||
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
items3 = [<Text style={styles.text} variant="text-sm/medium" color="always-white">{Reflect.apply(string, intl,
|
||||
[t['7MKLU1']])}</Text>];
|
||||
items3[1] = <Pressable onPress={onPress_118553} accessibilityLabel={intl.string(t.OorFv3)} accessibilityRole="button">{((Icon) => <Icon style={styles.closeIcon} source={importDefault(11299) /* metro dependency 11299 */} size={(require(1305) /* metro dependency 1305: native */).IconSizes.MEDIUM} />)((require(1305) /* metro dependency 1305: native */).Icon)}</Pressable>;
|
||||
view = <View {...viewBindingProps2}>{items3}</View>;
|
||||
items2 = [view];
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
items2[1] = <Button size="lg" variant="primary-overlay" onPress={function() {
|
||||
return importDefault(dependencyMap[13]).openURL(importDefault(dependencyMap[14]).getArticleURL(HelpdeskArticles.ANDROID_SCREENSHARE_AUDIO_BUG));
|
||||
}} text={Reflect.apply(string, intl, [t.hvVgAZ])} />;
|
||||
view = <View {...viewBindingProps}>{items2}</View>;
|
||||
r0 = view;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/* Metro module 7741; source: modules/video_calls/native/components/CallBarAction.tsx; dependencies: [31, 27, 7715, 33, 4000, 697, 4501, 7742, 5278, 7743, 4573, 2] */
|
||||
function _fun61963(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:6, offset: 0x01b500e3, size: 611 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.Image;
|
||||
const env0_5 = value.View;
|
||||
const env0_6 = (require(7715) /* metro dependency 7715: ChannelCallStore */).resetFocusTimer;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const hexWithOpacity = value.hexWithOpacity;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
const env0_9 = Reflect.apply(hexWithOpacity, value, [WHITE, 0.24]);
|
||||
Object = global.Object;
|
||||
const env0_10 = Object.freeze({'buttonRadius': 28, 'badgeRadius': 6, 'cutoutInset': 3});
|
||||
Object = global.Object;
|
||||
value = Object.freeze({'buttonRadius': 24, 'badgeRadius': 4, 'cutoutInset': 2});
|
||||
const env0_12 = 24 + 2 * value.buttonRadius * 5 + 96;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.buttonContainer = {position: 'absolute'};
|
||||
object2.iconContainer = {'position': 'absolute', 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
object2.badge = {'backgroundColor': 'white', 'position': 'absolute'};
|
||||
const PRIMARY_760 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_760;
|
||||
object2.notificationArea = {'position': 'absolute', 'top': -4, 'right': -4, 'height': 24, 'minWidth': 24,
|
||||
'paddingHorizontal': 4, 'borderRadius': 12, 'borderWidth': 4, 'borderColor': null, 'alignItems': 'center',
|
||||
'justifyContent': 'center', borderColor: PRIMARY_760};
|
||||
object2.notificationText = {lineHeight: 16};
|
||||
const CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
|
||||
object2.notificationAreaMentioned = {backgroundColor: CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT};
|
||||
const PRIMARY_600 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_600;
|
||||
object2.notificationAreaUnread = {backgroundColor: PRIMARY_600};
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
const closure = ActionButton;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/CallBarAction.tsx');
|
||||
exports.SMALL_ACTION_BUTTON_DIMENSIONS = value;
|
||||
exports.ActionButton = closure;
|
||||
exports.ToggledActionButton = ToggledActionButton;
|
||||
exports.PrimaryActionButton = PrimaryActionButton;
|
||||
exports.NotifiedActionButton = NotifiedActionButton;
|
||||
}
|
||||
|
||||
function ActionButton({appearsDisabled, backgroundColor, imageStyle, onPress, accessibilityLabel, accessibilityState, source, showBadge, isSmallSize, children, lottieComponent, lottieComponentColor, IconComponent}) { // fn#61964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:1045, offset: 0x01b50346, size: 781 bytes, params: 2, frame: 39
|
||||
var r9;
|
||||
var items4;
|
||||
var object;
|
||||
var getBadgeTop;
|
||||
var getBadgeLeft;
|
||||
appearsDisabled = !(appearsDisabled === undefined) && appearsDisabled;
|
||||
showBadge = !(showBadge === undefined) && showBadge;
|
||||
isSmallSize = !(isSmallSize === undefined) && isSmallSize;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const r5 = isSmallSize && (importDefault(7742) /* metro dependency 7742: useBottomVoiceControlsSheetWidth */)() < env0_12 ? 6 : 12;
|
||||
const r15 = isSmallSize ? env0_11 : env0_10;
|
||||
let buttonRadius = r15.buttonRadius;
|
||||
const value5 = 2 * buttonRadius;
|
||||
let badgeRadius = r15.badgeRadius;
|
||||
const value6 = 2 * badgeRadius;
|
||||
const value7 = r15.badgeRadius + r15.cutoutInset;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const object3 = {width: value5, height: value5};
|
||||
object3.borderRadius = r15.buttonRadius;
|
||||
object3.marginHorizontal = r5;
|
||||
const items3 = [styles.buttonContainer];
|
||||
items3[1] = {width: value5, height: value5, borderRadius: r15.buttonRadius};
|
||||
items3[2] = {opacity: appearsDisabled ? 0.25 : 1};
|
||||
const items2 = [((Component) => <Component circleRadius={r15.buttonRadius} cutoutRadius={value7} enableCutout={showBadge} cutoutPositionInDegrees={45} circleFillColor={backgroundColor ?? env0_9} />)(importDefault(7743) /* metro dependency 7743: CircleWithCutoutUtils */)];
|
||||
items2[1] = <View style={[styles.iconContainer, {width: value5,
|
||||
height: value5}]}>{lottieComponent != null ? env0_3.cloneElement(lottieComponent,
|
||||
{color: lottieComponentColor}) : IconComponent != null ? <IconComponent style={imageStyle} /> : <Image source={source} style={imageStyle} />}</View>;
|
||||
if (showBadge) {
|
||||
items4 = [styles.badge];
|
||||
object = {width: value6, height: value6};
|
||||
badgeRadius = r15.badgeRadius;
|
||||
object.borderRadius = badgeRadius;
|
||||
value = require(7743) /* metro dependency 7743: CircleWithCutoutUtils */;
|
||||
getBadgeTop = value.getBadgeTop;
|
||||
badgeRadius = r15.badgeRadius;
|
||||
buttonRadius = r15.buttonRadius;
|
||||
object.top = Reflect.apply(getBadgeTop, value, [badgeRadius, buttonRadius, 45]);
|
||||
value = require(7743) /* metro dependency 7743: CircleWithCutoutUtils */;
|
||||
getBadgeLeft = value.getBadgeLeft;
|
||||
badgeRadius = r15.badgeRadius;
|
||||
buttonRadius = r15.buttonRadius;
|
||||
object.left = Reflect.apply(getBadgeLeft, value, [badgeRadius, buttonRadius, 45]);
|
||||
items4[1] = object;
|
||||
value = <View style={items4} />;
|
||||
r9 = value;
|
||||
} else {
|
||||
r9 = null;
|
||||
}
|
||||
items2[2] = r9;
|
||||
items2[3] = children;
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
accessibilityRole="button"
|
||||
accessibilityState={accessibilityState}
|
||||
onPress={function() {
|
||||
resetFocusTimer();
|
||||
onPress();
|
||||
}}
|
||||
disabled={false}
|
||||
style={object3}
|
||||
>
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function ToggledActionButton(a0) { // fn#61966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:2343, offset: 0x01b5066d, size: 292 bytes, params: 2, frame: 24
|
||||
const isActive = a0.isActive;
|
||||
let disableTint = a0.disableTint;
|
||||
const value = undefined;
|
||||
disableTint = !(disableTint === value) && disableTint;
|
||||
let showBadge = a0.showBadge;
|
||||
showBadge = !(showBadge === value) && showBadge;
|
||||
let isSmallSize = a0.isSmallSize;
|
||||
isSmallSize = !(isSmallSize === value) && isSmallSize;
|
||||
const backgroundColor = a0.backgroundColor;
|
||||
const tintColor = a0.tintColor;
|
||||
const object2 = {'isActive': 0, 'disableTint': 0, 'showBadge': 0, 'isSmallSize': 0, 'backgroundColor': 0,
|
||||
'tintColor': 0};
|
||||
const value5 = null;
|
||||
silentSetPrototypeOf(object2, value5, undefined);
|
||||
const value6 = copyDataProperties({}, a0, object2, undefined);
|
||||
const WHITE = isActive ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : value5;
|
||||
const unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
|
||||
let r5 = disableTint ? value : isActive ? unsafe_rawColors.PRIMARY_900 : unsafe_rawColors.WHITE;
|
||||
const actionButtonProps = {backgroundColor: value5 == backgroundColor ? WHITE : backgroundColor,
|
||||
imageStyle: {tintColor: value5 == tintColor ? r5 : tintColor}, accessibilityState: {selected: isActive},
|
||||
isSmallSize: isSmallSize, ...value6};
|
||||
actionButtonProps['showBadge'] = showBadge;
|
||||
r5 = value5 != tintColor ? tintColor : r5;
|
||||
actionButtonProps['lottieComponentColor'] = r5;
|
||||
return <ActionButton {...actionButtonProps} />;
|
||||
}
|
||||
|
||||
function PrimaryActionButton(a0) { // fn#61967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:2780, offset: 0x01b50791, size: 141 bytes, params: 2, frame: 18
|
||||
let isSmallSize = a0.isSmallSize;
|
||||
isSmallSize = !(isSmallSize === undefined) && isSmallSize;
|
||||
const value = Object.create(null);
|
||||
value.isSmallSize = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
return (
|
||||
<ActionButton
|
||||
backgroundColor={RED_400}
|
||||
imageStyle={{tintColor: WHITE}}
|
||||
isSmallSize={isSmallSize}
|
||||
{...value2}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function NotifiedActionButton(a0) { // fn#61968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:2991, offset: 0x01b5081e, size: 230 bytes, params: 2, frame: 23
|
||||
const notifications = a0.notifications;
|
||||
const isMentioned = a0.isMentioned;
|
||||
const value = Object.create(null);
|
||||
value.notifications = 0;
|
||||
value.isMentioned = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const styles = useStyles();
|
||||
const actionButtonBindingProps = {...value2};
|
||||
const items2 = [styles.notificationArea];
|
||||
items2[1] = isMentioned === true || isMentioned === undefined ? styles.notificationAreaMentioned : styles.notificationAreaUnread;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View>
|
||||
<ActionButton {...actionButtonBindingProps}>
|
||||
<View style={items2}>
|
||||
<Text
|
||||
style={styles.notificationText}
|
||||
variant="text-xs/semibold"
|
||||
color="always-white"
|
||||
>
|
||||
{notifications}
|
||||
</Text>
|
||||
</View>
|
||||
</ActionButton>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
/* Metro module 10884; source: modules/video_calls/native/components/CallTile.tsx; dependencies: [31, 27, 4492, 1878, 7715, 4299, 33, 4501, 4000, 697, 6771, 1585, 566, 7712, 8743, 10670, 10851, 10693, 10700, 10885, 10889, 10890, 9416, 9437, 10891, 1305, 7723, 4017, 4504, 10892, 2] */
|
||||
function _fun83366(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:6, offset: 0x01f173ba, size: 700 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.StyleSheet;
|
||||
const env0_5 = value2.View;
|
||||
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
|
||||
const env0_8 = channelCallStoreModule.resetFocus;
|
||||
const env0_9 = channelCallStoreModule.toggleFocus;
|
||||
const callConstantsModule = require(4299) /* metro dependency 4299: CallConstants */;
|
||||
const env0_10 = callConstantsModule.ParticipantTypes;
|
||||
const env0_11 = callConstantsModule.isStreamParticipant;
|
||||
const env0_12 = callConstantsModule.VoicePlatforms;
|
||||
const value5 = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value5.jsx;
|
||||
const env0_14 = value5.Fragment;
|
||||
const env0_15 = value5.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {liveContainer: {'position': 'absolute', 'top': 8, 'right': 8}};
|
||||
object2.titleIcon = {marginRight: 6};
|
||||
const object5 = {'flexDirection': 'row', 'alignItems': 'center', 'alignSelf': 'flex-start', 'backgroundColor': null,
|
||||
'borderRadius': null, 'paddingHorizontal': 8, 'paddingVertical': 4};
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
const hexOpacityToRgba = colorUtilsModule.hexOpacityToRgba;
|
||||
const PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
|
||||
object5.backgroundColor = Reflect.apply(hexOpacityToRgba, colorUtilsModule, [PRIMARY_700, 0.5]);
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.usernameContainer = object5;
|
||||
const object6 = {'overflow': 'hidden', 'position': 'absolute', 'bottom': 8, 'left': 8, 'right': 40};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.usernamePosition = object6;
|
||||
const PRIMARY_600 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_600;
|
||||
object2.streamPreview = {'flex': 1, 'width': '100%', backgroundColor: PRIMARY_600};
|
||||
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object2.screenshareContainer = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden',
|
||||
'width': '100%', backgroundColor: BLACK};
|
||||
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object2.stageStreamContainer = {backgroundColor: BLACK};
|
||||
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(_fun83368);
|
||||
const closure = StreamPreviewTile;
|
||||
object2 = {code: 'function CallTileTsx1(){const{withTiming,reveal,STANDARD_EASING}=this.__closure;return{opacity:withTiming(reveal?1:0,{easing:STANDARD_EASING,duration:250})};}'};
|
||||
const closure2 = TileOverlay;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/CallTile.tsx');
|
||||
exports.default = value;
|
||||
exports.StreamPreviewTile = closure;
|
||||
exports.TileOverlay = closure2;
|
||||
}
|
||||
|
||||
function ParticipantIcon({participant}) { // fn#83367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:3055, offset: 0x01f17676, size: 363 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const type = participant.type;
|
||||
const STREAM = ParticipantTypes.STREAM;
|
||||
const r10 = type === STREAM ? importDefault(10889) /* metro dependency 10889 */ : participant.type !== ParticipantTypes.USER ? undefined : VoicePlatforms.MOBILE === participant.voicePlatform ? importDefault(10890) /* metro dependency 10890 */ : VoicePlatforms.XBOX === participant.voicePlatform ? importDefault(9416) /* metro dependency 9416 */ : VoicePlatforms.PLAYSTATION === participant.voicePlatform ? importDefault(9437) /* metro dependency 9437 */ : VoicePlatforms.QUEST !== participant.voicePlatform ? undefined : importDefault(10891) /* metro dependency 10891 */;
|
||||
if (r10 == null) {
|
||||
return null;
|
||||
} else {
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
return (
|
||||
<Icon
|
||||
source={r10}
|
||||
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16}
|
||||
color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE}
|
||||
style={styles.titleIcon}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun83368({participant, avatarSize, channel, hasTopSafeArea, hasLeftSafeArea, hasRightSafeArea, hasBottomSafeArea, shrinkStreamEmptyState, contentStyle, hasNotch, resizeMode}) { // fn#83368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1063, offset: 0x01f177e1, size: 1006 bytes, params: 2, frame: 37
|
||||
const env0_3 = hasBottomSafeArea;
|
||||
hasNotch = !(hasNotch === undefined) && hasNotch;
|
||||
const styles = useStyles();
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const {bottom, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const {stream,
|
||||
activeStream} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ApplicationStreamingStore],
|
||||
_fun83369);
|
||||
const binding = env0_3;
|
||||
const value6 = binding.useCallback(_fun83370, [channel.id, participant.id]);
|
||||
const value7 = binding.useCallback(_fun83371, [channel.id, analyticsLocations]);
|
||||
const value8 = binding.useMemo(_fun83372, [hasBottomSafeArea, hasRightSafeArea, bottom, right]);
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
let type = participant.type;
|
||||
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
|
||||
const r6 = HIDDEN_STREAM === type ? <StreamPreviewTile participant={participant} style={contentStyle} /> : ParticipantTypes.STREAM === type ? activeStream != null ? activeStream.ownerId !== currentUser?.id ? ((Component) => <Component participant={participant} onSingleTap={toggleFocus} onDoubleTap={value6} removeEmptyStateImage={shrinkStreamEmptyState} onFullScreen={value6} fullscreenIconStyle={value8} style={contentStyle} />)(importDefault(10670) /* metro dependency 10670: StreamTile */) : <View style={styles.screenshareContainer}>{((Component) => <Component participant={participant} onSingleTap={toggleFocus} onDoubleTap={value6} containerStyle={channel.isGuildStageVoice() ? styles.stageStreamContainer : undefined} />)(importDefault(10851) /* metro dependency 10851: ScreenshareParticipant */)}</View> : stream != null ? <StreamPreviewTile participant={participant} style={contentStyle} /> : null : ParticipantTypes.USER === type ? ((Component) => <Component participant={participant} avatarSize={avatarSize} onSingleTap={toggleFocus} onDoubleTap={value6} onLongPress={value7} statusStyle={value8} hasNotch={hasNotch} resizeMode={resizeMode} style={contentStyle} />)(importDefault(10693) /* metro dependency 10693: UserTile */) : ParticipantTypes.ACTIVITY !== type ? null : ((Component) => <Component participant={participant} style={contentStyle} channel={channel} onSingleTap={toggleFocus} />)(importDefault(10700) /* metro dependency 10700: ActivityTile */);
|
||||
type = participant.type;
|
||||
const ACTIVITY = ParticipantTypes.ACTIVITY;
|
||||
return (
|
||||
<>
|
||||
{r6}
|
||||
{type === ACTIVITY ? null : <TileOverlay participant={participant} isActiveStream={activeStream != null} channel={channel} hasTopSafeArea={hasTopSafeArea} hasLeftSafeArea={hasLeftSafeArea} hasRightSafeArea={hasRightSafeArea} hasBottomSafeArea={hasBottomSafeArea} />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function StreamPreviewTile({participant, style}) { // fn#83374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:2828, offset: 0x01f17d28, size: 169 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
const user = participant.user;
|
||||
return (
|
||||
<View style={[styles.streamPreview, style]}>
|
||||
{((Component) => <Component guildId={participant.stream.guildId} userId={user.id} style={{aspectRatio: undefined,
|
||||
borderRadius: 0}} disableTransition onPress={function() {
|
||||
return resetFocus();
|
||||
}} />)(importDefault(10885) /* metro dependency 10885: TouchableStreamPreview */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function TileOverlay({participant, isActiveStream, channel, hasLeftSafeArea, hasRightSafeArea, hasBottomSafeArea, hasTopSafeArea}) { // fn#83376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:3640, offset: 0x01f17de0, size: 602 bytes, params: 2, frame: 32
|
||||
const styles = useStyles();
|
||||
const {bottom, left, top, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const binding = env0_3;
|
||||
const useContext = binding.useContext;
|
||||
const RevealContext = (require(7723) /* metro dependency 7723: RevealProvider */).RevealContext;
|
||||
const reveal = Reflect.apply(useContext, binding, [RevealContext]).reveal;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = function() {
|
||||
var r2;
|
||||
var moduleValue = require(dependencyMap[28]);
|
||||
var withTiming = moduleValue.withTiming;
|
||||
r2 = reveal ? 1 : 0;
|
||||
var object2 = {};
|
||||
object2.easing = require(dependencyMap[25]).STANDARD_EASING;
|
||||
object2.duration = 250;
|
||||
return {opacity: Reflect.apply(withTiming, moduleValue, [r2, object2])};
|
||||
};
|
||||
let object2 = {};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.reveal = reveal;
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object2.STANDARD_EASING = STANDARD_EASING;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 15640123774063;
|
||||
closure.__initData = env0_18;
|
||||
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
object2 = {bottom: hasBottomSafeArea ? bottom : 0, right: hasRightSafeArea ? right : 0,
|
||||
left: hasLeftSafeArea ? left : 0, top: hasTopSafeArea ? top : 0};
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View2 pointerEvents="none" style={[StyleSheet.absoluteFill, object2, value3]}>
|
||||
{isActiveStream && <View style={styles.liveContainer}>{((LiveTag) => <LiveTag />)((require(1305) /* metro dependency 1305: native */).LiveTag)}</View>}
|
||||
<View style={styles.usernamePosition}>
|
||||
<View style={styles.usernameContainer}>
|
||||
<ParticipantIcon participant={participant} />
|
||||
{((Component) => <Component channel={channel} participant={participant} />)(importDefault(10892) /* metro dependency 10892: ParticipantTitle */)}
|
||||
</View>
|
||||
</View>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun83369() { // fn#83369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1370, offset: 0x01f17bcf, size: 140 bytes, params: 1, frame: 19
|
||||
const object2 = {};
|
||||
const value = environment.__proto__;
|
||||
const isStreamParticipant2 = isStreamParticipant(participant);
|
||||
const value3 = null;
|
||||
object2.stream = isStreamParticipant2 ? ApplicationStreamingStore.getStreamForUser(participant.user.id,
|
||||
participant.stream.guildId) : value3;
|
||||
object2.activeStream = isStreamParticipant(participant) ? ApplicationStreamingStore.getActiveStreamForUser(participant.user.id,
|
||||
participant.stream.guildId) : value3;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun83370() { // fn#83370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1565, offset: 0x01f17c5b, size: 68 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
resetFocus();
|
||||
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
||||
value.selectParticipant(channel.id, participant.id);
|
||||
}
|
||||
|
||||
function _fun83371({user}) { // fn#83371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1644, offset: 0x01f17c9f, size: 83 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: user.id,
|
||||
channelId: channel.id, isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
function _fun83372() { // fn#83372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1762, offset: 0x01f17cf2, size: 54 bytes, params: 1, frame: 5
|
||||
const hasBottomSafeAreaBinding = hasBottomSafeArea;
|
||||
const value2 = 8;
|
||||
return {bottom: hasBottomSafeAreaBinding ? value2 + bottom : value2,
|
||||
right: hasRightSafeArea ? value2 + right : value2};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,469 @@
|
||||
/* Metro module 7728; source: modules/video_calls/native/components/CameraPreview.tsx; dependencies: [57, 31, 27, 1378, 4606, 7729, 4492, 1226, 7730, 7715, 7716, 661, 4299, 33, 5321, 4017, 1305, 566, 7731, 7723, 7740, 7724, 8750, 1585, 7737, 7717, 6266, 7732, 5314, 4504, 10660, 1244, 10661, 10663, 10664, 7734, 7720, 4610, 10720, 10721, 2] */
|
||||
function _fun61822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:6, offset: 0x01b4b6a2, size: 539 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.StyleSheet;
|
||||
const env0_6 = value.View;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const env0_9 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).useBestActiveChatInputContainerHeight;
|
||||
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
|
||||
const env0_13 = (require(7715) /* metro dependency 7715: ChannelCallStore */).useChannelCallStore;
|
||||
value = require(7716) /* metro dependency 7716: ChannelCallConstants */;
|
||||
const env0_14 = value.VoiceChatDrawerState;
|
||||
const env0_15 = value.VOICE_CALL_OVERLAY_HORIZONTAL_MARGIN;
|
||||
const env0_16 = value.VOICE_CALL_OVERLAY_VERTICAL_MARGIN;
|
||||
const env0_17 = value.VoiceCallOverlayType;
|
||||
const env0_18 = (require(661) /* metro dependency 661: Constants */).ApplicationStreamStates;
|
||||
value = require(4299) /* metro dependency 4299: CallConstants */;
|
||||
const env0_19 = value.ParticipantTypes;
|
||||
const env0_20 = value.isStreamParticipant;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_21 = value.jsx;
|
||||
const env0_22 = value.Fragment;
|
||||
const env0_23 = value.jsxs;
|
||||
object2 = {code: 'function CameraPreviewTsx1(){const{closeFunc,runOnJS}=this.__closure;if(closeFunc!=null){runOnJS(closeFunc)();}}'};
|
||||
object2 = {duration: 250};
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object2.easing = STANDARD_EASING;
|
||||
object2 = {HIDE_PIP: 'HIDE_PIP', HANDLE_THERMAL_EVENT: 'HANDLE_THERMAL_EVENT'};
|
||||
object2 = {code: 'function CameraPreviewTsx2(){const{withTiming,marginTopState,TIMING_CONFIG,marginBottomState}=this.__closure;return{marginTop:withTiming(marginTopState,TIMING_CONFIG),marginBottom:withTiming(marginBottomState,TIMING_CONFIG)};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/CameraPreview.tsx');
|
||||
exports.default = CameraPreviewContainer;
|
||||
}
|
||||
|
||||
function CameraPreview({channel, nonSelfPipParticipant, selfParticipant, participantScreenIsFocused}) { // fn#61823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:1065, offset: 0x01b4b8bd, size: 1544 bytes, params: 2, frame: 43
|
||||
var items;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [ChannelCallLifecycleStore];
|
||||
const value3 = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return ChannelCallLifecycleStore.isReactingToThermalState();
|
||||
}]);
|
||||
const value5 = env0_3((importDefault(7731) /* metro dependency 7731: usePipPosition */)(), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
let binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const RevealContext = (require(7723) /* metro dependency 7723: RevealProvider */).RevealContext;
|
||||
const reveal = Reflect.apply(useContext, binding, [RevealContext]).reveal;
|
||||
var env0_3 = reveal;
|
||||
const value6 = (importDefault(7740) /* metro dependency 7740: useActionBarHeight */)();
|
||||
var env0_4 = value6;
|
||||
const value7 = useBestActiveChatInputContainerHeight();
|
||||
const value8 = (importDefault(7724) /* metro dependency 7724: useIsActivityFocused */)(channel.id);
|
||||
const value9 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
|
||||
const {bottom, top, left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const value11 = (require(7737) /* metro dependency 7737: useIsViewingActivity */).useIsViewingActivity({channelId: channel.id});
|
||||
const voiceCallOverlayLayoutStates = fluxModule.useStateFromStores([ChannelCallLifecycleStore], function() {
|
||||
return ChannelCallLifecycleStore.getVoiceCallOverlayLayoutStates();
|
||||
});
|
||||
const CAMERA_PREVIEW_PICTURE_IN_PICTURE = VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE;
|
||||
const property3 = voiceCallOverlayLayoutStates[CAMERA_PREVIEW_PICTURE_IN_PICTURE];
|
||||
const OrientationType = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType;
|
||||
const r15 = value9 ? OrientationType.LANDSCAPE : OrientationType.PORTRAIT;
|
||||
env0_4.useEffect(_fun61826, [r15,
|
||||
(importDefault(6266) /* metro dependency 6266: usePrevious */)(r15) ?? property3?.screenOrientation, value8,
|
||||
property2]);
|
||||
binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value15 = env0_3(Reflect.apply(useState, binding, [top + VOICE_CALL_OVERLAY_VERTICAL_MARGIN]), 2);
|
||||
const property4 = value15[0];
|
||||
const env0_12 = value15[1];
|
||||
binding = env0_4;
|
||||
useState = binding.useState;
|
||||
const value17 = env0_3(Reflect.apply(useState, binding, [bottom + VOICE_CALL_OVERLAY_VERTICAL_MARGIN]), 2);
|
||||
const property5 = value17[0];
|
||||
const env0_14 = value17[1];
|
||||
env0_4.useEffect(_fun61827, [reveal, value7, participantScreenIsFocused, value6, top, bottom]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = CameraPreviewTe;
|
||||
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
|
||||
marginTopState: property4, TIMING_CONFIG: env0_25, marginBottomState: property5};
|
||||
closure.__workletHash = 17411027531876;
|
||||
closure.__initData = env0_27;
|
||||
const value18 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value19 = env0_4.useRef(null);
|
||||
const [property6, env0_15] = env0_3(env0_4.useState(null), 2);
|
||||
const HIDE_PIP = env0_26.HIDE_PIP;
|
||||
if (HIDE_PIP === property6) {
|
||||
object = {};
|
||||
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.L3I0Jr);
|
||||
object.onClick = onClick_61829;
|
||||
items = [object];
|
||||
} else if (env0_26.HANDLE_THERMAL_EVENT === property6) {
|
||||
object = {};
|
||||
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1fRDnT']);
|
||||
object.onClick = (require(10661) /* metro dependency 10661: openIgnoreThermalStateAlert */).openIgnoreThermalStateAlert;
|
||||
items = [object];
|
||||
} else {
|
||||
items = [];
|
||||
}
|
||||
const value22 = CameraPreviewUseGesture(value19);
|
||||
const jsxRuntimeEnv0_22Binding = jsxRuntimeEnv0_22;
|
||||
const r5 = property6 == null ? null : ((GestureDetector) => <GestureDetector gesture={value22}><View style={StyleSheet.absoluteFill} /></GestureDetector>)((require(5321) /* metro dependency 5321 */).GestureDetector);
|
||||
const absoluteFill = StyleSheet.absoluteFill;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<>
|
||||
{r5}
|
||||
<View style={absoluteFill} pointerEvents="box-none">
|
||||
<View2
|
||||
style={[{flex: 1, marginLeft: left + VOICE_CALL_OVERLAY_HORIZONTAL_MARGIN,
|
||||
marginRight: right + VOICE_CALL_OVERLAY_HORIZONTAL_MARGIN}, value18]}
|
||||
pointerEvents="box-none"
|
||||
key={value9 ? 'landscape' : 'portrait'}
|
||||
>
|
||||
{((Component) => <Component channel={channel} preferredPosition={property} onMove={property2} isInCallScreen marginTop={property4} marginBottom={property5}>{((Component) => <Component ref={value19} disabled={!(value11 && value3)} trigger={((Component) => <Component channel={channel} selfParticipant={selfParticipant} pipParticipant={nonSelfPipParticipant} />)(importDefault(10664) /* metro dependency 10664: PictureInPictureVideo */)} rows={items} onOpen={onOpen} onClose={onClose_61834} />)(importDefault(10663) /* metro dependency 10663: PopoutMenu */)}</Component>)(importDefault(7732) /* metro dependency 7732: PictureInPicture */)}
|
||||
</View2>
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function CameraPreviewContainer({channel, participantScreenIsFocused, isChannelCallModalOpen}) { // fn#61835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:3730, offset: 0x01b4c1a6, size: 650 bytes, params: 2, frame: 31
|
||||
participantScreenIsFocused = participantScreenIsFocused === undefined || participantScreenIsFocused;
|
||||
isChannelCallModalOpen = !(isChannelCallModalOpen === undefined) && isChannelCallModalOpen;
|
||||
const value5 = (importDefault(7720) /* metro dependency 7720: useSelectedParticipant */)(channel);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
const value6 = Reflect.apply(useStateFromStores, fluxModule, [[ChannelRTCStore, AuthenticationStore,
|
||||
ApplicationStreamingStore], _fun61836]);
|
||||
const value7 = useChannelCallStore(_fun61838);
|
||||
const value8 = fluxModule.useStateFromStores([ChannelRTCStore, EmbeddedActivitiesStore], _fun61839);
|
||||
const r11 = value8 != null && value5?.id === value8?.id && !value7;
|
||||
const r15 = r11 ? null : value8;
|
||||
const value13 = (require(10720) /* metro dependency 10720: useIsStreamFocused */).useIsStreamFocused(channel.id);
|
||||
const value14 = (require(7737) /* metro dependency 7737: useIsViewingActivity */).useIsViewingActivity({channelId: channel.id});
|
||||
const participant = fluxModule.useStateFromStores([ChannelRTCStore, AuthenticationStore], _fun61841);
|
||||
const value15 = fluxModule.useStateFromStores([AuthenticationStore, ChannelRTCStore], _fun61844);
|
||||
const env0_4 = channel.id;
|
||||
const moduleValue7 = fluxModule;
|
||||
useStateFromStores = moduleValue7.useStateFromStores;
|
||||
const value17 = useOtherPipParticipant(channel, participantScreenIsFocused, Reflect.apply(useStateFromStores,
|
||||
moduleValue7, [[ChannelRTCStore], _fun61846]));
|
||||
let r5 = r15 ?? value6 ?? value15;
|
||||
const r6 = r5 ?? value17;
|
||||
r5 = participant === r6 ? null : participant;
|
||||
const value18 = fluxModule.useStateFromStores([ChannelCallLifecycleStore], function() {
|
||||
return ChannelCallLifecycleStore.isPipEnabledWhileFocusedOnActivityOrStream();
|
||||
});
|
||||
const r2 = isChannelCallModalOpen && channel.isGuildStageVoice();
|
||||
(importDefault(10721) /* metro dependency 10721: useTrackActivityVideoPip */)(channel);
|
||||
return r11 || value13 ? value18 || value14 ? r5 != null ? r2 ? null : <CameraPreview channel={channel} participantScreenIsFocused={participantScreenIsFocused} nonSelfPipParticipant={r6} selfParticipant={r5} /> : r6 == null || r2 ? null : <CameraPreview channel={channel} participantScreenIsFocused={participantScreenIsFocused} nonSelfPipParticipant={r6} selfParticipant={r5} /> : null : r5 != null ? r2 ? null : <CameraPreview channel={channel} participantScreenIsFocused={participantScreenIsFocused} nonSelfPipParticipant={r6} selfParticipant={r5} /> : r6 == null || r2 ? null : <CameraPreview channel={channel} participantScreenIsFocused={participantScreenIsFocused} nonSelfPipParticipant={r6} selfParticipant={r5} />;
|
||||
}
|
||||
|
||||
function _fun61826() { // fn#61826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:1762, offset: 0x01b4beed, size: 82 bytes, params: 1, frame: 12
|
||||
var binding;
|
||||
if (env0_10 != null && env0_10 !== env0_9 && env0_6) {
|
||||
binding = env0_2;
|
||||
value = environment.__proto__;
|
||||
binding((require(7732) /* metro dependency 7732: PictureInPicture */).DEFAULT_PIP_POSITION);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61827() { // fn#61827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:1932, offset: 0x01b4bf3f, size: 168 bytes, params: 1, frame: 17
|
||||
var r3;
|
||||
var r2;
|
||||
var r4;
|
||||
const value3 = top + VOICE_CALL_OVERLAY_VERTICAL_MARGIN;
|
||||
if (participantScreenIsFocused) {
|
||||
r3 = reveal ? (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT + top + VOICE_CALL_OVERLAY_VERTICAL_MARGIN : value3;
|
||||
r2 = reveal ? env0_4 + bottom + VOICE_CALL_OVERLAY_VERTICAL_MARGIN : bottom + VOICE_CALL_OVERLAY_VERTICAL_MARGIN;
|
||||
r4 = r3;
|
||||
} else {
|
||||
r2 = env0_5 + bottom + VOICE_CALL_OVERLAY_VERTICAL_MARGIN;
|
||||
r4 = value3;
|
||||
}
|
||||
env0_12(r4);
|
||||
env0_14(r2);
|
||||
}
|
||||
|
||||
function CameraPreviewTe() { // fn#61828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:2080, owner: CameraPreview.te, offset: 0x01b4bfe7, size: 87 bytes, params: 1, frame: 20
|
||||
const object2 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
object2.marginTop = timingModule.withTiming(env0_11, env1_25);
|
||||
const moduleValue2 = timingModule;
|
||||
object2.marginBottom = moduleValue2.withTiming(env0_13, env1_25);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function CameraPreviewOnClick() { // fn#61829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:2336, owner: CameraPreview.onClick, offset: 0x01b4c03e, size: 40 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(require(10660) /* metro dependency 10660: VoiceCallOverlayUtils */).setPipEnabledWhileFocusedOnActivityOrStream(false);
|
||||
}
|
||||
|
||||
function CameraPreviewUseGesture(a0) { // fn#61830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:2735, owner: CameraPreview.useGesture, offset: 0x01b4c066, size: 42 bytes, params: 2, frame: 14
|
||||
const env0_0 = a0;
|
||||
return env1_4.useMemo(_fun61831, [a0]);
|
||||
}
|
||||
|
||||
function CameraPreviewOnOpen() { // fn#61833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:3525, owner: CameraPreview.onOpen, offset: 0x01b4c168, size: 44 bytes, params: 1, frame: 12
|
||||
const binding = env0_15;
|
||||
const binding2 = env0_1;
|
||||
const binding3 = env1_26;
|
||||
binding(binding2 ? binding3.HANDLE_THERMAL_EVENT : binding3.HIDE_PIP);
|
||||
}
|
||||
|
||||
function _fun61836() { // fn#61836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:3896, offset: 0x01b4c430, size: 156 bytes, params: 1, frame: 14
|
||||
const env0_0 = AuthenticationStore.getId();
|
||||
const currentUserActiveStream = ApplicationStreamingStore.getCurrentUserActiveStream();
|
||||
const value3 = null;
|
||||
const env0_1 = value3 != currentUserActiveStream && currentUserActiveStream.state === ApplicationStreamStates.ACTIVE;
|
||||
const getStreamParticipants = ChannelRTCStore.getStreamParticipants;
|
||||
const value7 = Reflect.apply(getStreamParticipants, ChannelRTCStore, [channel.id]).find(_fun61837);
|
||||
return value3 == env0_2 || value3 == value7 || env0_2.id !== value7.id ? value7 : participantScreenIsFocused ? value3 : value7;
|
||||
}
|
||||
|
||||
function _fun61838({voiceChatDrawerState}) { // fn#61838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:4095, offset: 0x01b4c4ed, size: 45 bytes, params: 2, frame: 4
|
||||
const value = environment.__proto__;
|
||||
const OPEN = VoiceChatDrawerState.OPEN;
|
||||
return voiceChatDrawerState === OPEN || voiceChatDrawerState === VoiceChatDrawerState.OPENING;
|
||||
}
|
||||
|
||||
function _fun61839() { // fn#61839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:4188, offset: 0x01b4c51a, size: 77 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
|
||||
const value3 = null;
|
||||
if (value3 == currentEmbeddedActivity) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
value = ChannelRTCStore.getParticipants(channel.id);
|
||||
value = value.find(_fun61840);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun61841() { // fn#61841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:4598, offset: 0x01b4c5b6, size: 183 bytes, params: 1, frame: 17
|
||||
var r2;
|
||||
const id = AuthenticationStore.getId();
|
||||
const participant = ChannelRTCStore.getParticipant(channel.id, id);
|
||||
const value4 = null;
|
||||
const value5 = undefined;
|
||||
if (value4 != (value4 == participant ? value5 : participant.streamId)) {
|
||||
if (participantScreenIsFocused) {
|
||||
r2 = value4 != env0_2 && (value4 == env0_2 ? value5 : env0_2.id) !== id;
|
||||
return value4 != env0_2 || channel.isGuildStageVoice() ? r2 ? participant : value4 : isSmallRoom(channel.id,
|
||||
id) || r2 ? participant : value4;
|
||||
}
|
||||
return participant;
|
||||
}
|
||||
if (env0_3) {
|
||||
if (participantScreenIsFocused) {
|
||||
r2 = value4 != env0_2 && (value4 == env0_2 ? value5 : env0_2.id) !== id;
|
||||
return value4 != env0_2 || channel.isGuildStageVoice() ? r2 ? participant : value4 : isSmallRoom(channel.id,
|
||||
id) || r2 ? participant : value4;
|
||||
}
|
||||
return participant;
|
||||
}
|
||||
return value4;
|
||||
}
|
||||
|
||||
function _fun61844() { // fn#61844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:4993, offset: 0x01b4c6f4, size: 294 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var r1;
|
||||
let value = environment.__proto__;
|
||||
const isStreamParticipantBinding = isStreamParticipant;
|
||||
const value3 = undefined;
|
||||
const isStreamParticipant2 = isStreamParticipantBinding(env0_2);
|
||||
const value4 = null;
|
||||
const type = value4 == env0_2 ? value3 : env0_2.type;
|
||||
const USER = ParticipantTypes.USER;
|
||||
const value5 = type === USER;
|
||||
if (isStreamParticipant2) {
|
||||
if (value4 == (value4 == env0_2 ? value3 : env0_2.streamId)) {
|
||||
if (isStreamParticipant2) {
|
||||
if ((value4 == env0_2 ? value3 : env0_2.user.id) !== AuthenticationStore.getId()) {
|
||||
value = ChannelRTCStore.getParticipant(channel.id, env0_2.user.id);
|
||||
r1 = value4 != value && value.localVideoDisabled ? value4 : value;
|
||||
} else if (value5) {
|
||||
value = ChannelRTCStore.getStreamParticipants(channel.id);
|
||||
value = value.find(_fun61845);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
} else if (value5) {
|
||||
value = ChannelRTCStore.getStreamParticipants(channel.id);
|
||||
value = value.find(_fun61845);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
} else if (participantScreenIsFocused) {
|
||||
if (isStreamParticipant2) {
|
||||
if ((value4 == env0_2 ? value3 : env0_2.user.id) !== AuthenticationStore.getId()) {
|
||||
value = ChannelRTCStore.getParticipant(channel.id, env0_2.user.id);
|
||||
r1 = value4 != value && value.localVideoDisabled ? value4 : value;
|
||||
} else if (value5) {
|
||||
value = ChannelRTCStore.getStreamParticipants(channel.id);
|
||||
value = value.find(_fun61845);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
} else if (value5) {
|
||||
value = ChannelRTCStore.getStreamParticipants(channel.id);
|
||||
value = value.find(_fun61845);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
} else {
|
||||
r1 = env0_2;
|
||||
}
|
||||
} else if (value5) {
|
||||
if (value4 == (value4 == env0_2 ? value3 : env0_2.streamId)) {
|
||||
if (isStreamParticipant2) {
|
||||
if ((value4 == env0_2 ? value3 : env0_2.user.id) !== AuthenticationStore.getId()) {
|
||||
value = ChannelRTCStore.getParticipant(channel.id, env0_2.user.id);
|
||||
r1 = value4 != value && value.localVideoDisabled ? value4 : value;
|
||||
} else if (value5) {
|
||||
value = ChannelRTCStore.getStreamParticipants(channel.id);
|
||||
value = value.find(_fun61845);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
} else if (value5) {
|
||||
value = ChannelRTCStore.getStreamParticipants(channel.id);
|
||||
value = value.find(_fun61845);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
} else if (participantScreenIsFocused) {
|
||||
if (isStreamParticipant2) {
|
||||
if ((value4 == env0_2 ? value3 : env0_2.user.id) !== AuthenticationStore.getId()) {
|
||||
value = ChannelRTCStore.getParticipant(channel.id, env0_2.user.id);
|
||||
r1 = value4 != value && value.localVideoDisabled ? value4 : value;
|
||||
} else if (value5) {
|
||||
value = ChannelRTCStore.getStreamParticipants(channel.id);
|
||||
value = value.find(_fun61845);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
} else if (value5) {
|
||||
value = ChannelRTCStore.getStreamParticipants(channel.id);
|
||||
value = value.find(_fun61845);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
} else {
|
||||
r1 = env0_2;
|
||||
}
|
||||
} else if (isStreamParticipant2) {
|
||||
if ((value4 == env0_2 ? value3 : env0_2.user.id) !== AuthenticationStore.getId()) {
|
||||
value = ChannelRTCStore.getParticipant(channel.id, env0_2.user.id);
|
||||
r1 = value4 != value && value.localVideoDisabled ? value4 : value;
|
||||
} else if (value5) {
|
||||
value = ChannelRTCStore.getStreamParticipants(channel.id);
|
||||
value = value.find(_fun61845);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
} else if (value5) {
|
||||
value = ChannelRTCStore.getStreamParticipants(channel.id);
|
||||
value = value.find(_fun61845);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
return value4 != (value4 == r1 ? value3 : r1.streamId) ? r1 : value4;
|
||||
}
|
||||
|
||||
function _fun61846() { // fn#61846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:5407, offset: 0x01b4c83e, size: 44 bytes, params: 1, frame: 13
|
||||
return id != null && ChannelRTCStore.getSelectedParticipant(id) != null;
|
||||
}
|
||||
|
||||
function useOtherPipParticipant(a0, a1, a2) { // fn#61847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:5458, owner: CameraPreviewContainer.useOtherPipParticipant, offset: 0x01b4c86a, size: 173 bytes, params: 4, frame: 18
|
||||
const env0_0 = a0;
|
||||
const value2 = undefined;
|
||||
const selectedParticipant = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore],
|
||||
_fun61848);
|
||||
const value3 = (importDefault(7734) /* metro dependency 7734: usePipVideoOrStream */)(a0.id);
|
||||
const value4 = null;
|
||||
return value4 == value3 || value3.user.id === AuthenticationStore.getId() ? value4 : a1 ? a2 ? value3.id === (value4 == selectedParticipant ? value2 : selectedParticipant.id) ? value4 : value3 : value4 : value3.id === (value4 == selectedParticipant ? value2 : selectedParticipant.id) ? value4 : value3;
|
||||
}
|
||||
|
||||
function _fun61831() { // fn#61831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:2776, offset: 0x01b4c090, size: 156 bytes, params: 1, frame: 17
|
||||
const close = env0_0.current?.close;
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value3 = Gesture.Tap();
|
||||
const onTouchesUp = value3.onTouchesUp;
|
||||
const closure = l_61832;
|
||||
const object2 = {closeFunc: close};
|
||||
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 9707001557651;
|
||||
closure.__initData = env2_24;
|
||||
return Reflect.apply(onTouchesUp, value3, [closure]);
|
||||
}
|
||||
|
||||
function _fun61837({user}) { // fn#61837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:4018, offset: 0x01b4c4cc, size: 33 bytes, params: 2, frame: 3
|
||||
return user.id === env0_0 && env0_1;
|
||||
}
|
||||
|
||||
function _fun61840({id}) { // fn#61840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:4280, offset: 0x01b4c567, size: 79 bytes, params: 2, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
|
||||
const getEmbeddedActivityParticipantId = value.getEmbeddedActivityParticipantId;
|
||||
const binding = env0_0;
|
||||
return id === Reflect.apply(getEmbeddedActivityParticipantId, value, [{applicationId: binding.applicationId,
|
||||
instanceId: binding.compositeInstanceId}]);
|
||||
}
|
||||
|
||||
function isSmallRoom(a0, a1) { // fn#61842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:4795, offset: 0x01b4c66d, size: 89 bytes, params: 3, frame: 13
|
||||
var environment;
|
||||
var r1;
|
||||
const env0_0 = a1;
|
||||
let value = environment.__proto__.__proto__;
|
||||
if (ChannelRTCStore.getParticipants(a0).length <= 4) {
|
||||
value = value.filter(_fun61843);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
return r1.length > 1 && r1.length <= 3;
|
||||
}
|
||||
|
||||
function _fun61845({user}) { // fn#61845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:5282, offset: 0x01b4c81a, size: 36 bytes, params: 2, frame: 2
|
||||
const id = user.id;
|
||||
user = env1_2.user;
|
||||
return id === user.id;
|
||||
}
|
||||
|
||||
function _fun61848() { // fn#61848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:5536, offset: 0x01b4c917, size: 32 bytes, params: 1, frame: 11
|
||||
return ChannelRTCStore.getSelectedParticipant(env0_0.id);
|
||||
}
|
||||
|
||||
function l_61832() { // fn#61832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:2872, offset: 0x01b4c12c, size: 60 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (close != null) {
|
||||
value2 = environment.__proto__.__proto__.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS(close)();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61843(a0) { // fn#61843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7906:4881, offset: 0x01b4c6c6, size: 46 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return !(isStreamParticipant(a0) && a0.user.id === require);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,386 @@
|
||||
/* Metro module 10790; source: modules/video_calls/native/components/ChannelCallActionBar.tsx; dependencies: [31, 27, 1378, 4606, 4295, 4492, 1226, 4259, 7730, 4299, 33, 4501, 7740, 10600, 566, 9234, 4809, 10791, 9228, 10661, 7741, 1244, 10793, 10794, 7721, 10810, 10811, 7712, 8913, 4285, 8092, 10812, 6861, 9438, 6771, 6789, 7856, 10813, 10833, 10840, 2] */
|
||||
function _fun82873(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:6, offset: 0x01f04847, size: 782 bytes, params: 8, frame: 31
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = useActionBarSecondButtons;
|
||||
const closure2 = useActionBarSecondButton;
|
||||
const closure3 = useActionBarPrimaryButtons;
|
||||
const closure4 = useActionBarPrimaryButton;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
|
||||
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
|
||||
const env0_13 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value.jsx;
|
||||
const env0_15 = value.Fragment;
|
||||
const env0_16 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const CALL_ACTION_BAR_HEIGHT = (require(7740) /* metro dependency 7740: useActionBarHeight */).CALL_ACTION_BAR_HEIGHT;
|
||||
object2.container = {'height': null, 'justifyContent': 'center', 'alignItems': 'center', 'flexDirection': 'row',
|
||||
height: CALL_ACTION_BAR_HEIGHT};
|
||||
const object5 = {'height': null, 'paddingHorizontal': 16, 'paddingTop': null, 'paddingBottom': null,
|
||||
'justifyContent': 'center', 'flexDirection': 'row'};
|
||||
const FIVE_BUTTON_LAYOUT_ACTION_BAR_HEIGHT = (require(7740) /* metro dependency 7740: useActionBarHeight */).FIVE_BUTTON_LAYOUT_ACTION_BAR_HEIGHT;
|
||||
object5.height = FIVE_BUTTON_LAYOUT_ACTION_BAR_HEIGHT;
|
||||
const FIVE_BUTTON_CONTAINER_PADDING_TOP = (require(7740) /* metro dependency 7740: useActionBarHeight */).FIVE_BUTTON_CONTAINER_PADDING_TOP;
|
||||
object5.paddingTop = FIVE_BUTTON_CONTAINER_PADDING_TOP;
|
||||
const FIVE_BUTTON_CONTAINER_PADDING_BOTTOM = (require(7740) /* metro dependency 7740: useActionBarHeight */).FIVE_BUTTON_CONTAINER_PADDING_BOTTOM;
|
||||
object5.paddingBottom = FIVE_BUTTON_CONTAINER_PADDING_BOTTOM;
|
||||
object2.containerForFiveButtonLayout = object5;
|
||||
const env0_17 = Reflect.apply(createStyles, value, [object2]);
|
||||
const closure5 = VideoButton;
|
||||
const closure6 = ScreenshareButton;
|
||||
const closure7 = AudioRouteButton;
|
||||
const closure8 = DisconnectCallButton;
|
||||
const closure9 = DisconnectStreamButton;
|
||||
object2 = {NONE: 0};
|
||||
object2[0] = 'NONE';
|
||||
object2.SCREEN_SHARE_START = 1;
|
||||
object2[1] = 'SCREEN_SHARE_START';
|
||||
object2.SCREEN_SHARE_END = 2;
|
||||
object2[2] = 'SCREEN_SHARE_END';
|
||||
object2.AUDIO_ROUTE = 3;
|
||||
object2[3] = 'AUDIO_ROUTE';
|
||||
const object6 = {END_STREAM: 0};
|
||||
object6[0] = 'END_STREAM';
|
||||
object6.END_ACTIVITY = 1;
|
||||
object6[1] = 'END_ACTIVITY';
|
||||
object6.END_CALL = 2;
|
||||
object6[2] = 'END_CALL';
|
||||
object6.END_REMOTE = 3;
|
||||
object6[3] = 'END_REMOTE';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallActionBar.tsx');
|
||||
exports.default = _default_82901;
|
||||
exports.VideoButton = closure5;
|
||||
exports.ScreenshareButton = closure6;
|
||||
exports.AudioRouteButton = closure7;
|
||||
exports.DisconnectCallButton = closure8;
|
||||
exports.DisconnectStreamButton = closure9;
|
||||
exports.ActionBarSecondButton = object2;
|
||||
exports.useActionBarSecondButtons = closure;
|
||||
exports.useActionBarSecondButton = closure2;
|
||||
exports.ActionBarPrimaryButton = object6;
|
||||
exports.useActionBarPrimaryButtons = closure3;
|
||||
exports.useActionBarPrimaryButton = closure4;
|
||||
}
|
||||
|
||||
function useActionBarSecondButtons({channel}) { // fn#82874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:3356, offset: 0x01f04b55, size: 183 bytes, params: 2, frame: 16
|
||||
const value2 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
|
||||
const isActive = (importDefault(10794) /* metro dependency 10794: useScreenshareUtils */)(channel).isActive;
|
||||
const value3 = (importDefault(6861) /* metro dependency 6861: useIsRemote */)();
|
||||
const AUDIO_ROUTE = env0_24.AUDIO_ROUTE;
|
||||
const NONE = env0_24.NONE;
|
||||
const SCREEN_SHARE_END = env0_24.SCREEN_SHARE_END;
|
||||
const SCREEN_SHARE_START = env0_24.SCREEN_SHARE_START;
|
||||
return {[AUDIO_ROUTE]: value2 && !value3, [NONE]: true, [SCREEN_SHARE_END]: value2 && !value3 && isActive,
|
||||
[SCREEN_SHARE_START]: value2 && !value3};
|
||||
}
|
||||
|
||||
function useActionBarSecondButton({channel}) { // fn#82875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:3588, offset: 0x01f04c0c, size: 176 bytes, params: 2, frame: 15
|
||||
const value2 = useActionBarSecondButtons({channel: channel});
|
||||
const value3 = (importDefault(9438) /* metro dependency 9438: useIsVideoMode */)();
|
||||
const SCREEN_SHARE_END = env0_24.SCREEN_SHARE_END;
|
||||
const property = value2[SCREEN_SHARE_END];
|
||||
const binding = env0_24;
|
||||
return property ? binding.SCREEN_SHARE_END : value2[binding.AUDIO_ROUTE] && channel.isPrivate() ? env0_24.AUDIO_ROUTE : value2[env0_24.AUDIO_ROUTE] ? value3 ? value2[env0_24.SCREEN_SHARE_START] ? env0_24.SCREEN_SHARE_START : env0_24.NONE : env0_24.AUDIO_ROUTE : value2[env0_24.SCREEN_SHARE_START] ? env0_24.SCREEN_SHARE_START : env0_24.NONE;
|
||||
}
|
||||
|
||||
function useActionBarPrimaryButtons({channel}) { // fn#82876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4017, offset: 0x01f04cbc, size: 313 bytes, params: 2, frame: 21
|
||||
const value2 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
|
||||
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
|
||||
AuthenticationStore], _fun82877);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore],
|
||||
_fun82878);
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
|
||||
_fun82879);
|
||||
const {awaitingRemote,
|
||||
remoteSessionId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GameConsoleStore],
|
||||
function() {
|
||||
var object = {};
|
||||
object.awaitingRemote = GameConsoleStore.getAwaitingRemoteSessionInfo() != null;
|
||||
object.remoteSessionId = GameConsoleStore.getRemoteSessionId();
|
||||
return object;
|
||||
});
|
||||
const END_ACTIVITY = env0_25.END_ACTIVITY;
|
||||
const END_CALL = env0_25.END_CALL;
|
||||
const END_REMOTE = env0_25.END_REMOTE;
|
||||
const END_STREAM = env0_25.END_STREAM;
|
||||
return {[END_ACTIVITY]: value4, [END_CALL]: value2, [END_REMOTE]: awaitingRemote || remoteSessionId != null,
|
||||
[END_STREAM]: value3 != null};
|
||||
}
|
||||
|
||||
function useActionBarPrimaryButton({channel}) { // fn#82881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4718, offset: 0x01f04ed1, size: 115 bytes, params: 2, frame: 13
|
||||
const value2 = useActionBarPrimaryButtons({channel: channel});
|
||||
const END_STREAM = env0_25.END_STREAM;
|
||||
const property = value2[END_STREAM];
|
||||
const binding = env0_25;
|
||||
return property ? binding.END_STREAM : value2[binding.END_REMOTE] ? env0_25.END_REMOTE : value2[env0_25.END_ACTIVITY] ? env0_25.END_ACTIVITY : env0_25.END_CALL;
|
||||
}
|
||||
|
||||
function VideoButton({channel, isSmallSize}) { // fn#82882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:676, offset: 0x01f04f44, size: 465 bytes, params: 2, frame: 25
|
||||
const value2 = (importDefault(10600) /* metro dependency 10600: useHasVideoPermission */)(channel);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelCallLifecycleStore],
|
||||
function() {
|
||||
return ChannelCallLifecycleStore.isReactingToThermalState();
|
||||
});
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
|
||||
return MediaEngineStore.isVideoEnabled();
|
||||
});
|
||||
const reachedLimit = (importDefault(9234) /* metro dependency 9234: useChannelVideoLimit */)(channel).reachedLimit;
|
||||
const value5 = (require(4809) /* metro dependency 4809: StageMediaHooks */).useStageHasMedia(channel.id);
|
||||
const binding = env0_4;
|
||||
var env0_4 = binding.useRef(null);
|
||||
const value6 = binding.useMemo(_fun82885, [value4]);
|
||||
const value8 = binding.useCallback(_fun82887, [channel, value2, value3, binding.useCallback(_fun82886, [])]);
|
||||
const ToggledActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).ToggledActionButton;
|
||||
const r9 = value2 ? !value5 && reachedLimit : !value2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const HK4JIu = (require(1244) /* metro dependency 1244: indexNative */).t.HK4JIu;
|
||||
return (
|
||||
<ToggledActionButton
|
||||
appearsDisabled={r9}
|
||||
isActive={value4}
|
||||
onPress={value8}
|
||||
accessibilityLabel={Reflect.apply(string, intl, [HK4JIu])}
|
||||
source={importDefault(10793) /* metro dependency 10793 */}
|
||||
isSmallSize={isSmallSize}
|
||||
lottieComponent={value6}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function ScreenshareButton({channel, isSmallSize}) { // fn#82889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1460, offset: 0x01f05258, size: 202 bytes, params: 2, frame: 20
|
||||
const {isActive, onPress, imgSource,
|
||||
isFeatureEnabled} = (importDefault(10794) /* metro dependency 10794: useScreenshareUtils */)(channel);
|
||||
const r5 = isFeatureEnabled ? onPress : function() {
|
||||
};
|
||||
const ToggledActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).ToggledActionButton;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const XF1nZz = (require(1244) /* metro dependency 1244: indexNative */).t.XF1nZz;
|
||||
return (
|
||||
<ToggledActionButton
|
||||
appearsDisabled={!isFeatureEnabled}
|
||||
source={imgSource}
|
||||
isActive={isActive}
|
||||
accessibilityLabel={Reflect.apply(string, intl, [XF1nZz])}
|
||||
onPress={r5}
|
||||
isSmallSize={isSmallSize}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function AudioRouteButton({channel, isSmallSize}) { // fn#82891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1762, offset: 0x01f05322, size: 216 bytes, params: 2, frame: 20
|
||||
const value2 = (require(9228) /* metro dependency 9228: CallsUtils */).useMaskedSpeakerStates();
|
||||
const isAudioRouteEnabled = value2.isAudioRouteEnabled;
|
||||
const env0_1 = value2.toggleAudio;
|
||||
const routeSource = value2.routeSource;
|
||||
const env0_2 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
|
||||
const ToggledActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).ToggledActionButton;
|
||||
const object2 = {isActive: isAudioRouteEnabled, source: routeSource, onPress: onPress_82892};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['A/Ly/2']);
|
||||
object2.isSmallSize = isSmallSize;
|
||||
return <ToggledActionButton {...object2} />;
|
||||
}
|
||||
|
||||
function DisconnectCallButton({channel, isSmallSize}) { // fn#82893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2114, offset: 0x01f05418, size: 156 bytes, params: 2, frame: 20
|
||||
const PrimaryActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).PrimaryActionButton;
|
||||
const primaryActionButtonProps = {source: importDefault(10810) /* metro dependency 10810 */};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
primaryActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6vrfgt']);
|
||||
primaryActionButtonProps.isSmallSize = isSmallSize;
|
||||
primaryActionButtonProps.onPress = onPress_82894;
|
||||
return <PrimaryActionButton {...primaryActionButtonProps} />;
|
||||
}
|
||||
|
||||
function DisconnectStreamButton({channel, isSmallSize}) { // fn#82895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2335, offset: 0x01f054e1, size: 273 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var PrimaryActionButton;
|
||||
var intl;
|
||||
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
|
||||
AuthenticationStore], _fun82896);
|
||||
if ((require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore],
|
||||
_fun82897) == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
PrimaryActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).PrimaryActionButton;
|
||||
var primaryActionButtonProps = {source: importDefault(10811) /* metro dependency 10811 */};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
primaryActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q3O3J8);
|
||||
primaryActionButtonProps.isSmallSize = isSmallSize;
|
||||
primaryActionButtonProps.onPress = onPress_82898;
|
||||
r0 = <PrimaryActionButton {...primaryActionButtonProps} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function LeaveActivityButton({isSmallSize}) { // fn#82899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2887, offset: 0x01f0565d, size: 147 bytes, params: 2, frame: 20
|
||||
const PrimaryActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).PrimaryActionButton;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<PrimaryActionButton
|
||||
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.k0Aph0)}
|
||||
onPress={onPress_82900}
|
||||
source={importDefault(10812) /* metro dependency 10812 */}
|
||||
isSmallSize={isSmallSize}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_82901({channel, shouldShowConnectingScreen}) { // fn#82901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4934, offset: 0x01f0574c, size: 709 bytes, params: 2, frame: 29
|
||||
var r13;
|
||||
var r6;
|
||||
var jsxRuntimeEnv0_15Binding;
|
||||
var value6;
|
||||
var items2;
|
||||
shouldShowConnectingScreen = !(shouldShowConnectingScreen === undefined) && shouldShowConnectingScreen;
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(6861) /* metro dependency 6861: useIsRemote */)();
|
||||
const value3 = useActionBarSecondButton({channel: channel});
|
||||
const value4 = useActionBarPrimaryButton({channel: channel});
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const CHANNEL_CALL_ACTION_BAR = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).CHANNEL_CALL_ACTION_BAR;
|
||||
const analyticsLocations = defaultImport(CHANNEL_CALL_ACTION_BAR).analyticsLocations;
|
||||
const value5 = (require(7856) /* metro dependency 7856: useIsFiveButtonLayout */).useIsFiveButtonLayout(channel.id);
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
const r8 = value5 ? styles.containerForFiveButtonLayout : styles.container;
|
||||
if (shouldShowConnectingScreen) {
|
||||
const CallConnectingActionBar = (require(10813) /* metro dependency 10813: ChannelCallConnectingScreen */).CallConnectingActionBar;
|
||||
r6 = <CallConnectingActionBar channel={channel} />;
|
||||
} else {
|
||||
jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
||||
value6 = null;
|
||||
r13 = value2 ? value6 : <VideoButton channel={channel} isSmallSize={value5} />;
|
||||
items2 = [r13];
|
||||
if (env0_24.AUDIO_ROUTE === value3) {
|
||||
r13 = <AudioRouteButton isSmallSize={value5} channel={channel} />;
|
||||
} else if (env0_24.SCREEN_SHARE_START === value3) {
|
||||
r13 = <ScreenshareButton channel={channel} isSmallSize={value5} />;
|
||||
} else if (env0_24.SCREEN_SHARE_END === value3) {
|
||||
r13 = <ScreenshareButton channel={channel} isSmallSize={value5} />;
|
||||
} else {
|
||||
env0_24.NONE;
|
||||
r13 = value6;
|
||||
}
|
||||
items2[1] = r13;
|
||||
items2[2] = ((ChannelCallMicButton) => <ChannelCallMicButton channel={channel} isSmallSize={value5} />)((require(10833) /* metro dependency 10833: ChannelCallMicButton */).ChannelCallMicButton);
|
||||
items2[3] = env0_25.END_REMOTE === value4 ? ((DisconnectRemoteButton) => <DisconnectRemoteButton channel={channel} isSmallSize={value5} />)((require(10840) /* metro dependency 10840: DisconnectRemoteButton */).DisconnectRemoteButton) : env0_25.END_STREAM === value4 ? <DisconnectStreamButton channel={channel} isSmallSize={value5} /> : env0_25.END_ACTIVITY === value4 ? <LeaveActivityButton isSmallSize={value5} /> : env0_25.END_CALL !== value4 ? value6 : <DisconnectCallButton channel={channel} isSmallSize={value5} />;
|
||||
r6 = <>{items2}</>;
|
||||
}
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
<View pointerEvents="box-none" style={r8}>
|
||||
{r6}
|
||||
</View>
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82877() { // fn#82877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4150, offset: 0x01f04df5, size: 104 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const selectedParticipant = ChannelRTCStore.getSelectedParticipant(channel.id);
|
||||
const value4 = null;
|
||||
return value4 == selectedParticipant || selectedParticipant.type === ParticipantTypes.ACTIVITY ? value4 == selectedParticipant ? undefined : selectedParticipant.id : selectedParticipant.user.id === AuthenticationStore.getId() ? value4 : value4 == selectedParticipant ? undefined : selectedParticipant.id;
|
||||
}
|
||||
|
||||
function _fun82878() { // fn#82878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4314, offset: 0x01f04e5d, size: 40 bytes, params: 1, frame: 12
|
||||
const value2 = null;
|
||||
return value2 != env0_1 ? ApplicationStreamingStore.getActiveStreamForStreamKey(env0_1) : value2;
|
||||
}
|
||||
|
||||
function _fun82879() { // fn#82879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4401, offset: 0x01f04e85, size: 25 bytes, params: 1, frame: 9
|
||||
const value = environment.__proto__;
|
||||
return EmbeddedActivitiesStore.getCurrentEmbeddedActivity() != null;
|
||||
}
|
||||
|
||||
function _fun82885() { // fn#82885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:945, offset: 0x01f05128, size: 76 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
const CameraLottie = (require(10791) /* metro dependency 10791: CameraLottie */).CameraLottie;
|
||||
return <CameraLottie ref={env0_4} animation={env0_3 ? 'mute' : 'unmute'} />;
|
||||
}
|
||||
|
||||
function _fun82886(a0) { // fn#82886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1033, offset: 0x01f05174, size: 88 bytes, params: 2, frame: 14
|
||||
var r1;
|
||||
var r2;
|
||||
var current;
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
(require(9228) /* metro dependency 9228: CallsUtils */).handleToggleVideo(a0);
|
||||
const value3 = env0_4 == null;
|
||||
if (value3) {
|
||||
r1 = value3;
|
||||
r2 = value;
|
||||
} else {
|
||||
current = env0_4.current;
|
||||
r1 = current == null;
|
||||
r2 = current;
|
||||
}
|
||||
if (!r1) {
|
||||
r2.play();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun82887() { // fn#82887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1135, offset: 0x01f051cc, size: 120 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
var value;
|
||||
if (env0_1) {
|
||||
if (env0_2) {
|
||||
value = environment.__proto__;
|
||||
value = require(10661) /* metro dependency 10661: openIgnoreThermalStateAlert */;
|
||||
value.openIgnoreThermalStateAlert(_fun82888);
|
||||
} else {
|
||||
env0_5(channel);
|
||||
}
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = require(9228) /* metro dependency 9228: CallsUtils */;
|
||||
value.showCameraDisabledAlert();
|
||||
}
|
||||
}
|
||||
|
||||
function AudioRouteButtonOnPress() { // fn#82892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1998, owner: AudioRouteButton.onPress, offset: 0x01f053fa, size: 30 bytes, params: 1, frame: 13
|
||||
toggleAudio(channel.id, env0_2);
|
||||
}
|
||||
|
||||
function DisconnectCallButtonOnPress() { // fn#82894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2275, owner: DisconnectCallButton.onPress, offset: 0x01f054b4, size: 45 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = require(9228) /* metro dependency 9228: CallsUtils */;
|
||||
value.handleDisconnect(channel);
|
||||
}
|
||||
|
||||
function DisconnectStreamButtonOnPress() { // fn#82898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2771, owner: DisconnectStreamButton.onPress, offset: 0x01f055f2, size: 107 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
||||
defaultImport.selectParticipant(channel.id, null);
|
||||
value = require(8913) /* metro dependency 8913: StreamActionCreators */;
|
||||
const stopStream = value.stopStream;
|
||||
const streamKeyUtilsModule = require(4285) /* metro dependency 4285: StreamKeyUtils */;
|
||||
Reflect.apply(stopStream, value, [streamKeyUtilsModule.encodeStreamKey(env0_2)]);
|
||||
}
|
||||
|
||||
function LeaveActivityButtonOnPress() { // fn#82900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:3005, owner: LeaveActivityButton.onPress, offset: 0x01f056f0, size: 92 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
|
||||
value = undefined;
|
||||
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: currentEmbeddedActivity == null ? value : currentEmbeddedActivity.location,
|
||||
applicationId: currentEmbeddedActivity == null ? value : currentEmbeddedActivity.applicationId});
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun82888() { // fn#82888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1182, offset: 0x01f05244, size: 20 bytes, params: 1, frame: 11
|
||||
return env1_5(channel);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
/* Metro module 10813; source: modules/video_calls/native/components/ChannelCallConnectingScreen.tsx; dependencies: [31, 27, 4295, 4259, 3784, 4296, 7715, 661, 482, 33, 4501, 7740, 4080, 6275, 6277, 10814, 4805, 10785, 9151, 10831, 10832, 1244, 8899, 4796, 4048, 10833, 9325, 566, 9324, 6952, 10838, 9421, 10839, 697, 10696, 9803, 2] */
|
||||
function _fun82973(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:6, offset: 0x01f0857a, size: 453 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 env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
|
||||
const env0_9 = (require(7715) /* metro dependency 7715: ChannelCallStore */).resetFocus;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).InstantInviteSources;
|
||||
const env0_11 = (require(482) /* metro dependency 482: Constants */).Permissions;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.Fragment;
|
||||
const env0_14 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const CALL_ACTION_BAR_HEIGHT = (require(7740) /* metro dependency 7740: useActionBarHeight */).CALL_ACTION_BAR_HEIGHT;
|
||||
const env0_15 = Reflect.apply(createStyles, value, [{spacer: {width: 8},
|
||||
actionBarContainer: {'paddingHorizontal': 12, 'paddingTop': 16, 'justifyContent': 'center',
|
||||
'alignItems': 'flex-start', 'flexDirection': 'row', height: CALL_ACTION_BAR_HEIGHT}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallConnectingScreen.tsx');
|
||||
exports.showVoiceSettingsActionSheet = showVoiceSettingsActionSheet;
|
||||
exports.ChannelCallConnectingHeader = ChannelCallConnectingHeader;
|
||||
exports.CallConnectingActionBar = CallConnectingActionBar;
|
||||
}
|
||||
|
||||
function VoiceSettingsActionSheet() { // fn#82974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:482, offset: 0x01f0873f, size: 118 bytes, params: 1, frame: 20
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
|
||||
return (
|
||||
<BottomSheet scrollable>
|
||||
<BottomSheetScrollView>
|
||||
{((Component) => <Component />)(importDefault(10814) /* metro dependency 10814: UserSettingsVoice */)}
|
||||
</BottomSheetScrollView>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function JoinMutedButton({channel}) { // fn#82975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:634, offset: 0x01f087b5, size: 97 bytes, params: 2, frame: 16
|
||||
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const ChannelCallMicButton = (require(10833) /* metro dependency 10833: ChannelCallMicButton */).ChannelCallMicButton;
|
||||
return (
|
||||
<ChannelCallMicButton
|
||||
channel={channel}
|
||||
disableTint={value2 === 'light'}
|
||||
isSmallSize={false}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function JoinVoiceButton({channel}) { // fn#82976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:780, offset: 0x01f08816, size: 645 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
const env0_1 = importDefault(dependencyMap[26])();
|
||||
const value2 = require(dependencyMap[27]).useStateFromStores([GameConsoleStore], _fun82977);
|
||||
const value3 = require(dependencyMap[27]).useStateFromStores([SessionsStore], _fun82978);
|
||||
const value4 = importDefault(dependencyMap[28])();
|
||||
const env0_3 = value4;
|
||||
const value5 = importDefault(dependencyMap[29])(channel);
|
||||
let r5 = value5.selfMute || value5.mute;
|
||||
r5 = !r5 ? value5.suppress : r5;
|
||||
const value6 = env0_3.useCallback(_fun82979, [channel, value3, value4, r5]);
|
||||
const value7 = importDefault(dependencyMap[17])(channel);
|
||||
const value8 = require(dependencyMap[17]).useIsVoiceChannelLocked(channel);
|
||||
const LabeledActionButton = require(dependencyMap[32]).LabeledActionButton;
|
||||
object2 = {};
|
||||
let r8 = value7 || value8;
|
||||
r8 = !r8 ? value2 : r8;
|
||||
object2.disabled = r8;
|
||||
const GREEN_360 = importDefault(dependencyMap[33]).unsafe_rawColors.GREEN_360;
|
||||
object2.backgroundColor = GREEN_360;
|
||||
const WHITE = importDefault(dependencyMap[33]).unsafe_rawColors.WHITE;
|
||||
object2.imageStyle = {tintColor: WHITE};
|
||||
const intl = require(dependencyMap[21]).intl;
|
||||
let string = intl.string;
|
||||
const t = require(dependencyMap[21]).t;
|
||||
object2.accessibilityLabel = Reflect.apply(string, intl, [t['96ANUN']]);
|
||||
object2.source = importDefault(r5 ? dependencyMap[34] : dependencyMap[35]);
|
||||
object2.onPress = value6;
|
||||
string = intl.string;
|
||||
r5 = value8 ? Reflect.apply(string, intl, [t.TVBCKZ]) : value7 ? Reflect.apply(string, intl,
|
||||
[t.rZfiNq]) : r5 ? Reflect.apply(string, intl, [t['Bd/Liz']]) : Reflect.apply(string, intl, [t['96ANUN']]);
|
||||
object2.label = r5;
|
||||
const IconPosition = require(dependencyMap[32]).IconPosition;
|
||||
const RIGHT = IconPosition.RIGHT;
|
||||
object2.iconPosition = RIGHT;
|
||||
return <LabeledActionButton {...object2} />;
|
||||
}
|
||||
|
||||
function showVoiceSettingsActionSheet(a0) { // fn#82980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:2218, offset: 0x01f08c24, size: 64 bytes, params: 2, frame: 16
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).openLazy(function() {
|
||||
var Promise = global.Promise;
|
||||
return Promise.resolve(VoiceSettingsActionSheet);
|
||||
}, 'voice settings', {guildId: a0});
|
||||
}
|
||||
|
||||
function ChannelCallConnectingHeader({channel}) { // fn#82982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:2386, offset: 0x01f08c7f, size: 367 bytes, params: 2, frame: 27
|
||||
var r6;
|
||||
var VoiceChatHeaderIcon;
|
||||
var object;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
|
||||
const value3 = (require(10785) /* metro dependency 10785: useIsVoiceChannelFull */).useIsVoiceChannelLocked(channel);
|
||||
const can = PermissionStore.can;
|
||||
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
|
||||
const r12 = Reflect.apply(can, PermissionStore, [CREATE_INSTANT_INVITE, channel]) ? value3 ? null : function() {
|
||||
return require(dependencyMap[18]).showInstantInviteActionSheet(channel,
|
||||
{source: InstantInviteSources.VOICE_CHANNEL});
|
||||
} : null;
|
||||
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
|
||||
const items2 = [<View style={{width: 4}} />];
|
||||
if (r12 != null) {
|
||||
VoiceChatHeaderIcon = importDefault(10831) /* metro dependency 10831: VoiceChatHeaderIcon */;
|
||||
object = {source: importDefault(10832) /* metro dependency 10832 */, onPress: r12};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['dHHb/2'],
|
||||
|
||||
{channelName: value2});
|
||||
r6 = <VoiceChatHeaderIcon {...object} />;
|
||||
} else {
|
||||
r6 = null;
|
||||
}
|
||||
items2[1] = r6;
|
||||
items2[2] = <View style={styles.spacer} />;
|
||||
items2[3] = <View style={{width: 4}} />;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function CallConnectingActionBar({channel}) { // fn#82984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:2876, offset: 0x01f08e2c, size: 105 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View style={styles.actionBarContainer}>
|
||||
<JoinMutedButton channel={channel} />
|
||||
<JoinVoiceButton channel={channel} />
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82978() { // fn#82978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:950, offset: 0x01f08a9b, size: 83 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
value = SessionsStore.getSessionById((env0_1 == null ? value2 : env0_1.sessionId) ?? '');
|
||||
return value == null ? value2 : value.clientInfo.os;
|
||||
}
|
||||
|
||||
function _fun82979() { // fn#82979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:1143, offset: 0x01f08aee, size: 310 bytes, params: 1, frame: 23
|
||||
var r7;
|
||||
var r10;
|
||||
var r9;
|
||||
var NativeModules;
|
||||
var KeyboardManager;
|
||||
var moduleValue3;
|
||||
if (env0_2 != null) {
|
||||
var moduleValue = require(10838) /* metro dependency 10838: coercePlatformTypeToConsoleType */;
|
||||
var value3 = moduleValue.coerceConsoleTypeToPlatformType(env0_2, env0_3);
|
||||
if (value3 != null) {
|
||||
moduleValue3 = require(9421) /* metro dependency 9421: beginConsoleTransfer */;
|
||||
return moduleValue3.beginConsoleTransfer(channel, value3);
|
||||
}
|
||||
}
|
||||
const id = channel.id;
|
||||
const binding = env0_4;
|
||||
const value = environment.__proto__;
|
||||
resetFocus();
|
||||
const moduleValue2 = require(27) /* metro dependency 27 */;
|
||||
const value4 = moduleValue2 == null;
|
||||
if (value4) {
|
||||
r7 = value4;
|
||||
r10 = moduleValue2;
|
||||
} else {
|
||||
NativeModules = moduleValue2.NativeModules;
|
||||
r7 = NativeModules == null;
|
||||
r10 = NativeModules;
|
||||
}
|
||||
if (r7) {
|
||||
r9 = r10;
|
||||
} else {
|
||||
KeyboardManager = r10.KeyboardManager;
|
||||
r7 = KeyboardManager == null;
|
||||
r9 = KeyboardManager;
|
||||
}
|
||||
r7 = !r7 ? r9.dismissGlobalKeyboard == null : r7;
|
||||
if (!r7) {
|
||||
r9.dismissGlobalKeyboard();
|
||||
}
|
||||
if (binding) {
|
||||
if (!MediaEngineStore.getSettings().mute) {
|
||||
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).toggleSelfMute();
|
||||
}
|
||||
}
|
||||
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).selectVoiceChannel(id, false,
|
||||
false);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
/* Metro module 10861; source: modules/video_calls/native/components/ChannelCallHeaderButtons.tsx; dependencies: [31, 4259, 33, 566, 10772, 1244, 10862, 8899, 7719, 7720, 10863, 7712, 2] */
|
||||
function _fun83188(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:6, offset: 0x01f10bd4, size: 167 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallHeaderButtons.tsx');
|
||||
exports.CameraButton = CameraButton;
|
||||
exports.GridButton = GridButton;
|
||||
}
|
||||
|
||||
function CameraButton() { // fn#83189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:244, offset: 0x01f10c7b, size: 212 bytes, params: 1, frame: 21
|
||||
var r0;
|
||||
var ChannelCallNavigatorIcon;
|
||||
var intl;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MediaEngineStore],
|
||||
function() {
|
||||
var object = {};
|
||||
object.isVideoEnabled = MediaEngineStore.isVideoEnabled();
|
||||
object.videoDeviceId = MediaEngineStore.getVideoDeviceId();
|
||||
object.videoDevices = MediaEngineStore.getVideoDevices();
|
||||
return object;
|
||||
});
|
||||
const isVideoEnabled = value2.isVideoEnabled;
|
||||
const env0_0 = value2.videoDeviceId;
|
||||
const env0_1 = value2.videoDevices;
|
||||
if (isVideoEnabled) {
|
||||
ChannelCallNavigatorIcon = importDefault(10772) /* metro dependency 10772: ChannelCallNavigatorIcon */;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <ChannelCallNavigatorIcon accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['t9eQ/g'])} source={importDefault(10862) /* metro dependency 10862 */} onPress={onPress_83191} disableBackground />;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GridButton({channel}) { // fn#83193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:683, offset: 0x01f10de2, size: 203 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var ChannelCallNavigatorIcon;
|
||||
var intl;
|
||||
if ((importDefault(7720) /* metro dependency 7720: useSelectedParticipant */)(channel) == null) {
|
||||
r0 = null;
|
||||
} else if ((importDefault(7719) /* metro dependency 7719: useIsPrivateAudioOnlyCall */)(channel)) {
|
||||
r0 = null;
|
||||
} else {
|
||||
ChannelCallNavigatorIcon = importDefault(10772) /* metro dependency 10772: ChannelCallNavigatorIcon */;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <ChannelCallNavigatorIcon accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HK4JIu)} source={importDefault(10863) /* metro dependency 10863 */} onPress={onPress_83194} disableBackground />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function CameraButtonOnPress() { // fn#83191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:562, owner: CameraButton.onPress, offset: 0x01f10d87, size: 91 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
var value2;
|
||||
const Object = global.Object;
|
||||
let value = Object.keys(videoDevices);
|
||||
value = value.find(function(a0) {
|
||||
return a0 !== videoDeviceId;
|
||||
});
|
||||
if (value != null) {
|
||||
value2 = environment.__proto__;
|
||||
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).setVideoDevice(value);
|
||||
}
|
||||
}
|
||||
|
||||
function GridButtonOnPress() { // fn#83194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:840, owner: GridButton.onPress, offset: 0x01f10ead, size: 53 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
||||
return value.selectParticipant(channel.id, null);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/* Metro module 10833; source: modules/video_calls/native/components/ChannelCallMicButton.tsx; dependencies: [31, 4295, 33, 6952, 566, 10834, 10835, 7741, 1244, 10836, 10837, 697, 2] */
|
||||
function _fun83082(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11019:6, offset: 0x01f0cb05, size: 162 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallMicButton.tsx');
|
||||
exports.ChannelCallMicButton = ChannelCallMicButton;
|
||||
}
|
||||
|
||||
function ChannelCallMicButton({channel, isSmallSize, disableTint}) { // fn#83083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11019:250, offset: 0x01f0cba7, size: 369 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
disableTint = !(disableTint === undefined) && disableTint;
|
||||
const value4 = importDefault(dependencyMap[3])(channel);
|
||||
const value5 = require(dependencyMap[4]).useStateFromStores([GameConsoleStore], _fun83084);
|
||||
const {mute, onPress} = require(dependencyMap[5]).createMuteHandler(value4, value5);
|
||||
const value6 = env0_4.useMemo(_fun83085, [mute]);
|
||||
const ToggledActionButton = importAll(dependencyMap[7]).ToggledActionButton;
|
||||
object2 = {appearsDisabled: value5};
|
||||
const intl = require(dependencyMap[8]).intl;
|
||||
const string = intl.string;
|
||||
const B3zz0G = require(dependencyMap[8]).t.B3zz0G;
|
||||
object2.accessibilityLabel = Reflect.apply(string, intl, [B3zz0G]);
|
||||
object2.onPress = onPress;
|
||||
object2.source = importDefault(mute ? dependencyMap[9] : dependencyMap[10]);
|
||||
object2.isActive = disableTint || mute;
|
||||
object2.isSmallSize = isSmallSize;
|
||||
object2.lottieComponent = value6;
|
||||
const RED_400 = mute ? importDefault(dependencyMap[11]).unsafe_rawColors.RED_400 : undefined;
|
||||
object2.tintColor = RED_400;
|
||||
return <ToggledActionButton {...object2} />;
|
||||
}
|
||||
|
||||
function _fun83085() { // fn#83085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11019:460, offset: 0x01f0cd18, size: 57 bytes, params: 1, frame: 14
|
||||
const VoicePanelRiveMicButton = (require(10835) /* metro dependency 10835: VoicePanelRiveMicButton */).VoicePanelRiveMicButton;
|
||||
return <VoicePanelRiveMicButton muted={mute} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,403 @@
|
||||
/* Metro module 7714; source: modules/video_calls/native/components/ChannelCallModal.tsx; dependencies: [57, 31, 4606, 1379, 7715, 7716, 7722, 661, 33, 7721, 7723, 4007, 7728, 10722, 7725, 10723, 4017, 4015, 12072, 566, 1478, 7724, 12073, 6771, 6789, 12083, 7709, 5321, 10665, 2] */
|
||||
function _fun61664(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6, offset: 0x01b47685, size: 598 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const closure = ChannelCallCameraPreview;
|
||||
const closure2 = ChannelCallModal;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
|
||||
const env0_7 = channelCallStoreModule.useChannelCallOrientationHandlers;
|
||||
const env0_8 = channelCallStoreModule.resetChannelCallStore;
|
||||
const env0_9 = channelCallStoreModule.useChannelCallStore;
|
||||
const env0_10 = channelCallStoreModule.setVoiceChatDrawerState;
|
||||
const env0_11 = channelCallStoreModule.useIsVoiceChatFocused;
|
||||
const env0_12 = (require(7716) /* metro dependency 7716: ChannelCallConstants */).VoiceChatDrawerState;
|
||||
const constantsModule = require(7722) /* metro dependency 7722: Constants */;
|
||||
const env0_13 = constantsModule.PAN_GESTURE_FAIL_OFFSET_Y;
|
||||
const env0_14 = constantsModule.SWIPE_TO_CHAT_ACTIVE_OFFSET;
|
||||
const ModalAnimation = (require(661) /* metro dependency 661: Constants */).ModalAnimation;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_15 = value4.jsx;
|
||||
const env0_16 = value4.jsxs;
|
||||
const env0_17 = value.memo(_fun61668);
|
||||
object = {code: 'function ChannelCallModalTsx1(){const{width}=this.__closure;return[0,-width];}'};
|
||||
object = {code: 'function ChannelCallModalTsx2(){const{runOnJS,dismissKeyboard}=this.__closure;runOnJS(dismissKeyboard)();}'};
|
||||
object = {code: 'function ChannelCallModalTsx3(){const{voiceChatDrawerStoreState}=this.__closure;return voiceChatDrawerStoreState;}'};
|
||||
object = {code: 'function ChannelCallModalTsx4(){const{translateX,width}=this.__closure;translateX.set(-width);}'};
|
||||
object = {code: 'function ChannelCallModalTsx5(){const{isSwipeToChatInProgress,translateX,width,voiceChatDrawerState,VoiceChatDrawerState}=this.__closure;const chatGestureFinished=!isSwipeToChatInProgress.get();const drawerIsInSettledPosition=translateX.get()===-width||translateX.get()===0;const chatOpen=voiceChatDrawerState.get()===VoiceChatDrawerState.OPEN;const chatClosed=voiceChatDrawerState.get()===VoiceChatDrawerState.CLOSED;if(chatGestureFinished&&drawerIsInSettledPosition){return translateX.get()===-width?VoiceChatDrawerState.OPEN:VoiceChatDrawerState.CLOSED;}else if(chatOpen&&translateX.get()>-width){return VoiceChatDrawerState.CLOSING;}else if(chatClosed&&translateX.get()<0){return VoiceChatDrawerState.OPENING;}else{return null;}}'};
|
||||
object = {code: 'function ChannelCallModalTsx6(state,previousState){const{runOnJS,setVoiceChatDrawerState,channelId,VoiceChatDrawerState,transitionToVoiceRoute,guildId}=this.__closure;if(state===previousState)return;if(state!=null&&state!==previousState){runOnJS(setVoiceChatDrawerState)(channelId,state);if(state===VoiceChatDrawerState.OPEN){runOnJS(transitionToVoiceRoute)(guildId,channelId);}}}'};
|
||||
object = {code: 'function ChannelCallModalTsx7(){const{voiceChatDrawerState}=this.__closure;return voiceChatDrawerState.get();}'};
|
||||
object = {code: 'function ChannelCallModalTsx8(drawerState,drawerStatePrev){const{VoiceChatDrawerState,translateX,withPanGestureTiming}=this.__closure;if(drawerState===VoiceChatDrawerState.CLOSED&&drawerStatePrev===VoiceChatDrawerState.OPEN){translateX.set(withPanGestureTiming(0));}}'};
|
||||
object = {code: 'function ChannelCallModalTsx9(){const{interpolate,translateY,maxVerticalTranslate}=this.__closure;return{flex:1,transform:[{translateY:interpolate(translateY.get(),[0,maxVerticalTranslate],[0,maxVerticalTranslate])}]};}'};
|
||||
object = {code: 'function ChannelCallModalTsx10(){const{immediate,translateX,width,withPanGestureTiming}=this.__closure;if(immediate===true){translateX.set(-width);}else{translateX.set(withPanGestureTiming(-width));}}'};
|
||||
object = {code: 'function ChannelCallModalTsx11(){const{translateX,withPanGestureTiming}=this.__closure;translateX.set(withPanGestureTiming(0));}'};
|
||||
const env0_29 = value.memo(_fun61671);
|
||||
const SLIDE_UP = ModalAnimation.SLIDE_UP;
|
||||
closure2.modalConfig = {animation: SLIDE_UP, shouldPersistUnderModals: true};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallModal.tsx');
|
||||
exports.default = closure2;
|
||||
exports.ChannelCallCameraPreview = closure;
|
||||
exports.ChannelCallModal = closure2;
|
||||
}
|
||||
|
||||
function ChannelCallCameraPreview({channel}) { // fn#61665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:443, offset: 0x01b478db, size: 220 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var Provider;
|
||||
var object2;
|
||||
var value;
|
||||
const value2 = useIsVoiceChatFocused();
|
||||
const value3 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
|
||||
const value5 = (require(7723) /* metro dependency 7723: RevealProvider */).useRevealProviderValue(useChannelCallStore(function(a0) {
|
||||
return a0.focus;
|
||||
}), channel);
|
||||
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
|
||||
if (value3) {
|
||||
Provider = (require(7723) /* metro dependency 7723: RevealProvider */).RevealContext.Provider;
|
||||
object2 = {value: value5};
|
||||
value = importDefault(7728) /* metro dependency 7728: CameraPreview */;
|
||||
value = <Provider {...object2}>{((Component) => <Component channel={channel} participantScreenIsFocused={!value2} isChannelCallModalOpen={navigationRouteUtilsNativeModule.isModalOpen(ChannelCallModal)} />)(value)}</Provider>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ChannelCallModal({channel}) { // fn#61667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:8007, offset: 0x01b479c2, size: 49 bytes, params: 2, frame: 14
|
||||
return ((Component) => <Component channelId={channel.id} guildId={channel.guild_id} />)(env0_29);
|
||||
}
|
||||
|
||||
function _fun61668({channelId}) { // fn#61668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:801, offset: 0x01b479f3, size: 146 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var value;
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const getChannel = ChannelStore.getChannel;
|
||||
const property = env0_3(Reflect.apply(useState, binding, [Reflect.apply(getChannel, ChannelStore, [channelId])]),
|
||||
1)[0];
|
||||
useChannelCallOrientationHandlers(property);
|
||||
binding.useEffect(_fun61669, [property]);
|
||||
if (property == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
value = importDefault(10723) /* metro dependency 10723: ChannelCallNavigator */;
|
||||
value = ((Component) => <Component channel={property} />)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun61671({channelId, guildId}) { // fn#61671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:3659, offset: 0x01b47b2f, size: 1486 bytes, params: 2, frame: 42
|
||||
var object2;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
}, [channelId]);
|
||||
let binding = env0_4;
|
||||
const value3 = binding.useRef(undefined);
|
||||
const value4 = binding.useRef(undefined);
|
||||
const env0_3 = value4;
|
||||
const value5 = binding.useRef(undefined);
|
||||
var env0_4 = value5;
|
||||
const value6 = binding.useRef(undefined);
|
||||
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const voiceChatDrawerState = useChannelCallStore().voiceChatDrawerState;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
let closure = function() {
|
||||
return voiceChatDrawerState;
|
||||
};
|
||||
closure.__closure = {voiceChatDrawerStoreState: voiceChatDrawerState};
|
||||
closure.__workletHash = 4903837231689;
|
||||
closure.__initData = env0_20;
|
||||
const value9 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const value11 = reanimatedRexportModule.useSharedValue(false);
|
||||
const value12 = 0.8 * height;
|
||||
const value13 = (importDefault(7724) /* metro dependency 7724: useIsActivityFocused */)(channelId);
|
||||
const [property, env0_13] = env0_3(binding.useState(false), 2);
|
||||
const r1 = value13 || value2 != null && value2.isGuildStageVoice();
|
||||
binding = env0_4;
|
||||
const env0_15 = binding.useRef({channelId: channelId, guildId: guildId});
|
||||
binding.useEffect(_fun61674);
|
||||
binding.useEffect(_fun61675, [width, value7]);
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const CHANNEL_CALL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).CHANNEL_CALL;
|
||||
const analyticsLocations = defaultImport(CHANNEL_CALL).analyticsLocations;
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
let useAnimatedReaction = moduleValue6.useAnimatedReaction;
|
||||
closure = ae;
|
||||
closure.__closure = {isSwipeToChatInProgress: value11, translateX: value7, width: width,
|
||||
voiceChatDrawerState: value9, VoiceChatDrawerState: VoiceChatDrawerState};
|
||||
closure.__workletHash = 16786813095205;
|
||||
closure.__initData = env0_22;
|
||||
const closure2 = te;
|
||||
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setVoiceChatDrawerState: setVoiceChatDrawerState,
|
||||
channelId: channelId, VoiceChatDrawerState: VoiceChatDrawerState,
|
||||
transitionToVoiceRoute: (require(12073) /* metro dependency 12073: RouteManagerUtils */).transitionToVoiceRoute,
|
||||
guildId: guildId};
|
||||
closure2.__workletHash = 14188334620807;
|
||||
closure2.__initData = env0_23;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue6, [closure, closure2]);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
useAnimatedReaction = moduleValue7.useAnimatedReaction;
|
||||
closure = re;
|
||||
closure.__closure = {voiceChatDrawerState: value9};
|
||||
closure.__workletHash = 14044794538420;
|
||||
closure.__initData = env0_24;
|
||||
const closure3 = ne_61680;
|
||||
object2 = {VoiceChatDrawerState: VoiceChatDrawerState, translateX: value7};
|
||||
object2.withPanGestureTiming = (require(12072) /* metro dependency 12072: PanGestureAnimations */).withPanGestureTiming;
|
||||
closure3.__closure = object2;
|
||||
closure3.__workletHash = 260500087614;
|
||||
closure3.__initData = env0_25;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue7, [closure, closure3]);
|
||||
const value20 = useSwipeToChatGesture({isGestureInProgress: value11, channelId: channelId, width: width,
|
||||
translateX: value7, enabled: !property && !value13}).withRef(value3);
|
||||
const value23 = (importDefault(12083) /* metro dependency 12083: useModalPanGesture */)({gestureEnabled: !r1,
|
||||
height: height, maxTranslate: value12, thresholdTranslate: 0.5 * height,
|
||||
translateY: value8}).withRef(value6).requireExternalGestureToFail(value5, value4);
|
||||
binding = env0_4;
|
||||
binding.useLayoutEffect(_fun61684, [channelId]);
|
||||
const moduleValue8 = reanimatedRexportModule;
|
||||
const useAnimatedStyle = moduleValue8.useAnimatedStyle;
|
||||
closure = oe;
|
||||
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, translateY: value8,
|
||||
maxVerticalTranslate: value12};
|
||||
closure.__workletHash = 8643926178558;
|
||||
closure.__initData = env0_26;
|
||||
if (value2 == null) {
|
||||
return null;
|
||||
} else {
|
||||
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
||||
return (
|
||||
<AnalyticsLocationProvider value={analyticsLocations}>
|
||||
{((GestureDetector) => <GestureDetector gesture={(require(5321) /* metro dependency 5321 */).Gesture.Exclusive(value20,
|
||||
|
||||
value23)}>{((View) => <View style={Reflect.apply(useAnimatedStyle, moduleValue8,
|
||||
[closure])}>{((Provider) => <Provider value={binding.useMemo(_fun61686, [value5, value6, value3,
|
||||
value4,
|
||||
value7, width,
|
||||
channelId])}>{((Component) => <Component channelId={channelId} />)(env0_17)}<ChannelCallCameraPreview channel={value2} /></Provider>)((require(10665) /* metro dependency 10665: VoiceChatModalContext */).VoiceChatNavigationContext.Provider)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</GestureDetector>)((require(5321) /* metro dependency 5321 */).GestureDetector)}
|
||||
</AnalyticsLocationProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61669() { // fn#61669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:896, offset: 0x01b47a85, size: 66 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
var value2;
|
||||
if (env0_0 != null) {
|
||||
value2 = environment.__proto__;
|
||||
(importDefault(10722) /* metro dependency 10722: ChannelCallModalManager */).initialize(env0_0);
|
||||
return function() {
|
||||
importDefault(dependencyMap[13]).terminate();
|
||||
importDefault(dependencyMap[14]).setHidden(false);
|
||||
if (!require(dependencyMap[11]).isModalOpen(ChannelCallModal)) {
|
||||
resetChannelCallStore();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61675() { // fn#61675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:4300, offset: 0x01b4812c, size: 225 bytes, params: 1, frame: 22
|
||||
var moduleValue;
|
||||
var runOnUI;
|
||||
var closure;
|
||||
var value;
|
||||
const {channelId, guildId} = env0_15.current;
|
||||
const getState = useChannelCallStore.getState;
|
||||
const voiceChatDrawerState = Reflect.apply(getState, useChannelCallStore, []).voiceChatDrawerState;
|
||||
const OPEN = VoiceChatDrawerState.OPEN;
|
||||
if (voiceChatDrawerState === OPEN || ChannelRTCStore.getChatOpen(channelId)) {
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnUI = moduleValue.runOnUI;
|
||||
closure = t_61676;
|
||||
closure.__closure = {translateX: env0_6, width: width};
|
||||
closure.__workletHash = 15726690166344;
|
||||
closure.__initData = env1_21;
|
||||
Reflect.apply(runOnUI, moduleValue, [closure])();
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS((require(12073) /* metro dependency 12073: RouteManagerUtils */).transitionToVoiceRoute)(guildId,
|
||||
channelId);
|
||||
}
|
||||
}
|
||||
|
||||
function ae() { // fn#61677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:4712, offset: 0x01b48229, size: 245 bytes, params: 1, frame: 16
|
||||
let binding = env0_11;
|
||||
const value2 = binding.get();
|
||||
const r6 = env0_6.get() === -width || env0_6.get() === 0;
|
||||
binding = env0_9;
|
||||
const value7 = binding.get();
|
||||
const OPEN = VoiceChatDrawerState.OPEN;
|
||||
const value9 = binding.get();
|
||||
const CLOSED = VoiceChatDrawerState.CLOSED;
|
||||
return value2 ? value7 !== OPEN ? value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null : env0_6.get() > -width ? VoiceChatDrawerState.CLOSING : value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null : r6 ? env0_6.get() === -width ? VoiceChatDrawerState.OPEN : VoiceChatDrawerState.CLOSED : value7 !== OPEN ? value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null : env0_6.get() > -width ? VoiceChatDrawerState.CLOSING : value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null;
|
||||
}
|
||||
|
||||
function te(a0, a1) { // fn#61678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5062, offset: 0x01b4831e, size: 163 bytes, params: 3, frame: 16
|
||||
var moduleValue;
|
||||
let value = a0 !== a1;
|
||||
if (value && a0 != null && value) {
|
||||
value = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS(setVoiceChatDrawerState)(channelId, a0);
|
||||
if (a0 === VoiceChatDrawerState.OPEN) {
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value = value.runOnJS((require(12073) /* metro dependency 12073: RouteManagerUtils */).transitionToVoiceRoute);
|
||||
value(guildId, channelId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function re() { // fn#61679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5444, offset: 0x01b483c1, size: 18 bytes, params: 1, frame: 9
|
||||
return env0_9.get();
|
||||
}
|
||||
|
||||
function ne_61680(a0, a1) { // fn#61680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5563, offset: 0x01b483d3, size: 99 bytes, params: 3, frame: 13
|
||||
var binding;
|
||||
var set;
|
||||
let value = environment.__proto__;
|
||||
const CLOSED = VoiceChatDrawerState.CLOSED;
|
||||
if (a0 === CLOSED && a1 === VoiceChatDrawerState.OPEN) {
|
||||
binding = env0_6;
|
||||
set = binding.set;
|
||||
value = require(12072) /* metro dependency 12072: PanGestureAnimations */;
|
||||
Reflect.apply(set, binding, [value.withPanGestureTiming(0)]);
|
||||
}
|
||||
}
|
||||
|
||||
function useSwipeToChatGesture({translateX, width, enabled, isGestureInProgress}) { // fn#61681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5802, offset: 0x01b48436, size: 346 bytes, params: 2, frame: 24
|
||||
var object2;
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
let closure = useSwipeToChatGestureU;
|
||||
closure.__closure = {width: width};
|
||||
closure.__workletHash = 15383459308604;
|
||||
closure.__initData = env1_18;
|
||||
const value2 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
const binding = env1_4;
|
||||
const useCallback = binding.useCallback;
|
||||
closure = useSwipeToChatGestureC;
|
||||
object2 = {};
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.dismissKeyboard = (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 4086900686382;
|
||||
closure.__initData = env1_19;
|
||||
const value5 = (importDefault(12072) /* metro dependency 12072: PanGestureAnimations */)({lowerBounds: -width,
|
||||
upperBounds: 0, translate: translateX, vertical: false, snapPositions: value2,
|
||||
onStart: Reflect.apply(useCallback, binding, [closure, []]),
|
||||
isGestureInProgress: isGestureInProgress}).enabled(enabled);
|
||||
const value7 = value5.failOffsetY([-PAN_GESTURE_FAIL_OFFSET_Y, PAN_GESTURE_FAIL_OFFSET_Y]);
|
||||
return value7.activeOffsetX([-SWIPE_TO_CHAT_ACTIVE_OFFSET, SWIPE_TO_CHAT_ACTIVE_OFFSET]);
|
||||
}
|
||||
|
||||
function _fun61684() { // fn#61684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6632, offset: 0x01b485e5, size: 45 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
||||
value.maybeShowAgeGateModal(channelId);
|
||||
}
|
||||
|
||||
function oe() { // fn#61685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6719, offset: 0x01b48612, size: 116 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
let binding = env0_7;
|
||||
const value3 = binding.get();
|
||||
binding = env0_12;
|
||||
return {flex: 1, transform: [{translateY: Reflect.apply(interpolate, value, [value3, [0, binding], [0, binding]])}]};
|
||||
}
|
||||
|
||||
function _fun61686() { // fn#61686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6949, offset: 0x01b48686, size: 89 bytes, params: 1, frame: 4
|
||||
return {memberListRef: env0_4, translateX: env0_6, swipeDismissRef: env0_5, swipeToChatRef: env0_2,
|
||||
videoGridRef: env0_3, openChat: openChat, openVoice: openVoice, setIsSwipeToChatDisabled: env0_13};
|
||||
}
|
||||
|
||||
function t_61676() { // fn#61676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:4436, offset: 0x01b4820d, size: 28 bytes, params: 1, frame: 11
|
||||
const binding = env1_6;
|
||||
binding.set(-width);
|
||||
}
|
||||
|
||||
function useSwipeToChatGestureU() { // fn#61682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5928, owner: useSwipeToChatGesture.u, offset: 0x01b48590, size: 26 bytes, params: 1, frame: 2
|
||||
return [0, -width];
|
||||
}
|
||||
|
||||
function useSwipeToChatGestureC() { // fn#61683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6029, owner: useSwipeToChatGesture.c, offset: 0x01b485aa, size: 59 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS((require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard)();
|
||||
}
|
||||
|
||||
function openChat(a0) { // fn#61687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7034, offset: 0x01b486df, size: 203 bytes, params: 2, frame: 20
|
||||
const env0_0 = a0;
|
||||
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const value2 = reanimatedRexportModule.runOnJS(setVoiceChatDrawerState);
|
||||
const channelIdBinding = channelId;
|
||||
const OPENING = VoiceChatDrawerState.OPENING;
|
||||
value2(channelIdBinding, OPENING);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
const runOnUI = moduleValue3.runOnUI;
|
||||
const closure = openChatN;
|
||||
const object2 = {immediate: a0, translateX: env1_6};
|
||||
object2.width = width;
|
||||
object2.withPanGestureTiming = (require(12072) /* metro dependency 12072: PanGestureAnimations */).withPanGestureTiming;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 16904415853957;
|
||||
closure.__initData = env2_27;
|
||||
Reflect.apply(runOnUI, moduleValue3, [closure])();
|
||||
}
|
||||
|
||||
function openVoice() { // fn#61689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7352, offset: 0x01b48811, size: 183 bytes, params: 1, frame: 18
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const value2 = reanimatedRexportModule.runOnJS(setVoiceChatDrawerState);
|
||||
const channelIdBinding = channelId;
|
||||
const CLOSING = VoiceChatDrawerState.CLOSING;
|
||||
value2(channelIdBinding, CLOSING);
|
||||
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
const runOnUI = moduleValue3.runOnUI;
|
||||
const closure = openVoiceT;
|
||||
const object2 = {translateX: env1_6};
|
||||
object2.withPanGestureTiming = (require(12072) /* metro dependency 12072: PanGestureAnimations */).withPanGestureTiming;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 15753790715008;
|
||||
closure.__initData = env2_28;
|
||||
Reflect.apply(runOnUI, moduleValue3, [closure])();
|
||||
}
|
||||
|
||||
function openChatN() { // fn#61688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7133, owner: openChat.n, offset: 0x01b487aa, size: 103 bytes, params: 1, frame: 14
|
||||
var binding;
|
||||
var set;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (env0_0 === true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_6;
|
||||
binding.set(-width);
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
binding = env2_6;
|
||||
set = binding.set;
|
||||
value2 = environment.__proto__.__proto__.__proto__;
|
||||
moduleValue = require(12072) /* metro dependency 12072: PanGestureAnimations */;
|
||||
Reflect.apply(set, binding, [moduleValue.withPanGestureTiming(-width)]);
|
||||
}
|
||||
}
|
||||
|
||||
function openVoiceT() { // fn#61690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7451, owner: openVoice.t, offset: 0x01b488c8, size: 57 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
const binding = env2_6;
|
||||
const set = binding.set;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = require(12072) /* metro dependency 12072: PanGestureAnimations */;
|
||||
Reflect.apply(set, binding, [value.withPanGestureTiming(0)]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/* Metro module 10722; source: modules/video_calls/native/components/ChannelCallModalManager.tsx; dependencies: [6, 7, 15, 17, 18, 1878, 4297, 694, 7709, 4561, 2] */
|
||||
function _fun82368(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:6, offset: 0x01ef480c, size: 262 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
||||
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
|
||||
value = _fun82372(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallModalManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_82369() { // fn#82369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:168, offset: 0x01ef4912, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_82369_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun82372(a0) { // fn#82372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:371, offset: 0x01ef4974, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = ChannelCallModalManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: '_initialize', value: function(a0) {
|
||||
this.channel = a0;
|
||||
var value2 = UserStore.getCurrentUser();
|
||||
this.inVoiceChannel = a0 != null && value2 != null && VoiceStateStore.isInChannel(a0.id, value2.id);
|
||||
VoiceStateStore.addChangeListener(this.handleCloseModal);
|
||||
}}, {key: '_terminate', value: function() {
|
||||
VoiceStateStore.removeChangeListener(this.handleCloseModal);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function ChannelCallModalManager(a0) { // fn#82373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:383, offset: 0x01ef49d5, size: 153 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, ChannelCallModalManager);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, items2);
|
||||
value = env1_6(ChannelCallModalManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_82369()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items2);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.inVoiceChannel = false;
|
||||
value.handleCloseModal = handleCloseModal;
|
||||
return value;
|
||||
}
|
||||
|
||||
function handleCloseModal() { // fn#82374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:677, owner: ChannelCallModalManager.handleCloseModal, offset: 0x01ef4a6e, size: 181 bytes, params: 1, frame: 19
|
||||
const channel = env0_0.channel;
|
||||
var env0_0 = channel;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const r1 = channel != null && currentUser != null && VoiceStateStore.isInChannel(channel.id, currentUser.id);
|
||||
if (channel != null && env0_0.inVoiceChannel && env0_0.inVoiceChannel !== r1) {
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun82375);
|
||||
env0_0.terminate();
|
||||
}
|
||||
env0_0.inVoiceChannel = r1;
|
||||
}
|
||||
|
||||
function _fun82375() { // fn#82375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:828, offset: 0x01ef4b23, size: 45 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
||||
value.dismissVoiceChannelScreens(channel);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
/* Metro module 10723; source: modules/video_calls/native/components/ChannelCallNavigator.tsx; dependencies: [5, 57, 31, 27, 10724, 7716, 661, 8871, 33, 4501, 1478, 10665, 4017, 10725, 10902, 7721, 5072, 5080, 10206, 1962, 1239, 10785, 11982, 4003, 10737, 477, 3868, 4037, 5280, 2] */
|
||||
function _fun82378(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:6, offset: 0x01ef4bd4, size: 528 bytes, params: 8, frame: 22
|
||||
var object5;
|
||||
const env0_0 = require;
|
||||
const getScreens_82379 = function({channel}) {
|
||||
var MAIN_CALL_SCREEN = ChannelCallScreens.MAIN_CALL_SCREEN;
|
||||
return {[MAIN_CALL_SCREEN]: {'headerShown': false, 'ignoreKeyboard': true, 'gestureEnabled': false, 'title': '',
|
||||
render: _fun82380}};
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value.View;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const safeAreaDisabledStore = importDefault(10724) /* metro dependency 10724: SafeAreaDisabledStore */;
|
||||
const env0_9 = (require(7716) /* metro dependency 7716: ChannelCallConstants */).ChannelCallScreens;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
|
||||
const env0_11 = (require(8871) /* metro dependency 8871: Constants */).OAUTH2_AUTHORIZE_MODAL_KEY;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object5 = {flex: {'flex': 1, 'alignSelf': 'stretch'}};
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['right'] = undefined;
|
||||
object5.textInVoiceContainer = object6;
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['right'] = '50%';
|
||||
object5.voiceContainer = object7;
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
||||
object8['left'] = '50%';
|
||||
object5.textContainer = object8;
|
||||
const env0_14 = Reflect.apply(createStyles, value, [object5]);
|
||||
object5 = {code: 'function ChannelCallNavigatorTsx1(){const{width,translateX}=this.__closure;var _translateX$get,_translateX;return{width:width,transform:[{translateX:(_translateX$get=(_translateX=translateX)===null||_translateX===void 0?void 0:_translateX.get())!==null&&_translateX$get!==void 0?_translateX$get:0}]};}'};
|
||||
object5 = {code: "function ChannelCallNavigatorTsx2(){const{interpolate,translateX,width}=this.__closure;var _translateX$get,_translateX;return{backgroundColor:'black',opacity:interpolate((_translateX$get=(_translateX=translateX)===null||_translateX===void 0?void 0:_translateX.get())!==null&&_translateX$get!==void 0?_translateX$get:0,[-width,0],[0.9,0])};}"};
|
||||
object5 = {code: 'function ChannelCallNavigatorTsx3(){const{translateX}=this.__closure;var _translateX$get,_translateX;return Math.abs((_translateX$get=(_translateX=translateX)===null||_translateX===void 0?void 0:_translateX.get())!==null&&_translateX$get!==void 0?_translateX$get:0)>0;}'};
|
||||
object5 = {code: 'function ChannelCallNavigatorTsx4(isMoving,previous){const{runOnJS,setShouldRenderChat}=this.__closure;if(!isMoving||isMoving===previous)return;runOnJS(setShouldRenderChat)(true);}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallNavigator.tsx');
|
||||
exports.default = ChannelCallNavigator;
|
||||
}
|
||||
|
||||
function getScreens_82379({channel}) { // fn#82379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:514, offset: 0x01ef4de4, size: 62 bytes, params: 2, frame: 4
|
||||
const MAIN_CALL_SCREEN = ChannelCallScreens.MAIN_CALL_SCREEN;
|
||||
return {[MAIN_CALL_SCREEN]: {'headerShown': false, 'ignoreKeyboard': true, 'gestureEnabled': false, 'title': '',
|
||||
render: render_82380}};
|
||||
}
|
||||
|
||||
function CallWithVoiceChat({channel}) { // fn#82381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:1821, offset: 0x01ef4e44, size: 810 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
const value3 = 2 * (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const translateX = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.translateX;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = CallWithVoiceChatH;
|
||||
closure.__closure = {width: value3, translateX: translateX};
|
||||
closure.__workletHash = 4309613236072;
|
||||
closure.__initData = env0_15;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue3.useAnimatedStyle;
|
||||
closure = CallWithVoiceChat_;
|
||||
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, translateX: translateX, width: value3};
|
||||
closure.__workletHash = 1339801810447;
|
||||
closure.__initData = env0_16;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
|
||||
const binding = env0_5;
|
||||
const useState = binding.useState;
|
||||
const value11 = env0_4(Reflect.apply(useState, binding, [(translateX?.get() ?? 0) > 0]), 2);
|
||||
const property = value11[0];
|
||||
const property2 = value11[1];
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
const useAnimatedReaction = moduleValue4.useAnimatedReaction;
|
||||
closure = CallWithVoiceChatC;
|
||||
closure.__closure = {translateX: translateX};
|
||||
closure.__workletHash = 3076815293699;
|
||||
closure.__initData = env0_17;
|
||||
const closure2 = CallWithVoiceChatV;
|
||||
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setShouldRenderChat: property2};
|
||||
closure2.__workletHash = 661145094859;
|
||||
closure2.__initData = env0_18;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue4, [closure, closure2]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.textInVoiceContainer, value6];
|
||||
const r13 = channel.isGuildStageVoice() ? ((Component) => <Component channel={channel} />)(importDefault(10725) /* metro dependency 10725: StageChannelCallNavigator */) : null;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View2 style={items2}>
|
||||
<View style={styles.voiceContainer}>
|
||||
{r13}
|
||||
<View3 pointerEvents="box-none" style={[value7, StyleSheet.absoluteFill]} />
|
||||
</View>
|
||||
<View style={styles.textContainer}>
|
||||
{property ? ((Component) => <Component channel={channel} />)(importDefault(10902) /* metro dependency 10902: ChannelVoiceChat */) : null}
|
||||
</View>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function MainCallScreen({channel}) { // fn#82386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3187, offset: 0x01ef52c4, size: 524 bytes, params: 2, frame: 22
|
||||
const styles = useStyles();
|
||||
const value2 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
|
||||
env0_5.useEffect(_fun82387, [value2, env0_5.useId()]);
|
||||
const value4 = (require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel);
|
||||
env0_5.useEffect(function() {
|
||||
var env0_1 = _fun82390;
|
||||
var closure = _fun82391;
|
||||
var env0_2 = closure;
|
||||
var env0_3 = _fun82392;
|
||||
var env0_0 = false;
|
||||
var ComponentDispatch = require(dependencyMap[20]).ComponentDispatch;
|
||||
ComponentDispatch.subscribe(ComponentActions.SHOW_OAUTH2_MODAL, closure);
|
||||
return _fun82395;
|
||||
}, []);
|
||||
const r7 = value4 ? ((Component) => <Component onReturnToSafety={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop} guildId={channel.guild_id} channelId={channel.id} />)(importDefault(11982) /* metro dependency 11982: GuildNSFW */) : (require(10785) /* metro dependency 10785: useIsVoiceChannelFull */).useIsVoiceChannelLocked(channel) || channel.isVocalThread() ? <View style={styles.flex}>{channel.isGuildStageVoice() ? ((Component) => <Component channel={channel} />)(importDefault(10725) /* metro dependency 10725: StageChannelCallNavigator */) : null}</View> : <CallWithVoiceChat channel={channel} />;
|
||||
const value11 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
|
||||
const GlobalStatusIndicator = importDefault(10737) /* metro dependency 10737: GlobalStatusIndicator */;
|
||||
const r6 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || !value2;
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
return (
|
||||
<GlobalStatusIndicator forceHide={r6} showWhenParticipantOnScreen={!value2}>
|
||||
<ThemeContextProvider gradient={value11}>
|
||||
{r7}
|
||||
</ThemeContextProvider>
|
||||
</GlobalStatusIndicator>
|
||||
);
|
||||
}
|
||||
|
||||
function ChannelCallNavigator({channel}) { // fn#82396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:4596, offset: 0x01ef570d, size: 151 bytes, params: 2, frame: 20
|
||||
const MAIN_CALL_SCREEN = ChannelCallScreens.MAIN_CALL_SCREEN;
|
||||
const Provider = (importDefault(4037) /* metro dependency 4037: GuildThemeGuildIdOverrideContext */).Provider;
|
||||
const r4 = channel.guild_id ?? null;
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
return (
|
||||
<Provider value={r4}>
|
||||
<Navigator screens={getScreens_82379({channel: channel})} initialRouteName={MAIN_CALL_SCREEN} />
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function getScreens_82379Render() { // fn#82380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:643, owner: getScreens_82379.render, offset: 0x01ef4e22, size: 34 bytes, params: 1, frame: 13
|
||||
return <MainCallScreen channel={channel} />;
|
||||
}
|
||||
|
||||
function CallWithVoiceChatH() { // fn#82382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2009, owner: CallWithVoiceChat.h, offset: 0x01ef516e, size: 74 bytes, params: 1, frame: 13
|
||||
const object2 = {};
|
||||
object2.width = env0_0;
|
||||
object2.transform = [{translateX: translateX?.get() ?? 0}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function CallWithVoiceChat_() { // fn#82383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2220, owner: CallWithVoiceChat._, offset: 0x01ef51b8, size: 126 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
const r6 = translateX == null ? value : translateX.get();
|
||||
value = 0;
|
||||
return {backgroundColor: 'black', opacity: Reflect.apply(interpolate, reanimatedRexportModule, [r6 ?? value,
|
||||
[-env0_0, value], [0.9, 0]])};
|
||||
}
|
||||
|
||||
function CallWithVoiceChatC() { // fn#82384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2585, owner: CallWithVoiceChat.C, offset: 0x01ef5236, size: 70 bytes, params: 1, frame: 14
|
||||
const Math = global.Math;
|
||||
const abs = Math.abs;
|
||||
const r4 = translateX?.get();
|
||||
const value = 0;
|
||||
return Reflect.apply(abs, Math, [r4 ?? value]) > value;
|
||||
}
|
||||
|
||||
function CallWithVoiceChatV(a0, a1) { // fn#82385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2737, owner: CallWithVoiceChat.v, offset: 0x01ef527c, size: 72 bytes, params: 3, frame: 12
|
||||
var r0;
|
||||
let value = a0;
|
||||
if (value) {
|
||||
value = value !== a1;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
if (r0) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value = value.runOnJS(env0_2);
|
||||
value(true);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82387() { // fn#82387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3302, offset: 0x01ef54d0, size: 61 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env0_1, lockEnabled: env0_0});
|
||||
return _fun82388;
|
||||
}
|
||||
|
||||
function _fun82389() { // fn#82389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3505, offset: 0x01ef5541, size: 103 bytes, params: 1, frame: 15
|
||||
const closure = function() {
|
||||
return _showOAuth2Modal.apply(this, arguments);
|
||||
};
|
||||
let ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
const subscribe = ComponentDispatch.subscribe;
|
||||
let SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
|
||||
Reflect.apply(subscribe, ComponentDispatch, [SHOW_OAUTH2_MODAL, closure]);
|
||||
return function() {
|
||||
var ComponentDispatch = require(dependencyMap[20]).ComponentDispatch;
|
||||
var SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
|
||||
ComponentDispatch.unsubscribe(SHOW_OAUTH2_MODAL, showOAuth2Modal);
|
||||
dismissOAuthModal();
|
||||
};
|
||||
}
|
||||
|
||||
function _fun82388() { // fn#82388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3370, offset: 0x01ef550d, size: 52 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env1_1, lockEnabled: false});
|
||||
}
|
||||
|
||||
function dismissOAuthModal() { // fn#82390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3519, offset: 0x01ef55a8, size: 60 bytes, params: 1, frame: 13
|
||||
var value2;
|
||||
if (env0_0) {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(OAUTH2_AUTHORIZE_MODAL_KEY);
|
||||
}
|
||||
}
|
||||
|
||||
function _showOAuth2Modal() { // fn#82392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3654, offset: 0x01ef55e4, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return env2_3(_fun82394).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun82394(a0) { // fn#82394, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3709, offset: 0x01ef5624, size: 163 bytes, params: 2, frame: 20
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
var binding = env4_1;
|
||||
var binding2 = env4_2;
|
||||
binding(binding2[17]).popWithKey(env4_11);
|
||||
var value4 = binding(binding2[17]);
|
||||
var pushLazy = value4.pushLazy;
|
||||
var value6 = env4_0(binding2[19])(binding2[18], binding2.paths);
|
||||
var object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
object2['dismissOAuthModal'] = env2_1;
|
||||
yield Reflect.apply(pushLazy, value4, [value6, object2, env4_11]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 10772; source: modules/video_calls/native/components/ChannelCallNavigatorIcon.tsx; dependencies: [31, 27, 7715, 661, 33, 4501, 697, 5278, 4002, 4564, 1305, 2] */
|
||||
function _fun82831(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10958:6, offset: 0x01f031d4, size: 464 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.StyleSheet;
|
||||
const env0_5 = (require(7715) /* metro dependency 7715: ChannelCallStore */).resetFocusTimer;
|
||||
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.pressableContainer = {marginHorizontal: 4};
|
||||
const object6 = {};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.pressable = object6;
|
||||
const object7 = {'flexDirection': 'row', 'height': 32, 'width': 32, 'borderRadius': null, 'alignItems': 'center',
|
||||
'justifyContent': 'center', 'overflow': 'hidden'};
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object7.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
object2.container = object7;
|
||||
const object8 = {'marginLeft': 4, 'fontSize': 14};
|
||||
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
||||
object8.fontFamily = PRIMARY_SEMIBOLD;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object8.color = WHITE;
|
||||
object2.text = object8;
|
||||
object2.disabled = {opacity: 0.5};
|
||||
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
|
||||
object2.iconColor = {color: ICON_SUBTLE};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallNavigatorIcon.tsx');
|
||||
exports.default = _default_82832;
|
||||
}
|
||||
|
||||
function _default_82832({onPress, source, accessibilityLabel, children, membersCount, disabled, theme, disableBackground, containerStyle, IconComponent}) { // fn#82832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10958:674, offset: 0x01f033a4, size: 568 bytes, params: 2, frame: 31
|
||||
theme = theme === undefined ? 'dark' : theme;
|
||||
disableBackground = disableBackground === undefined || disableBackground;
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const pressableOpacityProps = {accessibilityRole: 'button', accessibilityLabel: accessibilityLabel,
|
||||
disabled: disabled, style: styles.pressable, onPress: function() {
|
||||
if (resetFocusTimer != null) {
|
||||
resetFocusTimer();
|
||||
}
|
||||
onPress();
|
||||
}};
|
||||
const items3 = [styles.container, containerStyle];
|
||||
disabled = disabled && styles.disabled;
|
||||
items3[2] = disabled;
|
||||
const items2 = [(require(4002) /* metro dependency 4002: shared */).isThemeDark(theme) ? disableBackground ? null : ((Component) => <Component blurTheme="dark" style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */) : null];
|
||||
items2[1] = IconComponent != null ? <IconComponent color={styles.iconColor.color} size="sm" /> : ((Icon) => <Icon source={source} color={styles.iconColor.color} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} />)((require(1305) /* metro dependency 1305: native */).Icon);
|
||||
items2[2] = membersCount != null && membersCount > 0 && ((LegacyText) => <LegacyText style={styles.text}>{membersCount}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText);
|
||||
return (
|
||||
<View style={styles.pressableContainer}>
|
||||
<PressableOpacity {...pressableOpacityProps}>
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
{children}
|
||||
</PressableOpacity>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/* Metro module 10849; source: modules/video_calls/native/components/ChannelCallSingleController.tsx; dependencies: [31, 4492, 1226, 661, 4299, 33, 683, 4863, 566, 10850, 10852, 10853, 2] */
|
||||
function _fun83136(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11035:6, offset: 0x01f0ed91, size: 218 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_7 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallSingleController.tsx');
|
||||
exports.ChannelCallSingleController = ChannelCallSingleController;
|
||||
}
|
||||
|
||||
function ChannelCallSingleController({selectedParticipant, channel}) { // fn#83137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11035:326, offset: 0x01f0ee6b, size: 356 bytes, params: 2, frame: 18
|
||||
var r0;
|
||||
var id2;
|
||||
var value3;
|
||||
var value;
|
||||
const binding = env0_3;
|
||||
const useEffect = binding.useEffect;
|
||||
let id = channel.id;
|
||||
Reflect.apply(useEffect, binding, [_fun83138, [id]]);
|
||||
const activeStreamForStreamKey = require(dependencyMap[8]).useStateFromStores([ApplicationStreamingStore],
|
||||
function() {
|
||||
return ApplicationStreamingStore.getActiveStreamForStreamKey(selectedParticipant.id);
|
||||
});
|
||||
const type = selectedParticipant.type;
|
||||
const STREAM = ParticipantTypes.STREAM;
|
||||
if (STREAM === type) {
|
||||
id = selectedParticipant.user.id;
|
||||
id2 = AuthenticationStore.getId();
|
||||
value3 = null;
|
||||
if (value3 != activeStreamForStreamKey) {
|
||||
value = importDefault(id === id2 ? dependencyMap[9] : dependencyMap[10]);
|
||||
value = ((Component) => <Component participant={selectedParticipant} channel={channel} />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value3;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
const USER = ParticipantTypes.USER;
|
||||
if (USER === type) {
|
||||
return ((Component) => <Component participant={selectedParticipant} channel={channel} />)(importDefault(dependencyMap[11]));
|
||||
}
|
||||
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
|
||||
if (HIDDEN_STREAM === type) {
|
||||
return null;
|
||||
}
|
||||
const ACTIVITY = ParticipantTypes.ACTIVITY;
|
||||
if (ACTIVITY === type) {
|
||||
throw new global.Error('Activities are not supported on old voice UI');
|
||||
}
|
||||
}
|
||||
|
||||
function _fun83138() { // fn#83138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11035:377, offset: 0x01f0efcf, size: 105 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const VIDEO_LAYOUT_TOGGLED = AnalyticEvents.VIDEO_LAYOUT_TOGGLED;
|
||||
const object2 = {video_layout: 'focus'};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, value.collectVoiceAnalyticsMetadata(channel.id), value);
|
||||
Reflect.apply(track, defaultImport, [VIDEO_LAYOUT_TOGGLED, object2]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/* Metro module 10902; source: modules/video_calls/native/components/ChannelVoiceChat.tsx; dependencies: [31, 27, 7715, 33, 4501, 697, 9597, 1585, 10665, 22, 7721, 4048, 7704, 10903, 7725, 11273, 5278, 1244, 1305, 11377, 12067, 2] */
|
||||
function _fun83458(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11088:6, offset: 0x01f1b337, size: 441 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(7715) /* metro dependency 7715: ChannelCallStore */).useIsVoiceChatFocused;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value2.jsx;
|
||||
const env0_7 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.chat = {'flex': 1, 'backgroundColor': null, 'alignSelf': 'stretch', backgroundColor: BACKGROUND_BASE_LOW};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.chatHeaderSpacer = {height: 44, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.chatHeader = {'flexDirection': 'row', 'alignSelf': 'stretch', 'height': 44, 'backgroundColor': null,
|
||||
'alignItems': 'center', 'justifyContent': 'flex-start', 'position': 'absolute', 'left': 0, 'right': 0,
|
||||
'paddingHorizontal': 16, backgroundColor: BACKGROUND_BASE_LOW};
|
||||
object2.chatHeaderBackIconContainer = {'width': 32, 'height': 32, 'alignItems': 'flex-start',
|
||||
'justifyContent': 'center'};
|
||||
object2.chatHeaderTitleContainer = {'alignSelf': 'stretch', 'flex': 1, 'justifyContent': 'center',
|
||||
'marginStart': 16};
|
||||
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.safeAreaTop = {alignSelf: 'stretch', backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(_fun83459);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelVoiceChat.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun83459(a0) { // fn#83459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11088:874, offset: 0x01f1b4f0, size: 1026 bytes, params: 2, frame: 35
|
||||
let channel = a0.channel;
|
||||
const id = channel.id;
|
||||
const guild_id = channel.guild_id;
|
||||
channel = a0.channel;
|
||||
let inModal = a0.inModal;
|
||||
const value = undefined;
|
||||
inModal = !(inModal === value) && inModal;
|
||||
const styles = useStyles();
|
||||
const value4 = useIsVoiceChatFocused();
|
||||
env0_3.useEffect(_fun83460, [id, guild_id]);
|
||||
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
const value5 = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext();
|
||||
const value6 = null;
|
||||
const openVoice = value6 == value5 ? value : value5.openVoice;
|
||||
const r21 = value6 != openVoice ? openVoice : (importDefault(22) /* metro dependency 22 */).noop;
|
||||
const value7 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
|
||||
const value8 = env0_3.useRef(value6);
|
||||
const value9 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const r4 = value4 ? 'yes' : 'no-hide-descendants';
|
||||
const value12 = !value4;
|
||||
const value13 = ((Component) => <Component absolute tall />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
|
||||
const ChannelContainer = (require(10903) /* metro dependency 10903: ChannelContainer */).ChannelContainer;
|
||||
const items2 = [inModal ? value6 : ((Component) => <Component hidden={value4 ? value12 : value} animated barStyle={value7 ? 'light-content' : value9 !== 'dark' ? 'dark-content' : 'light-content'} />)(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */)];
|
||||
items2[1] = <View style={[styles.safeAreaTop, {height: top, display: inModal ? 'none' : value}]} />;
|
||||
items2[2] = <View style={[styles.chatHeaderSpacer, {display: inModal ? 'none' : value}]} />;
|
||||
items2[3] = ((Component) => <Component guildId={guild_id} channelId={id} chatInputRef={value8} screenIndex="voice-panel" />)(importDefault(11273) /* metro dependency 11273: ChatView */);
|
||||
const items5 = [styles.chatHeader];
|
||||
items5[1] = {top: top, display: inModal ? 'none' : value};
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const object = {accessibilityRole: 'button', onPress: r21};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
|
||||
object.style = styles.chatHeaderBackIconContainer;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconProps = {source: importDefault(11377) /* metro dependency 11377 */};
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const MEDIUM = Sizes.MEDIUM;
|
||||
iconProps.size = MEDIUM;
|
||||
const pressableOpacity = <PressableOpacity {...object}><Icon {...iconProps} /></PressableOpacity>;
|
||||
const ChannelTitle = (require(12067) /* metro dependency 12067: ChannelNavbar */).ChannelTitle;
|
||||
items2[4] = <View style={items5}>{pressableOpacity}<View style={styles.chatHeaderTitleContainer}><ChannelTitle guildId={guild_id} channelId={id} /></View></View>;
|
||||
return (
|
||||
<View
|
||||
importantForAccessibility={r4}
|
||||
accessibilityElementsHidden={value12}
|
||||
style={styles.chat}
|
||||
>
|
||||
{value13}
|
||||
<ChannelContainer guildId={guild_id} channelId={id}>
|
||||
{items2}
|
||||
</ChannelContainer>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun83460() { // fn#83460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11088:968, offset: 0x01f1b8f2, size: 59 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
(importDefault(9597) /* metro dependency 9597: MessageManager */).fetchMessages({guildId: guild_id, channelId: id});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/* Metro module 12153; source: modules/video_calls/native/components/ChannelVoiceChatModal.tsx; dependencies: [31, 33, 4805, 7712, 9883, 6707, 4037, 10902, 2] */
|
||||
function _fun93221(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:6, offset: 0x020ab18b, size: 142 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelVoiceChatModal.tsx');
|
||||
exports.default = ChannelVoiceChatModal;
|
||||
}
|
||||
|
||||
function ChannelVoiceChatModal({channel}) { // fn#93222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:227, offset: 0x020ab219, size: 199 bytes, params: 2, frame: 19
|
||||
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
|
||||
env0_3.useEffect(_fun93223, [channel.id]);
|
||||
const ModalStackNavigator = importDefault(9883) /* metro dependency 9883: ModalStackNavigator */;
|
||||
const r6 = value2 ?? '';
|
||||
const StageIcon = (require(6707) /* metro dependency 6707: StageIcon */).StageIcon;
|
||||
return (
|
||||
<ModalStackNavigator
|
||||
screenKey="StageVoiceChat"
|
||||
title={r6}
|
||||
titleIcon={<StageIcon size="sm" />}
|
||||
render={render_93225}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93223() { // fn#93223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:308, offset: 0x020ab2e0, size: 62 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
||||
value.updateChatOpen(channel.id, true);
|
||||
return _fun93224;
|
||||
}
|
||||
|
||||
function ChannelVoiceChatModalRender() { // fn#93225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:500, owner: ChannelVoiceChatModal.render, offset: 0x020ab353, size: 124 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const Provider = (importDefault(4037) /* metro dependency 4037: GuildThemeGuildIdOverrideContext */).Provider;
|
||||
const guild_id = channel.guild_id;
|
||||
const value3 = null;
|
||||
return (
|
||||
<Provider value={value3 != guild_id ? guild_id : value3}>
|
||||
{((Component) => <Component channel={channel} inModal />)(importDefault(10902) /* metro dependency 10902: ChannelVoiceChat */)}
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun93224() { // fn#93224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:345, offset: 0x020ab31e, size: 53 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
||||
value.updateChatOpen(channel.id, false);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 7722; source: modules/video_calls/native/components/Constants.tsx; dependencies: [2] */
|
||||
function _fun61773(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7900:6, offset: 0x01b4a508, size: 129 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/Constants.tsx');
|
||||
exports.PIP_GESTURE_ACTIVE_OFFSET = 2;
|
||||
exports.SWIPE_TO_CHAT_ACTIVE_OFFSET = 16;
|
||||
exports.PAN_GESTURE_FAIL_OFFSET_Y = 5;
|
||||
exports.PIP_FOCUS_SCALE = 1.5;
|
||||
exports.OLD_VOICE_UI_ERROR_STRING = '\nOld Voice UI slated for deletion, if you are seeing\nthis error some old voice code can still run in the mobile redesign,\nand may have been deleted accidentally.\n';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 10687; source: modules/video_calls/native/components/DCDVideoRenderer.tsx; dependencies: [4567, 10688, 2] */
|
||||
function _fun82162(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10873:6, offset: 0x01eecefb, size: 128 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importDefault(4567) /* metro dependency 4567: requireNativeComponentOrDefaultNative */;
|
||||
value = value({componentName: 'DCDVideoRenderer',
|
||||
componentFoundInstance: importDefault(10688) /* metro dependency 10688: VideoRendererNativeComponent */});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/DCDVideoRenderer.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/* Metro module 10840; source: modules/video_calls/native/components/DisconnectRemoteButton.tsx; dependencies: [31, 4295, 33, 566, 7741, 8160, 10810, 1244, 9422, 9228, 2] */
|
||||
function _fun83101(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:6, offset: 0x01f0d6f8, size: 158 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/DisconnectRemoteButton.tsx');
|
||||
exports.DisconnectRemoteButton = DisconnectRemoteButton;
|
||||
}
|
||||
|
||||
function DisconnectRemoteButton({channel, isSmallSize}) { // fn#83102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:252, offset: 0x01f0d796, size: 239 bytes, params: 2, frame: 20
|
||||
const value2 = require(dependencyMap[3]).useStateFromStoresObject([GameConsoleStore], _fun83103);
|
||||
const env0_1 = value2.remoteSessionId;
|
||||
const awaitingRemote = value2.awaitingRemote;
|
||||
const PrimaryActionButton = importAll(dependencyMap[4]).PrimaryActionButton;
|
||||
const primaryActionButtonProps = {source: importDefault(awaitingRemote ? dependencyMap[5] : dependencyMap[6])};
|
||||
const intl = require(dependencyMap[7]).intl;
|
||||
primaryActionButtonProps.accessibilityLabel = intl.string(require(dependencyMap[7]).t['6vrfgt']);
|
||||
primaryActionButtonProps.isSmallSize = isSmallSize;
|
||||
primaryActionButtonProps.onPress = onPress_83104;
|
||||
return <PrimaryActionButton {...primaryActionButtonProps} />;
|
||||
}
|
||||
|
||||
function _fun83103() { // fn#83103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:326, offset: 0x01f0d885, size: 47 bytes, params: 1, frame: 11
|
||||
const object2 = {};
|
||||
const value = environment.__proto__;
|
||||
object2.awaitingRemote = GameConsoleStore.getAwaitingRemoteSessionInfo() != null;
|
||||
object2.remoteSessionId = GameConsoleStore.getRemoteSessionId();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function DisconnectRemoteButtonOnPress() { // fn#83104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:610, owner: DisconnectRemoteButton.onPress, offset: 0x01f0d8b4, size: 121 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
var value;
|
||||
if (remoteSessionId != null) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(9422) /* metro dependency 9422: GameConsoleActionCreators */;
|
||||
moduleValue.remoteDisconnect(remoteSessionId);
|
||||
moduleValue2 = require(9228) /* metro dependency 9228: CallsUtils */;
|
||||
moduleValue2.handleDisconnect(channel);
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = require(9422) /* metro dependency 9422: GameConsoleActionCreators */;
|
||||
value.disconnectRemote();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
/* Metro module 10732; source: modules/video_calls/native/components/FocusedControls.tsx; dependencies: [31, 27, 661, 33, 4501, 1305, 4017, 10733, 4504, 6618, 1478, 7744, 10734, 10737, 7723, 4559, 6771, 6789, 10702, 10745, 683, 2] */
|
||||
function _fun82446(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:6, offset: 0x01ef701a, size: 427 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.StyleSheet;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value3.jsx;
|
||||
const env0_8 = value3.jsxs;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({backgroundGradient: {'position': 'absolute',
|
||||
'left': 0, 'right': 0, 'top': 0, 'height': 130}, headerContainer: {'position': 'relative', 'height': 54}});
|
||||
object2 = {};
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object2.easing = STANDARD_EASING;
|
||||
object2.duration = 250;
|
||||
object2 = {code: 'function FocusedControlsTsx1(){const{reveal,FOCUSED_CONTROLS_HEADER_HEIGHT}=this.__closure;return reveal?0:-FOCUSED_CONTROLS_HEADER_HEIGHT;}'};
|
||||
object2 = {code: 'function FocusedControlsTsx2(){const{withTiming,offsetY,TIMING_CONFIG}=this.__closure;return{transform:[{translateY:withTiming(offsetY.get(),TIMING_CONFIG)}]};}'};
|
||||
object2 = {code: 'function FocusedControlsTsx3(){const{isInvitedToSpeak,statusIndicatorHeight}=this.__closure;return isInvitedToSpeak?statusIndicatorHeight.get():0;}'};
|
||||
object2 = {code: 'function FocusedControlsTsx4(){const{reveal}=this.__closure;return reveal?1:0;}'};
|
||||
object2 = {code: 'function FocusedControlsTsx5(){const{withTiming,top,TIMING_CONFIG,revealOpacity}=this.__closure;return{top:withTiming(top.get(),TIMING_CONFIG),opacity:withTiming(revealOpacity.get(),TIMING_CONFIG)};}'};
|
||||
value = value.memo(_fun82451);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/FocusedControls.tsx');
|
||||
exports.default = value;
|
||||
exports.FOCUSED_CONTROLS_HEADER_HEIGHT = 54;
|
||||
}
|
||||
|
||||
function FocusedControlsHeader({header, reveal, isTouchingLeftScreenEdge}) { // fn#82447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:711, offset: 0x01ef71c5, size: 361 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
let closure = FocusedControlsHeaderL;
|
||||
closure.__closure = {reveal: reveal, FOCUSED_CONTROLS_HEADER_HEIGHT: 54};
|
||||
closure.__workletHash = 15509217225804;
|
||||
closure.__initData = env0_11;
|
||||
const value2 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
const value3 = (importDefault(10733) /* metro dependency 10733: useIsInvitedToSpeak */)();
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
|
||||
closure = FocusedControlsHeaderC;
|
||||
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, offsetY: value2,
|
||||
TIMING_CONFIG: env0_10};
|
||||
closure.__workletHash = 12710345257882;
|
||||
closure.__initData = env0_12;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
return (
|
||||
<View2 style={value4}>
|
||||
<SafeAreaPaddingView
|
||||
top={!value3}
|
||||
left={isTouchingLeftScreenEdge}
|
||||
right
|
||||
>
|
||||
<View style={styles.headerContainer}>
|
||||
{header}
|
||||
</View>
|
||||
</SafeAreaPaddingView>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function FocusedControlsHeaderGradient() { // fn#82450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:1351, offset: 0x01ef7391, size: 408 bytes, params: 1, frame: 31
|
||||
const styles = useStyles();
|
||||
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
|
||||
const items3 = [styles.backgroundGradient];
|
||||
items3[1] = {width: width};
|
||||
const Svg = (require(7744) /* metro dependency 7744 */).Svg;
|
||||
const Defs = (require(7744) /* metro dependency 7744 */).Defs;
|
||||
const LinearGradient = (require(7744) /* metro dependency 7744 */).LinearGradient;
|
||||
const Stop = (require(7744) /* metro dependency 7744 */).Stop;
|
||||
const items2 = [<Stop offset="0%" stopColor="black" stopOpacity=".8" />];
|
||||
items2[1] = <Stop offset="66%" stopColor="black" stopOpacity=".51" />;
|
||||
items2[2] = <Stop offset="100%" stopColor="black" stopOpacity="0" />;
|
||||
const defs = <Defs><LinearGradient id="grad" y1="0%" x1="0" x2="0" y2="100%">{items2}</LinearGradient></Defs>;
|
||||
const Rect = (require(7744) /* metro dependency 7744 */).Rect;
|
||||
return (
|
||||
<View style={items3}>
|
||||
<Svg height="100%" width={width}>
|
||||
{defs}
|
||||
<Rect
|
||||
height="100%"
|
||||
width={width}
|
||||
fill="url(#grad)"
|
||||
/>
|
||||
</Svg>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82451({header, expandedControls, actionBar, children, forceReveal, disableGradient, containerStyle, omitPTT, bottomHeader, onDrawerClose, channel, isTouchingLeftScreenEdge}) { // fn#82451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:2379, offset: 0x01ef7529, size: 858 bytes, params: 2, frame: 33
|
||||
var object2;
|
||||
var r5;
|
||||
forceReveal = !(forceReveal === undefined) && forceReveal;
|
||||
disableGradient = !(disableGradient === undefined) && disableGradient;
|
||||
var value;
|
||||
const value3 = (require(10737) /* metro dependency 10737: GlobalStatusIndicator */).useGlobalStatusIndicatorHeightSharedValue((require(10734) /* metro dependency 10734: useGlobalStatusIndicatorState */).useGlobalStatusIndicatorState());
|
||||
const value4 = (importDefault(10733) /* metro dependency 10733: useIsInvitedToSpeak */)();
|
||||
const binding = undefined;
|
||||
const useContext = binding.useContext;
|
||||
const RevealContext = (require(7723) /* metro dependency 7723: RevealProvider */).RevealContext;
|
||||
const reveal = Reflect.apply(useContext, binding, [RevealContext]).reveal;
|
||||
const value5 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
|
||||
let r10 = reveal || forceReveal;
|
||||
r10 = !r10 ? value5 : r10;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
let closure = D_82452;
|
||||
closure.__closure = {isInvitedToSpeak: value4, statusIndicatorHeight: value3};
|
||||
closure.__workletHash = 14833624951450;
|
||||
closure.__initData = env0_13;
|
||||
const value6 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
useDerivedValue = moduleValue5.useDerivedValue;
|
||||
closure = F_82453;
|
||||
closure.__closure = {reveal: r10};
|
||||
closure.__workletHash = 15022275245977;
|
||||
closure.__initData = env0_14;
|
||||
const value7 = Reflect.apply(useDerivedValue, moduleValue5, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
const useAnimatedStyle = moduleValue6.useAnimatedStyle;
|
||||
closure = y_82454;
|
||||
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, top: value6,
|
||||
TIMING_CONFIG: env0_10, revealOpacity: value7};
|
||||
closure.__workletHash = 8532538341439;
|
||||
closure.__initData = env0_15;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
|
||||
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
||||
const FOCUSED_VOICE_CONTROLS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FOCUSED_VOICE_CONTROLS;
|
||||
const env0_6 = defaultImport(FOCUSED_VOICE_CONTROLS).analyticsLocations;
|
||||
const env0_7 = (importDefault(10702) /* metro dependency 10702: useCurrentEmbeddedActivity */)();
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
object2 = {style: [containerStyle ?? StyleSheet.absoluteFill, value8], pointerEvents: r10 ? 'box-none' : 'none'};
|
||||
const items2 = [disableGradient ? null : <FocusedControlsHeaderGradient />];
|
||||
items2[1] = <FocusedControlsHeader header={header} reveal={r10} isTouchingLeftScreenEdge={isTouchingLeftScreenEdge} />;
|
||||
if (actionBar != null) {
|
||||
if (expandedControls != null) {
|
||||
value = importDefault(10745) /* metro dependency 10745: FocusedControlsBottomControls */;
|
||||
value = ((Component) => <Component onDrawerOpen={onDrawerOpen} omitPTT={omitPTT} actionBar={actionBar} expandedControls={expandedControls} header={bottomHeader} onDrawerClose={onDrawerClose} reveal={r10}>{children}</Component>)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
items2[2] = r5;
|
||||
return (
|
||||
<View {...object2}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function FocusedControlsHeaderL() { // fn#82448, owner: FocusedControlsHeader.l, offset: 0x01ef732e, size: 20 bytes, params: 1, frame: 2
|
||||
return reveal ? 0 : -54;
|
||||
}
|
||||
|
||||
function FocusedControlsHeaderC() { // fn#82449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:1009, owner: FocusedControlsHeader.c, offset: 0x01ef7342, size: 79 bytes, params: 1, frame: 16
|
||||
const object = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
object.translateY = timingModule.withTiming(env0_1.get(), env1_10);
|
||||
return {transform: [object]};
|
||||
}
|
||||
|
||||
function D_82452() { // fn#82452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:2820, offset: 0x01ef7883, size: 27 bytes, params: 1, frame: 10
|
||||
return env0_2 ? env0_1.get() : 0;
|
||||
}
|
||||
|
||||
function F_82453() { // fn#82453, offset: 0x01ef789e, size: 17 bytes, params: 1, frame: 2
|
||||
return env0_3 ? 1 : 0;
|
||||
}
|
||||
|
||||
function y_82454() { // fn#82454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:3113, offset: 0x01ef78af, size: 105 bytes, params: 1, frame: 20
|
||||
const object2 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
object2.top = timingModule.withTiming(env0_4.get(), env1_10);
|
||||
const moduleValue2 = timingModule;
|
||||
object2.opacity = moduleValue2.withTiming(env0_5.get(), env1_10);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function onDrawerOpen() { // fn#82455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:3670, offset: 0x01ef7918, size: 141 bytes, params: 1, frame: 18
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const VOICE_BOTTOM_SHEET_EXPANDED = AnalyticEvents.VOICE_BOTTOM_SHEET_EXPANDED;
|
||||
const channelBinding = channel;
|
||||
Reflect.apply(track, defaultImport, [VOICE_BOTTOM_SHEET_EXPANDED, {channel_id: channelBinding.id,
|
||||
guild_id: channelBinding.guild_id, application_id: env0_7 == null ? value2 : env0_7.applicationId,
|
||||
activity_session_id: env0_7 == null ? value2 : env0_7.compositeInstanceId, location_stack: analyticsLocations}]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,644 @@
|
||||
/* Metro module 10745; source: modules/video_calls/native/components/FocusedControlsBottomControls.tsx; dependencies: [57, 31, 27, 7715, 7716, 661, 33, 477, 4501, 697, 6597, 1305, 1585, 4017, 10746, 676, 1244, 6515, 3968, 1365, 4504, 5321, 10748, 1478, 7742, 1239, 3868, 4564, 4002, 10749, 2] */
|
||||
function _fun82598(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:6, offset: 0x01efb25e, size: 945 bytes, params: 8, frame: 27
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const closure = FocusedControlsBottomDrawer;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value.View;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_6 = value.TouchableWithoutFeedback;
|
||||
const env0_7 = value.ScrollView;
|
||||
value = require(7715) /* metro dependency 7715: ChannelCallStore */;
|
||||
const env0_8 = value.clearFocusTimer;
|
||||
const env0_9 = value.resetFocusTimer;
|
||||
value = require(7716) /* metro dependency 7716: ChannelCallConstants */;
|
||||
const env0_10 = value.BOX_MODE_THRESHOLD_WIDTH;
|
||||
const env0_11 = value.BOX_MODE_ACTIONSHEET_HEIGHT;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_12 = value.ComponentActions;
|
||||
const Fonts = value.Fonts;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value.jsx;
|
||||
const env0_14 = value.jsxs;
|
||||
const EXTENDED_CONTROLS_OFFSET_Y = function(a0) {
|
||||
return a0 + 54 + (require(dependencyMap[7]).isIOS() ? 48 : 16);
|
||||
};
|
||||
const EXTENDED_CONTROLS_LANDSCAPE_OFFSET_Y = function(a0) {
|
||||
return a0 + 54 + 12;
|
||||
};
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object4.bottomDrawerContainer = object5;
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['borderRadius'] = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object7['overflow'] = 'hidden';
|
||||
object4.visualEffectView = object7;
|
||||
object4.visualEffectViewBackground = {backgroundColor: 'rgba(0, 0, 0, .15)'};
|
||||
object4.expandedControlsContainer = {marginHorizontal: 16};
|
||||
object4.aboveActionBarContainer = {'position': 'absolute', 'left': 0, 'right': 0, 'top': -32, 'paddingTop': 4,
|
||||
'paddingBottom': 8};
|
||||
object4.aboveActionBarChildrenContainer = {'position': 'absolute', 'left': 16, 'right': 16, 'top': -64};
|
||||
object4.ptbButton = {'margin': 0, 'marginHorizontal': 16, 'marginBottom': 8};
|
||||
object4.tooltipStyle = {'alignSelf': 'center', 'position': 'absolute', 'top': -28};
|
||||
object4.containerStyle = {'paddingHorizontal': 8, 'paddingVertical': 4};
|
||||
const object8 = {};
|
||||
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
|
||||
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
copyDataProperties(object8, textStyles(DISPLAY_EXTRABOLD, WHITE, 12, {uppercase: true}), 12);
|
||||
object4.labelStyle = object8;
|
||||
const env0_18 = Reflect.apply(createStyles, value, [object4]);
|
||||
object4 = {};
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object4.easing = STANDARD_EASING;
|
||||
object4.duration = 250;
|
||||
object4 = {easing: STANDARD_EASING, duration: 400};
|
||||
object4 = {code: "function FocusedControlsBottomControlsTsx1(){const{positionY,EXPANDED_DRAWER_SHOW_POSITION}=this.__closure;const opacity=Math.min(positionY.get()*-1/EXPANDED_DRAWER_SHOW_POSITION,1);return{opacity:opacity,pointerEvents:opacity===0?'none':'auto'};}"};
|
||||
object4 = {code: 'function FocusedControlsBottomControlsTsx2(){const{positionY,EXPANDED_DRAWER_SHOW_POSITION}=this.__closure;return{opacity:1-Math.min(positionY.get()*-1/EXPANDED_DRAWER_SHOW_POSITION,1)};}'};
|
||||
object4 = {code: 'function FocusedControlsBottomControlsTsx3(){const{offsetY,EXPANDED_DRAWER_SHOW_POSITION,positionY}=this.__closure;const maxHeightRange=offsetY/3-EXPANDED_DRAWER_SHOW_POSITION;const opacity=2-Math.max(Math.abs(positionY.get())/maxHeightRange,0);return{opacity:opacity};}'};
|
||||
object4 = {code: 'function FocusedControlsBottomControlsTsx4(){const{isLandscapeMode,controlMaxHeight,landscapeOffsetY,portraitOffsetY}=this.__closure;return isLandscapeMode?controlMaxHeight-landscapeOffsetY:controlMaxHeight-portraitOffsetY;}'};
|
||||
object4 = {code: 'function FocusedControlsBottomControlsTsx5(){const{drawerOpen,positionY,maxHeight,velocity,MIN_GESTURE_TRIGGER_VELOCITY,CLOSE_DRAWER_POSITION,runOnJS,handleOpen,startY,withTiming,TIMING_CONFIG,TooltipActionCreators,TooltipNames,TIMING_CONFIG_EXIT,resetFocusTimer,handleClose}=this.__closure;var _velocity$get,_velocity$get2;const isDrawerAlreadyOpen=drawerOpen.get();const isPassedTriggerThreshold=positionY.get()*-1>=maxHeight.get()/2;const isHighOpenVelocity=((_velocity$get=velocity.get())!==null&&_velocity$get!==void 0?_velocity$get:0)*-1>=MIN_GESTURE_TRIGGER_VELOCITY;const isHighCloseVelocity=((_velocity$get2=velocity.get())!==null&&_velocity$get2!==void 0?_velocity$get2:0)>=MIN_GESTURE_TRIGGER_VELOCITY;const isLowerThanMinHeight=positionY.get()>CLOSE_DRAWER_POSITION;function openDrawer(){runOnJS(handleOpen)();startY.set(-maxHeight.get());positionY.set(withTiming(startY.get(),TIMING_CONFIG));drawerOpen.set(true);runOnJS(TooltipActionCreators.acknowledgeTooltip)(TooltipNames.SCREENSHARE_SWIPE_UP_CONTROLS);}function closeDrawer(){startY.set(0);positionY.set(withTiming(CLOSE_DRAWER_POSITION,TIMING_CONFIG_EXIT));drawerOpen.set(false);runOnJS(resetFocusTimer)();runOnJS(handleClose)();}if(isHighOpenVelocity&&!isDrawerAlreadyOpen||isPassedTriggerThreshold&&!isDrawerAlreadyOpen){openDrawer();}else if(isLowerThanMinHeight||isHighCloseVelocity&&isDrawerAlreadyOpen){closeDrawer();}else if(isPassedTriggerThreshold){openDrawer();}else{closeDrawer();}}'};
|
||||
object4 = {code: 'function FocusedControlsBottomControlsTsx6(event){const{velocity,positionY,maxHeight,startY}=this.__closure;var _startY$get;velocity.set(event.velocityY);if(positionY.get()*-1>maxHeight.get()+16){return;}positionY.set(((_startY$get=startY.get())!==null&&_startY$get!==void 0?_startY$get:0)+event.translationY);}'};
|
||||
object4 = {code: 'function FocusedControlsBottomControlsTsx7(){const{runOnJS,clearFocusTimer,drawerOpen,positionY,CLOSE_DRAWER_POSITION,velocity,startY}=this.__closure;runOnJS(clearFocusTimer)();drawerOpen.set(positionY.get()!==CLOSE_DRAWER_POSITION);velocity.set(0);if(positionY.get()==null||!drawerOpen.get()){startY.set(0);}}'};
|
||||
object4 = {code: "function FocusedControlsBottomControlsTsx8(){const{reveal,controlHeightWithOffset,sheetHeight,isLandscapeMode,safeAreaRight,sheetWidth,withTiming,TIMING_CONFIG}=this.__closure;const revealOffset=reveal?0:controlHeightWithOffset;return{position:'absolute',height:sheetHeight,overflow:'hidden',bottom:isLandscapeMode?16:0,right:isLandscapeMode?16+safeAreaRight:0,borderRadius:isLandscapeMode?8:0,width:sheetWidth,transform:[{translateY:withTiming(revealOffset,TIMING_CONFIG)}]};}"};
|
||||
object4 = {code: 'function FocusedControlsBottomControlsTsx9(){const{sheetHeight,offsetY,positionY}=this.__closure;return{height:sheetHeight,transform:[{translateY:offsetY+positionY.get()}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/FocusedControlsBottomControls.tsx');
|
||||
exports.default = FocusedControlsBottomControls;
|
||||
exports.FOCUSED_CONTROLS_HEADER_HEIGHT = 54;
|
||||
exports.FocusedControlsBottomDrawer = closure;
|
||||
}
|
||||
|
||||
function FocusedControlsExpanded({expandedControls, availableHeight, positionY}) { // fn#82599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:1626, offset: 0x01efb60f, size: 361 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const [property, env0_4] = env0_3(env0_4Binding.useState(false), 2);
|
||||
const value4 = env0_4Binding.useCallback(_fun82600, [availableHeight, bottom, property]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = FocusedControlsExpanded_;
|
||||
closure.__closure = {positionY: positionY, EXPANDED_DRAWER_SHOW_POSITION: env0_15};
|
||||
closure.__workletHash = 10567472250823;
|
||||
closure.__initData = env0_21;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const object = {height: availableHeight};
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={object}>
|
||||
<ScrollView scrollEnabled={property}>
|
||||
<View2 style={[styles.expandedControlsContainer, value5]} onLayout={value4}>
|
||||
{expandedControls}
|
||||
</View2>
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function FocusedControlsBottomDrawerTooltip({positionY}) { // fn#82602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:2460, offset: 0x01efb80c, size: 403 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var View;
|
||||
var Tooltip;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
const useCanShowTooltipModule = require(10746) /* metro dependency 10746: useCanShowTooltip */;
|
||||
const useCanShowTooltip = useCanShowTooltipModule.useCanShowTooltip;
|
||||
const TooltipNames = (require(676) /* metro dependency 676: ConstantsIOS */).TooltipNames;
|
||||
const SCREENSHARE_SWIPE_UP_CONTROLS = TooltipNames.SCREENSHARE_SWIPE_UP_CONTROLS;
|
||||
const value2 = Reflect.apply(useCanShowTooltip, useCanShowTooltipModule, [SCREENSHARE_SWIPE_UP_CONTROLS, true]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = FocusedControlsBottomDrawerTooltipO;
|
||||
let object2 = {positionY: positionY, EXPANDED_DRAWER_SHOW_POSITION: env0_15};
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 4429631762525;
|
||||
closure.__initData = env0_22;
|
||||
if (value2) {
|
||||
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
object2 = {style: Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure])};
|
||||
Tooltip = (require(1305) /* metro dependency 1305: native */).Tooltip;
|
||||
var tooltipProps = {style: styles.tooltipStyle,
|
||||
arrowPosition: (require(1305) /* metro dependency 1305: native */).TooltipArrowPositions.CENTER,
|
||||
arrowDirection: (require(1305) /* metro dependency 1305: native */).TooltipArrowDirections.DOWN,
|
||||
arrowWidth: 8,
|
||||
arrowHeight: 4, containerStyle: styles.containerStyle, labelStyle: styles.labelStyle};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
tooltipProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zYzy2i);
|
||||
r0 = <View {...object2}><Tooltip {...tooltipProps} /></View>;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function FocusedControlsAboveActionBarView({positionY, offsetY, aboveActionBar, onPressHeader, isExpanded}) { // fn#82604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:3421, offset: 0x01efb9e6, size: 365 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = FocusedControlsAboveActionBarView_;
|
||||
closure.__closure = {offsetY: offsetY, EXPANDED_DRAWER_SHOW_POSITION: env0_15, positionY: positionY};
|
||||
closure.__workletHash = 5042367101380;
|
||||
closure.__initData = env0_23;
|
||||
const value2 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const object = {expanded: isExpanded};
|
||||
const items2 = [<FocusedControlsBottomDrawerTooltip positionY={positionY} />];
|
||||
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
|
||||
items2[1] = <ActionSheetHeaderBar />;
|
||||
items2[2] = aboveActionBar != null && ((View) => <View style={[styles.aboveActionBarChildrenContainer,
|
||||
value2]}>{aboveActionBar}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
|
||||
return (
|
||||
<TouchableWithoutFeedback
|
||||
accessible
|
||||
onPress={onPressHeader}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel="Group DM"
|
||||
accessibilityHint="Press to start a new conversation"
|
||||
accessibilityState={object}
|
||||
>
|
||||
<View style={styles.aboveActionBarContainer}>
|
||||
{items2}
|
||||
</View>
|
||||
</TouchableWithoutFeedback>
|
||||
);
|
||||
}
|
||||
|
||||
function FocusedControlsBottomDrawer({children, expandedControls, actionBarControlsHeight, reveal, aboveActionBar, onDrawerClose, onDrawerOpen}) { // fn#82606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:7212, offset: 0x01efbbb2, size: 1086 bytes, params: 2, frame: 37
|
||||
const styles = useStyles();
|
||||
const {bottom, right, top} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const value3 = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const height = value3.height;
|
||||
const value4 = value3.width > BOX_MODE_THRESHOLD_WIDTH;
|
||||
const value5 = (importDefault(7742) /* metro dependency 7742: useBottomVoiceControlsSheetWidth */)();
|
||||
const env0_4 = value5;
|
||||
const r9 = value4 ? global.Math.min(BOX_MODE_ACTIONSHEET_HEIGHT, height) : height;
|
||||
const r18 = value4 ? actionBarControlsHeight : actionBarControlsHeight + bottom;
|
||||
const value8 = r9 - r18;
|
||||
const value9 = r9 - r18;
|
||||
const r15 = value4 ? value9 - EXTENDED_CONTROLS_LANDSCAPE_OFFSET_Y(top) : value9 - EXTENDED_CONTROLS_OFFSET_Y(top);
|
||||
let object2 = {controlMaxHeight: value8, isLandscapeMode: value4};
|
||||
object2.portraitOffsetY = EXTENDED_CONTROLS_OFFSET_Y(top) + bottom;
|
||||
object2.landscapeOffsetY = EXTENDED_CONTROLS_LANDSCAPE_OFFSET_Y(top);
|
||||
object2.onClose = onClose_82618;
|
||||
object2.onOpen = onDrawerOpen;
|
||||
const value13 = env0_3(useDrawerGesture(object2), 4);
|
||||
const property = value13[0];
|
||||
const property2 = value13[1];
|
||||
const property3 = value13[2];
|
||||
const property4 = value13[3];
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = FocusedControlsBottomDrawerF;
|
||||
object2 = {reveal: reveal, controlHeightWithOffset: r18, sheetHeight: r9, isLandscapeMode: value4,
|
||||
safeAreaRight: right, sheetWidth: value5};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.TIMING_CONFIG = env0_19;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 608185354082;
|
||||
closure.__initData = env0_28;
|
||||
const value14 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
env0_4.useEffect(_fun82620, [value4, property]);
|
||||
env0_4.useEffect(_fun82621, [reveal, property]);
|
||||
env0_4.useEffect(function() {
|
||||
var closure = _fun82623;
|
||||
var env0_0 = closure;
|
||||
var ComponentDispatch = require(dependencyMap[25]).ComponentDispatch;
|
||||
ComponentDispatch.subscribe(ComponentActions.SELECT_ACTIVITY, closure);
|
||||
return _fun82624;
|
||||
}, [property]);
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue2.useAnimatedStyle;
|
||||
closure = FocusedControlsBottomDrawerZ;
|
||||
closure.__closure = {sheetHeight: r9, offsetY: value8, positionY: property};
|
||||
closure.__workletHash = 4471821639301;
|
||||
closure.__initData = env0_29;
|
||||
const value15 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
|
||||
env0_4.useEffect(_fun82626, [property3]);
|
||||
const nativeModule = require(3868) /* metro dependency 3868: native */;
|
||||
const useThemeContext = nativeModule.useThemeContext;
|
||||
const theme = Reflect.apply(useThemeContext, nativeModule, []).theme;
|
||||
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [styles.bottomDrawerContainer, value15];
|
||||
const VisualEffectView = importDefault(4564) /* metro dependency 4564: VisualEffectView */;
|
||||
const items2 = [styles.visualEffectView];
|
||||
items2[1] = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme) ? styles.visualEffectViewBackground : null;
|
||||
return (
|
||||
<View style={value14} pointerEvents="box-none">
|
||||
<GestureDetector gesture={property2}>
|
||||
<View2 style={items3}>
|
||||
<VisualEffectView blurTheme={theme} style={items2} />
|
||||
<FocusedControlsAboveActionBarView
|
||||
onPressHeader={property3}
|
||||
aboveActionBar={aboveActionBar}
|
||||
positionY={property}
|
||||
offsetY={value8}
|
||||
isExpanded={property4}
|
||||
/>
|
||||
{children}
|
||||
<FocusedControlsExpanded
|
||||
expandedControls={expandedControls}
|
||||
availableHeight={r15}
|
||||
positionY={property}
|
||||
/>
|
||||
</View2>
|
||||
</GestureDetector>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function FocusedControlsBottomControls({children, actionBar, expandedControls, reveal, header, onDrawerClose, omitPTT, onDrawerOpen}) { // fn#82630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:11951, offset: 0x01efcac2, size: 332 bytes, params: 2, frame: 26
|
||||
omitPTT = !(omitPTT === undefined) && omitPTT;
|
||||
const styles = useStyles();
|
||||
const [property, env0_0] = env0_3(env0_4.useState(0), 2);
|
||||
return (
|
||||
<FocusedControlsBottomDrawer
|
||||
aboveActionBar={children}
|
||||
actionBarControlsHeight={property}
|
||||
expandedControls={expandedControls}
|
||||
reveal={reveal}
|
||||
onDrawerClose={onDrawerClose}
|
||||
onDrawerOpen={onDrawerOpen}
|
||||
>
|
||||
<View onLayout={env0_4.useCallback(_fun82631, [])}>
|
||||
{header}
|
||||
{actionBar}
|
||||
{omitPTT ? null : ((Component) => <Component look={(require(10749) /* metro dependency 10749: CallPTTButton */).CallPTTButtonLooks.BLUR} style={styles.ptbButton} sendCallback={clearFocusTimer} stopCallback={resetFocusTimer} />)(importDefault(10749) /* metro dependency 10749: CallPTTButton */)}
|
||||
</View>
|
||||
</FocusedControlsBottomDrawer>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82600({nativeEvent}) { // fn#82600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:1800, offset: 0x01efb778, size: 62 bytes, params: 2, frame: 12
|
||||
const value2 = nativeEvent.layout.height > availableHeight - bottom;
|
||||
if (value2 !== env0_3) {
|
||||
env0_4(value2);
|
||||
}
|
||||
}
|
||||
|
||||
function FocusedControlsExpanded_() { // fn#82601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:1905, owner: FocusedControlsExpanded._, offset: 0x01efb7b6, size: 86 bytes, params: 1, frame: 13
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
let value = positionY.get();
|
||||
value = -1 * value;
|
||||
value = Reflect.apply(min, Math, [value / env1_15, 1]);
|
||||
return {opacity: value, pointerEvents: value !== 0 ? 'auto' : 'none'};
|
||||
}
|
||||
|
||||
function FocusedControlsBottomDrawerTooltipO() { // fn#82603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:2648, owner: FocusedControlsBottomDrawerTooltip.o, offset: 0x01efb99f, size: 71 bytes, params: 1, frame: 14
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
let value = positionY.get();
|
||||
value = -1 * value;
|
||||
return {opacity: 1 - Reflect.apply(min, Math, [value / env1_15, 1])};
|
||||
}
|
||||
|
||||
function FocusedControlsAboveActionBarView_() { // fn#82605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:3579, owner: FocusedControlsAboveActionBarView._, offset: 0x01efbb53, size: 95 bytes, params: 1, frame: 17
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
const abs = Math2.abs;
|
||||
const positionYBinding = positionY;
|
||||
const get = positionYBinding.get;
|
||||
const value2 = Reflect.apply(abs, Math2, [Reflect.apply(get, positionYBinding, [])]);
|
||||
let value = offsetY / 3;
|
||||
value = Reflect.apply(max, Math, [value2 / (value - env1_15), 0]);
|
||||
return {opacity: 2 - value};
|
||||
}
|
||||
|
||||
function useDrawerGesture({controlMaxHeight, isLandscapeMode, portraitOffsetY, landscapeOffsetY, onClose, onOpen}) { // fn#82607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:7588, owner: FocusedControlsBottomDrawer.useDrawerGesture, offset: 0x01efbff0, size: 859 bytes, params: 2, frame: 30
|
||||
var object2;
|
||||
var environment;
|
||||
const closure = handleOpen;
|
||||
const closure2 = handleClose_82609;
|
||||
const value = environment.__proto__;
|
||||
const [property, env0_7] = env1_3(env1_4.useState(false), 2);
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
const closure3 = useDrawerGestureO;
|
||||
closure3.__closure = {isLandscapeMode: isLandscapeMode, controlMaxHeight: controlMaxHeight,
|
||||
landscapeOffsetY: landscapeOffsetY, portraitOffsetY: portraitOffsetY};
|
||||
closure3.__workletHash = 13346503100323;
|
||||
closure3.__initData = env1_24;
|
||||
const value5 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure3]);
|
||||
const value6 = reanimatedRexportModule.useSharedValue(0);
|
||||
const value7 = reanimatedRexportModule.useSharedValue(false);
|
||||
const value8 = reanimatedRexportModule.useSharedValue(0);
|
||||
const value10 = env1_4.useCallback(_fun82612, [value4, value5, env1_4.useCallback(_fun82611, [])]);
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value11 = Gesture.Pan();
|
||||
const onStart = value11.onStart;
|
||||
const closure5 = useDrawerGestureM;
|
||||
const runOnJS = reanimatedRexportModule.runOnJS;
|
||||
closure5.__closure = {runOnJS: runOnJS, clearFocusTimer: clearFocusTimer, drawerOpen: value7, positionY: value4,
|
||||
CLOSE_DRAWER_POSITION: 0, velocity: value8, startY: value6};
|
||||
closure5.__workletHash = 9674965708496;
|
||||
closure5.__initData = env1_27;
|
||||
const value12 = Reflect.apply(onStart, value11, [closure5]);
|
||||
const onUpdate = value12.onUpdate;
|
||||
const closure6 = useDrawerGestureN;
|
||||
closure6.__closure = {velocity: value8, positionY: value4, maxHeight: value5, startY: value6};
|
||||
closure6.__workletHash = 16755118181071;
|
||||
closure6.__initData = env1_26;
|
||||
const value13 = Reflect.apply(onUpdate, value12, [closure6]);
|
||||
const onEnd = value13.onEnd;
|
||||
const closure7 = useDrawerGestureH;
|
||||
object2 = {drawerOpen: value7, positionY: value4, maxHeight: value5, velocity: value8,
|
||||
MIN_GESTURE_TRIGGER_VELOCITY: 500, CLOSE_DRAWER_POSITION: 0};
|
||||
object2.runOnJS = runOnJS;
|
||||
object2.handleOpen = closure;
|
||||
object2.startY = value6;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.TIMING_CONFIG = env1_19;
|
||||
object2.TooltipActionCreators = importDefault(10748) /* metro dependency 10748: TooltipActionCreators */;
|
||||
const TooltipNames = (require(676) /* metro dependency 676: ConstantsIOS */).TooltipNames;
|
||||
object2.TooltipNames = TooltipNames;
|
||||
object2.TIMING_CONFIG_EXIT = env1_20;
|
||||
object2.resetFocusTimer = resetFocusTimer;
|
||||
object2.handleClose = closure2;
|
||||
closure7.__closure = object2;
|
||||
closure7.__workletHash = 6790759206787;
|
||||
closure7.__initData = env1_25;
|
||||
return [value4, Reflect.apply(onEnd, value13, [closure7]), value10, property];
|
||||
}
|
||||
|
||||
function FocusedControlsBottomDrawerF() { // fn#82619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:10195, owner: FocusedControlsBottomDrawer.f, offset: 0x01efc7f1, size: 165 bytes, params: 1, frame: 16
|
||||
const revealBinding = reveal;
|
||||
const value2 = 0;
|
||||
const r5 = revealBinding ? value2 : env0_6;
|
||||
const object3 = {'position': 'absolute', 'height': null, 'overflow': 'hidden'};
|
||||
object3.height = env0_5;
|
||||
object3.bottom = result ? 16 : value2;
|
||||
object3.right = result ? 16 + right : value2;
|
||||
object3.borderRadius = result ? 8 : value2;
|
||||
object3.width = env0_4;
|
||||
const object4 = {};
|
||||
object4.translateY = (require(4504) /* metro dependency 4504: timing */).withTiming(r5, env1_19);
|
||||
object3.transform = [object4];
|
||||
return object3;
|
||||
}
|
||||
|
||||
function _fun82620() { // fn#82620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:10597, offset: 0x01efc896, size: 61 bytes, params: 1, frame: 16
|
||||
const binding = env0_8;
|
||||
const set = binding.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding, [timingModule.withTiming(0, env1_20)]);
|
||||
}
|
||||
|
||||
function _fun82621() { // fn#82621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:10656, offset: 0x01efc8d3, size: 30 bytes, params: 1, frame: 11
|
||||
if (reveal) {
|
||||
env0_8.set(0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82622() { // fn#82622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:10695, offset: 0x01efc8f1, size: 75 bytes, params: 1, frame: 15
|
||||
const closure = handleSelectActivity;
|
||||
let ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
const subscribe = ComponentDispatch.subscribe;
|
||||
let SELECT_ACTIVITY = ComponentActions.SELECT_ACTIVITY;
|
||||
Reflect.apply(subscribe, ComponentDispatch, [SELECT_ACTIVITY, closure]);
|
||||
return function() {
|
||||
var ComponentDispatch = require(dependencyMap[25]).ComponentDispatch;
|
||||
var SELECT_ACTIVITY = ComponentActions.SELECT_ACTIVITY;
|
||||
ComponentDispatch.unsubscribe(SELECT_ACTIVITY, handleSelectActivity);
|
||||
};
|
||||
}
|
||||
|
||||
function FocusedControlsBottomDrawerZ() { // fn#82625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:10979, owner: FocusedControlsBottomDrawer.Z, offset: 0x01efc9b7, size: 55 bytes, params: 1, frame: 12
|
||||
const binding = env0_7;
|
||||
const binding2 = env0_8;
|
||||
const get = binding2.get;
|
||||
return {height: env0_5, transform: [{translateY: binding + Reflect.apply(get, binding2, [])}]};
|
||||
}
|
||||
|
||||
function _fun82626() { // fn#82626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:11154, offset: 0x01efc9ee, size: 71 bytes, params: 1, frame: 13
|
||||
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
const subscribe = ComponentDispatch.subscribe;
|
||||
const TOGGLE_CALL_CONTROL_DRAWER = ComponentActions.TOGGLE_CALL_CONTROL_DRAWER;
|
||||
Reflect.apply(subscribe, ComponentDispatch, [TOGGLE_CALL_CONTROL_DRAWER, env0_9]);
|
||||
return _fun82627;
|
||||
}
|
||||
|
||||
function handleOpen() { // fn#82608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:8324, owner: FocusedControlsBottomDrawer.useDrawerGesture.handleOpen, offset: 0x01efc34b, size: 47 bytes, params: 1, frame: 11
|
||||
if (!env0_6) {
|
||||
if (onOpen != null) {
|
||||
onOpen();
|
||||
}
|
||||
env0_7(true);
|
||||
}
|
||||
}
|
||||
|
||||
function useDrawerGestureHandleClose() { // fn#82609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:8370, owner: FocusedControlsBottomDrawer.useDrawerGesture.handleClose, offset: 0x01efc37a, size: 55 bytes, params: 1, frame: 12
|
||||
if (env0_6) {
|
||||
if (onClose != null) {
|
||||
onClose();
|
||||
}
|
||||
env0_7(false);
|
||||
env0_13();
|
||||
}
|
||||
}
|
||||
|
||||
function useDrawerGestureO() { // fn#82610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:7816, owner: FocusedControlsBottomDrawer.useDrawerGesture.O, offset: 0x01efc3b1, size: 34 bytes, params: 1, frame: 4
|
||||
const isLandscapeModeBinding = isLandscapeMode;
|
||||
const controlMaxHeightBinding = controlMaxHeight;
|
||||
return isLandscapeModeBinding ? controlMaxHeightBinding - landscapeOffsetY : controlMaxHeightBinding - portraitOffsetY;
|
||||
}
|
||||
|
||||
function _fun82611() { // fn#82611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:8086, offset: 0x01efc3d3, size: 62 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
|
||||
const UNSAFE_markDismissibleContentAsDismissed = value.UNSAFE_markDismissibleContentAsDismissed;
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const SOUNDBOARD_MOBILE_NEW_BADGE = DismissibleContent.SOUNDBOARD_MOBILE_NEW_BADGE;
|
||||
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, value, [SOUNDBOARD_MOBILE_NEW_BADGE]);
|
||||
}
|
||||
|
||||
function _fun82612() { // fn#82612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:8221, offset: 0x01efc411, size: 138 bytes, params: 1, frame: 19
|
||||
let binding = env0_8;
|
||||
const value2 = binding.get();
|
||||
const value3 = 0;
|
||||
const value4 = value3 !== value2;
|
||||
const r9 = value4 ? value3 : -env0_9.get();
|
||||
binding = env0_8;
|
||||
const set = binding.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding, [timingModule.withTiming(r9, env2_19)]);
|
||||
if (value4) {
|
||||
resetFocusTimer();
|
||||
env0_13();
|
||||
} else {
|
||||
clearFocusTimer();
|
||||
}
|
||||
env0_7(!value4);
|
||||
}
|
||||
|
||||
function useDrawerGestureM() { // fn#82613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:8467, owner: FocusedControlsBottomDrawer.useDrawerGesture.M, offset: 0x01efc49b, size: 143 bytes, params: 1, frame: 15
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
reanimatedRexportModule.runOnJS(clearFocusTimer)();
|
||||
const binding = env0_11;
|
||||
const set = binding.set;
|
||||
const binding2 = env0_8;
|
||||
Reflect.apply(set, binding, [binding2.get() !== 0]);
|
||||
env0_12.set(0);
|
||||
if (!(binding2.get() != null && env0_11.get())) {
|
||||
env0_10.set(0);
|
||||
}
|
||||
}
|
||||
|
||||
function useDrawerGestureN(a0) { // fn#82614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:8749, owner: FocusedControlsBottomDrawer.useDrawerGesture.N, offset: 0x01efc52a, size: 128 bytes, params: 2, frame: 14
|
||||
let binding = env0_12;
|
||||
binding.set(a0.velocityY);
|
||||
if (!(-1 * env0_8.get() > env0_9.get() + 16)) {
|
||||
binding = env0_8;
|
||||
binding.set((env0_10.get() ?? 0) + a0.translationY);
|
||||
}
|
||||
}
|
||||
|
||||
function useDrawerGestureH() { // fn#82615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:8973, owner: FocusedControlsBottomDrawer.useDrawerGesture.H, offset: 0x01efc5aa, size: 221 bytes, params: 1, frame: 18
|
||||
const closure = HOpenDrawer;
|
||||
const closure2 = HCloseDrawer;
|
||||
let binding = env0_11;
|
||||
let get = binding.get;
|
||||
const value2 = Reflect.apply(get, binding, []);
|
||||
const value6 = -1 * env0_8.get() >= env0_9.get() / 2;
|
||||
const value7 = env0_12.get();
|
||||
const value8 = 0;
|
||||
const value9 = -1 * (value7 ?? value8);
|
||||
const value11 = (env0_12.get() ?? value8) >= 500;
|
||||
binding = env0_8;
|
||||
get = binding.get;
|
||||
const value = Reflect.apply(get, binding, []) > value8;
|
||||
if (value9 >= 500) {
|
||||
if (value2) {
|
||||
if (value6) {
|
||||
if (value2) {
|
||||
if (value) {
|
||||
closure2();
|
||||
} else if (value11) {
|
||||
if (value2) {
|
||||
closure2();
|
||||
} else if (value6) {
|
||||
closure();
|
||||
} else {
|
||||
closure2();
|
||||
}
|
||||
} else if (value6) {
|
||||
closure();
|
||||
} else {
|
||||
closure2();
|
||||
}
|
||||
} else {
|
||||
closure();
|
||||
}
|
||||
} else if (value) {
|
||||
closure2();
|
||||
} else if (value11) {
|
||||
if (value2) {
|
||||
closure2();
|
||||
} else if (value6) {
|
||||
closure();
|
||||
} else {
|
||||
closure2();
|
||||
}
|
||||
} else if (value6) {
|
||||
closure();
|
||||
} else {
|
||||
closure2();
|
||||
}
|
||||
} else {
|
||||
closure();
|
||||
}
|
||||
} else if (value6) {
|
||||
if (value2) {
|
||||
if (value) {
|
||||
closure2();
|
||||
} else if (value11) {
|
||||
if (value2) {
|
||||
closure2();
|
||||
} else if (value6) {
|
||||
closure();
|
||||
} else {
|
||||
closure2();
|
||||
}
|
||||
} else if (value6) {
|
||||
closure();
|
||||
} else {
|
||||
closure2();
|
||||
}
|
||||
} else {
|
||||
closure();
|
||||
}
|
||||
} else if (value) {
|
||||
closure2();
|
||||
} else if (value11) {
|
||||
if (value2) {
|
||||
closure2();
|
||||
} else if (value6) {
|
||||
closure();
|
||||
} else {
|
||||
closure2();
|
||||
}
|
||||
} else if (value6) {
|
||||
closure();
|
||||
} else {
|
||||
closure2();
|
||||
}
|
||||
}
|
||||
|
||||
function handleSelectActivity() { // fn#82623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:10700, offset: 0x01efc93c, size: 61 bytes, params: 1, frame: 16
|
||||
const binding = env1_8;
|
||||
const set = binding.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding, [timingModule.withTiming(0, env2_20)]);
|
||||
}
|
||||
|
||||
function _fun82627() { // fn#82627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:11228, offset: 0x01efca35, size: 62 bytes, params: 1, frame: 14
|
||||
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
const unsubscribe = ComponentDispatch.unsubscribe;
|
||||
const TOGGLE_CALL_CONTROL_DRAWER = ComponentActions.TOGGLE_CALL_CONTROL_DRAWER;
|
||||
Reflect.apply(unsubscribe, ComponentDispatch, [TOGGLE_CALL_CONTROL_DRAWER, env1_9]);
|
||||
}
|
||||
|
||||
function HOpenDrawer() { // fn#82616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:9103, owner: FocusedControlsBottomDrawer.useDrawerGesture.H.openDrawer, offset: 0x01efc687, size: 214 bytes, params: 1, frame: 21
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
reanimatedRexportModule.runOnJS(handleOpen)();
|
||||
const binding = env1_10;
|
||||
let set = binding.set;
|
||||
const binding2 = env1_9;
|
||||
const get = binding2.get;
|
||||
Reflect.apply(set, binding, [-Reflect.apply(get, binding2, [])]);
|
||||
const binding3 = env1_8;
|
||||
set = binding3.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding3, [timingModule.withTiming(binding.get(), env3_19)]);
|
||||
env1_11.set(true);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
value = moduleValue3.runOnJS((importDefault(10748) /* metro dependency 10748: TooltipActionCreators */).acknowledgeTooltip);
|
||||
const TooltipNames = (require(676) /* metro dependency 676: ConstantsIOS */).TooltipNames;
|
||||
const SCREENSHARE_SWIPE_UP_CONTROLS = TooltipNames.SCREENSHARE_SWIPE_UP_CONTROLS;
|
||||
value(SCREENSHARE_SWIPE_UP_CONTROLS);
|
||||
}
|
||||
|
||||
function HCloseDrawer() { // fn#82617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10931:9319, owner: FocusedControlsBottomDrawer.useDrawerGesture.H.closeDrawer, offset: 0x01efc75d, size: 148 bytes, params: 1, frame: 20
|
||||
let binding = env1_10;
|
||||
let set = binding.set;
|
||||
Reflect.apply(set, binding, [0]);
|
||||
binding = env1_8;
|
||||
set = binding.set;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
Reflect.apply(set, binding, [timingModule.withTiming(0, env3_20)]);
|
||||
env1_11.set(false);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
reanimatedRexportModule.runOnJS(resetFocusTimer)();
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
moduleValue3.runOnJS(handleClose_82609)();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/* Metro module 10842; source: modules/video_calls/native/components/FocusedExpandedControls.tsx; dependencies: [31, 27, 4492, 1226, 4291, 33, 4501, 697, 1305, 10843, 10844, 7972, 566, 10268, 1244, 10272, 477, 9228, 9239, 10794, 10845, 10834, 10846, 10847, 2] */
|
||||
function _fun83112(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:6, offset: 0x01f0dd74, size: 435 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Image;
|
||||
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const env0_7 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
|
||||
object2.formTintColor = {tintColor: ICON_STRONG};
|
||||
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
|
||||
object2.formColor = {color: MOBILE_TEXT_HEADING_PRIMARY};
|
||||
object2.sparkle = {'position': 'absolute', 'bottom': -4, 'right': '70%'};
|
||||
object2.sparkle2 = {'position': 'absolute', 'right': -5, 'height': 10, 'width': 10};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/FocusedExpandedControls.tsx');
|
||||
exports.StreamVolumeItem = StreamVolumeItem;
|
||||
exports.AudioRouteButton = AudioRouteButton_83118;
|
||||
exports.ScreenshareButton = ScreenshareButton_83120;
|
||||
exports.DeafenButton = DeafenButton;
|
||||
}
|
||||
|
||||
function ExpandedControlItemIcon({iconSource, showIconSparkle}) { // fn#83113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:478, offset: 0x01f0df27, size: 266 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
if (iconSource == null) {
|
||||
return null;
|
||||
}
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const MEDIUM = Sizes.MEDIUM;
|
||||
const icon = <Icon size={MEDIUM} source={iconSource} style={styles.formTintColor} disableColor />;
|
||||
return showIconSparkle ? <View>{icon}<Image style={styles.sparkle2} source={importDefault(10843) /* metro dependency 10843 */} /><Image style={styles.sparkle} source={importDefault(10844) /* metro dependency 10844 */} /></View> : icon;
|
||||
}
|
||||
|
||||
function ExpandedControlItem({disabled, iconSource, showIconSparkle, label, onPress, onSwitchValueChange, switchValue, trailing}) { // fn#83114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:789, offset: 0x01f0e031, size: 304 bytes, params: 2, frame: 26
|
||||
showIconSparkle = !(showIconSparkle === undefined) && showIconSparkle;
|
||||
const styles = useStyles();
|
||||
const r4 = trailing == null && switchValue != null ? ((FormSwitch) => <FormSwitch tintColor={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500} renderIosBackground value={switchValue} disabled={disabled} onValueChange={onSwitchValueChange} />)((require(7972) /* metro dependency 7972: native */).FormSwitch) : trailing;
|
||||
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
|
||||
const formRowProps = {disabled: disabled,
|
||||
leading: <ExpandedControlItemIcon iconSource={iconSource} showIconSparkle={showIconSparkle} />};
|
||||
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
|
||||
formRowProps.label = <FormLabel text={label} style={styles.formColor} />;
|
||||
formRowProps.onPress = onPress;
|
||||
formRowProps.trailing = r4;
|
||||
return <FormRow {...formRowProps} />;
|
||||
}
|
||||
|
||||
function StreamVolumeItem() { // fn#83115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:1394, offset: 0x01f0e161, size: 469 bytes, params: 1, frame: 29
|
||||
let value2 = undefined;
|
||||
const styles = useStyles();
|
||||
let value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore,
|
||||
AuthenticationStore], function() {
|
||||
var value2 = ApplicationStreamingStore.getLastActiveStream();
|
||||
var value3 = null;
|
||||
return value3 != value2 ? value2.ownerId === AuthenticationStore.getId() ? value3 : value2 : value3;
|
||||
});
|
||||
const defaultImport = importDefault(10268) /* metro dependency 10268: useMuteAwareLocalVolume */;
|
||||
const value4 = null;
|
||||
const ownerId = value4 == value3 ? value2 : value3.ownerId;
|
||||
const STREAM = MediaEngineContextTypes.STREAM;
|
||||
const {effectiveVolume, handleVolumeChange} = defaultImport(ownerId, STREAM);
|
||||
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
||||
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formLabel = <FormLabel text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pEAl4b)} style={[styles.formColor,
|
||||
{marginBottom: 16}]} />;
|
||||
const VolumeSlider = importDefault(10272) /* metro dependency 10272: VolumeSlider */;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
const r14 = platformUtilsModule.isAndroid() ? function() {
|
||||
return true;
|
||||
} : value2;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
const PRIMARY_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_300;
|
||||
if (value4 != value3) {
|
||||
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
|
||||
return (
|
||||
<FormRow
|
||||
label={<>{formLabel}<VolumeSlider onResponderGrant={r14} value={effectiveVolume} onValueChange={handleVolumeChange} color={WHITE} maxTrackTintColor={PRIMARY_300} /></>}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return value4;
|
||||
}
|
||||
}
|
||||
|
||||
function AudioRouteButton_83118({channelId, isConnectedToVoiceChannel}) { // fn#83118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2020, offset: 0x01f0e336, size: 150 bytes, params: 2, frame: 18
|
||||
const callsUtilsModule = require(9228) /* metro dependency 9228: CallsUtils */;
|
||||
const useMaskedSpeakerStates = callsUtilsModule.useMaskedSpeakerStates;
|
||||
const object2 = {onPress: onPress_83119, iconSource: Reflect.apply(useMaskedSpeakerStates, callsUtilsModule,
|
||||
[]).routeSource};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['A/Ly/2']);
|
||||
return <ExpandedControlItem {...object2} />;
|
||||
}
|
||||
|
||||
function ScreenshareButton_83120({channel, disabled}) { // fn#83120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2308, offset: 0x01f0e3fe, size: 109 bytes, params: 2, frame: 19
|
||||
const {onPress, imgSource, text,
|
||||
isFeatureEnabled} = (importDefault(10794) /* metro dependency 10794: useScreenshareUtils */)(channel);
|
||||
return (
|
||||
<ExpandedControlItem
|
||||
disabled={isFeatureEnabled ? disabled : !isFeatureEnabled}
|
||||
onPress={onPress}
|
||||
iconSource={imgSource}
|
||||
label={text}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function DeafenButton({channel, disabled}) { // fn#83121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2503, offset: 0x01f0e46b, size: 205 bytes, params: 2, frame: 18
|
||||
disabled = !(disabled === undefined) && disabled;
|
||||
const {deaf, onPress} = require(dependencyMap[21]).createDeafHandler(importDefault(dependencyMap[20])(channel));
|
||||
const defaultImport = importDefault(deaf ? dependencyMap[22] : dependencyMap[23]);
|
||||
const intl = require(dependencyMap[14]).intl;
|
||||
return (
|
||||
<ExpandedControlItem
|
||||
disabled={disabled}
|
||||
onPress={onPress}
|
||||
iconSource={defaultImport}
|
||||
label={intl.string(require(dependencyMap[14]).t.wjcRFX)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function AudioRouteButton_83118OnPress() { // fn#83119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2179, owner: AudioRouteButton_83118.onPress, offset: 0x01f0e3cc, size: 50 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(9239) /* metro dependency 9239: showAudioOutputSelector */;
|
||||
value.showAudioOutputSelector(channelId, isConnectedToVoiceChannel);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
/* Metro module 10848; source: modules/video_calls/native/components/GestureContainer.tsx; dependencies: [31, 27, 7715, 7722, 33, 4501, 697, 1478, 4017, 5321, 5080, 4504, 1305, 2] */
|
||||
function _fun83130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:6, offset: 0x01f0e7fc, size: 327 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(7715) /* metro dependency 7715: ChannelCallStore */).useChannelCallStore;
|
||||
let value = require(7722) /* metro dependency 7722: Constants */;
|
||||
const env0_5 = value.PAN_GESTURE_FAIL_OFFSET_Y;
|
||||
const env0_6 = value.SWIPE_TO_CHAT_ACTIVE_OFFSET;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{background: {flex: 1, backgroundColor: BLACK}}]);
|
||||
object = {code: 'function GestureContainerTsx1({velocityY:velocityY}){const{position,THRESHOLD_VELOCITY,runOnJS,ModalActionCreators,withTiming,DECELERATED_EASING}=this.__closure;if(position.get()===1||velocityY>THRESHOLD_VELOCITY){runOnJS(ModalActionCreators.pop)();}else{position.set(withTiming(0,{duration:300,easing:DECELERATED_EASING}));}}'};
|
||||
object = {code: 'function GestureContainerTsx2({translationY:translationY}){const{THRESHOLD_TRANSLATE,position}=this.__closure;const boundedGestureY=Math.max(Math.min(translationY,THRESHOLD_TRANSLATE),0)/THRESHOLD_TRANSLATE;const easeOutCubic=1-Math.pow(1-boundedGestureY,3);position.set(easeOutCubic);}'};
|
||||
object = {code: 'function GestureContainerTsx3(){const{interpolate,position,height}=this.__closure;return{flex:1,transform:[{translateY:interpolate(position.get(),[0,1],[0,height*0.06])},{scale:interpolate(position.get(),[0,1],[1,0.9])}]};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/GestureContainer.tsx');
|
||||
exports.default = GestureContainer;
|
||||
}
|
||||
|
||||
function GestureContainer({children}) { // fn#83131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:1292, offset: 0x01f0e943, size: 600 bytes, params: 2, frame: 26
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const value2 = useChannelCallStore(function(a0) {
|
||||
return a0.isGestureEnabled;
|
||||
});
|
||||
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value5 = Gesture.Pan().enabled(value2);
|
||||
const onUpdate = value5.onUpdate;
|
||||
let closure = GestureContainerS;
|
||||
closure.__closure = {THRESHOLD_TRANSLATE: 200, position: value3};
|
||||
closure.__workletHash = 9476726087456;
|
||||
closure.__initData = env0_10;
|
||||
const value6 = Reflect.apply(onUpdate, value5, [closure]);
|
||||
const onEnd = value6.onEnd;
|
||||
closure = GestureContainerH;
|
||||
object2 = {position: value3, THRESHOLD_VELOCITY: 500};
|
||||
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
const DECELERATED_EASING = (require(1305) /* metro dependency 1305: native */).DECELERATED_EASING;
|
||||
object2.DECELERATED_EASING = DECELERATED_EASING;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 10736744030668;
|
||||
closure.__initData = env0_9;
|
||||
const value11 = Reflect.apply(onEnd, value6, [closure]).activeOffsetY([-PAN_GESTURE_FAIL_OFFSET_Y,
|
||||
PAN_GESTURE_FAIL_OFFSET_Y]).failOffsetX([-SWIPE_TO_CHAT_ACTIVE_OFFSET, SWIPE_TO_CHAT_ACTIVE_OFFSET]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
closure = GestureContainerP;
|
||||
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, position: value3, height: height};
|
||||
closure.__workletHash = 16049033434372;
|
||||
closure.__initData = env0_11;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={styles.background}>
|
||||
<GestureDetector gesture={value11}>
|
||||
<View2 style={value12}>
|
||||
{children}
|
||||
</View2>
|
||||
</GestureDetector>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GestureContainerS({translationY}) { // fn#83133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:1471, owner: GestureContainer.S, offset: 0x01f0eba6, size: 107 bytes, params: 2, frame: 16
|
||||
let Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
let value = Math2.min(translationY, 200);
|
||||
value = Reflect.apply(max, Math, [value, 0]) / 200;
|
||||
Math = global.Math;
|
||||
value = 1 - Math.pow(1 - value, 3);
|
||||
env0_1.set(value);
|
||||
}
|
||||
|
||||
function GestureContainerH({velocityY}) { // fn#83134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:1673, owner: GestureContainer.h, offset: 0x01f0ec11, size: 196 bytes, params: 2, frame: 18
|
||||
var set;
|
||||
var withTiming;
|
||||
var object2;
|
||||
var moduleValue;
|
||||
var value;
|
||||
let binding = env0_1;
|
||||
if (binding.get() === 1) {
|
||||
value = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop)();
|
||||
} else if (velocityY > 500) {
|
||||
value = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop)();
|
||||
} else {
|
||||
binding = env0_1;
|
||||
set = binding.set;
|
||||
value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
withTiming = value.withTiming;
|
||||
object2 = {duration: 300};
|
||||
object2.easing = (require(1305) /* metro dependency 1305: native */).DECELERATED_EASING;
|
||||
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [0, object2])]);
|
||||
}
|
||||
}
|
||||
|
||||
function GestureContainerP() { // fn#83135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:2130, owner: GestureContainer.p, offset: 0x01f0ecd5, size: 188 bytes, params: 1, frame: 22
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
const binding = env0_1;
|
||||
const items2 = [{translateY: Reflect.apply(interpolate, value, [binding.get(), [0, 1], [0, 0.06 * height]])}];
|
||||
const object = {};
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
object.scale = value.interpolate(binding.get(), [0, 1], [1, 0.9]);
|
||||
items2[1] = object;
|
||||
return {flex: 1, transform: items2};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Metro module 15553; source: modules/video_calls/native/components/HideSelfStreamAndVideoConfirmDialog.tsx; dependencies: [31, 27, 15552, 33, 4501, 1244, 4596, 4573, 7896, 2] */
|
||||
function _fun119058(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15750:6, offset: 0x024fb054, size: 276 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(15552) /* metro dependency 15552: HideSelfStreamAndVideoConstants */).SelfStreamAndVideoAlertType;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {padding: 16},
|
||||
body: {paddingTop: 16}, description: {lineHeight: 18}, ctaLink: {'paddingTop': 8, 'textAlign': 'center',
|
||||
'textDecorationLine': 'underline'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/HideSelfStreamAndVideoConfirmDialog.tsx');
|
||||
exports.default = HideSelfStreamAndVideoConfirmDialog;
|
||||
}
|
||||
|
||||
function HideSelfStreamAndVideoConfirmDialog(a0) { // fn#119059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15750:474, offset: 0x024fb168, size: 767 bytes, params: 2, frame: 29
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const type = a0.type;
|
||||
const onConfirm = a0.onConfirm;
|
||||
let value = Object.create(null);
|
||||
value.type = 0;
|
||||
value.onConfirm = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const value4 = undefined;
|
||||
const styles = useStyles();
|
||||
let STREAM = SelfStreamAndVideoAlertType.STREAM;
|
||||
const r10 = type === STREAM ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/lFMWr']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xzxhZS);
|
||||
STREAM = SelfStreamAndVideoAlertType.STREAM;
|
||||
const r16 = type === STREAM ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xaOX7d) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oU1p9O);
|
||||
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
||||
const defaultImportProps = {...value2};
|
||||
defaultImportProps['title'] = r10;
|
||||
defaultImportProps['style'] = styles.wrapper;
|
||||
defaultImportProps['cancelText'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
|
||||
defaultImportProps['onCancel'] = value2 == null ? value4 : value2.onClose;
|
||||
defaultImportProps['confirmText'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cY+Oob']);
|
||||
defaultImportProps['onConfirm'] = onConfirm;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
value = <Text style={styles.description} variant="text-sm/medium">{r16}</Text>;
|
||||
value = <View style={styles.body}>{value}<Text accessibilityRole="link" style={[styles.ctaLink,
|
||||
styles.description]} onPress={onPress_119060} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JdIQ/Y'])}</Text></View>;
|
||||
return (
|
||||
<Alert {...defaultImportProps}>
|
||||
{value}
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
|
||||
function HideSelfStreamAndVideoConfirmDialogOnPress() { // fn#119060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15750:1131, owner: HideSelfStreamAndVideoConfirmDialog.onPress, offset: 0x024fb467, size: 58 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(7896) /* metro dependency 7896: UserSettingsActionCreators */).updatedUnsyncedSettings({disableHideSelfStreamAndVideoConfirmationAlert: true});
|
||||
onConfirm();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/* Metro module 10892; source: modules/video_calls/native/components/ParticipantTitle.tsx; dependencies: [31, 33, 4501, 697, 1305, 10875, 2] */
|
||||
function _fun83411(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11078:6, offset: 0x01f1925c, size: 208 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{usernameText: {fontSize: 14, color: WHITE}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ParticipantTitle.tsx');
|
||||
exports.default = ParticipantTitle;
|
||||
}
|
||||
|
||||
function ParticipantTitle({channel, participant, style}) { // fn#83412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11078:300, offset: 0x01f1932c, size: 128 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
||||
const usernameText = styles.usernameText;
|
||||
return (
|
||||
<LegacyText style={[usernameText, style]} numberOfLines={1}>
|
||||
{(importDefault(10875) /* metro dependency 10875: getParticipantTitle */)(channel, participant)}
|
||||
</LegacyText>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
/* Metro module 7732; source: modules/video_calls/native/components/PictureInPicture.tsx; dependencies: [57, 31, 27, 7715, 661, 33, 4501, 1305, 7733, 1478, 5463, 7736, 4017, 4577, 7737, 7738, 5321, 477, 2] */
|
||||
function _fun61896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:6, offset: 0x01b4d4a7, size: 447 bytes, params: 8, frame: 25
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = (require(7715) /* metro dependency 7715: ChannelCallStore */).toggleFocus;
|
||||
const PictureInPicturePositions = (require(661) /* metro dependency 661: Constants */).PictureInPicturePositions;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {};
|
||||
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
||||
object5['alignItems'] = 'baseline';
|
||||
object4.pipOuterContainer = object5;
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['alignItems'] = 'baseline';
|
||||
object4.pipInnerContainer = object6;
|
||||
const nativeModule = require(1305) /* metro dependency 1305: native */;
|
||||
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
|
||||
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = nativeModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
|
||||
object4.elevationShadow = Reflect.apply(generateBoxShadowStyle, nativeModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
const closure = function(a0) {
|
||||
return {'mass': 0.2, 'damping': 7.5, 'stiffness': 100, 'restDisplacementThreshold': 0.1,
|
||||
'restSpeedThreshold': 0.1,
|
||||
'overshootClamping': true, velocity: a0};
|
||||
};
|
||||
closure.__closure = {};
|
||||
closure.__workletHash = 14089987184261;
|
||||
closure.__initData = {code: 'function PictureInPictureTsx1(velocity){return{mass:0.2,damping:7.5,stiffness:100,restDisplacementThreshold:0.1,restSpeedThreshold:0.1,overshootClamping:true,velocity:velocity};}'};
|
||||
const TOP_LEFT = PictureInPicturePositions.TOP_LEFT;
|
||||
object4 = {code: 'function PictureInPictureTsx2(){const{insets,withSpring,getSpringAnimationConfig}=this.__closure;return{marginTop:insets.top,marginBottom:withSpring(insets.bottom,getSpringAnimationConfig())};}'};
|
||||
value = value.memo(_fun61898);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/PictureInPicture.tsx');
|
||||
exports.default = value;
|
||||
exports.DEFAULT_PIP_POSITION = TOP_LEFT;
|
||||
}
|
||||
|
||||
function _fun61898({children, style, preferredPosition, channel}) { // fn#61898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:1095, offset: 0x01b4d67e, size: 779 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
if (preferredPosition === undefined) {
|
||||
PictureInPicturePositions.TOP_LEFT;
|
||||
}
|
||||
const styles = useStyles();
|
||||
const value4 = (require(7733) /* metro dependency 7733: useShouldForcePipOrientation */).useShouldForcePipOrientation({channel: channel});
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
const value6 = (importDefault(7736) /* metro dependency 7736: usePipDimensions */)({channelId: channel.id,
|
||||
forcedOrientation: value4});
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const value8 = env0_3(Reflect.apply(useState, binding, [{'x': 0, 'y': 0, 'width': null, 'height': null, 'pageX': 0,
|
||||
'pageY': 0, width: width, height: height}]), 2);
|
||||
const property = value8[0];
|
||||
const env0_1 = value8[1];
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = function() {
|
||||
var object = {};
|
||||
object.marginTop = insets.top;
|
||||
object.marginBottom = require(dependencyMap[13]).withSpring(insets.bottom, t_61897());
|
||||
return object;
|
||||
};
|
||||
object2 = {insets: insets};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.getSpringAnimationConfig = t_61897;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 16677290574613;
|
||||
closure.__initData = env0_11;
|
||||
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const value10 = (require(7737) /* metro dependency 7737: useIsViewingActivity */).useIsViewingActivity({channelId: channel.id});
|
||||
const {gesture,
|
||||
draggableGridItemStyles} = (require(7738) /* metro dependency 7738: useDraggablePip */).useDraggablePip({width: value6.width,
|
||||
height: value6.height, containerWidth: property.width, containerHeight: property.height,
|
||||
snapToCorners: !value10, onPress: value10 ? toggleFocus : undefined});
|
||||
const value12 = env0_4.useRef(null);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items3 = [styles.pipOuterContainer, value9, style];
|
||||
const viewBindingProps = {ref: value12, style: styles.pipInnerContainer, pointerEvents: 'box-none',
|
||||
onLayout: onLayout};
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [draggableGridItemStyles];
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
items2[1] = platformUtilsModule.isIOS() ? styles.elevationShadow : undefined;
|
||||
return (
|
||||
<View2 style={items3} pointerEvents="box-none">
|
||||
<View {...viewBindingProps}>
|
||||
<GestureDetector gesture={gesture}>
|
||||
<View3 style={items2}>
|
||||
<View>
|
||||
{children}
|
||||
</View>
|
||||
</View3>
|
||||
</GestureDetector>
|
||||
</View>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function onLayout() { // fn#61900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:2095, offset: 0x01b4d9d6, size: 49 bytes, params: 1, frame: 11
|
||||
if (env0_2.current != null) {
|
||||
env0_2.current.measure(_fun61901);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun61901(a0, a1, a2, a3, a4, a5) { // fn#61901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:2136, offset: 0x01b4da07, size: 62 bytes, params: 7, frame: 11
|
||||
env1_1({x: a0, y: a1, width: a2, height: a3, pageX: a4, pageY: a5});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,247 @@
|
||||
/* Metro module 15262; source: modules/video_calls/native/components/PictureInPictureGlobal.tsx; dependencies: [57, 31, 27, 1378, 4606, 7729, 1226, 4259, 661, 4299, 33, 4501, 1305, 697, 7734, 566, 4610, 7724, 7709, 7733, 8750, 7736, 7717, 10666, 10670, 10677, 10693, 10700, 8111, 10667, 7732, 10915, 4017, 4504, 5314, 15263, 1585, 2] */
|
||||
function _fun116691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:6, offset: 0x024936e9, size: 604 bytes, params: 8, frame: 24
|
||||
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 value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = value2.StyleSheet;
|
||||
const env0_7 = value2.TouchableOpacity;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const env0_10 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).useBestActiveChatInputContainerHeight;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const env0_13 = (require(661) /* metro dependency 661: Constants */).PictureInPicturePositions;
|
||||
const env0_14 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_15 = value3.jsx;
|
||||
const env0_16 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {container: {'flex': 1, 'marginLeft': 12, 'marginRight': 12}};
|
||||
const nativeModule = require(1305) /* metro dependency 1305: native */;
|
||||
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
|
||||
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = nativeModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
|
||||
object4.elevationShadow = Reflect.apply(generateBoxShadowStyle, nativeModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
|
||||
const object5 = {};
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object5.overflow = 'hidden';
|
||||
object4.pip = object5;
|
||||
const object6 = {};
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object6.backgroundColor = BLACK;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object6.overflow = 'hidden';
|
||||
object4.background = object6;
|
||||
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
const env0_18 = value.memo(_fun116692);
|
||||
const env0_19 = value.memo(_fun116701);
|
||||
object4 = {code: 'function PictureInPictureGlobalTsx1(){const{withTiming,drawerState,STANDARD_EASING}=this.__closure;return withTiming(drawerState,{easing:STANDARD_EASING,duration:250});}'};
|
||||
object4 = {code: 'function PictureInPictureGlobalTsx2(){const{interpolate,animatedDrawerState,NAV_BAR_HEIGHT,PADDING,chatInputContainerHeight,PIP_AVOIDANCE_TAB_BAR_HEIGHT}=this.__closure;return{marginTop:interpolate(animatedDrawerState.get(),[0,1],[NAV_BAR_HEIGHT+PADDING,PADDING]),marginBottom:interpolate(animatedDrawerState.get(),[0,1],[chatInputContainerHeight+PADDING,PIP_AVOIDANCE_TAB_BAR_HEIGHT+PADDING])};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/PictureInPictureGlobal.tsx');
|
||||
exports.default = PictureInPictureGlobal;
|
||||
}
|
||||
|
||||
function _fun116692({channel}) { // fn#116692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:684, offset: 0x02493945, size: 1263 bytes, params: 2, frame: 33
|
||||
const env0_4 = undefined;
|
||||
const styles = useStyles();
|
||||
let value3 = (importDefault(7734) /* metro dependency 7734: usePipVideoOrStream */)(channel.id);
|
||||
let value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
|
||||
AuthenticationStore], _fun116693);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
|
||||
EmbeddedActivitiesStore], _fun116695);
|
||||
const value6 = (importDefault(7724) /* metro dependency 7724: useIsActivityFocused */)(channel.id);
|
||||
let r4 = value3 == null || value3.user.id === AuthenticationStore.getId() ? value5 : value3;
|
||||
r4 = value6 ? value5 : r4;
|
||||
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], _fun116696,
|
||||
[r4]);
|
||||
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
|
||||
AuthenticationStore], function() {
|
||||
var value3 = ChannelRTCStore.getParticipant(channel.id, AuthenticationStore.getId());
|
||||
var value4 = null;
|
||||
return value4 != value3 ? value3.type !== ParticipantTypes.USER ? value4 : value4 != value3.streamId ? value3 : value4 : value4;
|
||||
});
|
||||
const binding = env0_4;
|
||||
const value10 = binding.useCallback(_fun116698, [channel]);
|
||||
const value11 = (require(7733) /* metro dependency 7733: useShouldForcePipOrientation */).useShouldForcePipOrientation({channel: channel});
|
||||
const value12 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
|
||||
const value13 = (importDefault(7736) /* metro dependency 7736: usePipDimensions */)({channelId: channel.id,
|
||||
forcedOrientation: value11});
|
||||
const value14 = binding.useMemo(_fun116699, [value11, value12, value13.height, value13.width]);
|
||||
let type = r4?.type;
|
||||
const ACTIVITY = ParticipantTypes.ACTIVITY;
|
||||
const r16 = type === ACTIVITY && (importDefault(10666) /* metro dependency 10666: isWatchTogetherApplication */)(r4.applicationId) && value4 == null;
|
||||
type = r4?.type;
|
||||
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
|
||||
const r10 = HIDDEN_STREAM === type || ParticipantTypes.STREAM === type ? ((Component) => <Component resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.CONTAIN} participant={r4} onSingleTap={value10} onDoubleTap={value10} />)(importDefault(10670) /* metro dependency 10670: StreamTile */) : ParticipantTypes.USER === type ? value8 ? null : ((Component) => <Component participant={r4} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={value10} onDoubleTap={value10} />)(importDefault(10693) /* metro dependency 10693: UserTile */) : ParticipantTypes.ACTIVITY !== type ? null : ((Component) => <Component participant={r4} channel={channel} onSingleTap={onSingleTap_116700} />)(importDefault(10700) /* metro dependency 10700: ActivityTile */);
|
||||
const items2 = [styles.pip];
|
||||
items2[1] = styles.elevationShadow;
|
||||
items2[2] = value14;
|
||||
const items3 = [value9 != null && !r16 && ((Component) => <Component participant={value9} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={value10} />)(importDefault(10693) /* metro dependency 10693: UserTile */)];
|
||||
items3[1] = value4 != null && !r16 && ((Component) => <Component onSingleTap={value10} />)(importDefault(10667) /* metro dependency 10667: ScreenshareTile */);
|
||||
let r9 = value9 == null || value4 == null;
|
||||
r9 = (!r9 ? value5 == null : r9) && r10;
|
||||
items3[2] = r9;
|
||||
return (
|
||||
<View style={styles.background}>
|
||||
<TouchableOpacity activeOpacity={0.7}>
|
||||
<View style={items2}>
|
||||
{items3}
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116701({channel}) { // fn#116701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:2628, offset: 0x0249406e, size: 130 bytes, params: 2, frame: 18
|
||||
const value3 = env0_3(env0_4.useState(function() {
|
||||
return PictureInPicturePositions.TOP_RIGHT;
|
||||
}), 2);
|
||||
return ((Component) => <Component channel={channel} preferredPosition={value3[0]} onMove={value3[1]}>{((Component) => <Component channel={channel} />)(env0_18)}</Component>)(importDefault(7732) /* metro dependency 7732: PictureInPicture */);
|
||||
}
|
||||
|
||||
function PictureInPictureGlobal({channel}) { // fn#116703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:3496, offset: 0x024940ff, size: 529 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const r12 = (require(10915) /* metro dependency 10915: isChannelFocusedNative */).useIsChannelFocused() ? 0 : 1;
|
||||
const value5 = useBestActiveChatInputContainerHeight();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
let closure = PictureInPictureGlobalN;
|
||||
let object2 = {};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.drawerState = r12;
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object2.STANDARD_EASING = STANDARD_EASING;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 5168896066356;
|
||||
closure.__initData = env0_20;
|
||||
const value6 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
|
||||
closure = PictureInPictureGlobalO;
|
||||
object2 = {interpolate: reanimatedRexportModule.interpolate, animatedDrawerState: value6};
|
||||
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
||||
object2.NAV_BAR_HEIGHT = NAV_BAR_HEIGHT;
|
||||
object2.PADDING = 12;
|
||||
object2.chatInputContainerHeight = value5;
|
||||
const PIP_AVOIDANCE_TAB_BAR_HEIGHT = (require(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */).PIP_AVOIDANCE_TAB_BAR_HEIGHT;
|
||||
object2.PIP_AVOIDANCE_TAB_BAR_HEIGHT = PIP_AVOIDANCE_TAB_BAR_HEIGHT;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 8833756900366;
|
||||
closure.__initData = env0_21;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
|
||||
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const items2 = [StyleSheet.absoluteFill];
|
||||
items2[1] = {paddingLeft: left, paddingRight: right};
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View style={items2} pointerEvents="box-none">
|
||||
<View2 style={[styles.container, value7]} pointerEvents="box-none">
|
||||
{((Component) => <Component channel={channel} />)(env0_19)}
|
||||
</View2>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116693() { // fn#116693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:770, offset: 0x02493e34, size: 52 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const getStreamParticipants = ChannelRTCStore.getStreamParticipants;
|
||||
return Reflect.apply(getStreamParticipants, ChannelRTCStore, [channel.id]).find(function(a0) {
|
||||
return a0.user.id === AuthenticationStore.getId();
|
||||
});
|
||||
}
|
||||
|
||||
function _fun116695() { // fn#116695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:876, offset: 0x02493e8c, size: 111 bytes, params: 1, frame: 18
|
||||
var r0;
|
||||
var getParticipant;
|
||||
var id;
|
||||
let value = environment.__proto__;
|
||||
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
|
||||
const value3 = null;
|
||||
if (value3 != currentEmbeddedActivity) {
|
||||
getParticipant = ChannelRTCStore.getParticipant;
|
||||
id = channel.id;
|
||||
value = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
|
||||
value = Reflect.apply(getParticipant, ChannelRTCStore, [id,
|
||||
value.getEmbeddedActivityParticipantId({applicationId: currentEmbeddedActivity.applicationId,
|
||||
instanceId: currentEmbeddedActivity.compositeInstanceId})]);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value3;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun116696() { // fn#116696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:1169, offset: 0x02493efb, size: 45 bytes, params: 1, frame: 12
|
||||
return env0_1 != null && MediaEngineStore.isLocalVideoDisabled(env0_1.id);
|
||||
}
|
||||
|
||||
function _fun116698() { // fn#116698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:1375, offset: 0x02493f89, size: 50 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
|
||||
value.openGuildVoiceModal(channel, 'PIP');
|
||||
}
|
||||
|
||||
function _fun116699() { // fn#116699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:1595, offset: 0x02493fbb, size: 87 bytes, params: 1, frame: 13
|
||||
var r1;
|
||||
var binding;
|
||||
var LANDSCAPE;
|
||||
const object2 = {};
|
||||
var value;
|
||||
object2.height = height;
|
||||
object2.width = width;
|
||||
if (env0_4) {
|
||||
r1 = 'row';
|
||||
} else {
|
||||
binding = env0_3;
|
||||
value = environment.__proto__;
|
||||
LANDSCAPE = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType.LANDSCAPE;
|
||||
value = 'column';
|
||||
r1 = binding !== LANDSCAPE ? value : 'row';
|
||||
}
|
||||
object2.flexDirection = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function onSingleTap_116700() { // fn#116700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:2179, offset: 0x02494012, size: 92 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
|
||||
if (currentEmbeddedActivity != null) {
|
||||
(importDefault(8111) /* metro dependency 8111: transitionToActivityNative */)(channel.guild_id,
|
||||
currentEmbeddedActivity?.location);
|
||||
}
|
||||
env0_2();
|
||||
}
|
||||
|
||||
function PictureInPictureGlobalN() { // fn#116704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:3629, owner: PictureInPictureGlobal.n, offset: 0x02494310, size: 77 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = value.withTiming;
|
||||
const binding = env0_0;
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
return Reflect.apply(withTiming, value, [binding, {easing: STANDARD_EASING, duration: 250}]);
|
||||
}
|
||||
|
||||
function PictureInPictureGlobalO() { // fn#116705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:3898, owner: PictureInPictureGlobal.o, offset: 0x0249435d, size: 200 bytes, params: 1, frame: 22
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let interpolate = value.interpolate;
|
||||
const value3 = env0_2.get();
|
||||
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
||||
object2.marginTop = Reflect.apply(interpolate, value, [value3, [0, 1], [NAV_BAR_HEIGHT + 12, 12]]);
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
interpolate = value.interpolate;
|
||||
const value5 = env0_2.get();
|
||||
const items2 = [env0_1 + 12];
|
||||
const PIP_AVOIDANCE_TAB_BAR_HEIGHT = (require(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */).PIP_AVOIDANCE_TAB_BAR_HEIGHT;
|
||||
items2[1] = PIP_AVOIDANCE_TAB_BAR_HEIGHT + 12;
|
||||
object2.marginBottom = Reflect.apply(interpolate, value, [value5, [0, 1], items2]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,436 @@
|
||||
/* Metro module 10664; source: modules/video_calls/native/components/PictureInPictureVideo.tsx; dependencies: [57, 31, 27, 1378, 4606, 1226, 4259, 1934, 4607, 7730, 7715, 4299, 33, 4501, 1305, 697, 10665, 22, 7724, 10666, 566, 7712, 10667, 10670, 10677, 10692, 10693, 10700, 8111, 10719, 3860, 8372, 9149, 7737, 7733, 7736, 1478, 477, 7717, 2] */
|
||||
function _fun82024(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:6, offset: 0x01ee7977, size: 804 bytes, params: 8, frame: 25
|
||||
var object6;
|
||||
const env0_0 = require;
|
||||
const closure = areParticipantsEqual_82025;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.TouchableOpacity;
|
||||
const env0_5 = value2.View;
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const speakingStore = importDefault(4607) /* metro dependency 4607: SpeakingStore */;
|
||||
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
|
||||
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
|
||||
const env0_13 = channelCallStoreModule.togglePipFocus;
|
||||
const env0_14 = channelCallStoreModule.useIsVoiceChatFocused;
|
||||
const env0_15 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_16 = value4.jsx;
|
||||
const env0_17 = value4.Fragment;
|
||||
const env0_18 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object6 = {};
|
||||
const nativeModule = require(1305) /* metro dependency 1305: native */;
|
||||
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
|
||||
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = nativeModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
|
||||
object6.elevationShadow = Reflect.apply(generateBoxShadowStyle, nativeModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
|
||||
const object7 = {};
|
||||
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object7.backgroundColor = BLACK;
|
||||
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object7.overflow = 'hidden';
|
||||
object6.background = object7;
|
||||
const object8 = {};
|
||||
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object8.backgroundColor = BLACK;
|
||||
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object6.backgroundPipFab = object8;
|
||||
const object9 = {};
|
||||
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object9.overflow = 'hidden';
|
||||
object6.pip = object9;
|
||||
const object10 = {};
|
||||
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object10.overflow = 'hidden';
|
||||
object6.pipFab = object10;
|
||||
object6.avatarContainer = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
object6.activityPipContainer = {'flex': 1, 'width': '100%'};
|
||||
object6.thermalAlertIconContainer = {'width': 22, 'height': 22, 'backgroundColor': 'rgba(78, 80, 88, 0.48)',
|
||||
'borderRadius': 11, 'justifyContent': 'center', 'alignItems': 'center', 'position': 'absolute', 'top': 6,
|
||||
'left': 6};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object6.thermalAlertIcon = {'width': 14, 'height': 14, color: WHITE};
|
||||
const env0_19 = Reflect.apply(createStyles, createStylesModule, [object6]);
|
||||
const env0_20 = value.memo(_fun82026);
|
||||
const env0_21 = value.memo(_fun82032);
|
||||
value = value.memo(_fun82041);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/PictureInPictureVideo.tsx');
|
||||
exports.default = value;
|
||||
exports.areParticipantsEqual = closure;
|
||||
}
|
||||
|
||||
function areParticipantsEqual_82025(a0, a1) { // fn#82025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2575, offset: 0x01ee7c9b, size: 232 bytes, params: 3, frame: 14
|
||||
var r1;
|
||||
var r2;
|
||||
var r3;
|
||||
var r4;
|
||||
var r5;
|
||||
var r8;
|
||||
var item3;
|
||||
var value3;
|
||||
var item4;
|
||||
var value4;
|
||||
var item6;
|
||||
var value6;
|
||||
var item7;
|
||||
var value7;
|
||||
let iterator = a0[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
const value = undefined;
|
||||
let item2 = Reflect.apply(iterator2, iterator, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
const value2 = item2 === value;
|
||||
if (value2) {
|
||||
}
|
||||
if (value2) {
|
||||
r1 = item2;
|
||||
r2 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
} else {
|
||||
r1 = item3;
|
||||
r2 = value3;
|
||||
}
|
||||
}
|
||||
if (r2) {
|
||||
r3 = value;
|
||||
} else {
|
||||
item4 = Reflect.apply(iterator2, r1, []);
|
||||
item = item4.value;
|
||||
item4 = item4.done ? undefined : r1;
|
||||
value4 = item4 === value;
|
||||
if (value4) {
|
||||
r1 = item4;
|
||||
r2 = value4;
|
||||
r3 = value;
|
||||
} else {
|
||||
r1 = item4;
|
||||
r2 = value4;
|
||||
r3 = item;
|
||||
}
|
||||
}
|
||||
if (!r2) {
|
||||
r1.return();
|
||||
}
|
||||
iterator = a1[Symbol.iterator]();
|
||||
const iterator3 = iterator.next;
|
||||
let item5 = Reflect.apply(iterator3, iterator, []);
|
||||
item = item5.value;
|
||||
item5 = item5.done ? undefined : iterator;
|
||||
const value5 = item5 === value;
|
||||
if (value5) {
|
||||
}
|
||||
if (value5) {
|
||||
r4 = item5;
|
||||
r5 = value5;
|
||||
} else {
|
||||
item6 = Reflect.apply(iterator3, item5, []);
|
||||
item = item6.value;
|
||||
item6 = item6.done ? undefined : item5;
|
||||
value6 = item6 === value;
|
||||
if (value6) {
|
||||
r4 = item6;
|
||||
r5 = value6;
|
||||
} else {
|
||||
r4 = item6;
|
||||
r5 = value6;
|
||||
}
|
||||
}
|
||||
if (r5) {
|
||||
r8 = value;
|
||||
} else {
|
||||
item7 = Reflect.apply(iterator3, r4, []);
|
||||
item = item7.value;
|
||||
item7 = item7.done ? undefined : r4;
|
||||
value7 = item7 === value;
|
||||
if (value7) {
|
||||
r4 = item7;
|
||||
r5 = value7;
|
||||
r8 = value;
|
||||
} else {
|
||||
r4 = item7;
|
||||
r5 = value7;
|
||||
r8 = item;
|
||||
}
|
||||
}
|
||||
if (!r5) {
|
||||
r4.return();
|
||||
}
|
||||
return r3 === r8;
|
||||
}
|
||||
|
||||
function _fun82026({channel, pipParticipant, selfParticipant}) { // fn#82026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1161, offset: 0x01ee7d83, size: 931 bytes, params: 2, frame: 27
|
||||
const env0_2 = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.openVoice ?? (importDefault(22) /* metro dependency 22 */).noop;
|
||||
const env0_3 = useIsVoiceChatFocused();
|
||||
const env0_4 = (importDefault(7724) /* metro dependency 7724: useIsActivityFocused */)(channel.id);
|
||||
let type = pipParticipant?.type;
|
||||
const ACTIVITY = ParticipantTypes.ACTIVITY;
|
||||
const r4 = type === ACTIVITY && (importDefault(10666) /* metro dependency 10666: isWatchTogetherApplication */)(pipParticipant?.applicationId);
|
||||
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], _fun82027,
|
||||
[pipParticipant]);
|
||||
const closure = onSingleTap_82028;
|
||||
const closure2 = onSingleTap_82029;
|
||||
type = pipParticipant?.type;
|
||||
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
|
||||
return (
|
||||
<>
|
||||
{selfParticipant == null || r4 ? null : ((Component) => <Component participant={selfParticipant} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={onSingleTap_82031} />)(importDefault(10693) /* metro dependency 10693: UserTile */)}
|
||||
{HIDDEN_STREAM === type || ParticipantTypes.STREAM === type ? pipParticipant.user.id === AuthenticationStore.getId() ? ((Component) => <Component onSingleTap={closure} onDoubleTap={closure} />)(importDefault(10667) /* metro dependency 10667: ScreenshareTile */) : ((Component) => <Component removeEmptyStateButton removeEmptyStateImage resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.CONTAIN} participant={pipParticipant} onSingleTap={closure2} onDoubleTap={closure2} />)(importDefault(10670) /* metro dependency 10670: StreamTile */) : ParticipantTypes.USER === type ? (importDefault(10692) /* metro dependency 10692: participantHasVideo */)(pipParticipant) ? value7 ? null : ((Component) => <Component participant={pipParticipant} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={closure2} onDoubleTap={closure2} />)(importDefault(10693) /* metro dependency 10693: UserTile */) : null : ParticipantTypes.ACTIVITY !== type ? null : ((Component) => <Component participant={pipParticipant} channel={channel} onSingleTap={onSingleTap} />)(importDefault(10700) /* metro dependency 10700: ActivityTile */)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82032({channel, selfParticipant}) { // fn#82032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2645, offset: 0x01ee82a2, size: 669 bytes, params: 2, frame: 26
|
||||
var Icon;
|
||||
var object;
|
||||
var thermalAlertIcon;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const value4 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[ChannelCallLifecycleStore], _fun82033]),
|
||||
2);
|
||||
const property = value4[0];
|
||||
const property2 = value4[1];
|
||||
const value5 = _fun82034({channelId: channel.id, selfParticipant: selfParticipant});
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const PRIMARY_800 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800;
|
||||
const value9 = (importDefault(8372) /* metro dependency 8372: useAvatarColor */)(value5 == null ? undefined : value5.user.getAvatarURL(channel.guild_id,
|
||||
80), Reflect.apply(useToken, useTokenModule, [PRIMARY_800]));
|
||||
if (value5 == null) {
|
||||
return null;
|
||||
}
|
||||
let r6 = value5.streamId != null && value5.voiceState?.selfVideo;
|
||||
const items3 = [styles.avatarContainer];
|
||||
items3[1] = {backgroundColor: value9};
|
||||
if (r6) {
|
||||
if (property2) {
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
r6 = <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48} channel={channel} guildId={channel.guild_id} user={value5.user} speaking={value5.speaking} />;
|
||||
} else {
|
||||
r6 = ((Component) => <Component participant={value5} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} />)(importDefault(10693) /* metro dependency 10693: UserTile */);
|
||||
}
|
||||
} else {
|
||||
const Avatar2 = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
r6 = <Avatar2 size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48} channel={channel} guildId={channel.guild_id} user={value5.user} speaking={value5.speaking} />;
|
||||
}
|
||||
const items2 = [r6];
|
||||
if (property) {
|
||||
var viewBinding2Props = {style: styles.thermalAlertIconContainer};
|
||||
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
object = {};
|
||||
thermalAlertIcon = styles.thermalAlertIcon;
|
||||
object.style = thermalAlertIcon;
|
||||
object.source = importDefault(9149) /* metro dependency 9149 */;
|
||||
thermalAlertIcon = styles.thermalAlertIcon;
|
||||
object.color = thermalAlertIcon.color;
|
||||
r6 = <View {...viewBinding2Props}><Icon {...object} /></View>;
|
||||
} else {
|
||||
r6 = null;
|
||||
}
|
||||
items2[1] = r6;
|
||||
return (
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82041({channel, pipParticipant, selfParticipant}) { // fn#82041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:4218, offset: 0x01ee87b2, size: 493 bytes, params: 2, frame: 32
|
||||
const styles = useStyles();
|
||||
const value3 = (require(7737) /* metro dependency 7737: useIsViewingActivity */).useIsViewingActivity({channelId: channel.id});
|
||||
const value4 = (require(7733) /* metro dependency 7733: useShouldForcePipOrientation */).useShouldForcePipOrientation({channel: channel});
|
||||
const value5 = (importDefault(7736) /* metro dependency 7736: usePipDimensions */)({channelId: channel.id,
|
||||
forcedOrientation: value4});
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const r4 = value3 ? styles.backgroundPipFab : styles.background;
|
||||
const items2 = [value3 ? styles.pipFab : styles.pip];
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
items2[1] = platformUtilsModule.isAndroid() ? styles.elevationShadow : undefined;
|
||||
const object = {};
|
||||
object.flexDirection = width > height ? 'row' : value4 !== (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType.LANDSCAPE ? 'column' : 'row';
|
||||
items2[2] = object;
|
||||
items2[3] = value5;
|
||||
return (
|
||||
<View style={r4}>
|
||||
<TouchableOpacity activeOpacity={0.7}>
|
||||
<View style={items2}>
|
||||
{value3 ? <View pointerEvents="none" style={styles.activityPipContainer}>{((Component) => <Component channel={channel} pipParticipant={pipParticipant} selfParticipant={selfParticipant} />)(env0_21)}</View> : ((Component) => <Component channel={channel} pipParticipant={pipParticipant} selfParticipant={selfParticipant} />)(env0_20)}
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82027() { // fn#82027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1463, offset: 0x01ee8126, size: 45 bytes, params: 1, frame: 12
|
||||
return pipParticipant != null && MediaEngineStore.isLocalVideoDisabled(pipParticipant.id);
|
||||
}
|
||||
|
||||
function onDoubleTap() { // fn#82028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1528, offset: 0x01ee8153, size: 113 bytes, params: 1, frame: 17
|
||||
var id;
|
||||
var defaultImport;
|
||||
var selectParticipant;
|
||||
let value = environment.__proto__;
|
||||
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
|
||||
const value3 = null;
|
||||
if (value3 != voiceChannelId) {
|
||||
value = undefined;
|
||||
defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
||||
selectParticipant = defaultImport.selectParticipant;
|
||||
id = value3 == pipParticipant ? value : pipParticipant.id;
|
||||
Reflect.apply(selectParticipant, defaultImport, [voiceChannelId, value3 != id ? id : value3]);
|
||||
if (env0_3) {
|
||||
env0_2();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onDoubleTap_82029() { // fn#82029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1658, offset: 0x01ee81c4, size: 91 bytes, params: 1, frame: 13
|
||||
var defaultImport;
|
||||
if (env0_3) {
|
||||
env0_2();
|
||||
}
|
||||
if (env0_4) {
|
||||
defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
||||
defaultImport.selectParticipant(channel.id, null);
|
||||
} else {
|
||||
togglePipFocus();
|
||||
}
|
||||
}
|
||||
|
||||
function onSingleTap() { // fn#82030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2303, offset: 0x01ee821f, size: 92 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
|
||||
if (currentEmbeddedActivity != null) {
|
||||
(importDefault(8111) /* metro dependency 8111: transitionToActivityNative */)(channel.guild_id,
|
||||
currentEmbeddedActivity.location);
|
||||
}
|
||||
if (env0_3) {
|
||||
env0_2();
|
||||
}
|
||||
}
|
||||
|
||||
function onSingleTap_82031() { // fn#82031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2549, offset: 0x01ee827b, size: 39 bytes, params: 1, frame: 10
|
||||
if (env0_3) {
|
||||
env0_2();
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
togglePipFocus();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82033() { // fn#82033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2737, offset: 0x01ee853f, size: 41 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
const items2 = [ChannelCallLifecycleStore.consumedRequestToRespondToSeriousThermalState()];
|
||||
items2[1] = ChannelCallLifecycleStore.isReactingToThermalState();
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun82034({channelId, selfParticipant}) { // fn#82034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2850, offset: 0x01ee8568, size: 364 bytes, params: 2, frame: 26
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
let useStateFromStores = fluxModule.useStateFromStores;
|
||||
const value3 = Reflect.apply(useStateFromStores, fluxModule, [[ChannelCallLifecycleStore], function() {
|
||||
return ChannelCallLifecycleStore.isReactingToThermalState();
|
||||
}]);
|
||||
const moduleValue2 = fluxModule;
|
||||
useStateFromStores = moduleValue2.useStateFromStores;
|
||||
items2 = [ChannelRTCStore];
|
||||
const areParticipantsEqual_82025Binding = areParticipantsEqual_82025;
|
||||
const value5 = env1_3(Reflect.apply(useStateFromStores, moduleValue2, [items2, _fun82036, [channelId],
|
||||
areParticipantsEqual_82025Binding]), 2);
|
||||
const property = value5[0];
|
||||
const property2 = value5[1];
|
||||
const moduleValue3 = fluxModule;
|
||||
useStateFromStores = moduleValue3.useStateFromStores;
|
||||
if ((require(10719) /* metro dependency 10719: useLeadingEdgeDebounce */).useLeadingEdgeDebounce(Reflect.apply(useStateFromStores,
|
||||
moduleValue3, [[SpeakingStore], _fun82037, [selfParticipant]]), 1000) != null) {
|
||||
var value8 = property.find(_fun82039);
|
||||
if (value8 == null) {
|
||||
if (selfParticipant?.streamId != null) {
|
||||
return selfParticipant;
|
||||
}
|
||||
if (value3) {
|
||||
return selfParticipant;
|
||||
}
|
||||
items2 = [];
|
||||
arraySpread(items2, property2, 0, areParticipantsEqual_82025Binding);
|
||||
return items2.sort(function({lastSpoke}, a1) {
|
||||
return lastSpoke < a1.lastSpoke ? 1 : -1;
|
||||
})[0] ?? selfParticipant;
|
||||
}
|
||||
var type = value8.type;
|
||||
var USER = ParticipantTypes.USER;
|
||||
if (type === USER) {
|
||||
return value8;
|
||||
}
|
||||
}
|
||||
if (selfParticipant?.streamId != null) {
|
||||
return selfParticipant;
|
||||
}
|
||||
if (value3) {
|
||||
return selfParticipant;
|
||||
}
|
||||
items2 = [];
|
||||
arraySpread(items2, property2, 0, areParticipantsEqual_82025Binding);
|
||||
return items2.sort(function({lastSpoke}, a1) {
|
||||
return lastSpoke < a1.lastSpoke ? 1 : -1;
|
||||
})[0] ?? selfParticipant;
|
||||
}
|
||||
|
||||
function _fun82036() { // fn#82036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2995, offset: 0x01ee86e7, size: 65 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
const getParticipants = ChannelRTCStore.getParticipants;
|
||||
const channelIdBinding = channelId;
|
||||
const getVideoParticipants = ChannelRTCStore.getVideoParticipants;
|
||||
const getParticipantsVersion = ChannelRTCStore.getParticipantsVersion;
|
||||
return [Reflect.apply(getParticipants, ChannelRTCStore, [channelIdBinding]), Reflect.apply(getVideoParticipants,
|
||||
ChannelRTCStore, [channelIdBinding]), Reflect.apply(getParticipantsVersion, ChannelRTCStore,
|
||||
[channelIdBinding])];
|
||||
}
|
||||
|
||||
function _fun82037() { // fn#82037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:3161, offset: 0x01ee8728, size: 55 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
var r0;
|
||||
const selfParticipantBinding = selfParticipant;
|
||||
let value = null;
|
||||
if (value == selfParticipantBinding) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = SpeakingStore.getSpeakers();
|
||||
value = value.find(_fun82038);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun82038(a0) { // fn#82038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:3200, offset: 0x01ee875f, size: 47 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
const user = selfParticipant.user;
|
||||
value = a0 !== user.id;
|
||||
if (value) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
value = SpeakingStore.isSpeaking(a0);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
/* Metro module 10663; source: modules/video_calls/native/components/PopoutMenu.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 6746, 1305, 7972, 1478, 1585, 22, 4017, 4504, 4083, 5321, 2] */
|
||||
function _fun82001(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:6, offset: 0x01ee6ccf, size: 405 bytes, params: 8, frame: 24
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value2.jsx;
|
||||
const env0_7 = value2.jsxs;
|
||||
const env0_8 = value2.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object3 = {position: 'absolute'};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{container: object3, popoutMenuRow: {flex: 1},
|
||||
popoutMenuRowLabel: {width: '100%'}}]);
|
||||
object = {code: "function PopoutMenuTsx1(){const{withTiming,animateIn,STANDARD_EASING,ANIMATION_DURATION,runOnJS,handleClose,EXTRA_PADDING}=this.__closure;return{opacity:withTiming(animateIn?1:0,{easing:STANDARD_EASING,duration:ANIMATION_DURATION},'respect-motion-settings',function(finished){if(finished){runOnJS(handleClose)();}}),transform:[{translateY:withTiming(animateIn?-EXTRA_PADDING:0,{easing:STANDARD_EASING,duration:ANIMATION_DURATION})}]};}"};
|
||||
object = {code: 'function PopoutMenuTsx2(finished){const{runOnJS,handleClose}=this.__closure;if(finished){runOnJS(handleClose)();}}'};
|
||||
object = {code: 'function PopoutMenuTsx3(){const{runOnJS,handleLongPress}=this.__closure;runOnJS(handleLongPress)();}'};
|
||||
object = {code: 'function PopoutMenuTsx4(){const{runOnJS,_setClose}=this.__closure;runOnJS(_setClose)(true);}'};
|
||||
value = value.forwardRef(PopoutMenu);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/PopoutMenu.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function PopoutMenuRow({icon, text, onClick, onClose}) { // fn#82002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:370, offset: 0x01ee6e64, size: 241 bytes, params: 2, frame: 23
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const value2 = env0_4.useCallback(function() {
|
||||
if (onClick != null) {
|
||||
onClick();
|
||||
}
|
||||
if (onClose != null) {
|
||||
onClose();
|
||||
}
|
||||
}, [onClick, onClose]);
|
||||
const FormRow = importDefault(6746) /* metro dependency 6746: FormRow */;
|
||||
object2 = {leading: icon != null ? ((Icon) => <Icon source={icon} />)((require(1305) /* metro dependency 1305: native */).Icon) : null};
|
||||
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
|
||||
object2.label = <FormLabel style={styles.popoutMenuRowLabel} text={text} />;
|
||||
object2.style = styles.popoutMenuRow;
|
||||
object2.onPress = value2;
|
||||
return <FormRow {...object2} />;
|
||||
}
|
||||
|
||||
function PopoutMenu({disabled, title, trigger, rows, style, onOpen, onClose}, a1) { // fn#82004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:1473, offset: 0x01ee6f82, size: 1186 bytes, params: 3, frame: 40
|
||||
var object2;
|
||||
var r6;
|
||||
var r0;
|
||||
var jsxRuntimeEnv0_8Binding;
|
||||
var items2;
|
||||
var View2;
|
||||
var object4;
|
||||
var items3;
|
||||
const styles = useStyles();
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
const env0_3 = height;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const env0_4 = bottom;
|
||||
let binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value3 = Reflect.apply(useState, binding, [0]);
|
||||
binding = env0_3;
|
||||
const value4 = binding(value3, 2);
|
||||
const property = value4[0];
|
||||
const property2 = value4[1];
|
||||
const binding2 = env0_4;
|
||||
useState = binding2.useState;
|
||||
const value5 = binding(Reflect.apply(useState, binding2, [false]), 2);
|
||||
const property3 = value5[0];
|
||||
const property4 = value5[1];
|
||||
const binding3 = env0_4;
|
||||
useState = binding3.useState;
|
||||
const value6 = binding(Reflect.apply(useState, binding3, [false]), 2);
|
||||
const property5 = value6[0];
|
||||
const env0_9 = value6[1];
|
||||
const value8 = env0_4.useRef(null);
|
||||
const env0_10 = value8;
|
||||
const value9 = env0_4.useRef(null);
|
||||
const binding6 = env0_4;
|
||||
useState = binding6.useState;
|
||||
const value10 = binding(Reflect.apply(useState, binding6, [{'top': 0, 'left': 0, 'width': 0, 'height': 0}]), 2);
|
||||
const property6 = value10[0];
|
||||
const env0_13 = value10[1];
|
||||
const binding7 = env0_4;
|
||||
useState = binding7.useState;
|
||||
const value11 = binding(Reflect.apply(useState, binding7, [{'width': 0, 'height': 0}]), 2);
|
||||
const property7 = value11[0];
|
||||
const env0_15 = value11[1];
|
||||
env0_4.useEffect(_fun82005, [property5]);
|
||||
binding = env0_4;
|
||||
let useMemo = binding.useMemo;
|
||||
const {top, left} = Reflect.apply(useMemo, binding, [_fun82009, [property7, bottom, height, width, property6]]);
|
||||
env0_4.useImperativeHandle(a1, function() {
|
||||
return {close: _fun82011};
|
||||
}, [property4]);
|
||||
const env0_16 = env0_4.useMemo(_fun82012, [property2]);
|
||||
const r17 = property > 0 && !property3;
|
||||
const value15 = env0_4.useCallback(_fun82014, [property3, onClose]);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = PopoutMenuTe;
|
||||
object2 = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, animateIn: r17};
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object2.STANDARD_EASING = STANDARD_EASING;
|
||||
object2.ANIMATION_DURATION = 250;
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.handleClose = value15;
|
||||
object2.EXTRA_PADDING = 8;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 2727321893876;
|
||||
closure.__initData = env0_10;
|
||||
const value16 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const env0_19 = env0_4.useCallback(_fun82017, []);
|
||||
const value17 = env0_4.useCallback(_fun82018, [onOpen]);
|
||||
binding = env0_4;
|
||||
useMemo = binding.useMemo;
|
||||
if (disabled) {
|
||||
r0 = trigger;
|
||||
} else {
|
||||
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
items2 = [((GestureDetector) => <GestureDetector gesture={Reflect.apply(useMemo, binding, [_fun82019,
|
||||
[value17]])}><View ref={value8}>{trigger}</View></GestureDetector>)((require(5321) /* metro dependency 5321 */).GestureDetector)];
|
||||
if (property5) {
|
||||
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
var view2Props = {ref: value9, style: [styles.container, style, {left: left, top: top}, value16],
|
||||
onLayout: onLayout_82022};
|
||||
items3 = [title != null ? <PopoutMenuRow text={title} /> : null];
|
||||
items3[1] = title != null ? ((FormDivider) => <FormDivider />)((require(7972) /* metro dependency 7972: native */).FormDivider) : null;
|
||||
items3[2] = rows.map(_fun82023);
|
||||
r6 = <View2 {...view2Props}>{items3}</View2>;
|
||||
} else {
|
||||
r6 = null;
|
||||
}
|
||||
items2[1] = r6;
|
||||
r0 = <>{items2}</>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun82005() { // fn#82005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:1915, offset: 0x01ee7424, size: 121 bytes, params: 1, frame: 15
|
||||
var current;
|
||||
var r4;
|
||||
var value4;
|
||||
let r1 = env0_8 && env0_10?.current != null;
|
||||
if (r1) {
|
||||
value4 = env0_10 == null;
|
||||
if (value4) {
|
||||
r1 = value4;
|
||||
r4 = undefined;
|
||||
} else {
|
||||
current = env0_10.current;
|
||||
r1 = current == null;
|
||||
r4 = current;
|
||||
}
|
||||
if (!r1) {
|
||||
r4.measureInWindow(_fun82006);
|
||||
}
|
||||
global.setTimeout(_fun82007);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82009() { // fn#82009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2212, offset: 0x01ee753d, size: 154 bytes, params: 1, frame: 5
|
||||
const binding = env0_14;
|
||||
const value2 = -binding.height;
|
||||
const binding2 = env0_12;
|
||||
return {top: binding2.top + binding2.height + binding.height + 8 + bottom < height ? env0_12.height + 16 : value2,
|
||||
left: env0_12.left + env0_14.width + 8 > width ? env0_12.width - env0_14.width : 0};
|
||||
}
|
||||
|
||||
function _fun82010() { // fn#82010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2405, offset: 0x01ee75d7, size: 18 bytes, params: 1, frame: 2
|
||||
return {close: close_82011};
|
||||
}
|
||||
|
||||
function _fun82012() { // fn#82012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2458, offset: 0x01ee75e9, size: 51 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(22) /* metro dependency 22 */).debounce(_fun82013, 16);
|
||||
}
|
||||
|
||||
function _fun82014() { // fn#82014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2531, offset: 0x01ee761c, size: 35 bytes, params: 1, frame: 11
|
||||
if (env0_6) {
|
||||
onClose();
|
||||
env0_9(false);
|
||||
}
|
||||
}
|
||||
|
||||
function PopoutMenuTe() { // fn#82015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2594, owner: PopoutMenu.te, offset: 0x01ee763f, size: 276 bytes, params: 1, frame: 28
|
||||
const object4 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const value3 = 0;
|
||||
const r13 = env0_17 ? 1 : value3;
|
||||
const object5 = {};
|
||||
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
|
||||
object5.easing = STANDARD_EASING;
|
||||
object5.duration = 250;
|
||||
const closure = teN;
|
||||
const object6 = {};
|
||||
object6.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object6.handleClose = env0_18;
|
||||
closure.__closure = object6;
|
||||
closure.__workletHash = 7805688342878;
|
||||
closure.__initData = env1_11;
|
||||
object4.opacity = Reflect.apply(withTiming, timingModule, [r13, object5, 'respect-motion-settings', closure]);
|
||||
const moduleValue2 = timingModule;
|
||||
object4.transform = [{translateY: moduleValue2.withTiming(env0_17 ? -8 : value3, {easing: STANDARD_EASING,
|
||||
duration: 250})}];
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun82017() { // fn#82017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3218, offset: 0x01ee778b, size: 18 bytes, params: 1, frame: 11
|
||||
return env0_7(true);
|
||||
}
|
||||
|
||||
function _fun82018() { // fn#82018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3251, offset: 0x01ee779d, size: 75 bytes, params: 1, frame: 13
|
||||
env0_7(false);
|
||||
(require(4083) /* metro dependency 4083 */).trigger('impactHeavy');
|
||||
env0_9(true);
|
||||
onOpen();
|
||||
}
|
||||
|
||||
function _fun82019() { // fn#82019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3325, offset: 0x01ee77e8, size: 211 bytes, params: 1, frame: 20
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value2 = Gesture.LongPress();
|
||||
const onBegin = value2.onBegin;
|
||||
let closure = t_82020;
|
||||
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
closure.__closure = {runOnJS: runOnJS, _setClose: env0_7};
|
||||
closure.__workletHash = 15929711498886;
|
||||
closure.__initData = env1_13;
|
||||
const value4 = Reflect.apply(onBegin, value2, [closure]);
|
||||
const onStart = value4.onStart;
|
||||
closure = n_82021;
|
||||
closure.__closure = {runOnJS: runOnJS, handleLongPress: env0_20};
|
||||
closure.__workletHash = 1649917173815;
|
||||
closure.__initData = env1_12;
|
||||
return Reflect.apply(onStart, value4, [closure]);
|
||||
}
|
||||
|
||||
function PopoutMenuOnLayout({nativeEvent}) { // fn#82022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3858, owner: PopoutMenu.onLayout, offset: 0x01ee791e, size: 36 bytes, params: 2, frame: 11
|
||||
env0_16(nativeEvent.layout.height);
|
||||
}
|
||||
|
||||
function _fun82023(a0, a1) { // fn#82023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3990, offset: 0x01ee7942, size: 53 bytes, params: 3, frame: 15
|
||||
return (
|
||||
<PopoutMenuRow
|
||||
{...a0}
|
||||
{...{['onClose']: env0_19}}
|
||||
key={a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82006(a0, a1, a2, a3) { // fn#82006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2013, offset: 0x01ee749d, size: 67 bytes, params: 5, frame: 15
|
||||
const binding = env1_13;
|
||||
const object2 = {};
|
||||
const Math = global.Math;
|
||||
object2.top = Math.max(a1, 0);
|
||||
object2.left = a0;
|
||||
object2.width = a2;
|
||||
object2.height = a3;
|
||||
binding(object2);
|
||||
}
|
||||
|
||||
function _fun82007() { // fn#82007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2087, offset: 0x01ee74e0, size: 61 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var r1;
|
||||
var r3;
|
||||
var current;
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_11 == null;
|
||||
const value3 = undefined;
|
||||
if (value2) {
|
||||
r1 = value2;
|
||||
r3 = value3;
|
||||
} else {
|
||||
current = env1_11.current;
|
||||
r1 = current == null;
|
||||
r3 = current;
|
||||
}
|
||||
if (!r1) {
|
||||
r3.measureInWindow(_fun82008);
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function teN(a0) { // fn#82016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2722, owner: PopoutMenu.te.n, offset: 0x01ee7753, size: 56 bytes, params: 2, frame: 12
|
||||
var value;
|
||||
var runOnJS;
|
||||
var value2;
|
||||
if (a0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = value.runOnJS;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(runOnJS, value, [env1_18])();
|
||||
}
|
||||
}
|
||||
|
||||
function t_82020() { // fn#82020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3377, offset: 0x01ee78bb, size: 51 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value = value.runOnJS(env1_7);
|
||||
value(true);
|
||||
}
|
||||
|
||||
function n_82021() { // fn#82021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3525, offset: 0x01ee78ee, size: 48 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env1_20)();
|
||||
}
|
||||
|
||||
function _fun82008(a0, a1, a2, a3) { // fn#82008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2147, offset: 0x01ee751d, size: 32 bytes, params: 5, frame: 11
|
||||
env2_15({width: a2, height: a3});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/* Metro module 7723; source: modules/video_calls/native/components/RevealProvider.tsx; dependencies: [31, 3849, 4295, 7715, 33, 566, 7719, 7724, 477, 4048, 7725, 7727, 2] */
|
||||
function _fun61774(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:6, offset: 0x01b4a589, size: 276 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const closure = useRevealProviderValue;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
|
||||
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
|
||||
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
|
||||
const env0_6 = channelCallStoreModule.useChannelCallStore;
|
||||
const env0_7 = channelCallStoreModule.focusTimeout;
|
||||
const env0_8 = channelCallStoreModule.resetFocusTimer;
|
||||
const env0_9 = channelCallStoreModule.useIsVoiceChatFocused;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value3.jsx;
|
||||
const env0_11 = value3.jsxs;
|
||||
value = value.createContext({reveal: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/RevealProvider.tsx');
|
||||
exports.default = RevealProvider;
|
||||
exports.RevealContext = value;
|
||||
exports.useRevealProviderValue = closure;
|
||||
}
|
||||
|
||||
function useRevealProviderValue(a0, a1) { // fn#61775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:281, offset: 0x01b4a69d, size: 266 bytes, params: 3, frame: 23
|
||||
let value = a0;
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ActionSheetStore], _fun61776);
|
||||
const value4 = (importDefault(7719) /* metro dependency 7719: useIsPrivateAudioOnlyCall */)(a1);
|
||||
const value5 = useIsVoiceChatFocused();
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GameConsoleStore], _fun61777);
|
||||
const value7 = (importDefault(7724) /* metro dependency 7724: useIsActivityFocused */)(a1.id);
|
||||
let r5 = value || value3;
|
||||
r5 = !r5 ? value4 : r5;
|
||||
r5 = !r5 ? a1 === null : r5;
|
||||
r5 = !r5 ? value5 : r5;
|
||||
r5 = !r5 ? value6 : r5;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isIOS();
|
||||
return env0_3.useMemo(_fun61778, [r5, value ? value7 : !!value]);
|
||||
}
|
||||
|
||||
function RevealProvider({channel, children, showStatus, useThemedBarStyle}) { // fn#61779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:719, offset: 0x01b4a7f2, size: 328 bytes, params: 2, frame: 24
|
||||
showStatus = !(showStatus === undefined) && showStatus;
|
||||
useThemedBarStyle = !(useThemedBarStyle === undefined) && useThemedBarStyle;
|
||||
const value2 = useChannelCallStore(function(a0) {
|
||||
return a0.focus;
|
||||
});
|
||||
const value3 = useRevealProviderValue(value2, channel);
|
||||
const reveal = value3.reveal;
|
||||
const prefersDeferringSystemGestures = value3.prefersDeferringSystemGestures;
|
||||
env0_3.useEffect(_fun61781, [value2]);
|
||||
const value4 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
|
||||
const value5 = 'light-content';
|
||||
const r11 = useThemedBarStyle ? value4 === 'dark' ? value5 : 'dark-content' : value5;
|
||||
const Provider = env0_12.Provider;
|
||||
const StatusBarAndroid = importDefault(7725) /* metro dependency 7725: StatusBarAndroid */;
|
||||
const value7 = !reveal;
|
||||
return (
|
||||
<Provider value={value3}>
|
||||
<StatusBarAndroid
|
||||
hidden={reveal ? value7 : !showStatus}
|
||||
animated
|
||||
barStyle={r11}
|
||||
/>
|
||||
{children}
|
||||
{((Component) => <Component prefersHidden={reveal ? value7 : !prefersDeferringSystemGestures} prefersDeferringSystemGestures={prefersDeferringSystemGestures} />)(importDefault(7727) /* metro dependency 7727: HomeIndicator */)}
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun61776() { // fn#61776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:356, offset: 0x01b4a7a7, size: 25 bytes, params: 1, frame: 9
|
||||
const value = environment.__proto__;
|
||||
return ActionSheetStore.getKey() != null;
|
||||
}
|
||||
|
||||
function _fun61778() { // fn#61778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:560, offset: 0x01b4a7d9, size: 25 bytes, params: 1, frame: 3
|
||||
return {reveal: env0_0, prefersDeferringSystemGestures: env0_1};
|
||||
}
|
||||
|
||||
function _fun61781() { // fn#61781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:917, offset: 0x01b4a93a, size: 43 bytes, params: 1, frame: 10
|
||||
if (env0_0) {
|
||||
resetFocusTimer();
|
||||
} else {
|
||||
focusTimeout.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Metro module 10851; source: modules/video_calls/native/components/ScreenshareParticipant.tsx; dependencies: [31, 27, 33, 4501, 697, 10668, 5321, 10669, 4573, 1244, 4578, 10794, 2] */
|
||||
function _fun83145(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11037:6, offset: 0x01f0f20b, size: 302 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.Image;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{container: {'alignItems': 'center', 'justifyContent': 'center',
|
||||
'flex': 1, backgroundColor: BACKGROUND_BASE_LOW}, image: {marginBottom: 12}, title: {'textAlign': 'center',
|
||||
'marginBottom': 8}, description: {'lineHeight': 18, 'textAlign': 'center', 'marginBottom': 16}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ScreenshareParticipant.tsx');
|
||||
exports.default = _default_83146;
|
||||
}
|
||||
|
||||
function _default_83146({participant, onSingleTap, onDoubleTap, containerStyle}) { // fn#83146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11037:440, offset: 0x01f0f339, size: 596 bytes, params: 2, frame: 27
|
||||
const binding = env0_3;
|
||||
const value4 = (importDefault(10668) /* metro dependency 10668: useParticipantTileTapGesture */)({onSingleTapStart: binding.useCallback(_fun83147,
|
||||
[onSingleTap, participant]), onDoubleTapStart: binding.useCallback(_fun83148, [onDoubleTap, participant])});
|
||||
const styles = useStyles();
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
const items3 = [styles.container, containerStyle];
|
||||
const items2 = [<Image source={importDefault(10669) /* metro dependency 10669 */} style={styles.image} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
items2[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-lg/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
|
||||
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.gMOwov])}</Text>;
|
||||
items2[2] = <Text style={styles.description} variant="text-sm/medium" color="interactive-text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dKeLGt)}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
const CpkXwZ = (require(1244) /* metro dependency 1244: indexNative */).t.CpkXwZ;
|
||||
items2[3] = <Button variant="primary-overlay" text={Reflect.apply(string, intl,
|
||||
[CpkXwZ])} onPress={(require(10794) /* metro dependency 10794: useScreenshareUtils */).stopScreenshare} />;
|
||||
return (
|
||||
<GestureDetector gesture={value4}>
|
||||
<View style={items3}>
|
||||
{items2}
|
||||
</View>
|
||||
</GestureDetector>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* Metro module 10667; source: modules/video_calls/native/components/ScreenshareTile.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 10668, 5321, 1305, 10669, 4573, 1244, 2] */
|
||||
function _fun82046(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10853:6, offset: 0x01ee8af0, size: 331 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Image;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).NOOP;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{container: {'alignItems': 'center', 'justifyContent': 'center',
|
||||
'backgroundColor': null, 'overflow': 'hidden', 'flex': 1, backgroundColor: BLACK}, image: {'marginBottom': 8,
|
||||
'width': 60, 'height': 40}, label: {'lineHeight': 18, 'textAlign': 'center'},
|
||||
liveContainer: {'position': 'absolute', 'top': 8, 'right': 8, 'zIndex': 2}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ScreenshareTile.tsx');
|
||||
exports.default = _default_82047;
|
||||
}
|
||||
|
||||
function _default_82047({onSingleTap = NOOP, onDoubleTap = NOOP}) { // fn#82047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10853:470, offset: 0x01ee8c3b, size: 372 bytes, params: 2, frame: 24
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(10668) /* metro dependency 10668: useParticipantTileTapGesture */)({onSingleTapStart: onSingleTap,
|
||||
onDoubleTapStart: onDoubleTap});
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
const LiveTag = (require(1305) /* metro dependency 1305: native */).LiveTag;
|
||||
const items2 = [<View style={styles.liveContainer}><LiveTag /></View>];
|
||||
items2[1] = <Image source={importDefault(10669) /* metro dependency 10669 */} style={styles.image} resizeMode="contain" />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const G84gtR = (require(1244) /* metro dependency 1244: indexNative */).t.G84gtR;
|
||||
items2[2] = <Text style={styles.label} variant="text-xs/bold" color="always-white">{Reflect.apply(string, intl,
|
||||
[G84gtR])}</Text>;
|
||||
return (
|
||||
<GestureDetector gesture={value2}>
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
</GestureDetector>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* Metro module 10850; source: modules/video_calls/native/components/SingleScreenshare.tsx; dependencies: [31, 7715, 33, 4501, 697, 4594, 10851, 7712, 2] */
|
||||
function _fun83140(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11036:6, offset: 0x01f0f058, size: 228 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(7715) /* metro dependency 7715: ChannelCallStore */;
|
||||
const env0_2 = value.resetFocus;
|
||||
const env0_3 = value.toggleFocus;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
const env0_5 = Reflect.apply(createStyles, value, [{stageStreamContainer: {backgroundColor: BLACK}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/SingleScreenshare.tsx');
|
||||
exports.default = _default_83141;
|
||||
}
|
||||
|
||||
function _default_83141({participant, channel}) { // fn#83141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11036:254, offset: 0x01f0f13c, size: 146 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
|
||||
resetFocus();
|
||||
});
|
||||
return ((Component) => <Component participant={participant} onSingleTap={function() {
|
||||
toggleFocus();
|
||||
}} onDoubleTap={onDoubleTap_83144} containerStyle={channel.isGuildStageVoice() ? styles.stageStreamContainer : undefined} />)(importDefault(10851) /* metro dependency 10851: ScreenshareParticipant */);
|
||||
}
|
||||
|
||||
function _default_83141OnDoubleTap() { // fn#83144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11036:381, owner: _default_83141.onDoubleTap, offset: 0x01f0f1ce, size: 61 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
resetFocus();
|
||||
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
||||
value.selectParticipant(channel.id, null);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
/* Metro module 10852; source: modules/video_calls/native/components/SingleStream.tsx; dependencies: [31, 7715, 33, 10670, 10677, 7712, 2] */
|
||||
function _fun83149(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11038:6, offset: 0x01f0f58d, size: 170 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
|
||||
const env0_3 = channelCallStoreModule.toggleFocus;
|
||||
const env0_4 = channelCallStoreModule.resetFocus;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/SingleStream.tsx');
|
||||
exports.default = _default_83150;
|
||||
}
|
||||
|
||||
function _default_83150({participant, channel}) { // fn#83150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11038:168, offset: 0x01f0f637, size: 140 bytes, params: 2, frame: 18
|
||||
const StreamTile = importDefault(10670) /* metro dependency 10670: StreamTile */;
|
||||
const ResizeMode = (require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode;
|
||||
const CONTAIN = ResizeMode.CONTAIN;
|
||||
return (
|
||||
<StreamTile
|
||||
gestureEnabled
|
||||
resizeMode={CONTAIN}
|
||||
onSingleTap={function() {
|
||||
toggleFocus();
|
||||
}}
|
||||
onDoubleTap={onDoubleTap_83152}
|
||||
participant={participant}
|
||||
style={{flex: 1}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_83150OnDoubleTap() { // fn#83152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11038:298, owner: _default_83150.onDoubleTap, offset: 0x01f0f6c3, size: 61 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
resetFocus();
|
||||
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
||||
value.selectParticipant(channel.id, null);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/* Metro module 10853; source: modules/video_calls/native/components/SingleVideoCall.tsx; dependencies: [31, 7715, 33, 1585, 6771, 10693, 1305, 10677, 7712, 8743, 2] */
|
||||
function _fun83153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:6, offset: 0x01f0f700, size: 174 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
|
||||
const env0_4 = channelCallStoreModule.resetFocus;
|
||||
const env0_5 = channelCallStoreModule.toggleFocus;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/SingleVideoCall.tsx');
|
||||
exports.default = _default_83154;
|
||||
}
|
||||
|
||||
function _default_83154({participant, channel}) { // fn#83154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:170, offset: 0x01f0f7ae, size: 264 bytes, params: 2, frame: 20
|
||||
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const value3 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations.useMemo(function() {
|
||||
return {marginRight: right, marginBottom: bottom};
|
||||
}, [value2.right, value2.bottom]);
|
||||
const UserTile = importDefault(10693) /* metro dependency 10693: UserTile */;
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const PROFILE = AvatarSizes.PROFILE;
|
||||
const ResizeMode = (require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode;
|
||||
const AUTO = ResizeMode.AUTO;
|
||||
return (
|
||||
<UserTile
|
||||
gestureEnabled
|
||||
participant={participant}
|
||||
avatarSize={PROFILE}
|
||||
resizeMode={AUTO}
|
||||
statusStyle={value3}
|
||||
onSingleTap={toggleFocus}
|
||||
onDoubleTap={onDoubleTap_83156}
|
||||
onLongPress={onLongPress_83157}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_83154OnDoubleTap() { // fn#83156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:490, owner: _default_83154.onDoubleTap, offset: 0x01f0f8ce, size: 61 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
resetFocus();
|
||||
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
||||
value.selectParticipant(channel.id, null);
|
||||
}
|
||||
|
||||
function _default_83154OnLongPress({user}) { // fn#83157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:549, owner: _default_83154.onLongPress, offset: 0x01f0f90b, size: 83 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: user.id,
|
||||
channelId: channel.id, isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
/* Metro module 10670; source: modules/video_calls/native/components/StreamTile.tsx; dependencies: [31, 27, 4492, 1226, 661, 4291, 33, 4501, 697, 4000, 4573, 1305, 566, 10671, 10673, 1244, 4617, 10677, 10689, 10680, 10668, 5321, 5278, 10691, 2] */
|
||||
function _fun82051(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:6, offset: 0x01ee8ee6, size: 704 bytes, params: 8, frame: 27
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value2.View;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).ApplicationStreamStates;
|
||||
const env0_9 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value3.jsx;
|
||||
const env0_11 = value3.jsxs;
|
||||
const env0_12 = value3.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object2.container = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden',
|
||||
'width': '100%', backgroundColor: BLACK};
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
|
||||
object4['flex'] = 1;
|
||||
object4['padding'] = 8;
|
||||
object4['alignItems'] = 'center';
|
||||
object4['justifyContent'] = 'center';
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
let hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
||||
BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
|
||||
object4['backgroundColor'] = Reflect.apply(hexWithOpacity, colorUtilsModule, [BLACK, 0.7]);
|
||||
object2.screenMessageContainer = object4;
|
||||
object2.screenMessageText = {lineHeight: 18};
|
||||
const PRIMARY_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_300;
|
||||
object2.screenMessageSubtext = {'color': null, 'fontSize': 14, 'lineHeight': 18, 'textAlign': 'center',
|
||||
color: PRIMARY_300};
|
||||
const object5 = {'position': 'absolute', 'bottom': 8, 'right': 8, 'backgroundColor': null, 'borderRadius': null,
|
||||
'width': 24, 'height': 24, 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
const value7 = colorUtilsModule;
|
||||
hexWithOpacity = value7.hexWithOpacity;
|
||||
const PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
|
||||
object5.backgroundColor = Reflect.apply(hexWithOpacity, value7, [PRIMARY_700, 0.5]);
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object2.statusWrapper = object5;
|
||||
object2.liveTag = {'position': 'absolute', 'right': 8, 'top': 8};
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
const closure = StreamTextOverlay;
|
||||
const env0_15 = value.memo(_fun82053);
|
||||
const env0_16 = value.memo(_fun82056);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/StreamTile.tsx');
|
||||
exports.default = _default_82057;
|
||||
exports.StreamTextOverlay = closure;
|
||||
}
|
||||
|
||||
function StreamTextOverlay({title, subtext}) { // fn#82052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:1042, offset: 0x01ee91a6, size: 197 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<View style={styles.screenMessageContainer}>
|
||||
<Text
|
||||
style={styles.screenMessageText}
|
||||
variant="text-md/semibold"
|
||||
color="always-white"
|
||||
>
|
||||
{title}
|
||||
</Text>
|
||||
{subtext != null ? ((LegacyText) => <LegacyText style={styles.screenMessageSubtext}>{subtext}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText) : null}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82053({participant, streamId, user, resizeMode, gestureEnabled, removeEmptyStateButton, removeEmptyStateImage}) { // fn#82053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:1325, offset: 0x01ee926b, size: 997 bytes, params: 2, frame: 34
|
||||
var r10;
|
||||
var state;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var formatToPlainString;
|
||||
var meVVlb;
|
||||
var defaultImport2;
|
||||
var ownerId;
|
||||
var id;
|
||||
var jsxRuntimeEnv0_12Binding;
|
||||
var VideoRenderer;
|
||||
const env0_1 = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
const items = [ApplicationStreamingStore];
|
||||
const activeStreamForStreamKey = Reflect.apply(useStateFromStores, fluxModule, [items, function() {
|
||||
return ApplicationStreamingStore.getActiveStreamForStreamKey(participant.id);
|
||||
}]);
|
||||
const defaultImport = importDefault(10671) /* metro dependency 10671: useVideoStreamError */;
|
||||
const STREAM = MediaEngineContextTypes.STREAM;
|
||||
const user2 = participant.user;
|
||||
const value2 = defaultImport(STREAM, user2.id);
|
||||
if (activeStreamForStreamKey != null) {
|
||||
state = activeStreamForStreamKey.state;
|
||||
if (ApplicationStreamStates.FAILED === state) {
|
||||
return ((Component) => <Component stream={activeStreamForStreamKey} removeCloseButton={removeEmptyStateButton} removeSplashImage={removeEmptyStateImage} type={(require(10673) /* metro dependency 10673: VideoEmptyState */).VideoEmptyTypes.STREAM_FAILED} style={StyleSheet.absoluteFill} />)(importDefault(10673) /* metro dependency 10673: VideoEmptyState */);
|
||||
}
|
||||
if (ApplicationStreamStates.ENDED === state) {
|
||||
return ((Component) => <Component stream={activeStreamForStreamKey} removeCloseButton={removeEmptyStateButton} removeSplashImage={removeEmptyStateImage} type={(require(10673) /* metro dependency 10673: VideoEmptyState */).VideoEmptyTypes.STREAM_ENDED} style={StyleSheet.absoluteFill} />)(importDefault(10673) /* metro dependency 10673: VideoEmptyState */);
|
||||
}
|
||||
if (ApplicationStreamStates.RECONNECTING === state) {
|
||||
r10 = <StreamTextOverlay title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['pdFFK+'])} />;
|
||||
} else if (ApplicationStreamStates.PAUSED !== state) {
|
||||
r10 = null;
|
||||
} else {
|
||||
var streamTextOverlayProps = {title: intl.string(t['5q17w5'])};
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
meVVlb = t.meVVlb;
|
||||
defaultImport2 = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
|
||||
streamTextOverlayProps.subtext = Reflect.apply(formatToPlainString, intl, [meVVlb,
|
||||
{username: defaultImport2.getName(activeStreamForStreamKey.guildId, activeStreamForStreamKey.channelId,
|
||||
user)}]);
|
||||
r10 = <StreamTextOverlay {...streamTextOverlayProps} />;
|
||||
}
|
||||
if (value2 != null) {
|
||||
return ((Component) => <Component stream={activeStreamForStreamKey} removeCloseButton={removeEmptyStateButton} removeSplashImage={removeEmptyStateImage} type={(require(10673) /* metro dependency 10673: VideoEmptyState */).VideoEmptyTypes.STREAM_FAILED} style={StyleSheet.absoluteFill} avError={value2} />)(importDefault(10673) /* metro dependency 10673: VideoEmptyState */);
|
||||
}
|
||||
ownerId = activeStreamForStreamKey.ownerId;
|
||||
id = AuthenticationStore.getId();
|
||||
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
VideoRenderer = importDefault(10677) /* metro dependency 10677: VideoRenderer */;
|
||||
var defaultImport3Props = {resizeMode: resizeMode, streamId: streamId, gestureEnabled: gestureEnabled,
|
||||
renderTag: renderTag,
|
||||
videoSpinnerContext: ownerId === id ? (require(10680) /* metro dependency 10680: VideoSpinnerTimer */).VideoSpinnerContext.SELF_STREAM : (require(10680) /* metro dependency 10680: VideoSpinnerTimer */).VideoSpinnerContext.REMOTE_STREAM,
|
||||
|
||||
userId: user.id};
|
||||
state = activeStreamForStreamKey.state;
|
||||
defaultImport3Props.paused = state === ApplicationStreamStates.PAUSED;
|
||||
return (
|
||||
<>
|
||||
<VideoRenderer {...defaultImport3Props} />
|
||||
{r10}
|
||||
</>
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun82056({onFullScreen, style}) { // fn#82056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:2692, offset: 0x01ee96b1, size: 226 bytes, params: 2, frame: 20
|
||||
const styles = useStyles();
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const items2 = [styles.statusWrapper, style];
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconProps = {source: importDefault(10691) /* metro dependency 10691 */};
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const SMALL = Sizes.SMALL;
|
||||
iconProps.size = SMALL;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
iconProps.color = WHITE;
|
||||
return (
|
||||
<PressableOpacity
|
||||
accessibilityRole="button"
|
||||
onPress={onFullScreen}
|
||||
style={items2}
|
||||
hitSlop={{'top': 4, 'left': 4, 'right': 4, 'bottom': 4}}
|
||||
>
|
||||
<Icon {...iconProps} />
|
||||
</PressableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
function _default_82057({participant, onSingleTap, onDoubleTap, resizeMode = require(dependencyMap[17]).ResizeMode.CONTAIN, gestureEnabled, removeEmptyStateButton, removeEmptyStateImage, onFullScreen, fullscreenIconStyle, style}) { // fn#82057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:3002, offset: 0x01ee9793, size: 416 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const binding = env0_3;
|
||||
const value4 = (importDefault(10668) /* metro dependency 10668: useParticipantTileTapGesture */)({onSingleTapStart: binding.useCallback(_fun82058,
|
||||
[onSingleTap, participant]), onDoubleTapStart: binding.useCallback(_fun82059, [onDoubleTap, participant])});
|
||||
const streamId = participant.streamId;
|
||||
const user = participant.user;
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
return (
|
||||
<GestureDetector gesture={value4}>
|
||||
<View style={[styles.container, style]}>
|
||||
{((Component) => <Component streamId={streamId} participant={participant} user={user} resizeMode={resizeMode} gestureEnabled={gestureEnabled} removeEmptyStateButton={removeEmptyStateButton} removeEmptyStateImage={removeEmptyStateImage} />)(env0_15)}
|
||||
{onFullScreen != null && ((Component) => <Component onFullScreen={onFullScreen} style={fullscreenIconStyle} />)(env0_16)}
|
||||
</View>
|
||||
</GestureDetector>
|
||||
);
|
||||
}
|
||||
|
||||
function renderTag() { // fn#82055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:2468, offset: 0x01ee9670, size: 65 bytes, params: 1, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component style={styles.liveTag} participant={participant} />)(importDefault(10689) /* metro dependency 10689: StreamQualityLiveIndicator */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,293 @@
|
||||
/* Metro module 10693; source: modules/video_calls/native/components/UserTile.tsx; dependencies: [57, 31, 27, 10694, 1226, 1379, 4259, 661, 4299, 4291, 33, 4501, 697, 4000, 566, 8421, 1305, 9149, 4573, 1244, 10677, 10680, 8133, 10695, 10696, 10697, 4612, 10692, 10698, 10665, 10668, 5321, 10699, 2] */
|
||||
function _fun82181(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:6, offset: 0x01eeddf7, size: 735 bytes, params: 8, frame: 27
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const voiceChannelEffectsStore = importDefault(10694) /* metro dependency 10694: VoiceChannelEffectsStore */;
|
||||
const env0_7 = (require(10694) /* metro dependency 10694: VoiceChannelEffectsStore */).clearVoiceChannelEffectForUser;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).VideoToggleState;
|
||||
const env0_12 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
|
||||
const env0_13 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value2.jsx;
|
||||
const env0_15 = value2.jsxs;
|
||||
const env0_16 = value2.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
|
||||
object2.container = {'flex': 1, 'width': '100%', 'alignItems': 'center', 'justifyContent': 'center',
|
||||
'overflow': 'hidden', backgroundColor: BLACK};
|
||||
object2.imageBackground = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', 'alignSelf': 'stretch'};
|
||||
object2.autoDisabledVideoWrapper = {'width': '100%', 'flexDirection': 'row', 'justifyContent': 'center'};
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
let hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
||||
let PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
|
||||
object2.autoDisabledVideo = {'backgroundColor': null, 'alignItems': 'center', 'height': 24,
|
||||
backgroundColor: Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_700, 0.5])};
|
||||
const object3 = {'borderRadius': null, 'flexDirection': 'row', 'justifyContent': 'space-evenly',
|
||||
'paddingHorizontal': 8, 'paddingVertical': 4, 'alignItems': 'center'};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.autoDisabledVideoTextWrapper = object3;
|
||||
const object6 = {'position': 'absolute', 'bottom': 8, 'right': 8, 'backgroundColor': null, 'borderRadius': null,
|
||||
'width': 24, 'height': 24, 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
const value5 = colorUtilsModule;
|
||||
hexWithOpacity = value5.hexWithOpacity;
|
||||
PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
|
||||
object6.backgroundColor = Reflect.apply(hexWithOpacity, value5, [PRIMARY_700, 0.5]);
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
object2.statusWrapper = object6;
|
||||
object2.labelText = {'marginLeft': 8, 'height': 20, 'alignItems': 'center'};
|
||||
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
const env0_18 = value.memo(_fun82182);
|
||||
const env0_19 = value.memo(_fun82187);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/UserTile.tsx');
|
||||
exports.default = _default_82189;
|
||||
}
|
||||
|
||||
function _fun82182({streamId, user, resizeMode, ringing, avatarSize, speaking, gestureEnabled, hasVideo, guildId}) { // fn#82182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1269, offset: 0x01eee0d6, size: 481 bytes, params: 2, frame: 34
|
||||
var r0;
|
||||
var VideoRenderer;
|
||||
var VideoSpinnerContext;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const id = user.id;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [AuthenticationStore];
|
||||
const value2 = Reflect.apply(useStateFromStores, fluxModule, [object, _fun82183, [hasVideo, id]]);
|
||||
const moduleValue2 = fluxModule;
|
||||
const useStateFromStoresArray = moduleValue2.useStateFromStoresArray;
|
||||
const env0_3Binding = env0_3(Reflect.apply(useStateFromStoresArray, moduleValue2, [[MediaEngineStore], _fun82184,
|
||||
[id]]), 1)[0];
|
||||
const value5 = fluxModule.useStateFromStores([MediaEngineStore], _fun82185, [id]);
|
||||
const AUTO_PROBING = VideoToggleState.AUTO_PROBING;
|
||||
if (ringing) {
|
||||
value = importDefault(8421) /* metro dependency 8421: VideoBackground */;
|
||||
value = ((Component) => <Component style={styles.imageBackground} url={user.getAvatarURL(guildId,
|
||||
128)} speaking={speaking} size={avatarSize} renderVideoDetails={renderVideoDetails} />)(value);
|
||||
r0 = value;
|
||||
} else if (hasVideo) {
|
||||
if (value5 === AUTO_PROBING) {
|
||||
value = importDefault(8421) /* metro dependency 8421: VideoBackground */;
|
||||
value = ((Component) => <Component style={styles.imageBackground} url={user.getAvatarURL(guildId,
|
||||
128)} speaking={speaking} size={avatarSize} renderVideoDetails={renderVideoDetails} />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
VideoRenderer = importDefault(10677) /* metro dependency 10677: VideoRenderer */;
|
||||
object = {resizeMode: resizeMode, streamId: streamId, gestureEnabled: gestureEnabled};
|
||||
VideoSpinnerContext = (require(10680) /* metro dependency 10680: VideoSpinnerTimer */).VideoSpinnerContext;
|
||||
object.videoSpinnerContext = value2 ? VideoSpinnerContext.SELF_VIDEO : VideoSpinnerContext.REMOTE_VIDEO;
|
||||
object.userId = user.id;
|
||||
r0 = <VideoRenderer {...object} />;
|
||||
}
|
||||
} else {
|
||||
value = importDefault(8421) /* metro dependency 8421: VideoBackground */;
|
||||
value = ((Component) => <Component style={styles.imageBackground} url={user.getAvatarURL(guildId,
|
||||
128)} speaking={speaking} size={avatarSize} renderVideoDetails={renderVideoDetails} />)(value);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun82187({muted, deafened, userId, style}) { // fn#82187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:2326, offset: 0x01eee473, size: 607 bytes, params: 2, frame: 32
|
||||
var r6;
|
||||
var r0;
|
||||
var value6;
|
||||
var jsxRuntimeEnv0_16Binding;
|
||||
var value7;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
var items3;
|
||||
var object4;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const value4 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[MediaEngineStore], _fun82188, [userId]]),
|
||||
3);
|
||||
const property = value4[0];
|
||||
const property2 = value4[1];
|
||||
const property3 = value4[2];
|
||||
const r14 = property ? importDefault(8133) /* metro dependency 8133 */ : deafened ? importDefault(10695) /* metro dependency 10695 */ : muted ? importDefault(10696) /* metro dependency 10696 */ : undefined;
|
||||
const r12 = property2 && !property3;
|
||||
if (r12) {
|
||||
jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
|
||||
value7 = null;
|
||||
r6 = r12 ? <View style={[styles.statusWrapper,
|
||||
style]}><Icon source={importDefault(10697) /* metro dependency 10697 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor /></View> : value7;
|
||||
items3 = [r6];
|
||||
if (value7 != r14) {
|
||||
r6 = <View style={[styles.statusWrapper, style,
|
||||
r12 ? {right: 38} : value7]}><Icon source={r14} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} disableColor={r14 === (importDefault(8133) /* metro dependency 8133 */)} /></View>;
|
||||
} else {
|
||||
r6 = value7;
|
||||
}
|
||||
items3[1] = r6;
|
||||
r0 = <>{items3}</>;
|
||||
} else {
|
||||
value6 = null;
|
||||
if (value6 != r14) {
|
||||
jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
|
||||
value7 = null;
|
||||
r6 = r12 ? <View style={[styles.statusWrapper,
|
||||
style]}><Icon source={importDefault(10697) /* metro dependency 10697 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor /></View> : value7;
|
||||
items3 = [r6];
|
||||
if (value7 != r14) {
|
||||
r6 = <View style={[styles.statusWrapper, style,
|
||||
r12 ? {right: 38} : value7]}><Icon source={r14} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} disableColor={r14 === (importDefault(8133) /* metro dependency 8133 */)} /></View>;
|
||||
} else {
|
||||
r6 = value7;
|
||||
}
|
||||
items3[1] = r6;
|
||||
r0 = <>{items3}</>;
|
||||
} else {
|
||||
r0 = value6;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _default_82189({participant, onSingleTap, onDoubleTap, onLongPress, avatarSize, resizeMode = require(dependencyMap[20]).ResizeMode.COVER, statusStyle, gestureEnabled, hasNotch, style}) { // fn#82189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:2975, offset: 0x01eee713, size: 1055 bytes, params: 2, frame: 41
|
||||
const env0_4 = undefined;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const value4 = binding.useCallback(_fun82190, [onSingleTap, participant]);
|
||||
const value5 = binding.useCallback(_fun82191, [onDoubleTap, participant]);
|
||||
const value6 = binding.useCallback(_fun82192, [participant, onLongPress]);
|
||||
const streamId = participant.streamId;
|
||||
const ringing = participant.ringing;
|
||||
const user = participant.user;
|
||||
const voiceState = participant.voiceState;
|
||||
const defaultImport = importDefault(4612) /* metro dependency 4612: useIsSpeaking */;
|
||||
let id = participant.id;
|
||||
const value7 = defaultImport({userId: id});
|
||||
const r28 = ChannelStore.getChannel(voiceState?.channelId)?.guild_id ?? undefined;
|
||||
const value10 = (importDefault(10692) /* metro dependency 10692: participantHasVideo */)(participant);
|
||||
let r1 = voiceState?.isVoiceMuted();
|
||||
const r14 = r1 != null && r1;
|
||||
r1 = voiceState?.isVoiceDeafened();
|
||||
const r13 = r1 != null && r1;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let type = participant.type;
|
||||
const value13 = Reflect.apply(useStateFromStores, fluxModule, [[MediaEngineStore], _fun82193, [user.id, type]]);
|
||||
const swipeDismissRef = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.swipeDismissRef;
|
||||
const user2 = participant.user;
|
||||
id = user2?.id;
|
||||
const value15 = fluxModule.useStateFromStores([VoiceChannelEffectsStore], _fun82194);
|
||||
type = participant.type;
|
||||
const USER = ParticipantTypes.USER;
|
||||
const r10 = type === USER && id != null && value15 != null;
|
||||
const value19 = (importDefault(10668) /* metro dependency 10668: useParticipantTileTapGesture */)({onDoubleTapStart: value5,
|
||||
onSingleTapStart: value4});
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value22 = Gesture.LongPress().onStart(value6).minDuration(800);
|
||||
const r6 = swipeDismissRef == null ? value22 : value22.requireExternalGestureToFail(swipeDismissRef);
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
return (
|
||||
<GestureDetector gesture={Gesture.Simultaneous(r6, value19)}>
|
||||
<View style={[styles.container, style]}>
|
||||
{((Component) => <Component guildId={r28} hasVideo={value10 && !value13} streamId={streamId} user={user} resizeMode={resizeMode} ringing={ringing} speaking={value7} avatarSize={avatarSize} gestureEnabled={gestureEnabled} />)(env0_18)}
|
||||
{r10 ? ((Component) => <Component voiceChannelEffect={value15} onComplete={function() {
|
||||
return clearVoiceChannelEffectForUser(id);
|
||||
}} userId={id} hasNotch={hasNotch} />)(importDefault(10699) /* metro dependency 10699: AnimatedEffectEmoji */) : null}
|
||||
{((Component) => <Component muted={r14} deafened={r13} userId={user.id} style={statusStyle} />)(env0_19)}
|
||||
</View>
|
||||
</GestureDetector>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun82183() { // fn#82183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1436, offset: 0x01eee2b7, size: 37 bytes, params: 1, frame: 11
|
||||
var r0;
|
||||
var idBinding;
|
||||
var value;
|
||||
const hasVideoBinding = hasVideo;
|
||||
if (hasVideoBinding) {
|
||||
idBinding = id;
|
||||
value = environment.__proto__;
|
||||
value = idBinding === AuthenticationStore.getId();
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = hasVideoBinding;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun82184() { // fn#82184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1505, offset: 0x01eee2dc, size: 35 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return [MediaEngineStore.isLocalVideoAutoDisabled(id)];
|
||||
}
|
||||
|
||||
function _fun82185() { // fn#82185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1594, offset: 0x01eee2ff, size: 65 bytes, params: 1, frame: 14
|
||||
return id != null ? MediaEngineStore.getVideoToggleState(id,
|
||||
MediaEngineContextTypes.DEFAULT) : VideoToggleState.NONE;
|
||||
}
|
||||
|
||||
function renderVideoDetails() { // fn#82186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1786, offset: 0x01eee340, size: 307 bytes, params: 1, frame: 24
|
||||
var r0;
|
||||
var value3;
|
||||
var object3;
|
||||
var stylesBinding;
|
||||
var object2;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
var items2;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var value;
|
||||
if (env0_3) {
|
||||
value3 = environment.__proto__;
|
||||
object3 = {};
|
||||
stylesBinding = styles;
|
||||
object3.style = stylesBinding.autoDisabledVideoWrapper;
|
||||
var viewProps = {style: [stylesBinding.autoDisabledVideo, stylesBinding.autoDisabledVideoTextWrapper]};
|
||||
value = <Icon source={importDefault(9149) /* metro dependency 9149 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor />;
|
||||
items2 = [value];
|
||||
items2[1] = <Text variant="text-sm/normal" color="text-default" style={stylesBinding.labelText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m2Hyj0)}</Text>;
|
||||
value = <View {...object3}><View {...viewProps}>{items2}</View></View>;
|
||||
r0 = value;
|
||||
} else if (result) {
|
||||
value3 = environment.__proto__;
|
||||
object3 = {};
|
||||
stylesBinding = styles;
|
||||
object3.style = stylesBinding.autoDisabledVideoWrapper;
|
||||
var viewProps = {style: [stylesBinding.autoDisabledVideo, stylesBinding.autoDisabledVideoTextWrapper]};
|
||||
value = <Icon source={importDefault(9149) /* metro dependency 9149 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor />;
|
||||
items2 = [value];
|
||||
items2[1] = <Text variant="text-sm/normal" color="text-default" style={stylesBinding.labelText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m2Hyj0)}</Text>;
|
||||
value = <View {...object3}><View {...viewProps}>{items2}</View></View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun82188() { // fn#82188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:2426, offset: 0x01eee6d2, size: 65 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
const isLocalMute = MediaEngineStore.isLocalMute;
|
||||
const userIdBinding = userId;
|
||||
return [Reflect.apply(isLocalMute, MediaEngineStore, [userIdBinding]),
|
||||
MediaEngineStore.isLocalVideoDisabled(userIdBinding), MediaEngineStore.isLocalVideoAutoDisabled(userIdBinding)];
|
||||
}
|
||||
|
||||
function _fun82192() { // fn#82192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3276, offset: 0x01eeeb32, size: 35 bytes, params: 1, frame: 12
|
||||
return onLongPress?.(participant);
|
||||
}
|
||||
|
||||
function _fun82193() { // fn#82193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3619, offset: 0x01eeeb55, size: 87 bytes, params: 1, frame: 17
|
||||
return user.id != null && MediaEngineStore.isLocalVideoDisabled(user.id,
|
||||
(importDefault(10698) /* metro dependency 10698: mediaEngineContextFromParticipantType */)(participant.type));
|
||||
}
|
||||
|
||||
function _fun82194() { // fn#82194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3841, offset: 0x01eeebac, size: 42 bytes, params: 1, frame: 12
|
||||
const idBinding = id;
|
||||
const value2 = null;
|
||||
return value2 != idBinding ? VoiceChannelEffectsStore.getEffectForUserId(id) : value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 15495; source: modules/video_calls/native/components/UserVideoFailed.tsx; dependencies: [27, 661, 33, 4501, 697, 9235, 9933, 4573, 1244, 4578, 10685, 4406, 8899, 2] */
|
||||
function _fun118639(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15692:6, offset: 0x024e5e7f, size: 298 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).VideoToggleState;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [{container: {'alignItems': 'center', 'justifyContent': 'center',
|
||||
'backgroundColor': null, 'padding': 8, backgroundColor: PRIMARY_700}, placeholderImage: {'marginBottom': 8,
|
||||
'width': '100%', 'resizeMode': 'contain'}, button: {'marginTop': 16, 'alignSelf': 'center'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/UserVideoFailed.tsx');
|
||||
exports.default = UserVideoFailed;
|
||||
}
|
||||
|
||||
function UserVideoFailed(a0) { // fn#118640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15692:534, offset: 0x024e5fa9, size: 610 bytes, params: 2, frame: 32
|
||||
const env0_0 = a0.userId;
|
||||
const style = a0.style;
|
||||
const avError = a0.avError;
|
||||
const removeRetryButton = a0.removeRetryButton;
|
||||
const removeSplashImage = a0.removeSplashImage;
|
||||
let object = {'userId': 0, 'style': 0, 'avError': 0, 'removeRetryButton': 0, 'removeSplashImage': 0};
|
||||
silentSetPrototypeOf(object, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object, undefined);
|
||||
const styles = useStyles();
|
||||
const avErrorModule = require(9235) /* metro dependency 9235: AVError */;
|
||||
const getErrorInfo = avErrorModule.getErrorInfo;
|
||||
const errorCode = Reflect.apply(getErrorInfo, avErrorModule, [avError]).errorCode;
|
||||
const viewBindingProps = {...value};
|
||||
viewBindingProps['style'] = [styles.container, style];
|
||||
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
|
||||
const r4 = !removeSplashImage && ((StreamFailed) => <StreamFailed style={styles.placeholderImage} />)((require(9933) /* metro dependency 9933: StreamFailed */).StreamFailed);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object = [<>{r4}<Text variant="text-md/semibold" color="text-strong">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['z+mxvo'])}</Text></>];
|
||||
object[1] = <Text variant="text-sm/semibold" color="text-muted" selectable>{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ejOT95,
|
||||
{errorCode: errorCode})}</Text>;
|
||||
object[2] = <View style={styles.button}>{!removeRetryButton && ((Button) => <Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['hxmQ/e'])} onPress={onPress_118641} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{object}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function UserVideoFailedOnPress() { // fn#118641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15692:1194, owner: UserVideoFailed.onPress, offset: 0x024e620b, size: 164 bytes, params: 1, frame: 20
|
||||
const videoStreamReadyActionCreatorsModule = require(10685) /* metro dependency 10685: VideoStreamReadyActionCreators */;
|
||||
const clearVideoStreamTimeout = videoStreamReadyActionCreatorsModule.clearVideoStreamTimeout;
|
||||
const MediaEngineContextTypes = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineContextTypes;
|
||||
let DEFAULT = MediaEngineContextTypes.DEFAULT;
|
||||
let userIdBinding = userId;
|
||||
Reflect.apply(clearVideoStreamTimeout, videoStreamReadyActionCreatorsModule, [DEFAULT, userIdBinding]);
|
||||
let defaultImport = importDefault(8899) /* metro dependency 8899: AudioActionCreators */;
|
||||
const setDisableLocalVideo = defaultImport.setDisableLocalVideo;
|
||||
const DISABLED = VideoToggleState.DISABLED;
|
||||
DEFAULT = MediaEngineContextTypes.DEFAULT;
|
||||
Reflect.apply(setDisableLocalVideo, defaultImport, [userIdBinding, DISABLED, DEFAULT, false]);
|
||||
global.setTimeout(function() {
|
||||
var defaultImport = importDefault(dependencyMap[12]);
|
||||
var userIdBinding = userId;
|
||||
var MANUAL_ENABLED = VideoToggleState.MANUAL_ENABLED;
|
||||
var DEFAULT = require(dependencyMap[11]).MediaEngineContextTypes.DEFAULT;
|
||||
defaultImport.setDisableLocalVideo(userIdBinding, MANUAL_ENABLED, DEFAULT, false);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,259 @@
|
||||
/* Metro module 10677; source: modules/video_calls/native/components/VideoRenderer.tsx; dependencies: [57, 31, 27, 33, 4501, 10678, 10679, 10681, 1478, 477, 7717, 10686, 9944, 10687, 4017, 2] */
|
||||
function _fun82091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:6, offset: 0x01eeaac2, size: 356 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const resetIOSScrollZoom = function(a0, a1, a2) {
|
||||
if (!(a1 <= 0 || a2 <= 0)) {
|
||||
a0.scrollResponderZoomTo({'x': 0, 'y': 0, 'width': null, 'height': null, 'animated': false, width: a1,
|
||||
height: a2});
|
||||
a0.scrollTo({'x': 0, 'y': 0, 'animated': false});
|
||||
}
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.View;
|
||||
const env0_6 = value2.StyleSheet;
|
||||
const env0_7 = value2.ScrollView;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value3.jsx;
|
||||
const env0_9 = value3.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({spinner: {'height': 32,
|
||||
'width': 32}, center: {'alignItems': 'center', 'justifyContent': 'center'}, zoomLayoutAndroid: {flex: 1}});
|
||||
object2 = {COVER: 0};
|
||||
object2[0] = 'COVER';
|
||||
object2.CONTAIN = 1;
|
||||
object2[1] = 'CONTAIN';
|
||||
object2.AUTO = 2;
|
||||
object2[2] = 'AUTO';
|
||||
value = value.memo(_fun82093);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/VideoRenderer.tsx');
|
||||
exports.default = value;
|
||||
exports.ResizeMode = object2;
|
||||
}
|
||||
|
||||
function _fun82093({streamId, resizeMode = env0_11.CONTAIN, gestureEnabled, renderTag, videoSpinnerContext, userId, streamKey, paused}) { // fn#82093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:581, offset: 0x01eeac81, size: 1830 bytes, params: 2, frame: 43
|
||||
var object;
|
||||
var object2;
|
||||
var items3;
|
||||
var items4;
|
||||
let value = undefined;
|
||||
gestureEnabled = !(gestureEnabled === value) && gestureEnabled;
|
||||
paused = !(paused === value) && paused;
|
||||
const env0_3 = value;
|
||||
let env0_4 = value;
|
||||
const styles = useStyles();
|
||||
const value6 = (require(10678) /* metro dependency 10678: SurfaceDirectRendererExperiment */).useSurfaceDirectRendererExperiment(userId,
|
||||
{location: 'VideoRenderer'});
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value7 = Reflect.apply(useState, binding, [0]);
|
||||
const binding2 = env0_3;
|
||||
const value8 = binding2(value7, 2);
|
||||
const property = value8[0];
|
||||
const env0_2 = value8[1];
|
||||
useState = binding.useState;
|
||||
const value9 = binding2(Reflect.apply(useState, binding, [0]), 2);
|
||||
const property2 = value9[0];
|
||||
env0_4 = value9[1];
|
||||
useState = binding.useState;
|
||||
const value10 = binding2(Reflect.apply(useState, binding, [0]), 2);
|
||||
const property3 = value10[0];
|
||||
const property4 = value10[1];
|
||||
useState = binding.useState;
|
||||
const value11 = binding2(Reflect.apply(useState, binding, [0]), 2);
|
||||
const property5 = value11[0];
|
||||
const property6 = value11[1];
|
||||
useState = binding.useState;
|
||||
const value12 = binding2(Reflect.apply(useState, binding, [true]), 2);
|
||||
const property7 = value12[0];
|
||||
const env0_9 = value12[1];
|
||||
(importDefault(10679) /* metro dependency 10679: useVideoSpinnerTimer */)({location: 'VideoRenderer',
|
||||
videoSpinnerContext: videoSpinnerContext, userId: userId, streamId: streamId, paused: paused,
|
||||
loading: property7});
|
||||
const onReady = (importDefault(10681) /* metro dependency 10681: useVideoReadyTimeout */)({streamId: streamId,
|
||||
userId: userId, videoSpinnerContext: videoSpinnerContext, paused: paused, loading: property7,
|
||||
streamKey: streamKey}).onReady;
|
||||
const value14 = binding.useRef(null);
|
||||
const value15 = binding.useRef(null);
|
||||
const env0_13 = binding.useRef({'width': 0, 'height': 0});
|
||||
const value16 = binding.useCallback(_fun82094, [property4, property6]);
|
||||
const value17 = binding.useCallback(_fun82095, [onReady]);
|
||||
const value18 = binding.useCallback(_fun82096, []);
|
||||
const value19 = binding.useCallback(_fun82097, []);
|
||||
const value20 = binding.useMemo(_fun82099, [property, property2, property3, property5, resizeMode]);
|
||||
const value21 = (require(7717) /* metro dependency 7717: DeviceOrientation */).useStore(function(a0) {
|
||||
return a0.orientation;
|
||||
});
|
||||
binding.useLayoutEffect(_fun82101, [property, property2, property3, property5, value20]);
|
||||
binding.useLayoutEffect(_fun82102, [property3, property5]);
|
||||
const value22 = binding.useMemo(_fun82103, [value20, property3, property5]);
|
||||
const value23 = binding.useMemo(_fun82104, [value20, property3, property5]);
|
||||
const value24 = binding.useMemo(_fun82105, [property3, value20, property, property5, property2]);
|
||||
const value25 = binding.useMemo(_fun82106, [property, property2]);
|
||||
const value26 = binding.useMemo(_fun82107, [property3, value20, property, property5, property2]);
|
||||
const r16 = property7 ? ((Component) => <Component animate style={styles.spinner} />)(importDefault(10686) /* metro dependency 10686: MessageLoadingSpinner */) : null;
|
||||
const OrientationType = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType;
|
||||
const PORTRAIT = OrientationType.PORTRAIT;
|
||||
const value28 = value21 === PORTRAIT;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isAndroid()) {
|
||||
value = <View onLayout={value18} style={[styles.center,
|
||||
StyleSheet.absoluteFillObject]}>{((Component) => <Component ref={value15} style={styles.zoomLayoutAndroid} minimumZoomScale={1} gestureEnabled={gestureEnabled}><View collapsable={false} style={{width: property,
|
||||
|
||||
height: property2, alignItems: 'center',
|
||||
justifyContent: 'center'}}>{((Component) => <Component useSurfaceDirectRenderer={value6} streamId={streamId} onSize={value16} onReady={value17} style={value23} />)(importDefault(10687) /* metro dependency 10687: DCDVideoRenderer */)}{r16}</View></Component>)(importDefault(9944) /* metro dependency 9944: ZoomLayoutAndroid */)}<View style={value26}>{property7 ? null : gestureEnabled && value28 ? renderTag == null ? value : renderTag() : null}</View></View>;
|
||||
resizeMode = value;
|
||||
} else if (gestureEnabled) {
|
||||
var scrollViewBindingProps = {ref: value14, onLayout: value18, style: StyleSheet.absoluteFillObject,
|
||||
contentContainerStyle: value25, bounces: false, pinchGestureEnabled: !property7, maximumZoomScale: 8,
|
||||
minimumZoomScale: 1, showsVerticalScrollIndicator: false, showsHorizontalScrollIndicator: false,
|
||||
scrollEventThrottle: 16};
|
||||
object = {collapsable: false, style: value25, onLayout: value19};
|
||||
object2 = {style: value24};
|
||||
items3 = [((View) => <View>{((Component) => <Component useSurfaceDirectRenderer={value6} streamId={streamId} onSize={value16} onReady={value17} style={value22} />)(importDefault(10687) /* metro dependency 10687: DCDVideoRenderer */)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)];
|
||||
items3[1] = value28 ? renderTag == null ? value : renderTag() : null;
|
||||
items4 = [<View {...object2}>{items3}</View>];
|
||||
items4[1] = r16 != null ? <View style={[StyleSheet.absoluteFillObject, styles.center]}>{r16}</View> : null;
|
||||
value = <ScrollView {...scrollViewBindingProps}><View {...object}>{items4}</View></ScrollView>;
|
||||
resizeMode = value;
|
||||
} else {
|
||||
resizeMode = <View onLayout={value18} style={[styles.center,
|
||||
StyleSheet.absoluteFillObject]}>{((Component) => <Component useSurfaceDirectRenderer={value6} streamId={streamId} onSize={value16} onReady={value17} style={value22} />)(importDefault(10687) /* metro dependency 10687: DCDVideoRenderer */)}{r16}</View>;
|
||||
}
|
||||
return resizeMode;
|
||||
}
|
||||
|
||||
function _fun82094({nativeEvent}) { // fn#82094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1272, offset: 0x01eeb3a7, size: 153 bytes, params: 2, frame: 18
|
||||
const width = nativeEvent.width;
|
||||
const height = nativeEvent.height;
|
||||
let value = environment.__proto__;
|
||||
value = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
|
||||
value = value.getWindowDimensions();
|
||||
const width2 = value.width;
|
||||
const height2 = value.height;
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
const Math2 = global.Math;
|
||||
const sqrt = Math2.sqrt;
|
||||
value = width2 * height2 * 4;
|
||||
value = Reflect.apply(sqrt, Math2, [value / (width * height)]);
|
||||
value = Reflect.apply(min, Math, [value, 1]);
|
||||
env0_6(width * value);
|
||||
env0_8(height * value);
|
||||
}
|
||||
|
||||
function _fun82095() { // fn#82095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1443, offset: 0x01eeb440, size: 26 bytes, params: 1, frame: 12
|
||||
env0_9(false);
|
||||
onReady();
|
||||
}
|
||||
|
||||
function _fun82096({nativeEvent}) { // fn#82096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1482, offset: 0x01eeb45a, size: 70 bytes, params: 2, frame: 13
|
||||
const {width, height} = nativeEvent.layout;
|
||||
env0_2(width);
|
||||
env0_4(height);
|
||||
env0_13.current = {width: width, height: height};
|
||||
}
|
||||
|
||||
function _fun82097({nativeEvent}) { // fn#82097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1590, offset: 0x01eeb4a0, size: 139 bytes, params: 2, frame: 18
|
||||
const {width, height} = nativeEvent.layout;
|
||||
if (!((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || env0_11.current == null)) {
|
||||
resetIOSScrollZoom(env0_11.current, width, height);
|
||||
global.requestAnimationFrame(_fun82098);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82099() { // fn#82099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1812, offset: 0x01eeb565, size: 240 bytes, params: 1, frame: 8
|
||||
const value2 = 0;
|
||||
if (value2 === env0_1) {
|
||||
return value2;
|
||||
}
|
||||
if (value2 === env0_3) {
|
||||
return value2;
|
||||
}
|
||||
if (value2 === env0_5) {
|
||||
return value2;
|
||||
}
|
||||
if (value2 === env0_7) {
|
||||
return value2;
|
||||
}
|
||||
const binding = env0_0;
|
||||
const value3 = env0_1 / env0_3;
|
||||
const value4 = env0_5 / env0_7;
|
||||
const AUTO = env1_11.AUTO;
|
||||
const r6 = binding !== AUTO ? binding : value3 > 1 && value4 > 1 || value3 < 1 && value4 < 1 ? env1_11.COVER : env1_11.CONTAIN;
|
||||
const CONTAIN = env1_11.CONTAIN;
|
||||
return r6 === CONTAIN ? value3 > value4 ? env0_3 / env0_7 : env0_1 / env0_5 : r6 !== env1_11.COVER ? value2 : value4 > value3 ? env0_3 / env0_7 : env0_1 / env0_5;
|
||||
}
|
||||
|
||||
function _fun82101() { // fn#82101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2063, offset: 0x01eeb660, size: 99 bytes, params: 1, frame: 13
|
||||
var current;
|
||||
let value = environment.__proto__;
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
value = value.isAndroid();
|
||||
if (value && env0_12.current != null) {
|
||||
current = env0_12.current;
|
||||
if (current != null) {
|
||||
current.unzoom({animated: false});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82102() { // fn#82102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2194, offset: 0x01eeb6c3, size: 115 bytes, params: 1, frame: 15
|
||||
var current;
|
||||
var width;
|
||||
var height;
|
||||
var resetIOSScrollZoomBinding;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (!platformUtilsModule.isAndroid()) {
|
||||
current = env0_11.current;
|
||||
if (current != null) {
|
||||
if (env0_5 > 0) {
|
||||
if (env0_7 > 0) {
|
||||
current = env0_13.current;
|
||||
width = current.width;
|
||||
height = current.height;
|
||||
resetIOSScrollZoomBinding = resetIOSScrollZoom;
|
||||
current = env0_11.current;
|
||||
resetIOSScrollZoomBinding(current, width, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun82103() { // fn#82103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2350, offset: 0x01eeb736, size: 39 bytes, params: 1, frame: 4
|
||||
return {width: env0_5 * env0_14, height: env0_7 * env0_14};
|
||||
}
|
||||
|
||||
function _fun82105() { // fn#82105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2462, offset: 0x01eeb75d, size: 147 bytes, params: 1, frame: 15
|
||||
let Math = global.Math;
|
||||
const value3 = Math.min(env0_5 * env0_14, env0_1);
|
||||
Math = global.Math;
|
||||
const value5 = Math.min(env0_7 * env0_14, env0_3);
|
||||
return {position: 'absolute', left: (env0_1 - value3) / 2, top: (env0_3 - value5) / 2, width: value3,
|
||||
height: value5, alignItems: 'center', justifyContent: 'center', overflow: 'hidden'};
|
||||
}
|
||||
|
||||
function _fun82106() { // fn#82106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2671, offset: 0x01eeb7f0, size: 23 bytes, params: 1, frame: 3
|
||||
return {width: env0_1, height: env0_3};
|
||||
}
|
||||
|
||||
function _fun82107() { // fn#82107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2718, offset: 0x01eeb807, size: 126 bytes, params: 1, frame: 15
|
||||
let Math = global.Math;
|
||||
const value3 = Math.min(env0_7 * env0_14, env0_3);
|
||||
Math = global.Math;
|
||||
return {position: 'absolute', top: env0_3 / 2 - value3 / 2,
|
||||
right: env0_1 / 2 - Math.min(env0_5 * env0_14, env0_1) / 2};
|
||||
}
|
||||
|
||||
function _fun82098() { // fn#82098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1732, offset: 0x01eeb52b, size: 58 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
if (env1_11.current != null) {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
resetIOSScrollZoom(env1_11.current, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
/* Metro module 12083; source: modules/video_calls/native/components/useModalPanGesture.tsx; dependencies: [4017, 5321, 4577, 5080, 2] */
|
||||
function _fun92848(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:6, offset: 0x0209b67f, size: 167 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object = {code: "function useModalPanGestureTsx1({velocityY:velocityY}){const{translateY,thresholdTranslate,thresholdVelocity,withSpring,height,runOnJS,ModalActionCreators,onClose,onEnd}=this.__closure;const config={damping:15,mass:1,stiffness:250,overshootClamping:true,restSpeedThreshold:0.001,restDisplacementThreshold:0.001,velocity:velocityY};if(translateY.get()>=thresholdTranslate||velocityY>=thresholdVelocity){translateY.set(withSpring(height,config,'respect-motion-settings',function(){runOnJS(ModalActionCreators.pop)();}));if(onClose!=null){runOnJS(onClose)();}}else{translateY.set(withSpring(0,config));}if(onEnd!=null){runOnJS(onEnd)();}}"};
|
||||
object = {code: 'function useModalPanGestureTsx2({translationY:translationY}){const{translateY,interpolate,start,maxTranslate,Extrapolate}=this.__closure;translateY.set(interpolate(start.get().y+translationY,[0,maxTranslate],[0,maxTranslate],Extrapolate.CLAMP));}'};
|
||||
object = {code: 'function useModalPanGestureTsx3(){const{onStart,runOnJS,start,translateY}=this.__closure;if(onStart!=null){runOnJS(onStart)();}start.set({y:translateY.get()});}'};
|
||||
object = {code: 'function useModalPanGestureTsx4(){const{runOnJS,ModalActionCreators}=this.__closure;runOnJS(ModalActionCreators.pop)();}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/useModalPanGesture.tsx');
|
||||
exports.default = useModalPanGesture;
|
||||
}
|
||||
|
||||
function useModalPanGesture({thresholdVelocity, gestureEnabled, maxTranslate, thresholdTranslate, height, translateY, onStart, onEnd, onClose}) { // fn#92849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:1409, offset: 0x0209b726, size: 573 bytes, params: 2, frame: 27
|
||||
var object2;
|
||||
thresholdVelocity = thresholdVelocity === undefined ? 500 : thresholdVelocity;
|
||||
const env0_3 = height;
|
||||
const env0_4 = translateY;
|
||||
const env0_5 = onStart;
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({y: 0});
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value4 = Gesture.Pan().enabled(gestureEnabled);
|
||||
const onStart2 = value4.onStart;
|
||||
let closure = useModalPanGestureJ;
|
||||
object2 = {onStart: onStart};
|
||||
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.runOnJS = runOnJS;
|
||||
object2.start = value2;
|
||||
object2.translateY = translateY;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 15847989720945;
|
||||
closure.__initData = env0_5;
|
||||
const value5 = Reflect.apply(onStart2, value4, [closure]);
|
||||
const onUpdate = value5.onUpdate;
|
||||
closure = useModalPanGestureX;
|
||||
object2 = {translateY: translateY};
|
||||
object2.interpolate = (require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate;
|
||||
object2.start = value2;
|
||||
object2.maxTranslate = maxTranslate;
|
||||
const Extrapolate = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolate;
|
||||
object2.Extrapolate = Extrapolate;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 6809176231356;
|
||||
closure.__initData = env0_4;
|
||||
const value6 = Reflect.apply(onUpdate, value5, [closure]);
|
||||
const onEnd2 = value6.onEnd;
|
||||
closure = useModalPanGestureO;
|
||||
object2 = {translateY: translateY, thresholdTranslate: thresholdTranslate, thresholdVelocity: thresholdVelocity};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.height = height;
|
||||
object2.runOnJS = runOnJS;
|
||||
object2.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
||||
object2.onClose = onClose;
|
||||
object2.onEnd = onEnd;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 16881029664873;
|
||||
closure.__initData = env0_3;
|
||||
let value = Reflect.apply(onEnd2, value6, [closure]);
|
||||
value = value.failOffsetY(-0.01);
|
||||
return value.activeOffsetY([-5, 15]);
|
||||
}
|
||||
|
||||
function useModalPanGestureJ() { // fn#92850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:1660, owner: useModalPanGesture.J, offset: 0x0209b963, size: 92 bytes, params: 1, frame: 13
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (onStart != null) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS(onStart)();
|
||||
}
|
||||
const binding = env0_8;
|
||||
const set = binding.set;
|
||||
const object2 = {};
|
||||
object2.y = translateY.get();
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
}
|
||||
|
||||
function useModalPanGestureX({translationY}) { // fn#92851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:1851, owner: useModalPanGesture.x, offset: 0x0209b9bf, size: 149 bytes, params: 2, frame: 23
|
||||
const translateYBinding = translateY;
|
||||
const set = translateYBinding.set;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
const binding = env0_8;
|
||||
const get = binding.get;
|
||||
const value3 = Reflect.apply(get, binding, []).y + translationY;
|
||||
const maxTranslateBinding = maxTranslate;
|
||||
const items3 = [0];
|
||||
items3[1] = maxTranslateBinding;
|
||||
const items2 = [0];
|
||||
items2[1] = maxTranslateBinding;
|
||||
const Extrapolate = reanimatedRexportModule.Extrapolate;
|
||||
const CLAMP = Extrapolate.CLAMP;
|
||||
Reflect.apply(set, translateYBinding, [Reflect.apply(interpolate, reanimatedRexportModule, [value3, items3, items2,
|
||||
CLAMP])]);
|
||||
}
|
||||
|
||||
function useModalPanGestureO({velocityY}) { // fn#92852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:2129, owner: useModalPanGesture.O, offset: 0x0209ba54, size: 372 bytes, params: 2, frame: 26
|
||||
var environment;
|
||||
var set;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var withSpring;
|
||||
var value4;
|
||||
var moduleValue2;
|
||||
var heightBinding;
|
||||
var closure;
|
||||
var object3;
|
||||
var moduleValue3;
|
||||
var value5;
|
||||
var moduleValue4;
|
||||
const object4 = {'damping': 15, 'mass': 1, 'stiffness': 250, 'overshootClamping': true, 'restSpeedThreshold': 0.001,
|
||||
'restDisplacementThreshold': 0.001};
|
||||
object4.velocity = velocityY;
|
||||
if (translateY.get() >= thresholdTranslate) {
|
||||
translateYBinding = translateY;
|
||||
set = translateYBinding.set;
|
||||
value4 = environment.__proto__;
|
||||
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
|
||||
withSpring = moduleValue2.withSpring;
|
||||
heightBinding = height;
|
||||
closure = function() {
|
||||
require(dependencyMap[0]).runOnJS(importDefault(dependencyMap[3]).pop)();
|
||||
};
|
||||
object3 = {};
|
||||
object3.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object3.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
||||
closure.__closure = object3;
|
||||
closure.__workletHash = 14223008059411;
|
||||
closure.__initData = env1_6;
|
||||
Reflect.apply(set, translateYBinding, [Reflect.apply(withSpring, moduleValue2, [heightBinding, object4,
|
||||
'respect-motion-settings', closure])]);
|
||||
if (onClose != null) {
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue3.runOnJS(onClose)();
|
||||
}
|
||||
} else if (velocityY >= thresholdVelocity) {
|
||||
translateYBinding = translateY;
|
||||
set = translateYBinding.set;
|
||||
value4 = environment.__proto__;
|
||||
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
|
||||
withSpring = moduleValue2.withSpring;
|
||||
heightBinding = height;
|
||||
closure = ON;
|
||||
object3 = {};
|
||||
object3.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object3.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
||||
closure.__closure = object3;
|
||||
closure.__workletHash = 14223008059411;
|
||||
closure.__initData = env1_6;
|
||||
Reflect.apply(set, translateYBinding, [Reflect.apply(withSpring, moduleValue2, [heightBinding, object4,
|
||||
'respect-motion-settings', closure])]);
|
||||
if (onClose != null) {
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue3.runOnJS(onClose)();
|
||||
}
|
||||
} else {
|
||||
translateYBinding = translateY;
|
||||
set = translateYBinding.set;
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = require(4577) /* metro dependency 4577: spring */;
|
||||
Reflect.apply(set, translateYBinding, [moduleValue.withSpring(0, object4)]);
|
||||
}
|
||||
if (onEnd != null) {
|
||||
value5 = environment.__proto__;
|
||||
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue4.runOnJS(onEnd)();
|
||||
}
|
||||
}
|
||||
|
||||
function ON() { // fn#92853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:2359, owner: useModalPanGesture.O.n, offset: 0x0209bbc8, size: 62 bytes, params: 1, frame: 14
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
reanimatedRexportModule.runOnJS((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop)();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
/* Metro module 7736; source: modules/video_calls/native/components/usePipDimensions.tsx; dependencies: [31, 7737, 1478, 7717, 2] */
|
||||
function _fun61929(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7914:6, offset: 0x01b4eb76, size: 119 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/usePipDimensions.tsx');
|
||||
exports.default = usePipDimensions;
|
||||
}
|
||||
|
||||
function usePipDimensions({channelId, forcedOrientation}) { // fn#61930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7914:216, offset: 0x01b4ebed, size: 164 bytes, params: 2, frame: 18
|
||||
forcedOrientation = forcedOrientation === undefined ? null : forcedOrientation;
|
||||
const value2 = (require(7737) /* metro dependency 7737: useIsViewingActivity */).useIsViewingActivity({channelId: channelId});
|
||||
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
|
||||
return height.useMemo(_fun61931, [height, width, forcedOrientation, value2]);
|
||||
}
|
||||
|
||||
function _fun61931() { // fn#61931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7914:383, offset: 0x01b4ec91, size: 425 bytes, params: 1, frame: 18
|
||||
var r1;
|
||||
var r3;
|
||||
var r2;
|
||||
var Math;
|
||||
var value8;
|
||||
var value10;
|
||||
var value12;
|
||||
var value;
|
||||
const value2 = width > height;
|
||||
const forcedOrientationBinding = forcedOrientation;
|
||||
const OrientationType = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType;
|
||||
const LANDSCAPE = OrientationType.LANDSCAPE;
|
||||
const r4 = forcedOrientationBinding === LANDSCAPE || value2 && forcedOrientation !== OrientationType.PORTRAIT;
|
||||
const value6 = 96;
|
||||
if (env0_1) {
|
||||
r1 = value6;
|
||||
r2 = value6;
|
||||
} else if (value2) {
|
||||
if (value2) {
|
||||
if (value2) {
|
||||
if (r4) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.25 * width, 400);
|
||||
value12 = value * 0.5625;
|
||||
r1 = value;
|
||||
r2 = value12;
|
||||
} else {
|
||||
r3 = value2 && !r4;
|
||||
value10 = 1;
|
||||
if (r3) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.5 * height, 300);
|
||||
r1 = value * 0.5625;
|
||||
r2 = value;
|
||||
} else {
|
||||
r1 = value10;
|
||||
r2 = value10;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r3 = value2 && !r4;
|
||||
value10 = 1;
|
||||
if (r3) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.5 * height, 300);
|
||||
r1 = value * 0.5625;
|
||||
r2 = value;
|
||||
} else {
|
||||
r1 = value10;
|
||||
r2 = value10;
|
||||
}
|
||||
}
|
||||
} else if (r4) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.5 * width, 400);
|
||||
value8 = value * 0.5625;
|
||||
r1 = value;
|
||||
r2 = value8;
|
||||
} else if (value2) {
|
||||
if (r4) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.25 * width, 400);
|
||||
value12 = value * 0.5625;
|
||||
r1 = value;
|
||||
r2 = value12;
|
||||
} else {
|
||||
r3 = value2 && !r4;
|
||||
value10 = 1;
|
||||
if (r3) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.5 * height, 300);
|
||||
r1 = value * 0.5625;
|
||||
r2 = value;
|
||||
} else {
|
||||
r1 = value10;
|
||||
r2 = value10;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r3 = value2 && !r4;
|
||||
value10 = 1;
|
||||
if (r3) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.5 * height, 300);
|
||||
r1 = value * 0.5625;
|
||||
r2 = value;
|
||||
} else {
|
||||
r1 = value10;
|
||||
r2 = value10;
|
||||
}
|
||||
}
|
||||
} else if (r4) {
|
||||
if (value2) {
|
||||
if (value2) {
|
||||
if (r4) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.25 * width, 400);
|
||||
value12 = value * 0.5625;
|
||||
r1 = value;
|
||||
r2 = value12;
|
||||
} else {
|
||||
r3 = value2 && !r4;
|
||||
value10 = 1;
|
||||
if (r3) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.5 * height, 300);
|
||||
r1 = value * 0.5625;
|
||||
r2 = value;
|
||||
} else {
|
||||
r1 = value10;
|
||||
r2 = value10;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r3 = value2 && !r4;
|
||||
value10 = 1;
|
||||
if (r3) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.5 * height, 300);
|
||||
r1 = value * 0.5625;
|
||||
r2 = value;
|
||||
} else {
|
||||
r1 = value10;
|
||||
r2 = value10;
|
||||
}
|
||||
}
|
||||
} else if (r4) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.5 * width, 400);
|
||||
value8 = value * 0.5625;
|
||||
r1 = value;
|
||||
r2 = value8;
|
||||
} else if (value2) {
|
||||
if (r4) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.25 * width, 400);
|
||||
value12 = value * 0.5625;
|
||||
r1 = value;
|
||||
r2 = value12;
|
||||
} else {
|
||||
r3 = value2 && !r4;
|
||||
value10 = 1;
|
||||
if (r3) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.5 * height, 300);
|
||||
r1 = value * 0.5625;
|
||||
r2 = value;
|
||||
} else {
|
||||
r1 = value10;
|
||||
r2 = value10;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r3 = value2 && !r4;
|
||||
value10 = 1;
|
||||
if (r3) {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.5 * height, 300);
|
||||
r1 = value * 0.5625;
|
||||
r2 = value;
|
||||
} else {
|
||||
r1 = value10;
|
||||
r2 = value10;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Math = global.Math;
|
||||
value = Math.min(0.25 * height, 300);
|
||||
r1 = value * 0.5625;
|
||||
r2 = value;
|
||||
}
|
||||
return {height: r2, width: r1};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 7731; source: modules/video_calls/native/components/usePipPosition.tsx; dependencies: [57, 31, 587, 7732, 2] */
|
||||
function _fun61892(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7909:6, offset: 0x01b4d345, size: 131 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/usePipPosition.tsx');
|
||||
exports.default = usePipPosition;
|
||||
}
|
||||
|
||||
function usePipPosition() { // fn#61893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7909:242, offset: 0x01b4d3c8, size: 90 bytes, params: 1, frame: 15
|
||||
const binding = env0_3;
|
||||
const value = env0_2(binding.useState(function() {
|
||||
var Storage = require(dependencyMap[2]).Storage;
|
||||
var DEFAULT_PIP_POSITION = require(dependencyMap[3]).DEFAULT_PIP_POSITION;
|
||||
return Storage.get('CameraPreviewPosition', DEFAULT_PIP_POSITION);
|
||||
}), 2);
|
||||
const property = value[0];
|
||||
const env0_0 = value[1];
|
||||
const useCallback = binding.useCallback;
|
||||
return [property, Reflect.apply(useCallback, binding, [_fun61895, []])];
|
||||
}
|
||||
|
||||
function _fun61895(a0) { // fn#61895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7909:391, offset: 0x01b4d466, size: 65 bytes, params: 2, frame: 14
|
||||
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
||||
Storage.set('CameraPreviewPosition', a0);
|
||||
env0_0(a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
/* Metro module 7733; source: modules/video_calls/native/components/useShouldForcePipOrientation.tsx; dependencies: [1378, 4606, 1226, 4237, 4299, 7734, 566, 4610, 7717, 2] */
|
||||
function _fun61902(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7911:6, offset: 0x01b4da45, size: 202 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
||||
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const env0_6 = (require(4237) /* metro dependency 4237: Constants */).OrientationLockState;
|
||||
const callConstantsModule = require(4299) /* metro dependency 4299: CallConstants */;
|
||||
const env0_7 = callConstantsModule.isStreamParticipant;
|
||||
const env0_8 = callConstantsModule.ParticipantTypes;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/useShouldForcePipOrientation.tsx');
|
||||
exports.useShouldForcePipOrientation = useShouldForcePipOrientation;
|
||||
}
|
||||
|
||||
function useShouldForcePipOrientation({channel}) { // fn#61903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7911:347, offset: 0x01b4db0f, size: 396 bytes, params: 2, frame: 21
|
||||
var PORTRAIT;
|
||||
var r1;
|
||||
const OrientationType = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType;
|
||||
const value2 = (importDefault(7734) /* metro dependency 7734: usePipVideoOrStream */)(channel.id);
|
||||
let value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
|
||||
AuthenticationStore], function() {
|
||||
var value3 = ChannelRTCStore.getParticipant(channel.id, AuthenticationStore.getId());
|
||||
var value4 = null;
|
||||
return value4 != value3 ? value3.type !== ParticipantTypes.USER ? value4 : value4 != value3.streamId ? value3 : value4 : value4;
|
||||
});
|
||||
const {focusedEmbeddedActivityParticipant,
|
||||
activityLockOrientation} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore,
|
||||
ChannelRTCStore], _fun61905);
|
||||
const r3 = value2 != null ? value2.user.id === AuthenticationStore.getId() ? null : value2 : null;
|
||||
let r0 = focusedEmbeddedActivityParticipant ?? r3;
|
||||
if (r0 == null) {
|
||||
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
|
||||
r1 = OrientationType.LANDSCAPE;
|
||||
} else {
|
||||
PORTRAIT = OrientationLockState.PORTRAIT;
|
||||
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
|
||||
r1 = PORTRAIT;
|
||||
}
|
||||
r0 = r1;
|
||||
} else if (isStreamParticipant(r0)) {
|
||||
if (value3 != null) {
|
||||
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
|
||||
r1 = OrientationType.LANDSCAPE;
|
||||
} else {
|
||||
PORTRAIT = OrientationLockState.PORTRAIT;
|
||||
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
|
||||
r1 = PORTRAIT;
|
||||
}
|
||||
r0 = r1;
|
||||
} else if (r3 == null) {
|
||||
r0 = OrientationType.LANDSCAPE;
|
||||
} else if (r3.id !== r0.id) {
|
||||
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
|
||||
r1 = OrientationType.LANDSCAPE;
|
||||
} else {
|
||||
PORTRAIT = OrientationLockState.PORTRAIT;
|
||||
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
|
||||
r1 = PORTRAIT;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = OrientationType.LANDSCAPE;
|
||||
}
|
||||
} else if (activityLockOrientation !== OrientationLockState.LANDSCAPE) {
|
||||
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
|
||||
r1 = OrientationType.LANDSCAPE;
|
||||
} else {
|
||||
PORTRAIT = OrientationLockState.PORTRAIT;
|
||||
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
|
||||
r1 = PORTRAIT;
|
||||
}
|
||||
r0 = r1;
|
||||
} else if (value3 != null) {
|
||||
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
|
||||
r1 = OrientationType.LANDSCAPE;
|
||||
} else {
|
||||
PORTRAIT = OrientationLockState.PORTRAIT;
|
||||
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
|
||||
r1 = PORTRAIT;
|
||||
}
|
||||
r0 = r1;
|
||||
} else if (r3 == null) {
|
||||
r0 = OrientationType.LANDSCAPE;
|
||||
} else if (r3.id !== r0.id) {
|
||||
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
|
||||
r1 = OrientationType.LANDSCAPE;
|
||||
} else {
|
||||
PORTRAIT = OrientationLockState.PORTRAIT;
|
||||
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
|
||||
r1 = PORTRAIT;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = OrientationType.LANDSCAPE;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun61905() { // fn#61905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7911:600, offset: 0x01b4dcfc, size: 190 bytes, params: 1, frame: 19
|
||||
var r4;
|
||||
var moduleValue;
|
||||
const value = environment.__proto__;
|
||||
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
|
||||
const getSelectedParticipant = ChannelRTCStore.getSelectedParticipant;
|
||||
let id = channel.id;
|
||||
const value4 = Reflect.apply(getSelectedParticipant, ChannelRTCStore, [id]);
|
||||
const value5 = null;
|
||||
const value6 = undefined;
|
||||
if (value5 != (value5 == currentEmbeddedActivity ? value6 : currentEmbeddedActivity.applicationId)) {
|
||||
id = value5 == value4 ? value6 : value4.id;
|
||||
moduleValue = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
|
||||
r4 = id !== moduleValue.getEmbeddedActivityParticipantId({applicationId: currentEmbeddedActivity.applicationId,
|
||||
instanceId: currentEmbeddedActivity.compositeInstanceId}) ? value5 : value4;
|
||||
} else {
|
||||
r4 = value5;
|
||||
}
|
||||
return {focusedEmbeddedActivityParticipant: r4,
|
||||
activityLockOrientation: value5 == currentEmbeddedActivity ? value5 : EmbeddedActivitiesStore.getPipOrientationLockStateForApp(currentEmbeddedActivity.applicationId)};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user