(function(_0x562378,_0x1fbfdf){const _0x579b65={_0x2bcb63:0x364,_0x3c7e1a:0x376,_0x401425:0x37f,_0x9ad572:0x379,_0x2757d4:0xdd,_0xd6c30e:0xcd,_0x1fba7a:0xd0,_0x3f8bd3:0xdc,_0x1bd501:0x369,_0x474078:0x35e,_0x3d8609:0xe8,_0xe262e:0xdd,_0x37a5a5:0xcc,_0x35847d:0xd1,_0x2e3a7e:0xde,_0x14e282:0xea,_0x43ae53:0xda,_0x220972:0x36c,_0x17cb19:0x36b,_0x5ae1cc:0x359,_0x414528:0x383,_0x122b26:0x372,_0x4e7a0a:0x378,_0x2b26cb:0x34e,_0x129e0a:0x35f,_0x44c598:0x366,_0x2cc4dc:0xef,_0x240903:0xd9,_0x1a5f95:0x368,_0x303cd9:0x388,_0x109365:0x377,_0xf05886:0x37f,_0x1fa94c:0x396,_0x1642f6:0x38c},_0x2bf5b1={_0x893df6:0x295},_0x295510=_0x562378();function _0x425a3d(_0x4dc9df,_0xe968b8,_0x43722a,_0x42ee31){return _0x489c(_0xe968b8-_0x2bf5b1._0x893df6,_0x43722a);}function _0x22f726(_0x4595af,_0x50fe6e,_0x2757cb,_0x367eae){return _0x489c(_0x2757cb- -0x1bc,_0x4595af);}while(!![]){try{const _0x391831=parseInt(_0x425a3d(_0x579b65._0x2bcb63,_0x579b65._0x3c7e1a,_0x579b65._0x401425,_0x579b65._0x9ad572))/(0x1*-0x85+0x3e8+-0x362*0x1)*(parseInt(_0x22f726(-_0x579b65._0x2757d4,-_0x579b65._0xd6c30e,-_0x579b65._0x1fba7a,-_0x579b65._0x3f8bd3))/(-0x2fe*0x1+0x1da9+0x23*-0xc3))+-parseInt(_0x425a3d(0x360,_0x579b65._0x1bd501,0x35d,_0x579b65._0x474078))/(0x1088+-0x228e+0xab*0x1b)+parseInt(_0x22f726(-0xea,-_0x579b65._0x3d8609,-_0x579b65._0xe262e,-0xe4))/(-0x1096+-0x1484+0x251e)*(-parseInt(_0x22f726(-0xcb,-_0x579b65._0x37a5a5,-_0x579b65._0x35847d,-_0x579b65._0x2e3a7e))/(0x4b1*0x3+0x179f+-0x3*0xc8f))+parseInt(_0x22f726(-_0x579b65._0x14e282,-0xda,-_0x579b65._0x43ae53,-_0x579b65._0x3d8609))/(0x2*0x4ae+0x96b*-0x1+0x15)*(parseInt(_0x425a3d(_0x579b65._0x220972,0x366,_0x579b65._0x17cb19,_0x579b65._0x5ae1cc))/(-0x7c6+-0x1b4+0x981))+-parseInt(_0x425a3d(_0x579b65._0x414528,_0x579b65._0x122b26,_0x579b65._0x4e7a0a,_0x579b65._0x2bcb63))/(-0x571+0x1787+-0x907*0x2)*(-parseInt(_0x425a3d(_0x579b65._0x2b26cb,_0x579b65._0x129e0a,_0x579b65._0x44c598,0x354))/(-0x1e73+-0x1ca+0x2046))+parseInt(_0x22f726(-0xe8,-_0x579b65._0x2cc4dc,-0xde,-_0x579b65._0x240903))/(0xb*0x3d+0x1*-0x2205+-0x1f7*-0x10)+-parseInt(_0x425a3d(_0x579b65._0x1a5f95,_0x579b65._0x9ad572,_0x579b65._0x303cd9,_0x579b65._0x109365))/(0x1878+-0x3*-0x70e+-0x2d97)*(parseInt(_0x425a3d(_0x579b65._0xf05886,_0x579b65._0x414528,_0x579b65._0x1fa94c,_0x579b65._0x1642f6))/(-0x17*0x23+-0x46+-0x1*-0x377));if(_0x391831===_0x1fbfdf)break;else _0x295510['push'](_0x295510['shift']());}catch(_0x3ab496){_0x295510['push'](_0x295510['shift']());}}}(_0x5cd6,-0x63f75*-0x1+0xf26f*0x7+0xa12*-0xe2));const _0x5cd4d8=(function(){let _0x185a86=!![];return function(_0x41d3d1,_0x23ce1e){const _0x49cb10=_0x185a86?function(){if(_0x23ce1e){const _0x51cb9a=_0x23ce1e['apply'](_0x41d3d1,arguments);return _0x23ce1e=null,_0x51cb9a;}}:function(){};return _0x185a86=![],_0x49cb10;};}()),_0x56d1ca=_0x5cd4d8(this,function(){const _0x111b5c={_0x1c9c96:0x382,_0x45c6bd:0x378,_0x4fa5b2:0x371,_0x5db75c:0x373,_0x87693:0x372,_0x3e5fc7:0x37b,_0x41c062:0x13c,_0x4fc487:0x141,_0x4f52af:0x138,_0x30edf5:0x12b,_0xf18aaf:0x13a,_0x37e0b1:0x145,_0x1d5a06:0x137,_0xfa3cd2:0x37e,_0x231a88:0x370,_0x3c2fef:0x377,_0x409b18:0x369};function _0x5870e1(_0x4ec34e,_0x4283d4,_0x31657b,_0x2f19e3){return _0x489c(_0x4ec34e- -0x214,_0x4283d4);}function _0x23fa28(_0x3f0072,_0x4a7c73,_0x1b47bc,_0x423caf){return _0x489c(_0x1b47bc-0x2a0,_0x3f0072);}return _0x56d1ca[_0x23fa28(0x37c,_0x111b5c._0x1c9c96,_0x111b5c._0x45c6bd,0x370)]()['search'](_0x23fa28(_0x111b5c._0x4fa5b2,_0x111b5c._0x5db75c,_0x111b5c._0x87693,_0x111b5c._0x3e5fc7)+'+$')[_0x5870e1(-_0x111b5c._0x41c062,-_0x111b5c._0x4fc487,-_0x111b5c._0x4f52af,-_0x111b5c._0x30edf5)]()[_0x5870e1(-_0x111b5c._0xf18aaf,-_0x111b5c._0x37e0b1,-0x13d,-_0x111b5c._0x1d5a06)+'r'](_0x56d1ca)[_0x23fa28(_0x111b5c._0xfa3cd2,_0x111b5c._0x231a88,_0x111b5c._0x3c2fef,_0x111b5c._0x409b18)]('(((.+)+)+)'+'+$');});_0x56d1ca();import{select,take,fork,put,all,takeLatest,takeEvery,takeLeading}from'redux-saga/effects';import _0x345c4d from'dayjs';import{getCoreBackend}from'../../../backend';import{apiCall}from'../../../api/core';function _0x5cd6(){const _0x5d68c2=['ounter','8RPEMZd','2031250KBtABI','52544wilLyK','task','1aFwkTu','12sWwdgU','rtedMessag','16027swFfhJ','payload','reduce','add','isAfter','values','allRing','55YDHREa','967218ARmuQg','nceSaga','3084vSuCWD','2202219WFMiWP','startNew','call\x20manag','roomId','eSaga','MessageSag','concat','1278879AGtaXz','(((.+)+)+)','callPeersC','1549800VNWPdC','gupEvent','indexOf','search','toString','cancel','constructo','answeringC'];_0x5cd6=function(){return _0x5d68c2;};return _0x5cd6();}import{forkChildren}from'../../lib';import{taskErrorSaga}from'../../error';import{callSaga,callPeersCounterSaga,getCallStatus,isCallJoinedMode,callLeave,callReset,getCallPeersCount,callJoinedEvt,getCallPeerSwarmIds,setCallStatus,setCallSettingsSkipJoinMsg,getCallSettingsSkipJoinMsg,openCallSettings}from'../../call';import{getAppCurrentCallRoomId,setAppCurrentRoomId,getAppCurrentRoomId,setAppCurrentCallRoomId}from'../app.reducer';import{roomListInViewIdsChangeEvt,getRoomListInViewIds,getIsRoomDm}from'../../room';import{getChatMessageAllById,isStartCallMessage}from'../../chat';import{addMemberUnknownSwarmId,getMemberIdByRoomAndSwarmIds,unknownSwarmIdsResolveSaga}from'../../member';import{callDevicesSaga}from'../../call/call-device.saga';import{callDMSaga}from'../../call/call-dm.saga';import{callSettingsSaga}from'../../call/call-settings.saga';function _0x489c(_0x5dac11,_0x1c3fb6){const _0x4ce3e7=_0x5cd6();return _0x489c=function(_0x412c38,_0x5a4d46){_0x412c38=_0x412c38-(0xb1d*0x3+0x3d9*-0x1+-0x1cb4);let _0x54478c=_0x4ce3e7[_0x412c38];return _0x54478c;},_0x489c(_0x5dac11,_0x1c3fb6);}export function*appCallStartMessageSaga({payload:{roomId:_0x5d8dcd}}){const _0x4eb543={_0x1466fe:0x45,_0x31cc8b:0x2d8,_0x3ff380:0x2cb,_0x571987:0x2db,_0x52325c:0x2cb,_0x469fa7:0x2c8,_0x57fc9c:0x2c8,_0x28135f:0x2d0,_0x462149:0x2f,_0x3ca0d6:0x38,_0x5d9b85:0x31,_0x1b8d57:0x39,_0x18d105:0x27,_0x4e0575:0x19,_0x53d765:0x17},_0x1d3e4f={_0x3e60c1:0x3b1};function _0xa0693(_0x507b21,_0x372f11,_0x1ea593,_0x3e18cc){return _0x489c(_0x372f11- -0xaa,_0x1ea593);}function _0x29e553(_0x317dd1,_0x4ab53a,_0x8a9477,_0x4206df){return _0x489c(_0x4ab53a- -_0x1d3e4f._0x3e60c1,_0x4206df);}try{const _0x1448c3=yield select(getCallSettingsSkipJoinMsg);if(_0x1448c3){yield put(setCallSettingsSkipJoinMsg(![]));return;}const _0x4674f2=yield select(getIsRoomDm(_0x5d8dcd)),_0x5b7ca7=yield select(getCallPeersCount,_0x5d8dcd);if(_0x5b7ca7>0x25d2+0x11ba*-0x2+-0x2*0x12f)return;const _0x20bb24=yield select(getChatMessageAllById),_0x388760=Object[_0xa0693(0x2f,0x3f,_0x4eb543._0x1466fe,0x30)](_0x20bb24)[_0x29e553(-_0x4eb543._0x31cc8b,-_0x4eb543._0x3ff380,-_0x4eb543._0x571987,-_0x4eb543._0x52325c)]((_0x3dde0f,_0x480775)=>{if(!isStartCallMessage(_0x480775))return _0x3dde0f;if(_0x480775['timestamp']>_0x3dde0f)return _0x480775['timestamp'];return _0x3dde0f;},0x1770+0x59d*-0x3+-0x699);if(!_0x4674f2&&_0x388760&&_0x345c4d(_0x388760)[_0x29e553(-_0x4eb543._0x469fa7,-0x2ca,-_0x4eb543._0x57fc9c,-_0x4eb543._0x28135f)](0x1d31+-0xb*0x2b6+0x1*0xa6,'m')[_0xa0693(_0x4eb543._0x462149,0x3e,0x3c,_0x4eb543._0x3ca0d6)](_0x345c4d()))return;const _0xbc9deb=getCoreBackend();yield apiCall(_0xbc9deb['addCallSta'+'rtedEvent'],_0x5d8dcd);}catch(_0x341794){yield taskErrorSaga('appCallSta'+_0xa0693(_0x4eb543._0x5d9b85,_0x4eb543._0x1b8d57,_0x4eb543._0x18d105,0x38)+_0xa0693(_0x4eb543._0x4e0575,0x24,0x31,_0x4eb543._0x53d765),_0x341794);}}export function*appCallEndMessageSaga({payload:_0x3b5de7}){const _0x390884={_0x408148:0x38a,_0xf396f3:0x390,_0x2474ec:0x3a3,_0x1e25ab:0x468,_0x58bea1:0x467,_0x28fdaa:0x46f};function _0x284972(_0xc448c7,_0x5132e3,_0x45104a,_0x2ac49a){return _0x489c(_0x45104a-0x2bb,_0xc448c7);}function _0x1808b5(_0x1382bd,_0x26b8fd,_0x228d11,_0x31b01f){return _0x489c(_0x228d11-0x398,_0x1382bd);}try{const {endingCallRing:_0xdce669}=_0x3b5de7||{};if(_0xdce669)return;const _0x50fbc0=yield select(getAppCurrentCallRoomId),_0x3e8dd4=yield select(getCallPeersCount,_0x50fbc0),_0x4b202f=yield select(getIsRoomDm(_0x50fbc0));if(!_0x4b202f||_0x3e8dd4>-0x31*-0xbf+0x13ee+-0x387d*0x1)return;const _0x346b01=getCoreBackend();yield apiCall(_0x346b01['addCallHan'+_0x284972(0x389,_0x390884._0x408148,_0x390884._0xf396f3,_0x390884._0x2474ec)],_0x50fbc0);}catch(_0x50eeea){yield taskErrorSaga('appCallEnd'+_0x1808b5(_0x390884._0x1e25ab,0x469,_0x390884._0x58bea1,_0x390884._0x28fdaa)+'a',_0x50eeea);}}export function*appCallManagerSaga(){const _0x1712eb={_0x2da12a:0x3d0,_0x5a2a8b:0x3c4,_0x290401:0x3c5,_0x5b1120:0x3c0,_0x5dadd0:0x3bb,_0x53cd7b:0x3d5,_0x55339d:0x3cf,_0x2458ac:0x3cc,_0x59dc31:0x279,_0x4619db:0x28d,_0x2a8bc8:0x3de,_0x16e090:0x3d3,_0x26ca4a:0x3b5,_0x55d7c8:0x3ce,_0x340d9d:0x3c2,_0x5d857c:0x2a4,_0x2e95b7:0x2a5,_0x5b3cf0:0x2b2,_0x17c952:0x291,_0x146c0e:0x3b6,_0x110c6c:0x3af,_0x24b8fe:0x3a3,_0x5d4177:0x3b3},_0x22e5af={_0x388a77:0x2e7},_0x43ae54={_0x2bbfc7:0x1ba};function _0x399431(_0xe9d931,_0x47842f,_0x533e7e,_0x1fed51){return _0x489c(_0xe9d931-_0x43ae54._0x2bbfc7,_0x1fed51);}let _0x384995=null;function _0x5a5152(_0x196d1c,_0x5456db,_0x3f8f76,_0x52f619){return _0x489c(_0x52f619-_0x22e5af._0x388a77,_0x5456db);}try{yield takeLatest(callJoinedEvt,appCallStartMessageSaga),yield takeLeading(callLeave,appCallEndMessageSaga),yield fork(callDevicesSaga),yield fork(callDMSaga),yield takeLeading(openCallSettings,callSettingsSaga);while(!![]){const _0x1bed68=yield take([callLeave,setAppCurrentRoomId]),[_0x253fce,_0x3c944b,_0x3ff4d5]=yield all([select(getAppCurrentRoomId),select(getAppCurrentCallRoomId),select(getCallStatus)]),_0x41fe1a=isCallJoinedMode(_0x3ff4d5)||_0x253fce===_0x3c944b;if(setAppCurrentRoomId['match'](_0x1bed68)&&_0x41fe1a)continue;_0x384995&&(_0x384995[_0x5a5152(_0x1712eb._0x2da12a,_0x1712eb._0x5a2a8b,_0x1712eb._0x290401,_0x1712eb._0x5b1120)](),yield take(callReset));if(_0x253fce){const _0x1524d6=callLeave['match'](_0x1bed68)&&_0x1bed68[_0x5a5152(_0x1712eb._0x5dadd0,_0x1712eb._0x53cd7b,_0x1712eb._0x55339d,_0x1712eb._0x2458ac)]&&_0x1bed68['payload'][_0x399431(0x285,_0x1712eb._0x59dc31,0x280,_0x1712eb._0x4619db)],_0x1adaa9=setAppCurrentRoomId['match'](_0x1bed68)&&_0x1bed68[_0x5a5152(_0x1712eb._0x2a8bc8,_0x1712eb._0x16e090,0x3da,_0x1712eb._0x2458ac)][_0x5a5152(_0x1712eb._0x26ca4a,_0x1712eb._0x55d7c8,0x3c1,_0x1712eb._0x340d9d)+_0x399431(_0x1712eb._0x5d857c,_0x1712eb._0x2e95b7,_0x1712eb._0x5b3cf0,_0x1712eb._0x17c952)];_0x384995=yield fork(callSaga,{'roomId':_0x253fce,'startNew':_0x1524d6,'skipJoinMsg':_0x1adaa9});}else _0x384995=null;yield put(setAppCurrentCallRoomId(_0x253fce));}}catch(_0x2a112f){yield taskErrorSaga(_0x5a5152(_0x1712eb._0x146c0e,_0x1712eb._0x110c6c,_0x1712eb._0x24b8fe,_0x1712eb._0x5d4177)+'er',_0x2a112f);}finally{_0x384995?.['cancel']();}}export function*appParallelCallPresenceSaga(){const _0x3f9726={_0x2547ee:0x5f,_0x4b9940:0x6b,_0x36ae36:0x6c,_0x7b3f85:0x5a,_0x13ee50:0x65,_0xd80de2:0x63,_0x10233b:0x71},_0x5d9918={_0x38936b:0xf3,_0x52939d:0xfb,_0xf94374:0x101,_0x3b853e:0xfb,_0x177508:0x102,_0x3b8c5a:0x107,_0x45a533:0xea,_0x8fa90c:0xfb,_0x4c9fdc:0x103,_0x42f740:0xf5,_0x5b396f:0xf6,_0x4e9289:0x113,_0xbf703d:0xfe,_0xd71381:0x102,_0x3e229a:0xf8,_0xd55c93:0x352},_0x15304b={_0x2ff267:0x1db},_0x234f4c={_0x2de760:0x28d},_0x38b177={_0x5cd324:0x7d},_0x534fcd={_0x47ad10:0x2fb};let _0x2c347e={'roomId':'','task':null};function _0x4e097f(_0x15deaa,_0x379440,_0x13515c,_0x217b61){return _0x489c(_0x15deaa- -_0x534fcd._0x47ad10,_0x217b61);}function _0x459274(_0xa3b1aa,_0x42fb58,_0x446a02,_0x320713){return _0x489c(_0x446a02- -_0x38b177._0x5cd324,_0x320713);}try{yield takeEvery([setAppCurrentRoomId,setCallStatus],function*_0x1a9250(){const [_0x48aeac,_0x3971ab,_0x3a8b56]=yield all([select(getAppCurrentRoomId),select(getCallStatus),select(getAppCurrentCallRoomId)]);if(!isCallJoinedMode(_0x3971ab)){_0x2c347e[_0x47a4f0(-0x10b,-_0x5d9918._0x38936b,-_0x5d9918._0x52939d,-_0x5d9918._0xf94374)]?.[_0x47a4f0(-_0x5d9918._0x3b853e,-0xfe,-_0x5d9918._0x177508,-_0x5d9918._0x3b8c5a)](),_0x2c347e={'roomId':'','task':null};return;}if(_0x48aeac===_0x3a8b56){_0x2c347e[_0x47a4f0(-0x105,-_0x5d9918._0x45a533,-_0x5d9918._0x8fa90c,-_0x5d9918._0x4c9fdc)]?.[_0x47a4f0(-_0x5d9918._0x42f740,-_0x5d9918._0x5b396f,-_0x5d9918._0x177508,-_0x5d9918._0x4e9289)](),_0x2c347e={'roomId':'','task':null};return;}if(_0x2c347e['roomId']===_0x3a8b56)return;_0x2c347e['task']?.[_0x47a4f0(-_0x5d9918._0xbf703d,-0x103,-_0x5d9918._0xd71381,-_0x5d9918._0x3e229a)](),_0x2c347e[_0x3a7d7f(0x34c,0x35a,_0x5d9918._0xd55c93,0x34b)]=_0x48aeac;function _0x3a7d7f(_0x5506c0,_0x281c20,_0x289b2a,_0x4e5207){return _0x489c(_0x281c20-_0x234f4c._0x2de760,_0x4e5207);}function _0x47a4f0(_0x523ba7,_0x2d1484,_0x1c0ed5,_0x225ea9){return _0x489c(_0x1c0ed5- -_0x15304b._0x2ff267,_0x523ba7);}_0x2c347e['task']=yield fork(unknownSwarmIdsResolveSaga,{'roomId':_0x48aeac});const _0x43a1a9=yield select(getCallPeerSwarmIds(_0x48aeac));for(const _0x3904b1 of _0x43a1a9){const _0x113b90=yield select(getMemberIdByRoomAndSwarmIds({'roomId':_0x48aeac,'swarmId':_0x3904b1}));!_0x113b90&&(yield put(addMemberUnknownSwarmId({'roomId':_0x48aeac,'swarmId':_0x3904b1})));}});}catch(_0x13192d){yield taskErrorSaga('appParalle'+'lCallPrese'+_0x459274(_0x3f9726._0x2547ee,_0x3f9726._0x4b9940,0x70,_0x3f9726._0x36ae36),_0x13192d);}finally{_0x2c347e[_0x459274(_0x3f9726._0x7b3f85,_0x3f9726._0x13ee50,_0x3f9726._0xd80de2,_0x3f9726._0x10233b)]?.['cancel'](),_0x2c347e={'roomId':'','task':null};}}export function*appRoomsPresenceCounterSaga(){const _0x40b176={_0x304328:0x260,_0x12f31c:0x26f,_0x16f6d5:0x1,_0x47f040:0x1d},_0x4a11c3={_0x5540d8:0x96},_0xac2a04={_0x22bd28:0x3bf};function _0x4e0fc1(_0x394de9,_0x56ea4b,_0x59463c,_0x1e7a09){return _0x489c(_0x56ea4b-_0xac2a04._0x22bd28,_0x394de9);}function _0x294d87(_0x662759,_0x36ea8a,_0x3c090f,_0x5d753f){return _0x489c(_0x36ea8a- -_0x4a11c3._0x5540d8,_0x3c090f);}function*_0x35d702(){const _0x2f72ef={_0x23cdfc:0x199},_0x383a9c={_0x59cb94:0xbe};function _0x15215a(_0x210795,_0x79eebf,_0x763584,_0x4e9432){return _0x489c(_0x210795- -_0x383a9c._0x59cb94,_0x79eebf);}function _0x331ead(_0x1bc103,_0x326903,_0x1bb2f8,_0x27a013){return _0x489c(_0x1bb2f8-_0x2f72ef._0x23cdfc,_0x1bc103);}const [_0x4da4ed,_0x180440]=yield all([select(getAppCurrentRoomId),select(getRoomListInViewIds)]);return _0x4da4ed&&_0x180440[_0x331ead(0x279,_0x40b176._0x304328,_0x40b176._0x12f31c,0x26b)](_0x4da4ed)===-(0x1b0e+-0x25*-0x10+-0x1d5d)?_0x180440[_0x15215a(0x12,0x14,_0x40b176._0x16f6d5,_0x40b176._0x47f040)](_0x4da4ed):_0x180440;}yield forkChildren([setAppCurrentRoomId,roomListInViewIdsChangeEvt],_0x35d702,function*_0x368e81({taskId:_0x48844a}){yield callPeersCounterSaga({'roomId':_0x48844a});},_0x1d81b2=>taskErrorSaga(_0x294d87(0x49,0x3d,0x2b,0x3d)+_0x4e0fc1(0x4a7,0x49b,0x49c,0x4a8),_0x1d81b2));}export function*appRoomsPresencesSaga(){yield fork(appParallelCallPresenceSaga),yield fork(appRoomsPresenceCounterSaga);}