Built motion from commit 36b8e3b.|0.0.111
[motion.git] / server / config / routing / chat / session.js
index 76e6780..3e19ba8 100644 (file)
@@ -1 +1 @@
-var _0x81f4=["\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","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x4E\x65\x77\x20\x43\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x63\x68\x61\x74\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","\x63\x6C\x6F\x6E\x65\x44\x65\x65\x70","\x73\x68\x69\x66\x74","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x6E\x61\x6D\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","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\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","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\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\x69\x64","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x62\x61\x6E\x64\x6F\x6E","\x41\x42\x41\x4E\x44\x4F\x4E","\x76\x69\x73\x69\x74\x6F\x72\x69\x64","\x76\x69\x73\x69\x74\x6F\x72\x6E\x61\x6D\x65","\x76\x69\x73\x69\x74\x6F\x72\x65\x6D\x61\x69\x6C","\x77\x65\x62\x73\x69\x74\x65\x69\x64","\x77\x65\x62\x73\x69\x74\x65\x6E\x61\x6D\x65","\x77\x65\x62\x73\x69\x74\x65\x61\x64\x64\x72\x65\x73\x73","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x81f4[0];var _=require(_0x81f4[1]);var moment=require(_0x81f4[2]);var Agent=require(_0x81f4[4])[_0x81f4[3]];var ChatRoom=require(_0x81f4[4])[_0x81f4[5]];var ChatApplication=require(_0x81f4[4])[_0x81f4[6]];var ReportChat=require(_0x81f4[4])[_0x81f4[7]];var ReportChatRoom=require(_0x81f4[4])[_0x81f4[8]];var ReportChatSession=require(_0x81f4[4])[_0x81f4[9]];function Session(_0x1536xa,_0x1536xb){console[_0x81f4[11]](_0x81f4[10]);var _0x1536xc=0;var _0x1536xd,_0x1536xe;var _0x1536xf=[];Agent[_0x81f4[36]]({where:{id:{$in:_[_0x81f4[35]](_0x1536xa[_0x81f4[34]],_0x81f4[16])},online:true,chatPause:false},include:[{model:ChatRoom,attributes:[_0x81f4[16],_0x81f4[18]]}],attributes:[_0x81f4[16],_0x81f4[27],_0x81f4[14]]})[_0x81f4[33]](function(_0x1536x11){var _0x1536x12=_[_0x81f4[20]](_0x1536x11,function(_0x1536x13){if(_0x1536x13[_0x81f4[14]]===0){return true}else {return _0x1536x13[_0x81f4[14]]>_[_0x81f4[20]](_0x1536x13.ChatRooms,function(_0x1536x14){return _0x1536x14[_0x81f4[16]]!==_0x1536xa[_0x81f4[17]]&&_0x1536x14[_0x81f4[18]]!==_0x81f4[19]})[_0x81f4[15]]}});var _0x1536x15=[];var _0x1536x16;var _0x1536x13;_0x1536xa[_0x81f4[21]]=((_0x1536xa[_0x81f4[22]]-_0x1536xc)>_0x1536xa[_0x81f4[23]])?_0x1536xa[_0x81f4[23]]:(_0x1536xa[_0x81f4[22]]-_0x1536xc);switch(_0x1536xa[_0x81f4[31]]){case _0x81f4[29]:_0x1536x16=_[_0x81f4[24]](_0x1536x12);_0x1536x13=_0x1536x16[_0x81f4[25]]();if(_0x1536x13){_0x1536xa[_0x81f4[26]]=[{id:_0x1536x13[_0x81f4[16]],name:_0x1536x13[_0x81f4[27]]}];_0x1536x15[_0x81f4[28]]({id:_0x1536x13[_0x81f4[16]],name:_0x1536x13[_0x81f4[27]]});saveReport(_0x1536xa)};break;case _0x81f4[30]:_0x1536xa[_0x81f4[26]]=_0x1536x12;saveReport(_0x1536xa);break;default:};_0x1536xe=setTimeout(function(){clearInterval(_0x1536xd);return _0x1536xb(null,false,false)},_0x1536xa[_0x81f4[22]]*1000);_0x1536xd=setInterval(function(){_0x1536xc+=_0x1536xa[_0x81f4[23]];return Agent[_0x81f4[36]]({where:{id:{$in:_[_0x81f4[35]](_0x1536xa[_0x81f4[34]],_0x81f4[16])},online:true,chatPause:false},include:[{model:ChatRoom,attributes:[_0x81f4[16],_0x81f4[18]]}],attributes:[_0x81f4[16],_0x81f4[27],_0x81f4[14]]})[_0x81f4[33]](function(_0x1536x11){_0x1536x12=_[_0x81f4[20]](_0x1536x11,function(_0x1536x13){if(_0x1536x13[_0x81f4[14]]===0){return true}else {return _0x1536x13[_0x81f4[14]]>_[_0x81f4[20]](_0x1536x13.ChatRooms,function(_0x1536x14){return _0x1536x14[_0x81f4[16]]!==_0x1536xa[_0x81f4[17]]&&_0x1536x14[_0x81f4[18]]!==_0x81f4[19]})[_0x81f4[15]]}});_0x1536xa[_0x81f4[21]]=((_0x1536xa[_0x81f4[22]]-_0x1536xc)>_0x1536xa[_0x81f4[23]])?_0x1536xa[_0x81f4[23]]:(_0x1536xa[_0x81f4[22]]-_0x1536xc);switch(_0x1536xa[_0x81f4[31]]){case _0x81f4[29]:_0x1536x16=_[_0x81f4[32]](_0x1536x12,_0x1536x15,_0x81f4[27]);_0x1536x16=_[_0x81f4[32]](_0x1536x16,_0x1536xf,_0x81f4[27]);_0x1536x13=_0x1536x16[_0x81f4[25]]();if(_0x1536x13){_0x1536xa[_0x81f4[26]]=[{id:_0x1536x13[_0x81f4[16]],name:_0x1536x13[_0x81f4[27]]}];_0x1536x15[_0x81f4[28]]({id:_0x1536x13[_0x81f4[16]],name:_0x1536x13[_0x81f4[27]]});saveReport(_0x1536xa)}else {_0x1536x15=[];_0x1536x12=_[_0x81f4[32]](_0x1536x12,_0x1536xf,_0x81f4[27]);_0x1536x13=_0x1536x12[_0x81f4[25]]();if(_0x1536x13){_0x1536xa[_0x81f4[26]]=[{id:_0x1536x13[_0x81f4[16]],name:_0x1536x13[_0x81f4[27]]}];_0x1536x15[_0x81f4[28]]({id:_0x1536x13[_0x81f4[16]],name:_0x1536x13[_0x81f4[27]]});saveReport(_0x1536xa)}};break;case _0x81f4[30]:_0x1536xa[_0x81f4[26]]=_[_0x81f4[32]](_0x1536x12,_0x1536xf,_0x81f4[27]);saveReport(_0x1536xa);break;default:}})[_0x81f4[13]](function(_0x1536x10){console[_0x81f4[12]](_0x1536x10)})},_0x1536xa[_0x81f4[23]]*1000)})[_0x81f4[13]](function(_0x1536x10){console[_0x81f4[12]](_0x1536x10)});ReportChat[_0x81f4[51]](function(_0x1536x17){if(_0x1536x17[_0x81f4[38]](_0x81f4[37])){return ChatRoom[_0x81f4[49]](_0x1536x17[_0x81f4[17]])[_0x81f4[33]](function(ChatRoom){return ChatRoom[_0x81f4[48]](_0x1536x17[_0x81f4[39]],{individualHooks:true})})[_0x81f4[33]](function(){return ReportChatRoom[_0x81f4[44]]({application:_0x1536x17[_0x81f4[45]],memberid:_0x1536x17[_0x81f4[39]],membername:_0x1536x17[_0x81f4[40]],queueid:_0x1536x17[_0x81f4[46]]||null,queuename:_0x1536x17[_0x81f4[47]]||null,leaveAt:moment()[_0x81f4[42]](_0x81f4[41])},{where:{uniqueid:_0x1536x17[_0x81f4[43]],leaveAt:null},individualHooks:true})})[_0x81f4[33]](function(){return ReportChatSession[_0x81f4[44]]({memberid:_0x1536x17[_0x81f4[39]],membername:_0x1536x17[_0x81f4[40]],leaveAt:moment()[_0x81f4[42]](_0x81f4[41])},{where:{uniqueid:_0x1536x17[_0x81f4[43]],leaveAt:null},individualHooks:true})})[_0x81f4[33]](function(){clearInterval(_0x1536xd);clearTimeout(_0x1536xe);return _0x1536xb(null,true,false)})[_0x81f4[13]](function(_0x1536x10){console[_0x81f4[12]](_0x1536x10)})};if(_0x1536x17[_0x81f4[38]](_0x81f4[50])){_0x1536xf[_0x81f4[28]]({id:_0x1536x17[_0x81f4[39]],name:_0x1536x17[_0x81f4[40]]})}});ReportChatSession[_0x81f4[51]](function(_0x1536x17){if(_0x1536x17[_0x81f4[38]](_0x81f4[52])&&_0x1536x17[_0x81f4[52]]){return ChatRoom[_0x81f4[49]](_0x1536x17[_0x81f4[17]])[_0x81f4[33]](function(_0x1536x18){return _0x1536x18[_0x81f4[44]]({status:_0x81f4[53]})})[_0x81f4[33]](function(){clearInterval(_0x1536xd);clearTimeout(_0x1536xe);return _0x1536xb(null,true,true)})[_0x81f4[13]](function(_0x1536x10){console[_0x81f4[12]](_0x1536x10)})}});return {}}function saveReport(_0x1536xa){var _0x1536x1a=[];_0x1536xa[_0x81f4[26]][_0x81f4[60]](function(_0x1536x13,_0x1536x1b){_0x1536x1a[_0x81f4[28]]({uniqueid:_0x1536xa[_0x81f4[43]],visitorid:_0x1536xa[_0x81f4[54]],visitorname:_0x1536xa[_0x81f4[55]],visitoremail:_0x1536xa[_0x81f4[56]],timeslot:_0x1536xa[_0x81f4[21]],websiteid:_0x1536xa[_0x81f4[57]],websitename:_0x1536xa[_0x81f4[58]],websiteaddress:_0x1536xa[_0x81f4[59]],application:_0x1536xa[_0x81f4[45]],membername:_0x1536x13[_0x81f4[27]],memberid:_0x1536x13[_0x81f4[16]],queueid:_0x1536xa[_0x81f4[46]]||null,queuename:_0x1536xa[_0x81f4[47]]||null,roomid:_0x1536xa[_0x81f4[17]]||null,calledAt:moment()[_0x81f4[42]](_0x81f4[41])})});if(_0x1536x1a[_0x81f4[15]]){return ReportChat[_0x81f4[61]](_0x1536x1a,{individualHooks:true})[_0x81f4[13]](function(_0x1536x10){console[_0x81f4[12]](_0x1536x10)})}}module[_0x81f4[62]]=Session
\ No newline at end of file
+var _0x7082=["\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","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x4E\x65\x77\x20\x43\x68\x61\x74\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","\x63\x68\x61\x74\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","\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","\x6E\x61\x6D\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","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65\x42\x79","\x74\x68\x65\x6E","\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","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\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\x69\x64","\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","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x62\x61\x6E\x64\x6F\x6E","\x41\x42\x41\x4E\x44\x4F\x4E","\x76\x69\x73\x69\x74\x6F\x72\x69\x64","\x76\x69\x73\x69\x74\x6F\x72\x6E\x61\x6D\x65","\x76\x69\x73\x69\x74\x6F\x72\x65\x6D\x61\x69\x6C","\x77\x65\x62\x73\x69\x74\x65\x69\x64","\x77\x65\x62\x73\x69\x74\x65\x6E\x61\x6D\x65","\x77\x65\x62\x73\x69\x74\x65\x61\x64\x64\x72\x65\x73\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7082[0];var _=require(_0x7082[1]);var moment=require(_0x7082[2]);var Agent=require(_0x7082[4])[_0x7082[3]];var ChatRoom=require(_0x7082[4])[_0x7082[5]];var ChatApplication=require(_0x7082[4])[_0x7082[6]];var ReportChat=require(_0x7082[4])[_0x7082[7]];var ReportChatRoom=require(_0x7082[4])[_0x7082[8]];var ReportChatSession=require(_0x7082[4])[_0x7082[9]];function Session(_0x4e24xa,_0x4e24xb){console[_0x7082[11]](_0x7082[10]);var _0x4e24xc=0;var _0x4e24xd,_0x4e24xe;var _0x4e24xf=[];Agent[_0x7082[40]]({where:{id:{$in:_[_0x7082[39]](_0x4e24xa[_0x7082[14]],_0x7082[15])},online:true,chatPause:false},include:[{model:ChatRoom,attributes:[_0x7082[15],_0x7082[23]]}],attributes:[_0x7082[15],_0x7082[32],_0x7082[20]]})[_0x7082[38]](function(_0x4e24x11){_[_0x7082[18]](_0x4e24x11,function(_0x4e24x12){var _0x4e24x13=_[_0x7082[16]](_0x4e24xa[_0x7082[14]],{"\x69\x64":_0x4e24x12[_0x7082[15]]});_0x4e24x12[_0x7082[17]]=_0x4e24x13[_0x7082[17]]});_0x4e24x11=_[_0x7082[19]](_0x4e24x11,_0x7082[17]);var _0x4e24x14=_[_0x7082[25]](_0x4e24x11,function(_0x4e24x12){if(_0x4e24x12[_0x7082[20]]===0){return true}else {return _0x4e24x12[_0x7082[20]]>_[_0x7082[25]](_0x4e24x12.ChatRooms,function(_0x4e24x15){return _0x4e24x15[_0x7082[15]]!==_0x4e24xa[_0x7082[22]]&&_0x4e24x15[_0x7082[23]]!==_0x7082[24]})[_0x7082[21]]}});var _0x4e24x16=[];var _0x4e24x17;var _0x4e24x12;_0x4e24xa[_0x7082[26]]=((_0x4e24xa[_0x7082[27]]-_0x4e24xc)>_0x4e24xa[_0x7082[28]])?_0x4e24xa[_0x7082[28]]:(_0x4e24xa[_0x7082[27]]-_0x4e24xc);switch(_0x4e24xa[_0x7082[36]]){case _0x7082[34]:_0x4e24x17=_[_0x7082[29]](_0x4e24x14);_0x4e24x12=_0x4e24x17[_0x7082[30]]();if(_0x4e24x12){_0x4e24xa[_0x7082[31]]=[{id:_0x4e24x12[_0x7082[15]],name:_0x4e24x12[_0x7082[32]]}];_0x4e24x16[_0x7082[33]]({id:_0x4e24x12[_0x7082[15]],name:_0x4e24x12[_0x7082[32]]});saveReport(_0x4e24xa)};break;case _0x7082[35]:_0x4e24xa[_0x7082[31]]=_0x4e24x14;saveReport(_0x4e24xa);break;default:};_0x4e24xe=setTimeout(function(){clearInterval(_0x4e24xd);return _0x4e24xb(null,false,false)},_0x4e24xa[_0x7082[27]]*1000);_0x4e24xd=setInterval(function(){_0x4e24xc+=_0x4e24xa[_0x7082[28]];return Agent[_0x7082[40]]({where:{id:{$in:_[_0x7082[39]](_0x4e24xa[_0x7082[14]],_0x7082[15])},online:true,chatPause:false},include:[{model:ChatRoom,attributes:[_0x7082[15],_0x7082[23]]}],attributes:[_0x7082[15],_0x7082[32],_0x7082[20]]})[_0x7082[38]](function(_0x4e24x11){_[_0x7082[18]](_0x4e24x11,function(_0x4e24x12){var _0x4e24x13=_[_0x7082[16]](_0x4e24xa[_0x7082[14]],{"\x69\x64":_0x4e24x12[_0x7082[15]]});_0x4e24x12[_0x7082[17]]=_0x4e24x13[_0x7082[17]]});_0x4e24x11=_[_0x7082[19]](_0x4e24x11,_0x7082[17]);_0x4e24x14=_[_0x7082[25]](_0x4e24x11,function(_0x4e24x12){if(_0x4e24x12[_0x7082[20]]===0){return true}else {return _0x4e24x12[_0x7082[20]]>_[_0x7082[25]](_0x4e24x12.ChatRooms,function(_0x4e24x15){return _0x4e24x15[_0x7082[15]]!==_0x4e24xa[_0x7082[22]]&&_0x4e24x15[_0x7082[23]]!==_0x7082[24]})[_0x7082[21]]}});_0x4e24xa[_0x7082[26]]=((_0x4e24xa[_0x7082[27]]-_0x4e24xc)>_0x4e24xa[_0x7082[28]])?_0x4e24xa[_0x7082[28]]:(_0x4e24xa[_0x7082[27]]-_0x4e24xc);switch(_0x4e24xa[_0x7082[36]]){case _0x7082[34]:_0x4e24x17=_[_0x7082[37]](_0x4e24x14,_0x4e24x16,_0x7082[32]);_0x4e24x17=_[_0x7082[37]](_0x4e24x17,_0x4e24xf,_0x7082[32]);_0x4e24x12=_0x4e24x17[_0x7082[30]]();if(_0x4e24x12){_0x4e24xa[_0x7082[31]]=[{id:_0x4e24x12[_0x7082[15]],name:_0x4e24x12[_0x7082[32]]}];_0x4e24x16[_0x7082[33]]({id:_0x4e24x12[_0x7082[15]],name:_0x4e24x12[_0x7082[32]]});saveReport(_0x4e24xa)}else {_0x4e24x16=[];_0x4e24x14=_[_0x7082[37]](_0x4e24x14,_0x4e24xf,_0x7082[32]);_0x4e24x12=_0x4e24x14[_0x7082[30]]();if(_0x4e24x12){_0x4e24xa[_0x7082[31]]=[{id:_0x4e24x12[_0x7082[15]],name:_0x4e24x12[_0x7082[32]]}];_0x4e24x16[_0x7082[33]]({id:_0x4e24x12[_0x7082[15]],name:_0x4e24x12[_0x7082[32]]});saveReport(_0x4e24xa)}};break;case _0x7082[35]:_0x4e24xa[_0x7082[31]]=_[_0x7082[37]](_0x4e24x14,_0x4e24xf,_0x7082[32]);saveReport(_0x4e24xa);break;default:}})[_0x7082[13]](function(_0x4e24x10){console[_0x7082[12]](_0x4e24x10)})},_0x4e24xa[_0x7082[28]]*1000)})[_0x7082[13]](function(_0x4e24x10){console[_0x7082[12]](_0x4e24x10)});ReportChat[_0x7082[56]](function(_0x4e24x18){if(_0x4e24x18[_0x7082[42]](_0x7082[41])){var _0x4e24x19;return ChatRoom[_0x7082[54]](_0x4e24x18[_0x7082[22]])[_0x7082[38]](function(ChatRoom){_0x4e24x19=ChatRoom;return ChatRoom[_0x7082[53]](_0x4e24x18[_0x7082[43]],{individualHooks:true})})[_0x7082[38]](function(){return _0x4e24x19[_0x7082[48]]({status:_0x7082[52]})})[_0x7082[38]](function(){return ReportChatRoom[_0x7082[48]]({application:_0x4e24x18[_0x7082[49]],memberid:_0x4e24x18[_0x7082[43]],membername:_0x4e24x18[_0x7082[44]],queueid:_0x4e24x18[_0x7082[50]]||null,queuename:_0x4e24x18[_0x7082[51]]||null,leaveAt:moment()[_0x7082[46]](_0x7082[45]),status:_0x7082[52]},{where:{uniqueid:_0x4e24x18[_0x7082[47]],leaveAt:null},individualHooks:true})})[_0x7082[38]](function(){return ReportChatSession[_0x7082[48]]({memberid:_0x4e24x18[_0x7082[43]],membername:_0x4e24x18[_0x7082[44]],leaveAt:moment()[_0x7082[46]](_0x7082[45])},{where:{uniqueid:_0x4e24x18[_0x7082[47]],leaveAt:null},individualHooks:true})})[_0x7082[38]](function(){clearInterval(_0x4e24xd);clearTimeout(_0x4e24xe);return _0x4e24xb(null,true,false)})[_0x7082[13]](function(_0x4e24x10){console[_0x7082[12]](_0x4e24x10)})};if(_0x4e24x18[_0x7082[42]](_0x7082[55])){_0x4e24xf[_0x7082[33]]({id:_0x4e24x18[_0x7082[43]],name:_0x4e24x18[_0x7082[44]]})}});ReportChatSession[_0x7082[56]](function(_0x4e24x18){if(_0x4e24x18[_0x7082[42]](_0x7082[57])&&_0x4e24x18[_0x7082[57]]){return ChatRoom[_0x7082[54]](_0x4e24x18[_0x7082[22]])[_0x7082[38]](function(_0x4e24x1a){return _0x4e24x1a[_0x7082[48]]({status:_0x7082[58]})})[_0x7082[38]](function(){clearInterval(_0x4e24xd);clearTimeout(_0x4e24xe);return _0x4e24xb(null,true,true)})[_0x7082[13]](function(_0x4e24x10){console[_0x7082[12]](_0x4e24x10)})}});return {}}function saveReport(_0x4e24xa){var _0x4e24x1c=[];for(var _0x4e24x1d=0;_0x4e24x1d<_0x4e24xa[_0x7082[31]][_0x7082[21]];_0x4e24x1d++){var _0x4e24x12=_0x4e24xa[_0x7082[31]][_0x4e24x1d];_0x4e24x1c[_0x7082[33]]({uniqueid:_0x4e24xa[_0x7082[47]],visitorid:_0x4e24xa[_0x7082[59]],visitorname:_0x4e24xa[_0x7082[60]],visitoremail:_0x4e24xa[_0x7082[61]],timeslot:_0x4e24xa[_0x7082[26]],websiteid:_0x4e24xa[_0x7082[62]],websitename:_0x4e24xa[_0x7082[63]],websiteaddress:_0x4e24xa[_0x7082[64]],application:_0x4e24xa[_0x7082[49]],membername:_0x4e24x12[_0x7082[32]],memberid:_0x4e24x12[_0x7082[15]],queueid:_0x4e24xa[_0x7082[50]]||null,queuename:_0x4e24xa[_0x7082[51]]||null,roomid:_0x4e24xa[_0x7082[22]]||null,calledAt:moment()[_0x7082[46]](_0x7082[45])})};if(_0x4e24x1c[_0x7082[21]]){return ReportChat[_0x7082[65]](_0x4e24x1c,{individualHooks:true})[_0x7082[13]](function(_0x4e24x10){console[_0x7082[12]](_0x4e24x10)})}}module[_0x7082[66]]=Session
\ No newline at end of file