Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / server / services / routing / server / index.js
index 8f5ded6..78e9f4d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbf4f=['dialogflow','dialogflowv2','amazonlex','TagId','%s:%s:%s','./interval','intervals','consequence','priority','on\x20interval','\x20|\x20','error','rules','execute','info','Applications\x20executed','stringify','matchPath','emit','complete','stack','routing\x20is\x20empty','channel','end','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','agent','agents','busy','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','values','chatQueues','loggedIn','waiting','mailQueues','available','name','paused','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','listen','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','util','path','jayson/promise','bluebird','uuid','../../../config/environment','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','%s.%s.%s','isNil','IntervalId','Intervals','interval','message','interaction','length','applications','existsSync','join','app','.js','appdata','split','push','slice'];(function(_0xaa0c67,_0x3e63cb){var _0x34034f=function(_0x1dfa5a){while(--_0x1dfa5a){_0xaa0c67['push'](_0xaa0c67['shift']());}};_0x34034f(++_0x3e63cb);}(_0xbf4f,0x98));var _0xfbf4=function(_0xcc05ed,_0x44eb83){_0xcc05ed=_0xcc05ed-0x0;var _0x24a2f5=_0xbf4f[_0xcc05ed];return _0x24a2f5;};'use strict';var _=require('lodash');var util=require(_0xfbf4('0x0'));var path=require(_0xfbf4('0x1'));var fs=require('fs');var jayson=require(_0xfbf4('0x2'));var BPromise=require(_0xfbf4('0x3'));var uuid=require(_0xfbf4('0x4'));var config=require(_0xfbf4('0x5'));var logger=require(_0xfbf4('0x6'))(_0xfbf4('0x7'));var rpc={'openchannelQueueReport':require(_0xfbf4('0x8')),'mailQueueReport':require(_0xfbf4('0x9')),'chatQueueReport':require(_0xfbf4('0xa')),'smsQueueReport':require(_0xfbf4('0xb')),'faxQueueReport':require('../rpc/faxQueueReport'),'whatsappQueueReport':require(_0xfbf4('0xc'))};var RuleEngine=require(_0xfbf4('0xd'));function getId(_0x5a4a99,_0x5ce72f,_0x5cfb6e){return util[_0xfbf4('0xe')](_0xfbf4('0xf'),_0x5a4a99,_0x5ce72f||0x0,_0x5cfb6e||0x0);}function getIntervals(_0x2f2656,_0x43b640){var _0x1d18b1=[];if(!_[_0xfbf4('0x10')](_0x43b640[_0xfbf4('0x11')])&&!_['isNil'](_0x2f2656[_0x43b640['IntervalId']])&&!_[_0xfbf4('0x10')](_0x2f2656[_0x43b640[_0xfbf4('0x11')]][_0xfbf4('0x12')])){_0x1d18b1=_['map'](_0x2f2656[_0x43b640['IntervalId']][_0xfbf4('0x12')],_0xfbf4('0x13'));}else if(!_['isNil'](_0x43b640['interval'])){_0x1d18b1=[_0x43b640[_0xfbf4('0x13')]];}return _0x1d18b1;}exports['listen']=function(_0xc2cf41){_0xc2cf41['rules']={};return new BPromise(function(_0x46daba,_0xf5f23){var _0x43e1e3={'Start':function(_0x51fcc5){var _0x3225cd=this;return new Promise(function(_0x55f7d8,_0x2f1fda){if(_0x51fcc5){try{var _0x18a786=[];var _0x4b421d=getId(_0x51fcc5['channel'],_0x51fcc5[_0xfbf4('0x14')]?_0x51fcc5[_0xfbf4('0x14')]['id']:0x0,_0x51fcc5['interaction']?_0x51fcc5[_0xfbf4('0x15')]['id']:0x0);if(_0x51fcc5['applications']&&_['isArray'](_0x51fcc5['applications'])&&_0x51fcc5['applications'][_0xfbf4('0x16')]){for(var _0x23e644=0x0;_0x23e644<_0x51fcc5[_0xfbf4('0x17')][_0xfbf4('0x16')];_0x23e644+=0x1){var _0x5b83e4=_0x51fcc5[_0xfbf4('0x17')][_0x23e644];if(fs[_0xfbf4('0x18')](path[_0xfbf4('0x19')](__dirname,'applications',_0x5b83e4[_0xfbf4('0x1a')]+_0xfbf4('0x1b')))){var _0x158f07=[];switch(_0x5b83e4[_0xfbf4('0x1a')]['toLowerCase']()){case'autoreply':var _0x3066e1=_0x5b83e4[_0xfbf4('0x1c')][_0xfbf4('0x1d')](',');_0x158f07[_0xfbf4('0x1e')](_0x3066e1[0x0]);_0x158f07[_0xfbf4('0x1e')](_0x3066e1[_0xfbf4('0x1f')](0x1,_0x3066e1[_0xfbf4('0x16')])['join'](','));break;case _0xfbf4('0x20'):var _0xb68edb=_0x5b83e4[_0xfbf4('0x1c')]['split'](',');_0x158f07[_0xfbf4('0x1e')](_0xb68edb[0x0]);_0x158f07[_0xfbf4('0x1e')](_0xb68edb[0x1]);_0x158f07[_0xfbf4('0x1e')](_0xb68edb[_0xfbf4('0x1f')](0x2,_0xb68edb[_0xfbf4('0x16')])[_0xfbf4('0x19')](','));break;case _0xfbf4('0x21'):var _0x22c675=_0x5b83e4[_0xfbf4('0x1c')][_0xfbf4('0x1d')](',');_0x158f07[_0xfbf4('0x1e')](_0x22c675[0x0]);_0x158f07[_0xfbf4('0x1e')](_0x22c675[0x1]);_0x158f07[_0xfbf4('0x1e')](_0x22c675[0x2]);_0x158f07['push'](_0x22c675[0x3]);_0x158f07[_0xfbf4('0x1e')](_0x22c675[_0xfbf4('0x1f')](0x4,_0x22c675[_0xfbf4('0x16')])[_0xfbf4('0x19')](','));break;case _0xfbf4('0x22'):var _0xa45909=_0x5b83e4[_0xfbf4('0x1c')][_0xfbf4('0x1d')](',');_0x158f07[_0xfbf4('0x1e')](_0xa45909[0x0]);_0x158f07['push'](_0xa45909[0x1]);_0x158f07['push'](_0xa45909[0x2]);_0x158f07[_0xfbf4('0x1e')](_0xa45909[0x3]);_0x158f07[_0xfbf4('0x1e')](_0xa45909[_0xfbf4('0x1f')](0x4,_0xa45909[_0xfbf4('0x16')])[_0xfbf4('0x19')](','));break;case _0xfbf4('0x14'):_0x158f07['push'](_0x5b83e4[_0xfbf4('0x1c')]);break;case'tag':_0x158f07[_0xfbf4('0x1e')](_0x5b83e4[_0xfbf4('0x23')]);_0x158f07[_0xfbf4('0x1e')](_0x5b83e4[_0xfbf4('0x1c')]);break;default:_0x158f07=_['isNil'](_0x5b83e4[_0xfbf4('0x1c')])?[]:_0x5b83e4['appdata']['split'](',');}var _0xd54950={'id':util[_0xfbf4('0xe')](_0xfbf4('0x24'),_0x4b421d,_0x5b83e4['id'],_0x5b83e4['app']),'condition':require(_0xfbf4('0x25'))['condition'](_0x4b421d,getIntervals(_0xc2cf41[_0xfbf4('0x26')],_0x5b83e4),_0xc2cf41),'consequence':require('./applications/'+_0x5b83e4[_0xfbf4('0x1a')])[_0xfbf4('0x27')](_0x4b421d,_0x158f07,_0xc2cf41,_0x51fcc5),'p':_0x5b83e4[_0xfbf4('0x28')]||0x0};logger['info']('Push\x20new\x20rule',_0xd54950['id'],_0xfbf4('0x29'),getIntervals(_0xc2cf41[_0xfbf4('0x26')],_0x5b83e4)[_0xfbf4('0x19')](_0xfbf4('0x2a')));_0x18a786[_0xfbf4('0x1e')](_0xd54950);}else{logger[_0xfbf4('0x2b')]('Please\x20create\x20a\x20new\x20file\x20under',path[_0xfbf4('0x19')](__dirname,_0xfbf4('0x17'),_0x5b83e4['app']+'.js'));}}_0xc2cf41[_0xfbf4('0x2c')][_0x4b421d]=new RuleEngine(_0x18a786);_0xc2cf41[_0xfbf4('0x2c')][_0x4b421d][_0xfbf4('0x2d')](_0x51fcc5,function(_0x27f5d0){logger[_0xfbf4('0x2e')](_0xfbf4('0x2f'),JSON[_0xfbf4('0x30')](_0x27f5d0[_0xfbf4('0x31')]));if(_0xc2cf41[_0xfbf4('0x2c')][_0x4b421d]){_0xc2cf41[_0xfbf4('0x2c')][_0x4b421d][_0xfbf4('0x32')](_0xfbf4('0x33'));}});return _0x55f7d8({'code':0xc8,'message':_0x51fcc5});}else{logger[_0xfbf4('0x2e')]('No\x20applications\x20to\x20execute');return _0x55f7d8({'code':0xc8,'message':_0x51fcc5});}}catch(_0x44a284){logger['error'](_0x44a284[_0xfbf4('0x34')]);return _0x2f1fda(_0x3225cd['error'](0x1f4,_0x44a284));}}return _0x2f1fda(_0xfbf4('0x35'));});},'AcceptMessage':function(_0x596465){var _0xd789fb=this;return new Promise(function(_0x356b4c,_0x4b851f){if(_0x596465[_0xfbf4('0x14')]&&_0x596465['message']['id']){try{var _0x160959=getId(_0x596465[_0xfbf4('0x36')],_0x596465[_0xfbf4('0x14')]?_0x596465[_0xfbf4('0x14')]['id']:0x0,_0x596465[_0xfbf4('0x15')]?_0x596465[_0xfbf4('0x15')]['id']:0x0);if(_0xc2cf41['rules'][_0x160959]){_0xc2cf41[_0xfbf4('0x2c')][_0x160959][_0xfbf4('0x32')](_0xfbf4('0x37'));if(rpc[_0x596465[_0xfbf4('0x36')]+_0xfbf4('0x38')]){rpc[_0x596465[_0xfbf4('0x36')]+_0xfbf4('0x38')][_0xfbf4('0x39')](_0x160959,{'UserId':_0x596465[_0xfbf4('0x14')][_0xfbf4('0x3a')]})[_0xfbf4('0x3b')](function(_0x18aeb0){logger[_0xfbf4('0x2b')](_0xfbf4('0x3c'));});}}return _0x356b4c({'code':0xc8,'message':_0x596465});}catch(_0x4ed334){logger[_0xfbf4('0x2b')](_0x4ed334['stack']);return _0x4b851f(_0xd789fb[_0xfbf4('0x2b')](0x1f4,_0x4ed334));}}logger[_0xfbf4('0x2b')](_0xfbf4('0x3d'));return _0x4b851f(_0xd789fb['error'](0x1f4,'message\x20is\x20empty'));});},'RejectMessage':function(_0x490f25){var _0x5d7c87=this;return new Promise(function(_0x305e10,_0x588daf){if(_0x490f25[_0xfbf4('0x3e')]&&_0x490f25[_0xfbf4('0x3e')]['id']){try{if(_0xc2cf41[_0xfbf4('0x3f')][_0x490f25[_0xfbf4('0x3e')]['id']]){_0xc2cf41['agents'][_0x490f25[_0xfbf4('0x3e')]['id']][_0xfbf4('0x40')]=![];_0xc2cf41[_0xfbf4('0x3f')][_0x490f25['agent']['id']]['busyQueue']=undefined;}return _0x305e10({'code':0xc8,'message':_0x490f25});}catch(_0x30bd66){logger[_0xfbf4('0x2b')](_0x30bd66[_0xfbf4('0x34')]);return _0x588daf(_0x5d7c87[_0xfbf4('0x2b')](0x1f4,_0x30bd66));}}logger['error']('message\x20is\x20empty');return _0x588daf(_0x5d7c87[_0xfbf4('0x2b')](0x1f4,_0xfbf4('0x3d')));});},'AbandonInteraction':function(_0x1908ac){var _0x3aaa76=this;return new Promise(function(_0x3e3196,_0x502b7a){if(_0x1908ac[_0xfbf4('0x36')]&&_0x1908ac['interaction']&&_0x1908ac[_0xfbf4('0x15')]['id']){try{var _0x33147e=getId(_0x1908ac[_0xfbf4('0x36')],_0x1908ac[_0xfbf4('0x14')]?_0x1908ac[_0xfbf4('0x14')]['id']:0x0,_0x1908ac[_0xfbf4('0x15')]?_0x1908ac[_0xfbf4('0x15')]['id']:0x0);if(_0xc2cf41[_0xfbf4('0x2c')][_0x33147e]){_0xc2cf41[_0xfbf4('0x2c')][_0x33147e][_0xfbf4('0x32')](_0xfbf4('0x37'));}return _0x3e3196({'code':0xc8,'message':_0x1908ac});}catch(_0x1ab2d2){logger[_0xfbf4('0x2b')](_0x1ab2d2[_0xfbf4('0x34')]);return _0x502b7a(_0x3aaa76['error'](0x1f4,_0x1ab2d2));}}logger[_0xfbf4('0x2b')]('message\x20is\x20empty');return _0x502b7a(_0x3aaa76[_0xfbf4('0x2b')](0x1f4,_0xfbf4('0x3d')));});},'AgentCapacity':function(_0x5258d7){var _0x26bd7e=this;return new Promise(function(_0x4a42d8,_0x55cc04){if(_0xc2cf41[_0xfbf4('0x3f')][_0xfbf4('0x41')](_0x5258d7['id'])){for(var _0x9690cb in _0x5258d7['capacity']){if(_0x5258d7[_0xfbf4('0x42')][_0xfbf4('0x41')](_0x9690cb)){if(_0xc2cf41[_0xfbf4('0x3f')][_0x5258d7['id']]['hasOwnProperty'](_0x9690cb+_0xfbf4('0x43'))){_0xc2cf41[_0xfbf4('0x3f')][_0x5258d7['id']][_0x9690cb+'CurrentCapacity']=parseInt(_0x5258d7[_0xfbf4('0x42')][_0x9690cb],0xa);}}}_0xc2cf41[_0xfbf4('0x3f')][_0x5258d7['id']][_0xfbf4('0x44')]();return _0x4a42d8({'code':0xc8,'message':_0xc2cf41['agents'][_0x5258d7['id']]});}else{return _0x55cc04(_0x26bd7e[_0xfbf4('0x2b')](0x1f4,'agent\x20not\x20found'));}});},'Agents':function(_0x6caa4b){return new Promise(function(_0x4c6b3b,_0x4abdb0){var _0xc013e5=_[_0xfbf4('0x45')](_0xc2cf41['agents']);_0x4c6b3b({'count':_0xc013e5[_0xfbf4('0x16')],'rows':_0xc013e5});});},'ChatQueues':function(_0x4cd7e4){return new Promise(function(_0x281d1e,_0x333e6f){var _0x8a7cc9=[];for(var _0xc235d0 in _0xc2cf41['chatQueues']){if(_0xc2cf41[_0xfbf4('0x46')][_0xfbf4('0x41')](_0xc235d0)){var _0x3fc195=_0xc2cf41[_0xfbf4('0x46')][_0xc235d0];var _0x4f3bd9={'id':_0x3fc195['id'],'available':_0x3fc195['available'],'loggedIn':_0x3fc195[_0xfbf4('0x47')],'name':_0x3fc195['name'],'paused':_0x3fc195['paused'],'waiting':_0x3fc195[_0xfbf4('0x48')]};_0x8a7cc9[_0xfbf4('0x1e')](_0x4f3bd9);}}_0x281d1e({'count':_0x8a7cc9[_0xfbf4('0x16')],'rows':_0x8a7cc9});});},'MailQueues':function(_0x48b1c5){return new Promise(function(_0xdad4ae,_0x480a58){var _0x4da0bc=[];for(var _0x5ce8a6 in _0xc2cf41[_0xfbf4('0x49')]){if(_0xc2cf41['mailQueues'][_0xfbf4('0x41')](_0x5ce8a6)){var _0x29b09f=_0xc2cf41[_0xfbf4('0x49')][_0x5ce8a6];var _0x1b6505={'id':_0x29b09f['id'],'available':_0x29b09f[_0xfbf4('0x4a')],'loggedIn':_0x29b09f[_0xfbf4('0x47')],'name':_0x29b09f[_0xfbf4('0x4b')],'paused':_0x29b09f[_0xfbf4('0x4c')],'waiting':_0x29b09f[_0xfbf4('0x48')]};_0x4da0bc[_0xfbf4('0x1e')](_0x1b6505);}}_0xdad4ae({'count':_0x4da0bc[_0xfbf4('0x16')],'rows':_0x4da0bc});});},'OpenchannelQueues':function(_0x1caee2){return new Promise(function(_0x3345ec,_0x3d9228){var _0x48a08e=[];for(var _0xb68163 in _0xc2cf41[_0xfbf4('0x4d')]){if(_0xc2cf41[_0xfbf4('0x4d')][_0xfbf4('0x41')](_0xb68163)){var _0x33d5c3=_0xc2cf41['openchannelQueues'][_0xb68163];var _0x58509a={'id':_0x33d5c3['id'],'available':_0x33d5c3[_0xfbf4('0x4a')],'loggedIn':_0x33d5c3[_0xfbf4('0x47')],'name':_0x33d5c3[_0xfbf4('0x4b')],'paused':_0x33d5c3[_0xfbf4('0x4c')],'waiting':_0x33d5c3[_0xfbf4('0x48')]};_0x48a08e[_0xfbf4('0x1e')](_0x58509a);}}_0x3345ec({'count':_0x48a08e[_0xfbf4('0x16')],'rows':_0x48a08e});});},'SmsQueues':function(_0x38a28f){return new Promise(function(_0x18dd99,_0x2f5e2e){var _0x175ac5=[];for(var _0x15dbca in _0xc2cf41['smsQueues']){if(_0xc2cf41[_0xfbf4('0x4e')][_0xfbf4('0x41')](_0x15dbca)){var _0x1d5de5=_0xc2cf41['smsQueues'][_0x15dbca];var _0x3f388c={'id':_0x1d5de5['id'],'available':_0x1d5de5['available'],'loggedIn':_0x1d5de5[_0xfbf4('0x47')],'name':_0x1d5de5[_0xfbf4('0x4b')],'paused':_0x1d5de5[_0xfbf4('0x4c')],'waiting':_0x1d5de5[_0xfbf4('0x48')]};_0x175ac5[_0xfbf4('0x1e')](_0x3f388c);}}_0x18dd99({'count':_0x175ac5[_0xfbf4('0x16')],'rows':_0x175ac5});});},'FaxQueues':function(_0x131ff0){return new Promise(function(_0x244d92,_0x2773ef){var _0x330332=[];for(var _0x7b2ec0 in _0xc2cf41[_0xfbf4('0x4f')]){if(_0xc2cf41[_0xfbf4('0x4f')]['hasOwnProperty'](_0x7b2ec0)){var _0x3fc519=_0xc2cf41['faxQueues'][_0x7b2ec0];var _0x168696={'id':_0x3fc519['id'],'available':_0x3fc519[_0xfbf4('0x4a')],'loggedIn':_0x3fc519[_0xfbf4('0x47')],'name':_0x3fc519[_0xfbf4('0x4b')],'paused':_0x3fc519[_0xfbf4('0x4c')],'waiting':_0x3fc519[_0xfbf4('0x48')]};_0x330332[_0xfbf4('0x1e')](_0x168696);}}_0x244d92({'count':_0x330332[_0xfbf4('0x16')],'rows':_0x330332});});},'WhatsappQueues':function(_0x5dbc48){return new Promise(function(_0x431cb2,_0x9a69e7){var _0x215f9d=[];for(var _0x91e745 in _0xc2cf41['whatsappQueues']){if(_0xc2cf41[_0xfbf4('0x50')][_0xfbf4('0x41')](_0x91e745)){var _0x3876cf=_0xc2cf41['whatsappQueues'][_0x91e745];var _0x158b5c={'id':_0x3876cf['id'],'available':_0x3876cf[_0xfbf4('0x4a')],'loggedIn':_0x3876cf[_0xfbf4('0x47')],'name':_0x3876cf['name'],'paused':_0x3876cf[_0xfbf4('0x4c')],'waiting':_0x3876cf[_0xfbf4('0x48')]};_0x215f9d[_0xfbf4('0x1e')](_0x158b5c);}}_0x431cb2({'count':_0x215f9d['length'],'rows':_0x215f9d});});},'ChatQueuesWaitingInteractions':function(_0x58aa7f){return new Promise(function(_0x241405,_0x56e18e){var _0x542654=_[_0xfbf4('0x45')](_0xc2cf41[_0xfbf4('0x51')]);_0x241405({'count':_0x542654[_0xfbf4('0x16')],'rows':_0x542654});});},'MailQueuesWaitingInteractions':function(_0x352fe4){return new Promise(function(_0x3c341f,_0x12805e){var _0x32593d=_[_0xfbf4('0x45')](_0xc2cf41['mailQueuesWaitingInteractions']);_0x3c341f({'count':_0x32593d[_0xfbf4('0x16')],'rows':_0x32593d});});},'OpenchannelQueuesWaitingInteractions':function(_0x106f44){return new Promise(function(_0x5756d7,_0x5ca0f2){var _0x150b57=_[_0xfbf4('0x45')](_0xc2cf41[_0xfbf4('0x52')]);_0x5756d7({'count':_0x150b57[_0xfbf4('0x16')],'rows':_0x150b57});});},'SmsQueuesWaitingInteractions':function(_0x4fb260){return new Promise(function(_0x49971d,_0xc71a35){var _0x222dc3=_['values'](_0xc2cf41[_0xfbf4('0x53')]);_0x49971d({'count':_0x222dc3[_0xfbf4('0x16')],'rows':_0x222dc3});});},'FaxQueuesWaitingInteractions':function(_0xe5a996){return new Promise(function(_0x354c3b,_0xa72328){var _0x15b190=_['values'](_0xc2cf41[_0xfbf4('0x54')]);_0x354c3b({'count':_0x15b190[_0xfbf4('0x16')],'rows':_0x15b190});});},'WhatsappQueuesWaitingInteractions':function(_0x15598c){return new Promise(function(_0x400d2f,_0x4291be){var _0x2053f8=_[_0xfbf4('0x45')](_0xc2cf41[_0xfbf4('0x55')]);_0x400d2f({'count':_0x2053f8[_0xfbf4('0x16')],'rows':_0x2053f8});});}};var _0x3a4634=jayson[_0xfbf4('0x56')](_0x43e1e3)[_0xfbf4('0x57')]();_0x3a4634['on'](_0xfbf4('0x2b'),function(_0x34871f){logger['error'](JSON['stringify'](_0x34871f));return _0xf5f23(_0x34871f);});_0x3a4634[_0xfbf4('0x58')](0x232c,'127.0.0.1',function(){console[_0xfbf4('0x59')](_0xfbf4('0x5a'),0x232c);return _0x46daba(_0xfbf4('0x5b')+0x232c);});});};
\ No newline at end of file
+var _0xa8bb=['update','UserId','error\x20update\x20queue\x20report','message\x20is\x20empty','busyQueue','stack','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','values','find','chatQueues','loggedIn','name','paused','waiting','mailQueues','available','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','stringify','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','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','%s.%s.%s','IntervalId','isNil','Intervals','map','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','isArray','applications','existsSync','join','app','.js','autoreply','split','mail','push','length','slice','dialogflow','appdata','dialogflowv2','tag','TagId','tvox','getMustacheRender','account','notificationTemplate','ChatWebsiteId','ContactId','%s:%s:%s','intervals','consequence','priority','info','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','Applications\x20executed','matchPath','emit','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','routing\x20is\x20empty','agent','agents','busy','end','QueueReport'];(function(_0x331015,_0x22ef37){var _0x40f12e=function(_0xa6390d){while(--_0xa6390d){_0x331015['push'](_0x331015['shift']());}};_0x40f12e(++_0x22ef37);}(_0xa8bb,0x1ce));var _0xba8b=function(_0x55b55f,_0x3a4fac){_0x55b55f=_0x55b55f-0x0;var _0x2f994d=_0xa8bb[_0x55b55f];return _0x2f994d;};'use strict';var _=require(_0xba8b('0x0'));var util=require(_0xba8b('0x1'));var path=require(_0xba8b('0x2'));var fs=require('fs');var jayson=require(_0xba8b('0x3'));var BPromise=require(_0xba8b('0x4'));var utils=require(_0xba8b('0x5'));var sUtils=require(_0xba8b('0x6'));var logger=require(_0xba8b('0x7'))(_0xba8b('0x8'));var rpc={'openchannelQueueReport':require(_0xba8b('0x9')),'mailQueueReport':require(_0xba8b('0xa')),'chatQueueReport':require(_0xba8b('0xb')),'smsQueueReport':require(_0xba8b('0xc')),'faxQueueReport':require(_0xba8b('0xd')),'whatsappQueueReport':require(_0xba8b('0xe'))};var RuleEngine=require(_0xba8b('0xf'));function getId(_0x4bcbf2,_0x37dd2f,_0x4e79aa){return util[_0xba8b('0x10')](_0xba8b('0x11'),_0x4bcbf2,_0x37dd2f||0x0,_0x4e79aa||0x0);}function getIntervals(_0x81b23f,_0xea1423){var _0xe028df=[];if(!_['isNil'](_0xea1423['IntervalId'])&&!_['isNil'](_0x81b23f[_0xea1423[_0xba8b('0x12')]])&&!_[_0xba8b('0x13')](_0x81b23f[_0xea1423['IntervalId']][_0xba8b('0x14')])){_0xe028df=_[_0xba8b('0x15')](_0x81b23f[_0xea1423[_0xba8b('0x12')]][_0xba8b('0x14')],_0xba8b('0x16'));}else if(!_['isNil'](_0xea1423[_0xba8b('0x16')])){_0xe028df=[_0xea1423[_0xba8b('0x16')]];}return _0xe028df;}exports[_0xba8b('0x17')]=function(_0x123545){_0x123545[_0xba8b('0x18')]={};return new BPromise(function(_0x15dabf,_0x20883e){var _0x430866={'Start':function(_0x46fee1){var _0x2a2a3e=this;return new Promise(function(_0x154a17,_0x443258){if(_0x46fee1){try{var _0x412b72=[];var _0x29e389=getId(_0x46fee1[_0xba8b('0x19')],_0x46fee1['message']?_0x46fee1[_0xba8b('0x1a')]['id']:0x0,_0x46fee1[_0xba8b('0x1b')]?_0x46fee1[_0xba8b('0x1b')]['id']:0x0);var _0x552d1e=sUtils[_0xba8b('0x1c')](_0x123545,_0x46fee1);if(!_0x552d1e&&_0x46fee1['applications']&&_[_0xba8b('0x1d')](_0x46fee1['applications'])&&_0x46fee1[_0xba8b('0x1e')]['length']){for(var _0x1e7da1=0x0;_0x1e7da1<_0x46fee1[_0xba8b('0x1e')]['length'];_0x1e7da1+=0x1){var _0x4d2408=_0x46fee1[_0xba8b('0x1e')][_0x1e7da1];if(fs[_0xba8b('0x1f')](path[_0xba8b('0x20')](__dirname,'applications',_0x4d2408[_0xba8b('0x21')]+_0xba8b('0x22')))){var _0xf3b8d8=[];switch(_0x4d2408[_0xba8b('0x21')]['toLowerCase']()){case _0xba8b('0x23'):var _0x3549db=_0x4d2408['appdata'][_0xba8b('0x24')](',');if(_0x46fee1['channel']===_0xba8b('0x25')){_0xf3b8d8[_0xba8b('0x26')](_0x3549db[0x0]);_0xf3b8d8['push'](_0x3549db[0x1]);_0xf3b8d8['push'](_0x3549db['slice'](0x2,_0x3549db[_0xba8b('0x27')])['join'](','));}else{_0xf3b8d8[_0xba8b('0x26')](_0x3549db[0x0]);_0xf3b8d8[_0xba8b('0x26')](_0x3549db[_0xba8b('0x28')](0x1,_0x3549db[_0xba8b('0x27')])['join'](','));}break;case _0xba8b('0x29'):var _0x337af7=_0x4d2408[_0xba8b('0x2a')][_0xba8b('0x24')](',');_0xf3b8d8[_0xba8b('0x26')](_0x337af7[0x0]);_0xf3b8d8['push'](_0x337af7[0x1]);_0xf3b8d8['push'](_0x337af7[_0xba8b('0x28')](0x2,_0x337af7['length'])[_0xba8b('0x20')](','));break;case _0xba8b('0x2b'):var _0x2dbf66=_0x4d2408[_0xba8b('0x2a')][_0xba8b('0x24')](',');_0xf3b8d8[_0xba8b('0x26')](_0x2dbf66[0x0]);_0xf3b8d8[_0xba8b('0x26')](_0x2dbf66[0x1]);_0xf3b8d8['push'](_0x2dbf66[0x2]);_0xf3b8d8[_0xba8b('0x26')](_0x2dbf66[0x3]);_0xf3b8d8[_0xba8b('0x26')](_0x2dbf66[_0xba8b('0x28')](0x4,_0x2dbf66[_0xba8b('0x27')])[_0xba8b('0x20')](','));break;case'amazonlex':var _0x2023dd=_0x4d2408['appdata']['split'](',');_0xf3b8d8[_0xba8b('0x26')](_0x2023dd[0x0]);_0xf3b8d8[_0xba8b('0x26')](_0x2023dd[0x1]);_0xf3b8d8[_0xba8b('0x26')](_0x2023dd[0x2]);_0xf3b8d8[_0xba8b('0x26')](_0x2023dd[0x3]);_0xf3b8d8[_0xba8b('0x26')](_0x2023dd['slice'](0x4,_0x2023dd[_0xba8b('0x27')])[_0xba8b('0x20')](','));break;case _0xba8b('0x1a'):_0xf3b8d8[_0xba8b('0x26')](_0x4d2408['appdata']);break;case _0xba8b('0x2c'):_0xf3b8d8['push'](_0x4d2408[_0xba8b('0x2d')]);_0xf3b8d8[_0xba8b('0x26')](_0x4d2408[_0xba8b('0x2a')]);break;case _0xba8b('0x2e'):var _0x5246f9=utils[_0xba8b('0x2f')](_0x46fee1[_0xba8b('0x30')][_0xba8b('0x31')],_0x46fee1);var _0x3c19dc=_0x4d2408[_0xba8b('0x2a')]['split'](',');_0xf3b8d8['push'](_0x3c19dc[0x0]);_0xf3b8d8['push'](_0x3c19dc[0x1]);_0xf3b8d8[_0xba8b('0x26')](_0x3c19dc[0x2]);_0xf3b8d8[_0xba8b('0x26')](_0x3c19dc[0x3]);_0xf3b8d8['push'](_0x3c19dc[0x4]);_0xf3b8d8['push'](_0x3c19dc[0x5]);_0xf3b8d8[_0xba8b('0x26')](_0x3c19dc[0x6]);_0xf3b8d8[_0xba8b('0x26')](_0x3c19dc[0x7]);_0xf3b8d8[_0xba8b('0x26')](_0x3c19dc[0x8]);_0xf3b8d8['push'](_0x3c19dc[0x9]);_0xf3b8d8[_0xba8b('0x26')](_0x3c19dc[0xa]);_0xf3b8d8[_0xba8b('0x26')](_0x46fee1[_0xba8b('0x1b')]['id']);_0xf3b8d8[_0xba8b('0x26')](_0x46fee1[_0xba8b('0x1a')]['id']);_0xf3b8d8['push'](_0x4d2408[_0xba8b('0x32')]);_0xf3b8d8[_0xba8b('0x26')](_0x46fee1[_0xba8b('0x1b')][_0xba8b('0x33')]);_0xf3b8d8[_0xba8b('0x26')](_0x46fee1['body']['body']);_0xf3b8d8[_0xba8b('0x26')](_0x5246f9);break;default:_0xf3b8d8=_[_0xba8b('0x13')](_0x4d2408[_0xba8b('0x2a')])?[]:_0x4d2408[_0xba8b('0x2a')][_0xba8b('0x24')](',');}var _0x29c7ce={'id':util[_0xba8b('0x10')](_0xba8b('0x34'),_0x29e389,_0x4d2408['id'],_0x4d2408[_0xba8b('0x21')]),'condition':require('./interval')['condition'](_0x29e389,getIntervals(_0x123545[_0xba8b('0x35')],_0x4d2408),_0x123545),'consequence':require('./applications/'+_0x4d2408[_0xba8b('0x21')])[_0xba8b('0x36')](_0x29e389,_0xf3b8d8,_0x123545,_0x46fee1),'p':_0x4d2408[_0xba8b('0x37')]||0x0};logger[_0xba8b('0x38')]('Push\x20new\x20rule',_0x29c7ce['id'],_0xba8b('0x39'),getIntervals(_0x123545[_0xba8b('0x35')],_0x4d2408)['join'](_0xba8b('0x3a')));_0x412b72[_0xba8b('0x26')](_0x29c7ce);}else{logger[_0xba8b('0x3b')](_0xba8b('0x3c'),path[_0xba8b('0x20')](__dirname,_0xba8b('0x1e'),_0x4d2408[_0xba8b('0x21')]+_0xba8b('0x22')));}}_0x123545[_0xba8b('0x18')][_0x29e389]=new RuleEngine(_0x412b72);_0x123545[_0xba8b('0x18')][_0x29e389][_0xba8b('0x3d')](_0x46fee1,function(_0x266e78){logger[_0xba8b('0x38')](_0xba8b('0x3e'),JSON['stringify'](_0x266e78[_0xba8b('0x3f')]));if(_0x123545[_0xba8b('0x18')][_0x29e389]){_0x123545[_0xba8b('0x18')][_0x29e389][_0xba8b('0x40')]('complete');}});return _0x154a17({'code':0xc8,'message':_0x46fee1});}else{if(_0x552d1e){logger[_0xba8b('0x38')](util[_0xba8b('0x10')](_0xba8b('0x41'),_0x29e389));}else{logger[_0xba8b('0x38')](_0xba8b('0x42'));}return _0x154a17({'code':0xc8,'message':_0x46fee1});}}catch(_0x52f9fc){logger[_0xba8b('0x3b')](_0x52f9fc['stack']);return _0x443258(_0x2a2a3e[_0xba8b('0x3b')](0x1f4,_0x52f9fc));}}return _0x443258(_0xba8b('0x43'));});},'AcceptMessage':function(_0x2212d2){var _0x459de9=this;return new Promise(function(_0x143f64,_0x2cdb3f){if(_0x2212d2[_0xba8b('0x44')]&&_0x2212d2[_0xba8b('0x44')]['id']){if(_0x123545[_0xba8b('0x45')][_0x2212d2[_0xba8b('0x44')]['id']]){_0x123545['agents'][_0x2212d2['agent']['id']][_0xba8b('0x46')]=![];_0x123545[_0xba8b('0x45')][_0x2212d2[_0xba8b('0x44')]['id']]['busyQueue']=undefined;}}if(_0x2212d2['message']&&_0x2212d2[_0xba8b('0x1a')]['id']){try{var _0x28369c=getId(_0x2212d2[_0xba8b('0x19')],_0x2212d2[_0xba8b('0x1a')]?_0x2212d2[_0xba8b('0x1a')]['id']:0x0,_0x2212d2[_0xba8b('0x1b')]?_0x2212d2['interaction']['id']:0x0);if(_0x123545['rules'][_0x28369c]){_0x123545['rules'][_0x28369c]['emit'](_0xba8b('0x47'));if(rpc[_0x2212d2['channel']+_0xba8b('0x48')]){rpc[_0x2212d2['channel']+_0xba8b('0x48')][_0xba8b('0x49')](_0x28369c,{'UserId':_0x2212d2[_0xba8b('0x1a')][_0xba8b('0x4a')]})['catch'](function(){logger[_0xba8b('0x3b')](_0xba8b('0x4b'));});}}return _0x143f64({'code':0xc8,'message':_0x2212d2});}catch(_0x119c72){logger['error'](_0x119c72['stack']);return _0x2cdb3f(_0x459de9[_0xba8b('0x3b')](0x1f4,_0x119c72));}}logger[_0xba8b('0x3b')]('message\x20is\x20empty');return _0x2cdb3f(_0x459de9[_0xba8b('0x3b')](0x1f4,_0xba8b('0x4c')));});},'RejectMessage':function(_0x5b1409){var _0x4f2ee3=this;return new Promise(function(_0x12c6b7,_0x11aea9){if(_0x5b1409[_0xba8b('0x44')]&&_0x5b1409[_0xba8b('0x44')]['id']){try{if(_0x123545[_0xba8b('0x45')][_0x5b1409['agent']['id']]){_0x123545[_0xba8b('0x45')][_0x5b1409[_0xba8b('0x44')]['id']][_0xba8b('0x46')]=![];_0x123545[_0xba8b('0x45')][_0x5b1409[_0xba8b('0x44')]['id']][_0xba8b('0x4d')]=undefined;}return _0x12c6b7({'code':0xc8,'message':_0x5b1409});}catch(_0x7a23e){logger[_0xba8b('0x3b')](_0x7a23e[_0xba8b('0x4e')]);return _0x11aea9(_0x4f2ee3[_0xba8b('0x3b')](0x1f4,_0x7a23e));}}logger[_0xba8b('0x3b')](_0xba8b('0x4c'));return _0x11aea9(_0x4f2ee3['error'](0x1f4,_0xba8b('0x4c')));});},'AbandonInteraction':function(_0x47562e){var _0x137df6=this;return new Promise(function(_0xd44f32,_0x23e1c9){if(_0x47562e[_0xba8b('0x19')]&&_0x47562e['interaction']&&_0x47562e[_0xba8b('0x1b')]['id']){try{var _0x354b86=getId(_0x47562e[_0xba8b('0x19')],_0x47562e[_0xba8b('0x1a')]?_0x47562e[_0xba8b('0x1a')]['id']:0x0,_0x47562e[_0xba8b('0x1b')]?_0x47562e[_0xba8b('0x1b')]['id']:0x0);if(_0x123545[_0xba8b('0x18')][_0x354b86]){_0x123545[_0xba8b('0x18')][_0x354b86][_0xba8b('0x40')]('end');}return _0xd44f32({'code':0xc8,'message':_0x47562e});}catch(_0x4affb6){logger[_0xba8b('0x3b')](_0x4affb6['stack']);return _0x23e1c9(_0x137df6['error'](0x1f4,_0x4affb6));}}logger[_0xba8b('0x3b')]('message\x20is\x20empty');return _0x23e1c9(_0x137df6[_0xba8b('0x3b')](0x1f4,'message\x20is\x20empty'));});},'AgentCapacity':function(_0x5069d1){var _0x39629e=this;return new Promise(function(_0x6fb35f,_0x31a718){if(_0x123545['agents'][_0xba8b('0x4f')](_0x5069d1['id'])){for(var _0x5897c1 in _0x5069d1[_0xba8b('0x50')]){if(_0x5069d1['capacity']['hasOwnProperty'](_0x5897c1)){if(_0x123545[_0xba8b('0x45')][_0x5069d1['id']][_0xba8b('0x4f')](_0x5897c1+_0xba8b('0x51'))){_0x123545[_0xba8b('0x45')][_0x5069d1['id']][_0x5897c1+_0xba8b('0x51')]=parseInt(_0x5069d1[_0xba8b('0x50')][_0x5897c1],0xa);}}}_0x123545[_0xba8b('0x45')][_0x5069d1['id']][_0xba8b('0x52')]();return _0x6fb35f({'code':0xc8,'message':_0x123545['agents'][_0x5069d1['id']]});}else{return _0x31a718(_0x39629e[_0xba8b('0x3b')](0x1f4,'agent\x20not\x20found'));}});},'Agents':function(_0x2319d5){return new Promise(function(_0x5aa00a){var _0x1ec52b=_[_0xba8b('0x53')](_0x123545[_0xba8b('0x45')]);if(_0x2319d5&&_0x2319d5['id']){var _0x29a696=_[_0xba8b('0x54')](_0x1ec52b,function(_0x5e7c61){return _0x5e7c61['id']===_0x2319d5['id'];});_0x5aa00a(_0x29a696);}else{_0x5aa00a({'count':_0x1ec52b[_0xba8b('0x27')],'rows':_0x1ec52b});}});},'ChatQueues':function(){return new Promise(function(_0x35244c){var _0x377bbf=[];for(var _0x205901 in _0x123545[_0xba8b('0x55')]){if(_0x123545['chatQueues'][_0xba8b('0x4f')](_0x205901)){var _0xc2c101=_0x123545[_0xba8b('0x55')][_0x205901];var _0x434e01={'id':_0xc2c101['id'],'available':_0xc2c101['available'],'loggedIn':_0xc2c101[_0xba8b('0x56')],'name':_0xc2c101[_0xba8b('0x57')],'paused':_0xc2c101[_0xba8b('0x58')],'waiting':_0xc2c101[_0xba8b('0x59')]};_0x377bbf[_0xba8b('0x26')](_0x434e01);}}_0x35244c({'count':_0x377bbf[_0xba8b('0x27')],'rows':_0x377bbf});});},'MailQueues':function(){return new Promise(function(_0x20911b){var _0x446bcf=[];for(var _0x4d4915 in _0x123545['mailQueues']){if(_0x123545[_0xba8b('0x5a')]['hasOwnProperty'](_0x4d4915)){var _0x331ce4=_0x123545[_0xba8b('0x5a')][_0x4d4915];var _0xd60a1f={'id':_0x331ce4['id'],'available':_0x331ce4[_0xba8b('0x5b')],'loggedIn':_0x331ce4[_0xba8b('0x56')],'name':_0x331ce4[_0xba8b('0x57')],'paused':_0x331ce4['paused'],'waiting':_0x331ce4['waiting']};_0x446bcf[_0xba8b('0x26')](_0xd60a1f);}}_0x20911b({'count':_0x446bcf[_0xba8b('0x27')],'rows':_0x446bcf});});},'OpenchannelQueues':function(){return new Promise(function(_0x36b5ab){var _0x24e89c=[];for(var _0x1729d4 in _0x123545[_0xba8b('0x5c')]){if(_0x123545['openchannelQueues'][_0xba8b('0x4f')](_0x1729d4)){var _0xc6f96b=_0x123545[_0xba8b('0x5c')][_0x1729d4];var _0x4a596b={'id':_0xc6f96b['id'],'available':_0xc6f96b[_0xba8b('0x5b')],'loggedIn':_0xc6f96b[_0xba8b('0x56')],'name':_0xc6f96b[_0xba8b('0x57')],'paused':_0xc6f96b[_0xba8b('0x58')],'waiting':_0xc6f96b[_0xba8b('0x59')]};_0x24e89c[_0xba8b('0x26')](_0x4a596b);}}_0x36b5ab({'count':_0x24e89c[_0xba8b('0x27')],'rows':_0x24e89c});});},'SmsQueues':function(){return new Promise(function(_0x67dd0e){var _0x21bee0=[];for(var _0x4e7eb7 in _0x123545[_0xba8b('0x5d')]){if(_0x123545['smsQueues']['hasOwnProperty'](_0x4e7eb7)){var _0x37efa7=_0x123545['smsQueues'][_0x4e7eb7];var _0x167759={'id':_0x37efa7['id'],'available':_0x37efa7[_0xba8b('0x5b')],'loggedIn':_0x37efa7[_0xba8b('0x56')],'name':_0x37efa7['name'],'paused':_0x37efa7['paused'],'waiting':_0x37efa7[_0xba8b('0x59')]};_0x21bee0[_0xba8b('0x26')](_0x167759);}}_0x67dd0e({'count':_0x21bee0['length'],'rows':_0x21bee0});});},'FaxQueues':function(){return new Promise(function(_0xfa03e0){var _0x1fa58b=[];for(var _0x2474ab in _0x123545['faxQueues']){if(_0x123545[_0xba8b('0x5e')][_0xba8b('0x4f')](_0x2474ab)){var _0x58f56e=_0x123545[_0xba8b('0x5e')][_0x2474ab];var _0x960d9a={'id':_0x58f56e['id'],'available':_0x58f56e[_0xba8b('0x5b')],'loggedIn':_0x58f56e[_0xba8b('0x56')],'name':_0x58f56e['name'],'paused':_0x58f56e[_0xba8b('0x58')],'waiting':_0x58f56e[_0xba8b('0x59')]};_0x1fa58b[_0xba8b('0x26')](_0x960d9a);}}_0xfa03e0({'count':_0x1fa58b[_0xba8b('0x27')],'rows':_0x1fa58b});});},'WhatsappQueues':function(){return new Promise(function(_0x295a6e){var _0x312129=[];for(var _0xb886ec in _0x123545[_0xba8b('0x5f')]){if(_0x123545['whatsappQueues'][_0xba8b('0x4f')](_0xb886ec)){var _0x20c0b9=_0x123545[_0xba8b('0x5f')][_0xb886ec];var _0x3e5775={'id':_0x20c0b9['id'],'available':_0x20c0b9[_0xba8b('0x5b')],'loggedIn':_0x20c0b9['loggedIn'],'name':_0x20c0b9[_0xba8b('0x57')],'paused':_0x20c0b9[_0xba8b('0x58')],'waiting':_0x20c0b9[_0xba8b('0x59')]};_0x312129[_0xba8b('0x26')](_0x3e5775);}}_0x295a6e({'count':_0x312129[_0xba8b('0x27')],'rows':_0x312129});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x4f237b){var _0x4b4a9b=_[_0xba8b('0x53')](_0x123545[_0xba8b('0x60')]);_0x4f237b({'count':_0x4b4a9b[_0xba8b('0x27')],'rows':_0x4b4a9b});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x23efe7){var _0x2af13e=_['values'](_0x123545[_0xba8b('0x61')]);_0x23efe7({'count':_0x2af13e[_0xba8b('0x27')],'rows':_0x2af13e});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x780083){var _0x7349fd=_[_0xba8b('0x53')](_0x123545['openchannelQueuesWaitingInteractions']);_0x780083({'count':_0x7349fd['length'],'rows':_0x7349fd});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x28f505){var _0x44386d=_['values'](_0x123545[_0xba8b('0x62')]);_0x28f505({'count':_0x44386d[_0xba8b('0x27')],'rows':_0x44386d});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x46ffb1){var _0x41f506=_['values'](_0x123545[_0xba8b('0x63')]);_0x46ffb1({'count':_0x41f506[_0xba8b('0x27')],'rows':_0x41f506});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x55373d){var _0x113985=_[_0xba8b('0x53')](_0x123545[_0xba8b('0x64')]);_0x55373d({'count':_0x113985[_0xba8b('0x27')],'rows':_0x113985});});}};var _0x156767=jayson[_0xba8b('0x65')](_0x430866)[_0xba8b('0x66')]();_0x156767['on']('error',function(_0x5b6065){logger[_0xba8b('0x3b')](JSON[_0xba8b('0x67')](_0x5b6065));return _0x20883e(_0x5b6065);});_0x156767[_0xba8b('0x17')](0x232c,_0xba8b('0x68'),function(){console[_0xba8b('0x69')](_0xba8b('0x6a'),0x232c);return _0x15dabf('RPC\x20listening\x20on\x20port:'+0x232c);});});};
\ No newline at end of file