Built motion from commit cad11dd.|0.0.45
[motion.git] / server / config / ami / trunk.js
1 var _0xb0df=["\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x75\x6E\x6B\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","","\x72\x65\x67\x69\x73\x74\x65\x72\x20\x3D\x3E\x20\x25\x73\x0A","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x6C\x6F\x6E\x65","\x69\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x5B\x25\x73\x5D\x0A","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6F\x74\x68\x65\x72\x46\x69\x65\x6C\x64\x73","\x25\x73\x0A","\x25\x73\x3D\x25\x73\x0A","\x72\x65\x67\x69\x73\x74\x72\x79","\x63\x61\x74\x63\x68","\x6D\x61\x70","\x66\x6F\x72\x45\x61\x63\x68","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x74\x72\x75\x6E\x6B\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x54\x72\x75\x6E\x6B\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x72\x65\x67\x69\x73\x74\x65\x72\x73\x2E\x63\x6F\x6E\x66","\x54\x72\x75\x6E\x6B\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];var TrunkModel=require(_0xb0df[1])[_0xb0df[0]];var fs=require(_0xb0df[2]);var util=require(_0xb0df[3]);var path=require(_0xb0df[4]);var config=require(_0xb0df[5]);var _=require(_0xb0df[6]);function Trunk(_0x6e19x8){console[_0xb0df[8]](_0xb0df[7]);TrunkModel[_0xb0df[9]](function(_0x6e19x9){trunksRewrite(_0x6e19x9,_0x6e19x8,false)});TrunkModel[_0xb0df[10]](function(_0x6e19x9){trunksRewrite(_0x6e19x9,_0x6e19x8,false)});TrunkModel[_0xb0df[11]](function(_0x6e19x9){trunksRewrite(_0x6e19x9,_0x6e19x8,true)})}function trunksRewrite(_0x6e19x9,_0x6e19x8,_0x6e19xb){var _0x6e19xc=_0xb0df[12];var _0x6e19xd=_0xb0df[12];var _0x6e19xe=_0xb0df[13];if(!_0x6e19xb){var _0x6e19xf=_[_0xb0df[15]](_0x6e19x9[_0xb0df[14]]);delete _0x6e19xf[_0xb0df[16]];delete _0x6e19xf[_0xb0df[17]];delete _0x6e19xf[_0xb0df[18]];_0x6e19xc+=util[_0xb0df[21]](_0xb0df[19],_0x6e19xf[_0xb0df[20]]);if(_0x6e19xf[_0xb0df[22]]){_0x6e19xc+=util[_0xb0df[21]](_0xb0df[23],_0x6e19xf[_0xb0df[22]]);delete _0x6e19xf[_0xb0df[22]]};for(var _0x6e19x10 in _0x6e19xf){if(_0x6e19xf[_0x6e19x10]){_0x6e19xc+=util[_0xb0df[21]](_0xb0df[24],_0x6e19x10,_0x6e19xf[_0x6e19x10])}};if(_0x6e19xf[_0xb0df[25]]){_0x6e19xd+=util[_0xb0df[21]](_0x6e19xe,_0x6e19xf[_0xb0df[25]])}};TrunkModel[_0xb0df[39]]({where:{id:{$ne:_0x6e19x9[_0xb0df[16]]}}})[_0xb0df[38]](function(_0x6e19x12){var _0x6e19x13=_[_0xb0df[27]](_0x6e19x12,_0xb0df[14]);_0x6e19x13[_0xb0df[28]](function(_0x6e19x14){delete _0x6e19x14[_0xb0df[16]];delete _0x6e19x14[_0xb0df[17]];delete _0x6e19x14[_0xb0df[18]];_0x6e19xc+=util[_0xb0df[21]](_0xb0df[19],_0x6e19x14[_0xb0df[20]]);if(_0x6e19x14[_0xb0df[22]]){_0x6e19xc+=util[_0xb0df[21]](_0xb0df[23],_0x6e19x14[_0xb0df[22]]);delete _0x6e19x14[_0xb0df[22]]};for(var _0x6e19x10 in _0x6e19x14){if(_0x6e19x14[_0x6e19x10]){_0x6e19xc+=util[_0xb0df[21]](_0xb0df[24],_0x6e19x10,_0x6e19x14[_0x6e19x10])}};if(_0x6e19x14[_0xb0df[25]]){_0x6e19xd+=util[_0xb0df[21]](_0x6e19xe,_0x6e19x14[_0xb0df[25]])}});fs[_0xb0df[37]](path[_0xb0df[31]](config[_0xb0df[29]],_0xb0df[30]),_0x6e19xc,{flags:_0xb0df[32],mode:parseInt(_0xb0df[33],8)},function(_0x6e19x11){if(_0x6e19x11){throw _0x6e19x11};console[_0xb0df[8]](_0xb0df[34]);fs[_0xb0df[37]](path[_0xb0df[31]](config[_0xb0df[29]],_0xb0df[35]),_0x6e19xd,{flags:_0xb0df[32],mode:parseInt(_0xb0df[33],8)},function(_0x6e19x11){if(_0x6e19x11){throw _0x6e19x11};reload(_0x6e19x8);console[_0xb0df[8]](_0xb0df[36])})})})[_0xb0df[26]](function(_0x6e19x11){console[_0xb0df[8]](_0x6e19x11)})}function reload(_0x6e19x8){_0x6e19x8[_0xb0df[42]]({Action:_0xb0df[40]},function(_0x6e19x11,_0x6e19x16){if(_0x6e19x11){console[_0xb0df[41]](_0x6e19x11)}else {console[_0xb0df[8]](_0x6e19x16)}})}module[_0xb0df[43]]=Trunk