Built motion from commit 4d2cf597c.|1.0.26
[motion.git] / server / api / default_report / default_report.controller.js
index dbb9130..2c46526 100644 (file)
@@ -1 +1 @@
-var _0x1967=["\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","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\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","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\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","\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","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\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","\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","\x69\x73\x41\x72\x72\x61\x79","\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","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x64\x65\x62\x75\x67","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x53\x56","\x63\x6F\x6D\x6D\x6F\x6E\x20\x64\x6F\x63\x45\x78\x74\x72\x61\x63\x74\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x72\x65\x61\x74\x65\x64\x20\x6E\x65\x77\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x73\x20\x64\x62\x20\x65\x6E\x74\x72\x79\x2C\x20\x63\x61\x6C\x6C\x69\x6E\x67\x20\x65\x78\x74\x65\x72\x6E\x61\x6C\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x20","\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","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x46\x6F\x75\x6E\x64\x20\x74\x68\x65\x20\x72\x65\x70\x6F\x72\x74\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x6E\x65\x77\x20\x44\x42\x20\x72\x6F\x77\x20\x66\x6F\x72\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x73\x2E\x2E","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x20","\x30\x30\x3A\x30\x30","\x65\x6E\x64\x54\x69\x6D\x65","\x32\x33\x3A\x35\x39","\x63\x72\x65\x61\x74\x65","\x74\x65\x78\x74","\x2F\x20","\x23","\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","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x54\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x5F","\x70\x75\x73\x68","\x66\x69\x65\x6C\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x75\x73\x74\x6F\x6D","\x54\x68\x65\x20\x66\x69\x65\x6C\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x6F\x72\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x1967[0];var _=require(_0x1967[1]);var util=require(_0x1967[2]);var DefaultReport=require(_0x1967[4])[_0x1967[3]];var ReportField=require(_0x1967[4])[_0x1967[5]];var Metric=require(_0x1967[4])[_0x1967[6]];var sequelize=require(_0x1967[4])[_0x1967[7]];var CustomReport=require(_0x1967[4])[_0x1967[8]];var ExtractedReport=require(_0x1967[4])[_0x1967[9]];var extractUtils=require(_0x1967[10]);var reportBuildUtils=require(_0x1967[11]);var Util=require(_0x1967[12]);var moment=require(_0x1967[13]);var cp=require(_0x1967[14]);var sr=require(_0x1967[15]);var ReportTree=require(_0x1967[4])[_0x1967[16]];var logger=require(_0x1967[18])(_0x1967[17]);exports[_0x1967[19]]= function(_0xc247x11,_0xc247x12,_0xc247x13){return DefaultReport[_0x1967[26]](Util[_0x1967[25]](_0xc247x11[_0x1967[24]]))[_0x1967[23]](function(_0xc247x15){_0xc247x12[_0x1967[22]](200)[_0x1967[21]](_0xc247x15)})[_0x1967[20]](function(_0xc247x14){return handleError(_0xc247x12,_0xc247x14)})};exports[_0x1967[27]]= function(_0xc247x11,_0xc247x12){return DefaultReport[_0x1967[38]]({method:[_0x1967[37],{DefaultReportId:_0xc247x11[_0x1967[30]][_0x1967[29]]}]})[_0x1967[36]](_0xc247x11[_0x1967[30]][_0x1967[29]],{attributes:[_0x1967[31],_0x1967[32],_0x1967[33],_0x1967[34],_0x1967[35]]})[_0x1967[23]](function(_0xc247x16){if(!_0xc247x16){return _0xc247x12[_0x1967[28]](404)};return _0xc247x12[_0x1967[21]](_0xc247x16)})[_0x1967[20]](function(_0xc247x14){return handleError(_0xc247x12,_0xc247x14)})};exports[_0x1967[39]]= function(_0xc247x11,_0xc247x12){return Promise[_0x1967[45]]([])[_0x1967[23]](getQuery(_0xc247x11,_0xc247x12))[_0x1967[23]](function(_0xc247x17){if(_0xc247x17){switch(_0xc247x17){case _0x1967[44]:_0xc247x17= _0x1967[43];break;default:}};_0xc247x12[_0x1967[22]](200)[_0x1967[21]]({query:_0xc247x17})})[_0x1967[20]](function(_0xc247x14){logger[_0x1967[42]](_0x1967[40],_0xc247x14[_0x1967[41]])})};function getQuery(_0xc247x11,_0xc247x12){var _0xc247x19;return function(){return DefaultReport[_0x1967[38]](_0x1967[60])[_0x1967[36]](_0xc247x11[_0x1967[30]][_0x1967[29]])[_0x1967[23]](function(_0xc247x16){if(!_0xc247x16){return _0xc247x12[_0x1967[28]](404)};if(_0xc247x11[_0x1967[24]][_0x1967[50]]&& _0xc247x11[_0x1967[24]][_0x1967[50]]=== _0x1967[51]){_0xc247x11[_0x1967[24]][_0x1967[52]]= moment()[_0x1967[54]](_0x1967[53]);_0xc247x11[_0x1967[24]][_0x1967[55]]= moment()[_0x1967[54]](_0x1967[53]);_0xc247x16[_0x1967[56]][_0x1967[35]]= _0xc247x16[_0x1967[56]][_0x1967[35]][_0x1967[59]](_0x1967[57],_0x1967[58])};delete _0xc247x11[_0x1967[24]][_0x1967[50]];_0xc247x19= _0xc247x16[_0x1967[56]];return _0xc247x19[_0x1967[35]]})[_0x1967[23]](reportBuildUtils[_0x1967[49]](_0xc247x11[_0x1967[48]]))[_0x1967[23]](function(_0xc247x1a){return [_0xc247x1a,_0xc247x19]})[_0x1967[47]](reportBuildUtils[_0x1967[46]](_0xc247x11[_0x1967[24]]))}}exports[_0x1967[61]]= function(_0xc247x11,_0xc247x12){var _0xc247x1b;return Promise[_0x1967[45]]([])[_0x1967[23]](getQuery(_0xc247x11,_0xc247x12))[_0x1967[23]](reportBuildUtils[_0x1967[73]]())[_0x1967[23]](function(_0xc247x1c){if(_0xc247x1c&& _[_0x1967[62]](_0xc247x1c)){_0xc247x1b= _0xc247x1c[_0x1967[63]];if(_0xc247x11[_0x1967[24]][_0x1967[64]]){_0xc247x1c= _(_0xc247x1c)[_0x1967[68]](_0xc247x11[_0x1967[24]][_0x1967[67]]|| 0)[_0x1967[66]](_0xc247x11[_0x1967[24]][_0x1967[64]])[_0x1967[65]]()};_[_0x1967[71]](_0xc247x1c,function(_0xc247x1d){_[_0x1967[70]](_0xc247x1d,function(_0xc247x1e,_0xc247x1f){if(_0xc247x1e instanceof  Date){_0xc247x1d[_0xc247x1f]= moment(_0xc247x1e)[_0x1967[54]](_0x1967[69]).toString()}})});_0xc247x12[_0x1967[22]](200)[_0x1967[21]]({rows:_0xc247x1c,count:_0xc247x1b})}else {return handleError(_0xc247x12,{message:_0xc247x1c|| _0x1967[72]})}})[_0x1967[20]](function(_0xc247x14){return handleError(_0xc247x12,_0xc247x14)})};exports[_0x1967[74]]= function(_0xc247x11,_0xc247x12){logger[_0x1967[76]](_0x1967[75]);docExtract(_0xc247x11,_0xc247x12,_0x1967[77])};exports[_0x1967[78]]= function(_0xc247x11,_0xc247x12){logger[_0x1967[76]](_0x1967[79]);docExtract(_0xc247x11,_0xc247x12,_0x1967[80])};function docExtract(_0xc247x11,_0xc247x12,_0xc247x21){var _0xc247x16;logger[_0x1967[76]](_0x1967[81]);DefaultReport[_0x1967[38]](_0x1967[60])[_0x1967[36]](_0xc247x11[_0x1967[30]][_0x1967[29]])[_0x1967[23]](function(_0xc247x19){if(!_0xc247x19){return _0xc247x12[_0x1967[28]](404)};_0xc247x16= _0xc247x19;return ReportTree[_0x1967[36]](1)})[_0x1967[23]](function(_0xc247x25){_0xc247x25= JSON[_0x1967[93]](_0xc247x25[_0x1967[92]]);var _0xc247x26=_[_0x1967[94]](_0xc247x25,{id:_0xc247x16[_0x1967[34]]});var _0xc247x27=getReportPath(_0xc247x26,_0xc247x25,_0xc247x16[_0x1967[33]]);logger[_0x1967[76]](_0x1967[95]);if(_0xc247x11[_0x1967[24]][_0x1967[50]]&& _0xc247x11[_0x1967[24]][_0x1967[50]]=== _0x1967[51]){_0xc247x11[_0x1967[24]][_0x1967[52]]= moment()[_0x1967[54]](_0x1967[53]);_0xc247x11[_0x1967[24]][_0x1967[55]]= moment()[_0x1967[54]](_0x1967[53]);_0xc247x16[_0x1967[56]][_0x1967[35]]= _0xc247x16[_0x1967[56]][_0x1967[35]][_0x1967[59]](_0x1967[57],_0x1967[58])};delete _0xc247x11[_0x1967[24]][_0x1967[50]];return [_0xc247x16,ExtractedReport[_0x1967[101]]({name:_0xc247x27,startDate:_0xc247x11[_0x1967[24]][_0x1967[52]]?_0xc247x11[_0x1967[24]][_0x1967[52]]+ (_0xc247x11[_0x1967[24]][_0x1967[96]]?_0x1967[97]+ _0xc247x11[_0x1967[24]][_0x1967[96]]:_0x1967[98]):null,endDate:_0xc247x11[_0x1967[24]][_0x1967[55]]?_0xc247x11[_0x1967[24]][_0x1967[55]]+ (_0xc247x11[_0x1967[24]][_0x1967[99]]?_0x1967[97]+ _0xc247x11[_0x1967[24]][_0x1967[99]]:_0x1967[100]):null,output:_0xc247x21,UserId:_0xc247x11[_0x1967[48]][_0x1967[29]]})]})[_0x1967[47]](function(_0xc247x16,_0xc247x22){logger[_0x1967[76]](_0x1967[82]+ _0xc247x21);var _0xc247x23=cp[_0x1967[84]](__dirname+ _0x1967[83]);_0xc247x23[_0x1967[86]](_0x1967[89],function(_0xc247x24){logger[_0x1967[76]](_0x1967[90],_0xc247x24);_0xc247x23[_0x1967[91]]()})[_0x1967[86]](_0x1967[87],function(){logger[_0x1967[76]](_0x1967[88])})[_0x1967[86]](_0x1967[42],function(_0xc247x14){logger[_0x1967[76]](_0x1967[85],_0xc247x14)});_0xc247x23[_0x1967[21]]({report:_0xc247x16,query:_0xc247x11[_0x1967[24]],extractedId:_0xc247x22[_0x1967[29]],user:_0xc247x11[_0x1967[48]],type:_0xc247x21})})[_0x1967[20]](function(_0xc247x14){return handleError(_0xc247x12,_0xc247x14)});return _0xc247x12[_0x1967[28]](200)}function getReportPath(_0xc247x26,_0xc247x25,_0xc247x27){_0xc247x27= _0xc247x26[_0x1967[102]]+ _0x1967[103]+ _0xc247x27;if(_0xc247x26[_0x1967[34]]=== _0x1967[104]){return _0xc247x27}else {return getReportPath(_[_0x1967[94]](_0xc247x25,{id:_0xc247x26[_0x1967[34]]}),_0xc247x25,_0xc247x27)}}exports[_0x1967[105]]= function(_0xc247x11,_0xc247x12){return DefaultReport[_0x1967[36]](_0xc247x11[_0x1967[30]][_0x1967[29]],{include:[{all:true}]})[_0x1967[23]](function(_0xc247x16){if(!_0xc247x16){return _0xc247x12[_0x1967[28]](404)};return _0xc247x12[_0x1967[21]](_0xc247x16)})[_0x1967[20]](function(_0xc247x14){return handleError(_0xc247x12,_0xc247x14)})};exports[_0x1967[106]]= function(_0xc247x11,_0xc247x12){var _0xc247x29;return sequelize[_0x1967[111]](function(_0xc247x2a){return DefaultReport[_0x1967[38]]({method:[_0x1967[37],{DefaultReportId:_0xc247x11[_0x1967[30]][_0x1967[29]]}]})[_0x1967[36]](_0xc247x11[_0x1967[30]][_0x1967[29]])[_0x1967[23]](function(_0xc247x16){if(!_0xc247x16){return _0xc247x12[_0x1967[28]](404)};var _0xc247x2b=_0xc247x16[_0x1967[56]];delete _0xc247x2b[_0x1967[29]];delete _0xc247x2b[_0x1967[107]];delete _0xc247x2b[_0x1967[108]];_0xc247x2b[_0x1967[34]]= _0xc247x11[_0x1967[109]][_0x1967[34]];_0xc247x29= _[_0x1967[110]](_0xc247x2b.Fields,_0x1967[56]);return CustomReport[_0x1967[101]](_0xc247x2b,{transaction:_0xc247x2a})})[_0x1967[23]](function(_0xc247x16){return [_0xc247x16,_0xc247x29]})[_0x1967[47]](createCopyFields(_0xc247x2a))})[_0x1967[23]](function(){return _0xc247x12[_0x1967[28]](201)})[_0x1967[20]](function(_0xc247x14){return handleError(_0xc247x12,_0xc247x14)})};function createCopyFields(_0xc247x2a){return function(_0xc247x16,_0xc247x2d){if(_0xc247x2d&& Array[_0x1967[62]](_0xc247x2d)&& _0xc247x2d[_0x1967[63]]){var _0xc247x2e=reportBuildUtils[_0x1967[112]](_0xc247x16[_0x1967[35]]);if(_0xc247x2e){var _0xc247x2f;return _0xc247x2e[_0x1967[128]]()[_0x1967[23]](function(_0xc247x30){_0xc247x2f= _[_0x1967[113]](_0xc247x30);var _0xc247x31=[];var _0xc247x32=_[_0x1967[115]](_0xc247x2d,_0x1967[114]);_[_0x1967[70]](_0xc247x32,function(_0xc247x33,_0xc247x1f){if(_0xc247x1f!== _0x1967[116]&& _0xc247x1f!== _0x1967[117]){_0xc247x33[0][_0x1967[120]][_0x1967[119]][_0x1967[71]](function(_0xc247x34){_0xc247x34[_0x1967[118]]= _0xc247x16[_0x1967[29]]});_0xc247x33[0][_0x1967[120]][_0x1967[33]]+= _0x1967[121]+ sr({length:5});_0xc247x31[_0x1967[122]](Metric[_0x1967[101]](_0xc247x33[0][_0x1967[120]][_0x1967[56]],{include:[{model:ReportField,as:_0x1967[119]}],transaction:_0xc247x2a}))}else {_0xc247x33[_0x1967[71]](function(_0xc247x34){if(_[_0x1967[124]](_0xc247x2f,_0xc247x34[_0x1967[123]])|| _0xc247x34[_0x1967[125]]){_0xc247x34[_0x1967[118]]= _0xc247x16[_0x1967[29]];_0xc247x31[_0x1967[122]](ReportField[_0x1967[101]](_0xc247x34,{transaction:_0xc247x2a}))}else {throw  new sequelize.Error(_0x1967[126]+ _0xc247x34[_0x1967[123]]+ _0x1967[127])}})}});return _0xc247x31})[_0x1967[45]]()}else {throw  new sequelize.Error(_0x1967[129])}}}}exports[_0x1967[101]]= function(_0xc247x11,_0xc247x12){return DefaultReport[_0x1967[101]](_0xc247x11[_0x1967[109]])[_0x1967[23]](function(_0xc247x16){return _0xc247x12[_0x1967[22]](201)[_0x1967[21]](_0xc247x16)})[_0x1967[20]](function(_0xc247x14){return handleError(_0xc247x12,_0xc247x14)})};exports[_0x1967[130]]= function(_0xc247x11,_0xc247x12){if(_0xc247x11[_0x1967[109]][_0x1967[29]]){delete _0xc247x11[_0x1967[109]][_0x1967[29]]};return DefaultReport[_0x1967[36]](_0xc247x11[_0x1967[30]][_0x1967[29]])[_0x1967[23]](function(_0xc247x16){if(!_0xc247x16){return _0xc247x12[_0x1967[28]](404)};var _0xc247x35=_[_0x1967[131]](_0xc247x16,_0xc247x11[_0x1967[109]]);return _0xc247x35[_0x1967[132]]()})[_0x1967[23]](function(_0xc247x16){return _0xc247x12[_0x1967[22]](200)[_0x1967[21]](_0xc247x16)})[_0x1967[20]](function(_0xc247x14){return handleError(_0xc247x12,_0xc247x14)})};exports[_0x1967[133]]= function(_0xc247x11,_0xc247x12){return DefaultReport[_0x1967[36]](_0xc247x11[_0x1967[30]][_0x1967[29]])[_0x1967[23]](function(_0xc247x16){if(!_0xc247x16){return _0xc247x12[_0x1967[28]](404)};return _0xc247x16[_0x1967[133]]()})[_0x1967[23]](function(){return _0xc247x12[_0x1967[28]](204)})[_0x1967[20]](function(_0xc247x14){return handleError(_0xc247x12,_0xc247x14)})};function handleError(_0xc247x12,_0xc247x14){logger[_0x1967[42]](_0xc247x14[_0x1967[41]]);return _0xc247x12[_0x1967[22]](500)[_0x1967[21]](_0xc247x14)}
\ No newline at end of file
+var _0xa13b=["\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","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\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","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\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","\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","\x73\x74\x61\x63\x6B","\x65\x72\x72\x6F\x72","\x6E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\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","\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","\x69\x73\x41\x72\x72\x61\x79","\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","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x64\x65\x62\x75\x67","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x53\x56","\x63\x6F\x6D\x6D\x6F\x6E\x20\x64\x6F\x63\x45\x78\x74\x72\x61\x63\x74\x20\x61\x70\x69\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x72\x65\x61\x74\x65\x64\x20\x6E\x65\x77\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x73\x20\x64\x62\x20\x65\x6E\x74\x72\x79\x2C\x20\x63\x61\x6C\x6C\x69\x6E\x67\x20\x65\x78\x74\x65\x72\x6E\x61\x6C\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x20","\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","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x52\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x46\x6F\x75\x6E\x64\x20\x74\x68\x65\x20\x72\x65\x70\x6F\x72\x74\x2C\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x6E\x65\x77\x20\x44\x42\x20\x72\x6F\x77\x20\x66\x6F\x72\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x73\x2E\x2E","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x20","\x30\x30\x3A\x30\x30","\x65\x6E\x64\x54\x69\x6D\x65","\x32\x33\x3A\x35\x39","\x63\x72\x65\x61\x74\x65","\x74\x65\x78\x74","\x2F\x20","\x23","\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","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x54\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x5F","\x70\x75\x73\x68","\x66\x69\x65\x6C\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x75\x73\x74\x6F\x6D","\x54\x68\x65\x20\x66\x69\x65\x6C\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x6F\x72\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xa13b[0];var _=require(_0xa13b[1]);var util=require(_0xa13b[2]);var DefaultReport=require(_0xa13b[4])[_0xa13b[3]];var ReportField=require(_0xa13b[4])[_0xa13b[5]];var Metric=require(_0xa13b[4])[_0xa13b[6]];var sequelize=require(_0xa13b[4])[_0xa13b[7]];var CustomReport=require(_0xa13b[4])[_0xa13b[8]];var ExtractedReport=require(_0xa13b[4])[_0xa13b[9]];var extractUtils=require(_0xa13b[10]);var reportBuildUtils=require(_0xa13b[11]);var Util=require(_0xa13b[12]);var moment=require(_0xa13b[13]);var cp=require(_0xa13b[14]);var sr=require(_0xa13b[15]);var ReportTree=require(_0xa13b[4])[_0xa13b[16]];var logger=require(_0xa13b[18])(_0xa13b[17]);exports[_0xa13b[19]]= function(_0xbb3fx11,_0xbb3fx12,_0xbb3fx13){return DefaultReport[_0xa13b[26]](Util[_0xa13b[25]](_0xbb3fx11[_0xa13b[24]]))[_0xa13b[23]](function(_0xbb3fx15){_0xbb3fx12[_0xa13b[22]](200)[_0xa13b[21]](_0xbb3fx15)})[_0xa13b[20]](function(_0xbb3fx14){return handleError(_0xbb3fx12,_0xbb3fx14)})};exports[_0xa13b[27]]= function(_0xbb3fx11,_0xbb3fx12){return DefaultReport[_0xa13b[38]]({method:[_0xa13b[37],{DefaultReportId:_0xbb3fx11[_0xa13b[30]][_0xa13b[29]]}]})[_0xa13b[36]](_0xbb3fx11[_0xa13b[30]][_0xa13b[29]],{attributes:[_0xa13b[31],_0xa13b[32],_0xa13b[33],_0xa13b[34],_0xa13b[35]]})[_0xa13b[23]](function(_0xbb3fx16){if(!_0xbb3fx16){return _0xbb3fx12[_0xa13b[28]](404)};return _0xbb3fx12[_0xa13b[21]](_0xbb3fx16)})[_0xa13b[20]](function(_0xbb3fx14){return handleError(_0xbb3fx12,_0xbb3fx14)})};exports[_0xa13b[39]]= function(_0xbb3fx11,_0xbb3fx12){return Promise[_0xa13b[45]]([])[_0xa13b[23]](getQuery(_0xbb3fx11,_0xbb3fx12))[_0xa13b[23]](function(_0xbb3fx17){if(_0xbb3fx17){switch(_0xbb3fx17){case _0xa13b[44]:_0xbb3fx17= _0xa13b[43];break;default:}};_0xbb3fx12[_0xa13b[22]](200)[_0xa13b[21]]({query:_0xbb3fx17})})[_0xa13b[20]](function(_0xbb3fx14){logger[_0xa13b[42]](_0xa13b[40],_0xbb3fx14[_0xa13b[41]])})};function getQuery(_0xbb3fx11,_0xbb3fx12){var _0xbb3fx19;return function(){return DefaultReport[_0xa13b[38]](_0xa13b[60])[_0xa13b[36]](_0xbb3fx11[_0xa13b[30]][_0xa13b[29]])[_0xa13b[23]](function(_0xbb3fx16){if(!_0xbb3fx16){return _0xbb3fx12[_0xa13b[28]](404)};if(_0xbb3fx11[_0xa13b[24]][_0xa13b[50]]&& _0xbb3fx11[_0xa13b[24]][_0xa13b[50]]=== _0xa13b[51]){_0xbb3fx11[_0xa13b[24]][_0xa13b[52]]= moment()[_0xa13b[54]](_0xa13b[53]);_0xbb3fx11[_0xa13b[24]][_0xa13b[55]]= moment()[_0xa13b[54]](_0xa13b[53]);_0xbb3fx16[_0xa13b[56]][_0xa13b[35]]= _0xbb3fx16[_0xa13b[56]][_0xa13b[35]][_0xa13b[59]](_0xa13b[57],_0xa13b[58])};delete _0xbb3fx11[_0xa13b[24]][_0xa13b[50]];_0xbb3fx19= _0xbb3fx16[_0xa13b[56]];return _0xbb3fx19[_0xa13b[35]]})[_0xa13b[23]](reportBuildUtils[_0xa13b[49]](_0xbb3fx11[_0xa13b[48]]))[_0xa13b[23]](function(_0xbb3fx1a){return [_0xbb3fx1a,_0xbb3fx19]})[_0xa13b[47]](reportBuildUtils[_0xa13b[46]](_0xbb3fx11[_0xa13b[24]]))}}exports[_0xa13b[61]]= function(_0xbb3fx11,_0xbb3fx12){var _0xbb3fx1b;return Promise[_0xa13b[45]]([])[_0xa13b[23]](getQuery(_0xbb3fx11,_0xbb3fx12))[_0xa13b[23]](reportBuildUtils[_0xa13b[73]]())[_0xa13b[23]](function(_0xbb3fx1c){if(_0xbb3fx1c&& _[_0xa13b[62]](_0xbb3fx1c)){_0xbb3fx1b= _0xbb3fx1c[_0xa13b[63]];if(_0xbb3fx11[_0xa13b[24]][_0xa13b[64]]){_0xbb3fx1c= _(_0xbb3fx1c)[_0xa13b[68]](_0xbb3fx11[_0xa13b[24]][_0xa13b[67]]|| 0)[_0xa13b[66]](_0xbb3fx11[_0xa13b[24]][_0xa13b[64]])[_0xa13b[65]]()};_[_0xa13b[71]](_0xbb3fx1c,function(_0xbb3fx1d){_[_0xa13b[70]](_0xbb3fx1d,function(_0xbb3fx1e,_0xbb3fx1f){if(_0xbb3fx1e instanceof  Date){_0xbb3fx1d[_0xbb3fx1f]= moment(_0xbb3fx1e)[_0xa13b[54]](_0xa13b[69]).toString()}})});_0xbb3fx12[_0xa13b[22]](200)[_0xa13b[21]]({rows:_0xbb3fx1c,count:_0xbb3fx1b})}else {return handleError(_0xbb3fx12,{message:_0xbb3fx1c|| _0xa13b[72]})}})[_0xa13b[20]](function(_0xbb3fx14){return handleError(_0xbb3fx12,_0xbb3fx14)})};exports[_0xa13b[74]]= function(_0xbb3fx11,_0xbb3fx12){logger[_0xa13b[76]](_0xa13b[75]);docExtract(_0xbb3fx11,_0xbb3fx12,_0xa13b[77])};exports[_0xa13b[78]]= function(_0xbb3fx11,_0xbb3fx12){logger[_0xa13b[76]](_0xa13b[79]);docExtract(_0xbb3fx11,_0xbb3fx12,_0xa13b[80])};function docExtract(_0xbb3fx11,_0xbb3fx12,_0xbb3fx21){var _0xbb3fx16;logger[_0xa13b[76]](_0xa13b[81]);DefaultReport[_0xa13b[38]](_0xa13b[60])[_0xa13b[36]](_0xbb3fx11[_0xa13b[30]][_0xa13b[29]])[_0xa13b[23]](function(_0xbb3fx19){if(!_0xbb3fx19){return _0xbb3fx12[_0xa13b[28]](404)};_0xbb3fx16= _0xbb3fx19;return ReportTree[_0xa13b[36]](1)})[_0xa13b[23]](function(_0xbb3fx25){_0xbb3fx25= JSON[_0xa13b[93]](_0xbb3fx25[_0xa13b[92]]);var _0xbb3fx26=_[_0xa13b[94]](_0xbb3fx25,{id:_0xbb3fx16[_0xa13b[34]]});var _0xbb3fx27=getReportPath(_0xbb3fx26,_0xbb3fx25,_0xbb3fx16[_0xa13b[33]]);logger[_0xa13b[76]](_0xa13b[95]);if(_0xbb3fx11[_0xa13b[24]][_0xa13b[50]]&& _0xbb3fx11[_0xa13b[24]][_0xa13b[50]]=== _0xa13b[51]){_0xbb3fx11[_0xa13b[24]][_0xa13b[52]]= moment()[_0xa13b[54]](_0xa13b[53]);_0xbb3fx11[_0xa13b[24]][_0xa13b[55]]= moment()[_0xa13b[54]](_0xa13b[53]);_0xbb3fx16[_0xa13b[56]][_0xa13b[35]]= _0xbb3fx16[_0xa13b[56]][_0xa13b[35]][_0xa13b[59]](_0xa13b[57],_0xa13b[58])};delete _0xbb3fx11[_0xa13b[24]][_0xa13b[50]];return [_0xbb3fx16,ExtractedReport[_0xa13b[101]]({name:_0xbb3fx27,startDate:_0xbb3fx11[_0xa13b[24]][_0xa13b[52]]?_0xbb3fx11[_0xa13b[24]][_0xa13b[52]]+ (_0xbb3fx11[_0xa13b[24]][_0xa13b[96]]?_0xa13b[97]+ _0xbb3fx11[_0xa13b[24]][_0xa13b[96]]:_0xa13b[98]):null,endDate:_0xbb3fx11[_0xa13b[24]][_0xa13b[55]]?_0xbb3fx11[_0xa13b[24]][_0xa13b[55]]+ (_0xbb3fx11[_0xa13b[24]][_0xa13b[99]]?_0xa13b[97]+ _0xbb3fx11[_0xa13b[24]][_0xa13b[99]]:_0xa13b[100]):null,output:_0xbb3fx21,UserId:_0xbb3fx11[_0xa13b[48]][_0xa13b[29]]})]})[_0xa13b[47]](function(_0xbb3fx16,_0xbb3fx22){logger[_0xa13b[76]](_0xa13b[82]+ _0xbb3fx21);var _0xbb3fx23=cp[_0xa13b[84]](__dirname+ _0xa13b[83]);_0xbb3fx23[_0xa13b[86]](_0xa13b[89],function(_0xbb3fx24){logger[_0xa13b[76]](_0xa13b[90],_0xbb3fx24);_0xbb3fx23[_0xa13b[91]]()})[_0xa13b[86]](_0xa13b[87],function(){logger[_0xa13b[76]](_0xa13b[88])})[_0xa13b[86]](_0xa13b[42],function(_0xbb3fx14){logger[_0xa13b[76]](_0xa13b[85],_0xbb3fx14)});_0xbb3fx23[_0xa13b[21]]({report:_0xbb3fx16,query:_0xbb3fx11[_0xa13b[24]],extractedId:_0xbb3fx22[_0xa13b[29]],user:_0xbb3fx11[_0xa13b[48]],type:_0xbb3fx21})})[_0xa13b[20]](function(_0xbb3fx14){return handleError(_0xbb3fx12,_0xbb3fx14)});return _0xbb3fx12[_0xa13b[28]](200)}function getReportPath(_0xbb3fx26,_0xbb3fx25,_0xbb3fx27){_0xbb3fx27= _0xbb3fx26[_0xa13b[102]]+ _0xa13b[103]+ _0xbb3fx27;if(_0xbb3fx26[_0xa13b[34]]=== _0xa13b[104]){return _0xbb3fx27}else {return getReportPath(_[_0xa13b[94]](_0xbb3fx25,{id:_0xbb3fx26[_0xa13b[34]]}),_0xbb3fx25,_0xbb3fx27)}}exports[_0xa13b[105]]= function(_0xbb3fx11,_0xbb3fx12){return DefaultReport[_0xa13b[36]](_0xbb3fx11[_0xa13b[30]][_0xa13b[29]],{include:[{all:true}]})[_0xa13b[23]](function(_0xbb3fx16){if(!_0xbb3fx16){return _0xbb3fx12[_0xa13b[28]](404)};return _0xbb3fx12[_0xa13b[21]](_0xbb3fx16)})[_0xa13b[20]](function(_0xbb3fx14){return handleError(_0xbb3fx12,_0xbb3fx14)})};exports[_0xa13b[106]]= function(_0xbb3fx11,_0xbb3fx12){var _0xbb3fx29;return sequelize[_0xa13b[111]](function(_0xbb3fx2a){return DefaultReport[_0xa13b[38]]({method:[_0xa13b[37],{DefaultReportId:_0xbb3fx11[_0xa13b[30]][_0xa13b[29]]}]})[_0xa13b[36]](_0xbb3fx11[_0xa13b[30]][_0xa13b[29]])[_0xa13b[23]](function(_0xbb3fx16){if(!_0xbb3fx16){return _0xbb3fx12[_0xa13b[28]](404)};var _0xbb3fx2b=_0xbb3fx16[_0xa13b[56]];delete _0xbb3fx2b[_0xa13b[29]];delete _0xbb3fx2b[_0xa13b[107]];delete _0xbb3fx2b[_0xa13b[108]];_0xbb3fx2b[_0xa13b[34]]= _0xbb3fx11[_0xa13b[109]][_0xa13b[34]];_0xbb3fx29= _[_0xa13b[110]](_0xbb3fx2b.Fields,_0xa13b[56]);return CustomReport[_0xa13b[101]](_0xbb3fx2b,{transaction:_0xbb3fx2a})})[_0xa13b[23]](function(_0xbb3fx16){return [_0xbb3fx16,_0xbb3fx29]})[_0xa13b[47]](createCopyFields(_0xbb3fx2a))})[_0xa13b[23]](function(){return _0xbb3fx12[_0xa13b[28]](201)})[_0xa13b[20]](function(_0xbb3fx14){return handleError(_0xbb3fx12,_0xbb3fx14)})};function createCopyFields(_0xbb3fx2a){return function(_0xbb3fx16,_0xbb3fx2d){if(_0xbb3fx2d&& Array[_0xa13b[62]](_0xbb3fx2d)&& _0xbb3fx2d[_0xa13b[63]]){var _0xbb3fx2e=reportBuildUtils[_0xa13b[112]](_0xbb3fx16[_0xa13b[35]]);if(_0xbb3fx2e){var _0xbb3fx2f;return _0xbb3fx2e[_0xa13b[128]]()[_0xa13b[23]](function(_0xbb3fx30){_0xbb3fx2f= _[_0xa13b[113]](_0xbb3fx30);var _0xbb3fx31=[];var _0xbb3fx32=_[_0xa13b[115]](_0xbb3fx2d,_0xa13b[114]);_[_0xa13b[70]](_0xbb3fx32,function(_0xbb3fx33,_0xbb3fx1f){if(_0xbb3fx1f!== _0xa13b[116]&& _0xbb3fx1f!== _0xa13b[117]){_0xbb3fx33[0][_0xa13b[120]][_0xa13b[119]][_0xa13b[71]](function(_0xbb3fx34){_0xbb3fx34[_0xa13b[118]]= _0xbb3fx16[_0xa13b[29]]});_0xbb3fx33[0][_0xa13b[120]][_0xa13b[33]]+= _0xa13b[121]+ sr({length:5});_0xbb3fx31[_0xa13b[122]](Metric[_0xa13b[101]](_0xbb3fx33[0][_0xa13b[120]][_0xa13b[56]],{include:[{model:ReportField,as:_0xa13b[119]}],transaction:_0xbb3fx2a}))}else {_0xbb3fx33[_0xa13b[71]](function(_0xbb3fx34){if(_[_0xa13b[124]](_0xbb3fx2f,_0xbb3fx34[_0xa13b[123]])|| _0xbb3fx34[_0xa13b[125]]){_0xbb3fx34[_0xa13b[118]]= _0xbb3fx16[_0xa13b[29]];_0xbb3fx31[_0xa13b[122]](ReportField[_0xa13b[101]](_0xbb3fx34,{transaction:_0xbb3fx2a}))}else {throw  new sequelize.Error(_0xa13b[126]+ _0xbb3fx34[_0xa13b[123]]+ _0xa13b[127])}})}});return _0xbb3fx31})[_0xa13b[45]]()}else {throw  new sequelize.Error(_0xa13b[129])}}}}exports[_0xa13b[101]]= function(_0xbb3fx11,_0xbb3fx12){return DefaultReport[_0xa13b[101]](_0xbb3fx11[_0xa13b[109]])[_0xa13b[23]](function(_0xbb3fx16){return _0xbb3fx12[_0xa13b[22]](201)[_0xa13b[21]](_0xbb3fx16)})[_0xa13b[20]](function(_0xbb3fx14){return handleError(_0xbb3fx12,_0xbb3fx14)})};exports[_0xa13b[130]]= function(_0xbb3fx11,_0xbb3fx12){if(_0xbb3fx11[_0xa13b[109]][_0xa13b[29]]){delete _0xbb3fx11[_0xa13b[109]][_0xa13b[29]]};return DefaultReport[_0xa13b[36]](_0xbb3fx11[_0xa13b[30]][_0xa13b[29]])[_0xa13b[23]](function(_0xbb3fx16){if(!_0xbb3fx16){return _0xbb3fx12[_0xa13b[28]](404)};var _0xbb3fx35=_[_0xa13b[131]](_0xbb3fx16,_0xbb3fx11[_0xa13b[109]]);return _0xbb3fx35[_0xa13b[132]]()})[_0xa13b[23]](function(_0xbb3fx16){return _0xbb3fx12[_0xa13b[22]](200)[_0xa13b[21]](_0xbb3fx16)})[_0xa13b[20]](function(_0xbb3fx14){return handleError(_0xbb3fx12,_0xbb3fx14)})};exports[_0xa13b[133]]= function(_0xbb3fx11,_0xbb3fx12){return DefaultReport[_0xa13b[36]](_0xbb3fx11[_0xa13b[30]][_0xa13b[29]])[_0xa13b[23]](function(_0xbb3fx16){if(!_0xbb3fx16){return _0xbb3fx12[_0xa13b[28]](404)};return _0xbb3fx16[_0xa13b[133]]()})[_0xa13b[23]](function(){return _0xbb3fx12[_0xa13b[28]](204)})[_0xa13b[20]](function(_0xbb3fx14){return handleError(_0xbb3fx12,_0xbb3fx14)})};function handleError(_0xbb3fx12,_0xbb3fx14){logger[_0xa13b[42]](_0xbb3fx14[_0xa13b[41]]);return _0xbb3fx12[_0xa13b[22]](500)[_0xa13b[21]](_0xbb3fx14)}
\ No newline at end of file