1 var _0xbecc=["\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","\x70\x61\x75\x73\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","\x66\x69\x6E\x61\x6C\x6C\x79","\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","\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(_0xbecc[0]);var _=require(_0xbecc[1]);var VoiceQueue=require(_0xbecc[3])[_0xbecc[2]];var Agent=require(_0xbecc[3])[_0xbecc[4]];var Action=require(_0xbecc[3])[_0xbecc[5]];var ReportAgent=require(_0xbecc[3])[_0xbecc[6]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0x4457xb){console[_0xbecc[8]](_0xbecc[7]);VoiceQueue[_0xbecc[14]]()[_0xbecc[12]](function(_0x4457x10){_voiceQueues= _0x4457x10;synchCollection(VoiceQueue,_voiceQueues,_0xbecc[13]);return Agent[_0xbecc[16]](_0xbecc[15])[_0xbecc[14]]()})[_0xbecc[12]](function(_0x4457xd){_agents= _0x4457xd;synchCollection(Agent,_agents,_0xbecc[10]);Action[_0xbecc[11]](function(_0x4457xe,_0x4457xf){return onSave(_0x4457xe,_0x4457xf)})})[_0xbecc[9]](function(_0x4457xc){console[_0xbecc[8]](_0x4457xc)})}function onSave(_0x4457xe,_0x4457xf){var _0x4457x12;if((_0x4457xe[_0xbecc[13]]=== _0xbecc[17]|| _0x4457xe[_0xbecc[13]]=== _0xbecc[18])&& activeAcw[_0x4457xf[_0xbecc[19]][_0xbecc[15]]]){if(_0x4457xe[_0xbecc[13]]=== _0xbecc[18]&& activeAcw[_0x4457xf[_0xbecc[19]][_0xbecc[15]]][_0xbecc[18]]){_0x4457x12= activeAcw[_0x4457xf[_0xbecc[19]][_0xbecc[15]]][_0xbecc[20]]}else {clearTimeout(activeAcw[_0x4457xf[_0xbecc[19]][_0xbecc[15]]][_0xbecc[21]]);_0x4457x12= moment[_0xbecc[24]](moment()- activeAcw[_0x4457xf[_0xbecc[19]][_0xbecc[15]]][_0xbecc[23]])[_0xbecc[22]]()};return ReportAgent[_0xbecc[29]]({agentacw:true,acwtime:_0x4457x12},{where:{uniqueid:activeAcw[_0x4457xf[_0xbecc[19]][_0xbecc[15]]][_0xbecc[26]],destuniqueid:activeAcw[_0x4457xf[_0xbecc[19]][_0xbecc[15]]][_0xbecc[27]]},transaction:_0x4457xf[_0xbecc[28]],individualHooks:true})[_0xbecc[9]](function(_0x4457xc){console[_0xbecc[8]](_0x4457xc)})[_0xbecc[25]](function(){delete activeAcw[_0x4457xf[_0xbecc[19]][_0xbecc[15]]]})}}ACW[_0xbecc[31]][_0xbecc[30]]= function(_0x4457x13){var _0x4457x14=_[_0xbecc[33]](_voiceQueues,{name:_0x4457x13[_0xbecc[32]],acw:true});if(_0x4457x14){var _0x4457x15=_[_0xbecc[33]](_agents,{name:_0x4457x13[_0xbecc[34]]});Action[_0xbecc[39]]({name:_0xbecc[17],data1:_0xbecc[38],data2:_0x4457x14[_0xbecc[36]],data3:_0x4457x13[_0xbecc[26]],data4:_0x4457x13[_0xbecc[32]]},{body:{agent:_0x4457x15[_0xbecc[10]],type:_0xbecc[38]}})[_0xbecc[12]](function(){console[_0xbecc[8]](_0xbecc[35]);activeAcw[_0x4457x15[_0xbecc[10]]]= {uniqueid:_0x4457x13[_0xbecc[26]],destuniqueid:_0x4457x13[_0xbecc[27]],acwTime:_0x4457x14[_0xbecc[36]],acwAt:moment(),unpause:false};activeAcw[_0x4457x15[_0xbecc[10]]][_0xbecc[21]]= setTimeout(function(){console[_0xbecc[8]](_0xbecc[37]);activeAcw[_0x4457x15[_0xbecc[10]]][_0xbecc[18]]= true;return Action[_0xbecc[39]]({name:_0xbecc[18],data1:_0xbecc[38],data2:_0x4457x14[_0xbecc[36]],data3:_0x4457x13[_0xbecc[26]],data4:_0x4457x13[_0xbecc[32]]},{body:{agent:_0x4457x15[_0xbecc[10]],type:_0xbecc[38]}})[_0xbecc[9]](function(_0x4457xc){console[_0xbecc[8]](_0x4457xc)})},_0x4457x14[_0xbecc[36]]* 1000)})[_0xbecc[9]](function(_0x4457xc){console[_0xbecc[8]](_0x4457xc)})}};function synchCollection(_0x4457x17,_0x4457x18,_0x4457x19){var _0x4457x1a={};_0x4457x17[_0xbecc[11]](function(_0x4457xe){_0x4457x1a[_0x4457x19]= _0x4457xe[_0x4457x19];updateCollection(_0x4457x18,_0x4457xe,_0x4457x1a)});_0x4457x17[_0xbecc[40]](function(_0x4457xe){_0x4457x1a[_0x4457x19]= _0x4457xe[_0x4457x19];updateCollection(_0x4457x18,_0x4457xe,_0x4457x1a)});_0x4457x17[_0xbecc[42]](function(_0x4457xe){_0x4457x1a[_0x4457x19]= _0x4457xe[_0x4457x19];_[_0xbecc[41]](_0x4457x18,_0x4457x1a)})}function updateCollection(_0x4457x1c,_0x4457xe,_0x4457x1a){var _0x4457x1d=_[_0xbecc[33]](_0x4457x1c,_0x4457x1a);var _0x4457x1e=_0x4457x1c[_0xbecc[43]](_0x4457x1d);if(_0x4457x1d){_[_0xbecc[44]](_0x4457x1c[_0x4457x1e],_0x4457xe)}else {_0x4457x1c[_0xbecc[45]](_0x4457xe)}}module[_0xbecc[46]]= ACW