Built motion from commit 4a18b36e645f5fa4a517d36f9783bde259878164. Version 3.0.0...
[motion-next.git] / server / services / routing / model / agent.js
index 08eaba3..c42967f 100644 (file)
@@ -1 +1 @@
-const a1165_0x7e41=['mailPause','busyQueue','Capacity','whatsappCurrentCapacity','user:save','stringify','getChannelStatus','whatsappStatus','toNumber','voicePause','openchannel','smsPause','mailCurrentCapacity','smsStatus','unknown','format','faxPause','smsStatusTime','length','openchannelStatusTime','updateRealtime','lodash','exports','whatsappStatusTime','md5','whatsapp','smsCapacity','faxCapacity','chatStatus','working','mailCapacity','chatPause','chatStatusTime','openchannelCapacity','openchannelStatus','whatsappCapacity','../../../rediscache','smsCurrentCapacity','maxcapacity','moment','Status','chatCurrentCapacity','name','StatusTime','online','mail','openchannelCurrentCapacity','faxCurrentCapacity','faxStatus','faxStatusTime','mailStatus','prototype','busy','chatCapacity','openchannelPause','sms'];(function(_0x581050,_0x7e4128){const _0x2f536d=function(_0x2ddfca){while(--_0x2ddfca){_0x581050['push'](_0x581050['shift']());}};_0x2f536d(++_0x7e4128);}(a1165_0x7e41,0x79));const a1165_0x2f53=function(_0x581050,_0x7e4128){_0x581050=_0x581050-0x0;let _0x2f536d=a1165_0x7e41[_0x581050];return _0x2f536d;};const _0x43ce14=a1165_0x2f53;'use strict';const _=require(_0x43ce14('0xc')),moment=require(_0x43ce14('0x1e')),md5=require(_0x43ce14('0xf')),{getSocket}=require(_0x43ce14('0x1b')),io=getSocket();function Agent(_0x2ddfca){const _0x235757=_0x43ce14;this['id']=_0x2ddfca['id']||0x0,this[_0x235757('0x21')]=_0x2ddfca[_0x235757('0x21')]||'',this[_0x235757('0x23')]=_0x2ddfca[_0x235757('0x23')]||!![],this[_0x235757('0x0')]=_0x2ddfca[_0x235757('0x0')]||![],this[_0x235757('0x16')]=_0x2ddfca[_0x235757('0x16')]||![],this['mailPause']=_0x2ddfca[_0x235757('0x2f')]||![],this[_0x235757('0x7')]=_0x2ddfca[_0x235757('0x7')]||![],this['smsPause']=_0x2ddfca[_0x235757('0x2')]||![],this['openchannelPause']=_0x2ddfca[_0x235757('0x2d')]||![],this[_0x235757('0x13')]='unknown',this[_0x235757('0x17')]=0x0,this[_0x235757('0x2c')]=_0x2ddfca['chatCapacity']||0x0,this[_0x235757('0x20')]=0x0,this[_0x235757('0x29')]=_0x235757('0x5'),this['mailStatusTime']=0x0,this[_0x235757('0x15')]=_0x2ddfca[_0x235757('0x15')]||0x0,this[_0x235757('0x3')]=0x0,this[_0x235757('0x27')]=_0x235757('0x5'),this[_0x235757('0x28')]=0x0,this[_0x235757('0x12')]=_0x2ddfca['faxCapacity']||0x0,this[_0x235757('0x26')]=0x0,this[_0x235757('0x4')]=_0x235757('0x5'),this['smsStatusTime']=0x0,this[_0x235757('0x11')]=_0x2ddfca[_0x235757('0x11')]||0x0,this['smsCurrentCapacity']=0x0,this[_0x235757('0x36')]=_0x235757('0x5'),this[_0x235757('0xe')]=0x0,this[_0x235757('0x1a')]=_0x2ddfca[_0x235757('0x1a')]||0x0,this[_0x235757('0x32')]=0x0,this[_0x235757('0x19')]=_0x235757('0x5'),this['openchannelStatusTime']=0x0,this[_0x235757('0x18')]=_0x2ddfca['openchannelCapacity']||0x0,this['openchannelCurrentCapacity']=0x0,this['busy']=![],this[_0x235757('0x30')]=undefined,this[_0x235757('0xf')]='',this[_0x235757('0xb')]();}Agent[_0x43ce14('0x2a')][_0x43ce14('0x35')]=function(_0x2a53b4){const _0x5ace0c=_0x43ce14;return this[_0x2a53b4+'CurrentCapacity']>0x0?this[_0x2a53b4+_0x5ace0c('0x31')]>0x0&&this[_0x2a53b4+'CurrentCapacity']>=this[_0x2a53b4+'Capacity']?_0x5ace0c('0x1d'):_0x5ace0c('0x14'):'idle';},Agent[_0x43ce14('0x2a')][_0x43ce14('0xb')]=function(){const _0x63096c=_0x43ce14,_0x100544=[_0x63096c('0x24'),'chat',_0x63096c('0x1'),'fax',_0x63096c('0x2e'),_0x63096c('0x10')];for(let _0x320efc=0x0;_0x320efc<_0x100544[_0x63096c('0x9')];_0x320efc+=0x1){const _0x33acb1=this[_0x63096c('0x35')](_0x100544[_0x320efc]);this[_0x100544[_0x320efc]+_0x63096c('0x1f')]!==_0x33acb1&&(this[_0x100544[_0x320efc]+_0x63096c('0x22')]=_[_0x63096c('0x37')](moment()[_0x63096c('0x6')]('x'))),this[_0x100544[_0x320efc]+_0x63096c('0x1f')]=_0x33acb1;}const _0x42a6b3={'id':this['id'],'name':this[_0x63096c('0x21')],'online':this[_0x63096c('0x23')],'voicePause':this[_0x63096c('0x0')],'chatPause':this[_0x63096c('0x16')],'mailPause':this[_0x63096c('0x2f')],'smsPause':this[_0x63096c('0x2')],'faxPause':this[_0x63096c('0x7')],'openchannelPause':this[_0x63096c('0x2d')],'chatStatus':this[_0x63096c('0x13')],'chatStatusTime':this[_0x63096c('0x17')],'chatCapacity':this[_0x63096c('0x2c')],'chatCurrentCapacity':this[_0x63096c('0x20')],'mailStatus':this[_0x63096c('0x29')],'mailStatusTime':this['mailStatusTime'],'mailCapacity':this[_0x63096c('0x15')],'mailCurrentCapacity':this[_0x63096c('0x3')],'faxStatus':this['faxStatus'],'faxStatusTime':this[_0x63096c('0x28')],'faxCapacity':this[_0x63096c('0x12')],'faxCurrentCapacity':this['faxCurrentCapacity'],'smsStatus':this[_0x63096c('0x4')],'smsStatusTime':this[_0x63096c('0x8')],'smsCapacity':this[_0x63096c('0x11')],'smsCurrentCapacity':this[_0x63096c('0x1c')],'whatsappStatus':this[_0x63096c('0x36')],'whatsappStatusTime':this['whatsappStatusTime'],'whatsappCapacity':this[_0x63096c('0x1a')],'whatsappCurrentCapacity':this[_0x63096c('0x32')],'openchannelStatus':this[_0x63096c('0x19')],'openchannelStatusTime':this[_0x63096c('0xa')],'openchannelCapacity':this['openchannelCapacity'],'openchannelCurrentCapacity':this[_0x63096c('0x25')],'busy':this[_0x63096c('0x2b')],'busyQueue':this[_0x63096c('0x30')]},_0x3d5d87=md5(JSON[_0x63096c('0x34')](_0x42a6b3));this['md5']!==_0x3d5d87&&(this['md5']=_0x3d5d87,io['emit'](_0x63096c('0x33'),_0x42a6b3));},module[_0x43ce14('0xd')]=Agent;
\ No newline at end of file
+const a1165_0x1ebc=['openchannelStatusTime','chatCurrentCapacity','mailCapacity','openchannelStatus','whatsapp','Status','whatsappCapacity','smsCapacity','busyQueue','mailCurrentCapacity','unknown','../../../rediscache','working','smsCurrentCapacity','whatsappStatusTime','CurrentCapacity','faxCapacity','sms','StatusTime','faxCurrentCapacity','fax','getChannelStatus','faxStatus','md5','format','length','online','moment','openchannel','smsStatusTime','mailStatus','faxStatusTime','openchannelCapacity','whatsappCurrentCapacity','idle','lodash','busy','updateRealtime','emit','chatCapacity','smsStatus','chat','user:save','chatPause','chatStatus','openchannelPause','voicePause','smsPause','maxcapacity','name','mail','openchannelCurrentCapacity','Capacity','faxPause','chatStatusTime','mailStatusTime','exports','mailPause'];(function(_0x3f71fe,_0x1ebcbd){const _0x38426e=function(_0x55503b){while(--_0x55503b){_0x3f71fe['push'](_0x3f71fe['shift']());}};_0x38426e(++_0x1ebcbd);}(a1165_0x1ebc,0x199));const a1165_0x3842=function(_0x3f71fe,_0x1ebcbd){_0x3f71fe=_0x3f71fe-0x0;let _0x38426e=a1165_0x1ebc[_0x3f71fe];return _0x38426e;};const _0x3d2352=a1165_0x3842;'use strict';const _=require(_0x3d2352('0x20')),moment=require(_0x3d2352('0x18')),md5=require(_0x3d2352('0x14')),{getSocket}=require(_0x3d2352('0x8')),io=getSocket();function Agent(_0x55503b){const _0x5e7173=_0x3d2352;this['id']=_0x55503b['id']||0x0,this['name']=_0x55503b['name']||'',this[_0x5e7173('0x17')]=_0x55503b['online']||!![],this[_0x5e7173('0x2b')]=_0x55503b['voicePause']||![],this[_0x5e7173('0x28')]=_0x55503b[_0x5e7173('0x28')]||![],this[_0x5e7173('0x36')]=_0x55503b['mailPause']||![],this[_0x5e7173('0x32')]=_0x55503b[_0x5e7173('0x32')]||![],this[_0x5e7173('0x2c')]=_0x55503b['smsPause']||![],this[_0x5e7173('0x2a')]=_0x55503b[_0x5e7173('0x2a')]||![],this['chatStatus']=_0x5e7173('0x7'),this[_0x5e7173('0x33')]=0x0,this[_0x5e7173('0x24')]=_0x55503b[_0x5e7173('0x24')]||0x0,this[_0x5e7173('0x38')]=0x0,this[_0x5e7173('0x1b')]=_0x5e7173('0x7'),this[_0x5e7173('0x34')]=0x0,this[_0x5e7173('0x39')]=_0x55503b[_0x5e7173('0x39')]||0x0,this[_0x5e7173('0x6')]=0x0,this[_0x5e7173('0x13')]=_0x5e7173('0x7'),this['faxStatusTime']=0x0,this[_0x5e7173('0xd')]=_0x55503b['faxCapacity']||0x0,this['faxCurrentCapacity']=0x0,this[_0x5e7173('0x25')]='unknown',this[_0x5e7173('0x1a')]=0x0,this[_0x5e7173('0x4')]=_0x55503b[_0x5e7173('0x4')]||0x0,this[_0x5e7173('0xa')]=0x0,this['whatsappStatus']=_0x5e7173('0x7'),this[_0x5e7173('0xb')]=0x0,this[_0x5e7173('0x3')]=_0x55503b[_0x5e7173('0x3')]||0x0,this[_0x5e7173('0x1e')]=0x0,this[_0x5e7173('0x0')]=_0x5e7173('0x7'),this[_0x5e7173('0x37')]=0x0,this[_0x5e7173('0x1d')]=_0x55503b[_0x5e7173('0x1d')]||0x0,this[_0x5e7173('0x30')]=0x0,this[_0x5e7173('0x21')]=![],this[_0x5e7173('0x5')]=undefined,this[_0x5e7173('0x14')]='',this[_0x5e7173('0x22')]();}Agent['prototype'][_0x3d2352('0x12')]=function(_0x858e42){const _0x360164=_0x3d2352;return this[_0x858e42+'CurrentCapacity']>0x0?this[_0x858e42+_0x360164('0x31')]>0x0&&this[_0x858e42+_0x360164('0xc')]>=this[_0x858e42+_0x360164('0x31')]?_0x360164('0x2d'):_0x360164('0x9'):_0x360164('0x1f');},Agent['prototype']['updateRealtime']=function(){const _0x1253ff=_0x3d2352,_0x5f03d7=[_0x1253ff('0x2f'),_0x1253ff('0x26'),_0x1253ff('0x19'),_0x1253ff('0x11'),_0x1253ff('0xe'),_0x1253ff('0x1')];for(let _0x5969d6=0x0;_0x5969d6<_0x5f03d7[_0x1253ff('0x16')];_0x5969d6+=0x1){const _0x243e7c=this[_0x1253ff('0x12')](_0x5f03d7[_0x5969d6]);this[_0x5f03d7[_0x5969d6]+_0x1253ff('0x2')]!==_0x243e7c&&(this[_0x5f03d7[_0x5969d6]+_0x1253ff('0xf')]=_['toNumber'](moment()[_0x1253ff('0x15')]('x'))),this[_0x5f03d7[_0x5969d6]+'Status']=_0x243e7c;}const _0x49d546={'id':this['id'],'name':this[_0x1253ff('0x2e')],'online':this[_0x1253ff('0x17')],'voicePause':this[_0x1253ff('0x2b')],'chatPause':this['chatPause'],'mailPause':this[_0x1253ff('0x36')],'smsPause':this[_0x1253ff('0x2c')],'faxPause':this[_0x1253ff('0x32')],'openchannelPause':this[_0x1253ff('0x2a')],'chatStatus':this[_0x1253ff('0x29')],'chatStatusTime':this[_0x1253ff('0x33')],'chatCapacity':this[_0x1253ff('0x24')],'chatCurrentCapacity':this[_0x1253ff('0x38')],'mailStatus':this[_0x1253ff('0x1b')],'mailStatusTime':this[_0x1253ff('0x34')],'mailCapacity':this['mailCapacity'],'mailCurrentCapacity':this[_0x1253ff('0x6')],'faxStatus':this[_0x1253ff('0x13')],'faxStatusTime':this[_0x1253ff('0x1c')],'faxCapacity':this['faxCapacity'],'faxCurrentCapacity':this[_0x1253ff('0x10')],'smsStatus':this[_0x1253ff('0x25')],'smsStatusTime':this[_0x1253ff('0x1a')],'smsCapacity':this['smsCapacity'],'smsCurrentCapacity':this[_0x1253ff('0xa')],'whatsappStatus':this['whatsappStatus'],'whatsappStatusTime':this[_0x1253ff('0xb')],'whatsappCapacity':this['whatsappCapacity'],'whatsappCurrentCapacity':this['whatsappCurrentCapacity'],'openchannelStatus':this[_0x1253ff('0x0')],'openchannelStatusTime':this[_0x1253ff('0x37')],'openchannelCapacity':this['openchannelCapacity'],'openchannelCurrentCapacity':this[_0x1253ff('0x30')],'busy':this[_0x1253ff('0x21')],'busyQueue':this['busyQueue']},_0x18a883=md5(JSON['stringify'](_0x49d546));this[_0x1253ff('0x14')]!==_0x18a883&&(this[_0x1253ff('0x14')]=_0x18a883,io[_0x1253ff('0x23')](_0x1253ff('0x27'),_0x49d546));},module[_0x3d2352('0x35')]=Agent;
\ No newline at end of file