Built motion from commit a486b36.|1.0.4
[motion.git] / server / config / license / license.service.js
index 3fc966f..0a119ca 100644 (file)
@@ -1 +1 @@
-var _0x31f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6F\x73","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x53\x65\x74\x74\x69\x6E\x67\x73","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x70\x6C\x61\x74\x66\x6F\x72\x6D","\x6C\x69\x6E\x75\x78","\x6F\x75\x74\x70\x75\x74","\x64\x6D\x69\x64\x65\x63\x6F\x64\x65\x20\x2D\x2D\x73\x74\x72\x69\x6E\x67\x20\x73\x79\x73\x74\x65\x6D\x2D\x75\x75\x69\x64","\x73\x6C\x69\x63\x65","\x0A","\x73\x70\x6C\x69\x74","\x62\x6C\x6B\x69\x64\x20\x2D\x67\x20\x26\x26\x20\x62\x6C\x6B\x69\x64","\x6D\x61\x74\x63\x68","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x65\x78\x65\x63","\x6D\x61\x70","\x75\x75\x69\x64","\x63\x61\x74\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x70\x61\x72\x73\x65","\x63\x68\x61\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x73\x65","\x6D\x61\x69\x6C","\x66\x61\x78","\x65\x78\x70\x69\x72\x61\x74\x69\x6F\x6E","\x69\x73\x53\x61\x6D\x65\x4F\x72\x42\x65\x66\x6F\x72\x65","\x75\x73\x65\x72\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x75\x73\x65\x72\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x63\x6F\x75\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x6F\x6E\x6C\x69\x6E\x65","\x61\x67\x65\x6E\x74\x73","\x2D","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x67\x65\x74\x55\x75\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x55\x73\x65\x72\x73\x4C\x69\x6D\x69\x74","\x69\x73\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x4C\x69\x6D\x69\x74","\x68\x61\x73\x43\x68\x61\x74","\x68\x61\x73\x4D\x61\x69\x6C","\x68\x61\x73\x46\x61\x78","\x69\x73\x56\x61\x6C\x69\x64\x41\x67\x65\x6E\x74","\x64\x65\x6D\x6F\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x63\x72\x79\x70\x74"];_0x31f8[0];var compose=require(_0x31f8[1]);var moment=require(_0x31f8[2]);var crypto=require(_0x31f8[3]);var util=require(_0x31f8[4]);var os=require(_0x31f8[5]);var config=require(_0x31f8[6]);var User=require(_0x31f8[8])[_0x31f8[7]];var Telephone=require(_0x31f8[8])[_0x31f8[9]];var Settings=require(_0x31f8[8])[_0x31f8[10]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,description:_0x31f8[11]};function getUuid(){if(os[_0x31f8[12]]()!==_0x31f8[13]){var _0x460axc=exec(_0x31f8[15],{silent:true})[_0x31f8[14]];var _0x460axd=_0x460axc[_0x31f8[18]](_0x31f8[17])[_0x31f8[16]](0,-1);return _0x460axd[0]}else {var _0x460axc=exec(_0x31f8[19],{silent:true})[_0x31f8[14]];var _0x460axd=_0x460axc[_0x31f8[18]](_0x31f8[17])[_0x31f8[16]](0,-1)[_0x31f8[23]](function(_0x460axe){var _0x460axf,_0x460ax10,_0x460axd;_0x460ax10= new RegExp(/(\w+)\=\"([^\"]+)/g);_0x460axf={partition:_0x460axe[_0x31f8[20]](/^(\S+)\:\ /)[1]};while(_0x460axd=_0x460ax10[_0x31f8[22]](_0x460axe)){_0x460axf[_0x460axd[1][_0x31f8[21]]()]=_0x460axd[2]};return _0x460axf});return _0x460axd[0][_0x31f8[24]]}}function hasChat(){return compose()[_0x31f8[32]](function(_0x460ax12,_0x460ax13,_0x460ax14){return Settings[_0x31f8[31]]({where:{id:1}})[_0x31f8[30]](function(_0x460ax16){var _0x460ax17=null,_0x460ax18=false;if(_0x460ax16[_0x31f8[26]]){_0x460ax17=decrypt(_0x460ax16[_0x31f8[26]]);_0x460ax17=JSON[_0x31f8[27]](_0x460ax17)}else {_0x460ax17=demoLicense};_0x460ax18=_0x460ax17[_0x31f8[28]];if(!_0x460ax18){return _0x460ax13[_0x31f8[29]](403)};return _0x460ax14()})[_0x31f8[25]](function(_0x460ax15){return _0x460ax14(_0x460ax15)})})}function hasMail(){return compose()[_0x31f8[32]](function(_0x460ax12,_0x460ax13,_0x460ax14){return Settings[_0x31f8[31]]({where:{id:1}})[_0x31f8[30]](function(_0x460ax16){var _0x460ax17=null,_0x460ax1a=false;if(_0x460ax16[_0x31f8[26]]){_0x460ax17=decrypt(_0x460ax16[_0x31f8[26]]);_0x460ax17=JSON[_0x31f8[27]](_0x460ax17)}else {_0x460ax17=demoLicense};_0x460ax1a=_0x460ax17[_0x31f8[33]];if(!_0x460ax1a){return _0x460ax13[_0x31f8[29]](403)};return _0x460ax14()})[_0x31f8[25]](function(_0x460ax15){return _0x460ax14(_0x460ax15)})})}function hasFax(){return compose()[_0x31f8[32]](function(_0x460ax12,_0x460ax13,_0x460ax14){return Settings[_0x31f8[31]]({where:{id:1}})[_0x31f8[30]](function(_0x460ax16){var _0x460ax17=null,_0x460ax1c=false;if(_0x460ax16[_0x31f8[26]]){_0x460ax17=decrypt(_0x460ax16[_0x31f8[26]]);_0x460ax17=JSON[_0x31f8[27]](_0x460ax17)}else {_0x460ax17=demoLicense};_0x460ax1c=_0x460ax17[_0x31f8[34]];if(!_0x460ax1c){return _0x460ax13[_0x31f8[29]](403)};return _0x460ax14()})[_0x31f8[25]](function(_0x460ax15){return _0x460ax14(_0x460ax15)})})}function isValidDate(){return compose()[_0x31f8[32]](function(_0x460ax12,_0x460ax13,_0x460ax14){return Settings[_0x31f8[31]]({where:{id:1}})[_0x31f8[30]](function(_0x460ax16){var _0x460ax17=null,_0x460ax1e=false;if(_0x460ax16[_0x31f8[26]]){_0x460ax17=decrypt(_0x460ax16[_0x31f8[26]]);_0x460ax17=JSON[_0x31f8[27]](_0x460ax17);if(moment()[_0x31f8[36]](_0x460ax17[_0x31f8[35]])){_0x460ax1e=true}};if(!_0x460ax1e){return _0x460ax13[_0x31f8[29]](403)};return _0x460ax14()})[_0x31f8[25]](function(_0x460ax15){return _0x460ax14(_0x460ax15)})})}function isUsersLimit(){return compose()[_0x31f8[32]](function(_0x460ax12,_0x460ax13,_0x460ax14){var _0x460ax20;return Settings[_0x31f8[31]]({where:{id:1}})[_0x31f8[30]](function(_0x460ax16){_0x460ax20=_0x460ax16;return User[_0x31f8[44]]({where:{$or:[{role:_0x31f8[42]},{role:_0x31f8[43]}]}})})[_0x31f8[41]](function(_0x460ax21){var _0x460ax17=null,_0x460ax22=false;if(_0x460ax20[_0x31f8[26]]){_0x460ax17=decrypt(_0x460ax20[_0x31f8[26]]);_0x460ax17=JSON[_0x31f8[27]](_0x460ax17)}else {_0x460ax17=demoLicense};if(_0x460ax17[_0x31f8[37]]>_0x460ax21){_0x460ax22=true};if(!_0x460ax22){return _0x460ax13[_0x31f8[40]](403)[_0x31f8[39]]({message:_0x31f8[38]})};return _0x460ax14()})[_0x31f8[25]](function(_0x460ax15){return _0x460ax14(_0x460ax15)})})}function isTelephonesLimit(){return compose()[_0x31f8[32]](function(_0x460ax12,_0x460ax13,_0x460ax14){var _0x460ax20;return Settings[_0x31f8[31]]({where:{id:1}})[_0x31f8[30]](function(_0x460ax16){_0x460ax20=_0x460ax16;return User[_0x31f8[44]]({where:{role:_0x31f8[47]}})})[_0x31f8[41]](function(_0x460ax24){var _0x460ax17=null,_0x460ax22=false;if(_0x460ax20[_0x31f8[26]]){_0x460ax17=decrypt(_0x460ax20[_0x31f8[26]]);_0x460ax17=JSON[_0x31f8[27]](_0x460ax17)}else {_0x460ax17=demoLicense};if(_0x460ax17[_0x31f8[45]]>_0x460ax24){_0x460ax22=true};if(!_0x460ax22){return _0x460ax13[_0x31f8[40]](403)[_0x31f8[39]]({message:_0x31f8[46]})};return _0x460ax14()})[_0x31f8[25]](function(_0x460ax15){return _0x460ax14(_0x460ax15)})})}function isValidAgent(){return function(_0x460ax26){var _0x460ax20;var _0x460ax27=false;if(_0x460ax26[_0x31f8[48]]===_0x31f8[42]||_0x460ax26[_0x31f8[48]]===_0x31f8[43]||(_0x460ax26[_0x31f8[48]]===_0x31f8[49]&&_0x460ax26[_0x31f8[50]])){_0x460ax27=true};return Settings[_0x31f8[31]]({where:{id:1}})[_0x31f8[30]](function(_0x460ax16){_0x460ax20=_0x460ax16;return User[_0x31f8[44]]({where:{role:_0x31f8[49],online:true}})})[_0x31f8[41]](function(_0x460ax28){var _0x460ax17=null;if(_0x460ax20[_0x31f8[26]]){_0x460ax17=decrypt(_0x460ax20[_0x31f8[26]]);_0x460ax17=JSON[_0x31f8[27]](_0x460ax17)}else {_0x460ax17=demoLicense};if(_0x460ax17[_0x31f8[51]]>_0x460ax28){_0x460ax27=true};return _0x460ax27})}}function decrypt(_0x460ax2a){var _0x460ax2b=getUuid();var _0x460ax2c=_0x460ax2b[_0x31f8[18]](_0x31f8[52])[4];var _0x460ax2d=_0x460ax2b[_0x31f8[18]](_0x31f8[52])[0];var _0x460ax2e=crypto[_0x31f8[56]](_0x31f8[53],util[_0x31f8[55]](_0x31f8[54],_0x460ax2c,_0x460ax2b,_0x460ax2d));var _0x460ax17=_0x460ax2e[_0x31f8[59]](_0x460ax2a,_0x31f8[57],_0x31f8[58]);_0x460ax17+=_0x460ax2e[_0x31f8[60]](_0x31f8[58]);return _0x460ax17}exports[_0x31f8[61]]=getUuid;exports[_0x31f8[62]]=isValidDate;exports[_0x31f8[63]]=isUsersLimit;exports[_0x31f8[64]]=isTelephonesLimit;exports[_0x31f8[65]]=hasChat;exports[_0x31f8[66]]=hasMail;exports[_0x31f8[67]]=hasFax;exports[_0x31f8[68]]=isValidAgent;exports[_0x31f8[69]]=demoLicense;exports[_0x31f8[70]]=decrypt
\ No newline at end of file
+var _0xbfc9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6F\x73","\x65\x78\x65\x63\x53\x79\x6E\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x53\x65\x74\x74\x69\x6E\x67","\x4C\x69\x63\x65\x6E\x73\x65","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x0D\x0A","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x6D\x69\x64\x65\x63\x6F\x64\x65\x20\x2D\x2D\x73\x74\x72\x69\x6E\x67\x20\x73\x79\x73\x74\x65\x6D\x2D\x75\x75\x69\x64","\x75\x74\x66\x38","\x77\x69\x6E\x33\x32","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x70\x6C\x61\x74\x66\x6F\x72\x6D","\x63\x61\x74\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x31","\x70\x61\x72\x73\x65","\x64\x65\x6D\x6F","\x64\x65\x63\x72\x79\x70\x74\x20\x65\x72\x72\x6F\x72","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x73\x65","\x63\x68\x61\x74","\x6D\x65\x73\x73\x61\x67\x69\x6E\x67","\x63\x6D","\x75\x70\x64\x61\x74\x65","\x6D\x61\x69\x6C","\x66\x61\x78","\x6A\x73\x63\x72\x69\x70\x74\x79","\x63\x75\x73\x74\x6F\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x70\x69\x72\x61\x74\x69\x6F\x6E","\x69\x73\x53\x61\x6D\x65\x4F\x72\x42\x65\x66\x6F\x72\x65","\x75\x73\x65\x72\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x75\x73\x65\x72\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x63\x6F\x75\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x6F\x6E\x6C\x69\x6E\x65","\x61\x67\x65\x6E\x74\x73","\x2D","\x73\x70\x6C\x69\x74","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x66\x69\x6E\x61\x6C","\x67\x65\x74\x55\x75\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x55\x73\x65\x72\x73\x4C\x69\x6D\x69\x74","\x69\x73\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x4C\x69\x6D\x69\x74","\x68\x61\x73\x43\x68\x61\x74","\x68\x61\x73\x4D\x61\x69\x6C","\x68\x61\x73\x46\x61\x78","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x68\x61\x73\x53\x6D\x73","\x68\x61\x73\x4A\x73\x63\x72\x69\x70\x74\x79","\x68\x61\x73\x43\x6D","\x68\x61\x73\x55\x70\x64\x61\x74\x65","\x69\x73\x56\x61\x6C\x69\x64\x41\x67\x65\x6E\x74","\x64\x65\x6D\x6F\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x63\x72\x79\x70\x74"];_0xbfc9[0];var compose=require(_0xbfc9[1]);var moment=require(_0xbfc9[2]);var crypto=require(_0xbfc9[3]);var util=require(_0xbfc9[4]);var os=require(_0xbfc9[5]);var exec=require(_0xbfc9[7])[_0xbfc9[6]];var config=require(_0xbfc9[8]);var User=require(_0xbfc9[10])[_0xbfc9[9]];var Telephone=require(_0xbfc9[10])[_0xbfc9[11]];var Setting=require(_0xbfc9[10])[_0xbfc9[12]];var License=require(_0xbfc9[10])[_0xbfc9[13]];var demoLicense={demo:true,users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,jscripty:false,messaging:false,openchannel:false,custom:false,cm:false,dialer:false,update:false,description:_0xbfc9[14]};function getUuid(){switch(os[_0xbfc9[22]]()){case _0xbfc9[20]:return exec(_0xbfc9[18],{encoding:_0xbfc9[19]})[_0xbfc9[17]](_0xbfc9[15],_0xbfc9[16]);default:return require(_0xbfc9[21])(true)}}function checkLicense(_0x30adxf){return compose()[_0xbfc9[33]](function(_0x30adx10,_0x30adx11,_0x30adx12){return License[_0xbfc9[32]]({where:{id:1}})[_0xbfc9[31]](function(_0x30adx14){var _0x30adx15=null;var _0x30adx16=false;try{if(_0x30adx14[_0xbfc9[24]]){_0x30adx15= decrypt(_0x30adx14[_0xbfc9[24]],_0x30adx14[_0xbfc9[25]]);_0x30adx15= JSON[_0xbfc9[26]](_0x30adx15);_0x30adx15[_0xbfc9[27]]= false}else {_0x30adx15= demoLicense;_0x30adx15[_0xbfc9[27]]= true}}catch(err){console[_0xbfc9[29]](_0xbfc9[28],err);_0x30adx15= demoLicense;_0x30adx15[_0xbfc9[27]]= true};_0x30adx16= _0x30adx15[_0x30adxf];if(!_0x30adx16){return _0x30adx11[_0xbfc9[30]](403)};return _0x30adx12()})[_0xbfc9[23]](function(_0x30adx13){return _0x30adx12(_0x30adx13)})})}function hasChat(){return checkLicense(_0xbfc9[34])}function hasSms(){return checkLicense(_0xbfc9[35])}function hasCm(){return checkLicense(_0xbfc9[36])}function hasUpdate(){return checkLicense(_0xbfc9[37])}function hasMail(){return checkLicense(_0xbfc9[38])}function hasFax(){return checkLicense(_0xbfc9[39])}function hasJscripty(){return checkLicense(_0xbfc9[40])}function hasCustom(){return checkLicense(_0xbfc9[41])}function hasOpenchannel(){return checkLicense(_0xbfc9[42])}function isValidDate(){return compose()[_0xbfc9[33]](function(_0x30adx10,_0x30adx11,_0x30adx12){return License[_0xbfc9[32]]({where:{id:1}})[_0xbfc9[31]](function(_0x30adx14){var _0x30adx15=null,_0x30adx21=false;try{if(_0x30adx14[_0xbfc9[24]]){_0x30adx15= decrypt(_0x30adx14[_0xbfc9[24]],_0x30adx14[_0xbfc9[25]]);_0x30adx15= JSON[_0xbfc9[26]](_0x30adx15);if(moment()[_0xbfc9[44]](_0x30adx15[_0xbfc9[43]])){_0x30adx21= true}}}catch(err){console[_0xbfc9[29]](_0xbfc9[28],err)};if(!_0x30adx21){return _0x30adx11[_0xbfc9[30]](403)};return _0x30adx12()})[_0xbfc9[23]](function(_0x30adx13){return _0x30adx12(_0x30adx13)})})}function isUsersLimit(){return compose()[_0xbfc9[33]](function(_0x30adx10,_0x30adx11,_0x30adx12){var _0x30adx14;return License[_0xbfc9[32]]({where:{id:1}})[_0xbfc9[31]](function(_0x30adx25){_0x30adx14= _0x30adx25;return User[_0xbfc9[52]]({where:{$or:[{role:_0xbfc9[50]},{role:_0xbfc9[51]}]}})})[_0xbfc9[49]](function(_0x30adx23){var _0x30adx15=null,_0x30adx24=false;try{if(_0x30adx14[_0xbfc9[24]]){_0x30adx15= decrypt(_0x30adx14[_0xbfc9[24]],_0x30adx14[_0xbfc9[25]]);_0x30adx15= JSON[_0xbfc9[26]](_0x30adx15)}else {_0x30adx15= demoLicense}}catch(err){console[_0xbfc9[29]](_0xbfc9[28],err);_0x30adx15= demoLicense};if(_0x30adx15[_0xbfc9[45]]> _0x30adx23){_0x30adx24= true};if(!_0x30adx24){return _0x30adx11[_0xbfc9[48]](403)[_0xbfc9[47]]({message:_0xbfc9[46]})};return _0x30adx12()})[_0xbfc9[23]](function(_0x30adx13){return _0x30adx12(_0x30adx13)})})}function isTelephonesLimit(){return compose()[_0xbfc9[33]](function(_0x30adx10,_0x30adx11,_0x30adx12){var _0x30adx14;return License[_0xbfc9[32]]({where:{id:1}})[_0xbfc9[31]](function(_0x30adx25){_0x30adx14= _0x30adx25;return User[_0xbfc9[52]]({where:{role:_0xbfc9[55]}})})[_0xbfc9[49]](function(_0x30adx27){var _0x30adx15=null,_0x30adx24=false;try{if(_0x30adx14[_0xbfc9[24]]){_0x30adx15= decrypt(_0x30adx14[_0xbfc9[24]],_0x30adx14[_0xbfc9[25]]);_0x30adx15= JSON[_0xbfc9[26]](_0x30adx15)}else {_0x30adx15= demoLicense}}catch(err){console[_0xbfc9[29]](_0xbfc9[28],err);_0x30adx15= demoLicense};if(_0x30adx15[_0xbfc9[53]]> _0x30adx27){_0x30adx24= true};if(!_0x30adx24){return _0x30adx11[_0xbfc9[48]](403)[_0xbfc9[47]]({message:_0xbfc9[54]})};return _0x30adx12()})[_0xbfc9[23]](function(_0x30adx13){return _0x30adx12(_0x30adx13)})})}function isValidAgent(){return function(_0x30adx29){var _0x30adx14;var _0x30adx2a=false;if(_0x30adx29[_0xbfc9[56]]=== _0xbfc9[50]|| _0x30adx29[_0xbfc9[56]]=== _0xbfc9[51]|| (_0x30adx29[_0xbfc9[56]]=== _0xbfc9[57]&& _0x30adx29[_0xbfc9[58]])){_0x30adx2a= true};return License[_0xbfc9[32]]({where:{id:1}})[_0xbfc9[31]](function(_0x30adx25){_0x30adx14= _0x30adx25;return User[_0xbfc9[52]]({where:{role:_0xbfc9[57],online:true}})})[_0xbfc9[49]](function(_0x30adx2b){var _0x30adx15=null;try{if(_0x30adx14[_0xbfc9[24]]){_0x30adx15= decrypt(_0x30adx14[_0xbfc9[24]],_0x30adx14[_0xbfc9[25]]);_0x30adx15= JSON[_0xbfc9[26]](_0x30adx15)}else {_0x30adx15= demoLicense}}catch(err){console[_0xbfc9[29]](_0xbfc9[28],err);_0x30adx15= demoLicense};if(_0x30adx15[_0xbfc9[59]]> _0x30adx2b){_0x30adx2a= true};return _0x30adx2a})}}function decrypt(_0x30adx2d,_0x30adx2e){var _0x30adx2f=_0x30adx2e[_0xbfc9[61]](_0xbfc9[60])[4];var _0x30adx30=_0x30adx2e[_0xbfc9[61]](_0xbfc9[60])[0];var _0x30adx31=crypto[_0xbfc9[65]](_0xbfc9[62],util[_0xbfc9[64]](_0xbfc9[63],_0x30adx2f,_0x30adx2e,_0x30adx30));var _0x30adx14=_0x30adx31[_0xbfc9[37]](_0x30adx2d,_0xbfc9[66],_0xbfc9[19]);_0x30adx14+= _0x30adx31[_0xbfc9[67]](_0xbfc9[19]);return _0x30adx14}exports[_0xbfc9[68]]= getUuid;exports[_0xbfc9[69]]= isValidDate;exports[_0xbfc9[70]]= isUsersLimit;exports[_0xbfc9[71]]= isTelephonesLimit;exports[_0xbfc9[72]]= hasChat;exports[_0xbfc9[73]]= hasMail;exports[_0xbfc9[74]]= hasFax;exports[_0xbfc9[75]]= hasOpenchannel;exports[_0xbfc9[76]]= hasSms;exports[_0xbfc9[77]]= hasJscripty;exports[_0xbfc9[78]]= hasCm;exports[_0xbfc9[79]]= hasUpdate;exports[_0xbfc9[80]]= isValidAgent;exports[_0xbfc9[81]]= demoLicense;exports[_0xbfc9[82]]= decrypt
\ No newline at end of file