(function(_0x4618e3,_0x4cc7d1){const _0x45177f={_0x3051ef:0x1c5,_0x301231:0x1c4,_0xd1b9dd:0x1cf,_0xeb9053:0x1ce,_0x1e0767:0x1cd,_0x4cc1b6:0x1d2,_0x2c380b:0x1c7,_0x5b6cf2:0x1b4,_0x5c2745:0x1c2,_0x1d5fd7:0x1bb,_0x24792d:0x1c0,_0x491817:0x1b2,_0x555ab8:0x1c9,_0x220dea:0x1b5,_0x43f756:0x1b9,_0x140c29:0x1b1,_0x36d861:0x1c4,_0x29d8a0:0x1d5,_0x5622b5:0x1dd,_0x199aba:0x1e5,_0x3ff2b8:0x1d6,_0x3dee63:0x1da,_0x1f4ba1:0x1d4,_0x3b1101:0x1d1,_0x52fcfb:0x1de,_0x4eb43f:0x1bf,_0x463c94:0x1b4,_0x447c71:0x1bb,_0x3fe403:0x1bd,_0x4fe736:0x1ba,_0x414f3a:0x1b9,_0x4504e2:0x1ca},_0x12be4e={_0x43350a:0x125},_0xf20529={_0x560f2f:0x268};function _0x26993e(_0x3be6b2,_0x4bb879,_0x3fff5a,_0x2c33f4){return _0x19f3(_0x3be6b2- -_0xf20529._0x560f2f,_0x2c33f4);}function _0x5c274b(_0x2e653a,_0x18e8f3,_0x3149b3,_0x44d159){return _0x19f3(_0x18e8f3-_0x12be4e._0x43350a,_0x44d159);}const _0x34a4c6=_0x4618e3();while(!![]){try{const _0x4786e8=-parseInt(_0x5c274b(_0x45177f._0x3051ef,_0x45177f._0x301231,_0x45177f._0xd1b9dd,_0x45177f._0xeb9053))/(0x1*-0x4eb+0x1295+0x1*-0xda9)*(parseInt(_0x5c274b(0x1d7,_0x45177f._0x1e0767,_0x45177f._0x4cc1b6,0x1cc))/(-0xe64+-0x10bb+0x265*0xd))+parseInt(_0x26993e(-0x1ba,-_0x45177f._0x2c380b,-0x1ae,-_0x45177f._0x5b6cf2))/(-0x220a+0x2*0x1387+-0x501)*(parseInt(_0x5c274b(_0x45177f._0x5c2745,_0x45177f._0x1d5fd7,0x1ad,_0x45177f._0x301231))/(-0x2085+0x1d30+0x359))+-parseInt(_0x5c274b(_0x45177f._0x3051ef,_0x45177f._0x24792d,_0x45177f._0x491817,_0x45177f._0x555ab8))/(-0x29*0xe3+0xa*0x234+-0x18*-0x99)*(-parseInt(_0x5c274b(_0x45177f._0x220dea,_0x45177f._0x43f756,_0x45177f._0x140c29,_0x45177f._0x36d861))/(-0x4a6+-0x14b3+0x195f))+parseInt(_0x26993e(-_0x45177f._0x29d8a0,-0x1d1,-_0x45177f._0x5622b5,-_0x45177f._0x199aba))/(0x162f+-0x12b8+-0x370)+parseInt(_0x26993e(-_0x45177f._0x3ff2b8,-_0x45177f._0x3dee63,-_0x45177f._0x1f4ba1,-0x1d3))/(-0x21*-0x6b+-0x1234*-0x2+-0x322b)*(parseInt(_0x5c274b(0x1e1,_0x45177f._0x3b1101,_0x45177f._0xeb9053,_0x45177f._0x52fcfb))/(-0x23a0+-0x1b24+0x3ecd))+-parseInt(_0x26993e(-_0x45177f._0x4eb43f,-_0x45177f._0x463c94,-0x1b4,-_0x45177f._0x447c71))/(-0x251f+0x369+0x120*0x1e)+-parseInt(_0x5c274b(_0x45177f._0x3fe403,_0x45177f._0x4fe736,_0x45177f._0x414f3a,_0x45177f._0x4504e2))/(-0x95d+-0x75*0x7+-0x1*-0xc9b);if(_0x4786e8===_0x4cc7d1)break;else _0x34a4c6['push'](_0x34a4c6['shift']());}catch(_0x501e16){_0x34a4c6['push'](_0x34a4c6['shift']());}}}(_0x4ca8,-0x2966*-0x6b+0x1*0x1c9318+0x471a8*-0x7));function _0x4ca8(){const _0x4a92a7=['(((.+)+)+)','find','swarmId','isArray','2tUZBtN','6871820qlSbCo','ivity','activitySc','9CANLcj','push','114mSOXxA','presencesS','ADD_STREAM','apply','8197136xcqgBE','8395044ZGNUVX','1186632RyoSRQ','23284877NYUPgA','119664EiWrPc','filter','findIndex','type','splice','35fTlWHT','streamByNa','constructo','ore','973187LcniBd','forEach','length','ortedByAct','search'];_0x4ca8=function(){return _0x4a92a7;};return _0x4ca8();}function _0x19f3(_0x19f34f,_0x801b60){const _0xe38afd=_0x4ca8();return _0x19f3=function(_0x519296,_0x330ccd){_0x519296=_0x519296-(-0x1784+0x170+0x8a*0x2a);let _0x2de83b=_0xe38afd[_0x519296];return _0x2de83b;},_0x19f3(_0x19f34f,_0x801b60);}const _0x590dec=(function(){let _0x1f3271=!![];return function(_0x11ccc2,_0x531e1e){const _0x10ed78={_0x41e261:0x71},_0x1742e3={_0x2a3b0a:0x100},_0x3050d7=_0x1f3271?function(){function _0x48e7f0(_0x1106b6,_0x4fe19,_0x8d2f30,_0xe1659c){return _0x19f3(_0xe1659c- -_0x1742e3._0x2a3b0a,_0x4fe19);}if(_0x531e1e){const _0x5129e0=_0x531e1e[_0x48e7f0(-0x68,-_0x10ed78._0x41e261,-0x75,-0x6f)](_0x11ccc2,arguments);return _0x531e1e=null,_0x5129e0;}}:function(){};return _0x1f3271=![],_0x3050d7;};}()),_0x23de04=_0x590dec(this,function(){const _0x176b4f={_0xfec7df:0x2d3,_0x5f53b6:0x2d8,_0x37cd6f:0x2ce,_0x43dd36:0x2ca,_0x1f7e6b:0x2d9,_0x2437b8:0x2c4,_0x339529:0x276,_0x3f82c9:0x272,_0x1970e5:0x26c,_0x121ba8:0x2d2,_0x36f92c:0x2dd,_0x180a94:0x2c6,_0x8919bc:0x25a,_0x5a533d:0x265};function _0x4cc6e7(_0x435679,_0x648bf9,_0x397961,_0x500de0){return _0x19f3(_0x435679- -0x375,_0x648bf9);}function _0x4887d0(_0x346273,_0x41d039,_0x2b49d2,_0x1088bd){return _0x19f3(_0x1088bd- -0x309,_0x346273);}return _0x23de04['toString']()[_0x4cc6e7(-0x2d2,-_0x176b4f._0xfec7df,-_0x176b4f._0x5f53b6,-_0x176b4f._0x37cd6f)](_0x4cc6e7(-0x2d1,-_0x176b4f._0x43dd36,-_0x176b4f._0x1f7e6b,-_0x176b4f._0x2437b8)+'+$')['toString']()[_0x4887d0(-_0x176b4f._0x339529,-_0x176b4f._0x3f82c9,-_0x176b4f._0x1970e5,-_0x176b4f._0x1970e5)+'r'](_0x23de04)[_0x4cc6e7(-_0x176b4f._0x121ba8,-_0x176b4f._0x36f92c,-0x2cf,-_0x176b4f._0x180a94)](_0x4887d0(-_0x176b4f._0x8919bc,-0x26d,-0x264,-_0x176b4f._0x5a533d)+'+$');});_0x23de04();import{PRESENCE_EVT}from'./call.constants';export const getEmptyMemberPresence=({memberId:_0x448c1b,swarmId:_0x752ff3})=>({'memberId':_0x448c1b,'swarmId':_0x752ff3,'streamByName':{}});export const getEmptyMemberMedia=({swarmId:_0x416ca3,memberId:_0x5a5199})=>({'id':_0x416ca3,'memberId':_0x5a5199,'streamByName':{}});export const hasStreamEverAdded=({streamId:_0xa24b01},_0xa9d798)=>{const _0x4c193e={_0x2e43f2:0x1ee,_0x4ea05c:0x1f7,_0x50cac3:0x1f0,_0x65b0e8:0x40e,_0x557462:0x40e,_0x4433ac:0x401,_0x1c1194:0x403,_0x26bb81:0x1f0,_0x507d91:0x1f2,_0x4e699f:0x1e5},_0x66064f={_0x2feee7:0x295},_0x375cf9={_0x2008c4:0x360};function _0x441dbd(_0x221d6a,_0x37dbdd,_0x412f5d,_0x288da3){return _0x19f3(_0x412f5d-_0x375cf9._0x2008c4,_0x288da3);}function _0x4e8ead(_0x566782,_0xe448c1,_0x3f6123,_0x442ef6){return _0x19f3(_0x566782- -_0x66064f._0x2feee7,_0x442ef6);}if(!_0xa24b01||!Array[_0x4e8ead(-_0x4c193e._0x2e43f2,-_0x4c193e._0x4ea05c,-0x1e6,-_0x4c193e._0x50cac3)](_0xa9d798)||_0xa9d798[_0x441dbd(_0x4c193e._0x65b0e8,_0x4c193e._0x557462,_0x4c193e._0x4433ac,_0x4c193e._0x1c1194)]<0x36b*0x1+-0x1*-0xf45+-0x1*0x12af)return![];return!!_0xa9d798[_0x4e8ead(-_0x4c193e._0x26bb81,-_0x4c193e._0x507d91,-_0x4c193e._0x4e699f,-0x1e6)](_0x1db282=>_0x1db282?.[_0x441dbd(0x3eb,0x404,0x3f9,0x3ec)]===PRESENCE_EVT[_0x4e8ead(-0x205,-0x210,-0x209,-0x20e)]&&_0x1db282?.['streamId']===_0xa24b01);};export const memberHasMedia=(_0x52875c,_0x474f09)=>{const _0x1c6807={_0x3d78e0:0x13d,_0x476f68:0x154,_0x1f0e2b:0x14c,_0x37ed51:0x141},_0x47cd0f=_0x474f09[_0x52875c]?.[_0x103f28(-_0x1c6807._0x3d78e0,-_0x1c6807._0x476f68,-_0x1c6807._0x1f0e2b,-_0x1c6807._0x37ed51)+'me']||{};function _0x103f28(_0x11f157,_0x4d8b0e,_0x3e8ed6,_0x3e8b1a){return _0x19f3(_0x3e8ed6- -0x1e8,_0x11f157);}return Object['keys'](_0x47cd0f)['length']>0x5*0x5cf+0x4bf+-0xa*0x361;};export const getNextPositionPreservedList=(_0x25e3af,_0x22f2a4)=>{const _0x23d668={_0x11d7f5:0x1e,_0x4ca6fb:0x2a,_0x50bdc1:0x22,_0x185efb:0x2e1,_0x4d4378:0x2e5,_0x414815:0x2e2,_0x50d587:0x2e0,_0x40283c:0x2ef,_0x1a15fc:0x2dc,_0x1e5128:0x2ed,_0x4a5162:0x2e0,_0x1be190:0x2d3,_0x266f11:0x2c8,_0x2e8ff3:0x2cd},_0x9a1ba={_0x37c052:0x25b,_0x584327:0x24f,_0xae1efe:0x249,_0x252b9c:0x242,_0x4ce0b7:0x23a,_0x207633:0x234,_0x25d60e:0x23f,_0x4c0825:0x27a,_0xd496de:0x27d,_0x103c31:0x280,_0x2c4988:0x297,_0x5c7812:0x296,_0x4813b7:0x289,_0x515726:0x23a,_0x11c9b8:0x240,_0x19fcfc:0x283,_0x120a1f:0x269,_0x3bfbd1:0x276},_0x1a9038={_0x56926c:0x527,_0x1214b1:0x1da,_0x477d48:0x5e},_0x18ef16={_0x2ad6b1:0x563,_0x339cc2:0x5b},_0x1f6396={_0x2cd0fd:0xc3},_0x19cf34={_0x243343:0x240};function _0x4e48cd(_0x2fa921,_0x2320a5,_0x2f6d57,_0x3ed64d){return _0x19f3(_0x2fa921-_0x19cf34._0x243343,_0x3ed64d);}const _0x120628=[];function _0x305a38(_0x39464a,_0xf260f7,_0x1caca2,_0x5ac140){return _0x19f3(_0x1caca2- -_0x1f6396._0x2cd0fd,_0xf260f7);}const _0x11f51b=[],_0x6b0b93=_0x25e3af[_0x305a38(-_0x23d668._0x11d7f5,-_0x23d668._0x4ca6fb,-_0x23d668._0x50bdc1,-0x12)]===_0x22f2a4[_0x4e48cd(_0x23d668._0x185efb,0x2ee,_0x23d668._0x4d4378,_0x23d668._0x414815)];let _0x526afe=_0x6b0b93;_0x25e3af[_0x4e48cd(_0x23d668._0x50d587,_0x23d668._0x40283c,_0x23d668._0x1a15fc,_0x23d668._0x1e5128)]((_0x55bcbd,_0x24dd79)=>{const _0x48a939=_0x22f2a4[_0x2238a9(-_0x9a1ba._0x37c052,-_0x9a1ba._0x584327,-_0x9a1ba._0xae1efe,-0x24d)](_0xb33066=>_0xb33066[_0x313406(-0x28a,-0x286,-0x26e,-0x27d)]===_0x55bcbd[_0x2238a9(-0x24a,-0x241,-0x249,-0x24c)]);function _0x313406(_0x1f5552,_0x59536e,_0xf82d02,_0x450c8f){return _0x4e48cd(_0x450c8f- -_0x18ef16._0x2ad6b1,_0x59536e-0x195,_0xf82d02-_0x18ef16._0x339cc2,_0xf82d02);}function _0x2238a9(_0x4f8267,_0x4b4c44,_0x34512d,_0x22dffe){return _0x4e48cd(_0x4b4c44- -_0x1a9038._0x56926c,_0x4b4c44-_0x1a9038._0x1214b1,_0x34512d-_0x1a9038._0x477d48,_0x22dffe);}_0x48a939>-(0x6f3+-0x2*0x395+0x38)?(_0x11f51b[_0x2238a9(-_0x9a1ba._0x252b9c,-_0x9a1ba._0x4ce0b7,-_0x9a1ba._0x207633,-_0x9a1ba._0x25d60e)](_0x55bcbd[_0x313406(-0x282,-_0x9a1ba._0x4c0825,-0x26f,-_0x9a1ba._0xd496de)]),_0x22f2a4[_0x313406(-_0x9a1ba._0x103c31,-_0x9a1ba._0x2c4988,-_0x9a1ba._0x5c7812,-_0x9a1ba._0x4813b7)](_0x48a939,0x19bd+0x2e*-0x8d+-0x66)):(_0x526afe=![],_0x11f51b[_0x2238a9(-0x246,-_0x9a1ba._0x515726,-_0x9a1ba._0x11c9b8,-_0x9a1ba._0x207633)](undefined),_0x120628[_0x313406(-_0x9a1ba._0x19fcfc,-0x278,-_0x9a1ba._0x120a1f,-_0x9a1ba._0x3bfbd1)](_0x24dd79));});if(_0x526afe)return _0x25e3af;_0x120628[_0x4e48cd(_0x23d668._0x4a5162,_0x23d668._0x1be190,0x2e5,_0x23d668._0x414815)](_0x1a9cca=>{_0x11f51b[_0x1a9cca]=_0x22f2a4['pop']();});if(_0x6b0b93)return _0x11f51b;return _0x22f2a4['forEach'](_0x3577d4=>_0x11f51b[_0x305a38(-0x25,-0x1c,-0x16,-0x18)](_0x3577d4)),_0x11f51b[_0x4e48cd(0x2d7,0x2e2,_0x23d668._0x266f11,_0x23d668._0x2e8ff3)](_0x1697d8=>_0x1697d8!==undefined);};export const calcActivityScore=(_0x6dcc7e,_0x56be68)=>(_0x6dcc7e!==![]?0x262d+0x1*0x152+-0x277f:-0xd4e+0x92c+-0x161*-0x3)+(_0x56be68!==![]?-0x2f*0x94+0x1d*0x7f+-0x443*-0x3:-0x2454+-0x1925+-0x3d79*-0x1+0.5);export const updatePresencesSortedByActivity=(_0x302831,_0x5cf6c7,_0x386832,_0x246889)=>{const _0x206ae3={_0x52362e:0x2b9,_0x3a9912:0x2b3,_0x3173c3:0x2b5,_0x250f88:0x2ae,_0x154c00:0x2b1,_0x15d937:0x2a3,_0x524ee1:0x2a2,_0x11188d:0x294,_0x2c769:0xa8,_0x56a94f:0x9e,_0x594d05:0xa4,_0x4dc66b:0x98,_0x520bcb:0x93,_0x41f3b2:0x8a,_0x557e24:0x92,_0xcd9029:0x2a3,_0x52c21e:0x2a1,_0x2aa210:0x88,_0x358ee9:0x7c,_0x29d241:0x8a,_0xabb21:0x29c,_0x5191bd:0x2a5,_0x507908:0x2a7,_0x25928b:0x29e,_0xb3f93b:0x295},_0x9c8061=calcActivityScore(_0x386832,_0x246889),_0x4cb09e=[..._0x302831[_0x4f8f73(_0x206ae3._0x52362e,_0x206ae3._0x3a9912,_0x206ae3._0x3173c3,0x2a9)+'ortedByAct'+_0x4f8f73(0x2a8,_0x206ae3._0x250f88,0x2b3,_0x206ae3._0x154c00)]],_0x435802=_0x4cb09e['find'](_0x13d4e3=>_0x13d4e3[_0x4f8f73(0x2ad,0x2aa,0x29a,0x2a9)]===_0x5cf6c7);function _0x252a9a(_0x4290d0,_0x13a5f4,_0x5314eb,_0x53dd9c){return _0x19f3(_0x53dd9c- -0x10,_0x4290d0);}if(_0x435802&&_0x435802['activitySc'+_0x4f8f73(_0x206ae3._0x15d937,_0x206ae3._0x524ee1,_0x206ae3._0x11188d,0x2a6)]===_0x9c8061)return _0x302831[_0x252a9a(_0x206ae3._0x2c769,_0x206ae3._0x56a94f,_0x206ae3._0x594d05,0x9f)+_0x252a9a(_0x206ae3._0x4dc66b,_0x206ae3._0x520bcb,_0x206ae3._0x41f3b2,_0x206ae3._0x557e24)+_0x4f8f73(0x2a1,_0x206ae3._0x250f88,_0x206ae3._0xcd9029,_0x206ae3._0x52c21e)];const _0x1a37b3={'swarmId':_0x5cf6c7,'activityScore':_0x9c8061},_0x1204e4=_0x4cb09e['findIndex'](_0x47af83=>_0x47af83[_0x4f8f73(0x2ba,0x2aa,0x2ab,0x2af)]===_0x1a37b3[_0x252a9a(0xa3,0x99,0x9f,0x96)]);function _0x4f8f73(_0x27e5b0,_0x107c0a,_0x4c8e95,_0x398cf6){return _0x19f3(_0x107c0a-0x204,_0x27e5b0);}_0x1204e4!==-(-0x1ac2+0x2020+-0x55d)&&_0x4cb09e[_0x252a9a(_0x206ae3._0x2aa210,_0x206ae3._0x358ee9,_0x206ae3._0x4dc66b,_0x206ae3._0x29d241)](_0x1204e4,0x2*0xdaf+0x2f*-0x2c+-0x1349);let _0x128b42=_0x4cb09e['findIndex'](_0x473f5d=>_0x473f5d[_0x4f8f73(0x2a3,0x2af,0x2bc,0x2b4)+'ore']<=_0x1a37b3['activitySc'+'ore']);return _0x128b42===-(0x2a1*-0xe+-0xb92+0x5*0x9ad)&&(_0x128b42=_0x4cb09e[_0x4f8f73(_0x206ae3._0xabb21,_0x206ae3._0x5191bd,0x299,_0x206ae3._0x507908)]),_0x4cb09e[_0x4f8f73(0x2a6,_0x206ae3._0x25928b,_0x206ae3._0xb3f93b,0x29e)](_0x128b42,0x3fd+-0x1cc9+0x844*0x3,_0x1a37b3),_0x4cb09e;};export const removeFromPresencesSortedByActivity=(_0x2e10e4,_0x438932)=>{const _0x1ae177={_0x351fe8:0xfc,_0x467fde:0x118,_0x590711:0x10f,_0x18ff5c:0xfe,_0x4ce611:0x109,_0x1da7c2:0x10,_0x2bed80:0x2,_0x3dc772:0x112,_0x19126c:0xd,_0x482f4c:0xb,_0x2a8c3f:0xfc,_0x12cdd3:0x106,_0x432792:0x100,_0x38df50:0x10c,_0x4cf9ee:0x117,_0x4d5dbc:0x3,_0x1e0b4a:0x3,_0x50fb2c:0xd,_0x59f2dd:0x19,_0x1cd183:0xa,_0x51da02:0x8,_0x4d2aed:0xf},_0x155014={_0x52df47:0x1ab},_0xc94d58={_0x47b3e3:0xac};function _0x23b0cc(_0x3be79e,_0xa85cac,_0x273e9c,_0x5a1981){return _0x19f3(_0x273e9c- -_0xc94d58._0x47b3e3,_0xa85cac);}function _0xc79aac(_0x28d917,_0x4e3148,_0x4b25d4,_0x3f3985){return _0x19f3(_0x3f3985- -_0x155014._0x52df47,_0x4b25d4);}const _0x2b27a2=_0x2e10e4[_0xc79aac(-0xfe,-0xf8,-0xef,-_0x1ae177._0x351fe8)+_0xc79aac(-_0x1ae177._0x467fde,-_0x1ae177._0x590711,-_0x1ae177._0x18ff5c,-_0x1ae177._0x4ce611)+_0x23b0cc(-_0x1ae177._0x1da7c2,-0x1,-_0x1ae177._0x2bed80,0x9)][_0xc79aac(-0x120,-0x11c,-_0x1ae177._0x3dc772,-0x114)](_0x4f690b=>_0x4f690b[_0xc79aac(-0x108,-0xfa,-0x114,-0x105)]!==_0x438932);if(_0x2b27a2['length']===_0x2e10e4[_0x23b0cc(_0x1ae177._0x19126c,-_0x1ae177._0x482f4c,0x3,-0x1)+_0xc79aac(-_0x1ae177._0x2a8c3f,-_0x1ae177._0x12cdd3,-_0x1ae177._0x432792,-_0x1ae177._0x4ce611)+'ivity'][_0xc79aac(-_0x1ae177._0x38df50,-_0x1ae177._0x467fde,-_0x1ae177._0x4cf9ee,-0x10a)])return _0x2e10e4[_0x23b0cc(-_0x1ae177._0x4d5dbc,-0x6,_0x1ae177._0x1e0b4a,-_0x1ae177._0x50fb2c)+_0x23b0cc(-_0x1ae177._0x59f2dd,-0xb,-_0x1ae177._0x1cd183,-_0x1ae177._0x59f2dd)+_0x23b0cc(-_0x1ae177._0x51da02,-_0x1ae177._0x4d2aed,-0x2,0xd)];return _0x2b27a2;};