Built motion from commit 6a5ce012e.|1.0.35
[motion.git] / server / api / default_report / default_report.controller.js
1 var _0xe345=["\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"];_0xe345[0];var _=require(_0xe345[1]);var util=require(_0xe345[2]);var DefaultReport=require(_0xe345[4])[_0xe345[3]];var ReportField=require(_0xe345[4])[_0xe345[5]];var Metric=require(_0xe345[4])[_0xe345[6]];var sequelize=require(_0xe345[4])[_0xe345[7]];var CustomReport=require(_0xe345[4])[_0xe345[8]];var ExtractedReport=require(_0xe345[4])[_0xe345[9]];var extractUtils=require(_0xe345[10]);var reportBuildUtils=require(_0xe345[11]);var Util=require(_0xe345[12]);var moment=require(_0xe345[13]);var cp=require(_0xe345[14]);var sr=require(_0xe345[15]);var ReportTree=require(_0xe345[4])[_0xe345[16]];var logger=require(_0xe345[18])(_0xe345[17]);exports[_0xe345[19]]= function(_0xc6aax11,_0xc6aax12,_0xc6aax13){return DefaultReport[_0xe345[26]](Util[_0xe345[25]](_0xc6aax11[_0xe345[24]]))[_0xe345[23]](function(_0xc6aax15){_0xc6aax12[_0xe345[22]](200)[_0xe345[21]](_0xc6aax15)})[_0xe345[20]](function(_0xc6aax14){return handleError(_0xc6aax12,_0xc6aax14)})};exports[_0xe345[27]]= function(_0xc6aax11,_0xc6aax12){return DefaultReport[_0xe345[38]]({method:[_0xe345[37],{DefaultReportId:_0xc6aax11[_0xe345[30]][_0xe345[29]]}]})[_0xe345[36]](_0xc6aax11[_0xe345[30]][_0xe345[29]],{attributes:[_0xe345[31],_0xe345[32],_0xe345[33],_0xe345[34],_0xe345[35]]})[_0xe345[23]](function(_0xc6aax16){if(!_0xc6aax16){return _0xc6aax12[_0xe345[28]](404)};return _0xc6aax12[_0xe345[21]](_0xc6aax16)})[_0xe345[20]](function(_0xc6aax14){return handleError(_0xc6aax12,_0xc6aax14)})};exports[_0xe345[39]]= function(_0xc6aax11,_0xc6aax12){return Promise[_0xe345[45]]([])[_0xe345[23]](getQuery(_0xc6aax11,_0xc6aax12))[_0xe345[23]](function(_0xc6aax17){if(_0xc6aax17){switch(_0xc6aax17){case _0xe345[44]:_0xc6aax17= _0xe345[43];break;default:}};_0xc6aax12[_0xe345[22]](200)[_0xe345[21]]({query:_0xc6aax17})})[_0xe345[20]](function(_0xc6aax14){logger[_0xe345[42]](_0xe345[40],_0xc6aax14[_0xe345[41]])})};function getQuery(_0xc6aax11,_0xc6aax12){var _0xc6aax19;return function(){return DefaultReport[_0xe345[38]](_0xe345[60])[_0xe345[36]](_0xc6aax11[_0xe345[30]][_0xe345[29]])[_0xe345[23]](function(_0xc6aax16){if(!_0xc6aax16){return _0xc6aax12[_0xe345[28]](404)};if(_0xc6aax11[_0xe345[24]][_0xe345[50]]&& _0xc6aax11[_0xe345[24]][_0xe345[50]]=== _0xe345[51]){_0xc6aax11[_0xe345[24]][_0xe345[52]]= moment()[_0xe345[54]](_0xe345[53]);_0xc6aax11[_0xe345[24]][_0xe345[55]]= moment()[_0xe345[54]](_0xe345[53]);_0xc6aax16[_0xe345[56]][_0xe345[35]]= _0xc6aax16[_0xe345[56]][_0xe345[35]][_0xe345[59]](_0xe345[57],_0xe345[58])};delete _0xc6aax11[_0xe345[24]][_0xe345[50]];_0xc6aax19= _0xc6aax16[_0xe345[56]];return _0xc6aax19[_0xe345[35]]})[_0xe345[23]](reportBuildUtils[_0xe345[49]](_0xc6aax11[_0xe345[48]]))[_0xe345[23]](function(_0xc6aax1a){return [_0xc6aax1a,_0xc6aax19]})[_0xe345[47]](reportBuildUtils[_0xe345[46]](_0xc6aax11[_0xe345[24]]))}}exports[_0xe345[61]]= function(_0xc6aax11,_0xc6aax12){var _0xc6aax1b;return Promise[_0xe345[45]]([])[_0xe345[23]](getQuery(_0xc6aax11,_0xc6aax12))[_0xe345[23]](reportBuildUtils[_0xe345[73]]())[_0xe345[23]](function(_0xc6aax1c){if(_0xc6aax1c&& _[_0xe345[62]](_0xc6aax1c)){_0xc6aax1b= _0xc6aax1c[_0xe345[63]];if(_0xc6aax11[_0xe345[24]][_0xe345[64]]){_0xc6aax1c= _(_0xc6aax1c)[_0xe345[68]](_0xc6aax11[_0xe345[24]][_0xe345[67]]|| 0)[_0xe345[66]](_0xc6aax11[_0xe345[24]][_0xe345[64]])[_0xe345[65]]()};_[_0xe345[71]](_0xc6aax1c,function(_0xc6aax1d){_[_0xe345[70]](_0xc6aax1d,function(_0xc6aax1e,_0xc6aax1f){if(_0xc6aax1e instanceof  Date){_0xc6aax1d[_0xc6aax1f]= moment(_0xc6aax1e)[_0xe345[54]](_0xe345[69]).toString()}})});_0xc6aax12[_0xe345[22]](200)[_0xe345[21]]({rows:_0xc6aax1c,count:_0xc6aax1b})}else {return handleError(_0xc6aax12,{message:_0xc6aax1c|| _0xe345[72]})}})[_0xe345[20]](function(_0xc6aax14){return handleError(_0xc6aax12,_0xc6aax14)})};exports[_0xe345[74]]= function(_0xc6aax11,_0xc6aax12){logger[_0xe345[76]](_0xe345[75]);docExtract(_0xc6aax11,_0xc6aax12,_0xe345[77])};exports[_0xe345[78]]= function(_0xc6aax11,_0xc6aax12){logger[_0xe345[76]](_0xe345[79]);docExtract(_0xc6aax11,_0xc6aax12,_0xe345[80])};function docExtract(_0xc6aax11,_0xc6aax12,_0xc6aax21){var _0xc6aax16;logger[_0xe345[76]](_0xe345[81]);DefaultReport[_0xe345[38]](_0xe345[60])[_0xe345[36]](_0xc6aax11[_0xe345[30]][_0xe345[29]])[_0xe345[23]](function(_0xc6aax19){if(!_0xc6aax19){return _0xc6aax12[_0xe345[28]](404)};_0xc6aax16= _0xc6aax19;return ReportTree[_0xe345[36]](1)})[_0xe345[23]](function(_0xc6aax25){_0xc6aax25= JSON[_0xe345[93]](_0xc6aax25[_0xe345[92]]);var _0xc6aax26=_[_0xe345[94]](_0xc6aax25,{id:_0xc6aax16[_0xe345[34]]});var _0xc6aax27=getReportPath(_0xc6aax26,_0xc6aax25,_0xc6aax16[_0xe345[33]]);logger[_0xe345[76]](_0xe345[95]);if(_0xc6aax11[_0xe345[24]][_0xe345[50]]&& _0xc6aax11[_0xe345[24]][_0xe345[50]]=== _0xe345[51]){_0xc6aax11[_0xe345[24]][_0xe345[52]]= moment()[_0xe345[54]](_0xe345[53]);_0xc6aax11[_0xe345[24]][_0xe345[55]]= moment()[_0xe345[54]](_0xe345[53]);_0xc6aax16[_0xe345[56]][_0xe345[35]]= _0xc6aax16[_0xe345[56]][_0xe345[35]][_0xe345[59]](_0xe345[57],_0xe345[58])};delete _0xc6aax11[_0xe345[24]][_0xe345[50]];return [_0xc6aax16,ExtractedReport[_0xe345[101]]({name:_0xc6aax27,startDate:_0xc6aax11[_0xe345[24]][_0xe345[52]]?_0xc6aax11[_0xe345[24]][_0xe345[52]]+ (_0xc6aax11[_0xe345[24]][_0xe345[96]]?_0xe345[97]+ _0xc6aax11[_0xe345[24]][_0xe345[96]]:_0xe345[98]):null,endDate:_0xc6aax11[_0xe345[24]][_0xe345[55]]?_0xc6aax11[_0xe345[24]][_0xe345[55]]+ (_0xc6aax11[_0xe345[24]][_0xe345[99]]?_0xe345[97]+ _0xc6aax11[_0xe345[24]][_0xe345[99]]:_0xe345[100]):null,output:_0xc6aax21,UserId:_0xc6aax11[_0xe345[48]][_0xe345[29]]})]})[_0xe345[47]](function(_0xc6aax16,_0xc6aax22){logger[_0xe345[76]](_0xe345[82]+ _0xc6aax21);var _0xc6aax23=cp[_0xe345[84]](__dirname+ _0xe345[83]);_0xc6aax23[_0xe345[86]](_0xe345[89],function(_0xc6aax24){logger[_0xe345[76]](_0xe345[90],_0xc6aax24);_0xc6aax23[_0xe345[91]]()})[_0xe345[86]](_0xe345[87],function(){logger[_0xe345[76]](_0xe345[88])})[_0xe345[86]](_0xe345[42],function(_0xc6aax14){logger[_0xe345[76]](_0xe345[85],_0xc6aax14)});_0xc6aax23[_0xe345[21]]({report:_0xc6aax16,query:_0xc6aax11[_0xe345[24]],extractedId:_0xc6aax22[_0xe345[29]],user:_0xc6aax11[_0xe345[48]],type:_0xc6aax21})})[_0xe345[20]](function(_0xc6aax14){return handleError(_0xc6aax12,_0xc6aax14)});return _0xc6aax12[_0xe345[28]](200)}function getReportPath(_0xc6aax26,_0xc6aax25,_0xc6aax27){_0xc6aax27= _0xc6aax26[_0xe345[102]]+ _0xe345[103]+ _0xc6aax27;if(_0xc6aax26[_0xe345[34]]=== _0xe345[104]){return _0xc6aax27}else {return getReportPath(_[_0xe345[94]](_0xc6aax25,{id:_0xc6aax26[_0xe345[34]]}),_0xc6aax25,_0xc6aax27)}}exports[_0xe345[105]]= function(_0xc6aax11,_0xc6aax12){return DefaultReport[_0xe345[36]](_0xc6aax11[_0xe345[30]][_0xe345[29]],{include:[{all:true}]})[_0xe345[23]](function(_0xc6aax16){if(!_0xc6aax16){return _0xc6aax12[_0xe345[28]](404)};return _0xc6aax12[_0xe345[21]](_0xc6aax16)})[_0xe345[20]](function(_0xc6aax14){return handleError(_0xc6aax12,_0xc6aax14)})};exports[_0xe345[106]]= function(_0xc6aax11,_0xc6aax12){var _0xc6aax29;return sequelize[_0xe345[111]](function(_0xc6aax2a){return DefaultReport[_0xe345[38]]({method:[_0xe345[37],{DefaultReportId:_0xc6aax11[_0xe345[30]][_0xe345[29]]}]})[_0xe345[36]](_0xc6aax11[_0xe345[30]][_0xe345[29]])[_0xe345[23]](function(_0xc6aax16){if(!_0xc6aax16){return _0xc6aax12[_0xe345[28]](404)};var _0xc6aax2b=_0xc6aax16[_0xe345[56]];delete _0xc6aax2b[_0xe345[29]];delete _0xc6aax2b[_0xe345[107]];delete _0xc6aax2b[_0xe345[108]];_0xc6aax2b[_0xe345[34]]= _0xc6aax11[_0xe345[109]][_0xe345[34]];_0xc6aax29= _[_0xe345[110]](_0xc6aax2b.Fields,_0xe345[56]);return CustomReport[_0xe345[101]](_0xc6aax2b,{transaction:_0xc6aax2a})})[_0xe345[23]](function(_0xc6aax16){return [_0xc6aax16,_0xc6aax29]})[_0xe345[47]](createCopyFields(_0xc6aax2a))})[_0xe345[23]](function(){return _0xc6aax12[_0xe345[28]](201)})[_0xe345[20]](function(_0xc6aax14){return handleError(_0xc6aax12,_0xc6aax14)})};function createCopyFields(_0xc6aax2a){return function(_0xc6aax16,_0xc6aax2d){if(_0xc6aax2d&& Array[_0xe345[62]](_0xc6aax2d)&& _0xc6aax2d[_0xe345[63]]){var _0xc6aax2e=reportBuildUtils[_0xe345[112]](_0xc6aax16[_0xe345[35]]);if(_0xc6aax2e){var _0xc6aax2f;return _0xc6aax2e[_0xe345[128]]()[_0xe345[23]](function(_0xc6aax30){_0xc6aax2f= _[_0xe345[113]](_0xc6aax30);var _0xc6aax31=[];var _0xc6aax32=_[_0xe345[115]](_0xc6aax2d,_0xe345[114]);_[_0xe345[70]](_0xc6aax32,function(_0xc6aax33,_0xc6aax1f){if(_0xc6aax1f!== _0xe345[116]&& _0xc6aax1f!== _0xe345[117]){_0xc6aax33[0][_0xe345[120]][_0xe345[119]][_0xe345[71]](function(_0xc6aax34){_0xc6aax34[_0xe345[118]]= _0xc6aax16[_0xe345[29]]});_0xc6aax33[0][_0xe345[120]][_0xe345[33]]+= _0xe345[121]+ sr({length:5});_0xc6aax31[_0xe345[122]](Metric[_0xe345[101]](_0xc6aax33[0][_0xe345[120]][_0xe345[56]],{include:[{model:ReportField,as:_0xe345[119]}],transaction:_0xc6aax2a}))}else {_0xc6aax33[_0xe345[71]](function(_0xc6aax34){if(_[_0xe345[124]](_0xc6aax2f,_0xc6aax34[_0xe345[123]])|| _0xc6aax34[_0xe345[125]]){_0xc6aax34[_0xe345[118]]= _0xc6aax16[_0xe345[29]];_0xc6aax31[_0xe345[122]](ReportField[_0xe345[101]](_0xc6aax34,{transaction:_0xc6aax2a}))}else {throw  new sequelize.Error(_0xe345[126]+ _0xc6aax34[_0xe345[123]]+ _0xe345[127])}})}});return _0xc6aax31})[_0xe345[45]]()}else {throw  new sequelize.Error(_0xe345[129])}}}}exports[_0xe345[101]]= function(_0xc6aax11,_0xc6aax12){return DefaultReport[_0xe345[101]](_0xc6aax11[_0xe345[109]])[_0xe345[23]](function(_0xc6aax16){return _0xc6aax12[_0xe345[22]](201)[_0xe345[21]](_0xc6aax16)})[_0xe345[20]](function(_0xc6aax14){return handleError(_0xc6aax12,_0xc6aax14)})};exports[_0xe345[130]]= function(_0xc6aax11,_0xc6aax12){if(_0xc6aax11[_0xe345[109]][_0xe345[29]]){delete _0xc6aax11[_0xe345[109]][_0xe345[29]]};return DefaultReport[_0xe345[36]](_0xc6aax11[_0xe345[30]][_0xe345[29]])[_0xe345[23]](function(_0xc6aax16){if(!_0xc6aax16){return _0xc6aax12[_0xe345[28]](404)};var _0xc6aax35=_[_0xe345[131]](_0xc6aax16,_0xc6aax11[_0xe345[109]]);return _0xc6aax35[_0xe345[132]]()})[_0xe345[23]](function(_0xc6aax16){return _0xc6aax12[_0xe345[22]](200)[_0xe345[21]](_0xc6aax16)})[_0xe345[20]](function(_0xc6aax14){return handleError(_0xc6aax12,_0xc6aax14)})};exports[_0xe345[133]]= function(_0xc6aax11,_0xc6aax12){return DefaultReport[_0xe345[36]](_0xc6aax11[_0xe345[30]][_0xe345[29]])[_0xe345[23]](function(_0xc6aax16){if(!_0xc6aax16){return _0xc6aax12[_0xe345[28]](404)};return _0xc6aax16[_0xe345[133]]()})[_0xe345[23]](function(){return _0xc6aax12[_0xe345[28]](204)})[_0xe345[20]](function(_0xc6aax14){return handleError(_0xc6aax12,_0xc6aax14)})};function handleError(_0xc6aax12,_0xc6aax14){logger[_0xe345[42]](_0xc6aax14[_0xe345[41]]);return _0xc6aax12[_0xe345[22]](500)[_0xe345[21]](_0xc6aax14)}