Built motion from commit 88549cd59.|1.0.20
[motion.git] / server / app.js
1 var _0xe7ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4E\x4F\x44\x45\x5F\x45\x4E\x56","\x65\x6E\x76","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x4E\x4F\x44\x45\x5F\x54\x4C\x53\x5F\x52\x45\x4A\x45\x43\x54\x5F\x55\x4E\x41\x55\x54\x48\x4F\x52\x49\x5A\x45\x44","\x6D\x6F\x74\x69\x6F\x6E","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x6F\x67\x67\x65\x72\x2E\x6A\x73","\x75\x6E\x63\x61\x75\x67\x68\x74\x45\x78\x63\x65\x70\x74\x69\x6F\x6E","\x6F\x62\x6A\x65\x63\x74","\x6D\x65\x73\x73\x61\x67\x65","\x0A\x45\x78\x70\x72\x65\x73\x73\x20\x45\x72\x72\x6F\x72\x20\x4D\x65\x73\x73\x61\x67\x65\x3A\x20","\x65\x72\x72\x6F\x72","\x73\x74\x61\x63\x6B","\x0A\x45\x78\x70\x72\x65\x73\x73\x20\x45\x72\x72\x6F\x72\x20\x53\x74\x61\x63\x6B\x74\x72\x61\x63\x65\x3A","\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x45\x78\x70\x72\x65\x73\x73\x20\x64\x75\x6D\x70\x45\x72\x72\x6F\x72\x20\x3A\x3A\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x6E\x20\x6F\x62\x6A\x65\x63\x74","\x6F\x6E","\x68\x74\x74\x70","\x43\x72\x6F\x6E\x4A\x6F\x62","\x63\x72\x6F\x6E","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x72\x65\x64\x69\x73","\x6D\x6F\x6D\x65\x6E\x74","\x6A\x73\x74\x7A","\x64\x65\x74\x65\x72\x6D\x69\x6E\x65","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x70\x6F\x72\x74","\x69\x70","\x45\x78\x70\x72\x65\x73\x73\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x25\x64\x2C\x20\x69\x6E\x20\x25\x73\x20\x6D\x6F\x64\x65","\x67\x65\x74","\x64\x65\x62\x75\x67","\x6C\x69\x73\x74\x65\x6E","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x2F\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x63\x6C\x69\x65\x6E\x74","\x72\x65\x64\x69\x73\x50\x77\x64","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x72\x65\x64\x69\x73","\x61\x64\x61\x70\x74\x65\x72","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x78\x70\x72\x65\x73\x73","\x54\x69\x6D\x65\x7A\x6F\x6E\x65\x20\x73\x65\x74\x3A","\x6E\x61\x6D\x65","\x5A","\x66\x6F\x72\x6D\x61\x74","\x63\x61\x74\x63\x68","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x68\x69\x73\x74\x6F\x72\x79\x2F\x68\x69\x73\x74\x6F\x72\x79","\x74\x68\x65\x6E","\x73\x79\x6E\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65\x5F\x72\x65\x61\x64\x4F\x6E\x6C\x79","\x73\x65\x65\x64\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64","\x73\x65\x65\x64\x50\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x6D\x69","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6F\x63\x6B\x65\x74\x69\x6F","\x2E\x2F\x72\x6F\x75\x74\x65\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x72\x70\x63","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x6D\x61\x69\x6C","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x66\x61\x78","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x69\x6D\x61\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x74\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x67\x69","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe7ad[0];process[_0xe7ad[2]][_0xe7ad[1]]= process[_0xe7ad[2]][_0xe7ad[1]]|| _0xe7ad[3];process[_0xe7ad[2]][_0xe7ad[4]]= 0;var logger=require(_0xe7ad[6])(_0xe7ad[5]);process[_0xe7ad[16]](_0xe7ad[7],function(_0xfd87x2){if( typeof _0xfd87x2=== _0xe7ad[8]){if(_0xfd87x2[_0xe7ad[9]]){logger[_0xe7ad[11]](_0xe7ad[10],_0xfd87x2[_0xe7ad[9]])};if(_0xfd87x2[_0xe7ad[12]]){logger[_0xe7ad[11]](_0xe7ad[13]);logger[_0xe7ad[11]](_0xe7ad[14]);logger[_0xe7ad[11]](_0xfd87x2[_0xe7ad[12]])}}else {logger[_0xe7ad[11]](_0xe7ad[15])}});var http=require(_0xe7ad[17]);var cronjob=require(_0xe7ad[19])[_0xe7ad[18]];var express=require(_0xe7ad[20]);var config=require(_0xe7ad[21]);var models=require(_0xe7ad[22]);var sio=require(_0xe7ad[23]);var sio_redis=require(_0xe7ad[24]);var moment=require(_0xe7ad[25]);var jstz=require(_0xe7ad[26]);var timezone=jstz[_0xe7ad[27]]();var app=express();var server=http[_0xe7ad[28]](app);server[_0xe7ad[34]](config[_0xe7ad[29]],config[_0xe7ad[30]],function(){logger[_0xe7ad[33]](_0xe7ad[31],config[_0xe7ad[29]],app[_0xe7ad[32]](_0xe7ad[2]))});var io=sio(server,{serveClient:(config[_0xe7ad[2]]=== _0xe7ad[35])?false:true,path:_0xe7ad[36]});if(config[_0xe7ad[37]]){var redis=require(_0xe7ad[39])[_0xe7ad[38]];var pub=redis(6379,config[_0xe7ad[30]],{password:config[_0xe7ad[37]]});var sub=redis(6379,config[_0xe7ad[30]],{return_buffers:true,password:config[_0xe7ad[37]]});io[_0xe7ad[40]](sio_redis({pubClient:pub,subClient:sub}))}else {io[_0xe7ad[40]](sio_redis({host:config[_0xe7ad[30]],port:6379}))};require(_0xe7ad[41])(app);logger[_0xe7ad[33]](_0xe7ad[42],timezone[_0xe7ad[43]]()|| moment()[_0xe7ad[45]](_0xe7ad[44]));var ami;models[_0xe7ad[72]][_0xe7ad[49]]()[_0xe7ad[48]](function(){if(config[_0xe7ad[51]]){require(_0xe7ad[52])};if(config[_0xe7ad[53]]){require(_0xe7ad[54])};ami= require(_0xe7ad[55])();var _0xfd87x14=require(_0xe7ad[56])(io);require(_0xe7ad[57])(app,ami,_0xfd87x14);require(_0xe7ad[58])();require(_0xe7ad[59])();require(_0xe7ad[60])();require(_0xe7ad[61])();require(_0xe7ad[62])();require(_0xe7ad[63])(ami);require(_0xe7ad[64])();require(_0xe7ad[65])(ami);require(_0xe7ad[66])();require(_0xe7ad[67])(ami);require(_0xe7ad[68])();require(_0xe7ad[69])(ami);require(_0xe7ad[70])();require(_0xe7ad[71])()})[_0xe7ad[48]](function(){return models[_0xe7ad[50]][_0xe7ad[49]]()})[_0xe7ad[48]](function(){require(_0xe7ad[47])(cronjob,ami)})[_0xe7ad[46]](function(_0xfd87x2){console[_0xe7ad[11]](_0xfd87x2)});exports= module[_0xe7ad[73]]= app