Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / services / routing / server / index.js
index 10147fa..2ef4fee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc4c=['listen','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','bluebird','uuid','./applications/utils','routing','../rpc/openchannelQueueReport','../rpc/smsQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','isNil','IntervalId','Intervals','map','interval','rules','message','interaction','applications','length','existsSync','join','app','.js','toLowerCase','autoreply','appdata','channel','mail','push','slice','dialogflow','split','amazonlex','tag','TagId','account','notificationTemplate','ContactId','body','%s:%s:%s','./interval','condition','intervals','./applications/','consequence','Push\x20new\x20rule','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','Applications\x20executed','stringify','matchPath','complete','No\x20applications\x20to\x20execute','stack','routing\x20is\x20empty','agent','agents','busy','busyQueue','emit','end','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','capacity','hasOwnProperty','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','chatQueues','available','loggedIn','name','paused','waiting','mailQueues','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server'];(function(_0x594c52,_0x3615b0){var _0x20a77e=function(_0x3c28a8){while(--_0x3c28a8){_0x594c52['push'](_0x594c52['shift']());}};_0x20a77e(++_0x3615b0);}(_0xfc4c,0xca));var _0xcfc4=function(_0x5a899f,_0x351771){_0x5a899f=_0x5a899f-0x0;var _0x5679de=_0xfc4c[_0x5a899f];return _0x5679de;};'use strict';var _=require(_0xcfc4('0x0'));var util=require(_0xcfc4('0x1'));var path=require(_0xcfc4('0x2'));var fs=require('fs');var jayson=require('jayson/promise');var BPromise=require(_0xcfc4('0x3'));var uuid=require(_0xcfc4('0x4'));var utils=require(_0xcfc4('0x5'));var config=require('../../../config/environment');var logger=require('../../../config/logger')(_0xcfc4('0x6'));var rpc={'openchannelQueueReport':require(_0xcfc4('0x7')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require(_0xcfc4('0x8')),'faxQueueReport':require('../rpc/faxQueueReport'),'whatsappQueueReport':require(_0xcfc4('0x9'))};var RuleEngine=require(_0xcfc4('0xa'));function getId(_0x520566,_0x13b9f6,_0x57e2f5){return util['format']('%s.%s.%s',_0x520566,_0x13b9f6||0x0,_0x57e2f5||0x0);}function getIntervals(_0x1ce9e8,_0x2d8256){var _0x584f17=[];if(!_[_0xcfc4('0xb')](_0x2d8256['IntervalId'])&&!_['isNil'](_0x1ce9e8[_0x2d8256[_0xcfc4('0xc')]])&&!_[_0xcfc4('0xb')](_0x1ce9e8[_0x2d8256[_0xcfc4('0xc')]][_0xcfc4('0xd')])){_0x584f17=_[_0xcfc4('0xe')](_0x1ce9e8[_0x2d8256['IntervalId']][_0xcfc4('0xd')],'interval');}else if(!_[_0xcfc4('0xb')](_0x2d8256['interval'])){_0x584f17=[_0x2d8256[_0xcfc4('0xf')]];}return _0x584f17;}exports['listen']=function(_0x57fffb){_0x57fffb[_0xcfc4('0x10')]={};return new BPromise(function(_0x40029f,_0x588dd1){var _0x407cd6={'Start':function(_0x391d92){var _0x39f8f1=this;return new Promise(function(_0x4bb1f3,_0x5af66f){if(_0x391d92){try{var _0xe4c5bd=[];var _0x47db36=getId(_0x391d92['channel'],_0x391d92['message']?_0x391d92[_0xcfc4('0x11')]['id']:0x0,_0x391d92['interaction']?_0x391d92[_0xcfc4('0x12')]['id']:0x0);if(_0x391d92[_0xcfc4('0x13')]&&_['isArray'](_0x391d92[_0xcfc4('0x13')])&&_0x391d92[_0xcfc4('0x13')][_0xcfc4('0x14')]){for(var _0x520dae=0x0;_0x520dae<_0x391d92[_0xcfc4('0x13')][_0xcfc4('0x14')];_0x520dae+=0x1){var _0x2aec71=_0x391d92['applications'][_0x520dae];if(fs[_0xcfc4('0x15')](path[_0xcfc4('0x16')](__dirname,_0xcfc4('0x13'),_0x2aec71[_0xcfc4('0x17')]+_0xcfc4('0x18')))){var _0x3e6839=[];switch(_0x2aec71[_0xcfc4('0x17')][_0xcfc4('0x19')]()){case _0xcfc4('0x1a'):var _0x42ef35=_0x2aec71[_0xcfc4('0x1b')]['split'](',');if(_0x391d92[_0xcfc4('0x1c')]===_0xcfc4('0x1d')){_0x3e6839[_0xcfc4('0x1e')](_0x42ef35[0x0]);_0x3e6839['push'](_0x42ef35[0x1]);_0x3e6839[_0xcfc4('0x1e')](_0x42ef35['slice'](0x2,_0x42ef35[_0xcfc4('0x14')])[_0xcfc4('0x16')](','));}else{_0x3e6839[_0xcfc4('0x1e')](_0x42ef35[0x0]);_0x3e6839[_0xcfc4('0x1e')](_0x42ef35[_0xcfc4('0x1f')](0x1,_0x42ef35[_0xcfc4('0x14')])['join'](','));}break;case _0xcfc4('0x20'):var _0x347f15=_0x2aec71[_0xcfc4('0x1b')][_0xcfc4('0x21')](',');_0x3e6839[_0xcfc4('0x1e')](_0x347f15[0x0]);_0x3e6839['push'](_0x347f15[0x1]);_0x3e6839[_0xcfc4('0x1e')](_0x347f15[_0xcfc4('0x1f')](0x2,_0x347f15[_0xcfc4('0x14')])[_0xcfc4('0x16')](','));break;case'dialogflowv2':var _0x4c65fc=_0x2aec71['appdata'][_0xcfc4('0x21')](',');_0x3e6839[_0xcfc4('0x1e')](_0x4c65fc[0x0]);_0x3e6839[_0xcfc4('0x1e')](_0x4c65fc[0x1]);_0x3e6839[_0xcfc4('0x1e')](_0x4c65fc[0x2]);_0x3e6839[_0xcfc4('0x1e')](_0x4c65fc[0x3]);_0x3e6839[_0xcfc4('0x1e')](_0x4c65fc[_0xcfc4('0x1f')](0x4,_0x4c65fc['length'])[_0xcfc4('0x16')](','));break;case _0xcfc4('0x22'):var _0x28a085=_0x2aec71[_0xcfc4('0x1b')][_0xcfc4('0x21')](',');_0x3e6839[_0xcfc4('0x1e')](_0x28a085[0x0]);_0x3e6839[_0xcfc4('0x1e')](_0x28a085[0x1]);_0x3e6839['push'](_0x28a085[0x2]);_0x3e6839['push'](_0x28a085[0x3]);_0x3e6839[_0xcfc4('0x1e')](_0x28a085[_0xcfc4('0x1f')](0x4,_0x28a085[_0xcfc4('0x14')])['join'](','));break;case _0xcfc4('0x11'):_0x3e6839[_0xcfc4('0x1e')](_0x2aec71['appdata']);break;case _0xcfc4('0x23'):_0x3e6839[_0xcfc4('0x1e')](_0x2aec71[_0xcfc4('0x24')]);_0x3e6839[_0xcfc4('0x1e')](_0x2aec71[_0xcfc4('0x1b')]);break;case'tvox':var _0x3d59c8=utils['getMustacheRender'](_0x391d92[_0xcfc4('0x25')][_0xcfc4('0x26')],_0x391d92);var _0x3ac6ea=_0x2aec71[_0xcfc4('0x1b')][_0xcfc4('0x21')](',');_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x0]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x1]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x2]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x3]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x4]);_0x3e6839['push'](_0x3ac6ea[0x5]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x6]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x7]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x8]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0x9]);_0x3e6839[_0xcfc4('0x1e')](_0x3ac6ea[0xa]);_0x3e6839['push'](_0x391d92[_0xcfc4('0x12')]['id']);_0x3e6839['push'](_0x391d92[_0xcfc4('0x11')]['id']);_0x3e6839[_0xcfc4('0x1e')](_0x2aec71['ChatWebsiteId']);_0x3e6839['push'](_0x391d92['interaction'][_0xcfc4('0x27')]);_0x3e6839['push'](_0x391d92[_0xcfc4('0x28')][_0xcfc4('0x28')]);_0x3e6839['push'](_0x3d59c8);break;default:_0x3e6839=_[_0xcfc4('0xb')](_0x2aec71[_0xcfc4('0x1b')])?[]:_0x2aec71[_0xcfc4('0x1b')]['split'](',');}var _0x15b89f={'id':util['format'](_0xcfc4('0x29'),_0x47db36,_0x2aec71['id'],_0x2aec71[_0xcfc4('0x17')]),'condition':require(_0xcfc4('0x2a'))[_0xcfc4('0x2b')](_0x47db36,getIntervals(_0x57fffb[_0xcfc4('0x2c')],_0x2aec71),_0x57fffb),'consequence':require(_0xcfc4('0x2d')+_0x2aec71[_0xcfc4('0x17')])[_0xcfc4('0x2e')](_0x47db36,_0x3e6839,_0x57fffb,_0x391d92),'p':_0x2aec71['priority']||0x0};logger['info'](_0xcfc4('0x2f'),_0x15b89f['id'],_0xcfc4('0x30'),getIntervals(_0x57fffb['intervals'],_0x2aec71)[_0xcfc4('0x16')](_0xcfc4('0x31')));_0xe4c5bd['push'](_0x15b89f);}else{logger[_0xcfc4('0x32')](_0xcfc4('0x33'),path[_0xcfc4('0x16')](__dirname,_0xcfc4('0x13'),_0x2aec71['app']+_0xcfc4('0x18')));}}_0x57fffb[_0xcfc4('0x10')][_0x47db36]=new RuleEngine(_0xe4c5bd);_0x57fffb[_0xcfc4('0x10')][_0x47db36][_0xcfc4('0x34')](_0x391d92,function(_0x329029){logger['info'](_0xcfc4('0x35'),JSON[_0xcfc4('0x36')](_0x329029[_0xcfc4('0x37')]));if(_0x57fffb[_0xcfc4('0x10')][_0x47db36]){_0x57fffb['rules'][_0x47db36]['emit'](_0xcfc4('0x38'));}});return _0x4bb1f3({'code':0xc8,'message':_0x391d92});}else{logger['info'](_0xcfc4('0x39'));return _0x4bb1f3({'code':0xc8,'message':_0x391d92});}}catch(_0x7464ed){logger[_0xcfc4('0x32')](_0x7464ed[_0xcfc4('0x3a')]);return _0x5af66f(_0x39f8f1['error'](0x1f4,_0x7464ed));}}return _0x5af66f(_0xcfc4('0x3b'));});},'AcceptMessage':function(_0x11e8aa){var _0x68ea0d=this;return new Promise(function(_0x5018a3,_0x1bac85){if(_0x11e8aa[_0xcfc4('0x3c')]&&_0x11e8aa[_0xcfc4('0x3c')]['id']){if(_0x57fffb[_0xcfc4('0x3d')][_0x11e8aa[_0xcfc4('0x3c')]['id']]){_0x57fffb[_0xcfc4('0x3d')][_0x11e8aa[_0xcfc4('0x3c')]['id']][_0xcfc4('0x3e')]=![];_0x57fffb[_0xcfc4('0x3d')][_0x11e8aa[_0xcfc4('0x3c')]['id']][_0xcfc4('0x3f')]=undefined;}}if(_0x11e8aa['message']&&_0x11e8aa['message']['id']){try{var _0x127889=getId(_0x11e8aa['channel'],_0x11e8aa[_0xcfc4('0x11')]?_0x11e8aa[_0xcfc4('0x11')]['id']:0x0,_0x11e8aa[_0xcfc4('0x12')]?_0x11e8aa[_0xcfc4('0x12')]['id']:0x0);if(_0x57fffb[_0xcfc4('0x10')][_0x127889]){_0x57fffb[_0xcfc4('0x10')][_0x127889][_0xcfc4('0x40')](_0xcfc4('0x41'));if(rpc[_0x11e8aa['channel']+_0xcfc4('0x42')]){rpc[_0x11e8aa[_0xcfc4('0x1c')]+_0xcfc4('0x42')][_0xcfc4('0x43')](_0x127889,{'UserId':_0x11e8aa['message'][_0xcfc4('0x44')]})[_0xcfc4('0x45')](function(_0x42ffe2){logger[_0xcfc4('0x32')](_0xcfc4('0x46'));});}}return _0x5018a3({'code':0xc8,'message':_0x11e8aa});}catch(_0x38d89d){logger['error'](_0x38d89d[_0xcfc4('0x3a')]);return _0x1bac85(_0x68ea0d[_0xcfc4('0x32')](0x1f4,_0x38d89d));}}logger['error']('message\x20is\x20empty');return _0x1bac85(_0x68ea0d[_0xcfc4('0x32')](0x1f4,_0xcfc4('0x47')));});},'RejectMessage':function(_0x137804){var _0x4d5551=this;return new Promise(function(_0x3d7981,_0x44d0e5){if(_0x137804[_0xcfc4('0x3c')]&&_0x137804['agent']['id']){try{if(_0x57fffb['agents'][_0x137804[_0xcfc4('0x3c')]['id']]){_0x57fffb[_0xcfc4('0x3d')][_0x137804[_0xcfc4('0x3c')]['id']][_0xcfc4('0x3e')]=![];_0x57fffb[_0xcfc4('0x3d')][_0x137804['agent']['id']][_0xcfc4('0x3f')]=undefined;}return _0x3d7981({'code':0xc8,'message':_0x137804});}catch(_0x1f2116){logger[_0xcfc4('0x32')](_0x1f2116[_0xcfc4('0x3a')]);return _0x44d0e5(_0x4d5551['error'](0x1f4,_0x1f2116));}}logger[_0xcfc4('0x32')](_0xcfc4('0x47'));return _0x44d0e5(_0x4d5551[_0xcfc4('0x32')](0x1f4,_0xcfc4('0x47')));});},'AbandonInteraction':function(_0x1718fb){var _0x49aa5a=this;return new Promise(function(_0x51c637,_0x20ddf6){if(_0x1718fb[_0xcfc4('0x1c')]&&_0x1718fb[_0xcfc4('0x12')]&&_0x1718fb[_0xcfc4('0x12')]['id']){try{var _0x2e0019=getId(_0x1718fb['channel'],_0x1718fb['message']?_0x1718fb['message']['id']:0x0,_0x1718fb['interaction']?_0x1718fb[_0xcfc4('0x12')]['id']:0x0);if(_0x57fffb['rules'][_0x2e0019]){_0x57fffb[_0xcfc4('0x10')][_0x2e0019]['emit'](_0xcfc4('0x41'));}return _0x51c637({'code':0xc8,'message':_0x1718fb});}catch(_0x508c0f){logger[_0xcfc4('0x32')](_0x508c0f[_0xcfc4('0x3a')]);return _0x20ddf6(_0x49aa5a[_0xcfc4('0x32')](0x1f4,_0x508c0f));}}logger[_0xcfc4('0x32')](_0xcfc4('0x47'));return _0x20ddf6(_0x49aa5a[_0xcfc4('0x32')](0x1f4,_0xcfc4('0x47')));});},'AgentCapacity':function(_0x1e0a33){var _0x4baa0e=this;return new Promise(function(_0x3f19d0,_0x31a253){if(_0x57fffb[_0xcfc4('0x3d')]['hasOwnProperty'](_0x1e0a33['id'])){for(var _0x4edf39 in _0x1e0a33[_0xcfc4('0x48')]){if(_0x1e0a33['capacity'][_0xcfc4('0x49')](_0x4edf39)){if(_0x57fffb['agents'][_0x1e0a33['id']][_0xcfc4('0x49')](_0x4edf39+_0xcfc4('0x4a'))){_0x57fffb[_0xcfc4('0x3d')][_0x1e0a33['id']][_0x4edf39+'CurrentCapacity']=parseInt(_0x1e0a33['capacity'][_0x4edf39],0xa);}}}_0x57fffb['agents'][_0x1e0a33['id']][_0xcfc4('0x4b')]();return _0x3f19d0({'code':0xc8,'message':_0x57fffb[_0xcfc4('0x3d')][_0x1e0a33['id']]});}else{return _0x31a253(_0x4baa0e['error'](0x1f4,_0xcfc4('0x4c')));}});},'Agents':function(_0x18c87c){return new Promise(function(_0x22049a,_0x2ff874){var _0x336800=_[_0xcfc4('0x4d')](_0x57fffb[_0xcfc4('0x3d')]);_0x22049a({'count':_0x336800[_0xcfc4('0x14')],'rows':_0x336800});});},'ChatQueues':function(_0x54802b){return new Promise(function(_0x30d118,_0x25174d){var _0x569a5e=[];for(var _0x522939 in _0x57fffb[_0xcfc4('0x4e')]){if(_0x57fffb[_0xcfc4('0x4e')]['hasOwnProperty'](_0x522939)){var _0x55e73c=_0x57fffb[_0xcfc4('0x4e')][_0x522939];var _0x582ee1={'id':_0x55e73c['id'],'available':_0x55e73c[_0xcfc4('0x4f')],'loggedIn':_0x55e73c[_0xcfc4('0x50')],'name':_0x55e73c[_0xcfc4('0x51')],'paused':_0x55e73c[_0xcfc4('0x52')],'waiting':_0x55e73c[_0xcfc4('0x53')]};_0x569a5e[_0xcfc4('0x1e')](_0x582ee1);}}_0x30d118({'count':_0x569a5e['length'],'rows':_0x569a5e});});},'MailQueues':function(_0x2fd03c){return new Promise(function(_0x5a5c7d,_0x839c74){var _0x582630=[];for(var _0x40d671 in _0x57fffb[_0xcfc4('0x54')]){if(_0x57fffb['mailQueues'][_0xcfc4('0x49')](_0x40d671)){var _0x57e093=_0x57fffb[_0xcfc4('0x54')][_0x40d671];var _0x24a42f={'id':_0x57e093['id'],'available':_0x57e093[_0xcfc4('0x4f')],'loggedIn':_0x57e093[_0xcfc4('0x50')],'name':_0x57e093[_0xcfc4('0x51')],'paused':_0x57e093[_0xcfc4('0x52')],'waiting':_0x57e093[_0xcfc4('0x53')]};_0x582630[_0xcfc4('0x1e')](_0x24a42f);}}_0x5a5c7d({'count':_0x582630[_0xcfc4('0x14')],'rows':_0x582630});});},'OpenchannelQueues':function(_0x306748){return new Promise(function(_0x5ad449,_0x3245e4){var _0x5455dd=[];for(var _0x1c5519 in _0x57fffb['openchannelQueues']){if(_0x57fffb[_0xcfc4('0x55')]['hasOwnProperty'](_0x1c5519)){var _0x1b7708=_0x57fffb['openchannelQueues'][_0x1c5519];var _0x484993={'id':_0x1b7708['id'],'available':_0x1b7708[_0xcfc4('0x4f')],'loggedIn':_0x1b7708[_0xcfc4('0x50')],'name':_0x1b7708[_0xcfc4('0x51')],'paused':_0x1b7708['paused'],'waiting':_0x1b7708[_0xcfc4('0x53')]};_0x5455dd[_0xcfc4('0x1e')](_0x484993);}}_0x5ad449({'count':_0x5455dd['length'],'rows':_0x5455dd});});},'SmsQueues':function(_0x32fafc){return new Promise(function(_0x495329,_0x272ee8){var _0xa51dce=[];for(var _0x2a4c90 in _0x57fffb[_0xcfc4('0x56')]){if(_0x57fffb[_0xcfc4('0x56')]['hasOwnProperty'](_0x2a4c90)){var _0x2aaad2=_0x57fffb[_0xcfc4('0x56')][_0x2a4c90];var _0x1a13bb={'id':_0x2aaad2['id'],'available':_0x2aaad2[_0xcfc4('0x4f')],'loggedIn':_0x2aaad2['loggedIn'],'name':_0x2aaad2[_0xcfc4('0x51')],'paused':_0x2aaad2[_0xcfc4('0x52')],'waiting':_0x2aaad2[_0xcfc4('0x53')]};_0xa51dce[_0xcfc4('0x1e')](_0x1a13bb);}}_0x495329({'count':_0xa51dce[_0xcfc4('0x14')],'rows':_0xa51dce});});},'FaxQueues':function(_0x2fcbb8){return new Promise(function(_0xa1c5f2,_0x36d305){var _0x25f42b=[];for(var _0x4bef20 in _0x57fffb[_0xcfc4('0x57')]){if(_0x57fffb['faxQueues'][_0xcfc4('0x49')](_0x4bef20)){var _0x1b8a2b=_0x57fffb['faxQueues'][_0x4bef20];var _0xcae1b2={'id':_0x1b8a2b['id'],'available':_0x1b8a2b['available'],'loggedIn':_0x1b8a2b['loggedIn'],'name':_0x1b8a2b[_0xcfc4('0x51')],'paused':_0x1b8a2b['paused'],'waiting':_0x1b8a2b[_0xcfc4('0x53')]};_0x25f42b[_0xcfc4('0x1e')](_0xcae1b2);}}_0xa1c5f2({'count':_0x25f42b[_0xcfc4('0x14')],'rows':_0x25f42b});});},'WhatsappQueues':function(_0x250789){return new Promise(function(_0x252594,_0x4b6358){var _0x40edea=[];for(var _0x1959e0 in _0x57fffb[_0xcfc4('0x58')]){if(_0x57fffb[_0xcfc4('0x58')]['hasOwnProperty'](_0x1959e0)){var _0x24809b=_0x57fffb[_0xcfc4('0x58')][_0x1959e0];var _0x51d4e0={'id':_0x24809b['id'],'available':_0x24809b['available'],'loggedIn':_0x24809b[_0xcfc4('0x50')],'name':_0x24809b[_0xcfc4('0x51')],'paused':_0x24809b[_0xcfc4('0x52')],'waiting':_0x24809b[_0xcfc4('0x53')]};_0x40edea[_0xcfc4('0x1e')](_0x51d4e0);}}_0x252594({'count':_0x40edea[_0xcfc4('0x14')],'rows':_0x40edea});});},'ChatQueuesWaitingInteractions':function(_0x42eaad){return new Promise(function(_0x11259b,_0x1b6438){var _0x3fabc6=_['values'](_0x57fffb[_0xcfc4('0x59')]);_0x11259b({'count':_0x3fabc6[_0xcfc4('0x14')],'rows':_0x3fabc6});});},'MailQueuesWaitingInteractions':function(_0x3c4889){return new Promise(function(_0x1937a1,_0x353bec){var _0x481083=_[_0xcfc4('0x4d')](_0x57fffb[_0xcfc4('0x5a')]);_0x1937a1({'count':_0x481083[_0xcfc4('0x14')],'rows':_0x481083});});},'OpenchannelQueuesWaitingInteractions':function(_0x1373f6){return new Promise(function(_0x4cbb68,_0x1d1ebe){var _0xde585d=_[_0xcfc4('0x4d')](_0x57fffb[_0xcfc4('0x5b')]);_0x4cbb68({'count':_0xde585d[_0xcfc4('0x14')],'rows':_0xde585d});});},'SmsQueuesWaitingInteractions':function(_0x3f3664){return new Promise(function(_0x1f39bc,_0x4d6dfb){var _0x59d996=_[_0xcfc4('0x4d')](_0x57fffb[_0xcfc4('0x5c')]);_0x1f39bc({'count':_0x59d996[_0xcfc4('0x14')],'rows':_0x59d996});});},'FaxQueuesWaitingInteractions':function(_0x4d86a8){return new Promise(function(_0x157b3b,_0x1dc62f){var _0x1d7ed4=_[_0xcfc4('0x4d')](_0x57fffb['faxQueuesWaitingInteractions']);_0x157b3b({'count':_0x1d7ed4[_0xcfc4('0x14')],'rows':_0x1d7ed4});});},'WhatsappQueuesWaitingInteractions':function(_0x24b1bd){return new Promise(function(_0x27199a,_0x40ce03){var _0x2d6065=_[_0xcfc4('0x4d')](_0x57fffb[_0xcfc4('0x5d')]);_0x27199a({'count':_0x2d6065[_0xcfc4('0x14')],'rows':_0x2d6065});});}};var _0x71653f=jayson[_0xcfc4('0x5e')](_0x407cd6)['http']();_0x71653f['on']('error',function(_0x232afe){logger['error'](JSON[_0xcfc4('0x36')](_0x232afe));return _0x588dd1(_0x232afe);});_0x71653f[_0xcfc4('0x5f')](0x232c,'127.0.0.1',function(){console[_0xcfc4('0x60')](_0xcfc4('0x61'),0x232c);return _0x40029f(_0xcfc4('0x62')+0x232c);});});};
\ No newline at end of file
+var _0x804d=['checkWaitingNotifications','applications','isArray','length','existsSync','join','app','appdata','split','push','slice','dialogflowv2','amazonlex','tag','TagId','account','notificationTemplate','ContactId','body','./interval','condition','./applications/','consequence','priority','Push\x20new\x20rule','on\x20interval','intervals','\x20|\x20','.js','execute','info','Applications\x20executed','stringify','emit','complete','error','stack','routing\x20is\x20empty','agent','agents','busy','busyQueue','end','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','capacity','hasOwnProperty','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','find','chatQueues','loggedIn','paused','waiting','mailQueues','available','name','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','listen','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','lodash','util','path','jayson/promise','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','%s.%s.%s','isNil','IntervalId','map','interval','rules','channel','message','interaction'];(function(_0x1289f9,_0x57b011){var _0x6edf7b=function(_0x172cfa){while(--_0x172cfa){_0x1289f9['push'](_0x1289f9['shift']());}};_0x6edf7b(++_0x57b011);}(_0x804d,0x116));var _0xd804=function(_0x291b77,_0x36b1c2){_0x291b77=_0x291b77-0x0;var _0x138495=_0x804d[_0x291b77];return _0x138495;};'use strict';var _=require(_0xd804('0x0'));var util=require(_0xd804('0x1'));var path=require(_0xd804('0x2'));var fs=require('fs');var jayson=require(_0xd804('0x3'));var BPromise=require(_0xd804('0x4'));var utils=require(_0xd804('0x5'));var sUtils=require(_0xd804('0x6'));var logger=require(_0xd804('0x7'))('routing');var rpc={'openchannelQueueReport':require(_0xd804('0x8')),'mailQueueReport':require(_0xd804('0x9')),'chatQueueReport':require(_0xd804('0xa')),'smsQueueReport':require(_0xd804('0xb')),'faxQueueReport':require(_0xd804('0xc')),'whatsappQueueReport':require(_0xd804('0xd'))};var RuleEngine=require(_0xd804('0xe'));function getId(_0x391e2b,_0x2c3ae6,_0x2ff6a4){return util[_0xd804('0xf')](_0xd804('0x10'),_0x391e2b,_0x2c3ae6||0x0,_0x2ff6a4||0x0);}function getIntervals(_0x4d12bd,_0x321d86){var _0x2d2434=[];if(!_[_0xd804('0x11')](_0x321d86[_0xd804('0x12')])&&!_['isNil'](_0x4d12bd[_0x321d86['IntervalId']])&&!_[_0xd804('0x11')](_0x4d12bd[_0x321d86[_0xd804('0x12')]]['Intervals'])){_0x2d2434=_[_0xd804('0x13')](_0x4d12bd[_0x321d86[_0xd804('0x12')]]['Intervals'],_0xd804('0x14'));}else if(!_[_0xd804('0x11')](_0x321d86[_0xd804('0x14')])){_0x2d2434=[_0x321d86['interval']];}return _0x2d2434;}exports['listen']=function(_0x31b189){_0x31b189[_0xd804('0x15')]={};return new BPromise(function(_0xcec83,_0x1f8142){var _0x12359a={'Start':function(_0x5ee270){var _0x18c4a0=this;return new Promise(function(_0x30be96,_0x597be3){if(_0x5ee270){try{var _0x13116e=[];var _0x1a10c7=getId(_0x5ee270[_0xd804('0x16')],_0x5ee270['message']?_0x5ee270[_0xd804('0x17')]['id']:0x0,_0x5ee270['interaction']?_0x5ee270[_0xd804('0x18')]['id']:0x0);var _0x2a5170=sUtils[_0xd804('0x19')](_0x31b189,_0x5ee270);if(_0x5ee270['transfer']||!_0x2a5170&&_0x5ee270[_0xd804('0x1a')]&&_[_0xd804('0x1b')](_0x5ee270[_0xd804('0x1a')])&&_0x5ee270[_0xd804('0x1a')][_0xd804('0x1c')]){for(var _0x5d29d1=0x0;_0x5d29d1<_0x5ee270['applications'][_0xd804('0x1c')];_0x5d29d1+=0x1){var _0x5425f0=_0x5ee270[_0xd804('0x1a')][_0x5d29d1];if(fs[_0xd804('0x1d')](path[_0xd804('0x1e')](__dirname,'applications',_0x5425f0[_0xd804('0x1f')]+'.js'))){var _0x18d28c=[];switch(_0x5425f0['app']['toLowerCase']()){case'autoreply':var _0x51b191=_0x5425f0[_0xd804('0x20')][_0xd804('0x21')](',');if(_0x5ee270[_0xd804('0x16')]==='mail'){_0x18d28c[_0xd804('0x22')](_0x51b191[0x0]);_0x18d28c[_0xd804('0x22')](_0x51b191[0x1]);_0x18d28c[_0xd804('0x22')](_0x51b191[_0xd804('0x23')](0x2,_0x51b191['length'])[_0xd804('0x1e')](','));}else{_0x18d28c[_0xd804('0x22')](_0x51b191[0x0]);_0x18d28c['push'](_0x51b191[_0xd804('0x23')](0x1,_0x51b191[_0xd804('0x1c')])['join'](','));}break;case'dialogflow':var _0x4b040a=_0x5425f0[_0xd804('0x20')][_0xd804('0x21')](',');_0x18d28c[_0xd804('0x22')](_0x4b040a[0x0]);_0x18d28c['push'](_0x4b040a[0x1]);_0x18d28c[_0xd804('0x22')](_0x4b040a[_0xd804('0x23')](0x2,_0x4b040a[_0xd804('0x1c')])[_0xd804('0x1e')](','));break;case _0xd804('0x24'):var _0x26ffc8=_0x5425f0[_0xd804('0x20')][_0xd804('0x21')](',');_0x18d28c['push'](_0x26ffc8[0x0]);_0x18d28c[_0xd804('0x22')](_0x26ffc8[0x1]);_0x18d28c[_0xd804('0x22')](_0x26ffc8[0x2]);_0x18d28c[_0xd804('0x22')](_0x26ffc8[0x3]);_0x18d28c[_0xd804('0x22')](_0x26ffc8[_0xd804('0x23')](0x4,_0x26ffc8[_0xd804('0x1c')])[_0xd804('0x1e')](','));break;case _0xd804('0x25'):var _0x26a7f1=_0x5425f0[_0xd804('0x20')]['split'](',');_0x18d28c['push'](_0x26a7f1[0x0]);_0x18d28c[_0xd804('0x22')](_0x26a7f1[0x1]);_0x18d28c[_0xd804('0x22')](_0x26a7f1[0x2]);_0x18d28c['push'](_0x26a7f1[0x3]);_0x18d28c['push'](_0x26a7f1[_0xd804('0x23')](0x4,_0x26a7f1['length'])['join'](','));break;case _0xd804('0x17'):_0x18d28c[_0xd804('0x22')](_0x5425f0[_0xd804('0x20')]);break;case _0xd804('0x26'):_0x18d28c[_0xd804('0x22')](_0x5425f0[_0xd804('0x27')]);_0x18d28c[_0xd804('0x22')](_0x5425f0[_0xd804('0x20')]);break;case'tvox':var _0x329cab=utils['getMustacheRender'](_0x5ee270[_0xd804('0x28')][_0xd804('0x29')],_0x5ee270);var _0x22a785=_0x5425f0[_0xd804('0x20')][_0xd804('0x21')](',');_0x18d28c['push'](_0x22a785[0x0]);_0x18d28c['push'](_0x22a785[0x1]);_0x18d28c['push'](_0x22a785[0x2]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x3]);_0x18d28c['push'](_0x22a785[0x4]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x5]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x6]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x7]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x8]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x9]);_0x18d28c['push'](_0x22a785[0xa]);_0x18d28c['push'](_0x5ee270[_0xd804('0x18')]['id']);_0x18d28c[_0xd804('0x22')](_0x5ee270[_0xd804('0x17')]['id']);_0x18d28c[_0xd804('0x22')](_0x5425f0['ChatWebsiteId']);_0x18d28c['push'](_0x5ee270[_0xd804('0x18')][_0xd804('0x2a')]);_0x18d28c[_0xd804('0x22')](_0x5ee270[_0xd804('0x2b')]['body']);_0x18d28c['push'](_0x329cab);break;default:_0x18d28c=_['isNil'](_0x5425f0[_0xd804('0x20')])?[]:_0x5425f0[_0xd804('0x20')][_0xd804('0x21')](',');}var _0x518beb={'id':util[_0xd804('0xf')]('%s:%s:%s',_0x1a10c7,_0x5425f0['id'],_0x5425f0[_0xd804('0x1f')]),'condition':require(_0xd804('0x2c'))[_0xd804('0x2d')](_0x1a10c7,getIntervals(_0x31b189['intervals'],_0x5425f0),_0x31b189),'consequence':require(_0xd804('0x2e')+_0x5425f0[_0xd804('0x1f')])[_0xd804('0x2f')](_0x1a10c7,_0x18d28c,_0x31b189,_0x5ee270),'p':_0x5425f0[_0xd804('0x30')]||0x0};logger['info'](_0xd804('0x31'),_0x518beb['id'],_0xd804('0x32'),getIntervals(_0x31b189[_0xd804('0x33')],_0x5425f0)[_0xd804('0x1e')](_0xd804('0x34')));_0x13116e[_0xd804('0x22')](_0x518beb);}else{logger['error']('Please\x20create\x20a\x20new\x20file\x20under',path[_0xd804('0x1e')](__dirname,'applications',_0x5425f0[_0xd804('0x1f')]+_0xd804('0x35')));}}_0x31b189[_0xd804('0x15')][_0x1a10c7]=new RuleEngine(_0x13116e);_0x31b189[_0xd804('0x15')][_0x1a10c7][_0xd804('0x36')](_0x5ee270,function(_0x1f4da7){logger[_0xd804('0x37')](_0xd804('0x38'),JSON[_0xd804('0x39')](_0x1f4da7['matchPath']));if(_0x31b189['rules'][_0x1a10c7]){_0x31b189[_0xd804('0x15')][_0x1a10c7][_0xd804('0x3a')](_0xd804('0x3b'));}});return _0x30be96({'code':0xc8,'message':_0x5ee270});}else{if(_0x2a5170){logger[_0xd804('0x37')](util['format']('Skipped\x20routing\x20for\x20%s',_0x1a10c7));}else{logger[_0xd804('0x37')]('No\x20applications\x20to\x20execute');}return _0x30be96({'code':0xc8,'message':_0x5ee270});}}catch(_0x1ff4cc){logger[_0xd804('0x3c')](_0x1ff4cc[_0xd804('0x3d')]);return _0x597be3(_0x18c4a0[_0xd804('0x3c')](0x1f4,_0x1ff4cc));}}return _0x597be3(_0xd804('0x3e'));});},'AcceptMessage':function(_0x1d334d){var _0x38a454=this;return new Promise(function(_0x2bf040,_0x4cf155){if(_0x1d334d[_0xd804('0x3f')]&&_0x1d334d[_0xd804('0x3f')]['id']){if(_0x31b189['agents'][_0x1d334d[_0xd804('0x3f')]['id']]){_0x31b189[_0xd804('0x40')][_0x1d334d['agent']['id']][_0xd804('0x41')]=![];_0x31b189['agents'][_0x1d334d[_0xd804('0x3f')]['id']][_0xd804('0x42')]=undefined;}}if(_0x1d334d['message']&&_0x1d334d[_0xd804('0x17')]['id']){try{var _0x140b84=getId(_0x1d334d['channel'],_0x1d334d[_0xd804('0x17')]?_0x1d334d[_0xd804('0x17')]['id']:0x0,_0x1d334d[_0xd804('0x18')]?_0x1d334d[_0xd804('0x18')]['id']:0x0);if(_0x31b189[_0xd804('0x15')][_0x140b84]){_0x31b189[_0xd804('0x15')][_0x140b84][_0xd804('0x3a')](_0xd804('0x43'));if(rpc[_0x1d334d[_0xd804('0x16')]+'QueueReport']){rpc[_0x1d334d[_0xd804('0x16')]+'QueueReport'][_0xd804('0x44')](_0x140b84,{'UserId':_0x1d334d[_0xd804('0x17')][_0xd804('0x45')]})[_0xd804('0x46')](function(){logger[_0xd804('0x3c')](_0xd804('0x47'));});}}return _0x2bf040({'code':0xc8,'message':_0x1d334d});}catch(_0x4399fc){logger[_0xd804('0x3c')](_0x4399fc[_0xd804('0x3d')]);return _0x4cf155(_0x38a454['error'](0x1f4,_0x4399fc));}}logger[_0xd804('0x3c')](_0xd804('0x48'));return _0x4cf155(_0x38a454['error'](0x1f4,_0xd804('0x48')));});},'RejectMessage':function(_0x39fb9a){var _0x4584ea=this;return new Promise(function(_0x5139ee,_0x3d1e48){if(_0x39fb9a[_0xd804('0x3f')]&&_0x39fb9a[_0xd804('0x3f')]['id']){try{if(_0x31b189[_0xd804('0x40')][_0x39fb9a['agent']['id']]){_0x31b189['agents'][_0x39fb9a[_0xd804('0x3f')]['id']][_0xd804('0x41')]=![];_0x31b189[_0xd804('0x40')][_0x39fb9a[_0xd804('0x3f')]['id']][_0xd804('0x42')]=undefined;}return _0x5139ee({'code':0xc8,'message':_0x39fb9a});}catch(_0x212b6c){logger[_0xd804('0x3c')](_0x212b6c[_0xd804('0x3d')]);return _0x3d1e48(_0x4584ea[_0xd804('0x3c')](0x1f4,_0x212b6c));}}logger['error'](_0xd804('0x48'));return _0x3d1e48(_0x4584ea['error'](0x1f4,_0xd804('0x48')));});},'AbandonInteraction':function(_0x36514b){var _0x39b3f4=this;return new Promise(function(_0x9203e5,_0x4f710d){if(_0x36514b[_0xd804('0x16')]&&_0x36514b[_0xd804('0x18')]&&_0x36514b[_0xd804('0x18')]['id']){try{var _0x3c3405=getId(_0x36514b[_0xd804('0x16')],_0x36514b['message']?_0x36514b[_0xd804('0x17')]['id']:0x0,_0x36514b[_0xd804('0x18')]?_0x36514b[_0xd804('0x18')]['id']:0x0);if(_0x31b189[_0xd804('0x15')][_0x3c3405]){_0x31b189[_0xd804('0x15')][_0x3c3405][_0xd804('0x3a')](_0xd804('0x43'));}return _0x9203e5({'code':0xc8,'message':_0x36514b});}catch(_0x55eee9){logger['error'](_0x55eee9[_0xd804('0x3d')]);return _0x4f710d(_0x39b3f4[_0xd804('0x3c')](0x1f4,_0x55eee9));}}logger[_0xd804('0x3c')]('message\x20is\x20empty');return _0x4f710d(_0x39b3f4[_0xd804('0x3c')](0x1f4,_0xd804('0x48')));});},'AgentCapacity':function(_0x2ce7c8){var _0x29777c=this;return new Promise(function(_0x34d09f,_0x4786aa){if(_0x31b189[_0xd804('0x40')]['hasOwnProperty'](_0x2ce7c8['id'])){for(var _0xc8dc44 in _0x2ce7c8[_0xd804('0x49')]){if(_0x2ce7c8[_0xd804('0x49')]['hasOwnProperty'](_0xc8dc44)){if(_0x31b189[_0xd804('0x40')][_0x2ce7c8['id']][_0xd804('0x4a')](_0xc8dc44+_0xd804('0x4b'))){_0x31b189[_0xd804('0x40')][_0x2ce7c8['id']][_0xc8dc44+_0xd804('0x4b')]=parseInt(_0x2ce7c8['capacity'][_0xc8dc44],0xa);}}}_0x31b189[_0xd804('0x40')][_0x2ce7c8['id']][_0xd804('0x4c')]();return _0x34d09f({'code':0xc8,'message':_0x31b189[_0xd804('0x40')][_0x2ce7c8['id']]});}else{return _0x4786aa(_0x29777c['error'](0x1f4,_0xd804('0x4d')));}});},'Agents':function(_0x442c61){return new Promise(function(_0x5e004d){var _0x5eefc8=_[_0xd804('0x4e')](_0x31b189[_0xd804('0x40')]);if(_0x442c61&&_0x442c61['id']){var _0xa8b18=_[_0xd804('0x4f')](_0x5eefc8,function(_0xdbb0d5){return _0xdbb0d5['id']===_0x442c61['id'];});_0x5e004d(_0xa8b18);}else{_0x5e004d({'count':_0x5eefc8[_0xd804('0x1c')],'rows':_0x5eefc8});}});},'ChatQueues':function(){return new Promise(function(_0x37aa4d){var _0x1f5e02=[];for(var _0xa6e3d2 in _0x31b189['chatQueues']){if(_0x31b189[_0xd804('0x50')][_0xd804('0x4a')](_0xa6e3d2)){var _0x2d5013=_0x31b189[_0xd804('0x50')][_0xa6e3d2];var _0x31e9eb={'id':_0x2d5013['id'],'available':_0x2d5013['available'],'loggedIn':_0x2d5013[_0xd804('0x51')],'name':_0x2d5013['name'],'paused':_0x2d5013[_0xd804('0x52')],'waiting':_0x2d5013[_0xd804('0x53')]};_0x1f5e02[_0xd804('0x22')](_0x31e9eb);}}_0x37aa4d({'count':_0x1f5e02[_0xd804('0x1c')],'rows':_0x1f5e02});});},'MailQueues':function(){return new Promise(function(_0x57627a){var _0x3a413d=[];for(var _0x27e25d in _0x31b189[_0xd804('0x54')]){if(_0x31b189[_0xd804('0x54')][_0xd804('0x4a')](_0x27e25d)){var _0x821f3f=_0x31b189[_0xd804('0x54')][_0x27e25d];var _0x2fffee={'id':_0x821f3f['id'],'available':_0x821f3f[_0xd804('0x55')],'loggedIn':_0x821f3f[_0xd804('0x51')],'name':_0x821f3f[_0xd804('0x56')],'paused':_0x821f3f[_0xd804('0x52')],'waiting':_0x821f3f[_0xd804('0x53')]};_0x3a413d[_0xd804('0x22')](_0x2fffee);}}_0x57627a({'count':_0x3a413d[_0xd804('0x1c')],'rows':_0x3a413d});});},'OpenchannelQueues':function(){return new Promise(function(_0x3fce66){var _0x439e5e=[];for(var _0xf99bed in _0x31b189[_0xd804('0x57')]){if(_0x31b189[_0xd804('0x57')]['hasOwnProperty'](_0xf99bed)){var _0x5293a3=_0x31b189[_0xd804('0x57')][_0xf99bed];var _0x1c9b7c={'id':_0x5293a3['id'],'available':_0x5293a3[_0xd804('0x55')],'loggedIn':_0x5293a3[_0xd804('0x51')],'name':_0x5293a3[_0xd804('0x56')],'paused':_0x5293a3[_0xd804('0x52')],'waiting':_0x5293a3[_0xd804('0x53')]};_0x439e5e['push'](_0x1c9b7c);}}_0x3fce66({'count':_0x439e5e[_0xd804('0x1c')],'rows':_0x439e5e});});},'SmsQueues':function(){return new Promise(function(_0x1056f3){var _0x4e8e0c=[];for(var _0x192dc8 in _0x31b189['smsQueues']){if(_0x31b189['smsQueues']['hasOwnProperty'](_0x192dc8)){var _0x2a80e2=_0x31b189[_0xd804('0x58')][_0x192dc8];var _0x134973={'id':_0x2a80e2['id'],'available':_0x2a80e2['available'],'loggedIn':_0x2a80e2[_0xd804('0x51')],'name':_0x2a80e2[_0xd804('0x56')],'paused':_0x2a80e2[_0xd804('0x52')],'waiting':_0x2a80e2['waiting']};_0x4e8e0c[_0xd804('0x22')](_0x134973);}}_0x1056f3({'count':_0x4e8e0c['length'],'rows':_0x4e8e0c});});},'FaxQueues':function(){return new Promise(function(_0x412c5b){var _0x1507aa=[];for(var _0x1b641a in _0x31b189[_0xd804('0x59')]){if(_0x31b189[_0xd804('0x59')]['hasOwnProperty'](_0x1b641a)){var _0x5bf18c=_0x31b189[_0xd804('0x59')][_0x1b641a];var _0x561f3f={'id':_0x5bf18c['id'],'available':_0x5bf18c['available'],'loggedIn':_0x5bf18c[_0xd804('0x51')],'name':_0x5bf18c[_0xd804('0x56')],'paused':_0x5bf18c['paused'],'waiting':_0x5bf18c[_0xd804('0x53')]};_0x1507aa[_0xd804('0x22')](_0x561f3f);}}_0x412c5b({'count':_0x1507aa['length'],'rows':_0x1507aa});});},'WhatsappQueues':function(){return new Promise(function(_0xca392b){var _0x45da24=[];for(var _0x3a8e12 in _0x31b189['whatsappQueues']){if(_0x31b189[_0xd804('0x5a')]['hasOwnProperty'](_0x3a8e12)){var _0x502b72=_0x31b189[_0xd804('0x5a')][_0x3a8e12];var _0x357b6e={'id':_0x502b72['id'],'available':_0x502b72[_0xd804('0x55')],'loggedIn':_0x502b72[_0xd804('0x51')],'name':_0x502b72[_0xd804('0x56')],'paused':_0x502b72[_0xd804('0x52')],'waiting':_0x502b72[_0xd804('0x53')]};_0x45da24[_0xd804('0x22')](_0x357b6e);}}_0xca392b({'count':_0x45da24[_0xd804('0x1c')],'rows':_0x45da24});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x15225c){var _0x624aad=_[_0xd804('0x4e')](_0x31b189[_0xd804('0x5b')]);_0x15225c({'count':_0x624aad[_0xd804('0x1c')],'rows':_0x624aad});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0xaf528f){var _0x464cf3=_['values'](_0x31b189['mailQueuesWaitingInteractions']);_0xaf528f({'count':_0x464cf3[_0xd804('0x1c')],'rows':_0x464cf3});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x21af3d){var _0x5a4a59=_['values'](_0x31b189[_0xd804('0x5c')]);_0x21af3d({'count':_0x5a4a59[_0xd804('0x1c')],'rows':_0x5a4a59});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x4f6794){var _0xf7770e=_[_0xd804('0x4e')](_0x31b189['smsQueuesWaitingInteractions']);_0x4f6794({'count':_0xf7770e['length'],'rows':_0xf7770e});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x583b08){var _0x45d779=_['values'](_0x31b189[_0xd804('0x5d')]);_0x583b08({'count':_0x45d779[_0xd804('0x1c')],'rows':_0x45d779});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x5d28d6){var _0x105a37=_['values'](_0x31b189[_0xd804('0x5e')]);_0x5d28d6({'count':_0x105a37[_0xd804('0x1c')],'rows':_0x105a37});});}};var _0x1a1a2d=jayson[_0xd804('0x5f')](_0x12359a)[_0xd804('0x60')]();_0x1a1a2d['on'](_0xd804('0x3c'),function(_0xffde80){logger[_0xd804('0x3c')](JSON[_0xd804('0x39')](_0xffde80));return _0x1f8142(_0xffde80);});_0x1a1a2d[_0xd804('0x61')](0x232c,_0xd804('0x62'),function(){console[_0xd804('0x63')](_0xd804('0x64'),0x232c);return _0xcec83('RPC\x20listening\x20on\x20port:'+0x232c);});});};
\ No newline at end of file