Built motion from commit 70c527640.|1.0.24
[motion.git] / server / config / routing / agent.js
index c0869c2..2a8c07f 100644 (file)
@@ -1 +1 @@
-var _0x8848=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x63\x61\x6C\x6C\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x55\x73\x65\x72\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x75\x73\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x77\x68\x65\x72\x65","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x70\x75\x73\x68","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x41\x47\x45\x4E\x54\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x5F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50\x20\x41\x47\x45\x4E\x54\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x74\x69\x6D\x65\x6F\x75\x74","\x53\x45\x43","\x69\x6E\x66\x6F","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x50\x45\x4E","\x66\x69\x6C\x74\x65\x72","\x63\x61\x70\x61\x63\x69\x74\x69\x65\x73","\x77\x72\x69\x74\x65\x52\x65\x70\x6F\x72\x74","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x53\x4B\x49\x50\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x73","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x8848[0];const _=require(_0x8848[1]);const config=require(_0x8848[2]);const structure=require(_0x8848[3]);const cp=require(_0x8848[4]);const util=require(_0x8848[5]);const moment=require(_0x8848[6]);const User=require(_0x8848[8])[_0x8848[7]];function Agent(_0x24c9x9,_0x24c9xa,_0x24c9xb){this[_0x8848[9]]= _0x24c9x9;this[_0x8848[10]]= _0x24c9xa;this[_0x8848[11]]= [];this[_0x8848[12]]= [];this[_0x8848[13]]= _0x24c9xb}Agent[_0x8848[15]][_0x8848[14]]= function init(){var _0x24c9xd=this;var _0x24c9xe={where:{id:_0x24c9xd[_0x8848[9]][_0x8848[16]],online:true},include:[]};_0x24c9xe[_0x8848[20]][structure[_0x8848[19]][_0x8848[18]][_0x24c9xd[_0x8848[10]][_0x8848[17]]]]= false;_0x24c9xe[_0x8848[25]][_0x8848[24]]({model:structure[_0x8848[22]][_0x8848[21]][_0x24c9xd[_0x8848[10]][_0x8848[17]]],attributes:[_0x8848[23]]});return User[_0x8848[49]](_0x24c9xe)[_0x8848[30]](function(_0x24c9x10){_0x24c9xd[_0x8848[33]]= _0x24c9x10;console[_0x8848[40]](_0x24c9xd[_0x8848[10]][_0x8848[17]][_0x8848[34]](),_0x8848[35],_0x24c9xd[_0x8848[10]][_0x8848[36]],_0x8848[37],_0x24c9xd[_0x8848[9]][_0x8848[38]],_0x8848[39]);if(_0x24c9xd[_0x8848[33]][_0x8848[41]]&& available(_0x24c9xd[_0x8848[33]][0][_0x8848[42]],_0x24c9xd[_0x8848[33]][0][structure[_0x8848[19]][_0x8848[18]][_0x24c9xd[_0x8848[10]][_0x8848[17]]]],_[_0x8848[44]](_0x24c9xd[_0x8848[33]][0][structure[_0x8848[19]][_0x8848[21]][_0x24c9xd[_0x8848[10]][_0x8848[17]]]],{status:_0x8848[43]}),_0x24c9xd[_0x8848[33]][0][structure[_0x8848[19]][_0x8848[45]][_0x24c9xd[_0x8848[10]][_0x8848[17]]]])){_0x24c9xd[_0x8848[46]]();_0x24c9xd[_0x8848[38]]= setTimeout(function(){_0x24c9xd[_0x8848[13]]()},_0x24c9xd[_0x8848[9]][_0x8848[38]]* 1000)}else {console[_0x8848[40]](_0x24c9xd[_0x8848[10]][_0x8848[17]][_0x8848[34]](),_0x8848[47],_0x24c9xd[_0x8848[10]][_0x8848[48]]);_0x24c9xd[_0x8848[13]]()}})[_0x8848[30]](function(){return structure[_0x8848[22]][_0x8848[21]][_0x24c9xd[_0x8848[10]][_0x8848[17]]][_0x8848[32]]({waiting:true},{where:{id:_0x24c9xd[_0x8848[10]][_0x8848[31]]},individualHooks:true})[_0x8848[30]](function(){console[_0x8848[29]](_0x8848[28])})[_0x8848[27]](function(_0x24c9xf){console[_0x8848[26]]()})})};Agent[_0x8848[15]][_0x8848[46]]= function writeReport(){var _0x24c9xd=this;var _0x24c9x12=_[_0x8848[55]](_0x24c9xd._agents,function(_0x24c9x13){return _[_0x8848[54]](_0x24c9xd[_0x8848[10]],{timeslot:_0x24c9xd[_0x8848[9]][_0x8848[38]],application:_0x8848[50],membername:_0x24c9x13[_0x8848[51]],memberid:_0x24c9x13[_0x8848[23]],calledAt:moment()[_0x8848[53]](_0x8848[52]),joinAt:moment()[_0x8848[53]](_0x8848[52])})});return structure[_0x8848[22]][_0x8848[58]][_0x24c9xd[_0x8848[10]][_0x8848[17]]][_0x8848[56]](_0x24c9x12,{individualHooks:true})[_0x8848[30]](function(){return structure[_0x8848[22]][_0x8848[57]][_0x24c9xd[_0x8848[10]][_0x8848[17]]][_0x8848[56]](_0x24c9x12,{individualHooks:true})})[_0x8848[27]](function(_0x24c9xf){console[_0x8848[26]](_0x24c9xf)})};function available(_0x24c9x15,_0x24c9x16,_0x24c9x17,_0x24c9x18){return _0x24c9x15&&  !_0x24c9x16&& ((_0x24c9x17[_0x8848[41]]< _0x24c9x18)|| _0x24c9x18=== 0)}module[_0x8848[59]]= Agent
\ No newline at end of file
+var _0x6397=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x63\x61\x6C\x6C\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x55\x73\x65\x72\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x75\x73\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x77\x68\x65\x72\x65","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x70\x75\x73\x68","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x41\x47\x45\x4E\x54\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x5F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50\x20\x41\x47\x45\x4E\x54\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x74\x69\x6D\x65\x6F\x75\x74","\x53\x45\x43","\x69\x6E\x66\x6F","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x50\x45\x4E","\x66\x69\x6C\x74\x65\x72","\x63\x61\x70\x61\x63\x69\x74\x69\x65\x73","\x77\x72\x69\x74\x65\x52\x65\x70\x6F\x72\x74","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x53\x4B\x49\x50\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x73","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x6397[0];const _=require(_0x6397[1]);const config=require(_0x6397[2]);const structure=require(_0x6397[3]);const cp=require(_0x6397[4]);const util=require(_0x6397[5]);const moment=require(_0x6397[6]);const User=require(_0x6397[8])[_0x6397[7]];function Agent(_0xea57x9,_0xea57xa,_0xea57xb){this[_0x6397[9]]= _0xea57x9;this[_0x6397[10]]= _0xea57xa;this[_0x6397[11]]= [];this[_0x6397[12]]= [];this[_0x6397[13]]= _0xea57xb}Agent[_0x6397[15]][_0x6397[14]]= function init(){var _0xea57xd=this;var _0xea57xe={where:{id:_0xea57xd[_0x6397[9]][_0x6397[16]],online:true},include:[]};_0xea57xe[_0x6397[20]][structure[_0x6397[19]][_0x6397[18]][_0xea57xd[_0x6397[10]][_0x6397[17]]]]= false;_0xea57xe[_0x6397[25]][_0x6397[24]]({model:structure[_0x6397[22]][_0x6397[21]][_0xea57xd[_0x6397[10]][_0x6397[17]]],attributes:[_0x6397[23]]});return User[_0x6397[49]](_0xea57xe)[_0x6397[30]](function(_0xea57x10){_0xea57xd[_0x6397[33]]= _0xea57x10;console[_0x6397[40]](_0xea57xd[_0x6397[10]][_0x6397[17]][_0x6397[34]](),_0x6397[35],_0xea57xd[_0x6397[10]][_0x6397[36]],_0x6397[37],_0xea57xd[_0x6397[9]][_0x6397[38]],_0x6397[39]);if(_0xea57xd[_0x6397[33]][_0x6397[41]]&& available(_0xea57xd[_0x6397[33]][0][_0x6397[42]],_0xea57xd[_0x6397[33]][0][structure[_0x6397[19]][_0x6397[18]][_0xea57xd[_0x6397[10]][_0x6397[17]]]],_[_0x6397[44]](_0xea57xd[_0x6397[33]][0][structure[_0x6397[19]][_0x6397[21]][_0xea57xd[_0x6397[10]][_0x6397[17]]]],{status:_0x6397[43]}),_0xea57xd[_0x6397[33]][0][structure[_0x6397[19]][_0x6397[45]][_0xea57xd[_0x6397[10]][_0x6397[17]]]])){_0xea57xd[_0x6397[46]]();_0xea57xd[_0x6397[38]]= setTimeout(function(){_0xea57xd[_0x6397[13]]()},_0xea57xd[_0x6397[9]][_0x6397[38]]* 1000)}else {console[_0x6397[40]](_0xea57xd[_0x6397[10]][_0x6397[17]][_0x6397[34]](),_0x6397[47],_0xea57xd[_0x6397[10]][_0x6397[48]]);_0xea57xd[_0x6397[13]]()}})[_0x6397[30]](function(){return structure[_0x6397[22]][_0x6397[21]][_0xea57xd[_0x6397[10]][_0x6397[17]]][_0x6397[32]]({waiting:true},{where:{id:_0xea57xd[_0x6397[10]][_0x6397[31]]},individualHooks:true})[_0x6397[30]](function(){console[_0x6397[29]](_0x6397[28])})[_0x6397[27]](function(_0xea57xf){console[_0x6397[26]]()})})};Agent[_0x6397[15]][_0x6397[46]]= function writeReport(){var _0xea57xd=this;var _0xea57x12=_[_0x6397[55]](_0xea57xd._agents,function(_0xea57x13){return _[_0x6397[54]](_0xea57xd[_0x6397[10]],{timeslot:_0xea57xd[_0x6397[9]][_0x6397[38]],application:_0x6397[50],membername:_0xea57x13[_0x6397[51]],memberid:_0xea57x13[_0x6397[23]],calledAt:moment()[_0x6397[53]](_0x6397[52]),joinAt:moment()[_0x6397[53]](_0x6397[52])})});return structure[_0x6397[22]][_0x6397[58]][_0xea57xd[_0x6397[10]][_0x6397[17]]][_0x6397[56]](_0xea57x12,{individualHooks:true})[_0x6397[30]](function(){return structure[_0x6397[22]][_0x6397[57]][_0xea57xd[_0x6397[10]][_0x6397[17]]][_0x6397[56]](_0xea57x12,{individualHooks:true})})[_0x6397[27]](function(_0xea57xf){console[_0x6397[26]](_0xea57xf)})};function available(_0xea57x15,_0xea57x16,_0xea57x17,_0xea57x18){return _0xea57x15&&  !_0xea57x16&& ((_0xea57x17[_0x6397[41]]< _0xea57x18)|| _0xea57x18=== 0)}module[_0x6397[59]]= Agent
\ No newline at end of file