1 var _0x2fbc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\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\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6C\x6F\x67","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x73","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x50\x52\x49\x4D\x41\x52\x59","\x70\x61\x74\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x51\x55\x45\x55\x45","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x65\x6E\x61\x6C\x74\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x2fbc[0];var _=require(_0x2fbc[1]);var util=require(_0x2fbc[2]);var Util=require(_0x2fbc[3]);var sequelize=require(_0x2fbc[5])[_0x2fbc[4]];var User=require(_0x2fbc[5])[_0x2fbc[6]];var VoiceQueue=require(_0x2fbc[5])[_0x2fbc[7]];var UserHasVoiceQueue=require(_0x2fbc[5])[_0x2fbc[8]];var VoiceExtension=require(_0x2fbc[5])[_0x2fbc[9]];exports[_0x2fbc[10]]= function(_0x579ax9,_0x579axa){switch(_0x579ax9[_0x2fbc[18]][_0x2fbc[23]]){case _0x2fbc[18]:return User[_0x2fbc[19]](_0x579ax9[_0x2fbc[18]][_0x2fbc[17]],{attributes:[_0x2fbc[17]]})[_0x2fbc[14]](Util[_0x2fbc[16]](_0x579ax9[_0x2fbc[15]]))[_0x2fbc[14]](function(_0x579axc){_0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]](_0x579axc)})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)});default:return VoiceQueue[_0x2fbc[22]](Util[_0x2fbc[21]](_0x579ax9[_0x2fbc[15]]))[_0x2fbc[14]](function(_0x579axc){_0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]](_0x579axc)})[_0x2fbc[11]](function(_0x579axb){console[_0x2fbc[20]](_0x579axb);return handleError(_0x579axa,_0x579axb)})}};exports[_0x2fbc[24]]= function(_0x579ax9,_0x579axa,_0x579axd){var _0x579axe;switch(_0x579ax9[_0x2fbc[18]][_0x2fbc[23]]){case _0x2fbc[18]:var _0x579axf=[];return User[_0x2fbc[19]](_0x579ax9[_0x2fbc[18]][_0x2fbc[17]],{attributes:[_0x2fbc[17]]})[_0x2fbc[14]](Util[_0x2fbc[16]]({},{attributes:[_0x2fbc[30]],include:[{raw:true,model:User,attributes:[_0x2fbc[17]]}]}))[_0x2fbc[14]](function(_0x579ax10){_0x579axe= _[_0x2fbc[31]](_0x579ax10[_0x2fbc[29]],_0x2fbc[30]);_0x579ax10[_0x2fbc[29]][_0x2fbc[33]](function(_0x579ax11){_0x579axf= _[_0x2fbc[32]](_0x579axf,_[_0x2fbc[31]](_0x579ax11.Users,_0x2fbc[17]))});return VoiceQueue[_0x2fbc[22]](_[_0x2fbc[34]](Util[_0x2fbc[21]](_0x579ax9[_0x2fbc[15]],{name:_0x579axe}),{include:[{model:User,where:{id:_0x579axf},required:false}]}))})[_0x2fbc[14]](function(_0x579axc){_0x579ax9[_0x2fbc[28]][_0x2fbc[27]][_0x2fbc[26]][_0x2fbc[12]]({message:_0x2fbc[25],queues:_0x579axe});return _0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]](_0x579axc)})[_0x2fbc[11]](function(_0x579axb){console[_0x2fbc[20]](_0x579axb);return handleError(_0x579axa,_0x579axb)});default:return VoiceQueue[_0x2fbc[22]](_[_0x2fbc[34]](Util[_0x2fbc[21]](_0x579ax9[_0x2fbc[15]]),{include:[{model:User,required:false}]}))[_0x2fbc[14]](function(_0x579axc){_0x579axe= _[_0x2fbc[31]](_0x579axc[_0x2fbc[29]],_0x2fbc[30]);_0x579ax9[_0x2fbc[28]][_0x2fbc[27]][_0x2fbc[26]][_0x2fbc[12]]({message:_0x2fbc[25],queues:_0x579axe});return _0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]](_0x579axc)})[_0x2fbc[11]](function(_0x579axb){console[_0x2fbc[20]](_0x579axb);return handleError(_0x579axa,_0x579axb)})}};exports[_0x2fbc[35]]= function(_0x579ax9,_0x579axa){return VoiceQueue[_0x2fbc[19]](_0x579ax9[_0x2fbc[37]][_0x2fbc[30]])[_0x2fbc[14]](function(_0x579ax12){if(!_0x579ax12){return _0x579axa[_0x2fbc[36]](404)};return _0x579axa[_0x2fbc[12]](_0x579ax12)})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)})};exports[_0x2fbc[38]]= function(_0x579ax9,_0x579axa){return VoiceQueue[_0x2fbc[19]](_0x579ax9[_0x2fbc[37]][_0x2fbc[30]])[_0x2fbc[14]](function(_0x579ax11){if(!_0x579ax11){return _0x579axa[_0x2fbc[36]](404)};return _0x579ax11[_0x2fbc[41]]({where:{role:_0x2fbc[40]}})})[_0x2fbc[14]](function(_0x579axf){return _0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]]({rows:_0x579axf,count:_0x579axf[_0x2fbc[39]]})})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)})};exports[_0x2fbc[42]]= function(_0x579ax9,_0x579axa){var _0x579ax13;return VoiceQueue[_0x2fbc[42]](_0x579ax9[_0x2fbc[52]])[_0x2fbc[14]](function(_0x579ax12){_0x579ax13= _0x579ax12})[_0x2fbc[14]](addAgents(_0x579ax9,_0x579ax9[_0x2fbc[52]][_0x2fbc[30]]))[_0x2fbc[14]](function(){return _0x579axa[_0x2fbc[13]](201)[_0x2fbc[12]](_0x579ax13)})[_0x2fbc[11]](sequelize.UniqueConstraintError,function(_0x579axb){var _0x579ax14=[];_0x579axb[_0x2fbc[46]][_0x2fbc[33]](function(_0x579ax15){switch(_0x579ax15[_0x2fbc[45]]){case _0x2fbc[44]:_0x579ax14[_0x2fbc[43]](_0x2fbc[30]);break;default:_0x579ax14[_0x2fbc[43]](_0x579ax15[_0x2fbc[45]])}});_0x579ax14[_0x2fbc[43]](_0x2fbc[47]);_0x579axb[_0x2fbc[48]]= _0x579ax14[_0x2fbc[49]]();_0x579axb[_0x2fbc[50]]= _0x2fbc[51];return _0x579axa[_0x2fbc[13]](500)[_0x2fbc[12]](_0x579axb)})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)})};exports[_0x2fbc[53]]= function(_0x579ax9,_0x579axa){if(_0x579ax9[_0x2fbc[52]][_0x2fbc[30]]){delete _0x579ax9[_0x2fbc[52]][_0x2fbc[30]]};return VoiceQueue[_0x2fbc[19]](_0x579ax9[_0x2fbc[37]][_0x2fbc[30]])[_0x2fbc[14]](function(_0x579ax12){if(!_0x579ax12){return _0x579axa[_0x2fbc[36]](404)};var _0x579ax16=_[_0x2fbc[34]](_0x579ax12,_0x579ax9[_0x2fbc[52]]);return _0x579ax16[_0x2fbc[54]]()})[_0x2fbc[14]](function(_0x579ax12){return _0x579axa[_0x2fbc[13]](200)[_0x2fbc[12]](_0x579ax12)})[_0x2fbc[11]](function(_0x579axb){console[_0x2fbc[20]](_0x579axb);return handleError(_0x579axa,_0x579axb)})};function addAgents(_0x579ax9,_0x579ax11){return function(){return User[_0x2fbc[60]]({where:{id:_0x579ax9[_0x2fbc[52]][_0x2fbc[59]]},raw:true})[_0x2fbc[14]](function(_0x579ax18){var _0x579ax19=_[_0x2fbc[31]](_0x579ax18,function(_0x579ax1a){return {queue:_0x579ax11,interface:util[_0x2fbc[56]](_0x2fbc[55],_0x579ax1a[_0x2fbc[30]]),stateinterface:util[_0x2fbc[56]](_0x2fbc[55],_0x579ax1a[_0x2fbc[30]]),membername:_0x579ax1a[_0x2fbc[30]],UserId:_0x579ax1a[_0x2fbc[17]],penalty:_0x579ax9[_0x2fbc[52]][_0x2fbc[57]]}});return UserHasVoiceQueue[_0x2fbc[58]](_0x579ax19,{individualHooks:true})})}}exports[_0x2fbc[61]]= function(_0x579ax9,_0x579axa,_0x579axd){return Promise[_0x2fbc[62]]([])[_0x2fbc[14]](addAgents(_0x579ax9,_0x579ax9[_0x2fbc[37]][_0x2fbc[30]]))[_0x2fbc[14]](function(){return _0x579axa[_0x2fbc[36]](200)})[_0x2fbc[11]](function(_0x579axb){console[_0x2fbc[20]](_0x579axb);return _0x579axd(_0x579axb)})};exports[_0x2fbc[63]]= function(_0x579ax9,_0x579axa,_0x579axd){return UserHasVoiceQueue[_0x2fbc[64]]({where:{UserId:_0x579ax9[_0x2fbc[15]][_0x2fbc[59]],queue:_0x579ax9[_0x2fbc[37]][_0x2fbc[30]]},individualHooks:true})[_0x2fbc[14]](function(){return _0x579axa[_0x2fbc[36]](202)})[_0x2fbc[11]](function(_0x579axb){return _0x579axd(_0x579axb)})};exports[_0x2fbc[64]]= function(_0x579ax9,_0x579axa){return VoiceQueue[_0x2fbc[64]]({where:{name:_0x579ax9[_0x2fbc[37]][_0x2fbc[30]]},individualHooks:true})[_0x2fbc[14]](function(){return _0x579axa[_0x2fbc[36]](204)})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)})};exports[_0x2fbc[65]]= function(_0x579ax9,_0x579axa){return VoiceQueue[_0x2fbc[64]]({where:{name:_0x579ax9[_0x2fbc[15]][_0x2fbc[66]]},individualHooks:true})[_0x2fbc[14]](function(){return _0x579axa[_0x2fbc[36]](204)})[_0x2fbc[11]](function(_0x579axb){return handleError(_0x579axa,_0x579axb)})};function handleError(_0x579axa,_0x579axb){return _0x579axa[_0x2fbc[13]](500)[_0x2fbc[12]](_0x579axb)}