Built motion from commit fdd6c00de.|1.0.35
[motion.git] / server / config / forked_routing / chat / queue.js
index 9418fae..a0fc805 100644 (file)
@@ -1 +1 @@
-var _0xc3fa=["\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","\x63\x68\x61\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6C\x69\x65\x6E\x74","\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","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\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","\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\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","\x63\x61\x70\x61\x63\x69\x74\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x41\x47\x45\x4E\x54\x20\x53\x45\x4C\x45\x43\x54\x45\x44\x3A","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x73\x70\x6C\x69\x63\x65","\x68\x65\x61\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\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","\x72\x65\x71\x75\x65\x73\x74","\x4E\x4F\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x20\x41\x47\x45\x4E\x54\x53","\x6B\x65\x79\x42\x79","\x69\x6E\x64\x65\x78","\x55\x73\x65\x72","\x71\x75\x65\x72\x79","\x53\x45\x4C\x45\x43\x54\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x20\x61\x73\x20\x69\x64\x2C\x20\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x41\x53\x20\x63\x61\x70\x61\x63\x69\x74\x79\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x20\x57\x48\x45\x52\x45\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x30\x20\x41\x4E\x44\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x30\x20\x41\x4E\x44\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x2C\x20\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\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","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\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","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x61\x6C\x6C","\x73\x68\x6F\x77","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x49\x64","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x72\x65\x73\x6F\x6C\x76\x65","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x73\x6F\x72\x74\x42\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x72\x6F\x6F\x6D\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43"];_0xc3fa[0];var _=require(_0xc3fa[1]);var util=require(_0xc3fa[2]);var moment=require(_0xc3fa[3]);var logger=require(_0xc3fa[5])(_0xc3fa[4]);var rpcClient=require(_0xc3fa[6]);module[_0xc3fa[7]]= function(_0x96b6x6,_0x96b6x7,_0x96b6x8,_0x96b6x9){var _0x96b6xa=[];var _0x96b6xb;var _0x96b6xc;var _0x96b6xd;var _0x96b6xe=0;process[_0xc3fa[25]](_0xc3fa[8],function(_0x96b6xf){switch(_0x96b6xf[_0xc3fa[24]]){case _0xc3fa[23]:logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[17],_0x96b6xf[_0xc3fa[18]],_0xc3fa[19]);_0x96b6xa[_0xc3fa[22]]({id:_0x96b6xf[_0xc3fa[21]]});break;default:}});function _0x96b6x10(_0x96b6x11){var _0x96b6x12=_[_0xc3fa[26]](_0x96b6xa,{id:_0x96b6x11[_0xc3fa[21]]});return _0x96b6x12?true:false}function _0x96b6x13(){var _0x96b6x14=((_0x96b6x6[_0xc3fa[27]]- _0x96b6xe)> _0x96b6xd[_0xc3fa[27]])?_0x96b6xd[_0xc3fa[27]]:(_0x96b6x6[_0xc3fa[27]]- _0x96b6xe);var _0x96b6x15;if(_0x96b6x14> 0){if(_0x96b6xc[_0xc3fa[28]]){var _0x96b6x16={where:{id:{$in:_[_0xc3fa[29]](_0x96b6xc,_0xc3fa[21])},online:true,chatPause:false},include:[{model:_0xc3fa[30],attributes:[_0xc3fa[21]],raw:true}],attributes:[_0xc3fa[21],_0xc3fa[12],_0xc3fa[31],_0xc3fa[32],_0xc3fa[33],_0xc3fa[34]],order:[[{raw:util[_0xc3fa[37]](_0xc3fa[35],_[_0xc3fa[29]](_0x96b6xc,_0xc3fa[21])[_0xc3fa[36]]())}]]};return rpcClient[_0xc3fa[58]](_0xc3fa[63],[_0xc3fa[64]])[_0xc3fa[41]](function(_0x96b6x7){_0x96b6x15= _[_0xc3fa[60]](_0x96b6x7,_0xc3fa[21]);return rpcClient[_0xc3fa[58]](_0xc3fa[61],[_0xc3fa[62],_0x96b6x16])})[_0xc3fa[41]](function(_0x96b6x19){if(_0x96b6x19[_0xc3fa[28]]){var _0x96b6x1a;for(var _0x96b6x1b=0;_0x96b6x1b< _0x96b6x19[_0xc3fa[28]];_0x96b6x1b++){var _0x96b6x11=_0x96b6x19[_0x96b6x1b];var _0x96b6x1c=false;if(_0x96b6x11[_0xc3fa[34]]> 0){if(_0x96b6x15[_0x96b6x11[_0xc3fa[21]]]&& _0x96b6x15[_0x96b6x11[_0xc3fa[21]]][_0xc3fa[48]](_0xc3fa[47])&& _0x96b6x15[_0x96b6x11[_0xc3fa[21]]][_0xc3fa[47]]>= _0x96b6x11[_0xc3fa[34]]){_0x96b6x1c= true}};if(!_0x96b6x10(_0x96b6x11)&&  !_0x96b6x1c){_0x96b6x1a= _0x96b6x11;break}};if(_0x96b6x1a){logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[49],_0x96b6x1a[_0xc3fa[21]],_0x96b6x1a[_0xc3fa[12]]);var _0x96b6x1d=_[_0xc3fa[50]](_0x96b6xc,{"\x69\x64":_0x96b6x1a[_0xc3fa[21]]});if(_0x96b6x1d>= 0){var _0x96b6x1e=_0x96b6xc[_0xc3fa[51]](_0x96b6x1d,1);if(_0x96b6x1e&& _0x96b6x1e[_0xc3fa[28]]){_0x96b6xc[_0xc3fa[22]](_[_0xc3fa[52]](_0x96b6x1e))}};return rpcClient[_0xc3fa[58]](_0xc3fa[53],[_0xc3fa[54],_[_0xc3fa[57]](_0x96b6x7,{timeslot:_0x96b6x14,application:_0xc3fa[55],membername:_0x96b6x1a[_0xc3fa[12]],memberid:_0x96b6x1a[_0xc3fa[21]],queue:_0x96b6xd[_0xc3fa[21]],queuename:_0x96b6xd[_0xc3fa[12]],calledAt:moment()[_0xc3fa[37]](_0xc3fa[56])})])};logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[59]);return}else {logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[59]);return}})[_0xc3fa[41]](function(_0x96b6x18){if(_0x96b6x18){_0x96b6x8[_0xc3fa[46]](util[_0xc3fa[37]](_0xc3fa[44],_0x96b6x18[_0xc3fa[45]]))[_0xc3fa[43]](_0xc3fa[42],_0x96b6x18)}})[_0xc3fa[41]](function(){_0x96b6xb= setTimeout(function(){_0x96b6xe+= _0x96b6xd[_0xc3fa[27]];_0x96b6x13()},_0x96b6x14* 1000)})[_0xc3fa[40]](function(_0x96b6x17){logger[_0xc3fa[39]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[38]);_0x96b6x9(_0x96b6x17)})}else {logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[59]);_0x96b6xb= setTimeout(function(){_0x96b6xe+= _0x96b6xd[_0xc3fa[27]];_0x96b6x13()},_0x96b6x14* 1000)}}else {return rpcClient[_0xc3fa[58]](_0xc3fa[69],[_0xc3fa[70],{leaveAt:moment()[_0xc3fa[37]](_0xc3fa[56]),timeout:true},{where:{uniqueid:_0x96b6x7[_0xc3fa[16]],leaveAt:null},individualHooks:true}])[_0xc3fa[41]](function(_0x96b6x1f){if(_0x96b6x1f&& _0x96b6x1f[_0xc3fa[28]]&& _0x96b6x1f[1][_0xc3fa[28]]){for(var _0x96b6x1b=0;_0x96b6x1b< _0x96b6x1f[1][_0xc3fa[28]];_0x96b6x1b++){var _0x96b6x20=_0x96b6x1f[1][_0x96b6x1b];_0x96b6x8[_0xc3fa[46]](_0xc3fa[67])[_0xc3fa[43]](_0xc3fa[66],_0x96b6x20);_0x96b6x8[_0xc3fa[46]](_0xc3fa[68])[_0xc3fa[43]](_0xc3fa[66],_0x96b6x20)}}})[_0xc3fa[41]](function(){logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[65]);clearTimeout(_0x96b6xb);_0x96b6x9()})[_0xc3fa[40]](function(_0x96b6x17){logger[_0xc3fa[39]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[38]);_0x96b6x9(_0x96b6x17)})}}function _0x96b6x21(){var _0x96b6x14=((_0x96b6x6[_0xc3fa[27]]- _0x96b6xe)> _0x96b6xd[_0xc3fa[27]])?_0x96b6xd[_0xc3fa[27]]:(_0x96b6x6[_0xc3fa[27]]- _0x96b6xe);if(_0x96b6x14> 0){var _0x96b6x15;return rpcClient[_0xc3fa[58]](_0xc3fa[63],[_0xc3fa[64]])[_0xc3fa[41]](function(_0x96b6x7){_0x96b6x15= _[_0xc3fa[60]](_0x96b6x7,_0xc3fa[21]);return rpcClient[_0xc3fa[58]](_0xc3fa[77],[_0xc3fa[78],{where:{id:_0x96b6x6[_0xc3fa[79]]},attributes:[_0xc3fa[21],_0xc3fa[12],_0xc3fa[27],_0xc3fa[14],_0xc3fa[80]],include:[{model:_0xc3fa[62],where:{online:true,chatPause:false},attributes:[_0xc3fa[21],_0xc3fa[12],_0xc3fa[31],_0xc3fa[32],_0xc3fa[33],_0xc3fa[34]],raw:true}]}])})[_0xc3fa[41]](function(_0x96b6x23){if(_0x96b6x23){var _0x96b6x24=_[_0xc3fa[73]](_[_0xc3fa[72]](_0x96b6x23.Users,_0xc3fa[71]));if(_0x96b6x24&& _0x96b6x24[_0xc3fa[28]]){var _0x96b6x25;for(var _0x96b6x1b=0;_0x96b6x1b< _0x96b6x24[_0xc3fa[28]];_0x96b6x1b++){_[_0xc3fa[74]](_0x96b6x24[_0x96b6x1b],function(_0x96b6x11){var _0x96b6x1c=false;if(_0x96b6x11[_0xc3fa[34]]> 0){if(_0x96b6x15[_0x96b6x11[_0xc3fa[21]]]&& _0x96b6x15[_0x96b6x11[_0xc3fa[21]]][_0xc3fa[48]](_0xc3fa[47])&& _0x96b6x15[_0x96b6x11[_0xc3fa[21]]][_0xc3fa[47]]>= _0x96b6x11[_0xc3fa[34]]){_0x96b6x1c= true}};return _0x96b6x10(_0x96b6x11)|| _0x96b6x1c});if(_0x96b6x24[_0x96b6x1b][_0xc3fa[28]]){_0x96b6x25= _0x96b6x24[_0x96b6x1b];break}};if(_0x96b6x25&& _0x96b6x25[_0xc3fa[28]]){var _0x96b6x26=_[_0xc3fa[29]](_0x96b6x25,function(_0x96b6x11){return _[_0xc3fa[75]](_[_0xc3fa[57]](_0x96b6x7,{timeslot:_0x96b6x14,application:_0xc3fa[55],membername:_0x96b6x11[_0xc3fa[12]],memberid:_0x96b6x11[_0xc3fa[21]],queue:_0x96b6xd[_0xc3fa[21]],queuename:_0x96b6xd[_0xc3fa[12]],calledAt:moment()[_0xc3fa[37]](_0xc3fa[56])}))});var _0x96b6x27=[];for(var _0x96b6x28=0;_0x96b6x28< _0x96b6x26[_0xc3fa[28]];_0x96b6x28++){_0x96b6x27[_0xc3fa[22]](rpcClient[_0xc3fa[58]](_0xc3fa[53],[_0xc3fa[54],_0x96b6x26[_0x96b6x28]]))};return Promise[_0xc3fa[76]](_0x96b6x27)}else {logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[59])}}else {logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[59])}}else {logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[59])}})[_0xc3fa[41]](function(_0x96b6x22){if(_0x96b6x22&& _0x96b6x22[_0xc3fa[28]]){for(var _0x96b6x1b=0;_0x96b6x1b< _0x96b6x22[_0xc3fa[28]];_0x96b6x1b++){var _0x96b6x18=_0x96b6x22[_0x96b6x1b];_0x96b6x8[_0xc3fa[46]](util[_0xc3fa[37]](_0xc3fa[44],_0x96b6x18[_0xc3fa[45]]))[_0xc3fa[43]](_0xc3fa[42],_0x96b6x18)}};_0x96b6xb= setTimeout(function(){_0x96b6xe+= _0x96b6xd[_0xc3fa[27]];_0x96b6x21()},_0x96b6x14* 1000)})[_0xc3fa[40]](function(_0x96b6x17){logger[_0xc3fa[39]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[38]);_0x96b6x9(_0x96b6x17)})}else {return rpcClient[_0xc3fa[58]](_0xc3fa[69],[_0xc3fa[70],{leaveAt:moment()[_0xc3fa[37]](_0xc3fa[56]),timeout:true},{where:{uniqueid:_0x96b6x7[_0xc3fa[16]],leaveAt:null},individualHooks:true}])[_0xc3fa[41]](function(_0x96b6x1f){if(_0x96b6x1f&& _0x96b6x1f[_0xc3fa[28]]&& _0x96b6x1f[1][_0xc3fa[28]]){for(var _0x96b6x1b=0;_0x96b6x1b< _0x96b6x1f[1][_0xc3fa[28]];_0x96b6x1b++){var _0x96b6x20=_0x96b6x1f[1][_0x96b6x1b];_0x96b6x8[_0xc3fa[46]](_0xc3fa[67])[_0xc3fa[43]](_0xc3fa[66],_0x96b6x20);_0x96b6x8[_0xc3fa[46]](_0xc3fa[68])[_0xc3fa[43]](_0xc3fa[66],_0x96b6x20)}};logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[65]);clearTimeout(_0x96b6xb);_0x96b6x9();return Promise[_0xc3fa[81]]()})[_0xc3fa[40]](function(_0x96b6x17){logger[_0xc3fa[39]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[38]);_0x96b6x9(_0x96b6x17);return Promise[_0xc3fa[23]](_0x96b6x17)})}}return rpcClient[_0xc3fa[58]](_0xc3fa[77],[_0xc3fa[78],{where:{id:_0x96b6x6[_0xc3fa[79]]},attributes:[_0xc3fa[21],_0xc3fa[12],_0xc3fa[27],_0xc3fa[14],_0xc3fa[80]],include:[{model:_0xc3fa[62],attributes:[_0xc3fa[21]]}]}])[_0xc3fa[41]](function(_0x96b6x23){_0x96b6xd= _0x96b6x23;logger[_0xc3fa[20]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[90],_0x96b6x6[_0xc3fa[27]],_0xc3fa[91]);return rpcClient[_0xc3fa[58]](_0xc3fa[53],[_0xc3fa[70],_[_0xc3fa[57]](_0x96b6x7,{timeslot:_0x96b6x6[_0xc3fa[27]],application:_0xc3fa[55],queue:_0x96b6x23[_0xc3fa[21]],queuename:_0x96b6x23[_0xc3fa[12]],calledAt:moment()[_0xc3fa[37]](_0xc3fa[56]),joinAt:moment()[_0xc3fa[37]](_0xc3fa[56]),membername:null,memberid:null})])})[_0xc3fa[41]](function(_0x96b6x20){_0x96b6x8[_0xc3fa[46]](_0xc3fa[67])[_0xc3fa[43]](_0xc3fa[66],_0x96b6x20);_0x96b6x8[_0xc3fa[46]](_0xc3fa[68])[_0xc3fa[43]](_0xc3fa[66],_0x96b6x20);return rpcClient[_0xc3fa[58]](_0xc3fa[69],[_0xc3fa[30],{waiting:true},{where:{id:_0x96b6x7[_0xc3fa[89]]}}])})[_0xc3fa[41]](function(_0x96b6x29){if(_0x96b6x29){_0x96b6x8[_0xc3fa[43]](_0xc3fa[88],_0x96b6x29)}})[_0xc3fa[41]](function(_0x96b6x29){switch(_0x96b6xd[_0xc3fa[14]]){case _0xc3fa[82]:_0x96b6x21();break;case _0xc3fa[86]:_0x96b6xc= _[_0xc3fa[85]](_0x96b6xd.Users,[function(_0x96b6x2a){return _0x96b6x2a[_0xc3fa[84]][_0xc3fa[83]]|| 0}]);_0x96b6x13();break;case _0xc3fa[87]:_0x96b6xc= _[_0xc3fa[85]](_0x96b6xd.Users,[function(_0x96b6x2a){return _0x96b6x2a[_0xc3fa[84]][_0xc3fa[83]]|| 0}]);_0x96b6x13();break;default:};return Promise[_0xc3fa[81]]()})[_0xc3fa[40]](function(_0x96b6x17){logger[_0xc3fa[39]](_0x96b6x7[_0xc3fa[10]][_0xc3fa[9]](),_0xc3fa[11],_0x96b6xd[_0xc3fa[12]][_0xc3fa[9]](),_0xc3fa[13],_0x96b6xd[_0xc3fa[14]],_0xc3fa[15],_0x96b6x7[_0xc3fa[16]],_0xc3fa[38]);logger[_0xc3fa[39]](_0x96b6x17);_0x96b6x9(_0x96b6x17)})}
\ No newline at end of file
+var _0x6965=["\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","\x63\x68\x61\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x72\x70\x63\x2F\x63\x6C\x69\x65\x6E\x74","\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","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\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","\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\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","\x63\x61\x70\x61\x63\x69\x74\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x41\x47\x45\x4E\x54\x20\x53\x45\x4C\x45\x43\x54\x45\x44\x3A","\x66\x69\x6E\x64\x49\x6E\x64\x65\x78","\x73\x70\x6C\x69\x63\x65","\x68\x65\x61\x64","\x63\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\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","\x72\x65\x71\x75\x65\x73\x74","\x4E\x4F\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x20\x41\x47\x45\x4E\x54\x53","\x6B\x65\x79\x42\x79","\x69\x6E\x64\x65\x78","\x55\x73\x65\x72","\x71\x75\x65\x72\x79","\x53\x45\x4C\x45\x43\x54\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x20\x61\x73\x20\x69\x64\x2C\x20\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x41\x53\x20\x63\x61\x70\x61\x63\x69\x74\x79\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x20\x57\x48\x45\x52\x45\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x30\x20\x41\x4E\x44\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x30\x20\x41\x4E\x44\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x2C\x20\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\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","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x61\x64\x6D\x69\x6E\x73","\x75\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\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","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x61\x6C\x6C","\x73\x68\x6F\x77","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x49\x64","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x72\x65\x73\x6F\x6C\x76\x65","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x73\x6F\x72\x74\x42\x79","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x72\x6F\x6F\x6D\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x53\x45\x43"];_0x6965[0];var _=require(_0x6965[1]);var util=require(_0x6965[2]);var moment=require(_0x6965[3]);var logger=require(_0x6965[5])(_0x6965[4]);var rpcClient=require(_0x6965[6]);module[_0x6965[7]]= function(_0x20c1x6,_0x20c1x7,_0x20c1x8,_0x20c1x9){var _0x20c1xa=[];var _0x20c1xb;var _0x20c1xc;var _0x20c1xd;var _0x20c1xe=0;process[_0x6965[25]](_0x6965[8],function(_0x20c1xf){switch(_0x20c1xf[_0x6965[24]]){case _0x6965[23]:logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[17],_0x20c1xf[_0x6965[18]],_0x6965[19]);_0x20c1xa[_0x6965[22]]({id:_0x20c1xf[_0x6965[21]]});break;default:}});function _0x20c1x10(_0x20c1x11){var _0x20c1x12=_[_0x6965[26]](_0x20c1xa,{id:_0x20c1x11[_0x6965[21]]});return _0x20c1x12?true:false}function _0x20c1x13(){var _0x20c1x14=((_0x20c1x6[_0x6965[27]]- _0x20c1xe)> _0x20c1xd[_0x6965[27]])?_0x20c1xd[_0x6965[27]]:(_0x20c1x6[_0x6965[27]]- _0x20c1xe);var _0x20c1x15;if(_0x20c1x14> 0){if(_0x20c1xc[_0x6965[28]]){var _0x20c1x16={where:{id:{$in:_[_0x6965[29]](_0x20c1xc,_0x6965[21])},online:true,chatPause:false},include:[{model:_0x6965[30],attributes:[_0x6965[21]],raw:true}],attributes:[_0x6965[21],_0x6965[12],_0x6965[31],_0x6965[32],_0x6965[33],_0x6965[34]],order:[[{raw:util[_0x6965[37]](_0x6965[35],_[_0x6965[29]](_0x20c1xc,_0x6965[21])[_0x6965[36]]())}]]};return rpcClient[_0x6965[58]](_0x6965[63],[_0x6965[64]])[_0x6965[41]](function(_0x20c1x7){_0x20c1x15= _[_0x6965[60]](_0x20c1x7,_0x6965[21]);return rpcClient[_0x6965[58]](_0x6965[61],[_0x6965[62],_0x20c1x16])})[_0x6965[41]](function(_0x20c1x19){if(_0x20c1x19[_0x6965[28]]){var _0x20c1x1a;for(var _0x20c1x1b=0;_0x20c1x1b< _0x20c1x19[_0x6965[28]];_0x20c1x1b++){var _0x20c1x11=_0x20c1x19[_0x20c1x1b];var _0x20c1x1c=false;if(_0x20c1x11[_0x6965[34]]> 0){if(_0x20c1x15[_0x20c1x11[_0x6965[21]]]&& _0x20c1x15[_0x20c1x11[_0x6965[21]]][_0x6965[48]](_0x6965[47])&& _0x20c1x15[_0x20c1x11[_0x6965[21]]][_0x6965[47]]>= _0x20c1x11[_0x6965[34]]){_0x20c1x1c= true}};if(!_0x20c1x10(_0x20c1x11)&&  !_0x20c1x1c){_0x20c1x1a= _0x20c1x11;break}};if(_0x20c1x1a){logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[49],_0x20c1x1a[_0x6965[21]],_0x20c1x1a[_0x6965[12]]);var _0x20c1x1d=_[_0x6965[50]](_0x20c1xc,{"\x69\x64":_0x20c1x1a[_0x6965[21]]});if(_0x20c1x1d>= 0){var _0x20c1x1e=_0x20c1xc[_0x6965[51]](_0x20c1x1d,1);if(_0x20c1x1e&& _0x20c1x1e[_0x6965[28]]){_0x20c1xc[_0x6965[22]](_[_0x6965[52]](_0x20c1x1e))}};return rpcClient[_0x6965[58]](_0x6965[53],[_0x6965[54],_[_0x6965[57]](_0x20c1x7,{timeslot:_0x20c1x14,application:_0x6965[55],membername:_0x20c1x1a[_0x6965[12]],memberid:_0x20c1x1a[_0x6965[21]],queue:_0x20c1xd[_0x6965[21]],queuename:_0x20c1xd[_0x6965[12]],calledAt:moment()[_0x6965[37]](_0x6965[56])})])};logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[59]);return}else {logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[59]);return}})[_0x6965[41]](function(_0x20c1x18){if(_0x20c1x18){_0x20c1x8[_0x6965[46]](util[_0x6965[37]](_0x6965[44],_0x20c1x18[_0x6965[45]]))[_0x6965[43]](_0x6965[42],_0x20c1x18)}})[_0x6965[41]](function(){_0x20c1xb= setTimeout(function(){_0x20c1xe+= _0x20c1xd[_0x6965[27]];_0x20c1x13()},_0x20c1x14* 1000)})[_0x6965[40]](function(_0x20c1x17){logger[_0x6965[39]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[38]);_0x20c1x9(_0x20c1x17)})}else {logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[59]);_0x20c1xb= setTimeout(function(){_0x20c1xe+= _0x20c1xd[_0x6965[27]];_0x20c1x13()},_0x20c1x14* 1000)}}else {return rpcClient[_0x6965[58]](_0x6965[69],[_0x6965[70],{leaveAt:moment()[_0x6965[37]](_0x6965[56]),timeout:true},{where:{uniqueid:_0x20c1x7[_0x6965[16]],leaveAt:null},individualHooks:true}])[_0x6965[41]](function(_0x20c1x1f){if(_0x20c1x1f&& _0x20c1x1f[_0x6965[28]]&& _0x20c1x1f[1][_0x6965[28]]){for(var _0x20c1x1b=0;_0x20c1x1b< _0x20c1x1f[1][_0x6965[28]];_0x20c1x1b++){var _0x20c1x20=_0x20c1x1f[1][_0x20c1x1b];_0x20c1x8[_0x6965[46]](_0x6965[67])[_0x6965[43]](_0x6965[66],_0x20c1x20);_0x20c1x8[_0x6965[46]](_0x6965[68])[_0x6965[43]](_0x6965[66],_0x20c1x20)}}})[_0x6965[41]](function(){logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[65]);clearTimeout(_0x20c1xb);_0x20c1x9()})[_0x6965[40]](function(_0x20c1x17){logger[_0x6965[39]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[38]);_0x20c1x9(_0x20c1x17)})}}function _0x20c1x21(){var _0x20c1x14=((_0x20c1x6[_0x6965[27]]- _0x20c1xe)> _0x20c1xd[_0x6965[27]])?_0x20c1xd[_0x6965[27]]:(_0x20c1x6[_0x6965[27]]- _0x20c1xe);if(_0x20c1x14> 0){var _0x20c1x15;return rpcClient[_0x6965[58]](_0x6965[63],[_0x6965[64]])[_0x6965[41]](function(_0x20c1x7){_0x20c1x15= _[_0x6965[60]](_0x20c1x7,_0x6965[21]);return rpcClient[_0x6965[58]](_0x6965[77],[_0x6965[78],{where:{id:_0x20c1x6[_0x6965[79]]},attributes:[_0x6965[21],_0x6965[12],_0x6965[27],_0x6965[14],_0x6965[80]],include:[{model:_0x6965[62],where:{online:true,chatPause:false},attributes:[_0x6965[21],_0x6965[12],_0x6965[31],_0x6965[32],_0x6965[33],_0x6965[34]],raw:true}]}])})[_0x6965[41]](function(_0x20c1x23){if(_0x20c1x23){var _0x20c1x24=_[_0x6965[73]](_[_0x6965[72]](_0x20c1x23.Users,_0x6965[71]));if(_0x20c1x24&& _0x20c1x24[_0x6965[28]]){var _0x20c1x25;for(var _0x20c1x1b=0;_0x20c1x1b< _0x20c1x24[_0x6965[28]];_0x20c1x1b++){_[_0x6965[74]](_0x20c1x24[_0x20c1x1b],function(_0x20c1x11){var _0x20c1x1c=false;if(_0x20c1x11[_0x6965[34]]> 0){if(_0x20c1x15[_0x20c1x11[_0x6965[21]]]&& _0x20c1x15[_0x20c1x11[_0x6965[21]]][_0x6965[48]](_0x6965[47])&& _0x20c1x15[_0x20c1x11[_0x6965[21]]][_0x6965[47]]>= _0x20c1x11[_0x6965[34]]){_0x20c1x1c= true}};return _0x20c1x10(_0x20c1x11)|| _0x20c1x1c});if(_0x20c1x24[_0x20c1x1b][_0x6965[28]]){_0x20c1x25= _0x20c1x24[_0x20c1x1b];break}};if(_0x20c1x25&& _0x20c1x25[_0x6965[28]]){var _0x20c1x26=_[_0x6965[29]](_0x20c1x25,function(_0x20c1x11){return _[_0x6965[75]](_[_0x6965[57]](_0x20c1x7,{timeslot:_0x20c1x14,application:_0x6965[55],membername:_0x20c1x11[_0x6965[12]],memberid:_0x20c1x11[_0x6965[21]],queue:_0x20c1xd[_0x6965[21]],queuename:_0x20c1xd[_0x6965[12]],calledAt:moment()[_0x6965[37]](_0x6965[56])}))});var _0x20c1x27=[];for(var _0x20c1x28=0;_0x20c1x28< _0x20c1x26[_0x6965[28]];_0x20c1x28++){_0x20c1x27[_0x6965[22]](rpcClient[_0x6965[58]](_0x6965[53],[_0x6965[54],_0x20c1x26[_0x20c1x28]]))};return Promise[_0x6965[76]](_0x20c1x27)}else {logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[59])}}else {logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[59])}}else {logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[59])}})[_0x6965[41]](function(_0x20c1x22){if(_0x20c1x22&& _0x20c1x22[_0x6965[28]]){for(var _0x20c1x1b=0;_0x20c1x1b< _0x20c1x22[_0x6965[28]];_0x20c1x1b++){var _0x20c1x18=_0x20c1x22[_0x20c1x1b];_0x20c1x8[_0x6965[46]](util[_0x6965[37]](_0x6965[44],_0x20c1x18[_0x6965[45]]))[_0x6965[43]](_0x6965[42],_0x20c1x18)}};_0x20c1xb= setTimeout(function(){_0x20c1xe+= _0x20c1xd[_0x6965[27]];_0x20c1x21()},_0x20c1x14* 1000)})[_0x6965[40]](function(_0x20c1x17){logger[_0x6965[39]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[38]);_0x20c1x9(_0x20c1x17)})}else {return rpcClient[_0x6965[58]](_0x6965[69],[_0x6965[70],{leaveAt:moment()[_0x6965[37]](_0x6965[56]),timeout:true},{where:{uniqueid:_0x20c1x7[_0x6965[16]],leaveAt:null},individualHooks:true}])[_0x6965[41]](function(_0x20c1x1f){if(_0x20c1x1f&& _0x20c1x1f[_0x6965[28]]&& _0x20c1x1f[1][_0x6965[28]]){for(var _0x20c1x1b=0;_0x20c1x1b< _0x20c1x1f[1][_0x6965[28]];_0x20c1x1b++){var _0x20c1x20=_0x20c1x1f[1][_0x20c1x1b];_0x20c1x8[_0x6965[46]](_0x6965[67])[_0x6965[43]](_0x6965[66],_0x20c1x20);_0x20c1x8[_0x6965[46]](_0x6965[68])[_0x6965[43]](_0x6965[66],_0x20c1x20)}};logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[65]);clearTimeout(_0x20c1xb);_0x20c1x9();return Promise[_0x6965[81]]()})[_0x6965[40]](function(_0x20c1x17){logger[_0x6965[39]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[38]);_0x20c1x9(_0x20c1x17);return Promise[_0x6965[23]](_0x20c1x17)})}}return rpcClient[_0x6965[58]](_0x6965[77],[_0x6965[78],{where:{id:_0x20c1x6[_0x6965[79]]},attributes:[_0x6965[21],_0x6965[12],_0x6965[27],_0x6965[14],_0x6965[80]],include:[{model:_0x6965[62],attributes:[_0x6965[21]]}]}])[_0x6965[41]](function(_0x20c1x23){_0x20c1xd= _0x20c1x23;logger[_0x6965[20]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[90],_0x20c1x6[_0x6965[27]],_0x6965[91]);return rpcClient[_0x6965[58]](_0x6965[53],[_0x6965[70],_[_0x6965[57]](_0x20c1x7,{timeslot:_0x20c1x6[_0x6965[27]],application:_0x6965[55],queue:_0x20c1x23[_0x6965[21]],queuename:_0x20c1x23[_0x6965[12]],calledAt:moment()[_0x6965[37]](_0x6965[56]),joinAt:moment()[_0x6965[37]](_0x6965[56]),membername:null,memberid:null})])})[_0x6965[41]](function(_0x20c1x20){_0x20c1x8[_0x6965[46]](_0x6965[67])[_0x6965[43]](_0x6965[66],_0x20c1x20);_0x20c1x8[_0x6965[46]](_0x6965[68])[_0x6965[43]](_0x6965[66],_0x20c1x20);return rpcClient[_0x6965[58]](_0x6965[69],[_0x6965[30],{waiting:true},{where:{id:_0x20c1x7[_0x6965[89]]}}])})[_0x6965[41]](function(_0x20c1x29){if(_0x20c1x29){_0x20c1x8[_0x6965[43]](_0x6965[88],_0x20c1x29)}})[_0x6965[41]](function(_0x20c1x29){switch(_0x20c1xd[_0x6965[14]]){case _0x6965[82]:_0x20c1x21();break;case _0x6965[86]:_0x20c1xc= _[_0x6965[85]](_0x20c1xd.Users,[function(_0x20c1x2a){return _0x20c1x2a[_0x6965[84]][_0x6965[83]]|| 0}]);_0x20c1x13();break;case _0x6965[87]:_0x20c1xc= _[_0x6965[85]](_0x20c1xd.Users,[function(_0x20c1x2a){return _0x20c1x2a[_0x6965[84]][_0x6965[83]]|| 0}]);_0x20c1x13();break;default:};return Promise[_0x6965[81]]()})[_0x6965[40]](function(_0x20c1x17){logger[_0x6965[39]](_0x20c1x7[_0x6965[10]][_0x6965[9]](),_0x6965[11],_0x20c1xd[_0x6965[12]][_0x6965[9]](),_0x6965[13],_0x20c1xd[_0x6965[14]],_0x6965[15],_0x20c1x7[_0x6965[16]],_0x6965[38]);logger[_0x6965[39]](_0x20c1x17);_0x20c1x9(_0x20c1x17)})}
\ No newline at end of file