OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-deps / @holepunchto / keet-store / store / chat / init / chat-member-update.reducer.js

1 lines · javascript ref:
function _0xa542d0(_0x363a41,_0x111965,_0x5d8dc8,_0x377949){return _0xbbcf(_0x363a41- -0x3c2,_0x111965);}function _0x3a6c(){const _0xff0b40=['2999156JvdCwn','type','message','groupedMes','eByRoomId','(((.+)+)+)','keys','coreId','deviceId','byId','reduce','memberId','8KYmDUA','48169Fpnnme','2464730lnDHta','1GEczFk','1188XvtSLf','sages','6fMwPTV','lastMessag','isHead','seq','listView','8438750rKroVv','2158916EivZAH','toString','search','forEach','constructo','5289351MsQmOq','9253209tzdZwG','9NbCvNk','values','event','apply'];_0x3a6c=function(){return _0xff0b40;};return _0x3a6c();}(function(_0x27c0ee,_0x9e0473){const _0x50d4af={_0x245b7d:0x308,_0x2f527e:0x312,_0x2c0d47:0xaf,_0x57ece7:0xb6,_0x87eb29:0xb8,_0x4b8eaf:0xb7,_0x364dd6:0xb1,_0xd84b05:0xbf,_0x14a5d3:0xc0,_0x46059c:0x326,_0x1340dc:0x329,_0x1d2f04:0x333,_0x5c3617:0xcc,_0x24bf99:0xc4,_0x3d0255:0xaf,_0x76a860:0xbd,_0x3f7307:0xbc,_0x23f85e:0xb5,_0x45f485:0xab,_0x4e1a51:0xb0,_0x5338b7:0x301,_0x248737:0x312,_0x59b9f1:0x306,_0xfd7aa6:0x324,_0x1f56d3:0x325,_0xabd5ca:0x31b,_0x57dbe3:0x31e,_0x11f15b:0xac,_0x564913:0xb7,_0x486ab4:0xc2,_0x308cea:0xae,_0x5e5e17:0xc1,_0x5b8bae:0xd1,_0x48f2a2:0xca,_0x58f7f6:0xbe,_0x4fd623:0xb2,_0x4994fb:0xcd},_0x47fe1b={_0x10a8ea:0x1f8},_0x59ea5e={_0x55501f:0x1dc};function _0x523b21(_0x2c46c2,_0x484f77,_0x4717b0,_0x1eee1c){return _0xbbcf(_0x484f77- -_0x59ea5e._0x55501f,_0x2c46c2);}const _0x151632=_0x27c0ee();function _0x19ede0(_0x51df4b,_0x137db8,_0x13d5f5,_0x4462ef){return _0xbbcf(_0x137db8-_0x47fe1b._0x10a8ea,_0x4462ef);}while(!![]){try{const _0x50c9f0=-parseInt(_0x19ede0(_0x50d4af._0x245b7d,0x315,0x322,_0x50d4af._0x2f527e))/(-0x1de6+-0x15*-0x6f+0x14cc)*(parseInt(_0x523b21(-_0x50d4af._0x2c0d47,-_0x50d4af._0x57ece7,-_0x50d4af._0x87eb29,-0xb6))/(-0x124d+0xc8d+0x2e1*0x2))+parseInt(_0x523b21(-_0x50d4af._0x4b8eaf,-_0x50d4af._0x364dd6,-_0x50d4af._0xd84b05,-_0x50d4af._0x14a5d3))/(-0x1*0x4b5+-0x10e2*0x2+-0x267c*-0x1)+parseInt(_0x19ede0(_0x50d4af._0x46059c,_0x50d4af._0x1340dc,_0x50d4af._0x1d2f04,0x321))/(-0x796+-0x712*-0x4+0x2*-0xa57)+-parseInt(_0x523b21(-_0x50d4af._0x5c3617,-0xc0,-_0x50d4af._0x24bf99,-_0x50d4af._0x3d0255))/(0x5*-0x399+0x3d5+0xe2d)*(parseInt(_0x523b21(-_0x50d4af._0x76a860,-_0x50d4af._0x3f7307,-_0x50d4af._0x364dd6,-_0x50d4af._0x23f85e))/(0xdaf+-0x19*-0x121+-0x29e2))+-parseInt(_0x523b21(-_0x50d4af._0x45f485,-_0x50d4af._0x4e1a51,-_0x50d4af._0x4e1a51,-0xa3))/(-0x1138+0x164d+-0x50e)*(parseInt(_0x19ede0(_0x50d4af._0x5338b7,_0x50d4af._0x248737,_0x50d4af._0x59b9f1,_0x50d4af._0xfd7aa6))/(0xae4+0x1a5*-0x11+-0x3*-0x5b3))+-parseInt(_0x19ede0(0x319,_0x50d4af._0x1f56d3,_0x50d4af._0xabd5ca,_0x50d4af._0x57dbe3))/(0x1f3*0x6+0x2*0x456+0x6c7*-0x3)*(-parseInt(_0x523b21(-_0x50d4af._0x11f15b,-_0x50d4af._0x564913,-_0x50d4af._0x486ab4,-_0x50d4af._0x308cea))/(-0xb61+0x23eb+-0x1880*0x1))+-parseInt(_0x523b21(-_0x50d4af._0x24bf99,-_0x50d4af._0x5e5e17,-0xb2,-_0x50d4af._0x5b8bae))/(-0x8a*0x37+-0x124*-0x1d+-0x121*0x3)*(-parseInt(_0x523b21(-_0x50d4af._0x48f2a2,-_0x50d4af._0x58f7f6,-_0x50d4af._0x4fd623,-_0x50d4af._0x4994fb))/(-0x40*-0x12+0xcb5*0x2+0x2*-0xeef));if(_0x50c9f0===_0x9e0473)break;else _0x151632['push'](_0x151632['shift']());}catch(_0x5c43b2){_0x151632['push'](_0x151632['shift']());}}}(_0x3a6c,0x4ce8b+-0x19cbc0+0x22a940));const _0x2483aa=(function(){const _0xd05cf7={_0x4733c3:0x120};let _0x261e41=!![];return function(_0x6f9027,_0xc3f3b2){const _0x39f614=_0x261e41?function(){const _0xde3f0e={_0x584962:0x1};function _0x2854f1(_0x3e9d56,_0x35c354,_0x18b23f,_0x518ee7){return _0xbbcf(_0x18b23f-_0xde3f0e._0x584962,_0x3e9d56);}if(_0xc3f3b2){const _0xc51565=_0xc3f3b2[_0x2854f1(0x142,0x131,0x131,_0xd05cf7._0x4733c3)](_0x6f9027,arguments);return _0xc3f3b2=null,_0xc51565;}}:function(){};return _0x261e41=![],_0x39f614;};}());function _0x494cce(_0x551fbc,_0x236b47,_0x4d1625,_0x5db514){return _0xbbcf(_0x5db514-0x133,_0x551fbc);}const _0x2f01a8=_0x2483aa(this,function(){const _0x43a88f={_0x218193:0x1fd,_0x395dc6:0x20e,_0x4c33fd:0x1ba,_0x7c57ef:0x1ad,_0x3a4e28:0x1ae,_0x386f0a:0x1bd,_0x56c496:0x1c4,_0x3e932e:0x1c1,_0x5ae3bd:0x1c2,_0x34f430:0x1c6,_0x53cd3f:0x217,_0x213a00:0x213,_0xef4cae:0x1be},_0x195006={_0x329b00:0x9b},_0x38b904={_0x5eaeae:0xe4};function _0x5a51c9(_0x56a4e6,_0x335a25,_0x4415a6,_0x1fb6e4){return _0xbbcf(_0x335a25-_0x38b904._0x5eaeae,_0x1fb6e4);}function _0x172fbc(_0x4ef8e4,_0x4ce23e,_0x342c33,_0x4f9700){return _0xbbcf(_0x342c33-_0x195006._0x329b00,_0x4ce23e);}return _0x2f01a8['toString']()[_0x5a51c9(0x20b,0x20c,_0x43a88f._0x218193,_0x43a88f._0x395dc6)](_0x172fbc(_0x43a88f._0x4c33fd,_0x43a88f._0x7c57ef,_0x43a88f._0x3a4e28,_0x43a88f._0x386f0a)+'+$')[_0x172fbc(_0x43a88f._0x56c496,_0x43a88f._0x3e932e,_0x43a88f._0x5ae3bd,_0x43a88f._0x34f430)]()[_0x5a51c9(_0x43a88f._0x53cd3f,_0x43a88f._0x395dc6,_0x43a88f._0x213a00,0x202)+'r'](_0x2f01a8)['search'](_0x172fbc(_0x43a88f._0x4c33fd,0x1ad,0x1ae,_0x43a88f._0xef4cae)+'+$');});_0x2f01a8();import{isSeqInRange}from'../chat.model';const isSystemEvent=_0x186d0a=>_0x186d0a&&!!_0x186d0a?.[_0xa542d0(-0x293,-0x299,-0x286,-0x284)]?.[_0xa542d0(-0x290,-0x28a,-0x295,-0x28f)];function _0xbbcf(_0x3a6cc5,_0xbbcf0e){const _0x4d2562=_0x3a6c();return _0xbbcf=function(_0x1e1787,_0x1874e4){_0x1e1787=_0x1e1787-(-0xf7c+-0x2094+0x3120);let _0x1b743a=_0x4d2562[_0x1e1787];return _0x1b743a;},_0xbbcf(_0x3a6cc5,_0xbbcf0e);}export const isSameMemberAnotherDeviceHead=(_0x76c14d,{memberId:_0x5bcd8e,deviceId:_0x467232})=>_0x76c14d[_0xa542d0(-0x2a9,-0x29b,-0x29c,-0x2b9)]===_0x5bcd8e&&_0x76c14d[_0x494cce(0x241,0x23d,0x236,0x248)][_0xa542d0(-0x2ac,-0x2a4,-0x2aa,-0x2ae)]!==_0x467232&&_0x76c14d[_0x494cce(0x24a,0x25d,0x248,0x255)];export const chatMessageMemberUpdateReducer=(_0xa99723,{payload:{roomId:_0x1b639f,memberId:_0x263faa,deviceId:_0x25663e,local:_0x477c0c}})=>{const _0x4cb1fb={_0xebad09:0x29b,_0x52748f:0x297,_0x3498bd:0x0,_0x1d24c3:0x8,_0x3af671:0xb,_0x73dd2e:0x6,_0x1f8852:0x7,_0x5928d8:0xa,_0x29f044:0x4,_0x36103c:0x269,_0x12d4b2:0x27c,_0x1562a1:0x282,_0x55b9ef:0x28b,_0x4fe6e9:0x285,_0x4c94da:0x289,_0x2596e3:0x28a,_0x23417f:0x278,_0x1ac57d:0xc,_0x4b3ce1:0x5,_0x2eb4ed:0x2,_0x29ad93:0x5,_0x3293b3:0xf,_0x7eccb9:0x2,_0x1f7b1a:0x5,_0xcabd6:0xd,_0x5cd256:0x27a,_0x514054:0x272,_0x1092ee:0x268,_0x5e47a0:0x25b,_0x5ae7c6:0x277,_0x586ef0:0x26c,_0x260189:0xe,_0x153d65:0xd,_0x58b1bd:0x4,_0x16c4f9:0x12,_0x4dadb5:0xd,_0x5049dc:0x2,_0x1c22af:0x5,_0x59978a:0x3,_0x352094:0x6,_0x2d46e0:0x9,_0x40eb42:0x19,_0x2a251c:0x270,_0x2754e3:0x26a,_0x58ab5f:0x27c,_0x1f131b:0x273,_0xbbe023:0x26c,_0x1395f6:0x27e,_0x7a6c29:0x266,_0x245599:0x275,_0x1de939:0x273,_0x4c2e7f:0x264},_0x3b92cf={_0x4123c5:0x367,_0x14b02b:0x374,_0x4287fa:0x376,_0x4dde3d:0x371,_0x1c12f0:0x1f2,_0x4b6886:0x200,_0x42b9f6:0x37b,_0x4e7d42:0x38a,_0x5652e6:0x378,_0x54f0e1:0x36d,_0x4cc63e:0x368,_0x1173ea:0x367,_0x2bb1f5:0x35e,_0x51d848:0x204,_0x40d6c9:0x1fe,_0x3debc4:0x1fa,_0x1d0ec3:0x370,_0x4494bb:0x366,_0xe3c62:0x36b,_0x38b60a:0x37a,_0x384cc7:0x38b,_0x33433f:0x382},_0xa1235a={_0x1abd5e:0x1f2,_0x15424a:0x4b,_0x3b34ec:0x139},_0x219c3e={_0x5e0c05:0x11,_0x4a149e:0x1a},_0x395ad0={_0x15aa1f:0x1bf,_0x3eefbf:0x163};function _0x479b43(_0x4f85f5,_0x5d73e2,_0x505137,_0x1ef046){return _0x494cce(_0x1ef046,_0x5d73e2-_0x395ad0._0x15aa1f,_0x505137-_0x395ad0._0x3eefbf,_0x505137-0x29);}function _0x5b894e(_0x1ff911,_0x1e602b,_0x16ee06,_0x396cf9){return _0xa542d0(_0x1e602b-0x2ab,_0x1ff911,_0x16ee06-_0x219c3e._0x5e0c05,_0x396cf9-_0x219c3e._0x4a149e);}if(!(_0x263faa&&_0x25663e))return _0xa99723;const _0x15c13a=Object[_0x479b43(0x286,_0x4cb1fb._0xebad09,0x28a,_0x4cb1fb._0x52748f)](_0xa99723['message'][_0x5b894e(0xf,_0x4cb1fb._0x3498bd,-0x3,-_0x4cb1fb._0x1d24c3)])[_0x5b894e(_0x4cb1fb._0x3af671,0x1,-_0x4cb1fb._0x73dd2e,-_0x4cb1fb._0x1f8852)]((_0x31e4a8,_0x34bc59)=>{return _0x31e4a8[_0x34bc59['seq']]=_0x34bc59,_0x31e4a8;},{}),_0x2270be={};Object[_0x5b894e(-0x5,-0x3,_0x4cb1fb._0x5928d8,-_0x4cb1fb._0x29f044)](_0xa99723[_0x479b43(_0x4cb1fb._0x36103c,_0x4cb1fb._0x12d4b2,0x26c,0x275)]['byId'])[_0x479b43(_0x4cb1fb._0x1562a1,_0x4cb1fb._0x55b9ef,_0x4cb1fb._0x4fe6e9,0x28a)](_0x56d025=>{const _0x58388e={_0x23cfdc:0x1a0,_0x1692b6:0xde},_0xb6f9dc=_0xa99723[_0x12f075(_0x3b92cf._0x4123c5,_0x3b92cf._0x14b02b,_0x3b92cf._0x4287fa,_0x3b92cf._0x4dde3d)][_0x13e4fd(0x1f1,_0x3b92cf._0x1c12f0,_0x3b92cf._0x4b6886,0x203)][_0x56d025],{memberId:_0x4ca69e,coreId:_0x5ec374,seq:_0x33f83a}=_0xb6f9dc;if(!isSeqInRange(_0xa99723[_0x12f075(_0x3b92cf._0x42b9f6,_0x3b92cf._0x4e7d42,0x382,_0x3b92cf._0x5652e6)]['inView'],_0x33f83a))return;if(_0x5ec374?.[_0x12f075(_0x3b92cf._0x54f0e1,_0x3b92cf._0x4cc63e,_0x3b92cf._0x1173ea,_0x3b92cf._0x2bb1f5)]!==_0x25663e||_0x4ca69e===_0x263faa)return;let {isHead:_0x4a7bd4}=_0xb6f9dc;function _0x13e4fd(_0x938851,_0x4a7703,_0x2e8a72,_0x466803){return _0x5b894e(_0x938851,_0x4a7703-_0xa1235a._0x1abd5e,_0x2e8a72-_0xa1235a._0x15424a,_0x466803-_0xa1235a._0x3b34ec);}if(_0x4a7bd4){const _0x19e209=_0x15c13a[_0xb6f9dc[_0x13e4fd(_0x3b92cf._0x51d848,_0x3b92cf._0x40d6c9,_0x3b92cf._0x4b6886,_0x3b92cf._0x3debc4)]-(0x661*0x3+-0x2527+0x1205)];!isSystemEvent(_0x19e209)&&_0x19e209[_0x12f075(_0x3b92cf._0x1d0ec3,_0x3b92cf._0x4494bb,_0x3b92cf._0xe3c62,0x380)]===_0x263faa&&(_0x4a7bd4=![]);}const _0x3f891f=_0x15c13a[_0xb6f9dc[_0x12f075(_0x3b92cf._0x38b60a,_0x3b92cf._0x14b02b,_0x3b92cf._0x384cc7,_0x3b92cf._0x33433f)]+(0x1*-0x58+-0x1*-0x72a+0x5*-0x15d)],_0x50ea68=_0x3f891f&&isSameMemberAnotherDeviceHead(_0x3f891f,{'memberId':_0x263faa,'deviceId':_0x25663e});!isSystemEvent(_0x3f891f)&&_0x50ea68&&(_0x2270be[_0x3f891f['id']]={..._0x3f891f,'isHead':![]});function _0x12f075(_0x311557,_0x57ea65,_0x30e452,_0x2c361e){return _0x479b43(_0x311557-_0x58388e._0x23cfdc,_0x57ea65-_0x58388e._0x1692b6,_0x311557-0xfb,_0x2c361e);}_0x2270be[_0xb6f9dc['id']]={..._0xb6f9dc,'memberId':_0x263faa,'local':_0x477c0c,'isHead':_0x4a7bd4};});let _0x359d8d=_0xa99723;const _0x41fc47=_0xa99723[_0x479b43(_0x4cb1fb._0x4c94da,_0x4cb1fb._0x2596e3,0x27d,_0x4cb1fb._0x23417f)+_0x5b894e(-_0x4cb1fb._0x1ac57d,-_0x4cb1fb._0x4b3ce1,-_0x4cb1fb._0x3af671,0x4)][_0x1b639f];_0x41fc47&&(_0x41fc47[_0x5b894e(_0x4cb1fb._0x2eb4ed,-0x7,_0x4cb1fb._0x29ad93,_0x4cb1fb._0x3498bd)][_0x5b894e(_0x4cb1fb._0x3293b3,-_0x4cb1fb._0x7eccb9,_0x4cb1fb._0x1f7b1a,-_0x4cb1fb._0xcabd6)]?.[_0x479b43(_0x4cb1fb._0x5cd256,_0x4cb1fb._0x12d4b2,_0x4cb1fb._0x514054,_0x4cb1fb._0x1092ee)]===_0x25663e&&_0x41fc47[_0x479b43(_0x4cb1fb._0x5e47a0,_0x4cb1fb._0x5ae7c6,_0x4cb1fb._0x586ef0,0x25e)][_0x5b894e(_0x4cb1fb._0x29ad93,0x2,-_0x4cb1fb._0x260189,-_0x4cb1fb._0x153d65)]!==_0x263faa&&(_0x359d8d={..._0x359d8d,'lastMessageByRoomId':{..._0x359d8d[_0x5b894e(_0x4cb1fb._0x29ad93,_0x4cb1fb._0x5928d8,_0x4cb1fb._0x58b1bd,_0x4cb1fb._0x16c4f9)+'eByRoomId'],[_0x1b639f]:{..._0x41fc47,'message':{..._0x41fc47['message'],'memberId':_0x263faa}}}}));if(Object[_0x5b894e(-_0x4cb1fb._0x4dadb5,-0x3,_0x4cb1fb._0x5049dc,-_0x4cb1fb._0x1c22af)](_0x2270be)['length']===0xf7a*0x1+-0x428*0x5+0x54e)return _0x359d8d;const _0x32eb1a=_0xa99723['message'][_0x5b894e(-_0x4cb1fb._0x59978a,-_0x4cb1fb._0x352094,0xb,_0x4cb1fb._0x2d46e0)+_0x5b894e(_0x4cb1fb._0x40eb42,_0x4cb1fb._0x1d24c3,0x18,_0x4cb1fb._0x59978a)]['map'](_0x7855a1=>{const _0x4c96d7=_0x2270be[_0x7855a1['id']];if(!_0x4c96d7)return _0x7855a1;return _0x4c96d7;});return{..._0x359d8d,'message':{..._0x359d8d[_0x479b43(0x26f,_0x4cb1fb._0x2a251c,_0x4cb1fb._0x586ef0,_0x4cb1fb._0x2754e3)],'byId':{..._0x359d8d[_0x479b43(_0x4cb1fb._0x58ab5f,_0x4cb1fb._0x1f131b,_0x4cb1fb._0xbbe023,_0x4cb1fb._0x1395f6)][_0x479b43(_0x4cb1fb._0x7a6c29,_0x4cb1fb._0x245599,_0x4cb1fb._0x1de939,_0x4cb1fb._0x4c2e7f)],..._0x2270be},'groupedMessages':_0x32eb1a}};};