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 • 9.81 kB
JavaScript
;function a92_0x51b0(){const _0x412a85=['concat','470ahjfZJ','status','after','../../Internal','__esModule','status_info','price','3113100QRJzXr','attrs','base64','request_image_url','digest','4083810hOFnYP','parseCollectionsNode','uploadingNecessaryImagesOfProduct','uploadingNecessaryImages','5890113ENhNZZ','compliance_info','sha256','1636032qiMPtn','can_appeal','getBinaryNodeChildString','getBinaryNodeChild','toString','retailer_id','total','country_code_origin','toProductNode','.whatsapp.net','undefined','push','images','image','getBinaryNodeChildren','4168KFPrcY','compliance_category','parseProductNode','defineProperty','parseCatalogNode','9541lYdSZz','product','crypto','978594CNPIzt','original_image_url','retailerId','from','parseOrderDetailsNode','307fSDNNm','order','currency','COUNTRY_ORIGIN_EXEMPT','product_catalog','getUrlFromDirectPath','description','includes','name','url','paging','map','quantity','all','getStream','media','12eVzZRH','length','originCountryCode','isHidden'];a92_0x51b0=function(){return _0x412a85;};return a92_0x51b0();}const a92_0x474afa=a92_0x2ac0;(function(_0x26af85,_0x2354a1){const _0x1af296=a92_0x2ac0,_0x5d2c95=_0x26af85();while(!![]){try{const _0x23f9bf=parseInt(_0x1af296(0x134))/0x1*(parseInt(_0x1af296(0x149))/0x2)+-parseInt(_0x1af296(0x12f))/0x3*(-parseInt(_0x1af296(0x144))/0x4)+parseInt(_0x1af296(0x155))/0x5+-parseInt(_0x1af296(0x15c))/0x6+parseInt(_0x1af296(0x12c))/0x7*(-parseInt(_0x1af296(0x127))/0x8)+-parseInt(_0x1af296(0x159))/0x9+parseInt(_0x1af296(0x150))/0xa;if(_0x23f9bf===_0x2354a1)break;else _0x5d2c95['push'](_0x5d2c95['shift']());}catch(_0x44b6ff){_0x5d2c95['push'](_0x5d2c95['shift']());}}}(a92_0x51b0,0x84377));Object[a92_0x474afa(0x12a)](exports,a92_0x474afa(0x14d),{'value':!![]}),exports[a92_0x474afa(0x158)]=exports[a92_0x474afa(0x157)]=exports[a92_0x474afa(0x129)]=exports[a92_0x474afa(0x164)]=exports[a92_0x474afa(0x133)]=exports['parseCollectionsNode']=exports['parseCatalogNode']=void 0x0;const crypto_1=require(a92_0x474afa(0x12e)),Internal_1=require(a92_0x474afa(0x14c)),mms_1=require('./mms'),parseCatalogNode=_0x579598=>{const _0x55ece3=a92_0x474afa,_0x40a372=(0x0,Internal_1['getBinaryNodeChild'])(_0x579598,_0x55ece3(0x138)),_0x468a98=(0x0,Internal_1['getBinaryNodeChildren'])(_0x40a372,_0x55ece3(0x12d))[_0x55ece3(0x13f)](exports[_0x55ece3(0x129)]),_0x5c2190=(0x0,Internal_1[_0x55ece3(0x15f)])(_0x40a372,_0x55ece3(0x13e));return{'products':_0x468a98,'nextPageCursor':_0x5c2190?(0x0,Internal_1[_0x55ece3(0x15e)])(_0x5c2190,_0x55ece3(0x14b)):undefined};};exports[a92_0x474afa(0x12b)]=parseCatalogNode;function a92_0x2ac0(_0x5c182f,_0xecf6a9){const _0x51b024=a92_0x51b0();return a92_0x2ac0=function(_0x2ac0b2,_0x1f1861){_0x2ac0b2=_0x2ac0b2-0x122;let _0x11daa9=_0x51b024[_0x2ac0b2];return _0x11daa9;},a92_0x2ac0(_0x5c182f,_0xecf6a9);}const parseCollectionsNode=_0x4d2e4b=>{const _0x47b009=a92_0x474afa,_0x24218c=(0x0,Internal_1[_0x47b009(0x15f)])(_0x4d2e4b,'collections'),_0x6f58df=(0x0,Internal_1[_0x47b009(0x126)])(_0x24218c,'collection')[_0x47b009(0x13f)](_0x23e4a0=>{const _0x4c119=_0x47b009,_0x7ec06b=(0x0,Internal_1['getBinaryNodeChildString'])(_0x23e4a0,'id'),_0x155bc2=(0x0,Internal_1[_0x4c119(0x15e)])(_0x23e4a0,_0x4c119(0x13c)),_0x3790b9=(0x0,Internal_1[_0x4c119(0x126)])(_0x23e4a0,_0x4c119(0x12d))[_0x4c119(0x13f)](exports[_0x4c119(0x129)]);return{'id':_0x7ec06b,'name':_0x155bc2,'products':_0x3790b9,'status':parseStatusInfo(_0x23e4a0)};});return{'collections':_0x6f58df};};exports[a92_0x474afa(0x156)]=parseCollectionsNode;const parseOrderDetailsNode=_0x33d7b6=>{const _0x54c90a=a92_0x474afa,_0x1a77da=(0x0,Internal_1[_0x54c90a(0x15f)])(_0x33d7b6,_0x54c90a(0x135)),_0x2d0857=(0x0,Internal_1[_0x54c90a(0x126)])(_0x1a77da,'product')['map'](_0x27a237=>{const _0x18412d=_0x54c90a,_0x5babbc=(0x0,Internal_1[_0x18412d(0x15f)])(_0x27a237,_0x18412d(0x125));return{'id':(0x0,Internal_1[_0x18412d(0x15e)])(_0x27a237,'id'),'name':(0x0,Internal_1['getBinaryNodeChildString'])(_0x27a237,_0x18412d(0x13c)),'imageUrl':(0x0,Internal_1[_0x18412d(0x15e)])(_0x5babbc,_0x18412d(0x13d)),'price':+(0x0,Internal_1['getBinaryNodeChildString'])(_0x27a237,_0x18412d(0x14f)),'currency':(0x0,Internal_1['getBinaryNodeChildString'])(_0x27a237,_0x18412d(0x136)),'quantity':+(0x0,Internal_1[_0x18412d(0x15e)])(_0x27a237,_0x18412d(0x140))};}),_0x52249c=(0x0,Internal_1[_0x54c90a(0x15f)])(_0x1a77da,_0x54c90a(0x14f)),_0x2c5760={'price':{'total':+(0x0,Internal_1[_0x54c90a(0x15e)])(_0x52249c,_0x54c90a(0x162)),'currency':(0x0,Internal_1[_0x54c90a(0x15e)])(_0x52249c,_0x54c90a(0x136))},'products':_0x2d0857};return _0x2c5760;};exports['parseOrderDetailsNode']=parseOrderDetailsNode;const toProductNode=(_0x4614ad,_0x12523f)=>{const _0x49cf9a=a92_0x474afa,_0x299eb1={},_0x455e61=[];typeof _0x4614ad!==_0x49cf9a(0x122)&&_0x455e61[_0x49cf9a(0x123)]({'tag':'id','attrs':{},'content':Buffer[_0x49cf9a(0x132)](_0x4614ad)});typeof _0x12523f['name']!==_0x49cf9a(0x122)&&_0x455e61[_0x49cf9a(0x123)]({'tag':_0x49cf9a(0x13c),'attrs':{},'content':Buffer['from'](_0x12523f[_0x49cf9a(0x13c)])});typeof _0x12523f['description']!==_0x49cf9a(0x122)&&_0x455e61[_0x49cf9a(0x123)]({'tag':'description','attrs':{},'content':Buffer[_0x49cf9a(0x132)](_0x12523f[_0x49cf9a(0x13a)])});typeof _0x12523f['retailerId']!==_0x49cf9a(0x122)&&_0x455e61[_0x49cf9a(0x123)]({'tag':_0x49cf9a(0x161),'attrs':{},'content':Buffer[_0x49cf9a(0x132)](_0x12523f[_0x49cf9a(0x131)])});_0x12523f[_0x49cf9a(0x124)][_0x49cf9a(0x145)]&&_0x455e61[_0x49cf9a(0x123)]({'tag':_0x49cf9a(0x143),'attrs':{},'content':_0x12523f[_0x49cf9a(0x124)][_0x49cf9a(0x13f)](_0x153809=>{const _0x56757f=_0x49cf9a;if(!(_0x56757f(0x13d)in _0x153809))throw null;return{'tag':_0x56757f(0x125),'attrs':{},'content':[{'tag':_0x56757f(0x13d),'attrs':{},'content':Buffer['from'](_0x153809[_0x56757f(0x13d)][_0x56757f(0x160)]())}]};})});typeof _0x12523f[_0x49cf9a(0x14f)]!==_0x49cf9a(0x122)&&_0x455e61[_0x49cf9a(0x123)]({'tag':_0x49cf9a(0x14f),'attrs':{},'content':Buffer[_0x49cf9a(0x132)](_0x12523f['price']['toString']())});typeof _0x12523f['currency']!==_0x49cf9a(0x122)&&_0x455e61[_0x49cf9a(0x123)]({'tag':'currency','attrs':{},'content':Buffer[_0x49cf9a(0x132)](_0x12523f['currency'])});_0x49cf9a(0x146)in _0x12523f&&(typeof _0x12523f[_0x49cf9a(0x146)]===_0x49cf9a(0x122)?_0x299eb1[_0x49cf9a(0x128)]=_0x49cf9a(0x137):_0x455e61[_0x49cf9a(0x123)]({'tag':_0x49cf9a(0x15a),'attrs':{},'content':[{'tag':_0x49cf9a(0x163),'attrs':{},'content':Buffer[_0x49cf9a(0x132)](_0x12523f['originCountryCode'])}]}));typeof _0x12523f['isHidden']!==_0x49cf9a(0x122)&&(_0x299eb1['is_hidden']=_0x12523f[_0x49cf9a(0x147)][_0x49cf9a(0x160)]());const _0x40593d={'tag':_0x49cf9a(0x12d),'attrs':_0x299eb1,'content':_0x455e61};return _0x40593d;};exports[a92_0x474afa(0x164)]=toProductNode;const parseProductNode=_0x1880cc=>{const _0x592143=a92_0x474afa,_0x57219b=_0x1880cc[_0x592143(0x151)]['is_hidden']==='true',_0x1fd01a=(0x0,Internal_1['getBinaryNodeChildString'])(_0x1880cc,'id'),_0x4bef86=(0x0,Internal_1[_0x592143(0x15f)])(_0x1880cc,_0x592143(0x143)),_0x1cc740=(0x0,Internal_1['getBinaryNodeChild'])(_0x1880cc,_0x592143(0x14e)),_0x406ac7={'id':_0x1fd01a,'imageUrls':parseImageUrls(_0x4bef86),'reviewStatus':{'whatsapp':(0x0,Internal_1[_0x592143(0x15e)])(_0x1cc740,_0x592143(0x14a))},'availability':'in\x20stock','name':(0x0,Internal_1[_0x592143(0x15e)])(_0x1880cc,_0x592143(0x13c)),'retailerId':(0x0,Internal_1['getBinaryNodeChildString'])(_0x1880cc,_0x592143(0x161)),'url':(0x0,Internal_1[_0x592143(0x15e)])(_0x1880cc,_0x592143(0x13d)),'description':(0x0,Internal_1[_0x592143(0x15e)])(_0x1880cc,_0x592143(0x13a)),'price':+(0x0,Internal_1[_0x592143(0x15e)])(_0x1880cc,'price'),'currency':(0x0,Internal_1[_0x592143(0x15e)])(_0x1880cc,'currency'),'isHidden':_0x57219b};return _0x406ac7;};exports[a92_0x474afa(0x129)]=parseProductNode;async function uploadingNecessaryImagesOfProduct(_0x5c79d0,_0x29651b,_0x55250c=0x7530){const _0x563cc8=a92_0x474afa;return _0x5c79d0={..._0x5c79d0,'images':_0x5c79d0['images']?await(0x0,exports['uploadingNecessaryImages'])(_0x5c79d0[_0x563cc8(0x124)],_0x29651b,_0x55250c):_0x5c79d0[_0x563cc8(0x124)]},_0x5c79d0;}exports[a92_0x474afa(0x157)]=uploadingNecessaryImagesOfProduct;const uploadingNecessaryImages=async(_0x498f48,_0x123526,_0x368253=0x7530)=>{const _0x1aee9d=a92_0x474afa,_0xc97fa9=await Promise[_0x1aee9d(0x141)](_0x498f48[_0x1aee9d(0x13f)](async _0x37d293=>{const _0x407bcb=_0x1aee9d;if(_0x407bcb(0x13d)in _0x37d293){const _0x2d8656=_0x37d293[_0x407bcb(0x13d)][_0x407bcb(0x160)]();if(_0x2d8656[_0x407bcb(0x13b)](_0x407bcb(0x165)))return{'url':_0x2d8656};}const {stream:_0x29080b}=await(0x0,mms_1[_0x407bcb(0x142)])(_0x37d293),_0x395248=(0x0,crypto_1['createHash'])(_0x407bcb(0x15b)),_0x2dda1a=[];for await(const _0x18eac3 of _0x29080b){_0x395248['update'](_0x18eac3),_0x2dda1a[_0x407bcb(0x123)](_0x18eac3);}const _0x2da530=_0x395248[_0x407bcb(0x154)](_0x407bcb(0x152)),{directPath:_0x230bc2}=await _0x123526((0x0,mms_1['toReadable'])(Buffer[_0x407bcb(0x148)](_0x2dda1a)),{'mediaType':'product-catalog-image','fileEncSha256B64':_0x2da530,'timeoutMs':_0x368253});return{'url':(0x0,mms_1[_0x407bcb(0x139)])(_0x230bc2)};}));return _0xc97fa9;};exports[a92_0x474afa(0x158)]=uploadingNecessaryImages;const parseImageUrls=_0x565e74=>{const _0x5eb17a=a92_0x474afa,_0x3c1d26=(0x0,Internal_1[_0x5eb17a(0x15f)])(_0x565e74,'image');return{'requested':(0x0,Internal_1['getBinaryNodeChildString'])(_0x3c1d26,_0x5eb17a(0x153)),'original':(0x0,Internal_1[_0x5eb17a(0x15e)])(_0x3c1d26,_0x5eb17a(0x130))};},parseStatusInfo=_0x532c88=>{const _0x2a56c7=a92_0x474afa,_0x53c2f2=(0x0,Internal_1[_0x2a56c7(0x15f)])(_0x532c88,_0x2a56c7(0x14e));return{'status':(0x0,Internal_1[_0x2a56c7(0x15e)])(_0x53c2f2,_0x2a56c7(0x14a)),'canAppeal':(0x0,Internal_1[_0x2a56c7(0x15e)])(_0x53c2f2,_0x2a56c7(0x15d))==='true'};};