superchats
Version:
SuperChats is a premium library with unique features that control Whatsapp functions. With Superchats you can build service bots, multiservice chats or any system that uses whatsapp
1 lines • 17 kB
JavaScript
;const a84_0x62d38c=a84_0xc48d;(function(_0x586e3c,_0x228d90){const _0x4f8456=a84_0xc48d,_0x175404=_0x586e3c();while(!![]){try{const _0x2f41c8=-parseInt(_0x4f8456(0x203))/0x1+parseInt(_0x4f8456(0x207))/0x2*(parseInt(_0x4f8456(0x1f4))/0x3)+-parseInt(_0x4f8456(0x1ed))/0x4+parseInt(_0x4f8456(0x1d6))/0x5+parseInt(_0x4f8456(0x1ea))/0x6*(-parseInt(_0x4f8456(0x1d3))/0x7)+-parseInt(_0x4f8456(0x213))/0x8*(parseInt(_0x4f8456(0x1f0))/0x9)+parseInt(_0x4f8456(0x1d1))/0xa;if(_0x2f41c8===_0x228d90)break;else _0x175404['push'](_0x175404['shift']());}catch(_0x325cb2){_0x175404['push'](_0x175404['shift']());}}}(a84_0x306a,0x27662));function a84_0xc48d(_0x5f572a,_0x4facdb){const _0x306a91=a84_0x306a();return a84_0xc48d=function(_0xc48dfc,_0xda3c1d){_0xc48dfc=_0xc48dfc-0x1cd;let _0x29c4bf=_0x306a91[_0xc48dfc];return _0x29c4bf;},a84_0xc48d(_0x5f572a,_0x4facdb);}var __importDefault=this&&this[a84_0x62d38c(0x219)]||function(_0x69e5c2){const _0x4f73c2=a84_0x62d38c;return _0x69e5c2&&_0x69e5c2[_0x4f73c2(0x1fd)]?_0x69e5c2:{'default':_0x69e5c2};};Object['defineProperty'](exports,a84_0x62d38c(0x1fd),{'value':!![]}),exports[a84_0x62d38c(0x214)]=void 0x0;const events_1=__importDefault(require(a84_0x62d38c(0x1d7))),Models_1=require(a84_0x62d38c(0x20f)),similary_1=require(a84_0x62d38c(0x1ff)),msg_1=require(a84_0x62d38c(0x218)),connect_process_1=require(a84_0x62d38c(0x1da)),BUFFERABLE_EVENT=['messaging-history.set',a84_0x62d38c(0x202),a84_0x62d38c(0x1f1),a84_0x62d38c(0x1cd),'contacts.upsert','contacts.update',a84_0x62d38c(0x20e),a84_0x62d38c(0x1fa),a84_0x62d38c(0x1fc),'messages.reaction',a84_0x62d38c(0x1f9),a84_0x62d38c(0x1d8)],BUFFERABLE_EVENT_SET=new Set(BUFFERABLE_EVENT),makeEventBuffer=_0x7678e4=>{const _0x49b0c8=a84_0x62d38c,_0x590c88=new events_1['default'](),_0x4855d1=new Set();let _0x50216c=makeBufferData(),_0x50a5ff=0x0;_0x590c88['on']('event',_0x416323=>{for(const _0x5e13ff in _0x416323){_0x590c88['emit'](_0x5e13ff,_0x416323[_0x5e13ff]);}});function _0x285769(){_0x50a5ff+=0x1;}function _0x359f87(_0x4c3bf1=![]){const _0x31f6de=a84_0xc48d;if(!_0x50a5ff)return![];if(!_0x4c3bf1){_0x50a5ff-=0x1;if(_0x50a5ff)return![];}const _0x3eb917=makeBufferData(),_0x30b70f=Object[_0x31f6de(0x1e6)](_0x50216c['chatUpdates']);let _0x21c7da=0x0;for(const _0x298d2e of _0x30b70f){_0x298d2e[_0x31f6de(0x1d9)]&&(_0x21c7da+=0x1,_0x3eb917['chatUpdates'][_0x298d2e['id']]=_0x298d2e,delete _0x50216c['chatUpdates'][_0x298d2e['id']]);}const _0x203f0c=consolidateEvents(_0x50216c);return Object[_0x31f6de(0x20a)](_0x203f0c)[_0x31f6de(0x1d5)]&&_0x590c88[_0x31f6de(0x208)](_0x31f6de(0x204),_0x203f0c),_0x50216c=_0x3eb917,!![];}return{'process'(_0x20a773){const _0x559683=a84_0xc48d,_0x3ab6d6=_0x38cbf5=>{_0x20a773(_0x38cbf5);};return _0x590c88['on'](_0x559683(0x204),_0x3ab6d6),()=>{const _0x213839=_0x559683;_0x590c88[_0x213839(0x1de)]('event',_0x3ab6d6);};},'emit'(_0x17b037,_0x5c3f6e){const _0x273ca9=a84_0xc48d;if(_0x50a5ff&&BUFFERABLE_EVENT_SET['has'](_0x17b037))return append(_0x50216c,_0x4855d1,_0x17b037,_0x5c3f6e,_0x7678e4),!![];return _0x590c88[_0x273ca9(0x208)]('event',{[_0x17b037]:_0x5c3f6e});},'isBuffering'(){return _0x50a5ff>0x0;},'buffer':_0x285769,'flush':_0x359f87,'createBufferedFunction'(_0x3de42b){return async(..._0x36f8e4)=>{_0x285769();try{const _0x1a5998=await _0x3de42b(..._0x36f8e4);return _0x1a5998;}finally{_0x359f87();}};},'on':(..._0x4a2602)=>_0x590c88['on'](..._0x4a2602),'off':(..._0x358c90)=>_0x590c88[_0x49b0c8(0x1de)](..._0x358c90),'removeAllListeners':(..._0x546c9c)=>_0x590c88['removeAllListeners'](..._0x546c9c)};};exports[a84_0x62d38c(0x214)]=makeEventBuffer;function a84_0x306a(){const _0x3282eb=['chatDeletes','670844qMzOXq','chatUpserts','endOfHistoryTransferType','63JojZpR','chats.update','update','messageUpdates','18KPilXn','number','from','messageReactions','updateMessageWithReaction','message-receipt.update','messages.update','fromMe','messages.delete','__esModule','has','../crypto/similary','contactUpserts','notify','chats.upsert','214996fGSMGl','event','flatMap','contacts.update','85568VjfCbg','emit','assign','keys','name','messageDeletes','messageTimestamp','messages.upsert','../../Models','messages','messageUpserts','status','297512dsFwUy','makeEventBuffer','message','contacts','isLatest','../process/msg','__importDefault','empty','chats.delete','add','chatUpdates','verifiedName','4227150JWanuo','contacts.upsert','1199303nmFmhf','max','length','1481590ANKZcZ','events','groups.update','conditional','../process/connect-process','messages.reaction','messaging-history.set','key','off','type','groupUpdates','delete','chats','updateMessageWithReceipt','historySets','trimUndefined','values','WAMessageStatus','contactUpdates','messageReceipts','6sQUlIx','unreadCount'];a84_0x306a=function(){return _0x3282eb;};return a84_0x306a();}const makeBufferData=()=>{return{'historySets':{'chats':{},'messages':{},'contacts':{},'isLatest':![],'empty':!![]},'chatUpserts':{},'chatUpdates':{},'chatDeletes':new Set(),'contactUpserts':{},'contactUpdates':{},'messageUpserts':{},'messageUpdates':{},'messageReactions':{},'messageDeletes':{},'messageReceipts':{},'groupUpdates':{}};};function append(_0x1d7c1a,_0x809a6b,_0x390c11,_0x30aa20,_0x5374ae){const _0x1ef186=a84_0x62d38c;var _0x34b146,_0x161193,_0x453e62;switch(_0x390c11){case'messaging-history.set':for(const _0x11e8a9 of _0x30aa20[_0x1ef186(0x1e2)]){const _0xf46e14=_0x1d7c1a[_0x1ef186(0x1e4)][_0x1ef186(0x1e2)][_0x11e8a9['id']];_0xf46e14&&(_0xf46e14[_0x1ef186(0x1ef)]=_0x11e8a9[_0x1ef186(0x1ef)]),!_0xf46e14&&!_0x809a6b[_0x1ef186(0x1fe)](_0x11e8a9['id'])&&(_0x1d7c1a['historySets'][_0x1ef186(0x1e2)][_0x11e8a9['id']]=_0x11e8a9,_0x809a6b[_0x1ef186(0x1ce)](_0x11e8a9['id']),_0x51c48b(_0x11e8a9));}for(const _0x5b6578 of _0x30aa20[_0x1ef186(0x216)]){const _0x61f7b8=_0x1d7c1a[_0x1ef186(0x1e4)]['contacts'][_0x5b6578['id']];if(_0x61f7b8)Object[_0x1ef186(0x209)](_0x61f7b8,(0x0,similary_1['trimUndefined'])(_0x5b6578));else{const _0x600cdc='c:'+_0x5b6578['id'],_0x1b6456=_0x5b6578[_0x1ef186(0x201)]||_0x5b6578[_0x1ef186(0x20b)]||_0x5b6578[_0x1ef186(0x1d0)];(!_0x809a6b['has'](_0x600cdc)||_0x1b6456)&&(_0x1d7c1a[_0x1ef186(0x1e4)][_0x1ef186(0x216)][_0x5b6578['id']]=_0x5b6578,_0x809a6b[_0x1ef186(0x1ce)](_0x600cdc));}}for(const _0x400a7b of _0x30aa20['messages']){const _0x18eb96=stringifyMessageKey(_0x400a7b[_0x1ef186(0x1dd)]),_0xc58d37=_0x1d7c1a[_0x1ef186(0x1e4)]['messages'][_0x18eb96];!_0xc58d37&&!_0x809a6b[_0x1ef186(0x1fe)](_0x18eb96)&&(_0x1d7c1a[_0x1ef186(0x1e4)]['messages'][_0x18eb96]=_0x400a7b,_0x809a6b[_0x1ef186(0x1ce)](_0x18eb96));}_0x1d7c1a['historySets'][_0x1ef186(0x21a)]=![],_0x1d7c1a['historySets'][_0x1ef186(0x217)]=_0x30aa20['isLatest']||_0x1d7c1a[_0x1ef186(0x1e4)]['isLatest'];break;case'chats.upsert':for(const _0x59e5b7 of _0x30aa20){let _0x439cf8=_0x1d7c1a[_0x1ef186(0x1ee)][_0x59e5b7['id']];if(!_0x439cf8){_0x439cf8=_0x1d7c1a[_0x1ef186(0x1e4)][_0x59e5b7['id']];if(_0x439cf8){}}_0x439cf8?_0x439cf8=concatChats(_0x439cf8,_0x59e5b7):(_0x439cf8=_0x59e5b7,_0x1d7c1a['chatUpserts'][_0x59e5b7['id']]=_0x439cf8),_0x51c48b(_0x439cf8),_0x1d7c1a[_0x1ef186(0x1ec)][_0x1ef186(0x1fe)](_0x59e5b7['id'])&&_0x1d7c1a[_0x1ef186(0x1ec)][_0x1ef186(0x1e1)](_0x59e5b7['id']);}break;case _0x1ef186(0x1f1):for(const _0x17660b of _0x30aa20){const _0x1b6a79=_0x17660b['id'],_0x1a3d32=_0x17660b[_0x1ef186(0x1d9)]?_0x17660b[_0x1ef186(0x1d9)](_0x1d7c1a):!![];if(_0x1a3d32){delete _0x17660b[_0x1ef186(0x1d9)];const _0x29ebc1=_0x1d7c1a[_0x1ef186(0x1e4)][_0x1ef186(0x1e2)][_0x1b6a79]||_0x1d7c1a['chatUpserts'][_0x1b6a79];if(_0x29ebc1)concatChats(_0x29ebc1,_0x17660b);else{const _0x55c411=_0x1d7c1a[_0x1ef186(0x1cf)][_0x1b6a79]||{};_0x1d7c1a[_0x1ef186(0x1cf)][_0x1b6a79]=concatChats(_0x55c411,_0x17660b);}}else _0x1a3d32===undefined&&(_0x1d7c1a['chatUpdates'][_0x1b6a79]=_0x17660b);_0x1d7c1a[_0x1ef186(0x1ec)]['has'](_0x1b6a79)&&_0x1d7c1a[_0x1ef186(0x1ec)][_0x1ef186(0x1e1)](_0x1b6a79);}break;case _0x1ef186(0x1cd):for(const _0xa2dbb3 of _0x30aa20){!_0x1d7c1a[_0x1ef186(0x1ec)][_0x1ef186(0x1fe)](_0xa2dbb3)&&_0x1d7c1a['chatDeletes']['add'](_0xa2dbb3),_0x1d7c1a[_0x1ef186(0x1cf)][_0xa2dbb3]&&delete _0x1d7c1a[_0x1ef186(0x1cf)][_0xa2dbb3],_0x1d7c1a[_0x1ef186(0x1ee)][_0xa2dbb3]&&delete _0x1d7c1a[_0x1ef186(0x1ee)][_0xa2dbb3],_0x1d7c1a[_0x1ef186(0x1e4)]['chats'][_0xa2dbb3]&&delete _0x1d7c1a[_0x1ef186(0x1e4)][_0x1ef186(0x1e2)][_0xa2dbb3];}break;case'contacts.upsert':for(const _0x3c4d0d of _0x30aa20){let _0x346c8b=_0x1d7c1a[_0x1ef186(0x200)][_0x3c4d0d['id']];if(!_0x346c8b){_0x346c8b=_0x1d7c1a[_0x1ef186(0x1e4)][_0x1ef186(0x216)][_0x3c4d0d['id']];if(_0x346c8b){}}_0x346c8b?_0x346c8b=Object['assign'](_0x346c8b,(0x0,similary_1['trimUndefined'])(_0x3c4d0d)):(_0x346c8b=_0x3c4d0d,_0x1d7c1a[_0x1ef186(0x200)][_0x3c4d0d['id']]=_0x346c8b),_0x1d7c1a[_0x1ef186(0x1e8)][_0x3c4d0d['id']]&&(_0x346c8b=Object[_0x1ef186(0x209)](_0x1d7c1a[_0x1ef186(0x1e8)][_0x3c4d0d['id']],(0x0,similary_1[_0x1ef186(0x1e5)])(_0x3c4d0d)),delete _0x1d7c1a[_0x1ef186(0x1e8)][_0x3c4d0d['id']]);}break;case _0x1ef186(0x206):const _0x5ab69f=_0x30aa20;for(const _0x432088 of _0x5ab69f){const _0x767eb8=_0x432088['id'],_0x31f41b=_0x1d7c1a[_0x1ef186(0x1e4)]['contacts'][_0x767eb8]||_0x1d7c1a[_0x1ef186(0x200)][_0x767eb8];if(_0x31f41b)Object[_0x1ef186(0x209)](_0x31f41b,_0x432088);else{const _0x11cfa3=_0x1d7c1a[_0x1ef186(0x1e8)][_0x767eb8]||{};_0x1d7c1a['contactUpdates'][_0x767eb8]=Object[_0x1ef186(0x209)](_0x11cfa3,_0x432088);}}break;case _0x1ef186(0x20e):const {messages:_0x1d5165,type:_0x3ca0f4}=_0x30aa20;for(const _0x42d8a9 of _0x1d5165){const _0x2cf55f=stringifyMessageKey(_0x42d8a9[_0x1ef186(0x1dd)]);let _0x2093a6=(_0x34b146=_0x1d7c1a[_0x1ef186(0x211)][_0x2cf55f])===null||_0x34b146===void 0x0?void 0x0:_0x34b146[_0x1ef186(0x215)];if(!_0x2093a6){_0x2093a6=_0x1d7c1a[_0x1ef186(0x1e4)][_0x1ef186(0x210)][_0x2cf55f];if(_0x2093a6){}}_0x2093a6&&(_0x42d8a9['messageTimestamp']=_0x2093a6[_0x1ef186(0x20d)]),_0x1d7c1a[_0x1ef186(0x1f3)][_0x2cf55f]&&(Object['assign'](_0x42d8a9,_0x1d7c1a[_0x1ef186(0x1f3)][_0x2cf55f][_0x1ef186(0x1f2)]),delete _0x1d7c1a['messageUpdates'][_0x2cf55f]),_0x1d7c1a[_0x1ef186(0x1e4)][_0x1ef186(0x210)][_0x2cf55f]?_0x1d7c1a['historySets'][_0x1ef186(0x210)][_0x2cf55f]=_0x42d8a9:_0x1d7c1a[_0x1ef186(0x211)][_0x2cf55f]={'message':_0x42d8a9,'type':_0x3ca0f4===_0x1ef186(0x201)||((_0x161193=_0x1d7c1a['messageUpserts'][_0x2cf55f])===null||_0x161193===void 0x0?void 0x0:_0x161193[_0x1ef186(0x1df)])===_0x1ef186(0x201)?_0x1ef186(0x201):_0x3ca0f4};}break;case _0x1ef186(0x1fa):const _0x2eca25=_0x30aa20;for(const {key:_0x597af2,update:_0x3ed873}of _0x2eca25){const _0x5416d9=stringifyMessageKey(_0x597af2),_0xad859a=_0x1d7c1a[_0x1ef186(0x1e4)][_0x1ef186(0x210)][_0x5416d9]||((_0x453e62=_0x1d7c1a[_0x1ef186(0x211)][_0x5416d9])===null||_0x453e62===void 0x0?void 0x0:_0x453e62[_0x1ef186(0x215)]);if(_0xad859a)Object[_0x1ef186(0x209)](_0xad859a,_0x3ed873),_0x3ed873[_0x1ef186(0x212)]===Models_1[_0x1ef186(0x1e7)]['READ']&&!_0x597af2['fromMe']&&_0x5d5f52(_0xad859a);else{const _0x441de3=_0x1d7c1a[_0x1ef186(0x1f3)][_0x5416d9]||{'key':_0x597af2,'update':{}};Object[_0x1ef186(0x209)](_0x441de3[_0x1ef186(0x1f2)],_0x3ed873),_0x1d7c1a['messageUpdates'][_0x5416d9]=_0x441de3;}}break;case _0x1ef186(0x1fc):const _0x37a250=_0x30aa20;if('keys'in _0x37a250){const {keys:_0x22e8ef}=_0x37a250;for(const _0x15d2bb of _0x22e8ef){const _0x169dc2=stringifyMessageKey(_0x15d2bb);!_0x1d7c1a[_0x1ef186(0x20c)][_0x169dc2]&&(_0x1d7c1a[_0x1ef186(0x20c)][_0x169dc2]=_0x15d2bb),_0x1d7c1a[_0x1ef186(0x211)][_0x169dc2]&&delete _0x1d7c1a[_0x1ef186(0x211)][_0x169dc2],_0x1d7c1a['messageUpdates'][_0x169dc2]&&delete _0x1d7c1a[_0x1ef186(0x1f3)][_0x169dc2];}}else{}break;case'messages.reaction':const _0x21531f=_0x30aa20;for(const {key:_0x3232a2,reaction:_0x124e3f}of _0x21531f){const _0x25a90a=stringifyMessageKey(_0x3232a2),_0x1b073d=_0x1d7c1a[_0x1ef186(0x211)][_0x25a90a];_0x1b073d?(0x0,msg_1[_0x1ef186(0x1f8)])(_0x1b073d[_0x1ef186(0x215)],_0x124e3f):(_0x1d7c1a['messageReactions'][_0x25a90a]=_0x1d7c1a[_0x1ef186(0x1f7)][_0x25a90a]||{'key':_0x3232a2,'reactions':[]},(0x0,msg_1[_0x1ef186(0x1f8)])(_0x1d7c1a[_0x1ef186(0x1f7)][_0x25a90a],_0x124e3f));}break;case _0x1ef186(0x1f9):const _0x2db549=_0x30aa20;for(const {key:_0x5aceae,receipt:_0x220d09}of _0x2db549){const _0x43fb09=stringifyMessageKey(_0x5aceae),_0x36b56b=_0x1d7c1a[_0x1ef186(0x211)][_0x43fb09];_0x36b56b?(0x0,msg_1[_0x1ef186(0x1e3)])(_0x36b56b[_0x1ef186(0x215)],_0x220d09):(_0x1d7c1a[_0x1ef186(0x1e9)][_0x43fb09]=_0x1d7c1a['messageReceipts'][_0x43fb09]||{'key':_0x5aceae,'userReceipt':[]},(0x0,msg_1[_0x1ef186(0x1e3)])(_0x1d7c1a[_0x1ef186(0x1e9)][_0x43fb09],_0x220d09));}break;case _0x1ef186(0x1d8):const _0x83435f=_0x30aa20;for(const _0x191221 of _0x83435f){const _0x2b1803=_0x191221['id'],_0x135b6d=_0x1d7c1a['groupUpdates'][_0x2b1803]||{};!_0x1d7c1a[_0x1ef186(0x1e0)][_0x2b1803]&&(_0x1d7c1a['groupUpdates'][_0x2b1803]=Object[_0x1ef186(0x209)](_0x135b6d,_0x191221));}break;default:throw null;}function _0x51c48b(_0x4cf51a){const _0x569b92=_0x1ef186,_0x118872=_0x4cf51a['id'],_0xeb9b37=_0x1d7c1a['chatUpdates'][_0x118872];if(_0xeb9b37){const _0x33f7a6=_0xeb9b37[_0x569b92(0x1d9)]?_0xeb9b37['conditional'](_0x1d7c1a):!![];if(_0x33f7a6)delete _0xeb9b37[_0x569b92(0x1d9)],Object[_0x569b92(0x209)](_0x4cf51a,concatChats(_0xeb9b37,_0x4cf51a)),delete _0x1d7c1a[_0x569b92(0x1cf)][_0x118872];else _0x33f7a6===![]&&delete _0x1d7c1a['chatUpdates'][_0x118872];}}function _0x5d5f52(_0x3814a2){const _0x3420ac=_0x1ef186,_0x5f0e87=_0x3814a2['key']['remoteJid'],_0x1e83ee=_0x1d7c1a[_0x3420ac(0x1cf)][_0x5f0e87]||_0x1d7c1a['chatUpserts'][_0x5f0e87];(0x0,connect_process_1['isRealMessage'])(_0x3814a2,'')&&(0x0,connect_process_1['shouldIncrementChatUnread'])(_0x3814a2)&&typeof(_0x1e83ee===null||_0x1e83ee===void 0x0?void 0x0:_0x1e83ee['unreadCount'])===_0x3420ac(0x1f5)&&_0x1e83ee[_0x3420ac(0x1eb)]>0x0&&(_0x1e83ee[_0x3420ac(0x1eb)]-=0x1,_0x1e83ee['unreadCount']===0x0&&delete _0x1e83ee[_0x3420ac(0x1eb)]);}}function consolidateEvents(_0x1b3584){const _0x2051ab=a84_0x62d38c,_0x364b9d={};!_0x1b3584[_0x2051ab(0x1e4)][_0x2051ab(0x21a)]&&(_0x364b9d[_0x2051ab(0x1dc)]={'chats':Object[_0x2051ab(0x1e6)](_0x1b3584['historySets'][_0x2051ab(0x1e2)]),'messages':Object[_0x2051ab(0x1e6)](_0x1b3584[_0x2051ab(0x1e4)]['messages']),'contacts':Object[_0x2051ab(0x1e6)](_0x1b3584[_0x2051ab(0x1e4)]['contacts']),'isLatest':_0x1b3584[_0x2051ab(0x1e4)][_0x2051ab(0x217)]});const _0x31faa1=Object[_0x2051ab(0x1e6)](_0x1b3584[_0x2051ab(0x1ee)]);_0x31faa1[_0x2051ab(0x1d5)]&&(_0x364b9d['chats.upsert']=_0x31faa1);const _0x3ef7fa=Object[_0x2051ab(0x1e6)](_0x1b3584[_0x2051ab(0x1cf)]);_0x3ef7fa[_0x2051ab(0x1d5)]&&(_0x364b9d[_0x2051ab(0x1f1)]=_0x3ef7fa);const _0x2996ae=Array[_0x2051ab(0x1f6)](_0x1b3584['chatDeletes']);_0x2996ae[_0x2051ab(0x1d5)]&&(_0x364b9d[_0x2051ab(0x1cd)]=_0x2996ae);const _0x57a4f8=Object['values'](_0x1b3584[_0x2051ab(0x211)]);if(_0x57a4f8[_0x2051ab(0x1d5)]){const _0x51c53c=_0x57a4f8[0x0][_0x2051ab(0x1df)];_0x364b9d[_0x2051ab(0x20e)]={'messages':_0x57a4f8['map'](_0x3c5e00=>_0x3c5e00['message']),'type':_0x51c53c};}const _0x32ed33=Object[_0x2051ab(0x1e6)](_0x1b3584[_0x2051ab(0x1f3)]);_0x32ed33[_0x2051ab(0x1d5)]&&(_0x364b9d['messages.update']=_0x32ed33);const _0x5c8a8e=Object['values'](_0x1b3584[_0x2051ab(0x20c)]);_0x5c8a8e[_0x2051ab(0x1d5)]&&(_0x364b9d['messages.delete']={'keys':_0x5c8a8e});const _0x4a60a6=Object['values'](_0x1b3584[_0x2051ab(0x1f7)])[_0x2051ab(0x205)](({key:_0x239cad,reactions:_0x13b8b1})=>_0x13b8b1[_0x2051ab(0x205)](_0x3ee4bf=>({'key':_0x239cad,'reaction':_0x3ee4bf})));_0x4a60a6[_0x2051ab(0x1d5)]&&(_0x364b9d[_0x2051ab(0x1db)]=_0x4a60a6);const _0x41a3ee=Object['values'](_0x1b3584[_0x2051ab(0x1e9)])[_0x2051ab(0x205)](({key:_0x908276,userReceipt:_0x5c6ff9})=>_0x5c6ff9[_0x2051ab(0x205)](_0x3da2f8=>({'key':_0x908276,'receipt':_0x3da2f8})));_0x41a3ee[_0x2051ab(0x1d5)]&&(_0x364b9d[_0x2051ab(0x1f9)]=_0x41a3ee);const _0x4f5fab=Object[_0x2051ab(0x1e6)](_0x1b3584[_0x2051ab(0x200)]);_0x4f5fab[_0x2051ab(0x1d5)]&&(_0x364b9d[_0x2051ab(0x1d2)]=_0x4f5fab);const _0x31945f=Object['values'](_0x1b3584['contactUpdates']);_0x31945f[_0x2051ab(0x1d5)]&&(_0x364b9d[_0x2051ab(0x206)]=_0x31945f);const _0x29e3fd=Object[_0x2051ab(0x1e6)](_0x1b3584[_0x2051ab(0x1e0)]);return _0x29e3fd[_0x2051ab(0x1d5)]&&(_0x364b9d[_0x2051ab(0x1d8)]=_0x29e3fd),_0x364b9d;}function concatChats(_0x4b1862,_0x1be9c8){const _0x426da0=a84_0x62d38c;return _0x1be9c8['unreadCount']===null&&(_0x4b1862[_0x426da0(0x1eb)]<0x0&&(_0x4b1862[_0x426da0(0x1eb)]=undefined,_0x1be9c8['unreadCount']=undefined)),typeof _0x4b1862[_0x426da0(0x1eb)]===_0x426da0(0x1f5)&&typeof _0x1be9c8[_0x426da0(0x1eb)]===_0x426da0(0x1f5)&&(_0x1be9c8={..._0x1be9c8},_0x1be9c8[_0x426da0(0x1eb)]>=0x0&&(_0x1be9c8[_0x426da0(0x1eb)]=Math[_0x426da0(0x1d4)](_0x1be9c8[_0x426da0(0x1eb)],0x0)+Math[_0x426da0(0x1d4)](_0x4b1862['unreadCount'],0x0))),Object[_0x426da0(0x209)](_0x4b1862,_0x1be9c8);}const stringifyMessageKey=_0x1b2321=>_0x1b2321['remoteJid']+','+_0x1b2321['id']+','+(_0x1b2321[a84_0x62d38c(0x1fb)]?'1':'0');