-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
157 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,47 @@ | ||
/* eslint-disable no-alert */ | ||
// prettier-ignore | ||
function a0_0x5195(){const _0x202e40=['documentElement','CN_OB','getStore','webpackChunkbuild','616171feIrdZ','forEach','112516gzObZX','CN_RFM','default','8XExIOJ','addEventListener','webpackChunkwhatsapp_web_client','object','emit','exports','refresh','delete','CN_INO','CN_SEM','5zugdjR','all','54GByFxR','dispose','observe','size','get','now','CN_SMID','from','defaultOptions','waitForModule','filter','push','CN_RM','1041740BeGokw','1301652GkvHse','load','3520092tqqYvd','Timeout','off','isArray','defineProperty','function','keys','addedNodes','_options','length','__esModule','error','_events','resolve','_modules','amd','1393294OcMqyC','mutationObserver','clear','apply','SCRIPT','nodeName','set','1254484zxCLTW'];a0_0x5195=function(){return _0x202e40;};return a0_0x5195();}function a0_0x57e0(_0x3fc71c,_0x71b1d3){const _0x5195bb=a0_0x5195();return a0_0x57e0=function(_0x57e0c7,_0x1615ae){_0x57e0c7=_0x57e0c7-0x1d2;let _0x10b4a1=_0x5195bb[_0x57e0c7];return _0x10b4a1;},a0_0x57e0(_0x3fc71c,_0x71b1d3);}(function(_0x516501,_0x9d5cb){const _0x3de92b=a0_0x57e0,_0x32aa1f=_0x516501();while(!![]){try{const _0xd42ae6=-parseInt(_0x3de92b(0x1fa))/0x1+parseInt(_0x3de92b(0x1fc))/0x2+parseInt(_0x3de92b(0x1dc))/0x3+parseInt(_0x3de92b(0x1f5))/0x4*(parseInt(_0x3de92b(0x209))/0x5)+parseInt(_0x3de92b(0x1de))/0x6+parseInt(_0x3de92b(0x1ee))/0x7*(parseInt(_0x3de92b(0x1ff))/0x8)+-parseInt(_0x3de92b(0x20b))/0x9*(parseInt(_0x3de92b(0x1db))/0xa);if(_0xd42ae6===_0x9d5cb)break;else _0x32aa1f['push'](_0x32aa1f['shift']());}catch(_0x43b493){_0x32aa1f['push'](_0x32aa1f['shift']());}}}(a0_0x5195,0x55070),!function(_0x506c66,_0x53f425){const _0x44c6cf=a0_0x57e0;_0x44c6cf(0x202)==typeof exports&&_0x44c6cf(0x202)==typeof module?module[_0x44c6cf(0x204)]=_0x53f425():_0x44c6cf(0x1e3)==typeof define&&define[_0x44c6cf(0x1ed)]?define([],_0x53f425):_0x44c6cf(0x202)==typeof exports?exports[_0x44c6cf(0x1f8)]=_0x53f425():_0x506c66[_0x44c6cf(0x1f8)]=_0x53f425();}(self,function(){return(()=>{'use strict';var _0x28b93d={0x1d3:(_0x40ecc6,_0x10ad68)=>{const _0x1774fa=a0_0x57e0;Object[_0x1774fa(0x1e2)](_0x10ad68,_0x1774fa(0x1e8),{'value':!0x0}),_0x10ad68[_0x1774fa(0x1d6)]=void 0x0,_0x10ad68[_0x1774fa(0x1d6)]={'CN_RM':!0x0,'CN_OB':!0x0,'CN_CKN':[_0x1774fa(0x1f9),_0x1774fa(0x201)]},_0x10ad68[_0x1774fa(0x1fe)]=class{constructor(_0x37e520={}){const _0x9c7728=_0x1774fa;this[_0x9c7728(0x1ec)]=new Map(),this[_0x9c7728(0x1ef)]=null,this['_events']=new Map(),this[_0x9c7728(0x1e6)]=Object['assign']({},_0x10ad68[_0x9c7728(0x1d6)],_0x37e520),this[_0x9c7728(0x1e6)][_0x9c7728(0x1da)]&&this[_0x9c7728(0x1fd)](),this['_options'][_0x9c7728(0x1f7)]&&this[_0x9c7728(0x207)]();}['on'](_0x2a2868,_0x5d3fa8){const _0x33bf34=_0x1774fa,_0x31fd6a=this[_0x33bf34(0x1ea)][_0x33bf34(0x1d2)](_0x2a2868);return this['_events']['has'](_0x2a2868)&&this[_0x33bf34(0x1ea)][_0x33bf34(0x1f4)](_0x2a2868,[..._0x31fd6a,_0x5d3fa8]),this[_0x33bf34(0x1ea)][_0x33bf34(0x1f4)](_0x2a2868,[_0x5d3fa8]),!0x0;}['off'](_0x2aae51,_0x1fed1b){const _0x3665c5=_0x1774fa;if(!_0x1fed1b)return this['_events'][_0x3665c5(0x206)](_0x2aae51);const _0x2d8c8a=this[_0x3665c5(0x1ea)]['get'](_0x2aae51);if(Array[_0x3665c5(0x1e1)](_0x2d8c8a)&&_0x2d8c8a[_0x3665c5(0x1e7)]){const _0x4d72b1=_0x2d8c8a[_0x3665c5(0x1d8)](_0x27186c=>_0x27186c!==_0x1fed1b);return this[_0x3665c5(0x1ea)]['set'](_0x2aae51,_0x4d72b1),!0x0;}return!0x1;}[_0x1774fa(0x203)](_0x166dd6,..._0x47a32a){const _0x388394=_0x1774fa,_0x574720=this[_0x388394(0x1ea)][_0x388394(0x1d2)](_0x166dd6);Array[_0x388394(0x1e1)](_0x574720)&&_0x574720['length']&&_0x574720[_0x388394(0x1fb)](_0x506213=>{const _0x16e0f2=_0x388394;try{_0x506213[_0x16e0f2(0x1f1)](this,_0x47a32a);}catch(_0x7dfd2c){}});}[_0x1774fa(0x207)](){const _0x2c721e=_0x1774fa;this[_0x2c721e(0x1ef)]||(this['mutationObserver']=new MutationObserver(async _0x562432=>{const _0x5153a0=_0x2c721e,_0x205cbd=[];for(const _0x5f446f of _0x562432){const _0x1ac073=Array[_0x5153a0(0x1d5)](_0x5f446f[_0x5153a0(0x1e5)]);for(const _0x3ad279 of _0x1ac073)_0x5153a0(0x1f2)===_0x3ad279[_0x5153a0(0x1f3)]&&_0x205cbd['push'](new Promise(_0x51adca=>{const _0x4e1914=_0x5153a0;_0x3ad279[_0x4e1914(0x200)](_0x4e1914(0x1dd),_0x51adca),_0x3ad279[_0x4e1914(0x200)](_0x4e1914(0x1e9),_0x51adca);}));}await Promise[_0x5153a0(0x20a)](_0x205cbd),_0x205cbd[_0x5153a0(0x1e7)]&&await this[_0x5153a0(0x1fd)]();}),this[_0x2c721e(0x1ef)][_0x2c721e(0x20d)](document[_0x2c721e(0x1f6)],{'childList':!0x0,'subtree':!0x0}));}['CN_RFM'](){const _0x162028=_0x1774fa,_0x22fece=this['_options']['CN_CKN']||[_0x162028(0x1f9)],_0x21b706=[];for(const _0x58979c of _0x22fece){const _0x224dcc=window[_0x58979c];Array[_0x162028(0x1e1)](_0x224dcc)&&_0x224dcc[_0x162028(0x1e7)]&&_0x21b706[_0x162028(0x1d9)](_0x224dcc);}if(!_0x21b706['length'])return Promise[_0x162028(0x1eb)](!0x1);const _0x56badd=this[_0x162028(0x1ec)][_0x162028(0x20e)];return new Promise(_0x3644b1=>{const _0x3f1bee=_0x162028;for(const _0x1fcb5e of _0x21b706){const _0x46da0f=Date[_0x3f1bee(0x1d3)]();_0x1fcb5e['push']([[_0x46da0f],{},_0x495b37=>{const _0x2919e4=_0x3f1bee;for(const _0x18342f in _0x495b37['m']){const _0x1a938c=_0x495b37(_0x18342f);this[_0x2919e4(0x1ec)]['set'](_0x18342f+'',_0x1a938c);}const _0x2e02cd=_0x56badd!==this[_0x2919e4(0x1ec)]['size'];this[_0x2919e4(0x203)]('refresh',_0x2e02cd),_0x3644b1(_0x2e02cd);}]);}});}[_0x1774fa(0x1d4)](_0x2d8f42,_0x1bca6e=!0x1){const _0x18eace=_0x1774fa;let _0x469d8a=Array[_0x18eace(0x1d5)](this[_0x18eace(0x1ec)][_0x18eace(0x1e4)]());_0x1bca6e&&(_0x469d8a=_0x469d8a['reverse']());for(const _0xf88542 of _0x469d8a)try{if(_0x2d8f42(this[_0x18eace(0x1ec)][_0x18eace(0x1d2)](_0xf88542),_0xf88542))return _0xf88542;}catch(_0x429964){continue;}return null;}[_0x1774fa(0x208)](_0x593bf7,_0x487b28=!0x1){const _0x4377b5=_0x1774fa,_0x1d4a3f=this['CN_SMID'](_0x593bf7,_0x487b28);return _0x1d4a3f?this[_0x4377b5(0x1ec)][_0x4377b5(0x1d2)](_0x1d4a3f):null;}async[_0x1774fa(0x1d7)](_0x32cc63,_0x52e541=!0x1,_0xcf1272=!0x1){return await this['CN_SEM'](_0x32cc63,_0x52e541)||(this['CN_INO'](),new Promise((_0x20c1b9,_0x1403ad)=>{const _0x1eca3f=a0_0x57e0,_0x535390=async _0x535fe3=>{const _0x5c96b9=a0_0x57e0;if(!_0x535fe3)return;const _0x2ef556=await this[_0x5c96b9(0x208)](_0x32cc63,_0x52e541);_0x2ef556&&(this[_0x5c96b9(0x1e0)]('refresh',_0x535390),_0x20c1b9(_0x2ef556));};this['on'](_0x1eca3f(0x205),_0x535390),_0xcf1272&&setTimeout(()=>{const _0x26792e=_0x1eca3f;_0x1403ad(new Error(_0x26792e(0x1df)));},_0xcf1272);}));}[_0x1774fa(0x1d2)](_0x4aa9b8){const _0x33ac7e=_0x1774fa;return this[_0x33ac7e(0x1ec)]['get'](_0x4aa9b8+'');}[_0x1774fa(0x1fb)](_0x19def6){const _0x2b0a7e=_0x1774fa;return this['_modules'][_0x2b0a7e(0x1fb)](_0x19def6,this);}get['size'](){const _0x51ede7=_0x1774fa;return this[_0x51ede7(0x1ec)][_0x51ede7(0x20e)];}[_0x1774fa(0x20c)](){const _0x346bf5=_0x1774fa;this[_0x346bf5(0x1ef)]['disconnect'](),this[_0x346bf5(0x1ec)][_0x346bf5(0x1f0)](),this['_events'][_0x346bf5(0x1f0)]();}};}},_0x495573={};function _0x24116a(_0x3ecce3){const _0x2fed1c=a0_0x57e0;var _0x4e4559=_0x495573[_0x3ecce3];if(void 0x0!==_0x4e4559)return _0x4e4559[_0x2fed1c(0x204)];var _0x2b0543=_0x495573[_0x3ecce3]={'exports':{}};return _0x28b93d[_0x3ecce3](_0x2b0543,_0x2b0543['exports'],_0x24116a),_0x2b0543[_0x2fed1c(0x204)];}var _0x255339={};return(()=>{const _0x196cc0=a0_0x57e0;var _0x1fb4d2=_0x255339;Object[_0x196cc0(0x1e2)](_0x1fb4d2,_0x196cc0(0x1e8),{'value':!0x0});const _0x3b993b=_0x24116a(0x1d3);_0x1fb4d2[_0x196cc0(0x1fe)]=_0x3b993b[_0x196cc0(0x1fe)];})(),_0x255339;})();})); | ||
const { storeObjects } = require('./store-objects'); | ||
export async function getStore(modules) { | ||
let foundCount = 0; | ||
let neededObjects = storeObjects; | ||
for (let idx in modules) { | ||
if (typeof modules[idx] === 'object' && modules[idx] !== null) { | ||
neededObjects.forEach((needObj) => { | ||
if (!needObj.conditions || needObj.foundedModule) return; | ||
let neededModule = needObj.conditions(modules[idx]); | ||
if (neededModule !== null) { | ||
foundCount++; | ||
needObj.foundedModule = neededModule; | ||
} | ||
}); | ||
if (foundCount == neededObjects.length) { | ||
break; | ||
} | ||
} | ||
} | ||
|
||
let neededStore = neededObjects.find((needObj) => needObj.id === 'Store'); | ||
window.Store = neededStore.foundedModule ? neededStore.foundedModule : {}; | ||
neededObjects.splice(neededObjects.indexOf(neededStore), 1); | ||
|
||
neededObjects.forEach((needObj) => { | ||
if (needObj.foundedModule) { | ||
window.Store[needObj.id] = needObj.foundedModule; | ||
} | ||
}); | ||
|
||
window.Store.sendMessage = function (e) { | ||
return window.Store.SendTextMsgToChat(this, ...arguments); | ||
}; | ||
window.Store.Chat.modelClass.prototype.sendMessage = function (e) { | ||
window.Store.SendTextMsgToChat(this, ...arguments); | ||
}; | ||
|
||
if (window.Store.MediaCollection) | ||
window.Store.MediaCollection.prototype.processFiles = | ||
window.Store.MediaCollection.prototype.processFiles || | ||
window.Store.MediaCollection.prototype.processAttachments; | ||
|
||
Store.Chat._findAndParse = Store.BusinessProfile._findAndParse; | ||
Store.Chat._find = Store.BusinessProfile._find; | ||
|
||
return window.Store; | ||
} |