Built motion from commit da617fac.|2.6.6
[motion2.git] / server / services / routing / server / index.js
index 10147fa..bdf9ec8 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 _0x9b87=['routing\x20is\x20empty','agent','agents','busyQueue','channel','end','QueueReport','error\x20update\x20queue\x20report','message\x20is\x20empty','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found','find','chatQueues','loggedIn','name','waiting','mailQueues','available','paused','openchannelQueues','smsQueues','faxQueues','whatsappQueues','values','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','127.0.0.1','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','bluebird','./applications/utils','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','IntervalId','isNil','Intervals','map','interval','listen','rules','message','interaction','applications','isArray','length','existsSync','join','app','.js','toLowerCase','autoreply','appdata','split','mail','push','slice','dialogflow','dialogflowv2','amazonlex','tag','tvox','getMustacheRender','account','ChatWebsiteId','format','%s:%s:%s','./interval','condition','intervals','./applications/','consequence','priority','Push\x20new\x20rule','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','info','Applications\x20executed','emit','complete','No\x20applications\x20to\x20execute','stack'];(function(_0x1a8eb0,_0x4380f4){var _0xec7ffc=function(_0x3ca41f){while(--_0x3ca41f){_0x1a8eb0['push'](_0x1a8eb0['shift']());}};_0xec7ffc(++_0x4380f4);}(_0x9b87,0x8e));var _0x79b8=function(_0x27bf93,_0x70e684){_0x27bf93=_0x27bf93-0x0;var _0x33f008=_0x9b87[_0x27bf93];return _0x33f008;};'use strict';var _=require(_0x79b8('0x0'));var util=require(_0x79b8('0x1'));var path=require(_0x79b8('0x2'));var fs=require('fs');var jayson=require(_0x79b8('0x3'));var BPromise=require(_0x79b8('0x4'));var utils=require(_0x79b8('0x5'));var logger=require(_0x79b8('0x6'))(_0x79b8('0x7'));var rpc={'openchannelQueueReport':require(_0x79b8('0x8')),'mailQueueReport':require(_0x79b8('0x9')),'chatQueueReport':require(_0x79b8('0xa')),'smsQueueReport':require(_0x79b8('0xb')),'faxQueueReport':require(_0x79b8('0xc')),'whatsappQueueReport':require(_0x79b8('0xd'))};var RuleEngine=require(_0x79b8('0xe'));function getId(_0xf5e0f2,_0x5e10fe,_0x4e0dd8){return util['format']('%s.%s.%s',_0xf5e0f2,_0x5e10fe||0x0,_0x4e0dd8||0x0);}function getIntervals(_0x1caae2,_0x317e29){var _0x2f3453=[];if(!_['isNil'](_0x317e29[_0x79b8('0xf')])&&!_[_0x79b8('0x10')](_0x1caae2[_0x317e29[_0x79b8('0xf')]])&&!_['isNil'](_0x1caae2[_0x317e29['IntervalId']][_0x79b8('0x11')])){_0x2f3453=_[_0x79b8('0x12')](_0x1caae2[_0x317e29[_0x79b8('0xf')]][_0x79b8('0x11')],_0x79b8('0x13'));}else if(!_[_0x79b8('0x10')](_0x317e29[_0x79b8('0x13')])){_0x2f3453=[_0x317e29[_0x79b8('0x13')]];}return _0x2f3453;}exports[_0x79b8('0x14')]=function(_0x1614fe){_0x1614fe[_0x79b8('0x15')]={};return new BPromise(function(_0x59e229,_0x150fb7){var _0x4d5cd7={'Start':function(_0x565b54){var _0x3142e9=this;return new Promise(function(_0x21aae0,_0x57a248){if(_0x565b54){try{var _0x5ddab5=[];var _0x3e3de3=getId(_0x565b54['channel'],_0x565b54['message']?_0x565b54[_0x79b8('0x16')]['id']:0x0,_0x565b54[_0x79b8('0x17')]?_0x565b54[_0x79b8('0x17')]['id']:0x0);if(_0x565b54[_0x79b8('0x18')]&&_[_0x79b8('0x19')](_0x565b54[_0x79b8('0x18')])&&_0x565b54['applications'][_0x79b8('0x1a')]){for(var _0x5bdfb9=0x0;_0x5bdfb9<_0x565b54['applications'][_0x79b8('0x1a')];_0x5bdfb9+=0x1){var _0x131d04=_0x565b54[_0x79b8('0x18')][_0x5bdfb9];if(fs[_0x79b8('0x1b')](path[_0x79b8('0x1c')](__dirname,_0x79b8('0x18'),_0x131d04[_0x79b8('0x1d')]+_0x79b8('0x1e')))){var _0x2e1a65=[];switch(_0x131d04['app'][_0x79b8('0x1f')]()){case _0x79b8('0x20'):var _0x4dbfcf=_0x131d04[_0x79b8('0x21')][_0x79b8('0x22')](',');if(_0x565b54['channel']===_0x79b8('0x23')){_0x2e1a65['push'](_0x4dbfcf[0x0]);_0x2e1a65['push'](_0x4dbfcf[0x1]);_0x2e1a65[_0x79b8('0x24')](_0x4dbfcf[_0x79b8('0x25')](0x2,_0x4dbfcf[_0x79b8('0x1a')])[_0x79b8('0x1c')](','));}else{_0x2e1a65[_0x79b8('0x24')](_0x4dbfcf[0x0]);_0x2e1a65['push'](_0x4dbfcf[_0x79b8('0x25')](0x1,_0x4dbfcf[_0x79b8('0x1a')])[_0x79b8('0x1c')](','));}break;case _0x79b8('0x26'):var _0x4bbbf8=_0x131d04[_0x79b8('0x21')][_0x79b8('0x22')](',');_0x2e1a65[_0x79b8('0x24')](_0x4bbbf8[0x0]);_0x2e1a65['push'](_0x4bbbf8[0x1]);_0x2e1a65[_0x79b8('0x24')](_0x4bbbf8[_0x79b8('0x25')](0x2,_0x4bbbf8[_0x79b8('0x1a')])[_0x79b8('0x1c')](','));break;case _0x79b8('0x27'):var _0x23483f=_0x131d04['appdata'][_0x79b8('0x22')](',');_0x2e1a65['push'](_0x23483f[0x0]);_0x2e1a65[_0x79b8('0x24')](_0x23483f[0x1]);_0x2e1a65['push'](_0x23483f[0x2]);_0x2e1a65[_0x79b8('0x24')](_0x23483f[0x3]);_0x2e1a65[_0x79b8('0x24')](_0x23483f[_0x79b8('0x25')](0x4,_0x23483f['length'])[_0x79b8('0x1c')](','));break;case _0x79b8('0x28'):var _0x252472=_0x131d04[_0x79b8('0x21')]['split'](',');_0x2e1a65[_0x79b8('0x24')](_0x252472[0x0]);_0x2e1a65['push'](_0x252472[0x1]);_0x2e1a65['push'](_0x252472[0x2]);_0x2e1a65[_0x79b8('0x24')](_0x252472[0x3]);_0x2e1a65[_0x79b8('0x24')](_0x252472['slice'](0x4,_0x252472[_0x79b8('0x1a')])['join'](','));break;case'message':_0x2e1a65[_0x79b8('0x24')](_0x131d04['appdata']);break;case _0x79b8('0x29'):_0x2e1a65[_0x79b8('0x24')](_0x131d04['TagId']);_0x2e1a65[_0x79b8('0x24')](_0x131d04[_0x79b8('0x21')]);break;case _0x79b8('0x2a'):var _0x1e5bd9=utils[_0x79b8('0x2b')](_0x565b54[_0x79b8('0x2c')]['notificationTemplate'],_0x565b54);var _0x2ed1a3=_0x131d04[_0x79b8('0x21')][_0x79b8('0x22')](',');_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x0]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x1]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x2]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x3]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x4]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x5]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x6]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x7]);_0x2e1a65['push'](_0x2ed1a3[0x8]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x9]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0xa]);_0x2e1a65[_0x79b8('0x24')](_0x565b54['interaction']['id']);_0x2e1a65[_0x79b8('0x24')](_0x565b54[_0x79b8('0x16')]['id']);_0x2e1a65[_0x79b8('0x24')](_0x131d04[_0x79b8('0x2d')]);_0x2e1a65[_0x79b8('0x24')](_0x565b54[_0x79b8('0x17')]['ContactId']);_0x2e1a65[_0x79b8('0x24')](_0x565b54['body']['body']);_0x2e1a65[_0x79b8('0x24')](_0x1e5bd9);break;default:_0x2e1a65=_['isNil'](_0x131d04['appdata'])?[]:_0x131d04[_0x79b8('0x21')][_0x79b8('0x22')](',');}var _0x422c56={'id':util[_0x79b8('0x2e')](_0x79b8('0x2f'),_0x3e3de3,_0x131d04['id'],_0x131d04[_0x79b8('0x1d')]),'condition':require(_0x79b8('0x30'))[_0x79b8('0x31')](_0x3e3de3,getIntervals(_0x1614fe[_0x79b8('0x32')],_0x131d04),_0x1614fe),'consequence':require(_0x79b8('0x33')+_0x131d04[_0x79b8('0x1d')])[_0x79b8('0x34')](_0x3e3de3,_0x2e1a65,_0x1614fe,_0x565b54),'p':_0x131d04[_0x79b8('0x35')]||0x0};logger['info'](_0x79b8('0x36'),_0x422c56['id'],_0x79b8('0x37'),getIntervals(_0x1614fe['intervals'],_0x131d04)[_0x79b8('0x1c')](_0x79b8('0x38')));_0x5ddab5['push'](_0x422c56);}else{logger[_0x79b8('0x39')](_0x79b8('0x3a'),path[_0x79b8('0x1c')](__dirname,_0x79b8('0x18'),_0x131d04[_0x79b8('0x1d')]+_0x79b8('0x1e')));}}_0x1614fe[_0x79b8('0x15')][_0x3e3de3]=new RuleEngine(_0x5ddab5);_0x1614fe[_0x79b8('0x15')][_0x3e3de3][_0x79b8('0x3b')](_0x565b54,function(_0x37ca43){logger[_0x79b8('0x3c')](_0x79b8('0x3d'),JSON['stringify'](_0x37ca43['matchPath']));if(_0x1614fe[_0x79b8('0x15')][_0x3e3de3]){_0x1614fe[_0x79b8('0x15')][_0x3e3de3][_0x79b8('0x3e')](_0x79b8('0x3f'));}});return _0x21aae0({'code':0xc8,'message':_0x565b54});}else{logger['info'](_0x79b8('0x40'));return _0x21aae0({'code':0xc8,'message':_0x565b54});}}catch(_0x45d7d7){logger[_0x79b8('0x39')](_0x45d7d7[_0x79b8('0x41')]);return _0x57a248(_0x3142e9['error'](0x1f4,_0x45d7d7));}}return _0x57a248(_0x79b8('0x42'));});},'AcceptMessage':function(_0xa52611){var _0x18176e=this;return new Promise(function(_0x24297e,_0x49d365){if(_0xa52611[_0x79b8('0x43')]&&_0xa52611[_0x79b8('0x43')]['id']){if(_0x1614fe[_0x79b8('0x44')][_0xa52611[_0x79b8('0x43')]['id']]){_0x1614fe[_0x79b8('0x44')][_0xa52611[_0x79b8('0x43')]['id']]['busy']=![];_0x1614fe[_0x79b8('0x44')][_0xa52611[_0x79b8('0x43')]['id']][_0x79b8('0x45')]=undefined;}}if(_0xa52611[_0x79b8('0x16')]&&_0xa52611['message']['id']){try{var _0x49ec63=getId(_0xa52611[_0x79b8('0x46')],_0xa52611[_0x79b8('0x16')]?_0xa52611[_0x79b8('0x16')]['id']:0x0,_0xa52611[_0x79b8('0x17')]?_0xa52611[_0x79b8('0x17')]['id']:0x0);if(_0x1614fe[_0x79b8('0x15')][_0x49ec63]){_0x1614fe[_0x79b8('0x15')][_0x49ec63][_0x79b8('0x3e')](_0x79b8('0x47'));if(rpc[_0xa52611['channel']+_0x79b8('0x48')]){rpc[_0xa52611[_0x79b8('0x46')]+_0x79b8('0x48')]['update'](_0x49ec63,{'UserId':_0xa52611[_0x79b8('0x16')]['UserId']})['catch'](function(){logger[_0x79b8('0x39')](_0x79b8('0x49'));});}}return _0x24297e({'code':0xc8,'message':_0xa52611});}catch(_0x5b4d56){logger[_0x79b8('0x39')](_0x5b4d56['stack']);return _0x49d365(_0x18176e['error'](0x1f4,_0x5b4d56));}}logger[_0x79b8('0x39')](_0x79b8('0x4a'));return _0x49d365(_0x18176e[_0x79b8('0x39')](0x1f4,_0x79b8('0x4a')));});},'RejectMessage':function(_0x2ff973){var _0xcfb9c2=this;return new Promise(function(_0x3f3ffc,_0x3d1078){if(_0x2ff973[_0x79b8('0x43')]&&_0x2ff973[_0x79b8('0x43')]['id']){try{if(_0x1614fe[_0x79b8('0x44')][_0x2ff973[_0x79b8('0x43')]['id']]){_0x1614fe[_0x79b8('0x44')][_0x2ff973[_0x79b8('0x43')]['id']]['busy']=![];_0x1614fe[_0x79b8('0x44')][_0x2ff973[_0x79b8('0x43')]['id']][_0x79b8('0x45')]=undefined;}return _0x3f3ffc({'code':0xc8,'message':_0x2ff973});}catch(_0x2bbe40){logger['error'](_0x2bbe40['stack']);return _0x3d1078(_0xcfb9c2[_0x79b8('0x39')](0x1f4,_0x2bbe40));}}logger[_0x79b8('0x39')](_0x79b8('0x4a'));return _0x3d1078(_0xcfb9c2[_0x79b8('0x39')](0x1f4,'message\x20is\x20empty'));});},'AbandonInteraction':function(_0x34e57f){var _0x2dd536=this;return new Promise(function(_0x58c737,_0x8e0f70){if(_0x34e57f[_0x79b8('0x46')]&&_0x34e57f[_0x79b8('0x17')]&&_0x34e57f['interaction']['id']){try{var _0x152a80=getId(_0x34e57f['channel'],_0x34e57f[_0x79b8('0x16')]?_0x34e57f[_0x79b8('0x16')]['id']:0x0,_0x34e57f[_0x79b8('0x17')]?_0x34e57f[_0x79b8('0x17')]['id']:0x0);if(_0x1614fe[_0x79b8('0x15')][_0x152a80]){_0x1614fe[_0x79b8('0x15')][_0x152a80][_0x79b8('0x3e')](_0x79b8('0x47'));}return _0x58c737({'code':0xc8,'message':_0x34e57f});}catch(_0xe0d55d){logger[_0x79b8('0x39')](_0xe0d55d['stack']);return _0x8e0f70(_0x2dd536[_0x79b8('0x39')](0x1f4,_0xe0d55d));}}logger['error'](_0x79b8('0x4a'));return _0x8e0f70(_0x2dd536['error'](0x1f4,_0x79b8('0x4a')));});},'AgentCapacity':function(_0x13a87f){var _0x4146b0=this;return new Promise(function(_0x20b2f3,_0x2fcd4e){if(_0x1614fe[_0x79b8('0x44')][_0x79b8('0x4b')](_0x13a87f['id'])){for(var _0x57d73d in _0x13a87f[_0x79b8('0x4c')]){if(_0x13a87f[_0x79b8('0x4c')][_0x79b8('0x4b')](_0x57d73d)){if(_0x1614fe[_0x79b8('0x44')][_0x13a87f['id']][_0x79b8('0x4b')](_0x57d73d+_0x79b8('0x4d'))){_0x1614fe['agents'][_0x13a87f['id']][_0x57d73d+_0x79b8('0x4d')]=parseInt(_0x13a87f[_0x79b8('0x4c')][_0x57d73d],0xa);}}}_0x1614fe['agents'][_0x13a87f['id']][_0x79b8('0x4e')]();return _0x20b2f3({'code':0xc8,'message':_0x1614fe['agents'][_0x13a87f['id']]});}else{return _0x2fcd4e(_0x4146b0[_0x79b8('0x39')](0x1f4,_0x79b8('0x4f')));}});},'Agents':function(_0x5bcdde){return new Promise(function(_0xecf12a){var _0x11c26a=_['values'](_0x1614fe[_0x79b8('0x44')]);if(_0x5bcdde&&_0x5bcdde['id']){var _0x4b197b=_[_0x79b8('0x50')](_0x11c26a,function(_0x5d2bfc){return _0x5d2bfc['id']===_0x5bcdde['id'];});_0xecf12a(_0x4b197b);}else{_0xecf12a({'count':_0x11c26a[_0x79b8('0x1a')],'rows':_0x11c26a});}});},'ChatQueues':function(){return new Promise(function(_0x1e101d){var _0x41f243=[];for(var _0x26722c in _0x1614fe[_0x79b8('0x51')]){if(_0x1614fe[_0x79b8('0x51')]['hasOwnProperty'](_0x26722c)){var _0x291ef1=_0x1614fe[_0x79b8('0x51')][_0x26722c];var _0x5c02a7={'id':_0x291ef1['id'],'available':_0x291ef1['available'],'loggedIn':_0x291ef1[_0x79b8('0x52')],'name':_0x291ef1[_0x79b8('0x53')],'paused':_0x291ef1['paused'],'waiting':_0x291ef1[_0x79b8('0x54')]};_0x41f243[_0x79b8('0x24')](_0x5c02a7);}}_0x1e101d({'count':_0x41f243[_0x79b8('0x1a')],'rows':_0x41f243});});},'MailQueues':function(){return new Promise(function(_0x57787f){var _0x1a15ac=[];for(var _0x1f98ea in _0x1614fe[_0x79b8('0x55')]){if(_0x1614fe[_0x79b8('0x55')][_0x79b8('0x4b')](_0x1f98ea)){var _0x441aad=_0x1614fe['mailQueues'][_0x1f98ea];var _0x33d1f6={'id':_0x441aad['id'],'available':_0x441aad[_0x79b8('0x56')],'loggedIn':_0x441aad[_0x79b8('0x52')],'name':_0x441aad['name'],'paused':_0x441aad[_0x79b8('0x57')],'waiting':_0x441aad[_0x79b8('0x54')]};_0x1a15ac[_0x79b8('0x24')](_0x33d1f6);}}_0x57787f({'count':_0x1a15ac['length'],'rows':_0x1a15ac});});},'OpenchannelQueues':function(){return new Promise(function(_0xfd5147){var _0x2e3b8c=[];for(var _0x4f47e9 in _0x1614fe['openchannelQueues']){if(_0x1614fe[_0x79b8('0x58')][_0x79b8('0x4b')](_0x4f47e9)){var _0x172532=_0x1614fe[_0x79b8('0x58')][_0x4f47e9];var _0xd39bc0={'id':_0x172532['id'],'available':_0x172532[_0x79b8('0x56')],'loggedIn':_0x172532[_0x79b8('0x52')],'name':_0x172532[_0x79b8('0x53')],'paused':_0x172532['paused'],'waiting':_0x172532[_0x79b8('0x54')]};_0x2e3b8c['push'](_0xd39bc0);}}_0xfd5147({'count':_0x2e3b8c['length'],'rows':_0x2e3b8c});});},'SmsQueues':function(){return new Promise(function(_0xbb092e){var _0x54e855=[];for(var _0x3cd784 in _0x1614fe[_0x79b8('0x59')]){if(_0x1614fe[_0x79b8('0x59')]['hasOwnProperty'](_0x3cd784)){var _0x7795d5=_0x1614fe[_0x79b8('0x59')][_0x3cd784];var _0xcd4ac5={'id':_0x7795d5['id'],'available':_0x7795d5[_0x79b8('0x56')],'loggedIn':_0x7795d5[_0x79b8('0x52')],'name':_0x7795d5[_0x79b8('0x53')],'paused':_0x7795d5[_0x79b8('0x57')],'waiting':_0x7795d5[_0x79b8('0x54')]};_0x54e855[_0x79b8('0x24')](_0xcd4ac5);}}_0xbb092e({'count':_0x54e855[_0x79b8('0x1a')],'rows':_0x54e855});});},'FaxQueues':function(){return new Promise(function(_0x3c6ad8){var _0x65f178=[];for(var _0x57c6e5 in _0x1614fe[_0x79b8('0x5a')]){if(_0x1614fe[_0x79b8('0x5a')][_0x79b8('0x4b')](_0x57c6e5)){var _0x2fda2d=_0x1614fe[_0x79b8('0x5a')][_0x57c6e5];var _0x39ef00={'id':_0x2fda2d['id'],'available':_0x2fda2d[_0x79b8('0x56')],'loggedIn':_0x2fda2d[_0x79b8('0x52')],'name':_0x2fda2d[_0x79b8('0x53')],'paused':_0x2fda2d[_0x79b8('0x57')],'waiting':_0x2fda2d[_0x79b8('0x54')]};_0x65f178['push'](_0x39ef00);}}_0x3c6ad8({'count':_0x65f178[_0x79b8('0x1a')],'rows':_0x65f178});});},'WhatsappQueues':function(){return new Promise(function(_0x4a8cd0){var _0x5b785b=[];for(var _0x211575 in _0x1614fe[_0x79b8('0x5b')]){if(_0x1614fe[_0x79b8('0x5b')][_0x79b8('0x4b')](_0x211575)){var _0x211c60=_0x1614fe[_0x79b8('0x5b')][_0x211575];var _0x233b9c={'id':_0x211c60['id'],'available':_0x211c60[_0x79b8('0x56')],'loggedIn':_0x211c60['loggedIn'],'name':_0x211c60['name'],'paused':_0x211c60['paused'],'waiting':_0x211c60[_0x79b8('0x54')]};_0x5b785b[_0x79b8('0x24')](_0x233b9c);}}_0x4a8cd0({'count':_0x5b785b[_0x79b8('0x1a')],'rows':_0x5b785b});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x722630){var _0x3bbb52=_[_0x79b8('0x5c')](_0x1614fe[_0x79b8('0x5d')]);_0x722630({'count':_0x3bbb52[_0x79b8('0x1a')],'rows':_0x3bbb52});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x397830){var _0x5c1ca=_[_0x79b8('0x5c')](_0x1614fe[_0x79b8('0x5e')]);_0x397830({'count':_0x5c1ca['length'],'rows':_0x5c1ca});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x1fbf40){var _0x439006=_['values'](_0x1614fe[_0x79b8('0x5f')]);_0x1fbf40({'count':_0x439006[_0x79b8('0x1a')],'rows':_0x439006});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x4208cc){var _0x371ecc=_[_0x79b8('0x5c')](_0x1614fe[_0x79b8('0x60')]);_0x4208cc({'count':_0x371ecc[_0x79b8('0x1a')],'rows':_0x371ecc});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x2c7eb4){var _0x5f4420=_['values'](_0x1614fe[_0x79b8('0x61')]);_0x2c7eb4({'count':_0x5f4420[_0x79b8('0x1a')],'rows':_0x5f4420});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x446735){var _0x1617af=_[_0x79b8('0x5c')](_0x1614fe[_0x79b8('0x62')]);_0x446735({'count':_0x1617af[_0x79b8('0x1a')],'rows':_0x1617af});});}};var _0x376fb8=jayson[_0x79b8('0x63')](_0x4d5cd7)[_0x79b8('0x64')]();_0x376fb8['on']('error',function(_0x56f946){logger['error'](JSON['stringify'](_0x56f946));return _0x150fb7(_0x56f946);});_0x376fb8[_0x79b8('0x14')](0x232c,_0x79b8('0x65'),function(){console['log'](_0x79b8('0x66'),0x232c);return _0x59e229(_0x79b8('0x67')+0x232c);});});};
\ No newline at end of file