Built motion from commit 1038d87.|0.0.141
[motion.git] / server / config / license / license.service.js
index 06c943b..d937f4e 100644 (file)
@@ -1 +1 @@
-var _0x66df=["\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"];_0x66df[0];var compose=require(_0x66df[1]);var moment=require(_0x66df[2]);var crypto=require(_0x66df[3]);var util=require(_0x66df[4]);var os=require(_0x66df[5]);var config=require(_0x66df[6]);var User=require(_0x66df[8])[_0x66df[7]];var Telephone=require(_0x66df[8])[_0x66df[9]];var Settings=require(_0x66df[8])[_0x66df[10]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,description:_0x66df[11]};function getUuid(){if(os[_0x66df[12]]()!==_0x66df[13]){var _0xfa35xc=exec(_0x66df[15],{silent:true})[_0x66df[14]];var _0xfa35xd=_0xfa35xc[_0x66df[18]](_0x66df[17])[_0x66df[16]](0,-1);return _0xfa35xd[0]}else {var _0xfa35xc=exec(_0x66df[19],{silent:true})[_0x66df[14]];var _0xfa35xd=_0xfa35xc[_0x66df[18]](_0x66df[17])[_0x66df[16]](0,-1)[_0x66df[23]](function(_0xfa35xe){var _0xfa35xf,_0xfa35x10,_0xfa35xd;_0xfa35x10= new RegExp(/(\w+)\=\"([^\"]+)/g);_0xfa35xf={partition:_0xfa35xe[_0x66df[20]](/^(\S+)\:\ /)[1]};while(_0xfa35xd=_0xfa35x10[_0x66df[22]](_0xfa35xe)){_0xfa35xf[_0xfa35xd[1][_0x66df[21]]()]=_0xfa35xd[2]};return _0xfa35xf});return _0xfa35xd[0][_0x66df[24]]}}function hasChat(){return compose()[_0x66df[32]](function(_0xfa35x12,_0xfa35x13,_0xfa35x14){return Settings[_0x66df[31]]({where:{id:1}})[_0x66df[30]](function(_0xfa35x16){var _0xfa35x17=null,_0xfa35x18=false;if(_0xfa35x16[_0x66df[26]]){_0xfa35x17=decrypt(_0xfa35x16[_0x66df[26]]);_0xfa35x17=JSON[_0x66df[27]](_0xfa35x17)}else {_0xfa35x17=demoLicense};_0xfa35x18=_0xfa35x17[_0x66df[28]];if(!_0xfa35x18){return _0xfa35x13[_0x66df[29]](403)};return _0xfa35x14()})[_0x66df[25]](function(_0xfa35x15){return _0xfa35x14(_0xfa35x15)})})}function hasMail(){return compose()[_0x66df[32]](function(_0xfa35x12,_0xfa35x13,_0xfa35x14){return Settings[_0x66df[31]]({where:{id:1}})[_0x66df[30]](function(_0xfa35x16){var _0xfa35x17=null,_0xfa35x1a=false;if(_0xfa35x16[_0x66df[26]]){_0xfa35x17=decrypt(_0xfa35x16[_0x66df[26]]);_0xfa35x17=JSON[_0x66df[27]](_0xfa35x17)}else {_0xfa35x17=demoLicense};_0xfa35x1a=_0xfa35x17[_0x66df[33]];if(!_0xfa35x1a){return _0xfa35x13[_0x66df[29]](403)};return _0xfa35x14()})[_0x66df[25]](function(_0xfa35x15){return _0xfa35x14(_0xfa35x15)})})}function hasFax(){return compose()[_0x66df[32]](function(_0xfa35x12,_0xfa35x13,_0xfa35x14){return Settings[_0x66df[31]]({where:{id:1}})[_0x66df[30]](function(_0xfa35x16){var _0xfa35x17=null,_0xfa35x1c=false;if(_0xfa35x16[_0x66df[26]]){_0xfa35x17=decrypt(_0xfa35x16[_0x66df[26]]);_0xfa35x17=JSON[_0x66df[27]](_0xfa35x17)}else {_0xfa35x17=demoLicense};_0xfa35x1c=_0xfa35x17[_0x66df[34]];if(!_0xfa35x1c){return _0xfa35x13[_0x66df[29]](403)};return _0xfa35x14()})[_0x66df[25]](function(_0xfa35x15){return _0xfa35x14(_0xfa35x15)})})}function isValidDate(){return compose()[_0x66df[32]](function(_0xfa35x12,_0xfa35x13,_0xfa35x14){return Settings[_0x66df[31]]({where:{id:1}})[_0x66df[30]](function(_0xfa35x16){var _0xfa35x17=null,_0xfa35x1e=false;if(_0xfa35x16[_0x66df[26]]){_0xfa35x17=decrypt(_0xfa35x16[_0x66df[26]]);_0xfa35x17=JSON[_0x66df[27]](_0xfa35x17);if(moment()[_0x66df[36]](_0xfa35x17[_0x66df[35]])){_0xfa35x1e=true}};if(!_0xfa35x1e){return _0xfa35x13[_0x66df[29]](403)};return _0xfa35x14()})[_0x66df[25]](function(_0xfa35x15){return _0xfa35x14(_0xfa35x15)})})}function isUsersLimit(){return compose()[_0x66df[32]](function(_0xfa35x12,_0xfa35x13,_0xfa35x14){var _0xfa35x20;return Settings[_0x66df[31]]({where:{id:1}})[_0x66df[30]](function(_0xfa35x16){_0xfa35x20=_0xfa35x16;return User[_0x66df[44]]({where:{$or:[{role:_0x66df[42]},{role:_0x66df[43]}]}})})[_0x66df[41]](function(_0xfa35x21){var _0xfa35x17=null,_0xfa35x22=false;if(_0xfa35x20[_0x66df[26]]){_0xfa35x17=decrypt(_0xfa35x20[_0x66df[26]]);_0xfa35x17=JSON[_0x66df[27]](_0xfa35x17)}else {_0xfa35x17=demoLicense};if(_0xfa35x17[_0x66df[37]]>_0xfa35x21){_0xfa35x22=true};if(!_0xfa35x22){return _0xfa35x13[_0x66df[40]](403)[_0x66df[39]]({message:_0x66df[38]})};return _0xfa35x14()})[_0x66df[25]](function(_0xfa35x15){return _0xfa35x14(_0xfa35x15)})})}function isTelephonesLimit(){return compose()[_0x66df[32]](function(_0xfa35x12,_0xfa35x13,_0xfa35x14){var _0xfa35x20;return Settings[_0x66df[31]]({where:{id:1}})[_0x66df[30]](function(_0xfa35x16){_0xfa35x20=_0xfa35x16;return User[_0x66df[44]]({where:{role:_0x66df[47]}})})[_0x66df[41]](function(_0xfa35x24){var _0xfa35x17=null,_0xfa35x22=false;if(_0xfa35x20[_0x66df[26]]){_0xfa35x17=decrypt(_0xfa35x20[_0x66df[26]]);_0xfa35x17=JSON[_0x66df[27]](_0xfa35x17)}else {_0xfa35x17=demoLicense};if(_0xfa35x17[_0x66df[45]]>_0xfa35x24){_0xfa35x22=true};if(!_0xfa35x22){return _0xfa35x13[_0x66df[40]](403)[_0x66df[39]]({message:_0x66df[46]})};return _0xfa35x14()})[_0x66df[25]](function(_0xfa35x15){return _0xfa35x14(_0xfa35x15)})})}function isValidAgent(){return function(_0xfa35x26){var _0xfa35x20;var _0xfa35x27=false;if(_0xfa35x26[_0x66df[48]]===_0x66df[42]||_0xfa35x26[_0x66df[48]]===_0x66df[43]||(_0xfa35x26[_0x66df[48]]===_0x66df[49]&&_0xfa35x26[_0x66df[50]])){_0xfa35x27=true};return Settings[_0x66df[31]]({where:{id:1}})[_0x66df[30]](function(_0xfa35x16){_0xfa35x20=_0xfa35x16;return User[_0x66df[44]]({where:{role:_0x66df[49],online:true}})})[_0x66df[41]](function(_0xfa35x28){var _0xfa35x17=null;if(_0xfa35x20[_0x66df[26]]){_0xfa35x17=decrypt(_0xfa35x20[_0x66df[26]]);_0xfa35x17=JSON[_0x66df[27]](_0xfa35x17)}else {_0xfa35x17=demoLicense};if(_0xfa35x17[_0x66df[51]]>_0xfa35x28){_0xfa35x27=true};return _0xfa35x27})}}function decrypt(_0xfa35x2a){var _0xfa35x2b=getUuid();var _0xfa35x2c=_0xfa35x2b[_0x66df[18]](_0x66df[52])[4];var _0xfa35x2d=_0xfa35x2b[_0x66df[18]](_0x66df[52])[0];var _0xfa35x2e=crypto[_0x66df[56]](_0x66df[53],util[_0x66df[55]](_0x66df[54],_0xfa35x2c,_0xfa35x2b,_0xfa35x2d));var _0xfa35x17=_0xfa35x2e[_0x66df[59]](_0xfa35x2a,_0x66df[57],_0x66df[58]);_0xfa35x17+=_0xfa35x2e[_0x66df[60]](_0x66df[58]);return _0xfa35x17}exports[_0x66df[61]]=getUuid;exports[_0x66df[62]]=isValidDate;exports[_0x66df[63]]=isUsersLimit;exports[_0x66df[64]]=isTelephonesLimit;exports[_0x66df[65]]=hasChat;exports[_0x66df[66]]=hasMail;exports[_0x66df[67]]=hasFax;exports[_0x66df[68]]=isValidAgent;exports[_0x66df[69]]=demoLicense;exports[_0x66df[70]]=decrypt
\ No newline at end of file
+var _0x5d8b=["\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\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"];_0x5d8b[0];var compose=require(_0x5d8b[1]);var moment=require(_0x5d8b[2]);var crypto=require(_0x5d8b[3]);var util=require(_0x5d8b[4]);var os=require(_0x5d8b[5]);var exec=require(_0x5d8b[7])[_0x5d8b[6]];var config=require(_0x5d8b[8]);var User=require(_0x5d8b[10])[_0x5d8b[9]];var Telephone=require(_0x5d8b[10])[_0x5d8b[11]];var Setting=require(_0x5d8b[10])[_0x5d8b[12]];var License=require(_0x5d8b[10])[_0x5d8b[13]];var demoLicense={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:_0x5d8b[14]};function getUuid(){switch(os[_0x5d8b[22]]()){case _0x5d8b[20]:return exec(_0x5d8b[18],{encoding:_0x5d8b[19]})[_0x5d8b[17]](_0x5d8b[15],_0x5d8b[16]);default:return require(_0x5d8b[21])(true)}}function checkLicense(_0xb1ccxf){return compose()[_0x5d8b[32]](function(_0xb1ccx10,_0xb1ccx11,_0xb1ccx12){return License[_0x5d8b[31]]({where:{id:1}})[_0x5d8b[30]](function(_0xb1ccx14){var _0xb1ccx15=null;var _0xb1ccx16=false;try{if(_0xb1ccx14[_0x5d8b[24]]){_0xb1ccx15= decrypt(_0xb1ccx14[_0x5d8b[24]],_0xb1ccx14[_0x5d8b[25]]);_0xb1ccx15= JSON[_0x5d8b[26]](_0xb1ccx15)}else {_0xb1ccx15= demoLicense}}catch(err){console[_0x5d8b[28]](_0x5d8b[27],err);_0xb1ccx15= demoLicense};_0xb1ccx16= _0xb1ccx15[_0xb1ccxf];if(!_0xb1ccx16){return _0xb1ccx11[_0x5d8b[29]](403)};return _0xb1ccx12()})[_0x5d8b[23]](function(_0xb1ccx13){return _0xb1ccx12(_0xb1ccx13)})})}function hasChat(){return checkLicense(_0x5d8b[33])}function hasSms(){return checkLicense(_0x5d8b[34])}function hasCm(){return checkLicense(_0x5d8b[35])}function hasUpdate(){return checkLicense(_0x5d8b[36])}function hasMail(){return checkLicense(_0x5d8b[37])}function hasFax(){return checkLicense(_0x5d8b[38])}function hasJscripty(){return checkLicense(_0x5d8b[39])}function hasCustom(){return checkLicense(_0x5d8b[40])}function hasOpenchannel(){return checkLicense(_0x5d8b[41])}function isValidDate(){return compose()[_0x5d8b[32]](function(_0xb1ccx10,_0xb1ccx11,_0xb1ccx12){return License[_0x5d8b[31]]({where:{id:1}})[_0x5d8b[30]](function(_0xb1ccx14){var _0xb1ccx15=null,_0xb1ccx21=false;try{if(_0xb1ccx14[_0x5d8b[24]]){_0xb1ccx15= decrypt(_0xb1ccx14[_0x5d8b[24]],_0xb1ccx14[_0x5d8b[25]]);_0xb1ccx15= JSON[_0x5d8b[26]](_0xb1ccx15);if(moment()[_0x5d8b[43]](_0xb1ccx15[_0x5d8b[42]])){_0xb1ccx21= true}}}catch(err){console[_0x5d8b[28]](_0x5d8b[27],err)};if(!_0xb1ccx21){return _0xb1ccx11[_0x5d8b[29]](403)};return _0xb1ccx12()})[_0x5d8b[23]](function(_0xb1ccx13){return _0xb1ccx12(_0xb1ccx13)})})}function isUsersLimit(){return compose()[_0x5d8b[32]](function(_0xb1ccx10,_0xb1ccx11,_0xb1ccx12){var _0xb1ccx14;return License[_0x5d8b[31]]({where:{id:1}})[_0x5d8b[30]](function(_0xb1ccx25){_0xb1ccx14= _0xb1ccx25;return User[_0x5d8b[51]]({where:{$or:[{role:_0x5d8b[49]},{role:_0x5d8b[50]}]}})})[_0x5d8b[48]](function(_0xb1ccx23){var _0xb1ccx15=null,_0xb1ccx24=false;try{if(_0xb1ccx14[_0x5d8b[24]]){_0xb1ccx15= decrypt(_0xb1ccx14[_0x5d8b[24]],_0xb1ccx14[_0x5d8b[25]]);_0xb1ccx15= JSON[_0x5d8b[26]](_0xb1ccx15)}else {_0xb1ccx15= demoLicense}}catch(err){console[_0x5d8b[28]](_0x5d8b[27],err);_0xb1ccx15= demoLicense};if(_0xb1ccx15[_0x5d8b[44]]> _0xb1ccx23){_0xb1ccx24= true};if(!_0xb1ccx24){return _0xb1ccx11[_0x5d8b[47]](403)[_0x5d8b[46]]({message:_0x5d8b[45]})};return _0xb1ccx12()})[_0x5d8b[23]](function(_0xb1ccx13){return _0xb1ccx12(_0xb1ccx13)})})}function isTelephonesLimit(){return compose()[_0x5d8b[32]](function(_0xb1ccx10,_0xb1ccx11,_0xb1ccx12){var _0xb1ccx14;return License[_0x5d8b[31]]({where:{id:1}})[_0x5d8b[30]](function(_0xb1ccx25){_0xb1ccx14= _0xb1ccx25;return User[_0x5d8b[51]]({where:{role:_0x5d8b[54]}})})[_0x5d8b[48]](function(_0xb1ccx27){var _0xb1ccx15=null,_0xb1ccx24=false;try{if(_0xb1ccx14[_0x5d8b[24]]){_0xb1ccx15= decrypt(_0xb1ccx14[_0x5d8b[24]],_0xb1ccx14[_0x5d8b[25]]);_0xb1ccx15= JSON[_0x5d8b[26]](_0xb1ccx15)}else {_0xb1ccx15= demoLicense}}catch(err){console[_0x5d8b[28]](_0x5d8b[27],err);_0xb1ccx15= demoLicense};if(_0xb1ccx15[_0x5d8b[52]]> _0xb1ccx27){_0xb1ccx24= true};if(!_0xb1ccx24){return _0xb1ccx11[_0x5d8b[47]](403)[_0x5d8b[46]]({message:_0x5d8b[53]})};return _0xb1ccx12()})[_0x5d8b[23]](function(_0xb1ccx13){return _0xb1ccx12(_0xb1ccx13)})})}function isValidAgent(){return function(_0xb1ccx29){var _0xb1ccx14;var _0xb1ccx2a=false;if(_0xb1ccx29[_0x5d8b[55]]=== _0x5d8b[49]|| _0xb1ccx29[_0x5d8b[55]]=== _0x5d8b[50]|| (_0xb1ccx29[_0x5d8b[55]]=== _0x5d8b[56]&& _0xb1ccx29[_0x5d8b[57]])){_0xb1ccx2a= true};return License[_0x5d8b[31]]({where:{id:1}})[_0x5d8b[30]](function(_0xb1ccx25){_0xb1ccx14= _0xb1ccx25;return User[_0x5d8b[51]]({where:{role:_0x5d8b[56],online:true}})})[_0x5d8b[48]](function(_0xb1ccx2b){var _0xb1ccx15=null;try{if(_0xb1ccx14[_0x5d8b[24]]){_0xb1ccx15= decrypt(_0xb1ccx14[_0x5d8b[24]],_0xb1ccx14[_0x5d8b[25]]);_0xb1ccx15= JSON[_0x5d8b[26]](_0xb1ccx15)}else {_0xb1ccx15= demoLicense}}catch(err){console[_0x5d8b[28]](_0x5d8b[27],err);_0xb1ccx15= demoLicense};if(_0xb1ccx15[_0x5d8b[58]]> _0xb1ccx2b){_0xb1ccx2a= true};return _0xb1ccx2a})}}function decrypt(_0xb1ccx2d,_0xb1ccx2e){var _0xb1ccx2f=_0xb1ccx2e[_0x5d8b[60]](_0x5d8b[59])[4];var _0xb1ccx30=_0xb1ccx2e[_0x5d8b[60]](_0x5d8b[59])[0];var _0xb1ccx31=crypto[_0x5d8b[64]](_0x5d8b[61],util[_0x5d8b[63]](_0x5d8b[62],_0xb1ccx2f,_0xb1ccx2e,_0xb1ccx30));var _0xb1ccx14=_0xb1ccx31[_0x5d8b[36]](_0xb1ccx2d,_0x5d8b[65],_0x5d8b[19]);_0xb1ccx14+= _0xb1ccx31[_0x5d8b[66]](_0x5d8b[19]);return _0xb1ccx14}exports[_0x5d8b[67]]= getUuid;exports[_0x5d8b[68]]= isValidDate;exports[_0x5d8b[69]]= isUsersLimit;exports[_0x5d8b[70]]= isTelephonesLimit;exports[_0x5d8b[71]]= hasChat;exports[_0x5d8b[72]]= hasMail;exports[_0x5d8b[73]]= hasFax;exports[_0x5d8b[74]]= hasOpenchannel;exports[_0x5d8b[75]]= hasSms;exports[_0x5d8b[76]]= hasJscripty;exports[_0x5d8b[77]]= hasCm;exports[_0x5d8b[78]]= hasUpdate;exports[_0x5d8b[79]]= isValidAgent;exports[_0x5d8b[80]]= demoLicense;exports[_0x5d8b[81]]= decrypt
\ No newline at end of file