Built motion from commit 2239aeb.|0.0.113
[motion.git] / server / api / default_report / default_report.controller.js
index b112f98..9bb014c 100644 (file)
@@ -1 +1 @@
-var _0x35e3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\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","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x70\x72\x65\x76\x69\x65\x77","\x6C\x6F\x67","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x62\x75\x69\x6C\x64\x52\x65\x70\x6F\x72\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x65\x78\x74\x72\x61\x63\x74","\x73\x70\x72\x65\x61\x64","\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x63\x72\x65\x61\x74\x65","","\x28","\x72\x75\x6C\x65\x73","\x20","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x27","\x4C\x49\x4B\x45","\x25","\x27","\x29","\x73\x68\x6F\x77","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x61\x72\x65\x6E\x74","\x62\x6F\x64\x79","\x46\x69\x65\x6C\x64\x73","\x6D\x61\x70","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64","\x66\x6F\x72\x45\x61\x63\x68","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x35e3[0];var _=require(_0x35e3[1]);var util=require(_0x35e3[2]);var DefaultReport=require(_0x35e3[4])[_0x35e3[3]];var sequelize=require(_0x35e3[4])[_0x35e3[5]];var CustomReport=require(_0x35e3[4])[_0x35e3[6]];var ExtractedReport=require(_0x35e3[4])[_0x35e3[7]];var extractUtils=require(_0x35e3[8]);var reportBuildUtils=require(_0x35e3[9]);var Util=require(_0x35e3[10]);exports[_0x35e3[11]]=function(_0xbeabxa,_0xbeabxb,_0xbeabxc){return DefaultReport[_0x35e3[20]](Util[_0x35e3[19]](_[_0x35e3[18]](_0xbeabxa[_0x35e3[16]],_0xbeabxa[_0x35e3[17]])))[_0x35e3[15]](function(_0xbeabxe){_0xbeabxb[_0x35e3[14]](200)[_0x35e3[13]](_0xbeabxe)})[_0x35e3[12]](function(_0xbeabxd){return handleError(_0xbeabxb,_0xbeabxd)})};exports[_0x35e3[21]]=function(_0xbeabxa,_0xbeabxb){var _0xbeabxf;DefaultReport[_0x35e3[36]](_0xbeabxa[_0x35e3[17]][_0x35e3[35]],{include:[{all:true}]})[_0x35e3[15]](function(_0xbeabx11){console[_0x35e3[22]](_0x35e3[29]);if(!_0xbeabx11){return _0xbeabxb[_0x35e3[30]](404)};var _0xbeabx12=reportBuildUtils[_0x35e3[32]](_0xbeabx11[_0x35e3[31]],_0xbeabxa[_0x35e3[16]]);return sequelize[_0x35e3[16]](_0xbeabx12,{type:sequelize[_0x35e3[34]][_0x35e3[33]]})})[_0x35e3[15]](function(_0xbeabx10){_0xbeabxf=_0xbeabx10[_0x35e3[23]];if(_0xbeabxa[_0x35e3[16]][_0x35e3[24]]){var _0xbeabx10=_(_0xbeabx10)[_0x35e3[28]](_0xbeabxa[_0x35e3[16]][_0x35e3[27]]||0)[_0x35e3[26]](_0xbeabxa[_0x35e3[16]][_0x35e3[24]])[_0x35e3[25]]()};_0xbeabxb[_0x35e3[14]](200)[_0x35e3[13]]({rows:_0xbeabx10,count:_0xbeabxf})})[_0x35e3[12]](function(_0xbeabxd){console[_0x35e3[22]](_0xbeabxd);return handleError(_0xbeabxb,_0xbeabxd)})};exports[_0x35e3[37]]=function(_0xbeabxa,_0xbeabxb){docExtract(_0xbeabxa,_0xbeabxb,_0x35e3[38])};exports[_0x35e3[39]]=function(_0xbeabxa,_0xbeabxb){docExtract(_0xbeabxa,_0xbeabxb,_0x35e3[40])};function docExtract(_0xbeabxa,_0xbeabxb,_0xbeabx14){DefaultReport[_0x35e3[36]](_0xbeabxa[_0x35e3[17]][_0x35e3[35]],{include:[{all:true}]})[_0x35e3[15]](function(_0xbeabx11){if(!_0xbeabx11){return _0xbeabxb[_0x35e3[30]](404)};return [_0xbeabx11,ExtractedReport[_0x35e3[46]]({name:_0xbeabx11[_0x35e3[43]],startDate:_0xbeabxa[_0x35e3[16]][_0x35e3[44]]||null,endDate:_0xbeabxa[_0x35e3[16]][_0x35e3[45]]||null,output:_0xbeabx14})]})[_0x35e3[42]](function(_0xbeabx11,_0xbeabx15){extractUtils[_0x35e3[41]+_0xbeabx14](_0xbeabx11,_0xbeabxa[_0x35e3[16]],_0xbeabx15[_0x35e3[35]])})[_0x35e3[12]](function(_0xbeabxd){console[_0x35e3[22]](_0xbeabxd);return handleError(_0xbeabxb,_0xbeabxd)});return _0xbeabxb[_0x35e3[30]](200)}function getConditions(_0xbeabx17){if(!_0xbeabx17){return _0x35e3[47]};for(var _0xbeabx18=_0x35e3[48],_0xbeabx19=0;_0xbeabx19<_0xbeabx17[_0x35e3[49]][_0x35e3[23]];_0xbeabx19++){_0xbeabx19>0&&(_0xbeabx18+=_0x35e3[50]+_0xbeabx17[_0x35e3[51]]+_0x35e3[50]);_0xbeabx18+=_0xbeabx17[_0x35e3[49]][_0xbeabx19][_0x35e3[52]]?getConditions(_0xbeabx17[_0x35e3[49]][_0xbeabx19][_0x35e3[52]]):_0xbeabx17[_0x35e3[49]][_0xbeabx19][_0x35e3[53]]+_0x35e3[50]+_0xbeabx17[_0x35e3[49]][_0xbeabx19][_0x35e3[54]]+_0x35e3[55]+(_0xbeabx17[_0x35e3[49]][_0xbeabx19][_0x35e3[54]]===_0x35e3[56]?_0x35e3[57]+_0xbeabx17[_0x35e3[49]][_0xbeabx19][_0x35e3[25]]+_0x35e3[57]:_0xbeabx17[_0x35e3[49]][_0xbeabx19][_0x35e3[25]])+_0x35e3[58]};return _0xbeabx18+_0x35e3[59]}exports[_0x35e3[60]]=function(_0xbeabxa,_0xbeabxb){DefaultReport[_0x35e3[36]](_0xbeabxa[_0x35e3[17]][_0x35e3[35]],{include:[{all:true}]})[_0x35e3[15]](function(_0xbeabx11){if(!_0xbeabx11){return _0xbeabxb[_0x35e3[30]](404)};return _0xbeabxb[_0x35e3[13]](_0xbeabx11)})[_0x35e3[12]](function(_0xbeabxd){return handleError(_0xbeabxb,_0xbeabxd)})};exports[_0x35e3[61]]=function(_0xbeabxa,_0xbeabxb){DefaultReport[_0x35e3[36]](_0xbeabxa[_0x35e3[17]][_0x35e3[35]],{include:[{all:true}]})[_0x35e3[15]](function(_0xbeabx11){if(!_0xbeabx11){return _0xbeabxb[_0x35e3[30]](404)};var _0xbeabx1a=_0xbeabx11[_0x35e3[31]];delete _0xbeabx1a[_0x35e3[35]];delete _0xbeabx1a[_0x35e3[62]];delete _0xbeabx1a[_0x35e3[63]];_0xbeabx1a[_0x35e3[64]]=_0xbeabxa[_0x35e3[65]][_0x35e3[64]];_0xbeabx1a[_0x35e3[66]]=_[_0x35e3[67]](_0xbeabx1a.Fields,_0x35e3[31]);_[_0x35e3[69]](_0xbeabx1a.Fields,function(_0xbeabx1b){delete _0xbeabx1b[_0x35e3[35]];delete _0xbeabx1b[_0x35e3[68]];delete _0xbeabx1b[_0x35e3[62]];delete _0xbeabx1b[_0x35e3[63]]});return CustomReport[_0x35e3[46]](_0xbeabx1a,{include:[{all:true}]})})[_0x35e3[15]](function(){return _0xbeabxb[_0x35e3[30]](201)})[_0x35e3[12]](function(_0xbeabxd){console[_0x35e3[22]](_0xbeabxd);return handleError(_0xbeabxb,_0xbeabxd)})};exports[_0x35e3[46]]=function(_0xbeabxa,_0xbeabxb){DefaultReport[_0x35e3[46]](_0xbeabxa[_0x35e3[65]])[_0x35e3[15]](function(_0xbeabx11){return _0xbeabxb[_0x35e3[14]](201)[_0x35e3[13]](_0xbeabx11)})[_0x35e3[12]](function(_0xbeabxd){return handleError(_0xbeabxb,_0xbeabxd)})};exports[_0x35e3[70]]=function(_0xbeabxa,_0xbeabxb){if(_0xbeabxa[_0x35e3[65]][_0x35e3[35]]){delete _0xbeabxa[_0x35e3[65]][_0x35e3[35]]};DefaultReport[_0x35e3[36]](_0xbeabxa[_0x35e3[17]][_0x35e3[35]])[_0x35e3[15]](function(_0xbeabx11){if(!_0xbeabx11){return _0xbeabxb[_0x35e3[30]](404)};var _0xbeabx1c=_[_0x35e3[18]](_0xbeabx11,_0xbeabxa[_0x35e3[65]]);_0xbeabx1c[_0x35e3[71]]()[_0x35e3[15]](function(){return _0xbeabxb[_0x35e3[14]](200)[_0x35e3[13]](_0xbeabx11)})[_0x35e3[12]](function(_0xbeabxd){return handleError(_0xbeabxb,_0xbeabxd)})})[_0x35e3[12]](function(_0xbeabxd){return handleError(_0xbeabxb,_0xbeabxd)})};exports[_0x35e3[72]]=function(_0xbeabxa,_0xbeabxb){DefaultReport[_0x35e3[36]](_0xbeabxa[_0x35e3[17]][_0x35e3[35]])[_0x35e3[15]](function(_0xbeabx11){if(!_0xbeabx11){return _0xbeabxb[_0x35e3[30]](404)};_0xbeabx11[_0x35e3[72]]()[_0x35e3[15]](function(){return _0xbeabxb[_0x35e3[30]](204)})[_0x35e3[12]](function(_0xbeabxd){return handleError(_0xbeabxb,_0xbeabxd)})})[_0x35e3[12]](function(_0xbeabxd){return handleError(_0xbeabxb,_0xbeabxd)})};function handleError(_0xbeabxb,_0xbeabxd){return _0xbeabxb[_0x35e3[14]](500)[_0x35e3[13]](_0xbeabxd)}
\ No newline at end of file
+var _0x2cf0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\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","\x65\x78\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x70\x61\x72\x65\x6E\x74","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x71\x75\x65\x72\x79\x20\x66\x72\x6F\x6D\x20\x61\x70\x69\x3A","\x6C\x6F\x67","\x61\x6C\x6C","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x64\x61\x69\x6C\x79","\x74\x72\x75\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x66\x6F\x72\x6D\x61\x74","\x65\x6E\x64\x44\x61\x74\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x66\x69\x65\x6C\x64\x73","\x70\x72\x65\x76\x69\x65\x77","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6A\x73","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x63\x68\x69\x6C\x64\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x63\x68\x69\x6C\x64\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x28","\x72\x75\x6C\x65\x73","\x20","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x67\x72\x6F\x75\x70","\x66\x69\x65\x6C\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x27","\x4C\x49\x4B\x45","\x25","\x27","\x29","\x73\x68\x6F\x77","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x46\x69\x65\x6C\x64\x73","\x6D\x61\x70","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x2cf0[0];var _=require(_0x2cf0[1]);var util=require(_0x2cf0[2]);var DefaultReport=require(_0x2cf0[4])[_0x2cf0[3]];var sequelize=require(_0x2cf0[4])[_0x2cf0[5]];var CustomReport=require(_0x2cf0[4])[_0x2cf0[6]];var ExtractedReport=require(_0x2cf0[4])[_0x2cf0[7]];var extractUtils=require(_0x2cf0[8]);var reportBuildUtils=require(_0x2cf0[9]);var Util=require(_0x2cf0[10]);var moment=require(_0x2cf0[11]);var cp=require(_0x2cf0[12]);exports[_0x2cf0[13]]= function(_0x14dfxc,_0x14dfxd,_0x14dfxe){return DefaultReport[_0x2cf0[20]](Util[_0x2cf0[19]](_0x14dfxc[_0x2cf0[18]]))[_0x2cf0[17]](function(_0x14dfx10){_0x14dfxd[_0x2cf0[16]](200)[_0x2cf0[15]](_0x14dfx10)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[21]]= function(_0x14dfxc,_0x14dfxd){return DefaultReport[_0x2cf0[32]]({method:[_0x2cf0[31],{DefaultReportId:_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]]}]})[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]],{attributes:[_0x2cf0[25],_0x2cf0[26],_0x2cf0[27],_0x2cf0[28],_0x2cf0[29]]})[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};return _0x14dfxd[_0x2cf0[15]](_0x14dfx11)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[33]]= function(_0x14dfxc,_0x14dfxd){return Promise[_0x2cf0[36]]([])[_0x2cf0[17]](getQuery(_0x14dfxc,_0x14dfxd))[_0x2cf0[17]](function(_0x14dfx12){_0x14dfxd[_0x2cf0[16]](200)[_0x2cf0[15]]({query:_0x14dfx12})})[_0x2cf0[14]](function(_0x14dfxf){console[_0x2cf0[35]](_0x2cf0[34],_0x14dfxf)})};function getQuery(_0x14dfxc,_0x14dfxd){var _0x14dfx14;return function(){return DefaultReport[_0x2cf0[32]](_0x2cf0[52])[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]])[_0x2cf0[17]](function(_0x14dfx11){console[_0x2cf0[35]](_0x2cf0[41]);if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};if(_0x14dfxc[_0x2cf0[18]][_0x2cf0[42]]&& _0x14dfxc[_0x2cf0[18]][_0x2cf0[42]]=== _0x2cf0[43]){_0x14dfxc[_0x2cf0[18]][_0x2cf0[44]]= moment()[_0x2cf0[46]](_0x2cf0[45]);_0x14dfxc[_0x2cf0[18]][_0x2cf0[47]]= moment()[_0x2cf0[46]](_0x2cf0[45]);_0x14dfx11[_0x2cf0[48]][_0x2cf0[29]]= _0x14dfx11[_0x2cf0[48]][_0x2cf0[29]][_0x2cf0[51]](_0x2cf0[49],_0x2cf0[50])};delete _0x14dfxc[_0x2cf0[18]][_0x2cf0[42]];_0x14dfx14= _0x14dfx11[_0x2cf0[48]];return _0x14dfx14[_0x2cf0[29]]})[_0x2cf0[17]](reportBuildUtils[_0x2cf0[40]](_0x14dfxc[_0x2cf0[39]]))[_0x2cf0[17]](function(_0x14dfx15){return [_0x14dfx15,_0x14dfx14]})[_0x2cf0[38]](reportBuildUtils[_0x2cf0[37]](_0x14dfxc[_0x2cf0[18]]))}}exports[_0x2cf0[53]]= function(_0x14dfxc,_0x14dfxd){var _0x14dfx16;return Promise[_0x2cf0[36]]([])[_0x2cf0[17]](getQuery(_0x14dfxc,_0x14dfxd))[_0x2cf0[17]](function(_0x14dfx12){return sequelize[_0x2cf0[18]](_0x14dfx12,{type:sequelize[_0x2cf0[64]][_0x2cf0[63]]})})[_0x2cf0[17]](function(_0x14dfx17){_0x14dfx16= _0x14dfx17[_0x2cf0[54]];if(_0x14dfxc[_0x2cf0[18]][_0x2cf0[55]]){_0x14dfx17= _(_0x14dfx17)[_0x2cf0[59]](_0x14dfxc[_0x2cf0[18]][_0x2cf0[58]]|| 0)[_0x2cf0[57]](_0x14dfxc[_0x2cf0[18]][_0x2cf0[55]])[_0x2cf0[56]]()};_[_0x2cf0[62]](_0x14dfx17,function(_0x14dfx18){_[_0x2cf0[61]](_0x14dfx18,function(_0x14dfx19,_0x14dfx1a){if(_0x14dfx19 instanceof  Date){_0x14dfx18[_0x14dfx1a]= moment(_0x14dfx19)[_0x2cf0[46]](_0x2cf0[60]).toString()}})});_0x14dfxd[_0x2cf0[16]](200)[_0x2cf0[15]]({rows:_0x14dfx17,count:_0x14dfx16})})[_0x2cf0[14]](function(_0x14dfxf){console[_0x2cf0[35]](_0x14dfxf);return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[65]]= function(_0x14dfxc,_0x14dfxd){docExtract(_0x14dfxc,_0x14dfxd,_0x2cf0[66])};exports[_0x2cf0[67]]= function(_0x14dfxc,_0x14dfxd){docExtract(_0x14dfxc,_0x14dfxd,_0x2cf0[68])};function docExtract(_0x14dfxc,_0x14dfxd,_0x14dfx1c){DefaultReport[_0x2cf0[32]](_0x2cf0[52])[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]])[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};if(_0x14dfxc[_0x2cf0[18]][_0x2cf0[42]]&& _0x14dfxc[_0x2cf0[18]][_0x2cf0[42]]=== _0x2cf0[43]){_0x14dfxc[_0x2cf0[18]][_0x2cf0[44]]= moment()[_0x2cf0[46]](_0x2cf0[45]);_0x14dfxc[_0x2cf0[18]][_0x2cf0[47]]= moment()[_0x2cf0[46]](_0x2cf0[45]);_0x14dfx11[_0x2cf0[48]][_0x2cf0[29]]= _0x14dfx11[_0x2cf0[48]][_0x2cf0[29]][_0x2cf0[51]](_0x2cf0[49],_0x2cf0[50])};delete _0x14dfxc[_0x2cf0[18]][_0x2cf0[42]];return [_0x14dfx11,ExtractedReport[_0x2cf0[79]]({name:_0x14dfx11[_0x2cf0[27]],startDate:_0x14dfxc[_0x2cf0[18]][_0x2cf0[44]]|| null,endDate:_0x14dfxc[_0x2cf0[18]][_0x2cf0[47]]|| null,output:_0x14dfx1c,UserId:_0x14dfxc[_0x2cf0[39]][_0x2cf0[23]]})]})[_0x2cf0[38]](function(_0x14dfx11,_0x14dfx1d){var _0x14dfx1e=cp[_0x2cf0[70]](__dirname+ _0x2cf0[69]);_0x14dfx1e[_0x2cf0[73]](_0x2cf0[76],function(_0x14dfx1f){console[_0x2cf0[35]](_0x2cf0[77],_0x14dfx1f);_0x14dfx1e[_0x2cf0[78]]()})[_0x2cf0[73]](_0x2cf0[74],function(){console[_0x2cf0[35]](_0x2cf0[75])})[_0x2cf0[73]](_0x2cf0[71],function(_0x14dfxf){console[_0x2cf0[35]](_0x2cf0[72],_0x14dfxf)});_0x14dfx1e[_0x2cf0[15]]({report:_0x14dfx11,query:_0x14dfxc[_0x2cf0[18]],extractedId:_0x14dfx1d[_0x2cf0[23]],user:_0x14dfxc[_0x2cf0[39]],type:_0x14dfx1c})})[_0x2cf0[14]](function(_0x14dfxf){console[_0x2cf0[35]](_0x14dfxf);return handleError(_0x14dfxd,_0x14dfxf)});return _0x14dfxd[_0x2cf0[22]](200)}function getConditions(_0x14dfx21){if(!_0x14dfx21){return _0x2cf0[50]};for(var _0x14dfx22=_0x2cf0[80],_0x14dfx23=0;_0x14dfx23< _0x14dfx21[_0x2cf0[81]][_0x2cf0[54]];_0x14dfx23++){_0x14dfx23> 0&& (_0x14dfx22+= _0x2cf0[82]+ _0x14dfx21[_0x2cf0[83]]+ _0x2cf0[82]);_0x14dfx22+= _0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[84]]?getConditions(_0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[84]]):_0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[85]]+ _0x2cf0[82]+ _0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[86]]+ _0x2cf0[87]+ (_0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[86]]=== _0x2cf0[88]?_0x2cf0[89]+ _0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[56]]+ _0x2cf0[89]:_0x14dfx21[_0x2cf0[81]][_0x14dfx23][_0x2cf0[56]])+ _0x2cf0[90]};return _0x14dfx22+ _0x2cf0[91]}exports[_0x2cf0[92]]= function(_0x14dfxc,_0x14dfxd){return DefaultReport[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]],{include:[{all:true}]})[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};return _0x14dfxd[_0x2cf0[15]](_0x14dfx11)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[93]]= function(_0x14dfxc,_0x14dfxd){return DefaultReport[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]],{include:[{all:true}]})[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};var _0x14dfx24=_0x14dfx11[_0x2cf0[48]];delete _0x14dfx24[_0x2cf0[23]];delete _0x14dfx24[_0x2cf0[94]];delete _0x14dfx24[_0x2cf0[95]];_0x14dfx24[_0x2cf0[28]]= _0x14dfxc[_0x2cf0[96]][_0x2cf0[28]];_0x14dfx24[_0x2cf0[97]]= _[_0x2cf0[98]](_0x14dfx24.Fields,_0x2cf0[48]);_[_0x2cf0[62]](_0x14dfx24.Fields,function(_0x14dfx25){delete _0x14dfx25[_0x2cf0[23]];delete _0x14dfx25[_0x2cf0[99]];delete _0x14dfx25[_0x2cf0[94]];delete _0x14dfx25[_0x2cf0[95]]});return CustomReport[_0x2cf0[79]](_0x14dfx24,{include:[{all:true}]})})[_0x2cf0[17]](function(){return _0x14dfxd[_0x2cf0[22]](201)})[_0x2cf0[14]](function(_0x14dfxf){console[_0x2cf0[35]](_0x14dfxf);return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[79]]= function(_0x14dfxc,_0x14dfxd){return DefaultReport[_0x2cf0[79]](_0x14dfxc[_0x2cf0[96]])[_0x2cf0[17]](function(_0x14dfx11){return _0x14dfxd[_0x2cf0[16]](201)[_0x2cf0[15]](_0x14dfx11)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[100]]= function(_0x14dfxc,_0x14dfxd){if(_0x14dfxc[_0x2cf0[96]][_0x2cf0[23]]){delete _0x14dfxc[_0x2cf0[96]][_0x2cf0[23]]};return DefaultReport[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]])[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};var _0x14dfx26=_[_0x2cf0[101]](_0x14dfx11,_0x14dfxc[_0x2cf0[96]]);return _0x14dfx26[_0x2cf0[102]]()})[_0x2cf0[17]](function(_0x14dfx11){return _0x14dfxd[_0x2cf0[16]](200)[_0x2cf0[15]](_0x14dfx11)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};exports[_0x2cf0[103]]= function(_0x14dfxc,_0x14dfxd){return DefaultReport[_0x2cf0[30]](_0x14dfxc[_0x2cf0[24]][_0x2cf0[23]])[_0x2cf0[17]](function(_0x14dfx11){if(!_0x14dfx11){return _0x14dfxd[_0x2cf0[22]](404)};return _0x14dfx11[_0x2cf0[103]]()})[_0x2cf0[17]](function(){return _0x14dfxd[_0x2cf0[22]](204)})[_0x2cf0[14]](function(_0x14dfxf){return handleError(_0x14dfxd,_0x14dfxf)})};function handleError(_0x14dfxd,_0x14dfxf){return _0x14dfxd[_0x2cf0[16]](500)[_0x2cf0[15]](_0x14dfxf)}
\ No newline at end of file