Built motion from commit c36c9c6.|1.0.17
[motion.git] / server / config / forked_routing / sms / queue.js
index 1f09dbd..c3450ea 100644 (file)
@@ -1 +1 @@
-var _0xdfcb=["\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","\x53\x6D\x73\x52\x6F\x6F\x6D","\x53\x6D\x73\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\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","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x73\x6D\x73\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","\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\x73\x6D\x73\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","\x67\x65\x74","\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","\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","\x4E\x4F\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x20\x41\x47\x45\x4E\x54\x53","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\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","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\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","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\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","\x73\x6D\x73\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"];_0xdfcb[0];var _=require(_0xdfcb[1]);var util=require(_0xdfcb[2]);var moment=require(_0xdfcb[3]);var Agent=require(_0xdfcb[5])[_0xdfcb[4]];var Room=require(_0xdfcb[5])[_0xdfcb[6]];var Queue=require(_0xdfcb[5])[_0xdfcb[7]];var Report=require(_0xdfcb[5])[_0xdfcb[8]];var Session=require(_0xdfcb[5])[_0xdfcb[9]];module[_0xdfcb[10]]= function(_0xec03x9,_0xec03xa,_0xec03xb,_0xec03xc,_0xec03xd){var _0xec03xe=[];var _0xec03xf;var _0xec03x10;var _0xec03x11;var _0xec03x12=0;process[_0xdfcb[28]](_0xdfcb[11],function(_0xec03xb){switch(_0xec03xb[_0xdfcb[27]]){case _0xdfcb[26]:console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[20],_0xec03xb[_0xdfcb[21]],_0xdfcb[22]);_0xec03xe[_0xdfcb[25]]({id:_0xec03xb[_0xdfcb[24]]});break;default:}});function _0xec03x13(_0xec03x14){var _0xec03x15=_[_0xdfcb[29]](_0xec03xe,{id:_0xec03x14[_0xdfcb[24]]});return _0xec03x15?true:false}function _0xec03x16(){var _0xec03x17=((_0xec03x9[_0xdfcb[30]]- _0xec03x12)> _0xec03x11[_0xdfcb[30]])?_0xec03x11[_0xdfcb[30]]:(_0xec03x9[_0xdfcb[30]]- _0xec03x12);if(_0xec03x17> 0){if(_0xec03x10[_0xdfcb[31]]){var _0xec03x18={where:{id:{$in:_[_0xdfcb[32]](_0xec03x10,_0xdfcb[24])},online:true,smsPause:false},include:[{model:Room,attributes:[_0xdfcb[24]],raw:true}],attributes:[_0xdfcb[24],_0xdfcb[15],_0xdfcb[33],_0xdfcb[34],_0xdfcb[35]],order:[[{raw:util[_0xdfcb[38]](_0xdfcb[36],_[_0xdfcb[32]](_0xec03x10,_0xdfcb[24])[_0xdfcb[37]]())}]]};Agent[_0xdfcb[58]](_0xec03x18)[_0xdfcb[42]](function(_0xec03x1b){if(_0xec03x1b[_0xdfcb[31]]){var _0xec03x1c;for(var _0xec03x1d=0;_0xec03x1d< _0xec03x1b[_0xdfcb[31]];_0xec03x1d++){var _0xec03x14=_0xec03x1b[_0xec03x1d][_0xdfcb[48]]({plain:true});if(!_0xec03x13(_0xec03x14)){_0xec03x1c= _0xec03x14;break}};if(_0xec03x1c){console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[49],_0xec03x1c[_0xdfcb[24]],_0xec03x1c[_0xdfcb[15]]);var _0xec03x1e=_[_0xdfcb[50]](_0xec03x10,{"\x69\x64":_0xec03x1c[_0xdfcb[24]]});if(_0xec03x1e>= 0){var _0xec03x1f=_0xec03x10[_0xdfcb[51]](_0xec03x1e,1);if(_0xec03x1f&& _0xec03x1f[_0xdfcb[31]]){_0xec03x10[_0xdfcb[25]](_[_0xdfcb[52]](_0xec03x1f))}};return Report[_0xdfcb[56]](_[_0xdfcb[55]](_0xec03xa,{timeslot:_0xec03x17,application:_0xdfcb[53],membername:_0xec03x1c[_0xdfcb[15]],memberid:_0xec03x1c[_0xdfcb[24]],queue:_0xec03x11[_0xdfcb[24]],queuename:_0xec03x11[_0xdfcb[15]],calledAt:moment()[_0xdfcb[38]](_0xdfcb[54])}))};console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57]);return}else {console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57]);return}})[_0xdfcb[42]](function(_0xec03x1a){if(_0xec03x1a){_0xec03xc[_0xdfcb[47]](util[_0xdfcb[38]](_0xdfcb[45],_0xec03x1a[_0xdfcb[46]]))[_0xdfcb[44]](_0xdfcb[43],_0xec03x1a)}})[_0xdfcb[42]](function(){_0xec03xf= setTimeout(function(){_0xec03x12+= _0xec03x11[_0xdfcb[30]];_0xec03x16()},_0xec03x17* 1000)})[_0xdfcb[41]](function(_0xec03x19){console[_0xdfcb[40]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[39]);_0xec03xd(_0xec03x19)})}else {console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57]);_0xec03xf= setTimeout(function(){_0xec03x12+= _0xec03x11[_0xdfcb[30]];_0xec03x16()},_0xec03x17* 1000)}}else {return Session[_0xdfcb[63]]({leaveAt:moment()[_0xdfcb[38]](_0xdfcb[54]),timeout:true},{where:{uniqueid:_0xec03xa[_0xdfcb[19]],leaveAt:null},individualHooks:true})[_0xdfcb[42]](function(_0xec03x20){if(_0xec03x20&& _0xec03x20[_0xdfcb[31]]&& _0xec03x20[1][_0xdfcb[31]]){for(var _0xec03x1d=0;_0xec03x1d< _0xec03x20[1][_0xdfcb[31]];_0xec03x1d++){var _0xec03x21=_0xec03x20[1][_0xec03x1d][_0xdfcb[48]]({plain:true});_0xec03xc[_0xdfcb[47]](_0xdfcb[60])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21);_0xec03xc[_0xdfcb[47]](_0xdfcb[61])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21)}};console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[62]);clearTimeout(_0xec03xf);_0xec03xd()})[_0xdfcb[41]](function(_0xec03x19){console[_0xdfcb[40]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[39]);_0xec03xd(_0xec03x19)})}}function _0xec03x22(){var _0xec03x17=((_0xec03x9[_0xdfcb[30]]- _0xec03x12)> _0xec03x11[_0xdfcb[30]])?_0xec03x11[_0xdfcb[30]]:(_0xec03x9[_0xdfcb[30]]- _0xec03x12);if(_0xec03x17> 0){Queue[_0xdfcb[71]](_0xec03x9.SmsQueueId,{attributes:[_0xdfcb[24],_0xdfcb[15],_0xdfcb[30],_0xdfcb[17],_0xdfcb[70]],include:[{model:Agent,where:{online:true,smsPause:false},attributes:[_0xdfcb[24],_0xdfcb[15],_0xdfcb[33],_0xdfcb[34],_0xdfcb[35]],raw:true}]})[_0xdfcb[42]](function(_0xec03x24){if(_0xec03x24){var _0xec03x1b=_[_0xdfcb[66]](_[_0xdfcb[65]](_0xec03x24.Users,_0xdfcb[64]));if(_0xec03x1b&& _0xec03x1b[_0xdfcb[31]]){var _0xec03x25;for(var _0xec03x1d=0;_0xec03x1d< _0xec03x1b[_0xdfcb[31]];_0xec03x1d++){_[_0xdfcb[67]](_0xec03x1b[_0xec03x1d],function(_0xec03x14){return _0xec03x13(_0xec03x14)});if(_0xec03x1b[_0xec03x1d][_0xdfcb[31]]){_0xec03x25= _0xec03x1b[_0xec03x1d];break}};if(_0xec03x25&& _0xec03x25[_0xdfcb[31]]){var _0xec03x26=_[_0xdfcb[32]](_0xec03x25,function(_0xec03x14){return _[_0xdfcb[68]](_[_0xdfcb[55]](_0xec03xa,{timeslot:_0xec03x17,application:_0xdfcb[53],membername:_0xec03x14[_0xdfcb[15]],memberid:_0xec03x14[_0xdfcb[24]],queue:_0xec03x11[_0xdfcb[24]],queuename:_0xec03x11[_0xdfcb[15]],calledAt:moment()[_0xdfcb[38]](_0xdfcb[54])}))});return Report[_0xdfcb[69]](_0xec03x26,{individualHooks:true})}else {console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57])}}else {console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57])}}else {console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[57])}})[_0xdfcb[42]](function(_0xec03x23){if(_0xec03x23&& _0xec03x23[_0xdfcb[31]]){for(var _0xec03x1d=0;_0xec03x1d< _0xec03x23[_0xdfcb[31]];_0xec03x1d++){var _0xec03x1a=_0xec03x23[_0xec03x1d][_0xdfcb[48]]({plain:true});_0xec03xc[_0xdfcb[47]](util[_0xdfcb[38]](_0xdfcb[45],_0xec03x1a[_0xdfcb[46]]))[_0xdfcb[44]](_0xdfcb[43],_0xec03x1a)}};_0xec03xf= setTimeout(function(){_0xec03x12+= _0xec03x11[_0xdfcb[30]];_0xec03x22()},_0xec03x17* 1000)})[_0xdfcb[41]](function(_0xec03x19){console[_0xdfcb[40]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[39]);_0xec03xd(_0xec03x19)})}else {return Session[_0xdfcb[63]]({leaveAt:moment()[_0xdfcb[38]](_0xdfcb[54]),timeout:true},{where:{uniqueid:_0xec03xa[_0xdfcb[19]],leaveAt:null},individualHooks:true})[_0xdfcb[42]](function(_0xec03x20){if(_0xec03x20&& _0xec03x20[_0xdfcb[31]]&& _0xec03x20[1][_0xdfcb[31]]){for(var _0xec03x1d=0;_0xec03x1d< _0xec03x20[1][_0xdfcb[31]];_0xec03x1d++){var _0xec03x21=_0xec03x20[1][_0xec03x1d][_0xdfcb[48]]({plain:true});_0xec03xc[_0xdfcb[47]](_0xdfcb[60])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21);_0xec03xc[_0xdfcb[47]](_0xdfcb[61])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21)}};console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[62]);clearTimeout(_0xec03xf);_0xec03xd()})[_0xdfcb[41]](function(_0xec03x19){console[_0xdfcb[40]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[39]);_0xec03xd(_0xec03x19)})}}return Queue[_0xdfcb[71]](_0xec03x9.SmsQueueId,{attributes:[_0xdfcb[24],_0xdfcb[15],_0xdfcb[30],_0xdfcb[17],_0xdfcb[70]],include:[{model:Agent,attributes:[_0xdfcb[24]],raw:true}]})[_0xdfcb[42]](function(_0xec03x24){_0xec03x11= _0xec03x24[_0xdfcb[48]]({plain:true});console[_0xdfcb[23]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[80],_0xec03x9[_0xdfcb[30]],_0xdfcb[81]);return Session[_0xdfcb[56]](_[_0xdfcb[55]](_0xec03xa,{timeslot:_0xec03x9[_0xdfcb[30]],application:_0xdfcb[53],queue:_0xec03x24[_0xdfcb[24]],queuename:_0xec03x24[_0xdfcb[15]],calledAt:moment()[_0xdfcb[38]](_0xdfcb[54]),joinAt:moment()[_0xdfcb[38]](_0xdfcb[54]),membername:null,memberid:null}))})[_0xdfcb[42]](function(_0xec03x21){_0xec03xc[_0xdfcb[47]](_0xdfcb[60])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21);_0xec03xc[_0xdfcb[47]](_0xdfcb[61])[_0xdfcb[44]](_0xdfcb[59],_0xec03x21);return Room[_0xdfcb[71]](_0xec03xa[_0xdfcb[79]])})[_0xdfcb[42]](function(_0xec03x27){if(_0xec03x27){return _0xec03x27[_0xdfcb[63]]({waiting:true})}})[_0xdfcb[42]](function(_0xec03x27){if(_0xec03x27){_0xec03xc[_0xdfcb[44]](_0xdfcb[78],_0xec03x27[_0xdfcb[48]]({plain:true}))}})[_0xdfcb[42]](function(_0xec03x27){switch(_0xec03x11[_0xdfcb[17]]){case _0xdfcb[72]:_0xec03x22();break;case _0xdfcb[76]:_0xec03x10= _[_0xdfcb[75]](_0xec03x11.Users,[function(_0xec03x28){return _0xec03x28[_0xdfcb[74]][_0xdfcb[73]]|| 0}]);_0xec03x16();break;case _0xdfcb[77]:_0xec03x10= _[_0xdfcb[75]](_0xec03x11.Users,[function(_0xec03x28){return _0xec03x28[_0xdfcb[74]][_0xdfcb[73]]|| 0}]);_0xec03x16();break;default:}})[_0xdfcb[41]](function(_0xec03x19){console[_0xdfcb[40]](_0xec03xa[_0xdfcb[13]][_0xdfcb[12]](),_0xdfcb[14],_0xec03x11[_0xdfcb[15]][_0xdfcb[12]](),_0xdfcb[16],_0xec03x11[_0xdfcb[17]],_0xdfcb[18],_0xec03xa[_0xdfcb[19]],_0xdfcb[39]);console[_0xdfcb[40]](_0xec03x19);_0xec03xd(_0xec03x19)})}
\ No newline at end of file
+var _0xb433=["\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","\x53\x6D\x73\x52\x6F\x6F\x6D","\x53\x6D\x73\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\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","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x70","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x73\x6D\x73\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","\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\x73\x6D\x73\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","\x67\x65\x74","\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","\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","\x4E\x4F\x20\x41\x56\x41\x49\x4C\x41\x42\x4C\x45\x20\x41\x47\x45\x4E\x54\x53","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\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","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\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","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x62\x65\x65\x70\x61\x6C\x6C","\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\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","\x73\x6D\x73\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"];_0xb433[0];var _=require(_0xb433[1]);var util=require(_0xb433[2]);var moment=require(_0xb433[3]);var Agent=require(_0xb433[5])[_0xb433[4]];var Room=require(_0xb433[5])[_0xb433[6]];var Queue=require(_0xb433[5])[_0xb433[7]];var Report=require(_0xb433[5])[_0xb433[8]];var Session=require(_0xb433[5])[_0xb433[9]];module[_0xb433[10]]= function(_0xaebex9,_0xaebexa,_0xaebexb,_0xaebexc,_0xaebexd){var _0xaebexe=[];var _0xaebexf;var _0xaebex10;var _0xaebex11;var _0xaebex12=0;process[_0xb433[28]](_0xb433[11],function(_0xaebexb){switch(_0xaebexb[_0xb433[27]]){case _0xb433[26]:console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[20],_0xaebexb[_0xb433[21]],_0xb433[22]);_0xaebexe[_0xb433[25]]({id:_0xaebexb[_0xb433[24]]});break;default:}});function _0xaebex13(_0xaebex14){var _0xaebex15=_[_0xb433[29]](_0xaebexe,{id:_0xaebex14[_0xb433[24]]});return _0xaebex15?true:false}function _0xaebex16(){var _0xaebex17=((_0xaebex9[_0xb433[30]]- _0xaebex12)> _0xaebex11[_0xb433[30]])?_0xaebex11[_0xb433[30]]:(_0xaebex9[_0xb433[30]]- _0xaebex12);if(_0xaebex17> 0){if(_0xaebex10[_0xb433[31]]){var _0xaebex18={where:{id:{$in:_[_0xb433[32]](_0xaebex10,_0xb433[24])},online:true,smsPause:false},include:[{model:Room,attributes:[_0xb433[24]],raw:true}],attributes:[_0xb433[24],_0xb433[15],_0xb433[33],_0xb433[34],_0xb433[35]],order:[[{raw:util[_0xb433[38]](_0xb433[36],_[_0xb433[32]](_0xaebex10,_0xb433[24])[_0xb433[37]]())}]]};Agent[_0xb433[58]](_0xaebex18)[_0xb433[42]](function(_0xaebex1b){if(_0xaebex1b[_0xb433[31]]){var _0xaebex1c;for(var _0xaebex1d=0;_0xaebex1d< _0xaebex1b[_0xb433[31]];_0xaebex1d++){var _0xaebex14=_0xaebex1b[_0xaebex1d][_0xb433[48]]({plain:true});if(!_0xaebex13(_0xaebex14)){_0xaebex1c= _0xaebex14;break}};if(_0xaebex1c){console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[49],_0xaebex1c[_0xb433[24]],_0xaebex1c[_0xb433[15]]);var _0xaebex1e=_[_0xb433[50]](_0xaebex10,{"\x69\x64":_0xaebex1c[_0xb433[24]]});if(_0xaebex1e>= 0){var _0xaebex1f=_0xaebex10[_0xb433[51]](_0xaebex1e,1);if(_0xaebex1f&& _0xaebex1f[_0xb433[31]]){_0xaebex10[_0xb433[25]](_[_0xb433[52]](_0xaebex1f))}};return Report[_0xb433[56]](_[_0xb433[55]](_0xaebexa,{timeslot:_0xaebex17,application:_0xb433[53],membername:_0xaebex1c[_0xb433[15]],memberid:_0xaebex1c[_0xb433[24]],queue:_0xaebex11[_0xb433[24]],queuename:_0xaebex11[_0xb433[15]],calledAt:moment()[_0xb433[38]](_0xb433[54])}))};console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[57]);return}else {console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[57]);return}})[_0xb433[42]](function(_0xaebex1a){if(_0xaebex1a){_0xaebexc[_0xb433[47]](util[_0xb433[38]](_0xb433[45],_0xaebex1a[_0xb433[46]]))[_0xb433[44]](_0xb433[43],_0xaebex1a)}})[_0xb433[42]](function(){_0xaebexf= setTimeout(function(){_0xaebex12+= _0xaebex11[_0xb433[30]];_0xaebex16()},_0xaebex17* 1000)})[_0xb433[41]](function(_0xaebex19){console[_0xb433[40]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[39]);_0xaebexd(_0xaebex19)})}else {console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[57]);_0xaebexf= setTimeout(function(){_0xaebex12+= _0xaebex11[_0xb433[30]];_0xaebex16()},_0xaebex17* 1000)}}else {return Session[_0xb433[63]]({leaveAt:moment()[_0xb433[38]](_0xb433[54]),timeout:true},{where:{uniqueid:_0xaebexa[_0xb433[19]],leaveAt:null},individualHooks:true})[_0xb433[42]](function(_0xaebex20){if(_0xaebex20&& _0xaebex20[_0xb433[31]]&& _0xaebex20[1][_0xb433[31]]){for(var _0xaebex1d=0;_0xaebex1d< _0xaebex20[1][_0xb433[31]];_0xaebex1d++){var _0xaebex21=_0xaebex20[1][_0xaebex1d][_0xb433[48]]({plain:true});_0xaebexc[_0xb433[47]](_0xb433[60])[_0xb433[44]](_0xb433[59],_0xaebex21);_0xaebexc[_0xb433[47]](_0xb433[61])[_0xb433[44]](_0xb433[59],_0xaebex21)}};console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[62]);clearTimeout(_0xaebexf);_0xaebexd()})[_0xb433[41]](function(_0xaebex19){console[_0xb433[40]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[39]);_0xaebexd(_0xaebex19)})}}function _0xaebex22(){var _0xaebex17=((_0xaebex9[_0xb433[30]]- _0xaebex12)> _0xaebex11[_0xb433[30]])?_0xaebex11[_0xb433[30]]:(_0xaebex9[_0xb433[30]]- _0xaebex12);if(_0xaebex17> 0){Queue[_0xb433[71]](_0xaebex9.SmsQueueId,{attributes:[_0xb433[24],_0xb433[15],_0xb433[30],_0xb433[17],_0xb433[70]],include:[{model:Agent,where:{online:true,smsPause:false},attributes:[_0xb433[24],_0xb433[15],_0xb433[33],_0xb433[34],_0xb433[35]],raw:true}]})[_0xb433[42]](function(_0xaebex24){if(_0xaebex24){var _0xaebex1b=_[_0xb433[66]](_[_0xb433[65]](_0xaebex24.Users,_0xb433[64]));if(_0xaebex1b&& _0xaebex1b[_0xb433[31]]){var _0xaebex25;for(var _0xaebex1d=0;_0xaebex1d< _0xaebex1b[_0xb433[31]];_0xaebex1d++){_[_0xb433[67]](_0xaebex1b[_0xaebex1d],function(_0xaebex14){return _0xaebex13(_0xaebex14)});if(_0xaebex1b[_0xaebex1d][_0xb433[31]]){_0xaebex25= _0xaebex1b[_0xaebex1d];break}};if(_0xaebex25&& _0xaebex25[_0xb433[31]]){var _0xaebex26=_[_0xb433[32]](_0xaebex25,function(_0xaebex14){return _[_0xb433[68]](_[_0xb433[55]](_0xaebexa,{timeslot:_0xaebex17,application:_0xb433[53],membername:_0xaebex14[_0xb433[15]],memberid:_0xaebex14[_0xb433[24]],queue:_0xaebex11[_0xb433[24]],queuename:_0xaebex11[_0xb433[15]],calledAt:moment()[_0xb433[38]](_0xb433[54])}))});return Report[_0xb433[69]](_0xaebex26,{individualHooks:true})}else {console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[57])}}else {console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[57])}}else {console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[57])}})[_0xb433[42]](function(_0xaebex23){if(_0xaebex23&& _0xaebex23[_0xb433[31]]){for(var _0xaebex1d=0;_0xaebex1d< _0xaebex23[_0xb433[31]];_0xaebex1d++){var _0xaebex1a=_0xaebex23[_0xaebex1d][_0xb433[48]]({plain:true});_0xaebexc[_0xb433[47]](util[_0xb433[38]](_0xb433[45],_0xaebex1a[_0xb433[46]]))[_0xb433[44]](_0xb433[43],_0xaebex1a)}};_0xaebexf= setTimeout(function(){_0xaebex12+= _0xaebex11[_0xb433[30]];_0xaebex22()},_0xaebex17* 1000)})[_0xb433[41]](function(_0xaebex19){console[_0xb433[40]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[39]);_0xaebexd(_0xaebex19)})}else {return Session[_0xb433[63]]({leaveAt:moment()[_0xb433[38]](_0xb433[54]),timeout:true},{where:{uniqueid:_0xaebexa[_0xb433[19]],leaveAt:null},individualHooks:true})[_0xb433[42]](function(_0xaebex20){if(_0xaebex20&& _0xaebex20[_0xb433[31]]&& _0xaebex20[1][_0xb433[31]]){for(var _0xaebex1d=0;_0xaebex1d< _0xaebex20[1][_0xb433[31]];_0xaebex1d++){var _0xaebex21=_0xaebex20[1][_0xaebex1d][_0xb433[48]]({plain:true});_0xaebexc[_0xb433[47]](_0xb433[60])[_0xb433[44]](_0xb433[59],_0xaebex21);_0xaebexc[_0xb433[47]](_0xb433[61])[_0xb433[44]](_0xb433[59],_0xaebex21)}};console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[62]);clearTimeout(_0xaebexf);_0xaebexd()})[_0xb433[41]](function(_0xaebex19){console[_0xb433[40]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[39]);_0xaebexd(_0xaebex19)})}}return Queue[_0xb433[71]](_0xaebex9.SmsQueueId,{attributes:[_0xb433[24],_0xb433[15],_0xb433[30],_0xb433[17],_0xb433[70]],include:[{model:Agent,attributes:[_0xb433[24]],raw:true}]})[_0xb433[42]](function(_0xaebex24){_0xaebex11= _0xaebex24[_0xb433[48]]({plain:true});console[_0xb433[23]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[80],_0xaebex9[_0xb433[30]],_0xb433[81]);return Session[_0xb433[56]](_[_0xb433[55]](_0xaebexa,{timeslot:_0xaebex9[_0xb433[30]],application:_0xb433[53],queue:_0xaebex24[_0xb433[24]],queuename:_0xaebex24[_0xb433[15]],calledAt:moment()[_0xb433[38]](_0xb433[54]),joinAt:moment()[_0xb433[38]](_0xb433[54]),membername:null,memberid:null}))})[_0xb433[42]](function(_0xaebex21){_0xaebexc[_0xb433[47]](_0xb433[60])[_0xb433[44]](_0xb433[59],_0xaebex21);_0xaebexc[_0xb433[47]](_0xb433[61])[_0xb433[44]](_0xb433[59],_0xaebex21);return Room[_0xb433[71]](_0xaebexa[_0xb433[79]])})[_0xb433[42]](function(_0xaebex27){if(_0xaebex27){return _0xaebex27[_0xb433[63]]({waiting:true})}})[_0xb433[42]](function(_0xaebex27){if(_0xaebex27){_0xaebexc[_0xb433[44]](_0xb433[78],_0xaebex27[_0xb433[48]]({plain:true}))}})[_0xb433[42]](function(_0xaebex27){switch(_0xaebex11[_0xb433[17]]){case _0xb433[72]:_0xaebex22();break;case _0xb433[76]:_0xaebex10= _[_0xb433[75]](_0xaebex11.Users,[function(_0xaebex28){return _0xaebex28[_0xb433[74]][_0xb433[73]]|| 0}]);_0xaebex16();break;case _0xb433[77]:_0xaebex10= _[_0xb433[75]](_0xaebex11.Users,[function(_0xaebex28){return _0xaebex28[_0xb433[74]][_0xb433[73]]|| 0}]);_0xaebex16();break;default:}})[_0xb433[41]](function(_0xaebex19){console[_0xb433[40]](_0xaebexa[_0xb433[13]][_0xb433[12]](),_0xb433[14],_0xaebex11[_0xb433[15]][_0xb433[12]](),_0xb433[16],_0xaebex11[_0xb433[17]],_0xb433[18],_0xaebexa[_0xb433[19]],_0xb433[39]);console[_0xb433[40]](_0xaebex19);_0xaebexd(_0xaebex19)})}
\ No newline at end of file