1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x66ed=['./rpc/smsQueue','./rpc/mailQueue','./rpc/faxQueue','resolve','then','getAgents','initAgents','getIntervals','initIntervals','getOpenchannelQueues','initOpenchannelQueues','getChatQueues','initChatQueues','getSmsQueues','initSmsQueues','getMailQueues','initMailQueues','getFaxQueues','initFaxQueues','getWhatsappQueues','listen','catch','bluebird','./server','./realtime','./rpc/interval','./rpc/openchannelQueue','./rpc/chatQueue'];(function(_0x40aaa4,_0x3b22f4){var _0x4e21e5=function(_0x35d2f3){while(--_0x35d2f3){_0x40aaa4['push'](_0x40aaa4['shift']());}};_0x4e21e5(++_0x3b22f4);}(_0x66ed,0x6a));var _0xd66e=function(_0x3b980e,_0x367da0){_0x3b980e=_0x3b980e-0x0;var _0x3ebc96=_0x66ed[_0x3b980e];return _0x3ebc96;};'use strict';var BPromise=require(_0xd66e('0x0'));var server=require(_0xd66e('0x1'));var Realtime=require(_0xd66e('0x2'));var user=require('./rpc/user');var interval=require(_0xd66e('0x3'));var openchannelQueue=require(_0xd66e('0x4'));var chatQueue=require(_0xd66e('0x5'));var smsQueue=require(_0xd66e('0x6'));var mailQueue=require(_0xd66e('0x7'));var faxQueue=require(_0xd66e('0x8'));var whatsappQueue=require('./rpc/whatsappQueue');var realtime=new Realtime();function initRealtime(){return BPromise[_0xd66e('0x9')]()[_0xd66e('0xa')](user[_0xd66e('0xb')]())[_0xd66e('0xa')](realtime[_0xd66e('0xc')]())[_0xd66e('0xa')](interval[_0xd66e('0xd')]())[_0xd66e('0xa')](realtime[_0xd66e('0xe')]())[_0xd66e('0xa')](openchannelQueue[_0xd66e('0xf')]())[_0xd66e('0xa')](realtime[_0xd66e('0x10')]())[_0xd66e('0xa')](chatQueue[_0xd66e('0x11')]())[_0xd66e('0xa')](realtime[_0xd66e('0x12')]())[_0xd66e('0xa')](smsQueue[_0xd66e('0x13')]())[_0xd66e('0xa')](realtime[_0xd66e('0x14')]())['then'](mailQueue[_0xd66e('0x15')]())['then'](realtime[_0xd66e('0x16')]())[_0xd66e('0xa')](faxQueue[_0xd66e('0x17')]())['then'](realtime[_0xd66e('0x18')]())[_0xd66e('0xa')](whatsappQueue[_0xd66e('0x19')]())[_0xd66e('0xa')](realtime['initWhatsappQueues']())[_0xd66e('0xa')](function(){return realtime;});}function main(){return server[_0xd66e('0x1a')](realtime)[_0xd66e('0xa')](function(_0x98fad3){return initRealtime();})['then'](function(_0x2be2b4){return setInterval(initRealtime,0x1388);})[_0xd66e('0x1b')](function(_0x30b964){console['log'](_0x30b964);});}main();