dbe0e0fa9ce0ccd2ca915176d69975004b9550f3
[motion.git] / server / api / user / user.controller.js
1 var _0xb0d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x6F\x64\x75\x6C\x65","\x53\x65\x74\x74\x69\x6E\x67","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x61\x70\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73\x2F\x75\x73\x65\x72","\x70\x61\x73\x73\x70\x6F\x72\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x70\x61\x74\x68","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x62\x6C\x75\x65\x62\x69\x72\x64","\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\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x55\x73\x65\x72\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x67\x65\x74\x4D\x6F\x64\x75\x6C\x65\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6C\x65","\x62\x6F\x64\x79","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x6D\x6F\x64\x75\x6C\x65\x73","\x73\x65\x74\x4D\x6F\x64\x75\x6C\x65\x73","\x73\x68\x6F\x77","\x64\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x72\x75\x6E\x65","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x64\x6D\x69\x6E","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x72\x65\x73\x65\x74\x20\x74\x68\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x6F\x66\x20\x6F\x74\x68\x65\x72\x20\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72\x73","\x55\x73\x65\x72\x73\x20\x63\x61\x6E\x27\x74\x20\x72\x65\x73\x65\x74\x20\x74\x68\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x6F\x66\x20\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72\x73","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x72\x65\x73\x65\x74\x20\x74\x68\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x6F\x66\x20\x6F\x74\x68\x65\x72\x20\x75\x73\x65\x72\x73","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x63\x68\x61\x6E\x67\x65\x41\x76\x61\x74\x61\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x6A\x70\x65\x67\x20\x61\x6E\x64\x20\x70\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x75\x70\x64\x61\x74\x65","\x6F\x6E","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x64\x65\x62\x75\x67","\x70\x61\x72\x73\x65","\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x75\x73\x65\x72\x70\x69\x63\x2E\x70\x6E\x67","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x65\x78\x69\x73\x74\x73","\x67\x65\x74\x41\x76\x61\x74\x61\x72\x42\x79\x49\x64","\x76\x69\x73\x69\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D\x65\x72\x2E\x70\x6E\x67","\x75\x73\x65\x72\x70\x69\x63","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x6D\x61\x70","\x67\x65\x74\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x67\x65\x74\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74","\x67\x65\x74\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C","\x67\x65\x74\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x66\x61\x78","\x67\x65\x74\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x6D\x73","\x67\x65\x74\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x54\x68\x65\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x64\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x75\x73\x65\x72\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x2F","\x72\x65\x64\x69\x72\x65\x63\x74","\x73\x74\x61\x63\x6B"];_0xb0d0[0];var User=require(_0xb0d0[2])[_0xb0d0[1]];var Module=require(_0xb0d0[2])[_0xb0d0[3]];var Setting=require(_0xb0d0[2])[_0xb0d0[4]];var VoiceQueue=require(_0xb0d0[2])[_0xb0d0[5]];var ChatQueue=require(_0xb0d0[2])[_0xb0d0[6]];var MailQueue=require(_0xb0d0[2])[_0xb0d0[7]];var FaxQueue=require(_0xb0d0[2])[_0xb0d0[8]];var SmsQueue=require(_0xb0d0[2])[_0xb0d0[9]];var sequelize=require(_0xb0d0[2])[_0xb0d0[10]];var logger=require(_0xb0d0[12])(_0xb0d0[11]);var config=require(_0xb0d0[13]);var Util=require(_0xb0d0[14]);var userTools=require(_0xb0d0[15]);var passport=require(_0xb0d0[16]);var moment=require(_0xb0d0[17]);var jwt=require(_0xb0d0[18]);var uploadFile=require(_0xb0d0[19]);var path=require(_0xb0d0[20]);var fs=require(_0xb0d0[21]);var _=require(_0xb0d0[22]);var util=require(_0xb0d0[23]);var sr=require(_0xb0d0[24]);var BPromise=require(_0xb0d0[25]);exports[_0xb0d0[26]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){return User[_0xb0d0[35]](_0xb0d0[34])[_0xb0d0[33]](Util[_0xb0d0[32]](_0x55f8x18[_0xb0d0[31]]))[_0xb0d0[30]](function(_0x55f8x1c){_0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]](_0x55f8x1c)})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[36]]= function(_0x55f8x18,_0x55f8x19){return User[_0xb0d0[36]]()[_0xb0d0[30]](function(_0x55f8x1d){return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]](_0x55f8x1d)})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[37]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){return User[_0xb0d0[38]]()[_0xb0d0[30]](function(_0x55f8x1e){return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]]({rows:_0x55f8x1e})})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[39]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){return User[_0xb0d0[44]](_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]])[_0xb0d0[30]](function(_0x55f8x20){if(!_0x55f8x20){return _0x55f8x19[_0xb0d0[40]](404)};return _0x55f8x20[_0xb0d0[41]]()})[_0xb0d0[30]](function(_0x55f8x1f){return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]](_0x55f8x1f)})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[45]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){_0x55f8x18[_0xb0d0[47]][_0xb0d0[46]]= _0x55f8x18[_0xb0d0[47]][_0xb0d0[46]]|| _0xb0d0[34];return sequelize[_0xb0d0[55]](function(_0x55f8x21){return Setting[_0xb0d0[44]](1)[_0xb0d0[30]](function(_0x55f8x22){var _0x55f8x23=String(_0x55f8x18[_0xb0d0[47]][_0xb0d0[51]]);var _0x55f8x24=_0x55f8x22[_0xb0d0[52]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^.{6,}$/;if(!_0x55f8x24[_0xb0d0[53]](_0x55f8x23)){throw  new Error(_0xb0d0[54])};return User[_0xb0d0[45]](_0x55f8x18[_0xb0d0[47]],{transaction:_0x55f8x21})})[_0xb0d0[30]](userTools[_0xb0d0[50]]({transaction:_0x55f8x21}))[_0xb0d0[30]](function(_0x55f8x20){return _0x55f8x19[_0xb0d0[29]](201)[_0xb0d0[28]](_0x55f8x20)})})[_0xb0d0[27]](sequelize.UniqueConstraintError,function(_0x55f8x1b){return Util[_0xb0d0[49]][_0xb0d0[48]](_0x55f8x19,_0x55f8x1b)})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[56]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){return sequelize[_0xb0d0[55]](function(_0x55f8x21){return User[_0xb0d0[44]](_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]])[_0xb0d0[30]](function(_0x55f8x20){if(!_0x55f8x20){return _0x55f8x19[_0xb0d0[40]](404)};return _0x55f8x20[_0xb0d0[58]](_0x55f8x18[_0xb0d0[47]][_0xb0d0[57]])})[_0xb0d0[30]](function(){return _0x55f8x19[_0xb0d0[40]](201)})})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[59]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){return User[_0xb0d0[44]](_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]])[_0xb0d0[30]](function(_0x55f8x20){if(!_0x55f8x20){return _0x55f8x19[_0xb0d0[40]](404)};return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]](_0x55f8x20)})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[60]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){var _0x55f8x25=_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]];var _0x55f8x26;return User[_0xb0d0[44]](_0x55f8x25)[_0xb0d0[30]](function(_0x55f8x20){_0x55f8x26= _0x55f8x20;if(!_0x55f8x20){return _0x55f8x19[_0xb0d0[40]](404)};return _0x55f8x20[_0xb0d0[60]]()})[_0xb0d0[30]](function(_0x55f8x20){return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]](_0x55f8x20)})[_0xb0d0[27]](sequelize.ForeignKeyConstraintError,function(_0x55f8x1b){return Util[_0xb0d0[49]][_0xb0d0[62]](_0x55f8x19,_0xb0d0[34],_0x55f8x26[_0xb0d0[61]],_0x55f8x1b)})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[63]]= function(_0x55f8x18,_0x55f8x19){return User[_0xb0d0[60]]({where:{id:_0x55f8x18[_0xb0d0[31]][_0xb0d0[64]]},individualHooks:true})[_0xb0d0[30]](function(){return _0x55f8x19[_0xb0d0[40]](204)})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[65]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){var _0x55f8x25=_0x55f8x18[_0xb0d0[34]][_0xb0d0[42]];var _0x55f8x27=String(_0x55f8x18[_0xb0d0[47]][_0xb0d0[66]]);var _0x55f8x28=String(_0x55f8x18[_0xb0d0[47]][_0xb0d0[67]]);return sequelize[_0xb0d0[55]](function(_0x55f8x21){return Setting[_0xb0d0[44]](1)[_0xb0d0[30]](function(_0x55f8x22){var _0x55f8x24=_0x55f8x22[_0xb0d0[52]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^.{6,}$/;if(!_0x55f8x24[_0xb0d0[53]](_0x55f8x28)){throw  new Error(_0xb0d0[54])};return User[_0xb0d0[44]](_0x55f8x25)})[_0xb0d0[30]](function(_0x55f8x20){if(!_0x55f8x20[_0xb0d0[68]](_0x55f8x27)){return _0x55f8x19[_0xb0d0[40]](403)}else {_0x55f8x20[_0xb0d0[51]]= _0x55f8x28;return _0x55f8x20[_0xb0d0[74]]({transaction:_0x55f8x21})[_0xb0d0[30]](userTools[_0xb0d0[73]]({transaction:_0x55f8x21}))[_0xb0d0[30]](function(_0x55f8x20){_0x55f8x18[_0xb0d0[72]][_0xb0d0[71]][_0xb0d0[70]][_0xb0d0[28]]({message:_0xb0d0[69],doc:_0x55f8x20});return _0x55f8x19[_0xb0d0[40]](200)})}})})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[75]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){var _0x55f8x29;var _0x55f8x25=_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]];var _0x55f8x28=String(_0x55f8x18[_0xb0d0[47]][_0xb0d0[67]]);return Setting[_0xb0d0[44]](1)[_0xb0d0[30]](function(_0x55f8x22){_0x55f8x29= _0x55f8x22;return User[_0xb0d0[44]](_0x55f8x25)})[_0xb0d0[30]](function(_0x55f8x20){if(_0x55f8x20[_0xb0d0[46]]=== _0xb0d0[76]){if(_0x55f8x18[_0xb0d0[34]][_0xb0d0[46]]=== _0xb0d0[76]){if(_0x55f8x18[_0xb0d0[34]][_0xb0d0[42]]!== _0x55f8x20[_0xb0d0[42]]){return handleError(_0x55f8x19,{message:_0xb0d0[77]})}}else {return handleError(_0x55f8x19,{message:_0xb0d0[78]})}}else {if(_0x55f8x20[_0xb0d0[46]]=== _0xb0d0[34]){if(_0x55f8x18[_0xb0d0[34]][_0xb0d0[46]]=== _0xb0d0[34]){if(_0x55f8x18[_0xb0d0[34]][_0xb0d0[42]]!== _0x55f8x20[_0xb0d0[42]]){return handleError(_0x55f8x19,{message:_0xb0d0[79]})}}}};var _0x55f8x24=_0x55f8x29[_0xb0d0[52]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^.{6,}$/;if(_0x55f8x29[_0xb0d0[52]]&&  !_0x55f8x24[_0xb0d0[53]](_0x55f8x28)){throw  new Error(_0xb0d0[80])};_0x55f8x20[_0xb0d0[51]]= _0x55f8x28;return _0x55f8x20[_0xb0d0[74]]()[_0xb0d0[30]](userTools[_0xb0d0[73]]())[_0xb0d0[30]](function(_0x55f8x20){_0x55f8x18[_0xb0d0[72]][_0xb0d0[71]][_0xb0d0[70]][_0xb0d0[28]]({message:_0xb0d0[69],doc:_0x55f8x20});return _0x55f8x19[_0xb0d0[40]](200)})})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[81]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){var _0x55f8x2a= new uploadFile({dest:path[_0xb0d0[86]](config[_0xb0d0[82]],_0xb0d0[83],_0xb0d0[84],_0xb0d0[85]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0x55f8x2b,_0x55f8x2c){return sr()+ path[_0xb0d0[88]](_0x55f8x2c[_0xb0d0[87]])},messages:{maxNumberOfFiles:_0xb0d0[89],acceptFileTypes:_0xb0d0[90],invalidRequest:_0xb0d0[91]}});_0x55f8x2a[_0xb0d0[95]](_0xb0d0[92],function(_0x55f8x1d,_0x55f8x2d){if(!_0x55f8x2d[_0xb0d0[93]][_0xb0d0[87]]){return _0x55f8x19[_0xb0d0[29]](500)[_0xb0d0[28]](_0x55f8x2a)};return sequelize[_0xb0d0[55]](function(_0x55f8x21){return User[_0xb0d0[44]](_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]])[_0xb0d0[30]](function(_0x55f8x20){if(!_0x55f8x20){return _0x55f8x19[_0xb0d0[40]](404)};return _0x55f8x20[_0xb0d0[94]]({userpic:_0x55f8x2d[_0xb0d0[93]][_0xb0d0[87]]},{transaction:_0x55f8x21})})[_0xb0d0[30]](function(_0x55f8x20){return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]](_0x55f8x20)})})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})});_0x55f8x2a[_0xb0d0[95]](_0xb0d0[96],function(_0x55f8x1b){logger[_0xb0d0[98]](_0xb0d0[97],_0x55f8x1b);return handleError(_0x55f8x19,_0x55f8x1b)});_0x55f8x2a[_0xb0d0[99]](_0x55f8x18)};exports[_0xb0d0[100]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){return User[_0xb0d0[35]]({method:[_0xb0d0[100],_0x55f8x18[_0xb0d0[34]][_0xb0d0[42]]]})[_0xb0d0[101]]()[_0xb0d0[30]](function(_0x55f8x20){if(!_0x55f8x20){return _0x55f8x19[_0xb0d0[40]](401)};return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]](_0x55f8x20)})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[94]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){var _0x55f8x25=_0x55f8x18[_0xb0d0[34]][_0xb0d0[42]];delete _0x55f8x18[_0xb0d0[47]][_0xb0d0[102]];delete _0x55f8x18[_0xb0d0[47]][_0xb0d0[51]];delete _0x55f8x18[_0xb0d0[47]][_0xb0d0[61]];var _0x55f8x26;return sequelize[_0xb0d0[55]](function(_0x55f8x21){return User[_0xb0d0[44]](_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]])[_0xb0d0[30]](function(_0x55f8x20){if(!_0x55f8x20){return _0x55f8x19[_0xb0d0[40]](500)};return _0x55f8x20[_0xb0d0[94]](_0x55f8x18[_0xb0d0[47]],{transaction:_0x55f8x21})})[_0xb0d0[30]](function(_0x55f8x20){_0x55f8x26= _0x55f8x20;return _0x55f8x20})[_0xb0d0[30]](userTools[_0xb0d0[73]]({transaction:_0x55f8x21}))[_0xb0d0[30]](function(){return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]](_0x55f8x26)})})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[103]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){var _0x55f8x2e=path[_0xb0d0[86]](config[_0xb0d0[82]],_0xb0d0[83],_0xb0d0[84],_0xb0d0[85],_0x55f8x18[_0xb0d0[43]][_0xb0d0[87]]);fs[_0xb0d0[106]](_0x55f8x2e,function(_0x55f8x2f){if(!_0x55f8x2f){_0x55f8x2e= path[_0xb0d0[86]](config[_0xb0d0[82]],_0xb0d0[83],_0xb0d0[84],_0xb0d0[85],_0xb0d0[104])};return _0x55f8x19[_0xb0d0[105]](_0x55f8x2e)})};exports[_0xb0d0[107]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){if(_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]]=== _0xb0d0[108]){var _0x55f8x2e=path[_0xb0d0[86]](config[_0xb0d0[82]],_0xb0d0[83],_0xb0d0[84],_0xb0d0[85],_0xb0d0[109]);fs[_0xb0d0[106]](_0x55f8x2e,function(_0x55f8x2f){return _0x55f8x19[_0xb0d0[105]](_0x55f8x2e)})}else {return User[_0xb0d0[44]](_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]])[_0xb0d0[30]](function(_0x55f8x20){if(_0x55f8x20){var _0x55f8x2e=path[_0xb0d0[86]](config[_0xb0d0[82]],_0xb0d0[83],_0xb0d0[84],_0xb0d0[85],_0x55f8x20[_0xb0d0[110]]?_0x55f8x20[_0xb0d0[110]]:_0xb0d0[104]);fs[_0xb0d0[106]](_0x55f8x2e,function(_0x55f8x2f){if(!_0x55f8x2f){_0x55f8x2e= path[_0xb0d0[86]](config[_0xb0d0[82]],_0xb0d0[83],_0xb0d0[84],_0xb0d0[85],_0xb0d0[104])};return _0x55f8x19[_0xb0d0[105]](_0x55f8x2e)})}else {return _0x55f8x19[_0xb0d0[40]](500)}})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})}};exports[_0xb0d0[111]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){var _0x55f8x26;return User[_0xb0d0[44]](_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]],{attributes:[_0xb0d0[42]]})[_0xb0d0[30]](function(_0x55f8x20){_0x55f8x26= _0x55f8x20;if(!_0x55f8x26){return _0x55f8x19[_0xb0d0[40]](401)};switch(_0x55f8x18[_0xb0d0[43]][_0xb0d0[126]]){case _0xb0d0[114]:return _0x55f8x26[_0xb0d0[113]]({attributes:[_0xb0d0[61]]});case _0xb0d0[116]:return _0x55f8x26[_0xb0d0[115]]({attributes:[_0xb0d0[42],_0xb0d0[61]]});case _0xb0d0[118]:return _0x55f8x26[_0xb0d0[117]]({attributes:[_0xb0d0[42],_0xb0d0[61]]});case _0xb0d0[120]:return _0x55f8x26[_0xb0d0[119]]({attributes:[_0xb0d0[42],_0xb0d0[61]]});case _0xb0d0[122]:return _0x55f8x26[_0xb0d0[121]]({attributes:[_0xb0d0[42],_0xb0d0[61]]});case _0xb0d0[124]:return _0x55f8x26[_0xb0d0[123]]({attributes:[_0xb0d0[42],_0xb0d0[61]]});default:throw  new Error(_0xb0d0[125])}})[_0xb0d0[30]](function(_0x55f8x30){if(_0x55f8x30){return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]](_[_0xb0d0[112]](_0x55f8x30,function(_0x55f8x31){var _0x55f8x32={name:_0x55f8x31[_0xb0d0[61]]};if(_0x55f8x31[_0xb0d0[42]]){_0x55f8x32[_0xb0d0[42]]= _0x55f8x31[_0xb0d0[42]]};return _0x55f8x32}))}})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[127]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){var _0x55f8x26;return User[_0xb0d0[44]](_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]],{attributes:[_0xb0d0[42]]})[_0xb0d0[30]](function(_0x55f8x20){_0x55f8x26= _0x55f8x20;if(!_0x55f8x26){return _0x55f8x19[_0xb0d0[40]](401)};switch(_0x55f8x18[_0xb0d0[43]][_0xb0d0[126]]){case _0xb0d0[114]:return _0x55f8x26[_0xb0d0[128]](_0x55f8x18[_0xb0d0[47]]);case _0xb0d0[116]:return _0x55f8x26[_0xb0d0[129]](_0x55f8x18[_0xb0d0[47]]);case _0xb0d0[118]:return _0x55f8x26[_0xb0d0[130]](_0x55f8x18[_0xb0d0[47]]);case _0xb0d0[120]:return _0x55f8x26[_0xb0d0[131]](_0x55f8x18[_0xb0d0[47]]);case _0xb0d0[122]:return _0x55f8x26[_0xb0d0[132]](_0x55f8x18[_0xb0d0[47]]);case _0xb0d0[124]:return _0x55f8x26[_0xb0d0[133]](_0x55f8x18[_0xb0d0[47]]);default:return null}})[_0xb0d0[30]](function(_0x55f8x30){return _0x55f8x19[_0xb0d0[40]](_0x55f8x30?200:401)})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[134]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){var _0x55f8x26;return User[_0xb0d0[44]](_0x55f8x18[_0xb0d0[43]][_0xb0d0[42]],{attributes:[_0xb0d0[42]]})[_0xb0d0[30]](function(_0x55f8x20){_0x55f8x26= _0x55f8x20;if(!_0x55f8x26){return _0x55f8x19[_0xb0d0[40]](401)};switch(_0x55f8x18[_0xb0d0[43]][_0xb0d0[126]]){case _0xb0d0[114]:return _0x55f8x26[_0xb0d0[135]](_0x55f8x18[_0xb0d0[31]][_0xb0d0[64]]);case _0xb0d0[116]:return _0x55f8x26[_0xb0d0[136]](_0x55f8x18[_0xb0d0[31]][_0xb0d0[64]]);case _0xb0d0[118]:return _0x55f8x26[_0xb0d0[137]](_0x55f8x18[_0xb0d0[31]][_0xb0d0[64]]);case _0xb0d0[122]:return _0x55f8x26[_0xb0d0[138]](_0x55f8x18[_0xb0d0[31]][_0xb0d0[64]]);case _0xb0d0[120]:return _0x55f8x26[_0xb0d0[139]](_0x55f8x18[_0xb0d0[31]][_0xb0d0[64]]);case _0xb0d0[124]:return _0x55f8x26[_0xb0d0[140]](_0x55f8x18[_0xb0d0[31]][_0xb0d0[64]]);default:return null}})[_0xb0d0[30]](function(_0x55f8x30){return _0x55f8x19[_0xb0d0[40]](_0x55f8x30?200:401)})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[141]]= function(_0x55f8x18,_0x55f8x19){var _0x55f8x33={};_0x55f8x33[_0x55f8x18[_0xb0d0[43]][_0xb0d0[142]]]= _0x55f8x18[_0xb0d0[47]][_0xb0d0[143]];return User[_0xb0d0[33]]({where:_0x55f8x33})[_0xb0d0[30]](function(_0x55f8x1c){if(_0x55f8x1c[_0xb0d0[144]]){return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]]({isValid:false,value:_0x55f8x18[_0xb0d0[47]][_0xb0d0[143]]})};return _0x55f8x19[_0xb0d0[29]](200)[_0xb0d0[28]]({isValid:true,value:_0x55f8x18[_0xb0d0[47]][_0xb0d0[143]]})})[_0xb0d0[27]](function(_0x55f8x1b){return handleError(_0x55f8x19,_0x55f8x1b)})};exports[_0xb0d0[145]]= function(_0x55f8x18,_0x55f8x19,_0x55f8x1a){_0x55f8x19[_0xb0d0[147]](_0xb0d0[146])};function handleError(_0x55f8x19,_0x55f8x1b,_0x55f8x35){logger[_0xb0d0[96]](_0x55f8x1b[_0xb0d0[148]]);return _0x55f8x19[_0xb0d0[29]](_0x55f8x35|| 500)[_0xb0d0[28]](_0x55f8x1b)}