OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-deps / @holepunchto / keet-store / store / call / call.reducer.js

1 lines · javascript ref:
(function(_0x5de7cc,_0x10cb96){const _0x3f9261={_0x3c1ae9:0x50e,_0x1d63ff:0x501,_0xceeaaf:0x4f0,_0x14e27b:0x1cc,_0x307ab9:0x1db,_0x25f7fb:0x1ca,_0x53bd84:0x52a,_0x2d4196:0x542,_0x2b4d26:0x524,_0x873f19:0x1ae,_0x58fb18:0x1b7,_0x873867:0x1a4,_0x4c747d:0x1b4,_0x571dd5:0x517,_0x320a10:0x4fc,_0x5d4284:0x521,_0x4d7f42:0x4fa,_0x5a7b11:0x515,_0x1b79b2:0x534,_0xcef796:0x51f,_0x14e0c4:0x547,_0x394b24:0x1b8,_0x42c508:0x1d3,_0x43d9df:0x1c7,_0x8cd5fe:0x189,_0x2a0143:0x51e,_0x8b21f9:0x53f,_0x344e16:0x511},_0x5c0c94={_0x168406:0x34c},_0x19b762=_0x5de7cc();function _0x38dc95(_0x1079c9,_0xbf1a9b,_0x29f946,_0x202ce4){return _0x4b40(_0x29f946- -0x393,_0x202ce4);}function _0x11fce3(_0x1d15ed,_0x443db1,_0x23ee24,_0x487c61){return _0x4b40(_0x1d15ed-_0x5c0c94._0x168406,_0x443db1);}while(!![]){try{const _0x21de7c=parseInt(_0x11fce3(_0x3f9261._0x3c1ae9,_0x3f9261._0x1d63ff,_0x3f9261._0xceeaaf,0x4f4))/(-0x1196+-0x16*-0xd+0x1079)*(-parseInt(_0x38dc95(-0x1dc,-_0x3f9261._0x14e27b,-_0x3f9261._0x307ab9,-_0x3f9261._0x25f7fb))/(0x1*0x269b+-0xa1*-0x7+-0x2b00))+parseInt(_0x11fce3(_0x3f9261._0x53bd84,0x52e,_0x3f9261._0x2d4196,_0x3f9261._0x2b4d26))/(0x3fa+-0x1f2b+-0x1*-0x1b34)*(-parseInt(_0x38dc95(-_0x3f9261._0x873f19,-_0x3f9261._0x58fb18,-_0x3f9261._0x873867,-_0x3f9261._0x4c747d))/(0x1*-0x177b+-0xeab+0x262a))+parseInt(_0x11fce3(_0x3f9261._0x571dd5,_0x3f9261._0x320a10,_0x3f9261._0x5d4284,_0x3f9261._0x4d7f42))/(-0x19c6+-0x1242+0x2c0d)*(-parseInt(_0x11fce3(0x522,_0x3f9261._0x5a7b11,_0x3f9261._0x1b79b2,_0x3f9261._0xcef796))/(0x14c*0xc+0x22ef+-0x3279))+-parseInt(_0x11fce3(0x530,0x53f,_0x3f9261._0x14e0c4,_0x3f9261._0x14e0c4))/(0x4aa+-0x401+-0xa2)+-parseInt(_0x38dc95(-_0x3f9261._0x394b24,-_0x3f9261._0x42c508,-0x1cb,-_0x3f9261._0x43d9df))/(-0xa*0x253+0x5*-0x119+-0x1cc3*-0x1)+parseInt(_0x38dc95(-0x18c,-0x1b3,-0x1a7,-_0x3f9261._0x8cd5fe))/(0x1fef+-0x22d1+0x2eb)+parseInt(_0x11fce3(0x529,_0x3f9261._0x2a0143,_0x3f9261._0x8b21f9,_0x3f9261._0x344e16))/(-0xd*-0xeb+-0x3b0+-0x835);if(_0x21de7c===_0x10cb96)break;else _0x19b762['push'](_0x19b762['shift']());}catch(_0x5490df){_0x19b762['push'](_0x19b762['shift']());}}}(_0xe9e9,0xb5605*-0x1+-0xf925*0xf+0x27a49a));const _0x37cdec=(function(){let _0x202d92=!![];return function(_0x153f5f,_0x4969ff){const _0x4d58b7={_0x56a301:0x17f,_0x3a7b21:0x16d},_0x1145e2={_0xce2b67:0x34a},_0x29ef9f=_0x202d92?function(){function _0x1cd592(_0x50beb2,_0x367058,_0x5e617b,_0x5ae4be){return _0x4b40(_0x367058- -_0x1145e2._0xce2b67,_0x5e617b);}if(_0x4969ff){const _0xa40506=_0x4969ff[_0x1cd592(-_0x4d58b7._0x56a301,-0x186,-0x169,-_0x4d58b7._0x3a7b21)](_0x153f5f,arguments);return _0x4969ff=null,_0xa40506;}}:function(){};return _0x202d92=![],_0x29ef9f;};}()),_0x21f08d=_0x37cdec(this,function(){const _0x477775={_0x583a87:0x59d,_0x2f251a:0x5b2,_0x26a4eb:0x5b9,_0x9e8e92:0x5a6,_0x786829:0x596,_0x4db508:0x5af,_0x3b245f:0x5b0,_0xf96382:0x59a,_0x49f3e7:0x2be,_0x50c50c:0x2a0,_0x2a5498:0x2af},_0x40c866={_0x451685:0x3d8},_0x21ec7b={_0x1dc067:0xe5};function _0x420c1e(_0x31f8fa,_0x1d57d8,_0x48b56e,_0x215bd2){return _0x4b40(_0x1d57d8-_0x21ec7b._0x1dc067,_0x31f8fa);}function _0x30c861(_0x38aff3,_0x27b526,_0x279c85,_0x4b96bd){return _0x4b40(_0x27b526-_0x40c866._0x451685,_0x279c85);}return _0x21f08d[_0x30c861(_0x477775._0x583a87,_0x477775._0x2f251a,_0x477775._0x26a4eb,_0x477775._0x9e8e92)]()['search'](_0x30c861(0x5ac,0x5b1,_0x477775._0x786829,0x5c1)+'+$')['toString']()['constructo'+'r'](_0x21f08d)[_0x30c861(_0x477775._0x4db508,_0x477775._0x3b245f,_0x477775._0xf96382,0x5c6)](_0x420c1e(0x2ab,_0x477775._0x49f3e7,_0x477775._0x50c50c,_0x477775._0x2a5498)+'+$');});_0x21f08d();import{createSelector}from'@reduxjs/toolkit';import{CALL_STATUS,STREAM_TYPE,CALL_STATE_KEY,CALL_SETTINGS_STATE_KEY}from'./call.constants';import{CALL_SETTINGS_INITIAL_STATE,callSettingsReducer,getMyScreenStreamId}from'./call-settings.reducer';import{setCallIds,setCallStatus,showCallConfirmLeave,showCallAutoEndPopup,updateCallAutoEndCountdown,setCallShareScreenDialogOpened,openCallSettings,setCallRemoteMediaAudioError,removeCallRemoteMediaAudioError,updateCallRemoteMedia,removeCallRemoteMedia,increaseCallPeersCount,decreaseCallPeersCount,removeCallPeersCount,callSetIncomingDMRoomId,callResetIncomingDMRoomId}from'./call.action';import{addCallMemberId,removeCallMemberId,addCallMemberStream,removeCallMemberStream,addCallUnknownPresenceEvt}from'./call-presence.action';import{callCancel,callJoinCmd,callJoinedEvt,callLeave,callReset}from'./call-status.action';import{addCallMemberIdReducer,addCallMemberStreamReducer,addCallUnknownPresenceEvtReducer,removeCallMemberIdReducer,removeCallMemberStreamReducer,removeCallRemoteMediaReducer,updateCallRemoteMediaReducer}from'./call-presence.reducer';import{getNextPositionPreservedList}from'./utils';function _0x5ec83f(_0x38d94f,_0x389155,_0x4028e6,_0x17a9c3){const _0x2e4841={_0x195a81:0x3a2};return _0x4b40(_0x17a9c3-_0x2e4841._0x195a81,_0x38d94f);}import{getMembersByRoomIdState}from'../member';import{EMPTY_ARRAY}from'../lib/array';export const INITIAL_STATE={'callId':'','memberId':'','swarmId':'','settings':CALL_SETTINGS_INITIAL_STATE,'presencesSortedByActivity':[],'presenceMemberIds':[],'presenceMemberSwarmIds':[],'presenceBySwarmId':{},'unknownMemberPresence':{},'mediaBySwarmId':{},'peersCounter':{},'showConfirmLeave':![],'showAutoEndPopup':![],'autoEndCountdown':Infinity,'shareScreenDialogOpened':![],'status':CALL_STATUS['DISABLED'],'incomingCallRoomId':null};export const callReducer=(_0x44ed65=INITIAL_STATE,_0x5f348e)=>{const _0x5e859a={_0x2b2a15:0x170,_0x2139d6:0x16a,_0x990322:0x140,_0x4fa5ea:0x14c,_0x366c7e:0x154,_0x530684:0x15d,_0x431eba:0x1e9,_0x411783:0x207,_0x532586:0x1ec,_0x4671e6:0x225,_0x5e11a4:0x1d4,_0x5adb71:0x1c5,_0x342c51:0x1dc,_0x3a6d53:0x15d,_0x150fe:0x187,_0x35a406:0x183,_0x284bb3:0x1cf,_0x13c433:0x1d8,_0xd6d19f:0x16d,_0x1a63c0:0x175,_0x51812a:0x17b,_0x3e8e38:0x130,_0xaeb9da:0x120,_0x427357:0x13c,_0x842a83:0x144,_0x241a92:0x15e,_0x1d5423:0x141,_0x1fbcf9:0x125,_0x8c0535:0x156,_0x2316d6:0x13c,_0x35bd87:0x123,_0x1b7e1e:0x178,_0x274166:0x1eb,_0x42e163:0x1e0,_0x61e3b6:0x1e9,_0x507c37:0x1ce,_0x543762:0x12c,_0x337ae2:0x132,_0xadcbe5:0x114,_0x3ba525:0x1ec,_0x4ee5d5:0x202,_0x1882f4:0x1f2,_0x5243c9:0x154,_0x4e9dd3:0x1b8,_0x93a275:0x1e7,_0x929fde:0x166,_0x2718fe:0x162,_0x38d291:0x14f,_0x329355:0x17b,_0x34c327:0x21e,_0x5a1e1e:0x207,_0x388ef5:0x205,_0x5b17f4:0x1f4,_0x3da9c1:0x204,_0x223ce6:0x1e4,_0x4336d6:0x185,_0x5a7c01:0x16a,_0xb332ba:0x1c1,_0x394c19:0x1bf,_0x1f24d7:0x1d2,_0x5a008e:0x1d7,_0x4708a0:0x1e1,_0x83a84:0x1f0,_0x576588:0x15b,_0x43208d:0x16a,_0x55a941:0x17c,_0x7b3ba6:0x16a,_0x70e3e7:0x153,_0x1d332a:0x16a,_0x21f1aa:0x204,_0x51c4ba:0x21c,_0x31018d:0x20e,_0x39537e:0x182,_0x2925be:0x15a,_0x462f4e:0x17e,_0x2a2d18:0x1f4,_0x32146b:0x212,_0x282a7a:0x203,_0x5e3197:0x21b,_0xa04c74:0x163,_0x43fdac:0x169,_0x1b4e52:0x16e,_0x322ef6:0x161,_0x28f734:0x145,_0x35523a:0x14a,_0x13f466:0x175,_0x578b8e:0x15b,_0x36fc19:0x15a,_0x46177c:0x15c,_0x3545d8:0x1e0},_0x100646={_0x460fb6:0x87},_0x4a6bf3={_0x570730:0x3c5},{type:_0x8ae9af,payload:_0x32bea8}=_0x5f348e;function _0x132ee9(_0x3c1216,_0x28ae6b,_0x3e7c2f,_0x19d478){return _0x4b40(_0x28ae6b- -_0x4a6bf3._0x570730,_0x3e7c2f);}function _0x972405(_0x2cc379,_0x5ddf9b,_0x1c5b4c,_0x30e439){return _0x4b40(_0x1c5b4c- -_0x100646._0x460fb6,_0x5ddf9b);}switch(_0x8ae9af){case setCallIds['type']:{const {callId:_0x5abd7f,memberId:_0x39efbd}=_0x32bea8;return{..._0x44ed65,'callId':_0x5abd7f,'memberId':_0x39efbd};}case setCallStatus[_0x972405(0x182,_0x5e859a._0x2b2a15,_0x5e859a._0x2139d6,0x17c)]:{if(_0x32bea8===CALL_STATUS[_0x972405(_0x5e859a._0x990322,_0x5e859a._0x4fa5ea,_0x5e859a._0x366c7e,_0x5e859a._0x530684)])return{...INITIAL_STATE,'peersCounter':_0x44ed65[_0x132ee9(-_0x5e859a._0x431eba,-_0x5e859a._0x411783,-_0x5e859a._0x532586,-_0x5e859a._0x4671e6)+'er']};return{..._0x44ed65,'status':_0x32bea8};}case showCallConfirmLeave['type']:return{..._0x44ed65,'showConfirmLeave':!!_0x32bea8};case showCallAutoEndPopup[_0x132ee9(-0x1ee,-_0x5e859a._0x5e11a4,-_0x5e859a._0x5adb71,-_0x5e859a._0x342c51)]:return{..._0x44ed65,'showAutoEndPopup':!!_0x32bea8};case updateCallAutoEndCountdown[_0x972405(_0x5e859a._0x3a6d53,_0x5e859a._0x150fe,_0x5e859a._0x2139d6,_0x5e859a._0x35a406)]:return{..._0x44ed65,'autoEndCountdown':_0x32bea8};case setCallShareScreenDialogOpened['type']:return{..._0x44ed65,'shareScreenDialogOpened':!!_0x32bea8};case openCallSettings[_0x132ee9(-0x1cd,-_0x5e859a._0x5e11a4,-_0x5e859a._0x284bb3,-_0x5e859a._0x13c433)]:{return{..._0x44ed65,'status':CALL_STATUS[_0x972405(_0x5e859a._0xd6d19f,_0x5e859a._0x1a63c0,0x159,0x173)]};}case setCallRemoteMediaAudioError[_0x972405(_0x5e859a._0x51812a,0x151,0x16a,0x157)]:{const {swarmId:_0x2a30d3,error:_0x4e04c7}=_0x32bea8,_0x30826e=_0x44ed65[_0x972405(_0x5e859a._0x3e8e38,_0x5e859a._0xaeb9da,_0x5e859a._0x427357,0x12d)+_0x972405(_0x5e859a._0x842a83,0x14a,_0x5e859a._0x241a92,_0x5e859a._0x1d5423)][_0x2a30d3];if(_0x30826e&&_0x4e04c7)return{..._0x44ed65,'mediaBySwarmId':{..._0x44ed65[_0x972405(_0x5e859a._0x1fbcf9,_0x5e859a._0x8c0535,_0x5e859a._0x2316d6,_0x5e859a._0x35bd87)+_0x972405(0x15c,0x152,0x15e,_0x5e859a._0x1b7e1e)],[_0x2a30d3]:{..._0x30826e,'audioError':_0x4e04c7}}};return _0x44ed65;}case removeCallRemoteMediaAudioError['type']:{const {swarmId:_0xc568e0}=_0x32bea8,_0x2804a3=_0x44ed65['mediaBySwa'+_0x132ee9(-_0x5e859a._0x274166,-_0x5e859a._0x42e163,-_0x5e859a._0x61e3b6,-_0x5e859a._0x507c37)][_0xc568e0];if(_0x2804a3&&_0x2804a3['audioError']){const _0x461846={..._0x2804a3};return delete _0x461846[_0x972405(_0x5e859a._0x543762,0x13f,_0x5e859a._0x337ae2,_0x5e859a._0xadcbe5)],{..._0x44ed65,'mediaBySwarmId':{..._0x44ed65[_0x132ee9(-_0x5e859a._0x3ba525,-_0x5e859a._0x4ee5d5,-0x1ed,-_0x5e859a._0x1882f4)+'rmId'],[_0xc568e0]:_0x461846}};}return _0x44ed65;}case updateCallRemoteMedia['type']:return updateCallRemoteMediaReducer(_0x44ed65,_0x5f348e);case removeCallRemoteMedia[_0x972405(0x163,_0x5e859a._0x5243c9,0x16a,0x15c)]:return removeCallRemoteMediaReducer(_0x44ed65,_0x5f348e);case increaseCallPeersCount[_0x132ee9(-0x1bf,-_0x5e859a._0x5e11a4,-_0x5e859a._0x4e9dd3,-_0x5e859a._0x93a275)]:{const {roomId:_0x1aea6b,swarmId:_0x31f0cb}=_0x32bea8,_0x2a99dc=_0x44ed65['peersCount'+'er'][_0x1aea6b]||[];if(_0x2a99dc[_0x972405(0x154,_0x5e859a._0x929fde,_0x5e859a._0x2718fe,0x15d)](_0x31f0cb)<0x26a7+-0x1549+-0x1*0x115e)return{..._0x44ed65,'peersCounter':{..._0x44ed65[_0x972405(_0x5e859a._0x366c7e,0x148,0x137,_0x5e859a._0x38d291)+'er'],[_0x1aea6b]:[..._0x2a99dc,_0x31f0cb]}};return _0x44ed65;}case decreaseCallPeersCount[_0x972405(0x187,0x14f,0x16a,_0x5e859a._0x329355)]:{const {roomId:_0x2683c6,swarmId:_0x5b3c76}=_0x32bea8;return{..._0x44ed65,'peersCounter':{..._0x44ed65[_0x132ee9(-_0x5e859a._0x34c327,-_0x5e859a._0x5a1e1e,-_0x5e859a._0x388ef5,-_0x5e859a._0x5b17f4)+'er'],[_0x2683c6]:(_0x44ed65[_0x132ee9(-0x223,-0x207,-_0x5e859a._0x3da9c1,-0x1f8)+'er'][_0x2683c6]||[])[_0x132ee9(-0x1cc,-_0x5e859a._0x223ce6,-0x1ef,-0x1f6)](_0x252288=>_0x252288!==_0x5b3c76)}};}case removeCallPeersCount[_0x972405(_0x5e859a._0x4336d6,0x167,_0x5e859a._0x5a7c01,_0x5e859a._0x4336d6)]:{const {roomId:_0x1546d4}=_0x32bea8,_0x475514={..._0x44ed65['peersCount'+'er']};return delete _0x475514[_0x1546d4],{..._0x44ed65,'peersCounter':_0x475514};}case addCallMemberId[_0x132ee9(-_0x5e859a._0xb332ba,-_0x5e859a._0x5e11a4,-_0x5e859a._0x394c19,-0x1e0)]:return addCallMemberIdReducer(_0x44ed65,_0x5f348e);case removeCallMemberId[_0x132ee9(-_0x5e859a._0x1f24d7,-_0x5e859a._0x5e11a4,-0x1d3,-_0x5e859a._0x5a008e)]:return removeCallMemberIdReducer(_0x44ed65,_0x5f348e);case addCallMemberStream[_0x132ee9(-_0x5e859a._0x5a008e,-_0x5e859a._0x5e11a4,-_0x5e859a._0x4708a0,-_0x5e859a._0x83a84)]:return addCallMemberStreamReducer(_0x44ed65,_0x5f348e);case removeCallMemberStream[_0x972405(0x188,_0x5e859a._0x576588,_0x5e859a._0x43208d,_0x5e859a._0x2b2a15)]:return removeCallMemberStreamReducer(_0x44ed65,_0x5f348e);case addCallUnknownPresenceEvt[_0x972405(_0x5e859a._0x55a941,_0x5e859a._0x2718fe,_0x5e859a._0x7b3ba6,_0x5e859a._0x70e3e7)]:return addCallUnknownPresenceEvtReducer(_0x44ed65,_0x5f348e);case callJoinCmd[_0x972405(0x160,0x16b,_0x5e859a._0x1d332a,_0x5e859a._0x51812a)]:return{..._0x44ed65,'status':CALL_STATUS[_0x132ee9(-_0x5e859a._0x21f1aa,-0x20b,-_0x5e859a._0x51c4ba,-_0x5e859a._0x31018d)]};case callJoinedEvt[_0x972405(_0x5e859a._0x39537e,_0x5e859a._0x2925be,0x16a,_0x5e859a._0x462f4e)]:return{..._0x44ed65,'status':CALL_STATUS[_0x132ee9(-_0x5e859a._0x2a2d18,-0x1dd,-0x1e0,-0x1e0)]};case callReset['type']:return{...INITIAL_STATE,'peersCounter':_0x44ed65[_0x132ee9(-_0x5e859a._0x32146b,-_0x5e859a._0x5a1e1e,-_0x5e859a._0x282a7a,-_0x5e859a._0x5e3197)+'er'],'incomingCallRoomId':_0x44ed65[_0x972405(0x158,_0x5e859a._0xa04c74,_0x5e859a._0x43fdac,_0x5e859a._0x1b4e52)+_0x972405(_0x5e859a._0x322ef6,_0x5e859a._0x28f734,_0x5e859a._0x35523a,_0x5e859a._0x2718fe)]};case callCancel[_0x972405(0x184,_0x5e859a._0x13f466,_0x5e859a._0x43208d,0x179)]:case callLeave[_0x972405(_0x5e859a._0x578b8e,_0x5e859a._0x36fc19,_0x5e859a._0x7b3ba6,_0x5e859a._0x46177c)]:return{..._0x44ed65,'showConfirmLeave':![],'status':CALL_STATUS['READY'],'mediaBySwarmId':{}};case callSetIncomingDMRoomId[_0x132ee9(-_0x5e859a._0x3545d8,-0x1d4,-0x1c9,-_0x5e859a._0x83a84)]:{const {roomId:_0x183436}=_0x32bea8;return{..._0x44ed65,'incomingCallRoomId':_0x183436};}case callResetIncomingDMRoomId['type']:return{..._0x44ed65,'incomingCallRoomId':null};default:{const _0x499f68=callSettingsReducer(_0x44ed65[CALL_SETTINGS_STATE_KEY],_0x5f348e);if(_0x44ed65[CALL_SETTINGS_STATE_KEY]===_0x499f68)return _0x44ed65;return{..._0x44ed65,[CALL_SETTINGS_STATE_KEY]:_0x499f68};}}};function _0x26e4bd(_0x2e23bc,_0x4dc418,_0x2a5ee9,_0x380e4a){const _0x12b94d={_0x6a004:0xc1};return _0x4b40(_0x4dc418-_0x12b94d._0x6a004,_0x2e23bc);}export const isCallReady=_0x36dde7=>_0x36dde7!==CALL_STATUS[_0x26e4bd(0x2b8,0x29c,0x2a2,0x28f)]&&_0x36dde7!==CALL_STATUS['LOADING'];export const isCallSettingsMode=_0xa136e9=>_0xa136e9===CALL_STATUS['SETTINGS'];export const isCallJoinedMode=_0x29d038=>_0x29d038===CALL_STATUS[_0x5ec83f(0x54e,0x54d,0x564,0x55c)]||_0x29d038===CALL_STATUS[_0x5ec83f(0x581,0x588,0x5a6,0x58a)];export const getCallState=_0x549946=>_0x549946[CALL_STATE_KEY];export const getCallId=_0xdb93b=>_0xdb93b[CALL_STATE_KEY]['callId'];export const getCallMyMemberId=_0x37276e=>_0x37276e[CALL_STATE_KEY][_0x5ec83f(0x550,0x574,0x567,0x558)];export const getCallStatus=_0x12253e=>_0x12253e[CALL_STATE_KEY][_0x5ec83f(0x555,0x55c,0x55c,0x559)];export const getCallShowConfirmLeave=_0x24b953=>getCallState(_0x24b953)['showConfir'+_0x5ec83f(0x591,0x571,0x56e,0x579)];export const getCallShowAutoEndPopup=_0xae58e3=>getCallState(_0xae58e3)['showAutoEn'+_0x26e4bd(0x2a1,0x293,0x2a0,0x288)];export const getCallAutoEndCountdown=_0x1dba4b=>getCallState(_0x1dba4b)[_0x5ec83f(0x5a3,0x5a7,0x58a,0x58d)+_0x5ec83f(0x562,0x57c,0x559,0x55f)];export const getCallShareScreenDialogOpened=_0x284578=>getCallState(_0x284578)['shareScree'+_0x26e4bd(0x2a6,0x2a7,0x2bf,0x290)+'ned'];export const getCallRemoteMediaById=_0x18ae6d=>_0x175ab7=>getCallState(_0x175ab7)[_0x26e4bd(0x274,0x284,0x297,0x295)+_0x5ec83f(0x56e,0x59e,0x56a,0x587)][_0x18ae6d];export const getCallPresenceState=_0x555518=>getCallState(_0x555518)[_0x26e4bd(0x29e,0x288,0x27c,0x271)+'SwarmId'];export const getCallMediaState=_0x48d5bf=>getCallState(_0x48d5bf)[_0x26e4bd(0x28e,0x284,0x284,0x273)+'rmId'];export const getCallPeerVideoCount=_0x294bc2=>Object[_0x26e4bd(0x2af,0x2ae,0x2af,0x294)](getCallState(_0x294bc2)[_0x5ec83f(0x54e,0x583,0x55e,0x565)+_0x26e4bd(0x2bb,0x2a6,0x2b6,0x2ad)])[_0x5ec83f(0x592,0x575,0x574,0x583)](_0x53479b=>!!_0x53479b?.['streamByNa'+'me']?.[STREAM_TYPE['CAMERA']]&&_0x53479b[_0x5ec83f(0x580,0x597,0x56f,0x58c)+'ed']===![])[_0x26e4bd(0x271,0x280,0x276,0x29c)];export const getCallKnownMemberCount=_0x220eb8=>getCallState(_0x220eb8)['presenceMe'+_0x26e4bd(0x2a0,0x2a4,0x288,0x2af)][_0x26e4bd(0x273,0x280,0x276,0x26b)];export const getCallPresenceMemberSwarmIds=_0x4302aa=>getCallState(_0x4302aa)['presenceMe'+_0x26e4bd(0x282,0x281,0x288,0x281)+'ds'];export const getCallUnknownPresenceState=_0x1e0282=>getCallState(_0x1e0282)[_0x26e4bd(0x2ad,0x295,0x27d,0x287)+_0x5ec83f(0x556,0x55e,0x56b,0x572)+'e'];export const getCallTopSortedPresences=_0xbf67f9=>getCallState(_0xbf67f9)[_0x26e4bd(0x26d,0x282,0x26b,0x29a)+_0x5ec83f(0x56b,0x57c,0x574,0x56e)+_0x5ec83f(0x58b,0x56c,0x58f,0x57e)];export const getCallUnknownPresenceIds=createSelector(getCallUnknownPresenceState,_0x2f9c92=>Object[_0x26e4bd(0x27c,0x28b,0x27e,0x28f)](_0x2f9c92));function _0x4b40(_0x4b4016,_0x515ccb){const _0x37cd1a=_0xe9e9();return _0x4b40=function(_0x3c3c9e,_0x5f31ae){_0x3c3c9e=_0x3c3c9e-(0x13df+0x11c0+-0x13d*0x1d);let _0x42484b=_0x37cd1a[_0x3c3c9e];return _0x42484b;},_0x4b40(_0x4b4016,_0x515ccb);}export const getCallIncomingDMRoomId=_0x5964e6=>getCallState(_0x5964e6)[_0x26e4bd(0x2cb,0x2b1,0x2c3,0x299)+_0x26e4bd(0x29a,0x292,0x298,0x279)];export const getAllCallPresenceMemberSwarmIds=createSelector([getCallPresenceMemberSwarmIds,getCallUnknownPresenceIds],(_0x192e92,_0x481e58)=>[..._0x192e92,..._0x481e58]);export const getIsPresenceUnknown=_0x468873=>_0x994af6=>getCallUnknownPresenceIds(_0x994af6)?.['indexOf'](_0x468873)!==-(-0x639+-0xc41*-0x1+-0x607*0x1);export const getCallIsOngoing=createSelector(getCallState,getCallUnknownPresenceIds,({status:_0x483efa,presenceMemberIds:_0x14f1ad},_0x1d71da)=>isCallJoinedMode(_0x483efa)||_0x14f1ad[_0x26e4bd(0x28e,0x280,0x296,0x290)]+_0x1d71da['length']>0x22dd+0xa*0x269+-0x3af7);function _0xe9e9(){const _0x417146=['7823851aUttXG','rmId','nDialogOpe','some','JOINED','indexOf','isVideoMut','autoEndCou','2000547ySFpNj','values','push','1628824hymMWm','incomingCa','type','memberId','status','82FanHJY','audioError','JOINING','streamByNa','has','ntdown','peersCount','length','mberSwarmI','presencesS','20337HXYoWw','mediaBySwa','apply','reduce','clear','presenceBy','3469072VgyEGj','size','keys','1537955YjqQwE','ortedByAct','slice','SwarmId','forEach','berPresenc','llRoomId','dPopup','set','unknownMem','SCREEN','12lIrUWA','mLeave','search','(((.+)+)+)','toString','DISABLED','ivity','48980710vIXpVh','9qDhuHe','streamId','SETTINGS','filter','from','mberIds'];_0xe9e9=function(){return _0x417146;};return _0xe9e9();}export const getCallPeersCount=(_0x4a1363,_0x5573f9)=>getCallState(_0x4a1363)[_0x26e4bd(0x294,0x27f,0x288,0x27c)+'er']?.[_0x5573f9]?.['length']||0xb12+-0x4d0+-0x642;export const getCallPeerSwarmIds=_0x444a6b=>_0x33ef05=>getCallState(_0x33ef05)[_0x5ec83f(0x549,0x559,0x56e,0x560)+'er']?.[_0x444a6b]||EMPTY_ARRAY;export const makeCallMemberIdsByRoomId=(_0x5b2184,_0x4d2cfd)=>{const _0x23d77b={_0x4e9ee0:0x3ce,_0xe98b22:0x3de,_0x252ec2:0x3fc,_0xeb9934:0x45c,_0x36cf3f:0x45a,_0x361263:0x463,_0x2411f6:0x3db,_0x231751:0x3e1,_0x392fc6:0x3d6,_0x3db2ae:0x43d,_0x36f0b9:0x453,_0x34dbf0:0x446,_0x2846f4:0x43f,_0x43c8d2:0x486,_0x2482a5:0x3c9,_0xb8ac45:0x3b9,_0x58ca77:0x474,_0x5d25aa:0x473,_0xedd730:0x483,_0x15cbb4:0x47f,_0x1c1453:0x48f,_0x20d264:0x480,_0x443de3:0x3dc,_0x2f47ee:0x3eb,_0x58efb7:0x3ed},_0x14c7d8={_0x2654e2:0x218},_0x3a8b35=new Map();let _0x29cfaf=[];return createSelector(getCallPeerSwarmIds(_0x5b2184),getMembersByRoomIdState(_0x5b2184),(_0x259466,{bySwarmId:_0x25083e})=>{const _0x284cce={_0x288ebe:0x29d};_0x3a8b35[_0x54585e(_0x23d77b._0x4e9ee0,_0x23d77b._0xe98b22,0x3c4,_0x23d77b._0x252ec2)]();for(let _0x36f272=-0x14ab+0x22fc+-0x2dd*0x5;_0x36f272<_0x259466[_0x4d7ed6(0x472,_0x23d77b._0xeb9934,_0x23d77b._0x36cf3f,_0x23d77b._0x361263)]&&_0x3a8b35[_0x54585e(_0x23d77b._0x2411f6,_0x23d77b._0x231751,0x3e9,_0x23d77b._0x392fc6)]<_0x4d2cfd;_0x36f272+=0x1c3+0x1d83+-0x1f45){const _0x118d2f=_0x25083e[_0x259466[_0x36f272]]?.[_0x4d7ed6(_0x23d77b._0x3db2ae,_0x23d77b._0x36f0b9,_0x23d77b._0x34dbf0,_0x23d77b._0x2846f4)];if(_0x118d2f)_0x3a8b35[_0x4d7ed6(_0x23d77b._0x43c8d2,0x470,0x45a,0x45e)](_0x118d2f,!![]);}const _0x527c40=_0x3a8b35['size']!==_0x29cfaf[_0x54585e(0x3c8,0x3d7,_0x23d77b._0x2482a5,_0x23d77b._0xb8ac45)]||_0x29cfaf[_0x4d7ed6(_0x23d77b._0x58ca77,0x484,_0x23d77b._0x5d25aa,0x46c)](_0x5abf1f=>!_0x3a8b35[_0x54585e(0x3e2,0x3d4,0x3f0,0x3b6)](_0x5abf1f));function _0x54585e(_0x22299c,_0x6f65f8,_0x53fa46,_0x341a6e){return _0x4b40(_0x6f65f8-_0x14c7d8._0x2654e2,_0x53fa46);}_0x527c40&&(_0x29cfaf=Array[_0x4d7ed6(_0x23d77b._0xedd730,_0x23d77b._0x15cbb4,_0x23d77b._0x1c1453,_0x23d77b._0x20d264)](_0x3a8b35[_0x54585e(_0x23d77b._0x443de3,0x3e2,_0x23d77b._0x2f47ee,_0x23d77b._0x58efb7)]()));function _0x4d7ed6(_0x2d75d1,_0x179c9a,_0x4eff09,_0x178958){return _0x4b40(_0x179c9a-_0x284cce._0x288ebe,_0x178958);}return _0x29cfaf;});};export const getCallPresenceStreamName=(_0x2224a6,_0x3e3c95)=>_0x18469a=>{const _0x56e464={_0x5d7116:0x44,_0x287b30:0x59,_0x28be24:0x43,_0x5ad7cb:0x5c,_0x4fb64b:0x67,_0x46773f:0x45},_0x230fde={_0x167c89:0x34f,_0x4984ce:0x33d,_0x19bdca:0x349,_0x5ab561:0x373,_0x45d521:0x37a,_0x56da93:0x390},_0x577e8f={_0x48df66:0x128},_0x9c0ede={_0x55ae9b:0xd8,_0x4dbb78:0x6d,_0x4958cc:0xe6},_0x3858db={_0x20d1ae:0x2e7,_0x9f82f7:0x134};function _0x4207ad(_0x54507d,_0x582c46,_0x239fa8,_0x50e416){return _0x26e4bd(_0x54507d,_0x239fa8- -_0x3858db._0x20d1ae,_0x239fa8-0xa6,_0x50e416-_0x3858db._0x9f82f7);}const _0x3ef9c8=getCallState(_0x18469a)['presenceBy'+_0x4207ad(-_0x56e464._0x5d7116,-_0x56e464._0x287b30,-0x58,-_0x56e464._0x28be24)][_0x2224a6];if(!(_0x3ef9c8&&_0x3ef9c8['streamByNa'+'me']))return'';function _0x52f194(_0x1e8a50,_0x1a041a,_0x2ebd72,_0x5334f2){return _0x5ec83f(_0x5334f2,_0x1a041a-_0x9c0ede._0x55ae9b,_0x2ebd72-_0x9c0ede._0x4dbb78,_0x1a041a- -_0x9c0ede._0x4958cc);}return Object['keys'](_0x3ef9c8['streamByNa'+'me'])[_0x4207ad(-_0x56e464._0x5ad7cb,-_0x56e464._0x4fb64b,-0x61,-_0x56e464._0x46773f)]((_0x1524bb,_0x1dd725)=>{const _0x149bd7={_0x160835:0x1f4,_0x2b1f94:0x1b2};if(_0x1524bb)return _0x1524bb;function _0x325b6d(_0x4f3054,_0x203a24,_0x372be4,_0x59ad13){return _0x52f194(_0x4f3054-_0x149bd7._0x160835,_0x372be4- -0x3eb,_0x372be4-_0x149bd7._0x2b1f94,_0x59ad13);}const _0x3b6b6e=_0x3ef9c8[_0x1ab5cf(_0x230fde._0x167c89,_0x230fde._0x4984ce,0x36d,_0x230fde._0x19bdca)+'me'][_0x1dd725];if(_0x3b6b6e?.[_0x1ab5cf(_0x230fde._0x5ab561,0x37a,_0x230fde._0x45d521,_0x230fde._0x56da93)]===_0x3e3c95)return _0x1dd725;function _0x1ab5cf(_0x37c663,_0x26d1b3,_0x18224f,_0xd4f37f){return _0x52f194(_0x37c663-0x180,_0x37c663- -_0x577e8f._0x48df66,_0x18224f-0x52,_0x18224f);}return'';},'');};export const getScreenStreams=createSelector(getCallPresenceMemberSwarmIds,getCallPresenceState,getCallMediaState,getCallMyMemberId,getMyScreenStreamId,(_0x21cced,_0x5bc66b,_0x473bd1,_0x599d61,_0x12ef78)=>{const _0x299da0={_0x51e2de:0x216,_0x109376:0x1ed,_0x114b72:0x1fb},_0x162108={_0x34b003:0x17e,_0x300408:0x1ab,_0x346dcf:0x76c},_0x2780cf={_0x191cec:0xbc,_0xf2ede3:0xb7,_0x15f862:0xce,_0x2faedf:0xa9,_0x21530f:0x321,_0x1a4af6:0x30f,_0x2cf9d1:0xb0,_0x9dbaf9:0xb7,_0x4a1009:0xc4,_0x1824e1:0xcf,_0x24932a:0x8d,_0x57b3ac:0x9e,_0x428c4c:0xb8},_0x2b0ebb=[];_0x599d61&&_0x12ef78&&_0x2b0ebb['push']({'streamId':_0x12ef78,'memberId':_0x599d61,'isLocal':!![]});_0x21cced[_0x313cfd(-_0x299da0._0x51e2de,-0x1fe,-_0x299da0._0x109376,-_0x299da0._0x114b72)](_0x1430ac=>{const _0x999853={_0xd272dc:0x143,_0x15986d:0x91,_0xc030d0:0x13e},_0x40fcb7={_0x49ea7a:0x183,_0xf2db5b:0x535},_0x2baf2d=_0x5bc66b[_0x1430ac];function _0x3862a7(_0x1f4d4c,_0x13a58e,_0x45272d,_0x5e1a4f){return _0x313cfd(_0x45272d,_0x13a58e-0x51,_0x45272d-_0x40fcb7._0x49ea7a,_0x5e1a4f-_0x40fcb7._0xf2db5b);}const _0x41002=_0x473bd1[_0x1430ac];function _0x1e8b64(_0x49d24b,_0x27045f,_0x813cb3,_0x115d85){return _0x313cfd(_0x813cb3,_0x27045f-_0x999853._0xd272dc,_0x813cb3-_0x999853._0x15986d,_0x27045f-_0x999853._0xc030d0);}const _0x1d5689=!!_0x2baf2d['streamByNa'+'me']?.[STREAM_TYPE[_0x1e8b64(-_0x2780cf._0x191cec,-_0x2780cf._0xf2ede3,-_0x2780cf._0x15f862,-_0x2780cf._0x2faedf)]],_0x26bbd2=_0x41002&&_0x41002[_0x3862a7(_0x2780cf._0x21530f,0x33a,_0x2780cf._0x1a4af6,0x326)+'me']?.[STREAM_TYPE[_0x1e8b64(-_0x2780cf._0x2cf9d1,-_0x2780cf._0x9dbaf9,-_0x2780cf._0x4a1009,-_0x2780cf._0x1824e1)]]?.['id'];_0x1d5689&&_0x2b0ebb[_0x1e8b64(-_0x2780cf._0x24932a,-_0x2780cf._0x57b3ac,-0xba,-_0x2780cf._0x428c4c)]({'streamId':_0x26bbd2,'memberId':_0x2baf2d['memberId'],'swarmId':_0x1430ac});});function _0x313cfd(_0x1a018d,_0x53c8d7,_0xe3ebe4,_0x2695a2){return _0x5ec83f(_0x1a018d,_0x53c8d7-_0x162108._0x34b003,_0xe3ebe4-_0x162108._0x300408,_0x2695a2- -_0x162108._0x346dcf);}return _0x2b0ebb;});export const getScreenSharingAvailable=createSelector(getScreenStreams,_0x3e266e=>_0x3e266e['length']>-0x6dd*0x3+0x1d*-0xeb+0x2f36);export const makeGetPositionPreservedActiveSwarmIds=()=>{const _0x42a722={_0x2a2c31:0x9,_0x590a97:0x1b,_0x5f0452:0xe};let _0x294455=[];return createSelector([getCallTopSortedPresences,(_0x2012e0,_0x30dace)=>_0x30dace],(_0x14206b,_0x2577bf)=>{const _0x42206f=_0x14206b[_0x5b9f72(-_0x42a722._0x2a2c31,-0x1c,-_0x42a722._0x590a97,-_0x42a722._0x5f0452)](0x24f3+-0x18f+0x1*-0x2364,_0x2577bf);function _0x5b9f72(_0x1d3062,_0x361bba,_0x3538c9,_0x30d133){return _0x4b40(_0x1d3062- -0x1d6,_0x30d133);}return _0x294455=getNextPositionPreservedList(_0x294455,_0x42206f),_0x294455;});};