/* Metro module 10864; source: components_native/calls/RTCDebugOverlay.tsx; dependencies: [31, 27, 1379, 1867, 4294, 10865, 4395, 1878, 4291, 33, 4501, 4000, 697, 1305, 566, 4805, 10867, 10866, 694, 6618, 4578, 1244, 2] */ import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */ import StreamRTCConnectionStore from '../../stores/StreamRTCConnectionStore.tsx'; /* Metro dependency 4395 */ import RTCDebugStore from '../../stores/RTCDebugStore.tsx'; /* Metro dependency 10865 */ import RTCConnectionUtils from '../../utils/RTCConnectionUtils.tsx'; /* Metro dependency 10867 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */ import * as ColorUtilsModule from '../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */ import * as ConstantsModule from '../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */ import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as ButtonNativeModule from '../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */ import * as SafeAreaViewModule from '../common/SafeAreaView.tsx'; /* Metro dependency 6618 */ import * as RTCDebugActionCreatorsModule from '../../actions/RTCDebugActionCreators.tsx'; /* Metro dependency 10866 */ function _fun83197(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:6, offset: 0x01f10f6e, size: 700 bytes, params: 8, frame: 27 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const StyleSheet = ReactNativeModule.StyleSheet; const MediaEngineContextTypes = (ConstantsModule).MediaEngineContextTypes; const asString_83212 = function(a0) { return String(a0); }; const createStyles = CreateStylesModule.createStyles; object = {}; const object2 = {}; copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined); const hexWithOpacity = ColorUtilsModule.hexWithOpacity; const BLACK = (Native).unsafe_rawColors.BLACK; object2['backgroundColor'] = Reflect.apply(hexWithOpacity, ColorUtilsModule, [BLACK, 0.7]); object.container = object2; object.scroller = {'flex': 1, 'margin': 8}; object.indent = {marginLeft: 16}; object.row = {flexDirection: 'row'}; const WHITE = (Native).unsafe_rawColors.WHITE; object.text = {color: WHITE, fontSize: 14}; object.buttonClose = {'flexGrow': 0, 'margin': 8}; const env0_18 = Reflect.apply(createStyles, CreateStylesModule, [object]); const env0_19 = ReactModule.memo(_fun83213); const env0_20 = ReactModule.memo(_fun83214); object = {}; const DEFAULT = MediaEngineContextTypes.DEFAULT; object[DEFAULT] = DefaultContextInfo; const STREAM = MediaEngineContextTypes.STREAM; object[STREAM] = StreamContextInfo; (FileImportTrackerModule).fileFinishedImporting('components_native/calls/RTCDebugOverlay.tsx'); exports.default = RTCDebugOverlay; function Text_83198(a0) { // fn#83198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:636, offset: 0x01f1122a, size: 77 bytes, params: 2, frame: 15 const styles = useStyles(); const LegacyText = (NativeModule).LegacyText; return ; } function Section({title, children}) { // fn#83199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:714, offset: 0x01f11277, size: 122 bytes, params: 2, frame: 20 const styles = useStyles(); return ( <> {title} {':'} {children} ); } function ObjectKV({obj}) { // fn#83200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:848, offset: 0x01f112f1, size: 66 bytes, params: 2, frame: 12 const env0_0 = useStyles(); const Object = global.Object; return Object.entries(obj).map(_fun83201); function _fun83201(a0) { // fn#83201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:915, offset: 0x01f11333, size: 312 bytes, params: 2, frame: 22 var r0; var r1; var r2; var r9; var item3; var value3; var value4; var value7; var object2; var items2; var value9; const iterator = a0[Symbol.iterator](); const iterator2 = iterator.next; let item2 = Reflect.apply(iterator2, iterator, []); let item = item2.value; item2 = item2.done ? undefined : iterator; const value = undefined; const value2 = item2 === value; const r4 = value2 ? value : item; if (value2) { r0 = item2; r1 = value2; r2 = value; } else { item3 = Reflect.apply(iterator2, item2, []); item = item3.value; item3 = item3.done ? undefined : item2; value3 = item3 === value; if (value3) { r0 = item3; r1 = value3; r2 = value; } else { r0 = item3; r1 = value3; r2 = item; } } if (!r1) { r0.return(); } const Array = global.Array; if (Array.isArray(r2)) { value4 = r2.at(-1); r9 = typeof (value4 == null ? value : value4.value) !== 'number' ? r2 : r2.at(-1).value; } else { r9 = r2; } if (r9 == null) { value7 = environment.__proto__; var viewProps = {style: styles.row}; items2 = [r4, ': ']; items2[2] = asString_83212(r9); r0 = ( {items2} ); } else if (typeof r9 === 'object') { value9 = environment.__proto__; r0 = (
); } else { value7 = environment.__proto__; var viewProps = {style: styles.row}; items2 = [r4, ': ']; items2[2] = asString_83212(r9); r0 = ( {items2} ); } return r0; } } function RTCDebugGeneral() { // fn#83202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1485, offset: 0x01f1146b, size: 295 bytes, params: 1, frame: 24 const {guildId, channelId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RTCConnectionStore], function() { var object = {}; object.guildId = RTCConnectionStore.getGuildId(); object.channelId = RTCConnectionStore.getChannelId(); return object; }, []); const fluxModule = require(566) /* metro dependency 566: flux */; let useStateFromStores = fluxModule.useStateFromStores; const value3 = Reflect.apply(useStateFromStores, fluxModule, [[GuildStore], function() { return GuildStore.getGuild(guildId); }, [guildId]]); const moduleValue3 = fluxModule; useStateFromStores = moduleValue3.useStateFromStores; const value5 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(Reflect.apply(useStateFromStores, moduleValue3, [[ChannelStore], function() { return ChannelStore.getChannel(channelId); }, [channelId]])); const value = null; return (
); } function renderContextInfo(a0) { // fn#83206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2579, offset: 0x01f115bd, size: 39 bytes, params: 2, frame: 14 const property = env0_21[a0]; const value2 = null; return ( value2 != property ? ((Component) => )(property) : value2 ); } function RTCDebugContext({context}) { // fn#83207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2648, offset: 0x01f115e4, size: 121 bytes, params: 2, frame: 16 var r0; let value = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCDebugStore], function() { return RTCDebugStore.getAllStats(context); }, [context]); if (value == null) { r0 = null; } else if (value.length === 0) { r0 = null; } else { value = value.map(_fun83209); r0 = value; } return r0; function _fun83209(a0) { // fn#83209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2794, offset: 0x01f11678, size: 309 bytes, params: 2, frame: 25 var environment; const value = environment.__proto__; const object = {}; const contextBinding = context; object.title = '' + contextBinding + ' - ' + a0.mediaEngineConnectionId; const items2 = [renderContextInfo(contextBinding)]; items2[1] = (
); items2[2] = (
{a0.rtp.outbound.map(_fun83210)}
); const inbound = a0.rtp.inbound; const Object = global.Object; const value4 = Object.keys(inbound); items2[3] = ( value4.length === 0 ? null : (
{value4.map(_fun83211)}
) ); return (
{items2}
); function _fun83210(a0, a1) { // fn#83210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3029, offset: 0x01f117ad, size: 34 bytes, params: 3, frame: 15 return ((Component) => )(env2_19); } function _fun83211(a0) { // fn#83211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3152, offset: 0x01f117cf, size: 46 bytes, params: 2, frame: 15 return ((Component) => )(env2_20); } } } function _fun83213({data}) { // fn#83213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1194, offset: 0x01f11805, size: 88 bytes, params: 2, frame: 17 const type = data.type; let value = Object.create(null); value.type = 0; value = copyDataProperties({}, data, value, undefined); return (
); } function _fun83214({userId, data}) { // fn#83214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1284, offset: 0x01f1185d, size: 199 bytes, params: 2, frame: 20 const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() { return UserStore.getUser(userId); }, [userId]); const value3 = '' + userId; return (
{data.map(_fun83216)}
); function _fun83216(a0, a1) { // fn#83216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1455, offset: 0x01f1193f, size: 34 bytes, params: 3, frame: 15 return ((Component) => )(env1_19); } } function DefaultContextInfo() { // fn#83217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:1929, offset: 0x01f11961, size: 86 bytes, params: 1, frame: 17 return ( ); function _fun83218() { // fn#83218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2005, offset: 0x01f119b7, size: 196 bytes, params: 1, frame: 14 const object = {}; object.mediaSessionId = RTCConnectionStore.getMediaSessionId(); object.state = RTCConnectionStore.getState(); const defaultImport = RTCConnectionUtils; const getShortHostname = defaultImport.getShortHostname; rtcConnectionStoreBinding = RTCConnectionStore; const getHostname = rtcConnectionStoreBinding.getHostname; object.hostname = Reflect.apply(getShortHostname, defaultImport, [Reflect.apply(getHostname, rtcConnectionStoreBinding, [])]); object.quality = RTCConnectionStore.getQuality(); object.averagePing = RTCConnectionStore.getAveragePing(); object.lastPing = RTCConnectionStore.getLastPing(); object.outboundLossRate = RTCConnectionStore.getOutboundLossRate(); object.duration = RTCConnectionStore.getDuration(); return object; } } function StreamContextInfo() { // fn#83219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2312, offset: 0x01f11a7b, size: 110 bytes, params: 1, frame: 18 const streamRTCConnectionStoreBinding = StreamRTCConnectionStore; return ( ); function _fun83220() { // fn#83220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:2419, offset: 0x01f11ae9, size: 99 bytes, params: 1, frame: 14 const object = {}; let value = environment.__proto__; const streamRTCConnectionStoreBinding = StreamRTCConnectionStore; const getMediaSessionId = streamRTCConnectionStoreBinding.getMediaSessionId; const binding = env0_0; object.mediaSessionId = Reflect.apply(getMediaSessionId, streamRTCConnectionStoreBinding, [binding]); value = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; const getShortHostname = value.getShortHostname; const getHostname = streamRTCConnectionStoreBinding.getHostname; object.hostname = Reflect.apply(getShortHostname, value, [Reflect.apply(getHostname, streamRTCConnectionStoreBinding, [binding])]); object.quality = streamRTCConnectionStoreBinding.getQuality(binding); return object; } } function RTCDebugOverlay({onClose, style}) { // fn#83221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11050:3321, offset: 0x01f11b4c, size: 364 bytes, params: 2, frame: 26 const styles = useStyles(); env0_4.useEffect(_fun83222, []); const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView; const items3 = [styles.container, style]; const items2 = [ , ]; const Object = global.Object; const value3 = Object.values(MediaEngineContextTypes); items2[1] = value3.map(_fun83224); const scrollView = ( {items2} ); const Button = (ButtonNativeModule).Button; const intl = (IndexNativeModule).intl; return ( {scrollView}