/* Metro module 15833; source: modules/calls/native/TelecomManager.android.tsx; dependencies: [5, 6, 7, 15, 17, 18, 27, 10757, 4492, 1226, 4258, 1379, 4259, 10907, 4294, 3793, 3996, 1878, 661, 4291, 3, 8070, 4796, 8916, 7709, 8899, 10600, 10794, 1581, 15834, 4805, 10756, 4860, 2] */ import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */ import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */ import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */ import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */ import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */ import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */ import StreamerModeStore from '../../../stores/StreamerModeStore.tsx'; /* Metro dependency 3996 */ import CallStore from '../../../stores/CallStore.tsx'; /* Metro dependency 4258 */ import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */ import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */ import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */ import NativeAppLifecycleModule from '../../../external/discord_common/js/packages/rtn-codegen/js/NativeAppLifecycleModule.tsx'; /* Metro dependency 8070 */ import SoundpackStore from '../../soundpacks/SoundpackStore.tsx'; /* Metro dependency 10757 */ import NotificationSettingsStore from '../../../stores/NotificationSettingsStore.tsx'; /* Metro dependency 10907 */ 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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as MetaQuestUtilsAndroidModule from '../../device/MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */ import * as ConstantsModule2 from '../../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */ function _fun121680(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:6, offset: 0x0254dcce, size: 653 bytes, params: 8, frame: 24 const env0_0 = require; const _arrayLikeToArray_121683 = function(a0, a1) { var r0; var r1; var r2; var value3; var length; var value5; var value = undefined; var value2 = value == null; reducibleJoin2: while (true) { if (value2) { r0 = value2; break reducibleJoin2; } value3 = value > a0.length; r0 = value3; break reducibleJoin2; } reducibleJoin4: while (true) { if (r0) { length = a0.length; r1 = length; break reducibleJoin4; } r1 = value; break reducibleJoin4; } value = (0, global.Array)(r1); var value4 = 0; if (value4 < r1) { r2 = value4; reducibleLoop5: while (true) { value[r2] = a0[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (value5 < r1) { r2 = value5; continue reducibleLoop5; } break reducibleLoop5; } } return value; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactNativeModule; const env0_9 = value.DeviceEventEmitter; const NativeEventEmitter = value.NativeEventEmitter; value = importDefault(3) /* metro dependency 3: Logger */; value = new value('TelecomManager'); value.enableNativeLogger(true); object = {Ringing: 0}; object[0] = 'Ringing'; object.Connecting = 1; object[1] = 'Connecting'; object.Connected = 2; object[2] = 'Connected'; let nativeEventEmitter = new NativeEventEmitter(NativeAppLifecycleModule); nativeEventEmitter = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */; nativeEventEmitter = _fun121687(nativeEventEmitter); nativeEventEmitter = new nativeEventEmitter(); (FileImportTrackerModule).fileFinishedImporting('modules/calls/native/TelecomManager.android.tsx'); exports.default = nativeEventEmitter; function _createForOfIteratorHelperLoose_121681(a0, a1) { // fn#121681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:407, offset: 0x0254df5b, size: 372 bytes, params: 3, frame: 20 var r6; var r9; var r5; var value3; var regexp; const env0_0 = a0; const Symbol = global.Symbol; let value = typeof Symbol !== 'undefined'; let r1 = value && a0[global.Symbol.iterator]; r1 = !r1 ? a0['@@iterator'] : r1; if (r1) { value = r1.call(a0); return value.next.bind(value); } const Array = global.Array; if (Array.isArray(a0)) { if (r1) { } return _fun121682; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_121683(a0, value); r5 = value; } else { value3 = ({}).toString.call(a0).slice(8, -1); r6 = value3 === 'Object' && a0.constructor; r9 = r6 ? a0.constructor.name : value3; if (r9 === 'Map') { r6 = global.Array.from(a0); } else if (r9 === 'Set') { r6 = global.Array.from(a0); } else if (r9 === 'Arguments') { value = _arrayLikeToArray_121683(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_121683(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun121682; } const TypeError = global.TypeError; throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); function _fun121682() { // fn#121682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:978, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5 return env0_1 >= env0_0.length ? {done: true} : {done: false, value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]}; } } function _isNativeReflectConstruct_121684() { // fn#121684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:1317, offset: 0x0254e0cf, 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_121684_isNativeReflectConstruct = function() { return !!result; })(); } function _fun121687(a0) { // fn#121687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:1951, offset: 0x0254e131, size: 645 bytes, params: 2, frame: 17 const TelecomManager2 = TelecomManager; Inherits(TelecomManager2, a0); const items2 = [{key: '_initialize', value: value_121709}]; items2[1] = {key: '_terminate', value: value_121710}; items2[2] = {key: 'isEnabled', value: function() { return this.isInitialized; }}; items2[3] = {key: 'processIncomingRing', value: value_121713}; items2[4] = {key: 'reportIncomingCall', value: value_121714}; items2[5] = {key: 'cancelIncomingCall', value: value_121717}; items2[6] = {key: 'isPendingIncomingCall', value: value_121720}; items2[7] = {key: 'reconcileTelecomState', value: value_121721}; const env0_1 = Module00005(_fun121724); items2[8] = {key: 'doReconcile', value: value_121726}; items2[9] = {key: 'handleIncomingCallStoreChange', value: value_121727}; const env0_0 = Module00005(_fun121733); items2[10] = {key: 'startCall', value: value_121734}; items2[11] = {key: 'endCall', value: value_121735}; items2[12] = {key: 'reportCallEnded', value: value_121738}; items2[13] = {key: 'setCallActive', value: value_121739}; items2[14] = {key: 'setIncomingCallActive', value: value_121740}; items2[15] = {key: 'clearScreenShareState', value: function() { this.lastScreenShareActive = null; }}; items2[16] = {key: 'clearPendingScreenShareOffSync', value: function() { if (this.pendingScreenShareOffSyncTimeout != null) { global.clearTimeout(this.pendingScreenShareOffSyncTimeout); this.pendingScreenShareOffSyncTimeout = null; } }}; items2[17] = {key: 'clearCall', value: function(a0) { var property = this.currentCall; var value = undefined; if ((property == null ? value : property.channelId) === a0) { this.stopRingtone(); this.currentCall = null; this.lastMuteState = null; this.pendingMutePreference = null; this.clearScreenShareState(); this.clearPendingScreenShareOffSync(); } return value; }}; items2[18] = {key: 'startRingtone', value: value_121744}; items2[19] = {key: 'stopRingtone', value: function() { var ringtone = this.ringtone; if (ringtone != null) { this.ringtone = null; ringtone.stop(); } }}; items2[20] = {key: 'handleMuteStoreChange', value: value_121746}; items2[21] = {key: 'handleScreenShareStoreChange', value: value_121747}; return CreateClass(TelecomManager2, items2); function TelecomManager(a0) { // fn#121688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:1963, offset: 0x0254e3b6, size: 537 bytes, params: 2, frame: 21 var r0; var Reflect; let value = copyRestArgs(0, undefined); let binding = env1_4; binding(this, TelecomManager); const items2 = []; arraySpread(items2, value, 0, items2); value = env1_7(TelecomManager); binding = env1_6; if (_isNativeReflectConstruct_121684()) { Reflect = global.Reflect; value = Reflect.construct(value, items2, env1_7(this).constructor); r0 = value; } else { value = value.apply(this, items2); r0 = value; } value = binding(this, r0); const Map = global.Map; const map = new Map(); let set = map.set; const value6 = Reflect.apply(set, map, [RTCConnectionStore, _fun121689]); const value7 = value6.set(MediaEngineStore, _fun121690); const value8 = value7.set(ApplicationStreamingStore, _fun121691); value.stores = value8.set(CallStore, _fun121692); value.actions = {CALL_CREATE: CALL_CREATE_121693, CALL_UPDATE: CALL_UPDATE_121694, CALL_DELETE: CALL_DELETE_121695}; value.currentCall = null; value.isInitialized = false; value.lastMuteState = null; const Set = global.Set; const value9 = Object.create(Set.prototype, {constructor: {value: Set}}); set = new Set(); value.registeredIncomingCallIds = set instanceof Object ? set : value9; value.lastScreenShareActive = null; value.pendingScreenShareOffSyncTimeout = null; value.reconcilePromise = null; value.needsReconcile = false; value.hostDestroySubscription = null; value.pendingMutePreference = null; value.ringtone = null; value.handleHostDestroy = handleHostDestroy; value.handleEndCallRequested = handleEndCallRequested; value.handleSetForegroundRequested = handleSetForegroundRequested; value.handleMicMuteRequested = handleMicMuteRequested; value.handleScreenShareRequested = handleScreenShareRequested; value.handleAnswerCallRequested = handleAnswerCallRequested; value.handleCallCreate = handleCallCreate_121702; value.handleCallUpdate = handleCallUpdate_121703; value.handleCallDelete = handleCallDelete_121704; value.handleIncomingCallAnswered = handleIncomingCallAnswered; value.handleIncomingCallRejected = handleIncomingCallRejected; return value; function _fun121689() { // fn#121689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:2217, offset: 0x0254e5cf, size: 19 bytes, params: 1, frame: 9 return env0_0.reconcileTelecomState(); } function _fun121690() { // fn#121690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:2256, offset: 0x0254e5e2, size: 21 bytes, params: 1, frame: 9 return env0_0.handleMuteStoreChange(); } function _fun121691() { // fn#121691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:2295, offset: 0x0254e5f7, size: 21 bytes, params: 1, frame: 9 return env0_0.handleScreenShareStoreChange(); } function _fun121692() { // fn#121692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:2341, offset: 0x0254e60c, size: 21 bytes, params: 1, frame: 9 return env0_0.handleIncomingCallStoreChange(); } function TelecomManagerCALL_CREATE(a0) { // fn#121693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:2404, owner: TelecomManager.CALL_CREATE, offset: 0x0254e621, size: 23 bytes, params: 2, frame: 11 return env0_0.handleCallCreate(a0); } function TelecomManagerCALL_UPDATE(a0) { // fn#121694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:2441, owner: TelecomManager.CALL_UPDATE, offset: 0x0254e638, size: 23 bytes, params: 2, frame: 11 return env0_0.handleCallUpdate(a0); } function TelecomManagerCALL_DELETE(a0) { // fn#121695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:2478, owner: TelecomManager.CALL_DELETE, offset: 0x0254e64f, size: 23 bytes, params: 2, frame: 11 return env0_0.handleCallDelete(a0); } function handleHostDestroy() { // fn#121696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:2808, owner: TelecomManager.handleHostDestroy, offset: 0x0254e666, size: 176 bytes, params: 1, frame: 13 var currentCall; var state; var value2; let binding = env0_0; if (binding.isEnabled()) { currentCall = env0_0.currentCall; if (currentCall == null) { return undefined; } currentCall = env0_0.currentCall; state = currentCall.state; value2 = environment.__proto__.__proto__; if (state === env2_24.Ringing) { binding = env2_23; binding.info('Activity destroyed with ringing call, cancelling incoming call'); binding = env0_0; binding.cancelIncomingCall(binding.currentCall.channelId); return undefined; } binding = env2_23; binding.info('Activity destroyed with active call, disconnecting from voice channel'); (importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).disconnect(); } } function handleEndCallRequested(a0) { // fn#121697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:3147, owner: TelecomManager.handleEndCallRequested, offset: 0x0254e716, size: 254 bytes, params: 2, frame: 16 var r0; var binding2; var defaultImport2; var stopRinging; var clearCall; let value = environment.__proto__.__proto__; let binding = env2_23; let info = binding.info; let callId = a0.callId; Reflect.apply(info, binding, ['Received end call request from Call Bar:', callId]); let currentCall = env0_0.currentCall; if (currentCall != null) { callId = a0.callId; currentCall = env0_0.currentCall; var channelId = currentCall.channelId; if (callId === channelId) { currentCall = env0_0.currentCall; if (currentCall.state === env2_24.Ringing) { binding = env2_23; info = binding.info; binding2 = env0_0; currentCall = binding2.currentCall; channelId = currentCall.channelId; Reflect.apply(info, binding, ['Rejecting ringing call from Call Bar:', channelId]); value = undefined; defaultImport2 = importDefault(8916) /* metro dependency 8916: CallActionCreators */; stopRinging = defaultImport2.stopRinging; currentCall = binding2.currentCall; channelId = currentCall.channelId; Reflect.apply(stopRinging, defaultImport2, [channelId]); clearCall = binding2.clearCall; currentCall = binding2.currentCall; channelId = currentCall.channelId; Reflect.apply(clearCall, binding2, [channelId]); r0 = value; } else { value = undefined; (importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).disconnect(); r0 = value; } return r0; } } } function handleSetForegroundRequested(a0) { // fn#121698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:3530, owner: TelecomManager.handleSetForegroundRequested, offset: 0x0254e814, size: 148 bytes, params: 2, frame: 14 var channelStoreBinding; var value3; const value = environment.__proto__.__proto__; env2_23.info('Received set foreground request from Call Bar'); if (env0_0.currentCall != null) { if (a0.callId === env0_0.currentCall.channelId) { channelStoreBinding = ChannelStore; value3 = channelStoreBinding.getChannel(env0_0.currentCall.channelId); if (value3 != null) { (require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).navigateToVoiceChannel(value3, 'Call Bar'); } } } } function handleMicMuteRequested(a0) { // fn#121699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:3777, owner: TelecomManager.handleMicMuteRequested, offset: 0x0254e8a8, size: 268 bytes, params: 2, frame: 19 const value = environment.__proto__.__proto__; let binding = env2_23; binding.info('Received mic mute request from Call Bar:', a0.callId, 'isMuted:', a0.isMuted); if (env0_0.currentCall != null && a0.callId === env0_0.currentCall.channelId) { if (!(env0_0.currentCall.state !== env2_24.Ringing && env0_0.currentCall.state !== env2_24.Connecting)) { env0_0.pendingMutePreference = a0.isMuted; } if (MediaEngineStore.isSelfMute() !== a0.isMuted) { binding = env2_23; binding.info('Updating Call Bar -> Discord mute state:', a0.isMuted); (importDefault(8899) /* metro dependency 8899: AudioActionCreators */).toggleSelfMute(); } } } function handleScreenShareRequested(a0) { // fn#121700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:4173, owner: TelecomManager.handleScreenShareRequested, offset: 0x0254e9b4, size: 417 bytes, params: 2, frame: 20 var r2; var videoPermission; var oSRequirement; const value = environment.__proto__.__proto__; let binding = env2_23; const info = binding.info; let callId = a0.callId; let isEnabled = a0.isEnabled; Reflect.apply(info, binding, ['Received screen share request from Call Bar:', callId, 'isEnabled:', isEnabled]); let currentCall = env0_0.currentCall; if (currentCall != null) { callId = a0.callId; currentCall = env0_0.currentCall; var channelId = currentCall.channelId; if (callId !== channelId) { return undefined; } var channelStoreBinding = ChannelStore; var getChannel = channelStoreBinding.getChannel; currentCall = env0_0.currentCall; channelId = currentCall.channelId; var value3 = Reflect.apply(getChannel, channelStoreBinding, [channelId]); if (value3 == null) { return undefined; } var currentUserActiveStream = ApplicationStreamingStore.getCurrentUserActiveStream(); r2 = currentUserActiveStream != null && currentUserActiveStream.state === ApplicationStreamStates.ACTIVE; isEnabled = a0.isEnabled; if (isEnabled) { if (r2) { if (!a0.isEnabled && r2) { env2_23.info('Stopping screen share from Call Bar'); (require(10794) /* metro dependency 10794: useScreenshareUtils */).stopScreenshare(); } return undefined; } videoPermission = (require(10600) /* metro dependency 10600: useHasVideoPermission */).getVideoPermission(value3); oSRequirement = (require(10794) /* metro dependency 10794: useScreenshareUtils */).getOSRequirement(); binding = env2_23; if (oSRequirement) { if (videoPermission) { binding.info('Starting screen share from Call Bar'); (require(10794) /* metro dependency 10794: useScreenshareUtils */).startStream(); return undefined; } binding.warn('Cannot start screen share from Call Bar: user lacks streaming permission in this channel'); return undefined; } binding.warn('Cannot start screen share from Call Bar: OS version does not meet requirements'); return undefined; } isEnabled = a0.isEnabled; if (!isEnabled && r2) { env2_23.info('Stopping screen share from Call Bar'); (require(10794) /* metro dependency 10794: useScreenshareUtils */).stopScreenshare(); } } } function handleAnswerCallRequested(a0) { // fn#121701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:4956, owner: TelecomManager.handleAnswerCallRequested, offset: 0x0254eb55, size: 271 bytes, params: 2, frame: 15 var channelId; var binding2; var selectVoiceChannel; let value = environment.__proto__.__proto__; let binding = env2_23; let info = binding.info; Reflect.apply(info, binding, ['Received answer call request from Call Bar:', a0.callId]); let currentCall = env0_0.currentCall; if (currentCall != null && a0.callId === env0_0.currentCall.channelId) { currentCall = env0_0.currentCall; if (currentCall.state === env2_24.Ringing) { binding = env0_0; binding.stopRingtone(); currentCall = binding.currentCall; currentCall.state = env2_24.Connecting; binding2 = env2_23; info = binding2.info; currentCall = binding.currentCall; channelId = currentCall.channelId; Reflect.apply(info, binding2, ['Answering incoming call, joining voice channel:', channelId]); value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */; selectVoiceChannel = value.selectVoiceChannel; currentCall = binding.currentCall; channelId = currentCall.channelId; Reflect.apply(selectVoiceChannel, value, [channelId]); } else { binding = env2_23; binding.warn('Answer requested but call is not ringing:', env0_0.currentCall.state); } } } function TelecomManagerHandleCallCreate(a0) { // fn#121702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:5393, owner: TelecomManager.handleCallCreate, offset: 0x0254ec64, size: 92 bytes, params: 2, frame: 15 let binding = env0_0; if (binding.isEnabled() && (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest()) { binding = env0_0; binding.processIncomingRing(a0.channelId, a0.ongoingRings); } } function TelecomManagerHandleCallUpdate(a0) { // fn#121703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:5507, owner: TelecomManager.handleCallUpdate, offset: 0x0254ec64, size: 92 bytes, params: 2, frame: 15 let binding = env0_0; if (binding.isEnabled() && (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest()) { binding = env0_0; binding.processIncomingRing(a0.channelId, a0.ongoingRings); } } function TelecomManagerHandleCallDelete(a0) { // fn#121704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:5621, owner: TelecomManager.handleCallDelete, offset: 0x0254ecc0, size: 177 bytes, params: 2, frame: 15 var channelId; var value5; var info; var cancelIncomingCall; let binding = env0_0; let r2 = binding.isEnabled() && (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() && env0_0.currentCall?.channelId === a0.channelId; if (r2) { binding = env0_0; r2 = binding.isPendingIncomingCall(binding.currentCall); } if (r2) { value5 = environment.__proto__.__proto__; binding = env2_23; info = binding.info; channelId = a0.channelId; Reflect.apply(info, binding, ['Pending incoming call deleted, cancelling incoming call:', channelId]); binding = env0_0; cancelIncomingCall = binding.cancelIncomingCall; channelId = a0.channelId; Reflect.apply(cancelIncomingCall, binding, [channelId]); } } function handleIncomingCallAnswered(a0) { // fn#121705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:5916, owner: TelecomManager.handleIncomingCallAnswered, offset: 0x0254ed71, size: 153 bytes, params: 2, frame: 16 var environment; let value = environment.__proto__.__proto__; const binding = env2_23; binding.info('Received incoming call answered from telecom:', a0.callId); env0_0.registeredIncomingCallIds.delete(a0.callId); value = Reflect.apply((importDefault(15834) /* metro dependency 15834: NativeTelecomModule */).endCall, value, [a0.callId]); value.catch(_fun121706); value = importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */; value.selectVoiceChannel(a0.callId); function _fun121706(a0) { // fn#121706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:6064, offset: 0x0254ee0a, size: 31 bytes, params: 2, frame: 13 env3_23.warn('Failed to end answered telecom call:', a0); } } function handleIncomingCallRejected(a0) { // fn#121707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:6188, owner: TelecomManager.handleIncomingCallRejected, offset: 0x0254ee29, size: 124 bytes, params: 2, frame: 15 var environment; let value = environment.__proto__.__proto__; const binding = env2_23; binding.info('Received incoming call rejected from telecom:', a0.callId); env0_0.registeredIncomingCallIds.delete(a0.callId); value = Reflect.apply((importDefault(8916) /* metro dependency 8916: CallActionCreators */).stopRinging, value, [a0.callId]); value.catch(_fun121708); function _fun121708(a0) { // fn#121708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:6340, offset: 0x0254eea5, size: 31 bytes, params: 2, frame: 13 env3_23.warn('Failed to stop ringing after telecom reject:', a0); } } } function value_121709() { // fn#121709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:6477, offset: 0x0254eec4, size: 279 bytes, params: 1, frame: 15 var value; var binding; var hostDestroySubscription; if (!this.isInitialized) { value = environment.__proto__; binding = env1_23; binding.info('Initializing CallKitManager using Telecom framework'); hostDestroySubscription = this.hostDestroySubscription; if (hostDestroySubscription != null) { hostDestroySubscription.remove(); } binding = env1_25; this.hostDestroySubscription = binding.addListener('onHostDestroy', this.handleHostDestroy); DeviceEventEmitter.addListener('telecom-end-call-requested', this.handleEndCallRequested); DeviceEventEmitter.addListener('telecom-set-foreground-requested', this.handleSetForegroundRequested); DeviceEventEmitter.addListener('telecom-mic-mute-requested', this.handleMicMuteRequested); DeviceEventEmitter.addListener('telecom-screen-share-requested', this.handleScreenShareRequested); DeviceEventEmitter.addListener('telecom-incoming-call-answered', this.handleIncomingCallAnswered); DeviceEventEmitter.addListener('telecom-incoming-call-rejected', this.handleIncomingCallRejected); DeviceEventEmitter.addListener('telecom-answer-call-requested', this.handleAnswerCallRequested); this.isInitialized = true; } } function value_121710() { // fn#121710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:7096, offset: 0x0254efdb, size: 339 bytes, params: 1, frame: 19 var environment; var r3; var hostDestroySubscription; var remove; var value; var removeAllListeners; var _createForOfIteratorHelperLoose_121681Binding; var registeredIncomingCallIds; var value2; var value3; var done; var value4; var defaultImport; var endCall; var value5; var value6; var clear; var clearPendingScreenShareOffSync; var stopRingtone; var reportCallEnded; reducibleJoin6: while (true) { if (this.isInitialized) { hostDestroySubscription = this.hostDestroySubscription; reducibleJoin3: while (true) { if (hostDestroySubscription == null) { break reducibleJoin3; } remove = hostDestroySubscription.remove; Reflect.apply(remove, hostDestroySubscription, []); break reducibleJoin3; } this.hostDestroySubscription = null; value = environment.__proto__; removeAllListeners = DeviceEventEmitter.removeAllListeners; Reflect.apply(removeAllListeners, DeviceEventEmitter, ['telecom-end-call-requested']); removeAllListeners = DeviceEventEmitter.removeAllListeners; Reflect.apply(removeAllListeners, DeviceEventEmitter, ['telecom-set-foreground-requested']); removeAllListeners = DeviceEventEmitter.removeAllListeners; Reflect.apply(removeAllListeners, DeviceEventEmitter, ['telecom-mic-mute-requested']); removeAllListeners = DeviceEventEmitter.removeAllListeners; Reflect.apply(removeAllListeners, DeviceEventEmitter, ['telecom-screen-share-requested']); removeAllListeners = DeviceEventEmitter.removeAllListeners; Reflect.apply(removeAllListeners, DeviceEventEmitter, ['telecom-incoming-call-answered']); removeAllListeners = DeviceEventEmitter.removeAllListeners; Reflect.apply(removeAllListeners, DeviceEventEmitter, ['telecom-incoming-call-rejected']); removeAllListeners = DeviceEventEmitter.removeAllListeners; Reflect.apply(removeAllListeners, DeviceEventEmitter, ['telecom-answer-call-requested']); _createForOfIteratorHelperLoose_121681Binding = _createForOfIteratorHelperLoose_121681; registeredIncomingCallIds = this.registeredIncomingCallIds; value2 = _createForOfIteratorHelperLoose_121681Binding(registeredIncomingCallIds); value3 = value2(); done = value3.done; if (!done) { r3 = value3; reducibleLoop4: while (true) { value4 = r3.value; defaultImport = importDefault(15834) /* metro dependency 15834: NativeTelecomModule */; endCall = defaultImport.endCall; value5 = Reflect.apply(endCall, defaultImport, [value4]); value5.catch(_fun121711); value6 = value2(); done = value6.done; if (done) { break reducibleLoop4; } r3 = value6; continue reducibleLoop4; } } registeredIncomingCallIds = this.registeredIncomingCallIds; clear = registeredIncomingCallIds.clear; Reflect.apply(clear, registeredIncomingCallIds, []); clearPendingScreenShareOffSync = this.clearPendingScreenShareOffSync; Reflect.apply(clearPendingScreenShareOffSync, this, []); stopRingtone = this.stopRingtone; Reflect.apply(stopRingtone, this, []); reportCallEnded = this.reportCallEnded; Reflect.apply(reportCallEnded, this, []); this.reconcilePromise = null; this.needsReconcile = false; this.isInitialized = false; break reducibleJoin6; } break reducibleJoin6; } function _fun121711(a0) { // fn#121711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:7522, offset: 0x0254f12e, size: 31 bytes, params: 2, frame: 13 env2_23.warn('Failed to end telecom incoming call on terminate:', a0); } } function value_121713(a0, a1) { // fn#121713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:7881, offset: 0x0254f158, size: 280 bytes, params: 3, frame: 17 var channelId; var currentCall; var state; var Ringing; var value6; var rtcConnectionStoreBinding; const id = AuthenticationStore.getId(); if (id in a1) { if (a1[id] != null) { currentCall = this.currentCall; value6 = undefined; channelId = currentCall == null ? value6 : currentCall.channelId; if (channelId !== a0) { rtcConnectionStoreBinding = RTCConnectionStore; if (rtcConnectionStoreBinding.getChannelId() != null) { return value6; } currentCall = this.currentCall; if ((currentCall == null ? value6 : currentCall.channelId) !== a0) { this.reportIncomingCall(a0); return undefined; } currentCall = this.currentCall; if (currentCall.state === env1_24.Ringing) { return value6; } this.reportIncomingCall(a0); return undefined; } currentCall = this.currentCall; state = currentCall.state; Ringing = env1_24.Ringing; if (state !== Ringing) { return value6; } rtcConnectionStoreBinding = RTCConnectionStore; if (rtcConnectionStoreBinding.getChannelId() != null) { return value6; } currentCall = this.currentCall; channelId = currentCall == null ? value6 : currentCall.channelId; if (channelId !== a0) { this.reportIncomingCall(a0); return undefined; } currentCall = this.currentCall; state = currentCall.state; Ringing = env1_24.Ringing; if (state === Ringing) { return value6; } this.reportIncomingCall(a0); return undefined; } currentCall = this.currentCall; channelId = currentCall?.channelId; if (channelId === a0 && this.currentCall.state === env1_24.Ringing) { env1_23.info('Call no longer ringing, cancelling incoming call:', a0); this.cancelIncomingCall(a0); } } else if (this.currentCall?.channelId === a0 && this.currentCall.state === env1_24.Ringing) { env1_23.info('Call no longer ringing, cancelling incoming call:', a0); this.cancelIncomingCall(a0); } } function value_121714(a0) { // fn#121714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:8418, offset: 0x0254f270, size: 375 bytes, params: 2, frame: 23 var environment; var r2; var r7; var moduleValue; var channelName; var guildId; const env0_1 = a0; let value = environment.__proto__; const channel = ChannelStore.getChannel(a0); const value3 = null; if (value3 != channel) { r2 = value3 != this.currentCall && this.currentCall.channelId !== a0; r2 = r2 && this.isPendingIncomingCall(this.currentCall); if (r2) { this.cancelIncomingCall(this.currentCall.channelId); } moduleValue = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore); guildId = channel.getGuildId(); r7 = value3 != guildId ? guildId : value3; this.currentCall = {channelId: a0, guildId: r7, channelName: channelName, state: env1_24.Ringing}; env1_23.info('Reporting incoming call to Telecom:', a0, 'callerName:', channelName); this.startRingtone(); value = importDefault(15834) /* metro dependency 15834: NativeTelecomModule */; value = value.reportIncomingCall(a0, channelName, value3 != r7 ? {guildId: r7} : value3); value = value.then(_fun121715); value.catch(_fun121716); } else { env1_23.warn('Cannot report incoming call: channel not found:', a0); } function _fun121715(a0) { // fn#121715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:8916, offset: 0x0254f3e7, size: 55 bytes, params: 2, frame: 11 var value; var binding; if (!a0) { value = environment.__proto__.__proto__; binding = env2_23; binding.warn('Failed to report incoming call: resolved false'); binding = env0_0; binding.clearCall(env0_1); } } function _fun121716(a0) { // fn#121716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:9010, offset: 0x0254f41e, size: 53 bytes, params: 2, frame: 13 env2_23.warn('Failed to report incoming call:', a0); env0_0.clearCall(env0_1); } } function value_121717(a0) { // fn#121717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:9178, offset: 0x0254f453, size: 111 bytes, params: 2, frame: 15 var environment; const env0_1 = a0; let value = environment.__proto__; env1_23.info('Cancelling incoming call:', a0); value = importDefault(15834) /* metro dependency 15834: NativeTelecomModule */; value = value.cancelIncomingCall(a0); value = value.then(_fun121718); return value.catch(_fun121719); function _fun121718() { // fn#121718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:9272, offset: 0x0254f4c2, size: 26 bytes, params: 1, frame: 11 env0_0.clearCall(env0_1); return true; } function _fun121719(a0) { // fn#121719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:9308, offset: 0x0254f4dc, size: 53 bytes, params: 2, frame: 13 env2_23.warn('Failed to cancel incoming call:', a0); env0_0.clearCall(env0_1); return false; } } function value_121720(a0) { // fn#121720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:9417, offset: 0x0254f511, size: 49 bytes, params: 2, frame: 4 const state = a0.state; const value = environment.__proto__; const Ringing = env1_24.Ringing; return state === Ringing || a0.state === env1_24.Connecting; } function value_121721() { // fn#121721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:9517, offset: 0x0254f542, size: 122 bytes, params: 1, frame: 14 var environment; var r2; let value = this.isEnabled(); if (value) { value = environment.__proto__; value = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */; value = value.isMetaQuest(); r2 = value; } else { r2 = value; } if (r2) { if (this.reconcilePromise == null) { this.reconcilePromise = this.doReconcile().finally(_fun121722); } else { this.needsReconcile = true; } } function _fun121722() { // fn#121722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:9650, offset: 0x0254f5bc, size: 50 bytes, params: 1, frame: 10 let binding = env0_0; binding.reconcilePromise = null; if (binding.needsReconcile) { binding = env0_0; binding.needsReconcile = false; binding.reconcileTelecomState(); } } } function* _fun121724() { // fn#121724, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:9817, offset: 0x0254f5f9, size: 1069 bytes, params: 1, frame: 34 var environment; var r4; var Connecting; var isPendingIncomingCall; var endCall; var cancelIncomingCall; var channel; var object; var guildId; var value17; var computeChannelName; var channelId2; var startCall; var value18; if (false) { return undefined; } value = environment.__proto__.__proto__; let binding = env2_17; const channelId3 = binding.getChannelId(); const isConnected2 = binding.isConnected(); const value4 = null; const r2 = isConnected2 && value4 != channelId3 ? channelId3 : value4; binding = env2_23; const info = binding.info; let currentCall = this.currentCall; const value5 = undefined; let channelId = value4 == currentCall ? value5 : currentCall.channelId; currentCall = this.currentCall; let state = value4 == currentCall ? value5 : currentCall.state; Reflect.apply(info, binding, ['Reconcile: rtc=', channelId3, 'connected=', isConnected2, 'target=', r2, 'current=', channelId, 'state=', state]); if (value4 != r2) { currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId !== r2) { currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId !== r2) { currentCall = this.currentCall; if (value4 != currentCall && this.currentCall.channelId !== r2) { isPendingIncomingCall = this.isPendingIncomingCall; currentCall = this.currentCall; if (Reflect.apply(isPendingIncomingCall, this, [currentCall])) { cancelIncomingCall = this.cancelIncomingCall; currentCall = this.currentCall; channelId = currentCall.channelId; yield Reflect.apply(cancelIncomingCall, this, [channelId]); if (false) { return undefined; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } endCall = this.endCall; currentCall = this.currentCall; yield Reflect.apply(endCall, this, [currentCall]); if (false) { return undefined; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } currentCall = this.currentCall; state = currentCall.state; if (state === env2_24.Ringing) { env2_23.info('Incoming call answered, transitioning to active:', r2); this.stopRingtone(); this.currentCall.state = env2_24.Connected; this.setIncomingCallActive(r2); return value5; } currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state === Connecting) { env2_23.info('Incoming call answered, transitioning to active:', r2); this.stopRingtone(); this.currentCall.state = env2_24.Connected; this.setIncomingCallActive(r2); return value5; } currentCall = this.currentCall; if (value4 != currentCall && this.currentCall.channelId !== r2) { isPendingIncomingCall = this.isPendingIncomingCall; currentCall = this.currentCall; if (Reflect.apply(isPendingIncomingCall, this, [currentCall])) { cancelIncomingCall = this.cancelIncomingCall; currentCall = this.currentCall; channelId = currentCall.channelId; yield Reflect.apply(cancelIncomingCall, this, [channelId]); if (false) { return undefined; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } endCall = this.endCall; currentCall = this.currentCall; yield Reflect.apply(endCall, this, [currentCall]); if (false) { return undefined; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } currentCall = this.currentCall; state = currentCall.state; if (state === env2_24.Connected) { return value5; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId !== r2) { currentCall = this.currentCall; if (value4 != currentCall && this.currentCall.channelId !== r2) { isPendingIncomingCall = this.isPendingIncomingCall; currentCall = this.currentCall; if (Reflect.apply(isPendingIncomingCall, this, [currentCall])) { cancelIncomingCall = this.cancelIncomingCall; currentCall = this.currentCall; channelId = currentCall.channelId; yield Reflect.apply(cancelIncomingCall, this, [channelId]); if (false) { return undefined; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } endCall = this.endCall; currentCall = this.currentCall; yield Reflect.apply(endCall, this, [currentCall]); if (false) { return undefined; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } currentCall = this.currentCall; state = currentCall.state; if (state === env2_24.Ringing) { env2_23.info('Incoming call answered, transitioning to active:', r2); this.stopRingtone(); this.currentCall.state = env2_24.Connected; this.setIncomingCallActive(r2); return value5; } currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state === Connecting) { env2_23.info('Incoming call answered, transitioning to active:', r2); this.stopRingtone(); this.currentCall.state = env2_24.Connected; this.setIncomingCallActive(r2); return value5; } currentCall = this.currentCall; if (value4 != currentCall && this.currentCall.channelId !== r2) { isPendingIncomingCall = this.isPendingIncomingCall; currentCall = this.currentCall; if (Reflect.apply(isPendingIncomingCall, this, [currentCall])) { cancelIncomingCall = this.cancelIncomingCall; currentCall = this.currentCall; channelId = currentCall.channelId; yield Reflect.apply(cancelIncomingCall, this, [channelId]); if (false) { return undefined; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } endCall = this.endCall; currentCall = this.currentCall; yield Reflect.apply(endCall, this, [currentCall]); if (false) { return undefined; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } currentCall = this.currentCall; channelId = value4 == currentCall ? value5 : currentCall.channelId; if (channelId === r2) { currentCall = this.currentCall; if (currentCall.state !== env2_24.Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; object = {}; currentCall = this.currentCall; object.channelId = currentCall.channelId; currentCall = this.currentCall; object.guildId = currentCall.guildId; yield Reflect.apply(startCall, this, [object]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } return value5; } binding = env2_14; channel = binding.getChannel(r2); if (value4 == channel) { return value5; } object = {channelId: r2}; binding = env2_17; guildId = binding.getGuildId(); object.guildId = value4 != guildId ? guildId : value4; binding = env2_0; value17 = binding(env2_2[30]); computeChannelName = value17.computeChannelName; binding = env2_20; object.channelName = Reflect.apply(computeChannelName, value17, [channel, binding, env2_18]); Connecting = env2_24.Connecting; object.state = Connecting; this.currentCall = object; currentCall = this.currentCall; state = currentCall.state; Connecting = env2_24.Connecting; if (state !== Connecting) { return value5; } currentCall = this.currentCall; channelId2 = currentCall.channelId; startCall = this.startCall; currentCall = this.currentCall; channelId = currentCall.channelId; currentCall = this.currentCall; yield Reflect.apply(startCall, this, [{channelId: channelId, guildId: currentCall.guildId}]); value18 = undefined; if (false) { return value18; } if (value18) { currentCall = this.currentCall; if ((value4 == currentCall ? value5 : currentCall.channelId) !== channelId2) { binding = env2_23; binding.info('Call state changed during startCall, ending orphaned native call:', channelId2); binding = env2_1; value = binding(env2_2[29]); value = value.endCall(channelId2); value.catch(_fun121725); return value5; } binding = env2_17; if (binding.isConnected()) { binding = env2_17; if (binding.getChannelId() !== channelId2) { env2_23.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); return value5; } this.currentCall.state = env2_24.Connected; this.setCallActive(channelId2); return value5; } binding = env2_23; binding.info('RTCConnectionStore indicates disconnect after startCall, ending call:', channelId2); yield this.reportCallEnded(); value = undefined; return value5; } } else { r4 = value4 != this.currentCall && this.currentCall.state !== env2_24.Ringing; r4 = r4 && this.currentCall.state !== env2_24.Connecting; if (r4) { yield this.reportCallEnded(); return value5; } } return value5; function _fun121725(a0) { // fn#121725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:11240, offset: 0x0254fa26, size: 31 bytes, params: 2, frame: 13 env3_23.warn('Failed to end orphaned call:', a0); } } function value_121726() { // fn#121726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:11652, offset: 0x00c3b2ba, size: 30 bytes, params: 1, frame: 13 return env0_1.apply(this, arguments); } function value_121727() { // fn#121727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:11752, offset: 0x0254fa45, size: 377 bytes, params: 1, frame: 19 var environment; var r5; var r2; var isEnabled; var authenticationStoreBinding; var getId; var value2; var Set; var prototype; var value3; var set; var value4; var _createForOfIteratorHelperLoose_121681Binding; var callStoreBinding; var getCalls; var value5; var value6; var done; var value7; var ringing; var includes; var add; var channelId; var value8; var registeredIncomingCallIds; var value9; var value10; var value11; var has; var defaultImport; var endCall; var value12; var value13; var value_121727_loop2; var value14; var value15; var value16; let value = environment.__proto__; reducibleJoin12: while (true) { if (MetaQuestUtilsAndroidModule.isMetaQuest()) { break reducibleJoin12; } isEnabled = this.isEnabled; if (!Reflect.apply(isEnabled, this, [])) { break reducibleJoin12; } authenticationStoreBinding = AuthenticationStore; getId = authenticationStoreBinding.getId; value2 = Reflect.apply(getId, authenticationStoreBinding, []); Set = global.Set; prototype = Set.prototype; value3 = Object.create(prototype, {constructor: {value: Set}}); set = new Set(); value4 = set instanceof Object ? set : value3; _createForOfIteratorHelperLoose_121681Binding = _createForOfIteratorHelperLoose_121681; callStoreBinding = CallStore; getCalls = callStoreBinding.getCalls; value5 = _createForOfIteratorHelperLoose_121681Binding(Reflect.apply(getCalls, callStoreBinding, [])); value6 = value5(); done = value6.done; if (!done) { r5 = value6; reducibleLoop3: while (true) { value7 = r5.value; ringing = value7.ringing; includes = ringing.includes; reducibleJoin5: while (true) { if (Reflect.apply(includes, ringing, [value2])) { add = value4.add; channelId = value7.channelId; Reflect.apply(add, value4, [channelId]); break reducibleJoin5; } break reducibleJoin5; } value8 = value5(); done = value8.done; if (done) { break reducibleLoop3; } r5 = value8; continue reducibleLoop3; } } _createForOfIteratorHelperLoose_121681Binding = _createForOfIteratorHelperLoose_121681; registeredIncomingCallIds = this.registeredIncomingCallIds; value9 = _createForOfIteratorHelperLoose_121681Binding(registeredIncomingCallIds); value10 = value9(); done = value10.done; if (!done) { r5 = value10; reducibleLoop7: while (true) { value11 = r5.value; has = value4.has; reducibleJoin9: while (true) { if (Reflect.apply(has, value4, [value11])) { break reducibleJoin9; } registeredIncomingCallIds = this.registeredIncomingCallIds; registeredIncomingCallIds.delete(value11); defaultImport = importDefault(15834) /* metro dependency 15834: NativeTelecomModule */; endCall = defaultImport.endCall; value12 = Reflect.apply(endCall, defaultImport, [value11]); value12.catch(_fun121728); break reducibleJoin9; } value13 = value9(); done = value13.done; if (done) { break reducibleLoop7; } r5 = value13; continue reducibleLoop7; } } value_121727_loop2 = value_121727_loop; value = _createForOfIteratorHelperLoose_121681(value4); value14 = value(); done = value14.done; if (done) { break reducibleJoin12; } r2 = value14; reducibleLoop11: while (true) { value15 = r2.value; value_121727_loop2(value15); value16 = value(); done = value16.done; if (done) { break reducibleJoin12; } r2 = value16; continue reducibleLoop11; } } function _fun121728(a0) { // fn#121728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:12158, offset: 0x0254fbbe, size: 31 bytes, params: 2, frame: 13 env2_23.warn('Failed to end telecom call:', a0); } function value_121727_loop(a0) { // fn#121729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:12222, owner: value_121727._loop, offset: 0x0254fbdd, size: 132 bytes, params: 2, frame: 13 var environment; const env0_0 = a0; var value; const registeredIncomingCallIds = env0_0.registeredIncomingCallIds; if (!registeredIncomingCallIds.has(a0)) { env0_0.registeredIncomingCallIds.add(a0); value = environment.__proto__.__proto__; value = importDefault(15834) /* metro dependency 15834: NativeTelecomModule */; value = value.registerIncomingCall(a0); value = value.then(_fun121730); value.catch(_fun121731); } function _fun121730(a0) { // fn#121730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:12345, offset: 0x0254fc61, size: 63 bytes, params: 2, frame: 11 var value; if (!a0) { value = environment.__proto__.__proto__.__proto__; env3_23.warn('Failed to register incoming call with telecom: resolved false'); value = environment.__proto__; env1_0.registeredIncomingCallIds.delete(env0_0); } } function _fun121731(a0) { // fn#121731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:12474, offset: 0x0254fca0, size: 61 bytes, params: 2, frame: 13 env3_23.warn('Failed to register incoming call with telecom:', a0); env1_0.registeredIncomingCallIds.delete(env0_0); } } } function* _fun121733({channelId, guildId}) { // fn#121733, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:12681, offset: 0x0254fce8, size: 309 bytes, params: 2, frame: 22 var r9; var state; var value4; var value5; var binding; var binding2; var property; var startCall; var value6; var object; var value7; var warn; var clearCall; var error; if (false) { return undefined; } value = undefined; const currentCall = this.currentCall; const channelId = currentCall == null ? value : currentCall.channelId; if (channelId !== channelId) { value5 = environment.__proto__.__proto__; binding = env2_23; binding.info('Starting Telecom call:', channelId); } else { state = this.currentCall.state; value4 = environment.__proto__.__proto__; if (state === env2_24.Connected) { env2_23.info('Call already active for channel:', channelId); return true; } value5 = environment.__proto__.__proto__; binding = env2_23; binding.info('Starting Telecom call:', channelId); } try { binding = env2_1; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } try { binding2 = env2_2; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } try { property = binding2[29]; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } try { value = binding(property); } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } try { startCall = value.startCall; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } try { value6 = guildId != null; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } if (value6) { try { object = {}; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } try { object.guildId = guildId; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } r9 = object; } else { r9 = null; } try { value = Reflect.apply(startCall, value, [channelId, r9]); } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } yield value; try { value = undefined; value7 = false; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } if (!value7) { if (!value) { try { binding = env2_23; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } try { warn = binding.warn; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } try { Reflect.apply(warn, binding, ['Native startCall returned false, clearing call state']); } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } try { clearCall = this.clearCall; } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } try { Reflect.apply(clearCall, this, [channelId]); } catch (error) { binding = env2_23; binding.warn('Failed to register call with Telecom:', error); this.clearCall(channelId); return false; } } } return value; } function value_121734(a0) { // fn#121734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:13158, offset: 0x00c3945f, size: 30 bytes, params: 2, frame: 13 return env0_0.apply(this, arguments); } function value_121735(a0) { // fn#121735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:13235, offset: 0x0254fe1d, size: 121 bytes, params: 2, frame: 16 var environment; const env0_1 = a0; let value = environment.__proto__; const binding = env1_23; binding.info('Ending call:', a0.channelId); value = Reflect.apply((importDefault(15834) /* metro dependency 15834: NativeTelecomModule */).endCall, value, [a0.channelId]); value = value.then(_fun121736); return value.catch(_fun121737); function _fun121736(a0) { // fn#121736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:13333, offset: 0x0254fe96, size: 32 bytes, params: 2, frame: 11 const binding = env0_0; binding.clearCall(env0_1.channelId); return a0; } function _fun121737(a0) { // fn#121737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:13377, offset: 0x0254feb6, size: 58 bytes, params: 2, frame: 13 let binding = env2_23; binding.warn('Failed to end call:', a0); binding = env0_0; binding.clearCall(env0_1.channelId); return false; } } function value_121738() { // fn#121738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:13478, offset: 0x0254fef0, size: 129 bytes, params: 1, frame: 13 const value = environment.__proto__; env1_23.info('Reporting call ended'); return this.currentCall == null ? global.Promise.resolve(true) : this.currentCall.state === env1_24.Ringing ? this.cancelIncomingCall(this.currentCall.channelId) : this.endCall(this.currentCall); } function value_121739(a0) { // fn#121739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:13733, offset: 0x0254ff71, size: 147 bytes, params: 2, frame: 16 var value2; var value3; var isSelfMute2; const currentCall = this.currentCall; const value = undefined; if ((currentCall == null ? value : currentCall.channelId) === a0) { value3 = environment.__proto__; env1_23.info('Setting call active:', a0); isSelfMute2 = MediaEngineStore.isSelfMute(); (importDefault(15834) /* metro dependency 15834: NativeTelecomModule */).setCallActive(a0, isSelfMute2); this.lastMuteState = isSelfMute2; this.lastScreenShareActive = false; } else { value2 = environment.__proto__; env1_23.warn('setCallActive called for unknown channel:', a0); } return value; } function value_121740(a0) { // fn#121740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:14050, offset: 0x02550004, size: 252 bytes, params: 2, frame: 20 var r1; var value2; var value3; var isSelfMute2; var pendingMutePreference; var defaultImport; const currentCall = this.currentCall; const value = undefined; if ((currentCall == null ? value : currentCall.channelId) === a0) { value3 = environment.__proto__; env1_23.info('Setting incoming call active:', a0); isSelfMute2 = MediaEngineStore.isSelfMute(); pendingMutePreference = this.pendingMutePreference; if (pendingMutePreference == null) { r1 = isSelfMute2; } else { pendingMutePreference = this.pendingMutePreference; this.pendingMutePreference = null; if (isSelfMute2 === pendingMutePreference) { r1 = isSelfMute2; } else { env1_23.info('Re-applying Telecom Bar ringing-state mute preference:', pendingMutePreference); defaultImport = importDefault(8899) /* metro dependency 8899: AudioActionCreators */; defaultImport.setSelfMute(MediaEngineContextTypes.DEFAULT, pendingMutePreference, false); r1 = pendingMutePreference; } } (importDefault(15834) /* metro dependency 15834: NativeTelecomModule */).setIncomingCallActive(a0, r1); this.lastMuteState = r1; this.lastScreenShareActive = false; } else { value2 = environment.__proto__; env1_23.warn('setIncomingCallActive called for unknown channel:', a0); } return value; } function value_121744() { // fn#121744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:15216, offset: 0x02550193, size: 165 bytes, params: 1, frame: 16 var moduleValue2; const value = environment.__proto__; if ((require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() && this.ringtone == null) { if (!(StreamerModeStore.disableSounds || NotificationSettingsStore.isSoundDisabled('call_ringing'))) { moduleValue2 = require(10756) /* metro dependency 10756: SoundUtils */; this.ringtone = moduleValue2.createSoundForPack('call_ringing', SoundpackStore.getSoundpack()); this.ringtone.loop(); } } } function value_121746() { // fn#121746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:15588, offset: 0x0255025b, size: 165 bytes, params: 1, frame: 15 var state; var value; var isSelfMute2; if (this.isEnabled()) { if (this.currentCall != null) { state = this.currentCall.state; value = environment.__proto__; if (state === env1_24.Connected) { isSelfMute2 = MediaEngineStore.isSelfMute(); if (this.lastMuteState !== isSelfMute2) { this.lastMuteState = isSelfMute2; env1_23.info('Syncing Discord -> Call Bar mute state:', isSelfMute2); value = importDefault(15834) /* metro dependency 15834: NativeTelecomModule */; value.setMicMuted(this.currentCall.channelId, isSelfMute2); } } } } } function value_121747() { // fn#121747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:15920, offset: 0x02550300, size: 268 bytes, params: 1, frame: 16 var environment; var r3; var state; var value; var currentUserActiveStream; var channelId; if (this.isEnabled()) { if (this.currentCall != null) { state = this.currentCall.state; value = environment.__proto__; if (state === env1_24.Connected) { currentUserActiveStream = ApplicationStreamingStore.getCurrentUserActiveStream(); r3 = currentUserActiveStream != null && currentUserActiveStream.state === ApplicationStreamStates.ACTIVE; if (this.lastScreenShareActive !== r3) { this.lastScreenShareActive = r3; this.clearPendingScreenShareOffSync(); if (r3) { env1_23.info('Syncing Discord -> Call Bar screen share state: true'); value = importDefault(15834) /* metro dependency 15834: NativeTelecomModule */; value.setScreenShareState(this.currentCall.channelId, true, true); } else { channelId = this.currentCall.channelId; this.pendingScreenShareOffSyncTimeout = global.setTimeout(_fun121748, 400); } } } } } function _fun121748() { // fn#121748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16041:16468, offset: 0x0255040c, size: 134 bytes, params: 1, frame: 15 var value4; var defaultImport; const binding = env0_0; binding.pendingScreenShareOffSyncTimeout = null; if (binding.isEnabled() && env0_0.currentCall?.channelId === channelId) { value4 = environment.__proto__.__proto__; env2_23.info('Syncing Discord -> Call Bar screen share state: false (delayed)'); defaultImport = importDefault(15834) /* metro dependency 15834: NativeTelecomModule */; defaultImport.setScreenShareState(channelId, true, false); } } } } } global.__d(_fun121680, 15833, [5, 6, 7, 15, 17, 18, 27, 10757, 4492, 1226, 4258, 1379, 4259, 10907, 4294, 3793, 3996, 1878, 661, 4291, 3, 8070, 4796, 8916, 7709, 8899, 10600, 10794, 1581, 15834, 4805, 10756, 4860, 2]) /* metro module 15833, dependencies: [5, 6, 7, 15, 17, 18, 27, 10757, 4492, 1226, 4258, 1379, 4259, 10907, 4294, 3793, 3996, 1878, 661, 4291, 3, 8070, 4796, 8916, 7709, 8899, 10600, 10794, 1581, 15834, 4805, 10756, 4860, 2] */;