Built motion from commit 65070aa.|0.0.108
[motion.git] / server / config / ami / acw.js
index 1fb5b07..9dbb9fa 100644 (file)
@@ -1 +1 @@
-var _0x8bec=["\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x41\x43\x57\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x75\x6E\x70\x61\x75\x73\x65","\x62\x6F\x64\x79","\x61\x63\x77\x54\x69\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x73\x53\x65\x63\x6F\x6E\x64\x73","\x61\x63\x77\x41\x74","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x71\x75\x65\x75\x65","\x66\x69\x6E\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x55\x4E\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x41\x43\x57","\x63\x72\x65\x61\x74\x65","\x70\x61\x75\x73\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x8bec[0]);var _=require(_0x8bec[1]);var VoiceQueue=require(_0x8bec[3])[_0x8bec[2]];var Agent=require(_0x8bec[3])[_0x8bec[4]];var Action=require(_0x8bec[3])[_0x8bec[5]];var ReportAgent=require(_0x8bec[3])[_0x8bec[6]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0x61a0xb){console[_0x8bec[8]](_0x8bec[7]);VoiceQueue[_0x8bec[14]]()[_0x8bec[12]](function(_0x61a0x10){_voiceQueues=_0x61a0x10;synchCollection(VoiceQueue,_voiceQueues,_0x8bec[13]);return Agent[_0x8bec[16]](_0x8bec[15])[_0x8bec[14]]()})[_0x8bec[12]](function(_0x61a0xd){_agents=_0x61a0xd;synchCollection(Agent,_agents,_0x8bec[10]);Action[_0x8bec[11]](function(_0x61a0xe,_0x61a0xf){return onSave(_0x61a0xe,_0x61a0xf)})})[_0x8bec[9]](function(_0x61a0xc){console[_0x8bec[8]](_0x61a0xc)})}function onSave(_0x61a0xe,_0x61a0xf){if(_0x61a0xe[_0x8bec[13]]===_0x8bec[17]&&activeAcw[_0x61a0xf[_0x8bec[18]][_0x8bec[15]]]){var _0x61a0x12;if(activeAcw[_0x61a0xf[_0x8bec[18]][_0x8bec[15]]][_0x8bec[17]]){_0x61a0x12=activeAcw[_0x61a0xf[_0x8bec[18]][_0x8bec[15]]][_0x8bec[19]]}else {clearTimeout(activeAcw[_0x61a0xf[_0x8bec[18]][_0x8bec[15]]][_0x8bec[20]]);_0x61a0x12=moment[_0x8bec[23]](moment()-activeAcw[_0x61a0xf[_0x8bec[18]][_0x8bec[15]]][_0x8bec[22]])[_0x8bec[21]]()};return ReportAgent[_0x8bec[27]]({agentacw:true,acwtime:_0x61a0x12},{where:{uniqueid:activeAcw[_0x61a0xf[_0x8bec[18]][_0x8bec[15]]][_0x8bec[24]],destuniqueid:activeAcw[_0x61a0xf[_0x8bec[18]][_0x8bec[15]]][_0x8bec[25]]},transaction:_0x61a0xf[_0x8bec[26]],individualHooks:true})[_0x8bec[12]](function(){delete activeAcw[_0x61a0xf[_0x8bec[18]][_0x8bec[15]]]})[_0x8bec[9]](function(_0x61a0xc){console[_0x8bec[8]](_0x61a0xc)})}}ACW[_0x8bec[29]][_0x8bec[28]]=function(_0x61a0x13){var _0x61a0x14=_[_0x8bec[31]](_voiceQueues,{name:_0x61a0x13[_0x8bec[30]],acw:true});if(_0x61a0x14){var _0x61a0x15=_[_0x8bec[31]](_agents,{name:_0x61a0x13[_0x8bec[32]]});Action[_0x8bec[37]]({name:_0x8bec[38],data1:_0x61a0x13[_0x8bec[30]],data2:_0x61a0x14[_0x8bec[34]],data3:_0x61a0x13[_0x8bec[24]],data4:_0x8bec[36]},{body:{agent:_0x61a0x15[_0x8bec[10]],type:_0x8bec[36]}})[_0x8bec[12]](function(){console[_0x8bec[8]](_0x8bec[33]);activeAcw[_0x61a0x15[_0x8bec[10]]]={uniqueid:_0x61a0x13[_0x8bec[24]],destuniqueid:_0x61a0x13[_0x8bec[25]],acwTime:_0x61a0x14[_0x8bec[34]],acwAt:moment(),unpause:false};activeAcw[_0x61a0x15[_0x8bec[10]]][_0x8bec[20]]=setTimeout(function(){console[_0x8bec[8]](_0x8bec[35]);activeAcw[_0x61a0x15[_0x8bec[10]]][_0x8bec[17]]=true;return Action[_0x8bec[37]]({name:_0x8bec[17],data1:_0x61a0x13[_0x8bec[30]],data2:_0x61a0x14[_0x8bec[34]],data3:_0x61a0x13[_0x8bec[24]],data4:_0x8bec[36]},{body:{agent:_0x61a0x15[_0x8bec[10]],type:_0x8bec[36]}})[_0x8bec[9]](function(_0x61a0xc){console[_0x8bec[8]](_0x61a0xc)})},_0x61a0x14[_0x8bec[34]]*1000)})[_0x8bec[9]](function(_0x61a0xc){console[_0x8bec[8]](_0x61a0xc)})}};function synchCollection(_0x61a0x17,_0x61a0x18,_0x61a0x19){var _0x61a0x1a={};_0x61a0x17[_0x8bec[11]](function(_0x61a0xe){_0x61a0x1a[_0x61a0x19]=_0x61a0xe[_0x61a0x19];updateCollection(_0x61a0x18,_0x61a0xe,_0x61a0x1a)});_0x61a0x17[_0x8bec[39]](function(_0x61a0xe){_0x61a0x1a[_0x61a0x19]=_0x61a0xe[_0x61a0x19];updateCollection(_0x61a0x18,_0x61a0xe,_0x61a0x1a)});_0x61a0x17[_0x8bec[41]](function(_0x61a0xe){_0x61a0x1a[_0x61a0x19]=_0x61a0xe[_0x61a0x19];_[_0x8bec[40]](_0x61a0x18,_0x61a0x1a)})}function updateCollection(_0x61a0x1c,_0x61a0xe,_0x61a0x1a){var _0x61a0x1d=_[_0x8bec[31]](_0x61a0x1c,_0x61a0x1a);var _0x61a0x1e=_0x61a0x1c[_0x8bec[42]](_0x61a0x1d);if(_0x61a0x1d){_[_0x8bec[43]](_0x61a0x1c[_0x61a0x1e],_0x61a0xe)}else {_0x61a0x1c[_0x8bec[44]](_0x61a0xe)}}module[_0x8bec[45]]=ACW
\ No newline at end of file
+var _0x4ae5=["\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x41\x43\x57\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x75\x6E\x70\x61\x75\x73\x65","\x62\x6F\x64\x79","\x61\x63\x77\x54\x69\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x73\x53\x65\x63\x6F\x6E\x64\x73","\x61\x63\x77\x41\x74","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x71\x75\x65\x75\x65","\x66\x69\x6E\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x55\x4E\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x41\x43\x57","\x63\x72\x65\x61\x74\x65","\x70\x61\x75\x73\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0x4ae5[0]);var _=require(_0x4ae5[1]);var VoiceQueue=require(_0x4ae5[3])[_0x4ae5[2]];var Agent=require(_0x4ae5[3])[_0x4ae5[4]];var Action=require(_0x4ae5[3])[_0x4ae5[5]];var ReportAgent=require(_0x4ae5[3])[_0x4ae5[6]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0x6fe6xb){console[_0x4ae5[8]](_0x4ae5[7]);VoiceQueue[_0x4ae5[14]]()[_0x4ae5[12]](function(_0x6fe6x10){_voiceQueues=_0x6fe6x10;synchCollection(VoiceQueue,_voiceQueues,_0x4ae5[13]);return Agent[_0x4ae5[16]](_0x4ae5[15])[_0x4ae5[14]]()})[_0x4ae5[12]](function(_0x6fe6xd){_agents=_0x6fe6xd;synchCollection(Agent,_agents,_0x4ae5[10]);Action[_0x4ae5[11]](function(_0x6fe6xe,_0x6fe6xf){return onSave(_0x6fe6xe,_0x6fe6xf)})})[_0x4ae5[9]](function(_0x6fe6xc){console[_0x4ae5[8]](_0x6fe6xc)})}function onSave(_0x6fe6xe,_0x6fe6xf){if(_0x6fe6xe[_0x4ae5[13]]===_0x4ae5[17]&&activeAcw[_0x6fe6xf[_0x4ae5[18]][_0x4ae5[15]]]){var _0x6fe6x12;if(activeAcw[_0x6fe6xf[_0x4ae5[18]][_0x4ae5[15]]][_0x4ae5[17]]){_0x6fe6x12=activeAcw[_0x6fe6xf[_0x4ae5[18]][_0x4ae5[15]]][_0x4ae5[19]]}else {clearTimeout(activeAcw[_0x6fe6xf[_0x4ae5[18]][_0x4ae5[15]]][_0x4ae5[20]]);_0x6fe6x12=moment[_0x4ae5[23]](moment()-activeAcw[_0x6fe6xf[_0x4ae5[18]][_0x4ae5[15]]][_0x4ae5[22]])[_0x4ae5[21]]()};return ReportAgent[_0x4ae5[27]]({agentacw:true,acwtime:_0x6fe6x12},{where:{uniqueid:activeAcw[_0x6fe6xf[_0x4ae5[18]][_0x4ae5[15]]][_0x4ae5[24]],destuniqueid:activeAcw[_0x6fe6xf[_0x4ae5[18]][_0x4ae5[15]]][_0x4ae5[25]]},transaction:_0x6fe6xf[_0x4ae5[26]],individualHooks:true})[_0x4ae5[12]](function(){delete activeAcw[_0x6fe6xf[_0x4ae5[18]][_0x4ae5[15]]]})[_0x4ae5[9]](function(_0x6fe6xc){console[_0x4ae5[8]](_0x6fe6xc)})}}ACW[_0x4ae5[29]][_0x4ae5[28]]=function(_0x6fe6x13){var _0x6fe6x14=_[_0x4ae5[31]](_voiceQueues,{name:_0x6fe6x13[_0x4ae5[30]],acw:true});if(_0x6fe6x14){var _0x6fe6x15=_[_0x4ae5[31]](_agents,{name:_0x6fe6x13[_0x4ae5[32]]});Action[_0x4ae5[37]]({name:_0x4ae5[38],data1:_0x4ae5[36],data2:_0x6fe6x14[_0x4ae5[34]],data3:_0x6fe6x13[_0x4ae5[24]],data4:_0x6fe6x13[_0x4ae5[30]]},{body:{agent:_0x6fe6x15[_0x4ae5[10]],type:_0x4ae5[36]}})[_0x4ae5[12]](function(){console[_0x4ae5[8]](_0x4ae5[33]);activeAcw[_0x6fe6x15[_0x4ae5[10]]]={uniqueid:_0x6fe6x13[_0x4ae5[24]],destuniqueid:_0x6fe6x13[_0x4ae5[25]],acwTime:_0x6fe6x14[_0x4ae5[34]],acwAt:moment(),unpause:false};activeAcw[_0x6fe6x15[_0x4ae5[10]]][_0x4ae5[20]]=setTimeout(function(){console[_0x4ae5[8]](_0x4ae5[35]);activeAcw[_0x6fe6x15[_0x4ae5[10]]][_0x4ae5[17]]=true;return Action[_0x4ae5[37]]({name:_0x4ae5[17],data1:_0x4ae5[36],data2:_0x6fe6x14[_0x4ae5[34]],data3:_0x6fe6x13[_0x4ae5[24]],data4:_0x6fe6x13[_0x4ae5[30]]},{body:{agent:_0x6fe6x15[_0x4ae5[10]],type:_0x4ae5[36]}})[_0x4ae5[9]](function(_0x6fe6xc){console[_0x4ae5[8]](_0x6fe6xc)})},_0x6fe6x14[_0x4ae5[34]]*1000)})[_0x4ae5[9]](function(_0x6fe6xc){console[_0x4ae5[8]](_0x6fe6xc)})}};function synchCollection(_0x6fe6x17,_0x6fe6x18,_0x6fe6x19){var _0x6fe6x1a={};_0x6fe6x17[_0x4ae5[11]](function(_0x6fe6xe){_0x6fe6x1a[_0x6fe6x19]=_0x6fe6xe[_0x6fe6x19];updateCollection(_0x6fe6x18,_0x6fe6xe,_0x6fe6x1a)});_0x6fe6x17[_0x4ae5[39]](function(_0x6fe6xe){_0x6fe6x1a[_0x6fe6x19]=_0x6fe6xe[_0x6fe6x19];updateCollection(_0x6fe6x18,_0x6fe6xe,_0x6fe6x1a)});_0x6fe6x17[_0x4ae5[41]](function(_0x6fe6xe){_0x6fe6x1a[_0x6fe6x19]=_0x6fe6xe[_0x6fe6x19];_[_0x4ae5[40]](_0x6fe6x18,_0x6fe6x1a)})}function updateCollection(_0x6fe6x1c,_0x6fe6xe,_0x6fe6x1a){var _0x6fe6x1d=_[_0x4ae5[31]](_0x6fe6x1c,_0x6fe6x1a);var _0x6fe6x1e=_0x6fe6x1c[_0x4ae5[42]](_0x6fe6x1d);if(_0x6fe6x1d){_[_0x4ae5[43]](_0x6fe6x1c[_0x6fe6x1e],_0x6fe6xe)}else {_0x6fe6x1c[_0x4ae5[44]](_0x6fe6xe)}}module[_0x4ae5[45]]=ACW
\ No newline at end of file