1 var _0x8326=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x6C\x65\x6E\x67\x74\x68","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x73\x75\x6D\x42\x79","\x72\x6F\x75\x6E\x64","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x75\x6E\x69\x78","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x66\x6F\x72\x45\x61\x63\x68","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x6F\x75\x6E\x74","\x61\x63\x74\x69\x76\x65","\x77\x61\x69\x74\x69\x6E\x67","\x75\x73\x65\x72","\x61\x6C\x6C","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x71\x75\x65\x75\x65\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x75\x69\x54\x6F","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x5F\x75\x69\x54\x6F","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x5F\x75\x69\x54\x6F","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64","\x74\x6F\x74\x61\x6C\x63\x61\x6C\x6C\x73","\x5F\x61\x6E\x73\x77\x65\x72\x65\x64\x46\x72\x6F\x6D","\x61\x6E\x73\x77\x65\x72\x65\x64","\x5F\x61\x6E\x73\x77\x65\x72\x65\x64\x54\x6F","\x5F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x46\x72\x6F\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x54\x6F","\x5F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x46\x72\x6F\x6D","\x5F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x54\x6F","\x5F\x6E\x61\x6D\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x65\x64\x75\x63\x65","\x66\x69\x6C\x74\x65\x72","\x5F\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x73\x6C\x69\x63\x65","\x30\x30\x3A\x30\x30\x3A\x30\x30","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x74\x6F\x74\x61\x6C\x63\x61\x6C\x6C\x73\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x27\x2C\x27","\x6A\x6F\x69\x6E","\x27\x29\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x71\x75\x65\x75\x65","\x43\x4F\x55\x4E\x54","\x63\x6F\x6C","\x66\x6E","\x77\x61\x69\x74\x69\x6E\x67\x43\x61\x6C\x6C\x73","\x71\x75\x65\x75\x65\x46\x69\x6C\x74\x65\x72","\x73\x63\x6F\x70\x65","\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x27\x29","\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x53\x45\x4C\x45\x43\x54\x20\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72"];_0x8326[0];var _=require(_0x8326[1]);var moment=require(_0x8326[2]);var sequelize=require(_0x8326[4])[_0x8326[3]];var Agent=require(_0x8326[4])[_0x8326[5]];var ReportQueue=require(_0x8326[4])[_0x8326[6]];var VoiceQueue=require(_0x8326[4])[_0x8326[7]];var ReportQueueHistory=require(_0x8326[4])[_0x8326[9]][_0x8326[8]];var Util=require(_0x8326[10]);var Promise=require(_0x8326[11]);var logger=require(_0x8326[13])(_0x8326[12]);exports[_0x8326[14]]= function(_0x2664xb,_0x2664xc,_0x2664xd){return ReportQueue[_0x8326[21]](Util[_0x8326[20]](_0x2664xb[_0x8326[19]]))[_0x8326[18]](function(_0x2664xf){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]](_0x2664xf)})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[22]]= function(_0x2664xb,_0x2664xc){return ReportQueue[_0x8326[29]](_0x2664xb[_0x8326[28]][_0x8326[27]])[_0x8326[18]](function(_0x2664x10){if(!_0x2664x10){return _0x2664xc[_0x8326[23]](404)};var _0x2664x11=_[_0x8326[25]](_0x2664x10,_0x2664xb[_0x8326[24]]);return _0x2664x11[_0x8326[26]]()})[_0x8326[18]](function(_0x2664x10){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]](_0x2664x10)})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[30]]= function(_0x2664xb,_0x2664xc){return ReportQueueHistory[_0x8326[30]]()[_0x8326[18]](function(_0x2664x12){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]](_0x2664x12)})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[31]]= function(_0x2664xb,_0x2664xc){var _0x2664x13,_0x2664x14={};return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){_0x2664x13= _0x2664x17;return ReportQueue[_0x8326[47]]({where:{queuecallerleaveAt:null,queuecallerexit:false,queue:_0x2664x13,createdAt:{$gte:moment()[_0x8326[44]](_0x8326[43])}}})})[_0x8326[18]](function(_0x2664x15){_0x2664x14[_0x8326[49]]= _0x2664x15;return ReportQueue[_0x8326[47]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x2664x13,createdAt:{$gte:moment()[_0x8326[44]](_0x8326[43])}}})})[_0x8326[18]](function(_0x2664x15){_0x2664x14[_0x8326[48]]= _0x2664x15;return ReportQueue[_0x8326[47]]({where:{queuecallerabandon:true,queue:_0x2664x13,createdAt:{$gte:moment()[_0x8326[44]](_0x8326[43])}}})})[_0x8326[18]](function(_0x2664x15){_0x2664x14[_0x8326[46]]= _0x2664x15;return ReportQueue[_0x8326[47]]({where:{queuecallerexit:true,queue:_0x2664x13,createdAt:{$gte:moment()[_0x8326[44]](_0x8326[43])}}})})[_0x8326[18]](function(_0x2664x15){_0x2664x14[_0x8326[42]]= _0x2664x15;return ReportQueue[_0x8326[45]]({where:{queuecallercomplete:true,queue:_0x2664x13,createdAt:{$gte:moment()[_0x8326[44]](_0x8326[43])}},raw:true})})[_0x8326[18]](function(_0x2664x15){_0x2664x14[_0x8326[32]]= _0x2664x15[_0x8326[33]];_0x2664x14[_0x8326[34]]= _[_0x8326[36]](_[_0x8326[35]](_0x2664x15,_0x8326[34]));_0x2664x14[_0x8326[37]]= 0;_[_0x8326[41]](_0x2664x15,function(_0x2664x16){_0x2664x14[_0x8326[37]]+= moment(_0x2664x16[_0x8326[39]])[_0x8326[38]]()- moment(_0x2664x16[_0x8326[40]])[_0x8326[38]]()});return _0x2664xc[_0x8326[17]](200)[_0x8326[16]](_0x2664x14)})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[49]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return ReportQueue[_0x8326[47]]({where:{queuecallerleaveAt:null,queuecallerexit:false,queue:_0x2664x17}})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({value:_0x2664x15})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};function getVoiceQueues(_0x2664x19){return function(){switch(_0x2664x19[_0x8326[58]]){case _0x8326[50]:return Agent[_0x8326[29]](_0x2664x19[_0x8326[27]],{attributes:[_0x8326[27]]})[_0x8326[18]](Util[_0x8326[55]]())[_0x8326[18]](function(_0x2664x17){return _[_0x8326[54]](_0x2664x17[_0x8326[52]],_0x8326[53])});case _0x8326[57]:return Agent[_0x8326[29]](_0x2664x19[_0x8326[27]])[_0x8326[18]](function(_0x2664x1a){return _0x2664x1a[_0x8326[56]]({attributes:[_0x8326[53]]})})[_0x8326[18]](function(_0x2664x17){return _[_0x8326[54]](_0x2664x17,_0x8326[53])});default:return VoiceQueue[_0x8326[45]]()[_0x8326[18]](function(_0x2664x1b){return {rows:_0x2664x1b}})[_0x8326[18]](function(_0x2664x17){return _[_0x8326[54]](_0x2664x17[_0x8326[52]],_0x8326[53])})}}}exports[_0x8326[59]]= function(_0x2664xb,_0x2664xc){var _0x2664x1c={_limit:_0x2664xb[_0x8326[19]][_0x8326[60]]?_0x2664xb[_0x8326[19]][_0x8326[60]]:null,_offset:_0x2664xb[_0x8326[19]][_0x8326[61]]?_0x2664xb[_0x8326[19]][_0x8326[61]]:0,_name:_0x2664xb[_0x8326[19]][_0x8326[53]]|| undefined,_answeredFrom:_0x2664xb[_0x8326[19]][_0x8326[62]]|| _0x2664xb[_0x8326[19]][_0x8326[62]]=== 0?_0x2664xb[_0x8326[19]][_0x8326[62]]:undefined,_answeredTo:_0x2664xb[_0x8326[19]][_0x8326[63]]|| _0x2664xb[_0x8326[19]][_0x8326[63]]=== 0?_0x2664xb[_0x8326[19]][_0x8326[63]]:undefined,_abandonedFrom:_0x2664xb[_0x8326[19]][_0x8326[64]]|| _0x2664xb[_0x8326[19]][_0x8326[64]]=== 0?_0x2664xb[_0x8326[19]][_0x8326[64]]:undefined,_abandonedTo:_0x2664xb[_0x8326[19]][_0x8326[65]]|| _0x2664xb[_0x8326[19]][_0x8326[65]]=== 0?_0x2664xb[_0x8326[19]][_0x8326[65]]:undefined,_unmanagedFrom:_0x2664xb[_0x8326[19]][_0x8326[66]]|| _0x2664xb[_0x8326[19]][_0x8326[66]]=== 0?_0x2664xb[_0x8326[19]][_0x8326[66]]:undefined,_unmanagedTo:_0x2664xb[_0x8326[19]][_0x8326[67]]|| _0x2664xb[_0x8326[19]][_0x8326[67]]=== 0?_0x2664xb[_0x8326[19]][_0x8326[67]]:undefined};var _0x2664x1d,_0x2664x13,_0x2664x1e,_0x2664x1f;delete _0x2664xb[_0x8326[19]][_0x8326[60]];delete _0x2664xb[_0x8326[19]][_0x8326[61]];delete _0x2664xb[_0x8326[19]][_0x8326[62]];delete _0x2664xb[_0x8326[19]][_0x8326[63]];delete _0x2664xb[_0x8326[19]][_0x8326[64]];delete _0x2664xb[_0x8326[19]][_0x8326[65]];delete _0x2664xb[_0x8326[19]][_0x8326[66]];delete _0x2664xb[_0x8326[19]][_0x8326[67]];return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){_0x2664x13= _0x2664x17;_0x2664x1d= _[_0x8326[54]](_0x2664x17,function(_0x2664x23){return {name:_0x2664x23}});return ReportQueue[_0x8326[45]]({where:{queuecallerleaveAt:null,queue:_0x2664x13},group:_0x8326[97],attributes:[[_0x8326[97],_0x8326[53]],[sequelize[_0x8326[100]](_0x8326[98],sequelize[_0x8326[99]](_0x8326[27])),_0x8326[49]]]})})[_0x8326[18]](function(_0x2664x35){_0x2664x35= _[_0x8326[54]](_0x2664x35,_0x8326[95]);_0x2664x1d[_0x8326[41]](function(_0x2664x23,_0x2664x36){var _0x2664x24=_[_0x8326[69]](_0x2664x35,{name:_0x2664x23[_0x8326[53]]});_0x2664x23[_0x8326[49]]= _0x2664x24?_0x2664x24[_0x8326[49]]:0});return ReportQueue[_0x8326[45]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x2664x13},group:_0x8326[97],attributes:[[_0x8326[97],_0x8326[53]],[sequelize[_0x8326[100]](_0x8326[98],sequelize[_0x8326[99]](_0x8326[27])),_0x8326[48]]]})})[_0x8326[18]](function(_0x2664x34){_0x2664x34= _[_0x8326[54]](_0x2664x34,_0x8326[95]);_0x2664x1d[_0x8326[41]](function(_0x2664x23){var _0x2664x24=_[_0x8326[69]](_0x2664x34,{name:_0x2664x23[_0x8326[53]]});_0x2664x23[_0x8326[48]]= _0x2664x24?_0x2664x24[_0x8326[48]]:0});return ReportQueue[_0x8326[45]]({where:{queuecallercomplete:true,queue:_0x2664x13},group:_0x8326[97],attributes:[[_0x8326[97],_0x8326[53]],[sequelize[_0x8326[100]](_0x8326[98],sequelize[_0x8326[99]](_0x8326[27])),_0x8326[72]]]})})[_0x8326[18]](function(_0x2664x33){_0x2664x33= _[_0x8326[54]](_0x2664x33,_0x8326[95]);_0x2664x1d[_0x8326[41]](function(_0x2664x23){var _0x2664x24=_[_0x8326[69]](_0x2664x33,{name:_0x2664x23[_0x8326[53]]});_0x2664x23[_0x8326[72]]= _0x2664x24?_0x2664x24[_0x8326[72]]:0});return ReportQueue[_0x8326[45]]({where:{queuecallerabandon:true,queue:_0x2664x13},group:_0x8326[97],attributes:[[_0x8326[97],_0x8326[53]],[sequelize[_0x8326[100]](_0x8326[98],sequelize[_0x8326[99]](_0x8326[27])),_0x8326[75]]]})})[_0x8326[18]](function(_0x2664x32){_0x2664x32= _[_0x8326[54]](_0x2664x32,_0x8326[95]);_0x2664x1d[_0x8326[41]](function(_0x2664x23){var _0x2664x24=_[_0x8326[69]](_0x2664x32,{name:_0x2664x23[_0x8326[53]]});_0x2664x23[_0x8326[75]]= _0x2664x24?_0x2664x24[_0x8326[75]]:0});return ReportQueue[_0x8326[45]]({where:{queuecallerexit:true,queue:_0x2664x13},group:_0x8326[97],attributes:[[_0x8326[97],_0x8326[53]],[sequelize[_0x8326[100]](_0x8326[98],sequelize[_0x8326[99]](_0x8326[27])),_0x8326[42]]]})})[_0x8326[18]](function(_0x2664x31){_0x2664x31= _[_0x8326[54]](_0x2664x31,_0x8326[95]);_0x2664x1d[_0x8326[41]](function(_0x2664x23){var _0x2664x24=_[_0x8326[69]](_0x2664x31,{name:_0x2664x23[_0x8326[53]]});_0x2664x23[_0x8326[42]]= _0x2664x24?_0x2664x24[_0x8326[42]]:0});return sequelize[_0x8326[19]](_0x8326[96]+ _0x2664x13[_0x8326[90]](_0x8326[89])+ _0x8326[91],{type:sequelize[_0x8326[93]][_0x8326[92]]})})[_0x8326[18]](function(_0x2664x30){_0x2664x1d[_0x8326[41]](function(_0x2664x23){var _0x2664x24=_[_0x8326[69]](_0x2664x30,{name:_0x2664x23[_0x8326[53]]});_0x2664x23[_0x8326[34]]= _0x2664x24?_0x2664x24[_0x8326[34]]:_0x8326[87]});return sequelize[_0x8326[19]](_0x8326[94]+ _0x2664x13[_0x8326[90]](_0x8326[89])+ _0x8326[91],{type:sequelize[_0x8326[93]][_0x8326[92]]})})[_0x8326[18]](function(_0x2664x2f){_0x2664x1d[_0x8326[41]](function(_0x2664x23){var _0x2664x24=_[_0x8326[69]](_0x2664x2f,{name:_0x2664x23[_0x8326[53]]});_0x2664x23[_0x8326[37]]= _0x2664x24?_0x2664x24[_0x8326[37]]:_0x8326[87]});return sequelize[_0x8326[19]](_0x8326[88]+ _0x2664x13[_0x8326[90]](_0x8326[89])+ _0x8326[91],{type:sequelize[_0x8326[93]][_0x8326[92]]})})[_0x8326[18]](function(_0x2664x22){_0x2664x1d[_0x8326[41]](function(_0x2664x23){var _0x2664x24=_[_0x8326[69]](_0x2664x22,{name:_0x2664x23[_0x8326[53]]});_0x2664x23[_0x8326[70]]= _0x2664x24?_0x2664x24[_0x8326[70]]:0});var _0x2664x25=_(_[_0x8326[82]](_0x2664x1d,function(_0x2664x23){var _0x2664x26=_0x2664x1c[_0x8326[71]]?(_0x2664x23[_0x8326[72]]>= Number(_0x2664x1c._answeredFrom)):true;var _0x2664x27=_0x2664x1c[_0x8326[73]]?(_0x2664x23[_0x8326[72]]<= Number(_0x2664x1c._answeredTo)):true;var _0x2664x28=_0x2664x1c[_0x8326[74]]?(_0x2664x23[_0x8326[75]]>= Number(_0x2664x1c._abandonedFrom)):true;var _0x2664x29=_0x2664x1c[_0x8326[76]]?(_0x2664x23[_0x8326[75]]<= Number(_0x2664x1c._abandonedTo)):true;var _0x2664x2a=_0x2664x1c[_0x8326[77]]?(_0x2664x23[_0x8326[42]]>= Number(_0x2664x1c._unmanagedFrom)):true;var _0x2664x2b=_0x2664x1c[_0x8326[78]]?(_0x2664x23[_0x8326[42]]<= Number(_0x2664x1c._unmanagedTo)):true;var _0x2664x2c=_0x2664x1c[_0x8326[79]]?_[_0x8326[80]](_0x2664x23[_0x8326[53]],_0x2664x1c._name):true;return _[_0x8326[81]]([_0x2664x26,_0x2664x27,_0x2664x28,_0x2664x29,_0x2664x2a,_0x2664x2b,_0x2664x2c],function(_0x2664x2d,_0x2664x2e){return _0x2664x2d&& _0x2664x2e})}));if(_0x2664x1c[_0x8326[83]]){_0x2664x25= _0x2664x25[_0x8326[86]](_0x2664x1c._offset)[_0x8326[85]](_0x2664x1c._limit)[_0x8326[84]]()};return [_0x2664x1d[_0x8326[33]],_0x2664x25]})[_0x8326[68]](function(_0x2664x20,_0x2664x21){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({rows:_0x2664x21,count:_0x2664x20})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[101]]= function(_0x2664xb,_0x2664xc){var _0x2664x37={};return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return ReportQueue[_0x8326[103]](_0x8326[49],{method:[_0x8326[102],_0x2664x17]})[_0x8326[45]](Util[_0x8326[20]](_0x2664xb[_0x8326[19]],_0x2664x37))})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({rows:_0x2664x15,count:_0x2664x15[_0x8326[33]]})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[48]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return ReportQueue[_0x8326[47]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x2664x17}})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({value:_0x2664x15})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[72]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return ReportQueue[_0x8326[47]]({where:{queuecallercomplete:true,queue:_0x2664x17}})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({value:_0x2664x15})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[75]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return ReportQueue[_0x8326[47]]({where:{queuecallerabandon:true,queue:_0x2664x17}})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({value:_0x2664x15})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[104]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return sequelize[_0x8326[19]](_0x8326[105]+ _0x2664x17[_0x8326[90]](_0x8326[89])+ _0x8326[106],{type:sequelize[_0x8326[93]][_0x8326[92]]})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({value:_0x2664x15[0][_0x8326[84]]})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[107]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return sequelize[_0x8326[19]](_0x8326[108]+ _0x2664x17[_0x8326[90]](_0x8326[89])+ _0x8326[106],{type:sequelize[_0x8326[93]][_0x8326[92]]})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({value:_0x2664x15[0][_0x8326[84]]})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[109]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return sequelize[_0x8326[19]](_0x8326[110]+ _0x2664x17[_0x8326[90]](_0x8326[89])+ _0x8326[106],{type:sequelize[_0x8326[93]][_0x8326[92]]})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({value:_0x2664x15[0][_0x8326[84]]})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[111]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return sequelize[_0x8326[19]](_0x8326[112]+ _0x2664x17[_0x8326[90]](_0x8326[89])+ _0x8326[106],{type:sequelize[_0x8326[93]][_0x8326[92]]})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({value:_0x2664x15[0][_0x8326[84]]})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[113]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return sequelize[_0x8326[19]](_0x8326[114]+ _0x2664x17[_0x8326[90]](_0x8326[89])+ _0x8326[106],{type:sequelize[_0x8326[93]][_0x8326[92]]})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({value:_0x2664x15[0][_0x8326[84]]})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[42]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return ReportQueue[_0x8326[47]]({where:{queuecallerexit:true,queue:_0x2664x17}})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]]({value:_0x2664x15})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[115]]= function(_0x2664xb,_0x2664xc){return Promise[_0x8326[51]]([])[_0x8326[18]](getVoiceQueues(_0x2664xb[_0x8326[50]]))[_0x8326[18]](function(_0x2664x17){return ReportQueue[_0x8326[21]]({where:{queuecallerabandon:true,queue:_0x2664x17}})})[_0x8326[18]](function(_0x2664x15){return _0x2664xc[_0x8326[17]](200)[_0x8326[16]](_0x2664x15)})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};exports[_0x8326[116]]= function(_0x2664xb,_0x2664xc){return ReportQueue[_0x8326[45]]({where:{queue:_0x2664xb[_0x8326[28]][_0x8326[97]]}})[_0x8326[18]](function(_0x2664x38){if(!_0x2664x38){return _0x2664xc[_0x8326[23]](404)};return _0x2664xc[_0x8326[16]]({count:_0x2664x38[_0x8326[33]],rows:_0x2664x38})})[_0x8326[15]](function(_0x2664xe){return handleError(_0x2664xc,_0x2664xe)})};function handleError(_0x2664xc,_0x2664xe){logger[_0x8326[118]](_0x2664xe[_0x8326[117]]);return _0x2664xc[_0x8326[17]](500)[_0x8326[16]](_0x2664xe)}