Built motion from commit f1f5024.|1.0.16
[motion.git] / server / config / forked_routing / mail / queue.js
index 1081a6b..8d73ff0 100644 (file)
@@ -1 +1 @@
-var _0xac79=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x73\x73\x61\x67\x65","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x20\x51\x55\x45\x55\x45\x2C\x20\x51\x55\x45\x55\x45\x3A","\x6E\x61\x6D\x65","\x53\x54\x52\x41\x54\x45\x47\x59\x3A","\x73\x74\x72\x61\x74\x65\x67\x79","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x47\x45\x4E\x54","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x52\x45\x4A\x45\x43\x54\x45\x44","\x69\x6E\x66\x6F","\x69\x64","\x70\x75\x73\x68","\x72\x65\x6A\x65\x63\x74","\x74\x79\x70\x65","\x6F\x6E","\x66\x69\x6E\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x6D\x61\x70","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x46\x49\x45\x4C\x44\x28\x55\x73\x65\x72\x2E\x69\x64\x2C\x25\x73\x29","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6D\x61\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x64","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x74\x6F","\x73\x68\x69\x66\x74","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74","\x71\x75\x65\x75\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x65\x72\x67\x65","\x63\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x45\x4E\x44\x20\x28\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52\x20\x42\x59\x20\x41\x47\x45\x4E\x54\x53\x29","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x45\x52\x52\x4F\x52","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x67\x72\x6F\x75\x70\x42\x79","\x76\x61\x6C\x75\x65\x73","\x62\x65\x65\x70\x61\x6C\x6C","\x55\x73\x65\x72\x73","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x72\x6F\x6F\x6D\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x41\x53\x43"];_0xac79[0];var _=require(_0xac79[1]);var util=require(_0xac79[2]);var moment=require(_0xac79[3]);var Agent=require(_0xac79[5])[_0xac79[4]];var Room=require(_0xac79[5])[_0xac79[6]];var Queue=require(_0xac79[5])[_0xac79[7]];var Report=require(_0xac79[5])[_0xac79[8]];var Session=require(_0xac79[5])[_0xac79[9]];module[_0xac79[10]]= function(_0x7c33x9,_0x7c33xa,_0x7c33xb,_0x7c33xc,_0x7c33xd){var _0x7c33xe=[];var _0x7c33xf;var _0x7c33x10;var _0x7c33x11;var _0x7c33x12=0;process[_0xac79[28]](_0xac79[11],function(_0x7c33xb){switch(_0x7c33xb[_0xac79[27]]){case _0xac79[26]:console[_0xac79[23]](_0x7c33xa[_0xac79[13]][_0xac79[12]](),_0xac79[14],_0x7c33x11[_0xac79[15]][_0xac79[12]](),_0xac79[16],_0x7c33x11[_0xac79[17]],_0xac79[18],_0x7c33xa[_0xac79[19]],_0xac79[20],_0x7c33xb[_0xac79[21]],_0xac79[22]);_0x7c33xe[_0xac79[25]]({id:_0x7c33xb[_0xac79[24]]});break;default:}});function _0x7c33x13(_0x7c33x14){var _0x7c33x15=_[_0xac79[29]](_0x7c33xe,{id:_0x7c33x14[_0xac79[24]]});return _0x7c33x15?true:false}function _0x7c33x16(){var _0x7c33x17=((_0x7c33x9[_0xac79[30]]- _0x7c33x12)> _0x7c33x11[_0xac79[30]])?_0x7c33x11[_0xac79[30]]:(_0x7c33x9[_0xac79[30]]- _0x7c33x12);if(_0x7c33x17> 0){var _0x7c33x18={where:{id:{$in:_[_0xac79[31]](_0x7c33x10,_0xac79[24])},online:true,mailPause:false},include:[{model:Room,attributes:[_0xac79[24]],raw:true}],attributes:[_0xac79[24],_0xac79[15],_0xac79[32],_0xac79[33],_0xac79[34]],order:[[{raw:util[_0xac79[37]](_0xac79[35],_[_0xac79[31]](_0x7c33x10,_0xac79[24])[_0xac79[36]]())}]]};Agent[_0xac79[53]](_0x7c33x18)[_0xac79[40]](function(_0x7c33x1b){if(_0x7c33x1b[_0xac79[47]]){_0x7c33x10= _0x7c33x1b;for(var _0x7c33x1c=0;_0x7c33x1c< _0x7c33x10[_0xac79[47]];_0x7c33x1c++){var _0x7c33x1d=_0x7c33x10[0][_0xac79[48]]({plain:true});if(!_0x7c33x13(_0x7c33x1d)){return Report[_0xac79[52]](_[_0xac79[51]](_0x7c33xa,{timeslot:_0x7c33x17,application:_0xac79[49],membername:_0x7c33x1d[_0xac79[15]],memberid:_0x7c33x1d[_0xac79[24]],queue:_0x7c33x11[_0xac79[24]],queuename:_0x7c33x11[_0xac79[15]],calledAt:moment()[_0xac79[37]](_0xac79[50])}))}else {var _0x7c33x14=_0x7c33x10[_0xac79[46]]();_0x7c33x10[_0xac79[25]](_0x7c33x14)}}}})[_0xac79[40]](function(_0x7c33x1a){if(_0x7c33x1a){_0x7c33xc[_0xac79[45]](util[_0xac79[37]](_0xac79[43],_0x7c33x1a[_0xac79[44]]))[_0xac79[42]](_0xac79[41],_0x7c33x1a)};var _0x7c33x14=_0x7c33x10[_0xac79[46]]();_0x7c33x10[_0xac79[25]](_0x7c33x14)})[_0xac79[40]](function(){_0x7c33xf= setTimeout(function(){_0x7c33x12+= _0x7c33x11[_0xac79[30]];_0x7c33x16()},_0x7c33x17* 1000)})[_0xac79[39]](function(_0x7c33x19){console[_0xac79[38]](_0x7c33x19)})}else {return Session[_0xac79[58]]({leaveAt:moment()[_0xac79[37]](_0xac79[50]),timeout:true},{where:{uniqueid:_0x7c33xa[_0xac79[19]],leaveAt:null},individualHooks:true})[_0xac79[40]](function(_0x7c33x1e){if(_0x7c33x1e&& _0x7c33x1e[_0xac79[47]]&& _0x7c33x1e[1][_0xac79[47]]){for(var _0x7c33x1c=0;_0x7c33x1c< _0x7c33x1e[1][_0xac79[47]];_0x7c33x1c++){var _0x7c33x1f=_0x7c33x1e[1][_0x7c33x1c][_0xac79[48]]({plain:true});_0x7c33xc[_0xac79[45]](_0xac79[55])[_0xac79[42]](_0xac79[54],_0x7c33x1f);_0x7c33xc[_0xac79[45]](_0xac79[56])[_0xac79[42]](_0xac79[54],_0x7c33x1f)}};console[_0xac79[23]](_0x7c33xa[_0xac79[13]][_0xac79[12]](),_0xac79[14],_0x7c33x11[_0xac79[15]][_0xac79[12]](),_0xac79[16],_0x7c33x11[_0xac79[17]],_0xac79[18],_0x7c33xa[_0xac79[19]],_0xac79[57]);clearTimeout(_0x7c33xf);_0x7c33xd()})}}function _0x7c33x20(){var _0x7c33x21=_0x7c33x10[_0xac79[46]]();_0x7c33x10[_0xac79[25]](_0x7c33x21);var _0x7c33x17=((_0x7c33x9[_0xac79[30]]- _0x7c33x12)> _0x7c33x11[_0xac79[30]])?_0x7c33x11[_0xac79[30]]:(_0x7c33x9[_0xac79[30]]- _0x7c33x12);if(_0x7c33x17> 0){Agent[_0xac79[53]]({where:{id:{$in:_[_0xac79[31]](_0x7c33x21,_0xac79[24])},online:true,mailPause:false},raw:true,attributes:[_0xac79[24],_0xac79[15],_0xac79[32],_0xac79[33],_0xac79[34]]})[_0xac79[40]](function(_0x7c33x1b){_[_0xac79[59]](_0x7c33x1b,function(_0x7c33x14){return _0x7c33x13(_0x7c33x14)});var _0x7c33x23=_[_0xac79[31]](_0x7c33x1b,function(_0x7c33x14){return _[_0xac79[60]](_[_0xac79[51]](_0x7c33xa,{timeslot:_0x7c33x17,application:_0xac79[49],membername:_0x7c33x14[_0xac79[15]],memberid:_0x7c33x14[_0xac79[24]],queue:_0x7c33x11[_0xac79[24]],queuename:_0x7c33x11[_0xac79[15]],calledAt:moment()[_0xac79[37]](_0xac79[50])}))});return Report[_0xac79[61]](_0x7c33x23,{individualHooks:true})})[_0xac79[40]](function(_0x7c33x22){if(_0x7c33x22&& _0x7c33x22[_0xac79[47]]){for(var _0x7c33x1c=0;_0x7c33x1c< _0x7c33x22[_0xac79[47]];_0x7c33x1c++){var _0x7c33x1a=_0x7c33x22[_0x7c33x1c][_0xac79[48]]({plain:true});_0x7c33xc[_0xac79[45]](util[_0xac79[37]](_0xac79[43],_0x7c33x1a[_0xac79[44]]))[_0xac79[42]](_0xac79[41],_0x7c33x1a)}};_0x7c33xf= setTimeout(function(){_0x7c33x12+= _0x7c33x11[_0xac79[30]];_0x7c33x20()},_0x7c33x17* 1000)})}else {return Session[_0xac79[58]]({leaveAt:moment()[_0xac79[37]](_0xac79[50]),timeout:true},{where:{uniqueid:_0x7c33xa[_0xac79[19]],leaveAt:null},individualHooks:true})[_0xac79[40]](function(_0x7c33x1e){if(_0x7c33x1e&& _0x7c33x1e[_0xac79[47]]&& _0x7c33x1e[1][_0xac79[47]]){for(var _0x7c33x1c=0;_0x7c33x1c< _0x7c33x1e[1][_0xac79[47]];_0x7c33x1c++){var _0x7c33x1f=_0x7c33x1e[1][_0x7c33x1c][_0xac79[48]]({plain:true});_0x7c33xc[_0xac79[45]](_0xac79[55])[_0xac79[42]](_0xac79[54],_0x7c33x1f);_0x7c33xc[_0xac79[45]](_0xac79[56])[_0xac79[42]](_0xac79[54],_0x7c33x1f)}};console[_0xac79[23]](_0x7c33xa[_0xac79[13]][_0xac79[12]](),_0xac79[14],_0x7c33x11[_0xac79[15]][_0xac79[12]](),_0xac79[16],_0x7c33x11[_0xac79[17]],_0xac79[18],_0x7c33xa[_0xac79[19]],_0xac79[57]);clearTimeout(_0x7c33xf);_0x7c33xd()})}}return Queue[_0xac79[72]](_0x7c33x9.MailQueueId,{attributes:[_0xac79[24],_0xac79[15],_0xac79[30],_0xac79[17],_0xac79[75]],include:[{model:Agent,attributes:[_0xac79[24]],raw:true,order:[[_0xac79[76],_0xac79[77]]]}]})[_0xac79[40]](function(_0x7c33x25){_0x7c33x11= _0x7c33x25[_0xac79[48]]({plain:true});console[_0xac79[23]](_0x7c33xa[_0xac79[13]][_0xac79[12]](),_0xac79[14],_0x7c33x11[_0xac79[15]][_0xac79[12]](),_0xac79[16],_0x7c33x11[_0xac79[17]],_0xac79[18],_0x7c33xa[_0xac79[19]],_0xac79[73],_0x7c33x9[_0xac79[30]],_0xac79[74]);return Session[_0xac79[52]](_[_0xac79[51]](_0x7c33xa,{timeslot:_0x7c33x9[_0xac79[30]],application:_0xac79[49],queue:_0x7c33x25[_0xac79[24]],queuename:_0x7c33x25[_0xac79[15]],calledAt:moment()[_0xac79[37]](_0xac79[50]),joinAt:moment()[_0xac79[37]](_0xac79[50]),membername:null,memberid:null}))})[_0xac79[40]](function(_0x7c33x1f){_0x7c33xc[_0xac79[45]](_0xac79[55])[_0xac79[42]](_0xac79[54],_0x7c33x1f);_0x7c33xc[_0xac79[45]](_0xac79[56])[_0xac79[42]](_0xac79[54],_0x7c33x1f);return Room[_0xac79[72]](_0x7c33xa[_0xac79[71]])})[_0xac79[40]](function(_0x7c33x24){if(_0x7c33x24){return _0x7c33x24[_0xac79[58]]({waiting:true})}})[_0xac79[40]](function(_0x7c33x24){if(_0x7c33x24){_0x7c33xc[_0xac79[42]](_0xac79[70],_0x7c33x24[_0xac79[48]]({plain:true}))}})[_0xac79[40]](function(_0x7c33x24){switch(_0x7c33x11[_0xac79[17]]){case _0xac79[66]:_0x7c33x10= _[_0xac79[65]](_[_0xac79[64]](_0x7c33x11.Users,_0xac79[63]));_0x7c33x20();break;case _0xac79[68]:_0x7c33x10= _0x7c33x11[_0xac79[67]];_0x7c33x16();break;case _0xac79[69]:_0x7c33x10= _0x7c33x11[_0xac79[67]];_0x7c33x16();break;default:}})[_0xac79[39]](function(_0x7c33x19){console[_0xac79[38]](_0x7c33xa[_0xac79[13]][_0xac79[12]](),_0xac79[14],_0x7c33x11[_0xac79[15]][_0xac79[12]](),_0xac79[16],_0x7c33x11[_0xac79[17]],_0xac79[18],_0x7c33xa[_0xac79[19]],_0xac79[62]);console[_0xac79[38]](_0x7c33x19);_0x7c33xd(_0x7c33x19)})}
\ No newline at end of file
+var _0xc669=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x73\x73\x61\x67\x65","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x20\x51\x55\x45\x55\x45\x2C\x20\x51\x55\x45\x55\x45\x3A","\x6E\x61\x6D\x65","\x53\x54\x52\x41\x54\x45\x47\x59\x3A","\x73\x74\x72\x61\x74\x65\x67\x79","\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x41\x47\x45\x4E\x54","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x52\x45\x4A\x45\x43\x54\x45\x44","\x69\x6E\x66\x6F","\x69\x64","\x70\x75\x73\x68","\x72\x65\x6A\x65\x63\x74","\x74\x79\x70\x65","\x6F\x6E","\x66\x69\x6E\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x6D\x61\x70","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x46\x49\x45\x4C\x44\x28\x55\x73\x65\x72\x2E\x69\x64\x2C\x25\x73\x29","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6D\x61\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x25\x64","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x74\x6F","\x73\x68\x69\x66\x74","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74","\x71\x75\x65\x75\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x65\x72\x67\x65","\x63\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x45\x4E\x44\x20\x28\x4E\x4F\x20\x41\x4E\x53\x57\x45\x52\x20\x42\x59\x20\x41\x47\x45\x4E\x54\x53\x29","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x45\x52\x52\x4F\x52","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x67\x72\x6F\x75\x70\x42\x79","\x76\x61\x6C\x75\x65\x73","\x62\x65\x65\x70\x61\x6C\x6C","\x55\x73\x65\x72\x73","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x72\x6F\x6F\x6D\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x41\x53\x43"];_0xc669[0];var _=require(_0xc669[1]);var util=require(_0xc669[2]);var moment=require(_0xc669[3]);var Agent=require(_0xc669[5])[_0xc669[4]];var Room=require(_0xc669[5])[_0xc669[6]];var Queue=require(_0xc669[5])[_0xc669[7]];var Report=require(_0xc669[5])[_0xc669[8]];var Session=require(_0xc669[5])[_0xc669[9]];module[_0xc669[10]]= function(_0x258fx9,_0x258fxa,_0x258fxb,_0x258fxc,_0x258fxd){var _0x258fxe=[];var _0x258fxf;var _0x258fx10;var _0x258fx11;var _0x258fx12=0;process[_0xc669[28]](_0xc669[11],function(_0x258fxb){switch(_0x258fxb[_0xc669[27]]){case _0xc669[26]:console[_0xc669[23]](_0x258fxa[_0xc669[13]][_0xc669[12]](),_0xc669[14],_0x258fx11[_0xc669[15]][_0xc669[12]](),_0xc669[16],_0x258fx11[_0xc669[17]],_0xc669[18],_0x258fxa[_0xc669[19]],_0xc669[20],_0x258fxb[_0xc669[21]],_0xc669[22]);_0x258fxe[_0xc669[25]]({id:_0x258fxb[_0xc669[24]]});break;default:}});function _0x258fx13(_0x258fx14){var _0x258fx15=_[_0xc669[29]](_0x258fxe,{id:_0x258fx14[_0xc669[24]]});return _0x258fx15?true:false}function _0x258fx16(){var _0x258fx17=((_0x258fx9[_0xc669[30]]- _0x258fx12)> _0x258fx11[_0xc669[30]])?_0x258fx11[_0xc669[30]]:(_0x258fx9[_0xc669[30]]- _0x258fx12);if(_0x258fx17> 0){var _0x258fx18={where:{id:{$in:_[_0xc669[31]](_0x258fx10,_0xc669[24])},online:true,mailPause:false},include:[{model:Room,attributes:[_0xc669[24]],raw:true}],attributes:[_0xc669[24],_0xc669[15],_0xc669[32],_0xc669[33],_0xc669[34]],order:[[{raw:util[_0xc669[37]](_0xc669[35],_[_0xc669[31]](_0x258fx10,_0xc669[24])[_0xc669[36]]())}]]};Agent[_0xc669[53]](_0x258fx18)[_0xc669[40]](function(_0x258fx1b){if(_0x258fx1b[_0xc669[47]]){_0x258fx10= _0x258fx1b;for(var _0x258fx1c=0;_0x258fx1c< _0x258fx10[_0xc669[47]];_0x258fx1c++){var _0x258fx1d=_0x258fx10[0][_0xc669[48]]({plain:true});if(!_0x258fx13(_0x258fx1d)){return Report[_0xc669[52]](_[_0xc669[51]](_0x258fxa,{timeslot:_0x258fx17,application:_0xc669[49],membername:_0x258fx1d[_0xc669[15]],memberid:_0x258fx1d[_0xc669[24]],queue:_0x258fx11[_0xc669[24]],queuename:_0x258fx11[_0xc669[15]],calledAt:moment()[_0xc669[37]](_0xc669[50])}))}else {var _0x258fx14=_0x258fx10[_0xc669[46]]();_0x258fx10[_0xc669[25]](_0x258fx14)}}}})[_0xc669[40]](function(_0x258fx1a){if(_0x258fx1a){_0x258fxc[_0xc669[45]](util[_0xc669[37]](_0xc669[43],_0x258fx1a[_0xc669[44]]))[_0xc669[42]](_0xc669[41],_0x258fx1a)};var _0x258fx14=_0x258fx10[_0xc669[46]]();_0x258fx10[_0xc669[25]](_0x258fx14)})[_0xc669[40]](function(){_0x258fxf= setTimeout(function(){_0x258fx12+= _0x258fx11[_0xc669[30]];_0x258fx16()},_0x258fx17* 1000)})[_0xc669[39]](function(_0x258fx19){console[_0xc669[38]](_0x258fx19)})}else {return Session[_0xc669[58]]({leaveAt:moment()[_0xc669[37]](_0xc669[50]),timeout:true},{where:{uniqueid:_0x258fxa[_0xc669[19]],leaveAt:null},individualHooks:true})[_0xc669[40]](function(_0x258fx1e){if(_0x258fx1e&& _0x258fx1e[_0xc669[47]]&& _0x258fx1e[1][_0xc669[47]]){for(var _0x258fx1c=0;_0x258fx1c< _0x258fx1e[1][_0xc669[47]];_0x258fx1c++){var _0x258fx1f=_0x258fx1e[1][_0x258fx1c][_0xc669[48]]({plain:true});_0x258fxc[_0xc669[45]](_0xc669[55])[_0xc669[42]](_0xc669[54],_0x258fx1f);_0x258fxc[_0xc669[45]](_0xc669[56])[_0xc669[42]](_0xc669[54],_0x258fx1f)}};console[_0xc669[23]](_0x258fxa[_0xc669[13]][_0xc669[12]](),_0xc669[14],_0x258fx11[_0xc669[15]][_0xc669[12]](),_0xc669[16],_0x258fx11[_0xc669[17]],_0xc669[18],_0x258fxa[_0xc669[19]],_0xc669[57]);clearTimeout(_0x258fxf);_0x258fxd()})}}function _0x258fx20(){var _0x258fx21=_0x258fx10[_0xc669[46]]();_0x258fx10[_0xc669[25]](_0x258fx21);var _0x258fx17=((_0x258fx9[_0xc669[30]]- _0x258fx12)> _0x258fx11[_0xc669[30]])?_0x258fx11[_0xc669[30]]:(_0x258fx9[_0xc669[30]]- _0x258fx12);if(_0x258fx17> 0){Agent[_0xc669[53]]({where:{id:{$in:_[_0xc669[31]](_0x258fx21,_0xc669[24])},online:true,mailPause:false},raw:true,attributes:[_0xc669[24],_0xc669[15],_0xc669[32],_0xc669[33],_0xc669[34]]})[_0xc669[40]](function(_0x258fx1b){_[_0xc669[59]](_0x258fx1b,function(_0x258fx14){return _0x258fx13(_0x258fx14)});var _0x258fx23=_[_0xc669[31]](_0x258fx1b,function(_0x258fx14){return _[_0xc669[60]](_[_0xc669[51]](_0x258fxa,{timeslot:_0x258fx17,application:_0xc669[49],membername:_0x258fx14[_0xc669[15]],memberid:_0x258fx14[_0xc669[24]],queue:_0x258fx11[_0xc669[24]],queuename:_0x258fx11[_0xc669[15]],calledAt:moment()[_0xc669[37]](_0xc669[50])}))});return Report[_0xc669[61]](_0x258fx23,{individualHooks:true})})[_0xc669[40]](function(_0x258fx22){if(_0x258fx22&& _0x258fx22[_0xc669[47]]){for(var _0x258fx1c=0;_0x258fx1c< _0x258fx22[_0xc669[47]];_0x258fx1c++){var _0x258fx1a=_0x258fx22[_0x258fx1c][_0xc669[48]]({plain:true});_0x258fxc[_0xc669[45]](util[_0xc669[37]](_0xc669[43],_0x258fx1a[_0xc669[44]]))[_0xc669[42]](_0xc669[41],_0x258fx1a)}};_0x258fxf= setTimeout(function(){_0x258fx12+= _0x258fx11[_0xc669[30]];_0x258fx20()},_0x258fx17* 1000)})}else {return Session[_0xc669[58]]({leaveAt:moment()[_0xc669[37]](_0xc669[50]),timeout:true},{where:{uniqueid:_0x258fxa[_0xc669[19]],leaveAt:null},individualHooks:true})[_0xc669[40]](function(_0x258fx1e){if(_0x258fx1e&& _0x258fx1e[_0xc669[47]]&& _0x258fx1e[1][_0xc669[47]]){for(var _0x258fx1c=0;_0x258fx1c< _0x258fx1e[1][_0xc669[47]];_0x258fx1c++){var _0x258fx1f=_0x258fx1e[1][_0x258fx1c][_0xc669[48]]({plain:true});_0x258fxc[_0xc669[45]](_0xc669[55])[_0xc669[42]](_0xc669[54],_0x258fx1f);_0x258fxc[_0xc669[45]](_0xc669[56])[_0xc669[42]](_0xc669[54],_0x258fx1f)}};console[_0xc669[23]](_0x258fxa[_0xc669[13]][_0xc669[12]](),_0xc669[14],_0x258fx11[_0xc669[15]][_0xc669[12]](),_0xc669[16],_0x258fx11[_0xc669[17]],_0xc669[18],_0x258fxa[_0xc669[19]],_0xc669[57]);clearTimeout(_0x258fxf);_0x258fxd()})}}return Queue[_0xc669[72]](_0x258fx9.MailQueueId,{attributes:[_0xc669[24],_0xc669[15],_0xc669[30],_0xc669[17],_0xc669[75]],include:[{model:Agent,attributes:[_0xc669[24]],raw:true,order:[[_0xc669[76],_0xc669[77]]]}]})[_0xc669[40]](function(_0x258fx25){_0x258fx11= _0x258fx25[_0xc669[48]]({plain:true});console[_0xc669[23]](_0x258fxa[_0xc669[13]][_0xc669[12]](),_0xc669[14],_0x258fx11[_0xc669[15]][_0xc669[12]](),_0xc669[16],_0x258fx11[_0xc669[17]],_0xc669[18],_0x258fxa[_0xc669[19]],_0xc669[73],_0x258fx9[_0xc669[30]],_0xc669[74]);return Session[_0xc669[52]](_[_0xc669[51]](_0x258fxa,{timeslot:_0x258fx9[_0xc669[30]],application:_0xc669[49],queue:_0x258fx25[_0xc669[24]],queuename:_0x258fx25[_0xc669[15]],calledAt:moment()[_0xc669[37]](_0xc669[50]),joinAt:moment()[_0xc669[37]](_0xc669[50]),membername:null,memberid:null}))})[_0xc669[40]](function(_0x258fx1f){_0x258fxc[_0xc669[45]](_0xc669[55])[_0xc669[42]](_0xc669[54],_0x258fx1f);_0x258fxc[_0xc669[45]](_0xc669[56])[_0xc669[42]](_0xc669[54],_0x258fx1f);return Room[_0xc669[72]](_0x258fxa[_0xc669[71]])})[_0xc669[40]](function(_0x258fx24){if(_0x258fx24){return _0x258fx24[_0xc669[58]]({waiting:true})}})[_0xc669[40]](function(_0x258fx24){if(_0x258fx24){_0x258fxc[_0xc669[42]](_0xc669[70],_0x258fx24[_0xc669[48]]({plain:true}))}})[_0xc669[40]](function(_0x258fx24){switch(_0x258fx11[_0xc669[17]]){case _0xc669[66]:_0x258fx10= _[_0xc669[65]](_[_0xc669[64]](_0x258fx11.Users,_0xc669[63]));_0x258fx20();break;case _0xc669[68]:_0x258fx10= _0x258fx11[_0xc669[67]];_0x258fx16();break;case _0xc669[69]:_0x258fx10= _0x258fx11[_0xc669[67]];_0x258fx16();break;default:}})[_0xc669[39]](function(_0x258fx19){console[_0xc669[38]](_0x258fxa[_0xc669[13]][_0xc669[12]](),_0xc669[14],_0x258fx11[_0xc669[15]][_0xc669[12]](),_0xc669[16],_0x258fx11[_0xc669[17]],_0xc669[18],_0x258fxa[_0xc669[19]],_0xc669[62]);console[_0xc669[38]](_0x258fx19);_0x258fxd(_0x258fx19)})}
\ No newline at end of file