Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / services / routing / server / index.js
index 964007d..1316e00 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x91fb=['busy','emit','QueueReport','update','catch','message\x20is\x20empty','busyQueue','end','hasOwnProperty','capacity','CurrentCapacity','values','chatQueues','loggedIn','paused','waiting','mailQueues','available','name','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','faxQueuesWaitingInteractions','server','http','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','bluebird','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','%s.%s.%s','isNil','IntervalId','Intervals','map','interval','listen','rules','channel','message','interaction','applications','isArray','length','existsSync','join','app','.js','autoreply','appdata','mail','slice','push','dialogflow','split','dialogflowv2','tag','TagId','%s:%s:%s','./interval','condition','./applications/','consequence','Push\x20new\x20rule','on\x20interval','intervals','\x20|\x20','Please\x20create\x20a\x20new\x20file\x20under','execute','info','Applications\x20executed','stringify','matchPath','No\x20applications\x20to\x20execute','error','stack','agent','agents'];(function(_0x3346e6,_0x2677c3){var _0x451d8b=function(_0x1960e7){while(--_0x1960e7){_0x3346e6['push'](_0x3346e6['shift']());}};_0x451d8b(++_0x2677c3);}(_0x91fb,0x136));var _0xb91f=function(_0x6dfbaa,_0x31eede){_0x6dfbaa=_0x6dfbaa-0x0;var _0xfbe02=_0x91fb[_0x6dfbaa];return _0xfbe02;};'use strict';var _=require(_0xb91f('0x0'));var util=require(_0xb91f('0x1'));var path=require(_0xb91f('0x2'));var fs=require('fs');var jayson=require('jayson/promise');var BPromise=require(_0xb91f('0x3'));var uuid=require('uuid');var config=require('../../../config/environment');var logger=require(_0xb91f('0x4'))(_0xb91f('0x5'));var rpc={'openchannelQueueReport':require(_0xb91f('0x6')),'mailQueueReport':require(_0xb91f('0x7')),'chatQueueReport':require(_0xb91f('0x8')),'smsQueueReport':require(_0xb91f('0x9')),'faxQueueReport':require(_0xb91f('0xa')),'whatsappQueueReport':require(_0xb91f('0xb'))};var RuleEngine=require(_0xb91f('0xc'));function getId(_0x3f4b2d,_0x18e280,_0x3652c8){return util[_0xb91f('0xd')](_0xb91f('0xe'),_0x3f4b2d,_0x18e280||0x0,_0x3652c8||0x0);}function getIntervals(_0x1a1dea,_0x1380f5){var _0x247d75=[];if(!_[_0xb91f('0xf')](_0x1380f5['IntervalId'])&&!_['isNil'](_0x1a1dea[_0x1380f5[_0xb91f('0x10')]])&&!_['isNil'](_0x1a1dea[_0x1380f5['IntervalId']][_0xb91f('0x11')])){_0x247d75=_[_0xb91f('0x12')](_0x1a1dea[_0x1380f5[_0xb91f('0x10')]][_0xb91f('0x11')],'interval');}else if(!_['isNil'](_0x1380f5[_0xb91f('0x13')])){_0x247d75=[_0x1380f5['interval']];}return _0x247d75;}exports[_0xb91f('0x14')]=function(_0x56a8d7){_0x56a8d7[_0xb91f('0x15')]={};return new BPromise(function(_0x230553,_0x36afbf){var _0x484d69={'Start':function(_0x3f8e78){var _0x50456c=this;return new Promise(function(_0x57477f,_0x5e0e4e){if(_0x3f8e78){try{var _0x213ecb=[];var _0x2c781f=getId(_0x3f8e78[_0xb91f('0x16')],_0x3f8e78[_0xb91f('0x17')]?_0x3f8e78['message']['id']:0x0,_0x3f8e78[_0xb91f('0x18')]?_0x3f8e78['interaction']['id']:0x0);if(_0x3f8e78[_0xb91f('0x19')]&&_[_0xb91f('0x1a')](_0x3f8e78[_0xb91f('0x19')])&&_0x3f8e78[_0xb91f('0x19')][_0xb91f('0x1b')]){for(var _0xaa9c92=0x0;_0xaa9c92<_0x3f8e78['applications']['length'];_0xaa9c92+=0x1){var _0x245d33=_0x3f8e78['applications'][_0xaa9c92];if(fs[_0xb91f('0x1c')](path[_0xb91f('0x1d')](__dirname,_0xb91f('0x19'),_0x245d33[_0xb91f('0x1e')]+_0xb91f('0x1f')))){var _0x1b6826=[];switch(_0x245d33[_0xb91f('0x1e')]['toLowerCase']()){case _0xb91f('0x20'):var _0x51e529=_0x245d33[_0xb91f('0x21')]['split'](',');if(_0x3f8e78[_0xb91f('0x16')]===_0xb91f('0x22')){_0x1b6826['push'](_0x51e529[0x0]);_0x1b6826['push'](_0x51e529[0x1]);_0x1b6826['push'](_0x51e529[_0xb91f('0x23')](0x2,_0x51e529[_0xb91f('0x1b')])[_0xb91f('0x1d')](','));}else{_0x1b6826['push'](_0x51e529[0x0]);_0x1b6826[_0xb91f('0x24')](_0x51e529[_0xb91f('0x23')](0x1,_0x51e529[_0xb91f('0x1b')])['join'](','));}break;case _0xb91f('0x25'):var _0x2794b2=_0x245d33[_0xb91f('0x21')][_0xb91f('0x26')](',');_0x1b6826['push'](_0x2794b2[0x0]);_0x1b6826[_0xb91f('0x24')](_0x2794b2[0x1]);_0x1b6826[_0xb91f('0x24')](_0x2794b2[_0xb91f('0x23')](0x2,_0x2794b2[_0xb91f('0x1b')])[_0xb91f('0x1d')](','));break;case _0xb91f('0x27'):var _0xfbc7d5=_0x245d33['appdata'][_0xb91f('0x26')](',');_0x1b6826[_0xb91f('0x24')](_0xfbc7d5[0x0]);_0x1b6826[_0xb91f('0x24')](_0xfbc7d5[0x1]);_0x1b6826['push'](_0xfbc7d5[0x2]);_0x1b6826[_0xb91f('0x24')](_0xfbc7d5[0x3]);_0x1b6826[_0xb91f('0x24')](_0xfbc7d5[_0xb91f('0x23')](0x4,_0xfbc7d5[_0xb91f('0x1b')])[_0xb91f('0x1d')](','));break;case'amazonlex':var _0x490637=_0x245d33[_0xb91f('0x21')][_0xb91f('0x26')](',');_0x1b6826[_0xb91f('0x24')](_0x490637[0x0]);_0x1b6826[_0xb91f('0x24')](_0x490637[0x1]);_0x1b6826[_0xb91f('0x24')](_0x490637[0x2]);_0x1b6826['push'](_0x490637[0x3]);_0x1b6826[_0xb91f('0x24')](_0x490637[_0xb91f('0x23')](0x4,_0x490637[_0xb91f('0x1b')])[_0xb91f('0x1d')](','));break;case _0xb91f('0x17'):_0x1b6826[_0xb91f('0x24')](_0x245d33['appdata']);break;case _0xb91f('0x28'):_0x1b6826[_0xb91f('0x24')](_0x245d33[_0xb91f('0x29')]);_0x1b6826[_0xb91f('0x24')](_0x245d33[_0xb91f('0x21')]);break;default:_0x1b6826=_['isNil'](_0x245d33[_0xb91f('0x21')])?[]:_0x245d33[_0xb91f('0x21')][_0xb91f('0x26')](',');}var _0x33d90f={'id':util[_0xb91f('0xd')](_0xb91f('0x2a'),_0x2c781f,_0x245d33['id'],_0x245d33[_0xb91f('0x1e')]),'condition':require(_0xb91f('0x2b'))[_0xb91f('0x2c')](_0x2c781f,getIntervals(_0x56a8d7['intervals'],_0x245d33),_0x56a8d7),'consequence':require(_0xb91f('0x2d')+_0x245d33[_0xb91f('0x1e')])[_0xb91f('0x2e')](_0x2c781f,_0x1b6826,_0x56a8d7,_0x3f8e78),'p':_0x245d33['priority']||0x0};logger['info'](_0xb91f('0x2f'),_0x33d90f['id'],_0xb91f('0x30'),getIntervals(_0x56a8d7[_0xb91f('0x31')],_0x245d33)[_0xb91f('0x1d')](_0xb91f('0x32')));_0x213ecb['push'](_0x33d90f);}else{logger['error'](_0xb91f('0x33'),path[_0xb91f('0x1d')](__dirname,_0xb91f('0x19'),_0x245d33[_0xb91f('0x1e')]+_0xb91f('0x1f')));}}_0x56a8d7[_0xb91f('0x15')][_0x2c781f]=new RuleEngine(_0x213ecb);_0x56a8d7[_0xb91f('0x15')][_0x2c781f][_0xb91f('0x34')](_0x3f8e78,function(_0x45e5d9){logger[_0xb91f('0x35')](_0xb91f('0x36'),JSON[_0xb91f('0x37')](_0x45e5d9[_0xb91f('0x38')]));if(_0x56a8d7[_0xb91f('0x15')][_0x2c781f]){_0x56a8d7[_0xb91f('0x15')][_0x2c781f]['emit']('complete');}});return _0x57477f({'code':0xc8,'message':_0x3f8e78});}else{logger[_0xb91f('0x35')](_0xb91f('0x39'));return _0x57477f({'code':0xc8,'message':_0x3f8e78});}}catch(_0x4612df){logger[_0xb91f('0x3a')](_0x4612df[_0xb91f('0x3b')]);return _0x5e0e4e(_0x50456c[_0xb91f('0x3a')](0x1f4,_0x4612df));}}return _0x5e0e4e('routing\x20is\x20empty');});},'AcceptMessage':function(_0x5d5bf4){var _0x213825=this;return new Promise(function(_0xa93303,_0x2f117c){if(_0x5d5bf4[_0xb91f('0x3c')]&&_0x5d5bf4[_0xb91f('0x3c')]['id']){if(_0x56a8d7[_0xb91f('0x3d')][_0x5d5bf4[_0xb91f('0x3c')]['id']]){_0x56a8d7[_0xb91f('0x3d')][_0x5d5bf4[_0xb91f('0x3c')]['id']][_0xb91f('0x3e')]=![];_0x56a8d7[_0xb91f('0x3d')][_0x5d5bf4[_0xb91f('0x3c')]['id']]['busyQueue']=undefined;}}if(_0x5d5bf4[_0xb91f('0x17')]&&_0x5d5bf4['message']['id']){try{var _0x115f82=getId(_0x5d5bf4['channel'],_0x5d5bf4[_0xb91f('0x17')]?_0x5d5bf4[_0xb91f('0x17')]['id']:0x0,_0x5d5bf4[_0xb91f('0x18')]?_0x5d5bf4[_0xb91f('0x18')]['id']:0x0);if(_0x56a8d7[_0xb91f('0x15')][_0x115f82]){_0x56a8d7['rules'][_0x115f82][_0xb91f('0x3f')]('end');if(rpc[_0x5d5bf4['channel']+_0xb91f('0x40')]){rpc[_0x5d5bf4[_0xb91f('0x16')]+_0xb91f('0x40')][_0xb91f('0x41')](_0x115f82,{'UserId':_0x5d5bf4['message']['UserId']})[_0xb91f('0x42')](function(_0xbeb475){logger[_0xb91f('0x3a')]('error\x20update\x20queue\x20report');});}}return _0xa93303({'code':0xc8,'message':_0x5d5bf4});}catch(_0x283147){logger[_0xb91f('0x3a')](_0x283147[_0xb91f('0x3b')]);return _0x2f117c(_0x213825[_0xb91f('0x3a')](0x1f4,_0x283147));}}logger[_0xb91f('0x3a')](_0xb91f('0x43'));return _0x2f117c(_0x213825['error'](0x1f4,_0xb91f('0x43')));});},'RejectMessage':function(_0x13aafa){var _0x4f5661=this;return new Promise(function(_0xa4a7dc,_0x47517a){if(_0x13aafa[_0xb91f('0x3c')]&&_0x13aafa[_0xb91f('0x3c')]['id']){try{if(_0x56a8d7[_0xb91f('0x3d')][_0x13aafa['agent']['id']]){_0x56a8d7[_0xb91f('0x3d')][_0x13aafa[_0xb91f('0x3c')]['id']][_0xb91f('0x3e')]=![];_0x56a8d7['agents'][_0x13aafa[_0xb91f('0x3c')]['id']][_0xb91f('0x44')]=undefined;}return _0xa4a7dc({'code':0xc8,'message':_0x13aafa});}catch(_0x3521ee){logger['error'](_0x3521ee[_0xb91f('0x3b')]);return _0x47517a(_0x4f5661[_0xb91f('0x3a')](0x1f4,_0x3521ee));}}logger[_0xb91f('0x3a')](_0xb91f('0x43'));return _0x47517a(_0x4f5661[_0xb91f('0x3a')](0x1f4,_0xb91f('0x43')));});},'AbandonInteraction':function(_0xa14a6c){var _0x4c2b45=this;return new Promise(function(_0x2c55f7,_0x3ab52f){if(_0xa14a6c[_0xb91f('0x16')]&&_0xa14a6c[_0xb91f('0x18')]&&_0xa14a6c[_0xb91f('0x18')]['id']){try{var _0x5541a=getId(_0xa14a6c[_0xb91f('0x16')],_0xa14a6c['message']?_0xa14a6c[_0xb91f('0x17')]['id']:0x0,_0xa14a6c[_0xb91f('0x18')]?_0xa14a6c[_0xb91f('0x18')]['id']:0x0);if(_0x56a8d7['rules'][_0x5541a]){_0x56a8d7[_0xb91f('0x15')][_0x5541a][_0xb91f('0x3f')](_0xb91f('0x45'));}return _0x2c55f7({'code':0xc8,'message':_0xa14a6c});}catch(_0xf832fc){logger[_0xb91f('0x3a')](_0xf832fc[_0xb91f('0x3b')]);return _0x3ab52f(_0x4c2b45['error'](0x1f4,_0xf832fc));}}logger[_0xb91f('0x3a')](_0xb91f('0x43'));return _0x3ab52f(_0x4c2b45[_0xb91f('0x3a')](0x1f4,_0xb91f('0x43')));});},'AgentCapacity':function(_0x5ef631){var _0x1d5c2a=this;return new Promise(function(_0x18be8c,_0x441cc1){if(_0x56a8d7[_0xb91f('0x3d')][_0xb91f('0x46')](_0x5ef631['id'])){for(var _0x4b153f in _0x5ef631['capacity']){if(_0x5ef631[_0xb91f('0x47')][_0xb91f('0x46')](_0x4b153f)){if(_0x56a8d7[_0xb91f('0x3d')][_0x5ef631['id']][_0xb91f('0x46')](_0x4b153f+_0xb91f('0x48'))){_0x56a8d7['agents'][_0x5ef631['id']][_0x4b153f+_0xb91f('0x48')]=parseInt(_0x5ef631['capacity'][_0x4b153f],0xa);}}}_0x56a8d7[_0xb91f('0x3d')][_0x5ef631['id']]['updateRealtime']();return _0x18be8c({'code':0xc8,'message':_0x56a8d7[_0xb91f('0x3d')][_0x5ef631['id']]});}else{return _0x441cc1(_0x1d5c2a[_0xb91f('0x3a')](0x1f4,'agent\x20not\x20found'));}});},'Agents':function(_0xe4cdb0){return new Promise(function(_0xdce50e,_0x8c5b12){var _0x3833af=_[_0xb91f('0x49')](_0x56a8d7['agents']);_0xdce50e({'count':_0x3833af[_0xb91f('0x1b')],'rows':_0x3833af});});},'ChatQueues':function(_0x5d095f){return new Promise(function(_0x11a3ed,_0x441573){var _0x341434=[];for(var _0x54444e in _0x56a8d7[_0xb91f('0x4a')]){if(_0x56a8d7[_0xb91f('0x4a')][_0xb91f('0x46')](_0x54444e)){var _0x7daab6=_0x56a8d7[_0xb91f('0x4a')][_0x54444e];var _0x50c774={'id':_0x7daab6['id'],'available':_0x7daab6['available'],'loggedIn':_0x7daab6[_0xb91f('0x4b')],'name':_0x7daab6['name'],'paused':_0x7daab6[_0xb91f('0x4c')],'waiting':_0x7daab6[_0xb91f('0x4d')]};_0x341434[_0xb91f('0x24')](_0x50c774);}}_0x11a3ed({'count':_0x341434['length'],'rows':_0x341434});});},'MailQueues':function(_0xa7ab25){return new Promise(function(_0x4ceab1,_0x9e11f3){var _0x416343=[];for(var _0x1c19e9 in _0x56a8d7[_0xb91f('0x4e')]){if(_0x56a8d7[_0xb91f('0x4e')][_0xb91f('0x46')](_0x1c19e9)){var _0x13c34e=_0x56a8d7[_0xb91f('0x4e')][_0x1c19e9];var _0x125521={'id':_0x13c34e['id'],'available':_0x13c34e[_0xb91f('0x4f')],'loggedIn':_0x13c34e['loggedIn'],'name':_0x13c34e[_0xb91f('0x50')],'paused':_0x13c34e['paused'],'waiting':_0x13c34e[_0xb91f('0x4d')]};_0x416343[_0xb91f('0x24')](_0x125521);}}_0x4ceab1({'count':_0x416343[_0xb91f('0x1b')],'rows':_0x416343});});},'OpenchannelQueues':function(_0x1ecd0c){return new Promise(function(_0x15eb03,_0x307ee7){var _0x34968f=[];for(var _0x16af73 in _0x56a8d7['openchannelQueues']){if(_0x56a8d7[_0xb91f('0x51')][_0xb91f('0x46')](_0x16af73)){var _0x2e714=_0x56a8d7[_0xb91f('0x51')][_0x16af73];var _0x2940a0={'id':_0x2e714['id'],'available':_0x2e714[_0xb91f('0x4f')],'loggedIn':_0x2e714['loggedIn'],'name':_0x2e714[_0xb91f('0x50')],'paused':_0x2e714[_0xb91f('0x4c')],'waiting':_0x2e714[_0xb91f('0x4d')]};_0x34968f[_0xb91f('0x24')](_0x2940a0);}}_0x15eb03({'count':_0x34968f[_0xb91f('0x1b')],'rows':_0x34968f});});},'SmsQueues':function(_0x248024){return new Promise(function(_0x45f711,_0x26674e){var _0x3b989e=[];for(var _0x1913d9 in _0x56a8d7['smsQueues']){if(_0x56a8d7[_0xb91f('0x52')][_0xb91f('0x46')](_0x1913d9)){var _0xe03dce=_0x56a8d7[_0xb91f('0x52')][_0x1913d9];var _0x137049={'id':_0xe03dce['id'],'available':_0xe03dce[_0xb91f('0x4f')],'loggedIn':_0xe03dce[_0xb91f('0x4b')],'name':_0xe03dce[_0xb91f('0x50')],'paused':_0xe03dce[_0xb91f('0x4c')],'waiting':_0xe03dce[_0xb91f('0x4d')]};_0x3b989e[_0xb91f('0x24')](_0x137049);}}_0x45f711({'count':_0x3b989e[_0xb91f('0x1b')],'rows':_0x3b989e});});},'FaxQueues':function(_0x2a85b8){return new Promise(function(_0x328647,_0x45a368){var _0x13bf54=[];for(var _0x2c5af7 in _0x56a8d7[_0xb91f('0x53')]){if(_0x56a8d7[_0xb91f('0x53')][_0xb91f('0x46')](_0x2c5af7)){var _0x32ba98=_0x56a8d7['faxQueues'][_0x2c5af7];var _0x37581a={'id':_0x32ba98['id'],'available':_0x32ba98[_0xb91f('0x4f')],'loggedIn':_0x32ba98[_0xb91f('0x4b')],'name':_0x32ba98[_0xb91f('0x50')],'paused':_0x32ba98[_0xb91f('0x4c')],'waiting':_0x32ba98[_0xb91f('0x4d')]};_0x13bf54[_0xb91f('0x24')](_0x37581a);}}_0x328647({'count':_0x13bf54[_0xb91f('0x1b')],'rows':_0x13bf54});});},'WhatsappQueues':function(_0xde197f){return new Promise(function(_0x1e0013,_0x110e0f){var _0x4c59fd=[];for(var _0x2fb6b1 in _0x56a8d7['whatsappQueues']){if(_0x56a8d7[_0xb91f('0x54')]['hasOwnProperty'](_0x2fb6b1)){var _0x1b89f6=_0x56a8d7[_0xb91f('0x54')][_0x2fb6b1];var _0x44bea5={'id':_0x1b89f6['id'],'available':_0x1b89f6[_0xb91f('0x4f')],'loggedIn':_0x1b89f6[_0xb91f('0x4b')],'name':_0x1b89f6['name'],'paused':_0x1b89f6[_0xb91f('0x4c')],'waiting':_0x1b89f6[_0xb91f('0x4d')]};_0x4c59fd[_0xb91f('0x24')](_0x44bea5);}}_0x1e0013({'count':_0x4c59fd[_0xb91f('0x1b')],'rows':_0x4c59fd});});},'ChatQueuesWaitingInteractions':function(_0x1e5769){return new Promise(function(_0x56616c,_0x19a134){var _0x3cc447=_[_0xb91f('0x49')](_0x56a8d7[_0xb91f('0x55')]);_0x56616c({'count':_0x3cc447[_0xb91f('0x1b')],'rows':_0x3cc447});});},'MailQueuesWaitingInteractions':function(_0xf46c47){return new Promise(function(_0x257260,_0x1c56f4){var _0x2760f9=_[_0xb91f('0x49')](_0x56a8d7['mailQueuesWaitingInteractions']);_0x257260({'count':_0x2760f9['length'],'rows':_0x2760f9});});},'OpenchannelQueuesWaitingInteractions':function(_0x6637f3){return new Promise(function(_0xda20d7,_0x2a8739){var _0x264dfe=_[_0xb91f('0x49')](_0x56a8d7[_0xb91f('0x56')]);_0xda20d7({'count':_0x264dfe['length'],'rows':_0x264dfe});});},'SmsQueuesWaitingInteractions':function(_0xbf5bb){return new Promise(function(_0x448135,_0x2e9ca2){var _0x93bf68=_[_0xb91f('0x49')](_0x56a8d7['smsQueuesWaitingInteractions']);_0x448135({'count':_0x93bf68[_0xb91f('0x1b')],'rows':_0x93bf68});});},'FaxQueuesWaitingInteractions':function(_0x25f7a3){return new Promise(function(_0x570ef5,_0x561729){var _0x4dac7f=_[_0xb91f('0x49')](_0x56a8d7[_0xb91f('0x57')]);_0x570ef5({'count':_0x4dac7f['length'],'rows':_0x4dac7f});});},'WhatsappQueuesWaitingInteractions':function(_0x36ae7d){return new Promise(function(_0x1a8e84,_0x4f452c){var _0x35971b=_[_0xb91f('0x49')](_0x56a8d7['whatsappQueuesWaitingInteractions']);_0x1a8e84({'count':_0x35971b[_0xb91f('0x1b')],'rows':_0x35971b});});}};var _0x591260=jayson[_0xb91f('0x58')](_0x484d69)[_0xb91f('0x59')]();_0x591260['on']('error',function(_0x3aba05){logger[_0xb91f('0x3a')](JSON[_0xb91f('0x37')](_0x3aba05));return _0x36afbf(_0x3aba05);});_0x591260['listen'](0x232c,'127.0.0.1',function(){console[_0xb91f('0x5a')](_0xb91f('0x5b'),0x232c);return _0x230553(_0xb91f('0x5c')+0x232c);});});};
\ No newline at end of file
+var _0xa446=['127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','jayson/promise','uuid','../../../config/environment','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../lib/rule-engine','format','isNil','IntervalId','Intervals','interval','listen','rules','channel','message','interaction','applications','isArray','length','existsSync','join','.js','toLowerCase','autoreply','appdata','split','mail','push','slice','dialogflow','dialogflowv2','amazonlex','tag','TagId','tvox','getMustacheRender','account','ChatWebsiteId','ContactId','body','%s:%s:%s','app','./interval','condition','./applications/','consequence','info','Push\x20new\x20rule','error','Please\x20create\x20a\x20new\x20file\x20under','execute','Applications\x20executed','stringify','emit','complete','No\x20applications\x20to\x20execute','routing\x20is\x20empty','agent','agents','busy','busyQueue','end','QueueReport','catch','message\x20is\x20empty','stack','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','values','chatQueues','available','loggedIn','name','paused','waiting','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http'];(function(_0x21ecc8,_0x2bdead){var _0x510c1d=function(_0x3b6862){while(--_0x3b6862){_0x21ecc8['push'](_0x21ecc8['shift']());}};_0x510c1d(++_0x2bdead);}(_0xa446,0xc6));var _0x6a44=function(_0x4d822c,_0x3ae665){_0x4d822c=_0x4d822c-0x0;var _0xdc2439=_0xa446[_0x4d822c];return _0xdc2439;};'use strict';var _=require(_0x6a44('0x0'));var util=require(_0x6a44('0x1'));var path=require('path');var fs=require('fs');var jayson=require(_0x6a44('0x2'));var BPromise=require('bluebird');var uuid=require(_0x6a44('0x3'));var utils=require('./applications/utils');var config=require(_0x6a44('0x4'));var logger=require('../../../config/logger')(_0x6a44('0x5'));var rpc={'openchannelQueueReport':require(_0x6a44('0x6')),'mailQueueReport':require(_0x6a44('0x7')),'chatQueueReport':require(_0x6a44('0x8')),'smsQueueReport':require(_0x6a44('0x9')),'faxQueueReport':require(_0x6a44('0xa')),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0x6a44('0xb'));function getId(_0x36a426,_0x4f72f8,_0x78c684){return util[_0x6a44('0xc')]('%s.%s.%s',_0x36a426,_0x4f72f8||0x0,_0x78c684||0x0);}function getIntervals(_0x38a9ad,_0x2657b9){var _0x419ccd=[];if(!_[_0x6a44('0xd')](_0x2657b9[_0x6a44('0xe')])&&!_[_0x6a44('0xd')](_0x38a9ad[_0x2657b9[_0x6a44('0xe')]])&&!_['isNil'](_0x38a9ad[_0x2657b9[_0x6a44('0xe')]][_0x6a44('0xf')])){_0x419ccd=_['map'](_0x38a9ad[_0x2657b9[_0x6a44('0xe')]][_0x6a44('0xf')],_0x6a44('0x10'));}else if(!_['isNil'](_0x2657b9[_0x6a44('0x10')])){_0x419ccd=[_0x2657b9[_0x6a44('0x10')]];}return _0x419ccd;}exports[_0x6a44('0x11')]=function(_0xb1d987){_0xb1d987[_0x6a44('0x12')]={};return new BPromise(function(_0x1481ed,_0x553bc1){var _0x52aa9c={'Start':function(_0x260be6){var _0x973938=this;return new Promise(function(_0x577275,_0xa665c0){if(_0x260be6){try{var _0x38f796=[];var _0x41af8f=getId(_0x260be6[_0x6a44('0x13')],_0x260be6[_0x6a44('0x14')]?_0x260be6[_0x6a44('0x14')]['id']:0x0,_0x260be6[_0x6a44('0x15')]?_0x260be6[_0x6a44('0x15')]['id']:0x0);if(_0x260be6[_0x6a44('0x16')]&&_[_0x6a44('0x17')](_0x260be6[_0x6a44('0x16')])&&_0x260be6[_0x6a44('0x16')][_0x6a44('0x18')]){for(var _0x108c4b=0x0;_0x108c4b<_0x260be6['applications']['length'];_0x108c4b+=0x1){var _0x5e3673=_0x260be6[_0x6a44('0x16')][_0x108c4b];if(fs[_0x6a44('0x19')](path[_0x6a44('0x1a')](__dirname,_0x6a44('0x16'),_0x5e3673['app']+_0x6a44('0x1b')))){var _0x24ba62=[];switch(_0x5e3673['app'][_0x6a44('0x1c')]()){case _0x6a44('0x1d'):var _0x406247=_0x5e3673[_0x6a44('0x1e')][_0x6a44('0x1f')](',');if(_0x260be6[_0x6a44('0x13')]===_0x6a44('0x20')){_0x24ba62[_0x6a44('0x21')](_0x406247[0x0]);_0x24ba62[_0x6a44('0x21')](_0x406247[0x1]);_0x24ba62['push'](_0x406247[_0x6a44('0x22')](0x2,_0x406247[_0x6a44('0x18')])[_0x6a44('0x1a')](','));}else{_0x24ba62[_0x6a44('0x21')](_0x406247[0x0]);_0x24ba62['push'](_0x406247[_0x6a44('0x22')](0x1,_0x406247['length'])[_0x6a44('0x1a')](','));}break;case _0x6a44('0x23'):var _0x23d6a1=_0x5e3673[_0x6a44('0x1e')][_0x6a44('0x1f')](',');_0x24ba62[_0x6a44('0x21')](_0x23d6a1[0x0]);_0x24ba62[_0x6a44('0x21')](_0x23d6a1[0x1]);_0x24ba62[_0x6a44('0x21')](_0x23d6a1[_0x6a44('0x22')](0x2,_0x23d6a1['length'])['join'](','));break;case _0x6a44('0x24'):var _0x5abc23=_0x5e3673[_0x6a44('0x1e')]['split'](',');_0x24ba62['push'](_0x5abc23[0x0]);_0x24ba62[_0x6a44('0x21')](_0x5abc23[0x1]);_0x24ba62[_0x6a44('0x21')](_0x5abc23[0x2]);_0x24ba62[_0x6a44('0x21')](_0x5abc23[0x3]);_0x24ba62['push'](_0x5abc23[_0x6a44('0x22')](0x4,_0x5abc23['length'])[_0x6a44('0x1a')](','));break;case _0x6a44('0x25'):var _0x4b41c6=_0x5e3673['appdata'][_0x6a44('0x1f')](',');_0x24ba62[_0x6a44('0x21')](_0x4b41c6[0x0]);_0x24ba62[_0x6a44('0x21')](_0x4b41c6[0x1]);_0x24ba62['push'](_0x4b41c6[0x2]);_0x24ba62['push'](_0x4b41c6[0x3]);_0x24ba62[_0x6a44('0x21')](_0x4b41c6[_0x6a44('0x22')](0x4,_0x4b41c6[_0x6a44('0x18')])['join'](','));break;case _0x6a44('0x14'):_0x24ba62[_0x6a44('0x21')](_0x5e3673[_0x6a44('0x1e')]);break;case _0x6a44('0x26'):_0x24ba62[_0x6a44('0x21')](_0x5e3673[_0x6a44('0x27')]);_0x24ba62[_0x6a44('0x21')](_0x5e3673[_0x6a44('0x1e')]);break;case _0x6a44('0x28'):var _0x42d95a=utils[_0x6a44('0x29')](_0x260be6[_0x6a44('0x2a')]['notificationTemplate'],_0x260be6);var _0x198977=_0x5e3673['appdata']['split'](',');_0x24ba62['push'](_0x198977[0x0]);_0x24ba62['push'](_0x198977[0x1]);_0x24ba62[_0x6a44('0x21')](_0x198977[0x2]);_0x24ba62['push'](_0x198977[0x3]);_0x24ba62[_0x6a44('0x21')](_0x198977[0x4]);_0x24ba62['push'](_0x198977[0x5]);_0x24ba62[_0x6a44('0x21')](_0x198977[0x6]);_0x24ba62[_0x6a44('0x21')](_0x198977[0x7]);_0x24ba62['push'](_0x198977[0x8]);_0x24ba62['push'](_0x198977[0x9]);_0x24ba62[_0x6a44('0x21')](_0x198977[0xa]);_0x24ba62[_0x6a44('0x21')](_0x260be6[_0x6a44('0x15')]['id']);_0x24ba62[_0x6a44('0x21')](_0x260be6['message']['id']);_0x24ba62[_0x6a44('0x21')](_0x5e3673[_0x6a44('0x2b')]);_0x24ba62[_0x6a44('0x21')](_0x260be6[_0x6a44('0x15')][_0x6a44('0x2c')]);_0x24ba62[_0x6a44('0x21')](_0x260be6['body'][_0x6a44('0x2d')]);_0x24ba62[_0x6a44('0x21')](_0x42d95a);break;default:_0x24ba62=_['isNil'](_0x5e3673[_0x6a44('0x1e')])?[]:_0x5e3673['appdata'][_0x6a44('0x1f')](',');}var _0x527df6={'id':util[_0x6a44('0xc')](_0x6a44('0x2e'),_0x41af8f,_0x5e3673['id'],_0x5e3673[_0x6a44('0x2f')]),'condition':require(_0x6a44('0x30'))[_0x6a44('0x31')](_0x41af8f,getIntervals(_0xb1d987['intervals'],_0x5e3673),_0xb1d987),'consequence':require(_0x6a44('0x32')+_0x5e3673[_0x6a44('0x2f')])[_0x6a44('0x33')](_0x41af8f,_0x24ba62,_0xb1d987,_0x260be6),'p':_0x5e3673['priority']||0x0};logger[_0x6a44('0x34')](_0x6a44('0x35'),_0x527df6['id'],'on\x20interval',getIntervals(_0xb1d987['intervals'],_0x5e3673)['join']('\x20|\x20'));_0x38f796[_0x6a44('0x21')](_0x527df6);}else{logger[_0x6a44('0x36')](_0x6a44('0x37'),path[_0x6a44('0x1a')](__dirname,_0x6a44('0x16'),_0x5e3673['app']+'.js'));}}_0xb1d987[_0x6a44('0x12')][_0x41af8f]=new RuleEngine(_0x38f796);_0xb1d987[_0x6a44('0x12')][_0x41af8f][_0x6a44('0x38')](_0x260be6,function(_0x4eb5d6){logger[_0x6a44('0x34')](_0x6a44('0x39'),JSON[_0x6a44('0x3a')](_0x4eb5d6['matchPath']));if(_0xb1d987[_0x6a44('0x12')][_0x41af8f]){_0xb1d987[_0x6a44('0x12')][_0x41af8f][_0x6a44('0x3b')](_0x6a44('0x3c'));}});return _0x577275({'code':0xc8,'message':_0x260be6});}else{logger[_0x6a44('0x34')](_0x6a44('0x3d'));return _0x577275({'code':0xc8,'message':_0x260be6});}}catch(_0x32b24d){logger[_0x6a44('0x36')](_0x32b24d['stack']);return _0xa665c0(_0x973938[_0x6a44('0x36')](0x1f4,_0x32b24d));}}return _0xa665c0(_0x6a44('0x3e'));});},'AcceptMessage':function(_0x2ccdbc){var _0x446fbf=this;return new Promise(function(_0x1362c7,_0x3fcb0b){if(_0x2ccdbc[_0x6a44('0x3f')]&&_0x2ccdbc[_0x6a44('0x3f')]['id']){if(_0xb1d987[_0x6a44('0x40')][_0x2ccdbc['agent']['id']]){_0xb1d987[_0x6a44('0x40')][_0x2ccdbc[_0x6a44('0x3f')]['id']][_0x6a44('0x41')]=![];_0xb1d987[_0x6a44('0x40')][_0x2ccdbc[_0x6a44('0x3f')]['id']][_0x6a44('0x42')]=undefined;}}if(_0x2ccdbc[_0x6a44('0x14')]&&_0x2ccdbc[_0x6a44('0x14')]['id']){try{var _0x4de88b=getId(_0x2ccdbc[_0x6a44('0x13')],_0x2ccdbc[_0x6a44('0x14')]?_0x2ccdbc[_0x6a44('0x14')]['id']:0x0,_0x2ccdbc['interaction']?_0x2ccdbc[_0x6a44('0x15')]['id']:0x0);if(_0xb1d987['rules'][_0x4de88b]){_0xb1d987['rules'][_0x4de88b][_0x6a44('0x3b')](_0x6a44('0x43'));if(rpc[_0x2ccdbc['channel']+'QueueReport']){rpc[_0x2ccdbc[_0x6a44('0x13')]+_0x6a44('0x44')]['update'](_0x4de88b,{'UserId':_0x2ccdbc[_0x6a44('0x14')]['UserId']})[_0x6a44('0x45')](function(_0x434ded){logger[_0x6a44('0x36')]('error\x20update\x20queue\x20report');});}}return _0x1362c7({'code':0xc8,'message':_0x2ccdbc});}catch(_0x52b343){logger['error'](_0x52b343['stack']);return _0x3fcb0b(_0x446fbf[_0x6a44('0x36')](0x1f4,_0x52b343));}}logger[_0x6a44('0x36')](_0x6a44('0x46'));return _0x3fcb0b(_0x446fbf[_0x6a44('0x36')](0x1f4,_0x6a44('0x46')));});},'RejectMessage':function(_0x598d7a){var _0x288224=this;return new Promise(function(_0x560ab2,_0x28855c){if(_0x598d7a[_0x6a44('0x3f')]&&_0x598d7a['agent']['id']){try{if(_0xb1d987[_0x6a44('0x40')][_0x598d7a[_0x6a44('0x3f')]['id']]){_0xb1d987['agents'][_0x598d7a[_0x6a44('0x3f')]['id']][_0x6a44('0x41')]=![];_0xb1d987[_0x6a44('0x40')][_0x598d7a[_0x6a44('0x3f')]['id']][_0x6a44('0x42')]=undefined;}return _0x560ab2({'code':0xc8,'message':_0x598d7a});}catch(_0x40fd42){logger[_0x6a44('0x36')](_0x40fd42[_0x6a44('0x47')]);return _0x28855c(_0x288224[_0x6a44('0x36')](0x1f4,_0x40fd42));}}logger[_0x6a44('0x36')]('message\x20is\x20empty');return _0x28855c(_0x288224[_0x6a44('0x36')](0x1f4,'message\x20is\x20empty'));});},'AbandonInteraction':function(_0x1e3ac1){var _0x2eb803=this;return new Promise(function(_0x224d7c,_0x11d9b2){if(_0x1e3ac1[_0x6a44('0x13')]&&_0x1e3ac1['interaction']&&_0x1e3ac1[_0x6a44('0x15')]['id']){try{var _0x13231c=getId(_0x1e3ac1[_0x6a44('0x13')],_0x1e3ac1[_0x6a44('0x14')]?_0x1e3ac1[_0x6a44('0x14')]['id']:0x0,_0x1e3ac1[_0x6a44('0x15')]?_0x1e3ac1[_0x6a44('0x15')]['id']:0x0);if(_0xb1d987[_0x6a44('0x12')][_0x13231c]){_0xb1d987[_0x6a44('0x12')][_0x13231c][_0x6a44('0x3b')](_0x6a44('0x43'));}return _0x224d7c({'code':0xc8,'message':_0x1e3ac1});}catch(_0x51e7df){logger[_0x6a44('0x36')](_0x51e7df[_0x6a44('0x47')]);return _0x11d9b2(_0x2eb803[_0x6a44('0x36')](0x1f4,_0x51e7df));}}logger[_0x6a44('0x36')](_0x6a44('0x46'));return _0x11d9b2(_0x2eb803[_0x6a44('0x36')](0x1f4,_0x6a44('0x46')));});},'AgentCapacity':function(_0x330263){var _0x276625=this;return new Promise(function(_0x4fabb8,_0x1d6d70){if(_0xb1d987[_0x6a44('0x40')][_0x6a44('0x48')](_0x330263['id'])){for(var _0x800265 in _0x330263['capacity']){if(_0x330263[_0x6a44('0x49')][_0x6a44('0x48')](_0x800265)){if(_0xb1d987[_0x6a44('0x40')][_0x330263['id']]['hasOwnProperty'](_0x800265+_0x6a44('0x4a'))){_0xb1d987['agents'][_0x330263['id']][_0x800265+'CurrentCapacity']=parseInt(_0x330263[_0x6a44('0x49')][_0x800265],0xa);}}}_0xb1d987[_0x6a44('0x40')][_0x330263['id']][_0x6a44('0x4b')]();return _0x4fabb8({'code':0xc8,'message':_0xb1d987[_0x6a44('0x40')][_0x330263['id']]});}else{return _0x1d6d70(_0x276625[_0x6a44('0x36')](0x1f4,'agent\x20not\x20found'));}});},'Agents':function(_0x5b8d44){return new Promise(function(_0x362607,_0x50c12b){var _0x4abebd=_[_0x6a44('0x4c')](_0xb1d987[_0x6a44('0x40')]);_0x362607({'count':_0x4abebd[_0x6a44('0x18')],'rows':_0x4abebd});});},'ChatQueues':function(_0x2aaea3){return new Promise(function(_0x5e02ed,_0x214529){var _0x564be2=[];for(var _0x59b390 in _0xb1d987['chatQueues']){if(_0xb1d987[_0x6a44('0x4d')][_0x6a44('0x48')](_0x59b390)){var _0x418a7e=_0xb1d987['chatQueues'][_0x59b390];var _0x252ea4={'id':_0x418a7e['id'],'available':_0x418a7e[_0x6a44('0x4e')],'loggedIn':_0x418a7e[_0x6a44('0x4f')],'name':_0x418a7e[_0x6a44('0x50')],'paused':_0x418a7e[_0x6a44('0x51')],'waiting':_0x418a7e[_0x6a44('0x52')]};_0x564be2['push'](_0x252ea4);}}_0x5e02ed({'count':_0x564be2[_0x6a44('0x18')],'rows':_0x564be2});});},'MailQueues':function(_0x20d5bf){return new Promise(function(_0x4f3890,_0x3d6dc6){var _0x3fdddf=[];for(var _0x3c95e1 in _0xb1d987['mailQueues']){if(_0xb1d987['mailQueues'][_0x6a44('0x48')](_0x3c95e1)){var _0x30a300=_0xb1d987['mailQueues'][_0x3c95e1];var _0x21f957={'id':_0x30a300['id'],'available':_0x30a300['available'],'loggedIn':_0x30a300[_0x6a44('0x4f')],'name':_0x30a300[_0x6a44('0x50')],'paused':_0x30a300[_0x6a44('0x51')],'waiting':_0x30a300[_0x6a44('0x52')]};_0x3fdddf['push'](_0x21f957);}}_0x4f3890({'count':_0x3fdddf['length'],'rows':_0x3fdddf});});},'OpenchannelQueues':function(_0x1d202c){return new Promise(function(_0x46dbe5,_0x46a77a){var _0x229bc4=[];for(var _0x230932 in _0xb1d987[_0x6a44('0x53')]){if(_0xb1d987[_0x6a44('0x53')][_0x6a44('0x48')](_0x230932)){var _0x36e872=_0xb1d987[_0x6a44('0x53')][_0x230932];var _0x8d2ac7={'id':_0x36e872['id'],'available':_0x36e872[_0x6a44('0x4e')],'loggedIn':_0x36e872[_0x6a44('0x4f')],'name':_0x36e872[_0x6a44('0x50')],'paused':_0x36e872[_0x6a44('0x51')],'waiting':_0x36e872[_0x6a44('0x52')]};_0x229bc4[_0x6a44('0x21')](_0x8d2ac7);}}_0x46dbe5({'count':_0x229bc4[_0x6a44('0x18')],'rows':_0x229bc4});});},'SmsQueues':function(_0x566c17){return new Promise(function(_0x35459e,_0x5374f2){var _0x15fd6d=[];for(var _0x469433 in _0xb1d987[_0x6a44('0x54')]){if(_0xb1d987[_0x6a44('0x54')]['hasOwnProperty'](_0x469433)){var _0x33ddac=_0xb1d987[_0x6a44('0x54')][_0x469433];var _0x984f87={'id':_0x33ddac['id'],'available':_0x33ddac[_0x6a44('0x4e')],'loggedIn':_0x33ddac[_0x6a44('0x4f')],'name':_0x33ddac[_0x6a44('0x50')],'paused':_0x33ddac['paused'],'waiting':_0x33ddac[_0x6a44('0x52')]};_0x15fd6d[_0x6a44('0x21')](_0x984f87);}}_0x35459e({'count':_0x15fd6d[_0x6a44('0x18')],'rows':_0x15fd6d});});},'FaxQueues':function(_0x34e348){return new Promise(function(_0x36c59d,_0x13aead){var _0x57fd0b=[];for(var _0x1c813c in _0xb1d987[_0x6a44('0x55')]){if(_0xb1d987['faxQueues'][_0x6a44('0x48')](_0x1c813c)){var _0x463126=_0xb1d987[_0x6a44('0x55')][_0x1c813c];var _0x4cd9f5={'id':_0x463126['id'],'available':_0x463126[_0x6a44('0x4e')],'loggedIn':_0x463126['loggedIn'],'name':_0x463126[_0x6a44('0x50')],'paused':_0x463126['paused'],'waiting':_0x463126[_0x6a44('0x52')]};_0x57fd0b['push'](_0x4cd9f5);}}_0x36c59d({'count':_0x57fd0b[_0x6a44('0x18')],'rows':_0x57fd0b});});},'WhatsappQueues':function(_0x457d9e){return new Promise(function(_0xeba1e2,_0x4e6082){var _0x576cd9=[];for(var _0x8b5a04 in _0xb1d987[_0x6a44('0x56')]){if(_0xb1d987[_0x6a44('0x56')][_0x6a44('0x48')](_0x8b5a04)){var _0x2f1c3e=_0xb1d987['whatsappQueues'][_0x8b5a04];var _0xdb434a={'id':_0x2f1c3e['id'],'available':_0x2f1c3e[_0x6a44('0x4e')],'loggedIn':_0x2f1c3e[_0x6a44('0x4f')],'name':_0x2f1c3e[_0x6a44('0x50')],'paused':_0x2f1c3e[_0x6a44('0x51')],'waiting':_0x2f1c3e[_0x6a44('0x52')]};_0x576cd9[_0x6a44('0x21')](_0xdb434a);}}_0xeba1e2({'count':_0x576cd9['length'],'rows':_0x576cd9});});},'ChatQueuesWaitingInteractions':function(_0x322129){return new Promise(function(_0x25681f,_0x2ec199){var _0x7c3bc7=_[_0x6a44('0x4c')](_0xb1d987[_0x6a44('0x57')]);_0x25681f({'count':_0x7c3bc7[_0x6a44('0x18')],'rows':_0x7c3bc7});});},'MailQueuesWaitingInteractions':function(_0x2f383e){return new Promise(function(_0x13f364,_0x49d513){var _0x4781fb=_[_0x6a44('0x4c')](_0xb1d987['mailQueuesWaitingInteractions']);_0x13f364({'count':_0x4781fb['length'],'rows':_0x4781fb});});},'OpenchannelQueuesWaitingInteractions':function(_0x417f64){return new Promise(function(_0x44a2e2,_0xcf855c){var _0x1ca4c9=_[_0x6a44('0x4c')](_0xb1d987['openchannelQueuesWaitingInteractions']);_0x44a2e2({'count':_0x1ca4c9[_0x6a44('0x18')],'rows':_0x1ca4c9});});},'SmsQueuesWaitingInteractions':function(_0x5a93ea){return new Promise(function(_0x14096b,_0x1bf50d){var _0x301bce=_['values'](_0xb1d987[_0x6a44('0x58')]);_0x14096b({'count':_0x301bce[_0x6a44('0x18')],'rows':_0x301bce});});},'FaxQueuesWaitingInteractions':function(_0x2b450d){return new Promise(function(_0x3cc19d,_0x114eb0){var _0x43d9d5=_['values'](_0xb1d987[_0x6a44('0x59')]);_0x3cc19d({'count':_0x43d9d5['length'],'rows':_0x43d9d5});});},'WhatsappQueuesWaitingInteractions':function(_0x48fec3){return new Promise(function(_0x1ab60b,_0x44e1f0){var _0x51880a=_['values'](_0xb1d987[_0x6a44('0x5a')]);_0x1ab60b({'count':_0x51880a[_0x6a44('0x18')],'rows':_0x51880a});});}};var _0x10917d=jayson[_0x6a44('0x5b')](_0x52aa9c)[_0x6a44('0x5c')]();_0x10917d['on'](_0x6a44('0x36'),function(_0x208c6e){logger[_0x6a44('0x36')](JSON[_0x6a44('0x3a')](_0x208c6e));return _0x553bc1(_0x208c6e);});_0x10917d[_0x6a44('0x11')](0x232c,_0x6a44('0x5d'),function(){console[_0x6a44('0x5e')](_0x6a44('0x5f'),0x232c);return _0x1481ed(_0x6a44('0x60')+0x232c);});});};
\ No newline at end of file