OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-deps / @holepunchto / keet-store / store / call / call-presence.saga.js

1 lines · javascript ref:
(function(_0x30cd13,_0x2e20bb){const _0x415585={_0x3c214a:0x5b5,_0x25f669:0x5b4,_0x507949:0x5aa,_0xf194f:0x5b9,_0x2f4a0b:0x5b9,_0x167e3a:0x5be,_0x481beb:0x5c9,_0x3831da:0x5c2,_0x2c05fd:0x5c7,_0x3d5239:0x5cc,_0x5da0d3:0x5b8,_0x6eb83c:0x5c4,_0x56e2c3:0x5bc,_0x4b967e:0x5ba,_0x37823f:0x5bd,_0x243724:0x5cb,_0x2d9965:0x3a0,_0x157153:0x38e,_0x2b7e5b:0x39b,_0x3c790f:0x39f,_0x117806:0x5b7,_0x726f20:0x5cd,_0x332df9:0x38b,_0x28a414:0x38f,_0x48850a:0x5ac,_0x5a1b70:0x5c0,_0x2e16e:0x389,_0x55543d:0x381,_0x32bb3f:0x5c7,_0x503a0f:0x5c0,_0x4d1433:0x5ce},_0x3b9162={_0x3f2d9d:0x1a3},_0x18c07b={_0x94f4f:0x3d3},_0xf860d2=_0x30cd13();function _0x6c4732(_0x4ec6e1,_0x34a930,_0x5564c2,_0x500aa7){return _0x3e48(_0x4ec6e1-_0x18c07b._0x94f4f,_0x34a930);}function _0x1be3d5(_0x43d083,_0xf426d4,_0x554fe8,_0x57fad5){return _0x3e48(_0x554fe8-_0x3b9162._0x3f2d9d,_0x57fad5);}while(!![]){try{const _0x45b605=-parseInt(_0x6c4732(_0x415585._0x3c214a,_0x415585._0x25f669,0x5ad,_0x415585._0x507949))/(-0x290*0x4+0x3*0x757+-0xbc4)*(parseInt(_0x6c4732(0x5b1,_0x415585._0xf194f,_0x415585._0x2f4a0b,_0x415585._0x167e3a))/(-0x3c7+-0x1d77*-0x1+-0x19ae))+-parseInt(_0x6c4732(_0x415585._0x481beb,_0x415585._0x3831da,_0x415585._0x2c05fd,_0x415585._0x3d5239))/(-0x4a*-0x67+-0x218d+0x3ca)*(parseInt(_0x6c4732(_0x415585._0x5da0d3,0x5c7,_0x415585._0x167e3a,_0x415585._0x6eb83c))/(0x1*-0x641+-0x1*-0x189f+0xae*-0x1b))+parseInt(_0x6c4732(_0x415585._0x56e2c3,_0x415585._0x4b967e,0x5b5,0x5b0))/(-0x1*-0x859+0x66c+-0xec0)+parseInt(_0x6c4732(_0x415585._0x37823f,0x5be,_0x415585._0x3d5239,_0x415585._0x243724))/(-0x787+-0x1*0xacf+0x14*0xeb)+parseInt(_0x1be3d5(_0x415585._0x2d9965,_0x415585._0x157153,_0x415585._0x2b7e5b,_0x415585._0x3c790f))/(-0x17*-0x77+0x1*0x6ab+-0x1155*0x1)*(-parseInt(_0x6c4732(0x5c3,_0x415585._0x117806,0x5c6,_0x415585._0x726f20))/(-0x713*0x2+0x7b1+-0x97*-0xb))+-parseInt(_0x1be3d5(_0x415585._0x332df9,0x381,_0x415585._0x28a414,0x39a))/(-0x21b4+-0x12be+0xa7f*0x5)*(-parseInt(_0x6c4732(0x5b9,_0x415585._0x48850a,0x5ad,_0x415585._0x5a1b70))/(0x1c44+0x2116+-0x1b4*0x24))+parseInt(_0x1be3d5(_0x415585._0x2e16e,_0x415585._0x55543d,_0x415585._0x332df9,_0x415585._0x332df9))/(-0x21fe*0x1+0x231f+-0x116)*(parseInt(_0x6c4732(_0x415585._0x3831da,_0x415585._0x32bb3f,_0x415585._0x503a0f,_0x415585._0x4d1433))/(-0x2149+0xf59*0x2+0x2a3));if(_0x45b605===_0x2e20bb)break;else _0xf860d2['push'](_0xf860d2['shift']());}catch(_0x12f374){_0xf860d2['push'](_0xf860d2['shift']());}}}(_0x5f07,0x3466e+-0x3f*-0xc9d+0x106*-0x324));const _0x14636f=(function(){const _0x300d0c={_0xb37ebf:0x10e,_0x131f4f:0x114,_0x5ba30f:0x10d,_0x1a0c50:0x115};let _0x1bd304=!![];return function(_0x4a4625,_0x5ec8e4){const _0x324f9a=_0x1bd304?function(){const _0x33eda6={_0x3d127b:0xd7};function _0x5c3a7d(_0x480f65,_0x19c094,_0x4a701e,_0x314f20){return _0x3e48(_0x19c094- -_0x33eda6._0x3d127b,_0x314f20);}if(_0x5ec8e4){const _0x45b39c=_0x5ec8e4[_0x5c3a7d(_0x300d0c._0xb37ebf,_0x300d0c._0x131f4f,_0x300d0c._0x5ba30f,_0x300d0c._0x1a0c50)](_0x4a4625,arguments);return _0x5ec8e4=null,_0x45b39c;}}:function(){};return _0x1bd304=![],_0x324f9a;};}()),_0x11d7f2=_0x14636f(this,function(){const _0x210e44={_0xa36c71:0x152,_0xbced:0x14b,_0x2dfd5f:0x151,_0x4c4b11:0x157,_0x27ad1e:0xc6,_0x36f645:0xd4,_0x18fc3e:0xb9,_0x3eea8:0xca,_0x15df0b:0x14d,_0x596b16:0x139,_0x10d483:0x147,_0x2f13bf:0x14e,_0x337cf2:0x139},_0x58ac1d={_0x5bd535:0x2ad},_0x20631c={_0x94ef6a:0x33c};function _0x4f9bac(_0x389a8e,_0x1b6be0,_0x5ad40d,_0x58f272){return _0x3e48(_0x1b6be0- -_0x20631c._0x94ef6a,_0x58f272);}function _0x3d68ac(_0x40e94d,_0x3156b2,_0x5f593d,_0x13d464){return _0x3e48(_0x40e94d- -_0x58ac1d._0x5bd535,_0x5f593d);}return _0x11d7f2[_0x4f9bac(-_0x210e44._0xa36c71,-_0x210e44._0xbced,-_0x210e44._0x2dfd5f,-_0x210e44._0x4c4b11)]()[_0x3d68ac(-_0x210e44._0x27ad1e,-_0x210e44._0x36f645,-_0x210e44._0x18fc3e,-_0x210e44._0x3eea8)]('(((.+)+)+)'+'+$')[_0x4f9bac(-_0x210e44._0x15df0b,-_0x210e44._0xbced,-_0x210e44._0x4c4b11,-0x14f)]()[_0x4f9bac(-_0x210e44._0x596b16,-_0x210e44._0x10d483,-_0x210e44._0x2f13bf,-_0x210e44._0x337cf2)+'r'](_0x11d7f2)['search']('(((.+)+)+)'+'+$');});_0x11d7f2();import{put,select}from'redux-saga/effects';import{apiSubscribeSaga}from'../lib';import{getCallApi,getCoreBackend}from'../../backend';import{apiCall}from'../../api/core';import{taskError}from'../error';import{increaseCallPeersCount,decreaseCallPeersCount,removeCallPeersCount}from'./call.action';import{getCallPeersCount}from'./call.reducer';function _0x5f07(){const _0x3d6544=['aga','16FLueVM','950ttcIsn','search','228503Bsfeeh','1402840HHyOoa','1696068WDOQpa','apply','13437ozTWUA','subscribeP','rsCounterS','204hkXpoM','72sNvEys','toString','appCallPee','get\x20room\x20d','iscovery\x20k','constructo','222780UhvmGe','presence','181111aZnlRz','BER','resence','8792fnkqia','stack','REMOVE_MEM','ADD_MEMBER','73UeZzYA','getRoomKey'];_0x5f07=function(){return _0x3d6544;};return _0x5f07();}function _0x3e48(_0x5f0712,_0x3e4800){const _0x366eec=_0x5f07();return _0x3e48=function(_0x3c6c4b,_0x300efc){_0x3c6c4b=_0x3c6c4b-(0x10ff+-0x20b5+0x1194);let _0x43ccd2=_0x366eec[_0x3c6c4b];return _0x43ccd2;},_0x3e48(_0x5f0712,_0x3e4800);}import{PRESENCE_EVT}from'./call.constants';import{getRoomDiscoveryKeyById}from'../room/room.selector';import{setRoomDiscoveryKey}from'../room/room.action';export function*callPeersCounterSaga({roomId:_0x5b952b}){const _0xaccbe4={_0x40eb7c:0x55c,_0x512786:0x56e,_0x140365:0x4b3,_0x23aecd:0x4bb,_0x18ebc1:0x4b1,_0x522642:0x4ba,_0x59e444:0x568,_0x311cf8:0x572,_0x1133d3:0x57b,_0xf2f51:0x4b2,_0x2ce579:0x4be,_0x4ac5f2:0x586,_0x4d1540:0x57e,_0xf1172c:0x578,_0x4ec410:0x579},_0x3ba754={_0x1fc6d3:0x3c1,_0x2de7d3:0x3c8,_0x145917:0x3b9,_0x34717f:0x8c,_0x272644:0x9f,_0xbbd976:0xa0,_0xbbb0ac:0x7d,_0x387552:0x78},_0x1a409a={_0x91906d:0x2bf},_0x4d89cc=getCoreBackend();let _0x4cb364=yield select(getRoomDiscoveryKeyById(_0x5b952b));if(!_0x4cb364){const {discoveryKey:_0x1a174a}=yield apiCall(_0x4d89cc[_0xfe77ea(0x573,_0xaccbe4._0x40eb7c,0x567,_0xaccbe4._0x512786)+'s'],_0x5b952b);_0x4cb364=_0x1a174a,yield put(setRoomDiscoveryKey({'roomId':_0x5b952b,'key':_0x1a174a}));}function _0x745296(_0xc2d8b8,_0x12298a,_0x2e3b9e,_0x4a805c){return _0x3e48(_0x2e3b9e-_0x1a409a._0x91906d,_0x4a805c);}if(!_0x4cb364){yield put(taskError(_0x745296(_0xaccbe4._0x140365,_0xaccbe4._0x23aecd,_0xaccbe4._0x18ebc1,_0xaccbe4._0x522642)+_0xfe77ea(0x57c,_0xaccbe4._0x59e444,_0xaccbe4._0x311cf8,_0xaccbe4._0x1133d3)+'aga','unable\x20to\x20'+_0x745296(0x4b8,0x4ac,_0xaccbe4._0xf2f51,_0xaccbe4._0x2ce579)+_0xfe77ea(_0xaccbe4._0x4ac5f2,_0xaccbe4._0x4d1540,_0xaccbe4._0xf1172c,_0xaccbe4._0x4ec410)+'ey'));return;}function*_0x5174d9(_0x51341d){const _0x162211={_0x2d61f8:0xd3,_0x2dcf5c:0xbb},_0x537567={_0x157aab:0x154};function _0xabd82d(_0x43de9b,_0x1389aa,_0x24b4be,_0x427d02){return _0xfe77ea(_0x1389aa,_0x1389aa-0x1ec,_0x43de9b- -0x1a4,_0x427d02-_0x537567._0x157aab);}function _0x1e4548(_0x12a755,_0x109a50,_0x3aa93d,_0x2e6f48){return _0x745296(_0x12a755-_0x162211._0x2d61f8,_0x109a50-_0x162211._0x2dcf5c,_0x3aa93d- -0x535,_0x12a755);}const {swarmId:_0x5997f3,type:_0x3eb50d}=_0x51341d;switch(_0x3eb50d){case PRESENCE_EVT[_0xabd82d(_0x3ba754._0x1fc6d3,_0x3ba754._0x2de7d3,_0x3ba754._0x145917,0x3c9)]:{yield put(increaseCallPeersCount({'roomId':_0x5b952b,'swarmId':_0x5997f3}));break;}case PRESENCE_EVT[_0x1e4548(-_0x3ba754._0x34717f,-_0x3ba754._0x272644,-0x96,-_0x3ba754._0xbbd976)+_0x1e4548(-_0x3ba754._0xbbb0ac,-0x83,-_0x3ba754._0xbbb0ac,-_0x3ba754._0x387552)]:{const _0x2cb914=yield select(getCallPeersCount,_0x5b952b);_0x2cb914>-0x15d8+0x1dd1+0x9d*-0xd&&(yield put(decreaseCallPeersCount({'roomId':_0x5b952b,'swarmId':_0x5997f3})));break;}default:break;}}const _0x2d33d8=()=>getCallApi()[_0x745296(0x4aa,0x4ad,0x4b6,0x4be)][_0xfe77ea(0x56a,0x569,0x571,0x56b)+_0x745296(0x4af,0x4b0,0x4b9,0x4c1)](_0x4cb364);function _0xfe77ea(_0x2a1d98,_0x4777b2,_0x4dc37a,_0x2f36fe){return _0x3e48(_0x4dc37a-0x384,_0x2a1d98);}yield apiSubscribeSaga([_0x2d33d8],_0x5174d9,{'onError':_0x2f5800=>put(taskError('appCallPee'+_0xfe77ea(0x57a,0x577,0x572,0x571)+_0x745296(0x494,0x498,0x4a3,0x4a5),_0x2f5800['message'],_0x2f5800[_0xfe77ea(0x566,0x55f,0x563,0x56a)])),'onCleanup':()=>put(removeCallPeersCount({'roomId':_0x5b952b}))});}