Built motion from commit 79c4046.|0.0.100
[motion.git] / server / config / routing / mail / session.js
index 675d1a7..dc1b9dd 100644 (file)
@@ -1 +1 @@
-var _0xf204=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\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\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\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","\x4E\x65\x77\x20\x4D\x61\x69\x6C\x20\x73\x65\x73\x73\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x6C\x65\x6E\x67\x74\x68","\x69\x64","\x72\x6F\x6F\x6D\x69\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x66\x69\x6C\x74\x65\x72","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x6E\x61\x6D\x65","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x73\x68\x69\x66\x74","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x70\x75\x73\x68","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x73\x74\x72\x61\x74\x65\x67\x79","\x74\x68\x65\x6E","\x61\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x66\x69\x64\x65\x6C\x69\x74\x79","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x75\x62\x6A\x65\x63\x74","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x61\x64\x64\x72\x65\x73\x73","\x6D\x65\x73\x73\x61\x67\x65\x69\x64","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf204[0];var _=require(_0xf204[1]);var moment=require(_0xf204[2]);var Agent=require(_0xf204[4])[_0xf204[3]];var MailRoom=require(_0xf204[4])[_0xf204[5]];var MailApplication=require(_0xf204[4])[_0xf204[6]];var ReportMail=require(_0xf204[4])[_0xf204[7]];var ReportMailSession=require(_0xf204[4])[_0xf204[8]];function Session(_0x2a25x9,_0x2a25xa){console[_0xf204[10]](_0xf204[9]);var _0x2a25xb=0;var _0x2a25xc,_0x2a25xd;Agent[_0xf204[34]]({where:{id:{$in:_[_0xf204[33]](_0x2a25x9[_0xf204[32]],_0xf204[15])},online:true,mailPause:false},include:[{model:MailRoom,attributes:[_0xf204[15],_0xf204[17]]}],attributes:[_0xf204[15],_0xf204[23],_0xf204[13]]})[_0xf204[31]](function(_0x2a25xf){var _0x2a25x10=_[_0xf204[19]](_0x2a25xf,function(_0x2a25x11){if(_0x2a25x11[_0xf204[13]]===0){return true}else {return _0x2a25x11[_0xf204[13]]>_[_0xf204[19]](_0x2a25x11.MailRooms,function(_0x2a25x12){return _0x2a25x12[_0xf204[15]]!==_0x2a25x9[_0xf204[16]]&&_0x2a25x12[_0xf204[17]]!==_0xf204[18]})[_0xf204[14]]}});var _0x2a25x13=[];var _0x2a25x14;var _0x2a25x11;_0x2a25x9[_0xf204[20]]=((_0x2a25x9[_0xf204[21]]-_0x2a25xb)>_0x2a25x9[_0xf204[22]])?_0x2a25x9[_0xf204[22]]:(_0x2a25x9[_0xf204[21]]-_0x2a25xb);switch(_0x2a25x9[_0xf204[30]]){case _0xf204[28]:_0x2a25x14=_[_0xf204[24]](_0x2a25x10,_0x2a25x13,_0xf204[23]);_0x2a25x11=_0x2a25x14[_0xf204[25]]();if(_0x2a25x11){_0x2a25x9[_0xf204[26]]=[{id:_0x2a25x11[_0xf204[15]],name:_0x2a25x11[_0xf204[23]]}];_0x2a25x13[_0xf204[27]]({id:_0x2a25x11[_0xf204[15]],name:_0x2a25x11[_0xf204[23]]});saveReport(_0x2a25x9)}else {_0x2a25x13=[];_0x2a25x11=_0x2a25x10[_0xf204[25]]();if(_0x2a25x11){_0x2a25x13[_0xf204[27]]({id:_0x2a25x11[_0xf204[15]],name:_0x2a25x11[_0xf204[23]]});saveReport(_0x2a25x9)}};break;case _0xf204[29]:_0x2a25x9[_0xf204[26]]=_0x2a25x10;saveReport(_0x2a25x9);break;default:};_0x2a25xd=setTimeout(function(){clearInterval(_0x2a25xc);return _0x2a25xa(null,false)},_0x2a25x9[_0xf204[21]]*1000);_0x2a25xc=setInterval(function(){_0x2a25xb+=_0x2a25x9[_0xf204[22]];return Agent[_0xf204[34]]({where:{id:{$in:_[_0xf204[33]](_0x2a25x9[_0xf204[32]],_0xf204[15])},online:true,mailPause:false},include:[{model:MailRoom,attributes:[_0xf204[15],_0xf204[17]]}],attributes:[_0xf204[15],_0xf204[23],_0xf204[13]]})[_0xf204[31]](function(_0x2a25xf){_0x2a25x10=_[_0xf204[19]](_0x2a25xf,function(_0x2a25x11){if(_0x2a25x11[_0xf204[13]]===0){return true}else {return _0x2a25x11[_0xf204[13]]>_[_0xf204[19]](_0x2a25x11.MailRooms,function(_0x2a25x12){return _0x2a25x12[_0xf204[15]]!==_0x2a25x9[_0xf204[16]]&&_0x2a25x12[_0xf204[17]]!==_0xf204[18]})[_0xf204[14]]}});_0x2a25x9[_0xf204[20]]=((_0x2a25x9[_0xf204[21]]-_0x2a25xb)>_0x2a25x9[_0xf204[22]])?_0x2a25x9[_0xf204[22]]:(_0x2a25x9[_0xf204[21]]-_0x2a25xb);switch(_0x2a25x9[_0xf204[30]]){case _0xf204[28]:_0x2a25x14=_[_0xf204[24]](_0x2a25x10,_0x2a25x13,_0xf204[23]);_0x2a25x11=_0x2a25x14[_0xf204[25]]();if(_0x2a25x11){_0x2a25x9[_0xf204[26]]=[{id:_0x2a25x11[_0xf204[15]],name:_0x2a25x11[_0xf204[23]]}];_0x2a25x13[_0xf204[27]]({id:_0x2a25x11[_0xf204[15]],name:_0x2a25x11[_0xf204[23]]});saveReport(_0x2a25x9)}else {_0x2a25x13=[];_0x2a25x11=_0x2a25x10[_0xf204[25]]();if(_0x2a25x11){_0x2a25x9[_0xf204[26]]=[{id:_0x2a25x11[_0xf204[15]],name:_0x2a25x11[_0xf204[23]]}];_0x2a25x13[_0xf204[27]]({id:_0x2a25x11[_0xf204[15]],name:_0x2a25x11[_0xf204[23]]});saveReport(_0x2a25x9)}};break;case _0xf204[29]:_0x2a25x9[_0xf204[26]]=_0x2a25x10;saveReport(_0x2a25x9);break;default:}})[_0xf204[12]](function(_0x2a25xe){console[_0xf204[11]](_0x2a25xe)})},_0x2a25x9[_0xf204[22]]*1000)})[_0xf204[12]](function(_0x2a25xe){console[_0xf204[11]](_0x2a25xe)});ReportMail[_0xf204[49]](function(_0x2a25x15){if(_0x2a25x15[_0xf204[36]](_0xf204[35])){return MailRoom[_0xf204[48]](_0x2a25x15[_0xf204[16]])[_0xf204[31]](function(_0x2a25x16){return _0x2a25x16[_0xf204[47]](_0x2a25x15[_0xf204[38]],{individualHooks:true})})[_0xf204[31]](function(){return ReportMailSession[_0xf204[46]]({application:_0x2a25x15[_0xf204[37]],memberid:_0x2a25x15[_0xf204[38]],membername:_0x2a25x15[_0xf204[39]],queue:_0x2a25x15[_0xf204[40]]||null,queuename:_0x2a25x15[_0xf204[41]]||null,fidelity:_0x2a25x15[_0xf204[37]]===_0xf204[42]?_0x2a25x15[_0xf204[20]]:null,queuecallerleaveAt:moment()[_0xf204[44]](_0xf204[43])},{where:{uniqueid:_0x2a25x15[_0xf204[45]]},individualHooks:true})})[_0xf204[31]](function(){clearInterval(_0x2a25xc);clearTimeout(_0x2a25xd);return _0x2a25xa(null,true)})[_0xf204[12]](function(_0x2a25xe){console[_0xf204[11]](_0x2a25xe)})}});return {}}function saveReport(_0x2a25x9){var _0x2a25x18=[];_0x2a25x9[_0xf204[26]][_0xf204[55]](function(_0x2a25x11,_0x2a25x19){_0x2a25x18[_0xf204[27]]({uniqueid:_0x2a25x9[_0xf204[45]],timeslot:_0x2a25x9[_0xf204[20]],subject:_0x2a25x9[_0xf204[50]],accountid:_0x2a25x9[_0xf204[51]],accountname:_0x2a25x9[_0xf204[52]],accountaddress:_0x2a25x9[_0xf204[53]],application:_0x2a25x9[_0xf204[37]],membername:_0x2a25x11[_0xf204[23]],memberid:_0x2a25x11[_0xf204[15]],queue:_0x2a25x9[_0xf204[40]]||null,queuename:_0x2a25x9[_0xf204[41]]||null,roomid:_0x2a25x9[_0xf204[16]]||null,messageid:_0x2a25x9[_0xf204[54]]||null,calledAt:moment()[_0xf204[44]](_0xf204[43])})});if(_0x2a25x18[_0xf204[14]]){return ReportMail[_0xf204[56]](_0x2a25x18,{individualHooks:true})[_0xf204[12]](function(_0x2a25xe){console[_0xf204[11]](_0x2a25xe)})}}module[_0xf204[57]]=Session
\ No newline at end of file
+var _0x4b8d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\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\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4E\x65\x77\x20\x4D\x61\x69\x6C\x20\x73\x65\x73\x73\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x61\x67\x65\x6E\x74\x73","\x69\x64","\x66\x69\x6E\x64","\x70\x65\x6E\x61\x6C\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x6F\x72\x64\x65\x72\x42\x79","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x6C\x65\x6E\x67\x74\x68","\x72\x6F\x6F\x6D\x69\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x66\x69\x6C\x74\x65\x72","\x6E\x61\x6D\x65","\x6D\x61\x70","\x74\x69\x6D\x65\x73\x6C\x6F\x74","\x61\x70\x70\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65\x74\x69\x6D\x65\x6F\x75\x74","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x73\x68\x69\x66\x74","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x70\x75\x73\x68","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x62\x65\x65\x70\x61\x6C\x6C","\x73\x74\x72\x61\x74\x65\x67\x79","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x63\x68\x61\x6E\x67\x65\x64","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x4F\x50\x45\x4E","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x75\x62\x6A\x65\x63\x74","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x61\x64\x64\x72\x65\x73\x73","\x71\x75\x65\x75\x65\x69\x64","\x6D\x65\x73\x73\x61\x67\x65\x69\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4b8d[0];var _=require(_0x4b8d[1]);var moment=require(_0x4b8d[2]);var Agent=require(_0x4b8d[4])[_0x4b8d[3]];var MailRoom=require(_0x4b8d[4])[_0x4b8d[5]];var MailApplication=require(_0x4b8d[4])[_0x4b8d[6]];var ReportMail=require(_0x4b8d[4])[_0x4b8d[7]];var ReportMailRoom=require(_0x4b8d[4])[_0x4b8d[8]];var ReportMailSession=require(_0x4b8d[4])[_0x4b8d[9]];function Session(_0xbbacxa,_0xbbacxb){console[_0x4b8d[11]](_0x4b8d[10]);var _0xbbacxc=0;var _0xbbacxd,_0xbbacxe;var _0xbbacxf=[];Agent[_0x4b8d[40]]({where:{id:{$in:_[_0x4b8d[27]](_0xbbacxa[_0x4b8d[14]],_0x4b8d[15])},online:true,mailPause:false},include:[{model:MailRoom,attributes:[_0x4b8d[15],_0x4b8d[23]]}],attributes:[_0x4b8d[15],_0x4b8d[26],_0x4b8d[20]]})[_0x4b8d[39]](function(_0xbbacx11){_[_0x4b8d[18]](_0xbbacx11,function(_0xbbacx12){var _0xbbacx13=_[_0x4b8d[16]](_0xbbacxa[_0x4b8d[14]],{"\x69\x64":_0xbbacx12[_0x4b8d[15]]});_0xbbacx12[_0x4b8d[17]]=_0xbbacx13[_0x4b8d[17]]});_0xbbacx11=_[_0x4b8d[19]](_0xbbacx11,_0x4b8d[17]);var _0xbbacx14=_[_0x4b8d[27]](_[_0x4b8d[25]](_0xbbacx11,function(_0xbbacx12){if(_0xbbacx12[_0x4b8d[20]]===0){return true}else {return _0xbbacx12[_0x4b8d[20]]>_[_0x4b8d[25]](_0xbbacx12.MailRooms,function(_0xbbacx15){return _0xbbacx15[_0x4b8d[15]]!==_0xbbacxa[_0x4b8d[22]]&&_0xbbacx15[_0x4b8d[23]]!==_0x4b8d[24]})[_0x4b8d[21]]}}),function(_0xbbacx12){return {id:_0xbbacx12[_0x4b8d[15]],name:_0xbbacx12[_0x4b8d[26]]}});var _0xbbacx16=[];var _0xbbacx17;var _0xbbacx12;_0xbbacxa[_0x4b8d[28]]=((_0xbbacxa[_0x4b8d[29]]-_0xbbacxc)>_0xbbacxa[_0x4b8d[30]])?_0xbbacxa[_0x4b8d[30]]:(_0xbbacxa[_0x4b8d[29]]-_0xbbacxc);switch(_0xbbacxa[_0x4b8d[38]]){case _0x4b8d[35]:_0xbbacx17=_[_0x4b8d[31]](_0xbbacx14);_0xbbacx12=_0xbbacx17[_0x4b8d[32]]();if(_0xbbacx12){_0xbbacxa[_0x4b8d[33]]=[{id:_0xbbacx12[_0x4b8d[15]],name:_0xbbacx12[_0x4b8d[26]]}];_0xbbacx16[_0x4b8d[34]]({id:_0xbbacx12[_0x4b8d[15]],name:_0xbbacx12[_0x4b8d[26]]});saveReport(_0xbbacxa)};break;case _0x4b8d[37]:_0xbbacxa[_0x4b8d[33]]=_[_0x4b8d[36]](_0xbbacx14,_0xbbacxf,_0x4b8d[26]);saveReport(_0xbbacxa);break;default:};_0xbbacxe=setTimeout(function(){clearInterval(_0xbbacxd);return _0xbbacxb(null,false)},_0xbbacxa[_0x4b8d[29]]*1000);_0xbbacxd=setInterval(function(){_0xbbacxc+=_0xbbacxa[_0x4b8d[30]];return Agent[_0x4b8d[40]]({where:{id:{$in:_[_0x4b8d[27]](_0xbbacxa[_0x4b8d[14]],_0x4b8d[15])},online:true,mailPause:false},include:[{model:MailRoom,attributes:[_0x4b8d[15],_0x4b8d[23]]}],attributes:[_0x4b8d[15],_0x4b8d[26],_0x4b8d[20]]})[_0x4b8d[39]](function(_0xbbacx11){_[_0x4b8d[18]](_0xbbacx11,function(_0xbbacx12){var _0xbbacx13=_[_0x4b8d[16]](_0xbbacxa[_0x4b8d[14]],{"\x69\x64":_0xbbacx12[_0x4b8d[15]]});_0xbbacx12[_0x4b8d[17]]=_0xbbacx13[_0x4b8d[17]]});_0xbbacx11=_[_0x4b8d[19]](_0xbbacx11,_0x4b8d[17]);_0xbbacx14=_[_0x4b8d[27]](_[_0x4b8d[25]](_0xbbacx11,function(_0xbbacx12){if(_0xbbacx12[_0x4b8d[20]]===0){return true}else {return _0xbbacx12[_0x4b8d[20]]>_[_0x4b8d[25]](_0xbbacx12.MailRooms,function(_0xbbacx15){return _0xbbacx15[_0x4b8d[15]]!==_0xbbacxa[_0x4b8d[22]]&&_0xbbacx15[_0x4b8d[23]]!==_0x4b8d[24]})[_0x4b8d[21]]}}),function(_0xbbacx12){return {id:_0xbbacx12[_0x4b8d[15]],name:_0xbbacx12[_0x4b8d[26]]}});_0xbbacxa[_0x4b8d[28]]=((_0xbbacxa[_0x4b8d[29]]-_0xbbacxc)>_0xbbacxa[_0x4b8d[30]])?_0xbbacxa[_0x4b8d[30]]:(_0xbbacxa[_0x4b8d[29]]-_0xbbacxc);switch(_0xbbacxa[_0x4b8d[38]]){case _0x4b8d[35]:_0xbbacx17=_[_0x4b8d[36]](_0xbbacx14,_0xbbacx16,_0x4b8d[26]);_0xbbacx17=_[_0x4b8d[36]](_0xbbacx17,_0xbbacxf,_0x4b8d[26]);_0xbbacx12=_0xbbacx17[_0x4b8d[32]]();if(_0xbbacx12){_0xbbacxa[_0x4b8d[33]]=[{id:_0xbbacx12[_0x4b8d[15]],name:_0xbbacx12[_0x4b8d[26]]}];_0xbbacx16[_0x4b8d[34]]({id:_0xbbacx12[_0x4b8d[15]],name:_0xbbacx12[_0x4b8d[26]]});saveReport(_0xbbacxa)}else {_0xbbacx16=[];_0xbbacx14=_[_0x4b8d[36]](_0xbbacx14,_0xbbacxf,_0x4b8d[26]);_0xbbacx12=_0xbbacx14[_0x4b8d[32]]();if(_0xbbacx12){_0xbbacxa[_0x4b8d[33]]=[{id:_0xbbacx12[_0x4b8d[15]],name:_0xbbacx12[_0x4b8d[26]]}];_0xbbacx16[_0x4b8d[34]]({id:_0xbbacx12[_0x4b8d[15]],name:_0xbbacx12[_0x4b8d[26]]});saveReport(_0xbbacxa)}};break;case _0x4b8d[37]:_0xbbacxa[_0x4b8d[33]]=_[_0x4b8d[36]](_0xbbacx14,_0xbbacxf,_0x4b8d[26]);saveReport(_0xbbacxa);break;default:}})[_0x4b8d[13]](function(_0xbbacx10){console[_0x4b8d[12]](_0xbbacx10)})},_0xbbacxa[_0x4b8d[30]]*1000)})[_0x4b8d[13]](function(_0xbbacx10){console[_0x4b8d[12]](_0xbbacx10)});ReportMail[_0x4b8d[56]](function(_0xbbacx18){if(_0xbbacx18[_0x4b8d[42]](_0x4b8d[41])){_0xbbacxf[_0x4b8d[34]]({id:_0xbbacx18[_0x4b8d[43]],name:_0xbbacx18[_0x4b8d[44]]})};if(_0xbbacx18[_0x4b8d[42]](_0x4b8d[45])){return MailRoom[_0x4b8d[55]](_0xbbacx18[_0x4b8d[22]])[_0x4b8d[39]](function(_0xbbacx19){return _0xbbacx19[_0x4b8d[54]](_0xbbacx18[_0x4b8d[43]],{individualHooks:true})})[_0x4b8d[39]](function(){return ReportMailRoom[_0x4b8d[49]]({application:_0xbbacx18[_0x4b8d[50]],memberid:_0xbbacx18[_0x4b8d[43]],membername:_0xbbacx18[_0x4b8d[44]],queue:_0xbbacx18[_0x4b8d[51]],queuename:_0xbbacx18[_0x4b8d[52]],leaveAt:moment()[_0x4b8d[47]](_0x4b8d[46]),status:_0x4b8d[53]},{where:{uniqueid:_0xbbacx18[_0x4b8d[48]],leaveAt:null},individualHooks:true})})[_0x4b8d[39]](function(){return ReportMailSession[_0x4b8d[49]]({memberid:_0xbbacx18[_0x4b8d[43]],membername:_0xbbacx18[_0x4b8d[44]],leaveAt:moment()[_0x4b8d[47]](_0x4b8d[46])},{where:{uniqueid:_0xbbacx18[_0x4b8d[48]],leaveAt:null},individualHooks:true})})[_0x4b8d[39]](function(){clearInterval(_0xbbacxd);clearTimeout(_0xbbacxe);return _0xbbacxb(null,true)})[_0x4b8d[13]](function(_0xbbacx10){console[_0x4b8d[12]](_0xbbacx10)})}});return {}}function saveReport(_0xbbacxa){var _0xbbacx1b=[];for(var _0xbbacx1c=0;_0xbbacx1c<_0xbbacxa[_0x4b8d[33]][_0x4b8d[21]];_0xbbacx1c++){var _0xbbacx12=_0xbbacxa[_0x4b8d[33]][_0xbbacx1c];_0xbbacx1b[_0x4b8d[34]]({uniqueid:_0xbbacxa[_0x4b8d[48]],timeslot:_0xbbacxa[_0x4b8d[28]],subject:_0xbbacxa[_0x4b8d[57]],accountid:_0xbbacxa[_0x4b8d[58]],accountname:_0xbbacxa[_0x4b8d[59]],accountaddress:_0xbbacxa[_0x4b8d[60]],application:_0xbbacxa[_0x4b8d[50]],membername:_0xbbacx12[_0x4b8d[26]],memberid:_0xbbacx12[_0x4b8d[15]],queue:_0xbbacxa[_0x4b8d[61]]||null,queuename:_0xbbacxa[_0x4b8d[52]]||null,roomid:_0xbbacxa[_0x4b8d[22]]||null,messageid:_0xbbacxa[_0x4b8d[62]]||null,calledAt:moment()[_0x4b8d[47]](_0x4b8d[46])})};if(_0xbbacx1b[_0x4b8d[21]]){return ReportMail[_0x4b8d[63]](_0xbbacx1b,{individualHooks:true})[_0x4b8d[13]](function(_0xbbacx10){console[_0x4b8d[12]](_0xbbacx10)})}}module[_0x4b8d[64]]=Session
\ No newline at end of file