Built motion from commit a5685af.|0.0.128
[motion.git] / server / api / default_report / default_report.controller.js
index e4fb0ce..6e79f26 100644 (file)
@@ -1 +1 @@
-var _0x981f=["\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","\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","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\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","\x28","\x72\x75\x6C\x65\x73","\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","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x69\x73\x41\x72\x72\x61\x79","\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","\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"];_0x981f[0];var _=require(_0x981f[1]);var util=require(_0x981f[2]);var DefaultReport=require(_0x981f[4])[_0x981f[3]];var ReportField=require(_0x981f[4])[_0x981f[5]];var Metric=require(_0x981f[4])[_0x981f[6]];var sequelize=require(_0x981f[4])[_0x981f[7]];var CustomReport=require(_0x981f[4])[_0x981f[8]];var ExtractedReport=require(_0x981f[4])[_0x981f[9]];var extractUtils=require(_0x981f[10]);var reportBuildUtils=require(_0x981f[11]);var Util=require(_0x981f[12]);var moment=require(_0x981f[13]);var cp=require(_0x981f[14]);var sr=require(_0x981f[15]);var ReportTree=require(_0x981f[4])[_0x981f[16]];exports[_0x981f[17]]= function(_0x2ec5x10,_0x2ec5x11,_0x2ec5x12){return DefaultReport[_0x981f[24]](Util[_0x981f[23]](_0x2ec5x10[_0x981f[22]]))[_0x981f[21]](function(_0x2ec5x14){_0x2ec5x11[_0x981f[20]](200)[_0x981f[19]](_0x2ec5x14)})[_0x981f[18]](function(_0x2ec5x13){return handleError(_0x2ec5x11,_0x2ec5x13)})};exports[_0x981f[25]]= function(_0x2ec5x10,_0x2ec5x11){return DefaultReport[_0x981f[36]]({method:[_0x981f[35],{DefaultReportId:_0x2ec5x10[_0x981f[28]][_0x981f[27]]}]})[_0x981f[34]](_0x2ec5x10[_0x981f[28]][_0x981f[27]],{attributes:[_0x981f[29],_0x981f[30],_0x981f[31],_0x981f[32],_0x981f[33]]})[_0x981f[21]](function(_0x2ec5x15){if(!_0x2ec5x15){return _0x2ec5x11[_0x981f[26]](404)};return _0x2ec5x11[_0x981f[19]](_0x2ec5x15)})[_0x981f[18]](function(_0x2ec5x13){return handleError(_0x2ec5x11,_0x2ec5x13)})};exports[_0x981f[37]]= function(_0x2ec5x10,_0x2ec5x11){return Promise[_0x981f[40]]([])[_0x981f[21]](getQuery(_0x2ec5x10,_0x2ec5x11))[_0x981f[21]](function(_0x2ec5x16){_0x2ec5x11[_0x981f[20]](200)[_0x981f[19]]({query:_0x2ec5x16})})[_0x981f[18]](function(_0x2ec5x13){console[_0x981f[39]](_0x981f[38],_0x2ec5x13)})};function getQuery(_0x2ec5x10,_0x2ec5x11){var _0x2ec5x18;return function(){return DefaultReport[_0x981f[36]](_0x981f[56])[_0x981f[34]](_0x2ec5x10[_0x981f[28]][_0x981f[27]])[_0x981f[21]](function(_0x2ec5x15){console[_0x981f[39]](_0x981f[45]);if(!_0x2ec5x15){return _0x2ec5x11[_0x981f[26]](404)};if(_0x2ec5x10[_0x981f[22]][_0x981f[46]]&& _0x2ec5x10[_0x981f[22]][_0x981f[46]]=== _0x981f[47]){_0x2ec5x10[_0x981f[22]][_0x981f[48]]= moment()[_0x981f[50]](_0x981f[49]);_0x2ec5x10[_0x981f[22]][_0x981f[51]]= moment()[_0x981f[50]](_0x981f[49]);_0x2ec5x15[_0x981f[52]][_0x981f[33]]= _0x2ec5x15[_0x981f[52]][_0x981f[33]][_0x981f[55]](_0x981f[53],_0x981f[54])};delete _0x2ec5x10[_0x981f[22]][_0x981f[46]];_0x2ec5x18= _0x2ec5x15[_0x981f[52]];return _0x2ec5x18[_0x981f[33]]})[_0x981f[21]](reportBuildUtils[_0x981f[44]](_0x2ec5x10[_0x981f[43]]))[_0x981f[21]](function(_0x2ec5x19){return [_0x2ec5x19,_0x2ec5x18]})[_0x981f[42]](reportBuildUtils[_0x981f[41]](_0x2ec5x10[_0x981f[22]]))}}exports[_0x981f[57]]= function(_0x2ec5x10,_0x2ec5x11){var _0x2ec5x1a;return Promise[_0x981f[40]]([])[_0x981f[21]](getQuery(_0x2ec5x10,_0x2ec5x11))[_0x981f[21]](function(_0x2ec5x16){return sequelize[_0x981f[22]](_0x2ec5x16,{type:sequelize[_0x981f[68]][_0x981f[67]]})})[_0x981f[21]](function(_0x2ec5x1b){_0x2ec5x1a= _0x2ec5x1b[_0x981f[58]];if(_0x2ec5x10[_0x981f[22]][_0x981f[59]]){_0x2ec5x1b= _(_0x2ec5x1b)[_0x981f[63]](_0x2ec5x10[_0x981f[22]][_0x981f[62]]|| 0)[_0x981f[61]](_0x2ec5x10[_0x981f[22]][_0x981f[59]])[_0x981f[60]]()};_[_0x981f[66]](_0x2ec5x1b,function(_0x2ec5x1c){_[_0x981f[65]](_0x2ec5x1c,function(_0x2ec5x1d,_0x2ec5x1e){if(_0x2ec5x1d instanceof  Date){_0x2ec5x1c[_0x2ec5x1e]= moment(_0x2ec5x1d)[_0x981f[50]](_0x981f[64]).toString()}})});_0x2ec5x11[_0x981f[20]](200)[_0x981f[19]]({rows:_0x2ec5x1b,count:_0x2ec5x1a})})[_0x981f[18]](function(_0x2ec5x13){console[_0x981f[39]](_0x2ec5x13);return handleError(_0x2ec5x11,_0x2ec5x13)})};exports[_0x981f[69]]= function(_0x2ec5x10,_0x2ec5x11){docExtract(_0x2ec5x10,_0x2ec5x11,_0x981f[70])};exports[_0x981f[71]]= function(_0x2ec5x10,_0x2ec5x11){docExtract(_0x2ec5x10,_0x2ec5x11,_0x981f[72])};function docExtract(_0x2ec5x10,_0x2ec5x11,_0x2ec5x20){var _0x2ec5x15;DefaultReport[_0x981f[36]](_0x981f[56])[_0x981f[34]](_0x2ec5x10[_0x981f[28]][_0x981f[27]])[_0x981f[21]](function(_0x2ec5x18){if(!_0x2ec5x18){return _0x2ec5x11[_0x981f[26]](404)};_0x2ec5x15= _0x2ec5x18;return ReportTree[_0x981f[34]](1)})[_0x981f[21]](function(_0x2ec5x24){_0x2ec5x24= JSON[_0x981f[84]](_0x2ec5x24[_0x981f[83]]);var _0x2ec5x25=_[_0x981f[85]](_0x2ec5x24,{id:_0x2ec5x15[_0x981f[32]]});var _0x2ec5x26=getReportPath(_0x2ec5x25,_0x2ec5x24,_0x2ec5x15[_0x981f[31]]);if(_0x2ec5x10[_0x981f[22]][_0x981f[46]]&& _0x2ec5x10[_0x981f[22]][_0x981f[46]]=== _0x981f[47]){_0x2ec5x10[_0x981f[22]][_0x981f[48]]= moment()[_0x981f[50]](_0x981f[49]);_0x2ec5x10[_0x981f[22]][_0x981f[51]]= moment()[_0x981f[50]](_0x981f[49]);_0x2ec5x15[_0x981f[52]][_0x981f[33]]= _0x2ec5x15[_0x981f[52]][_0x981f[33]][_0x981f[55]](_0x981f[53],_0x981f[54])};delete _0x2ec5x10[_0x981f[22]][_0x981f[46]];return [_0x2ec5x15,ExtractedReport[_0x981f[91]]({name:_0x2ec5x26,startDate:_0x2ec5x10[_0x981f[22]][_0x981f[48]]?_0x2ec5x10[_0x981f[22]][_0x981f[48]]+ (_0x2ec5x10[_0x981f[22]][_0x981f[86]]?_0x981f[87]+ _0x2ec5x10[_0x981f[22]][_0x981f[86]]:_0x981f[88]):null,endDate:_0x2ec5x10[_0x981f[22]][_0x981f[51]]?_0x2ec5x10[_0x981f[22]][_0x981f[51]]+ (_0x2ec5x10[_0x981f[22]][_0x981f[89]]?_0x981f[87]+ _0x2ec5x10[_0x981f[22]][_0x981f[89]]:_0x981f[90]):null,output:_0x2ec5x20,UserId:_0x2ec5x10[_0x981f[43]][_0x981f[27]]})]})[_0x981f[42]](function(_0x2ec5x15,_0x2ec5x21){var _0x2ec5x22=cp[_0x981f[74]](__dirname+ _0x981f[73]);_0x2ec5x22[_0x981f[77]](_0x981f[80],function(_0x2ec5x23){console[_0x981f[39]](_0x981f[81],_0x2ec5x23);_0x2ec5x22[_0x981f[82]]()})[_0x981f[77]](_0x981f[78],function(){console[_0x981f[39]](_0x981f[79])})[_0x981f[77]](_0x981f[75],function(_0x2ec5x13){console[_0x981f[39]](_0x981f[76],_0x2ec5x13)});_0x2ec5x22[_0x981f[19]]({report:_0x2ec5x15,query:_0x2ec5x10[_0x981f[22]],extractedId:_0x2ec5x21[_0x981f[27]],user:_0x2ec5x10[_0x981f[43]],type:_0x2ec5x20})})[_0x981f[18]](function(_0x2ec5x13){console[_0x981f[39]](_0x2ec5x13);return handleError(_0x2ec5x11,_0x2ec5x13)});return _0x2ec5x11[_0x981f[26]](200)}function getReportPath(_0x2ec5x25,_0x2ec5x24,_0x2ec5x26){_0x2ec5x26= _0x2ec5x25[_0x981f[92]]+ _0x981f[93]+ _0x2ec5x26;if(_0x2ec5x25[_0x981f[32]]=== _0x981f[94]){return _0x2ec5x26}else {return getReportPath(_[_0x981f[85]](_0x2ec5x24,{id:_0x2ec5x25[_0x981f[32]]}),_0x2ec5x24,_0x2ec5x26)}}function getConditions(_0x2ec5x29){if(!_0x2ec5x29){return _0x981f[54]};for(var _0x2ec5x2a=_0x981f[95],_0x2ec5x2b=0;_0x2ec5x2b< _0x2ec5x29[_0x981f[96]][_0x981f[58]];_0x2ec5x2b++){_0x2ec5x2b> 0&& (_0x2ec5x2a+= _0x981f[87]+ _0x2ec5x29[_0x981f[97]]+ _0x981f[87]);_0x2ec5x2a+= _0x2ec5x29[_0x981f[96]][_0x2ec5x2b][_0x981f[98]]?getConditions(_0x2ec5x29[_0x981f[96]][_0x2ec5x2b][_0x981f[98]]):_0x2ec5x29[_0x981f[96]][_0x2ec5x2b][_0x981f[99]]+ _0x981f[87]+ _0x2ec5x29[_0x981f[96]][_0x2ec5x2b][_0x981f[100]]+ _0x981f[101]+ (_0x2ec5x29[_0x981f[96]][_0x2ec5x2b][_0x981f[100]]=== _0x981f[102]?_0x981f[103]+ _0x2ec5x29[_0x981f[96]][_0x2ec5x2b][_0x981f[60]]+ _0x981f[103]:_0x2ec5x29[_0x981f[96]][_0x2ec5x2b][_0x981f[60]])+ _0x981f[104]};return _0x2ec5x2a+ _0x981f[105]}exports[_0x981f[106]]= function(_0x2ec5x10,_0x2ec5x11){return DefaultReport[_0x981f[34]](_0x2ec5x10[_0x981f[28]][_0x981f[27]],{include:[{all:true}]})[_0x981f[21]](function(_0x2ec5x15){if(!_0x2ec5x15){return _0x2ec5x11[_0x981f[26]](404)};return _0x2ec5x11[_0x981f[19]](_0x2ec5x15)})[_0x981f[18]](function(_0x2ec5x13){return handleError(_0x2ec5x11,_0x2ec5x13)})};exports[_0x981f[107]]= function(_0x2ec5x10,_0x2ec5x11){var _0x2ec5x2c;return sequelize[_0x981f[112]](function(_0x2ec5x2d){return DefaultReport[_0x981f[36]]({method:[_0x981f[35],{DefaultReportId:_0x2ec5x10[_0x981f[28]][_0x981f[27]]}]})[_0x981f[34]](_0x2ec5x10[_0x981f[28]][_0x981f[27]])[_0x981f[21]](function(_0x2ec5x15){if(!_0x2ec5x15){return _0x2ec5x11[_0x981f[26]](404)};var _0x2ec5x2e=_0x2ec5x15[_0x981f[52]];console[_0x981f[39]](_0x2ec5x2e);delete _0x2ec5x2e[_0x981f[27]];delete _0x2ec5x2e[_0x981f[108]];delete _0x2ec5x2e[_0x981f[109]];_0x2ec5x2e[_0x981f[32]]= _0x2ec5x10[_0x981f[110]][_0x981f[32]];_0x2ec5x2c= _[_0x981f[111]](_0x2ec5x2e.Fields,_0x981f[52]);return CustomReport[_0x981f[91]](_0x2ec5x2e,{transaction:_0x2ec5x2d})})[_0x981f[21]](function(_0x2ec5x15){return [_0x2ec5x15,_0x2ec5x2c]})[_0x981f[42]](createCopyFields(_0x2ec5x2d))})[_0x981f[21]](function(){return _0x2ec5x11[_0x981f[26]](201)})[_0x981f[18]](function(_0x2ec5x13){console[_0x981f[39]](_0x2ec5x13);return handleError(_0x2ec5x11,_0x2ec5x13)})};function createCopyFields(_0x2ec5x2d){return function(_0x2ec5x15,_0x2ec5x30){if(_0x2ec5x30&& Array[_0x981f[113]](_0x2ec5x30)&& _0x2ec5x30[_0x981f[58]]){var _0x2ec5x31=reportBuildUtils[_0x981f[114]](_0x2ec5x15[_0x981f[33]]);if(_0x2ec5x31){var _0x2ec5x32;return _0x2ec5x31[_0x981f[129]]()[_0x981f[21]](function(_0x2ec5x33){_0x2ec5x32= _[_0x981f[115]](_0x2ec5x33);var _0x2ec5x34=[];var _0x2ec5x35=_[_0x981f[117]](_0x2ec5x30,_0x981f[116]);_[_0x981f[65]](_0x2ec5x35,function(_0x2ec5x36,_0x2ec5x1e){if(_0x2ec5x1e!== _0x981f[118]&& _0x2ec5x1e!== _0x981f[119]){_0x2ec5x36[0][_0x981f[122]][_0x981f[121]][_0x981f[66]](function(_0x2ec5x37){_0x2ec5x37[_0x981f[120]]= _0x2ec5x15[_0x981f[27]]});_0x2ec5x36[0][_0x981f[122]][_0x981f[31]]+= _0x981f[123]+ sr({length:5});_0x2ec5x34[_0x981f[124]](Metric[_0x981f[91]](_0x2ec5x36[0][_0x981f[122]][_0x981f[52]],{include:[{model:ReportField,as:_0x981f[121]}],transaction:_0x2ec5x2d}))}else {_0x2ec5x36[_0x981f[66]](function(_0x2ec5x37){if(_[_0x981f[125]](_0x2ec5x32,_0x2ec5x37[_0x981f[99]])|| _0x2ec5x37[_0x981f[126]]){_0x2ec5x37[_0x981f[120]]= _0x2ec5x15[_0x981f[27]];_0x2ec5x34[_0x981f[124]](ReportField[_0x981f[91]](_0x2ec5x37,{transaction:_0x2ec5x2d}))}else {throw  new sequelize.Error(_0x981f[127]+ _0x2ec5x37[_0x981f[99]]+ _0x981f[128])}})}});return _0x2ec5x34})[_0x981f[40]]()}else {throw  new sequelize.Error(_0x981f[130])}}}}exports[_0x981f[91]]= function(_0x2ec5x10,_0x2ec5x11){return DefaultReport[_0x981f[91]](_0x2ec5x10[_0x981f[110]])[_0x981f[21]](function(_0x2ec5x15){return _0x2ec5x11[_0x981f[20]](201)[_0x981f[19]](_0x2ec5x15)})[_0x981f[18]](function(_0x2ec5x13){return handleError(_0x2ec5x11,_0x2ec5x13)})};exports[_0x981f[131]]= function(_0x2ec5x10,_0x2ec5x11){if(_0x2ec5x10[_0x981f[110]][_0x981f[27]]){delete _0x2ec5x10[_0x981f[110]][_0x981f[27]]};return DefaultReport[_0x981f[34]](_0x2ec5x10[_0x981f[28]][_0x981f[27]])[_0x981f[21]](function(_0x2ec5x15){if(!_0x2ec5x15){return _0x2ec5x11[_0x981f[26]](404)};var _0x2ec5x38=_[_0x981f[132]](_0x2ec5x15,_0x2ec5x10[_0x981f[110]]);return _0x2ec5x38[_0x981f[133]]()})[_0x981f[21]](function(_0x2ec5x15){return _0x2ec5x11[_0x981f[20]](200)[_0x981f[19]](_0x2ec5x15)})[_0x981f[18]](function(_0x2ec5x13){return handleError(_0x2ec5x11,_0x2ec5x13)})};exports[_0x981f[134]]= function(_0x2ec5x10,_0x2ec5x11){return DefaultReport[_0x981f[34]](_0x2ec5x10[_0x981f[28]][_0x981f[27]])[_0x981f[21]](function(_0x2ec5x15){if(!_0x2ec5x15){return _0x2ec5x11[_0x981f[26]](404)};return _0x2ec5x15[_0x981f[134]]()})[_0x981f[21]](function(){return _0x2ec5x11[_0x981f[26]](204)})[_0x981f[18]](function(_0x2ec5x13){return handleError(_0x2ec5x11,_0x2ec5x13)})};function handleError(_0x2ec5x11,_0x2ec5x13){return _0x2ec5x11[_0x981f[20]](500)[_0x981f[19]](_0x2ec5x13)}
\ No newline at end of file
+var _0xb9f4=["\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","\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","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\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","\x28","\x72\x75\x6C\x65\x73","\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","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x69\x73\x41\x72\x72\x61\x79","\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","\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"];_0xb9f4[0];var _=require(_0xb9f4[1]);var util=require(_0xb9f4[2]);var DefaultReport=require(_0xb9f4[4])[_0xb9f4[3]];var ReportField=require(_0xb9f4[4])[_0xb9f4[5]];var Metric=require(_0xb9f4[4])[_0xb9f4[6]];var sequelize=require(_0xb9f4[4])[_0xb9f4[7]];var CustomReport=require(_0xb9f4[4])[_0xb9f4[8]];var ExtractedReport=require(_0xb9f4[4])[_0xb9f4[9]];var extractUtils=require(_0xb9f4[10]);var reportBuildUtils=require(_0xb9f4[11]);var Util=require(_0xb9f4[12]);var moment=require(_0xb9f4[13]);var cp=require(_0xb9f4[14]);var sr=require(_0xb9f4[15]);var ReportTree=require(_0xb9f4[4])[_0xb9f4[16]];exports[_0xb9f4[17]]= function(_0x539fx10,_0x539fx11,_0x539fx12){return DefaultReport[_0xb9f4[24]](Util[_0xb9f4[23]](_0x539fx10[_0xb9f4[22]]))[_0xb9f4[21]](function(_0x539fx14){_0x539fx11[_0xb9f4[20]](200)[_0xb9f4[19]](_0x539fx14)})[_0xb9f4[18]](function(_0x539fx13){return handleError(_0x539fx11,_0x539fx13)})};exports[_0xb9f4[25]]= function(_0x539fx10,_0x539fx11){return DefaultReport[_0xb9f4[36]]({method:[_0xb9f4[35],{DefaultReportId:_0x539fx10[_0xb9f4[28]][_0xb9f4[27]]}]})[_0xb9f4[34]](_0x539fx10[_0xb9f4[28]][_0xb9f4[27]],{attributes:[_0xb9f4[29],_0xb9f4[30],_0xb9f4[31],_0xb9f4[32],_0xb9f4[33]]})[_0xb9f4[21]](function(_0x539fx15){if(!_0x539fx15){return _0x539fx11[_0xb9f4[26]](404)};return _0x539fx11[_0xb9f4[19]](_0x539fx15)})[_0xb9f4[18]](function(_0x539fx13){return handleError(_0x539fx11,_0x539fx13)})};exports[_0xb9f4[37]]= function(_0x539fx10,_0x539fx11){return Promise[_0xb9f4[40]]([])[_0xb9f4[21]](getQuery(_0x539fx10,_0x539fx11))[_0xb9f4[21]](function(_0x539fx16){_0x539fx11[_0xb9f4[20]](200)[_0xb9f4[19]]({query:_0x539fx16})})[_0xb9f4[18]](function(_0x539fx13){console[_0xb9f4[39]](_0xb9f4[38],_0x539fx13)})};function getQuery(_0x539fx10,_0x539fx11){var _0x539fx18;return function(){return DefaultReport[_0xb9f4[36]](_0xb9f4[56])[_0xb9f4[34]](_0x539fx10[_0xb9f4[28]][_0xb9f4[27]])[_0xb9f4[21]](function(_0x539fx15){console[_0xb9f4[39]](_0xb9f4[45]);if(!_0x539fx15){return _0x539fx11[_0xb9f4[26]](404)};if(_0x539fx10[_0xb9f4[22]][_0xb9f4[46]]&& _0x539fx10[_0xb9f4[22]][_0xb9f4[46]]=== _0xb9f4[47]){_0x539fx10[_0xb9f4[22]][_0xb9f4[48]]= moment()[_0xb9f4[50]](_0xb9f4[49]);_0x539fx10[_0xb9f4[22]][_0xb9f4[51]]= moment()[_0xb9f4[50]](_0xb9f4[49]);_0x539fx15[_0xb9f4[52]][_0xb9f4[33]]= _0x539fx15[_0xb9f4[52]][_0xb9f4[33]][_0xb9f4[55]](_0xb9f4[53],_0xb9f4[54])};delete _0x539fx10[_0xb9f4[22]][_0xb9f4[46]];_0x539fx18= _0x539fx15[_0xb9f4[52]];return _0x539fx18[_0xb9f4[33]]})[_0xb9f4[21]](reportBuildUtils[_0xb9f4[44]](_0x539fx10[_0xb9f4[43]]))[_0xb9f4[21]](function(_0x539fx19){return [_0x539fx19,_0x539fx18]})[_0xb9f4[42]](reportBuildUtils[_0xb9f4[41]](_0x539fx10[_0xb9f4[22]]))}}exports[_0xb9f4[57]]= function(_0x539fx10,_0x539fx11){var _0x539fx1a;return Promise[_0xb9f4[40]]([])[_0xb9f4[21]](getQuery(_0x539fx10,_0x539fx11))[_0xb9f4[21]](function(_0x539fx16){return sequelize[_0xb9f4[22]](_0x539fx16,{type:sequelize[_0xb9f4[68]][_0xb9f4[67]]})})[_0xb9f4[21]](function(_0x539fx1b){_0x539fx1a= _0x539fx1b[_0xb9f4[58]];if(_0x539fx10[_0xb9f4[22]][_0xb9f4[59]]){_0x539fx1b= _(_0x539fx1b)[_0xb9f4[63]](_0x539fx10[_0xb9f4[22]][_0xb9f4[62]]|| 0)[_0xb9f4[61]](_0x539fx10[_0xb9f4[22]][_0xb9f4[59]])[_0xb9f4[60]]()};_[_0xb9f4[66]](_0x539fx1b,function(_0x539fx1c){_[_0xb9f4[65]](_0x539fx1c,function(_0x539fx1d,_0x539fx1e){if(_0x539fx1d instanceof  Date){_0x539fx1c[_0x539fx1e]= moment(_0x539fx1d)[_0xb9f4[50]](_0xb9f4[64]).toString()}})});_0x539fx11[_0xb9f4[20]](200)[_0xb9f4[19]]({rows:_0x539fx1b,count:_0x539fx1a})})[_0xb9f4[18]](function(_0x539fx13){console[_0xb9f4[39]](_0x539fx13);return handleError(_0x539fx11,_0x539fx13)})};exports[_0xb9f4[69]]= function(_0x539fx10,_0x539fx11){docExtract(_0x539fx10,_0x539fx11,_0xb9f4[70])};exports[_0xb9f4[71]]= function(_0x539fx10,_0x539fx11){docExtract(_0x539fx10,_0x539fx11,_0xb9f4[72])};function docExtract(_0x539fx10,_0x539fx11,_0x539fx20){var _0x539fx15;DefaultReport[_0xb9f4[36]](_0xb9f4[56])[_0xb9f4[34]](_0x539fx10[_0xb9f4[28]][_0xb9f4[27]])[_0xb9f4[21]](function(_0x539fx18){if(!_0x539fx18){return _0x539fx11[_0xb9f4[26]](404)};_0x539fx15= _0x539fx18;return ReportTree[_0xb9f4[34]](1)})[_0xb9f4[21]](function(_0x539fx24){_0x539fx24= JSON[_0xb9f4[84]](_0x539fx24[_0xb9f4[83]]);var _0x539fx25=_[_0xb9f4[85]](_0x539fx24,{id:_0x539fx15[_0xb9f4[32]]});var _0x539fx26=getReportPath(_0x539fx25,_0x539fx24,_0x539fx15[_0xb9f4[31]]);if(_0x539fx10[_0xb9f4[22]][_0xb9f4[46]]&& _0x539fx10[_0xb9f4[22]][_0xb9f4[46]]=== _0xb9f4[47]){_0x539fx10[_0xb9f4[22]][_0xb9f4[48]]= moment()[_0xb9f4[50]](_0xb9f4[49]);_0x539fx10[_0xb9f4[22]][_0xb9f4[51]]= moment()[_0xb9f4[50]](_0xb9f4[49]);_0x539fx15[_0xb9f4[52]][_0xb9f4[33]]= _0x539fx15[_0xb9f4[52]][_0xb9f4[33]][_0xb9f4[55]](_0xb9f4[53],_0xb9f4[54])};delete _0x539fx10[_0xb9f4[22]][_0xb9f4[46]];return [_0x539fx15,ExtractedReport[_0xb9f4[91]]({name:_0x539fx26,startDate:_0x539fx10[_0xb9f4[22]][_0xb9f4[48]]?_0x539fx10[_0xb9f4[22]][_0xb9f4[48]]+ (_0x539fx10[_0xb9f4[22]][_0xb9f4[86]]?_0xb9f4[87]+ _0x539fx10[_0xb9f4[22]][_0xb9f4[86]]:_0xb9f4[88]):null,endDate:_0x539fx10[_0xb9f4[22]][_0xb9f4[51]]?_0x539fx10[_0xb9f4[22]][_0xb9f4[51]]+ (_0x539fx10[_0xb9f4[22]][_0xb9f4[89]]?_0xb9f4[87]+ _0x539fx10[_0xb9f4[22]][_0xb9f4[89]]:_0xb9f4[90]):null,output:_0x539fx20,UserId:_0x539fx10[_0xb9f4[43]][_0xb9f4[27]]})]})[_0xb9f4[42]](function(_0x539fx15,_0x539fx21){var _0x539fx22=cp[_0xb9f4[74]](__dirname+ _0xb9f4[73]);_0x539fx22[_0xb9f4[77]](_0xb9f4[80],function(_0x539fx23){console[_0xb9f4[39]](_0xb9f4[81],_0x539fx23);_0x539fx22[_0xb9f4[82]]()})[_0xb9f4[77]](_0xb9f4[78],function(){console[_0xb9f4[39]](_0xb9f4[79])})[_0xb9f4[77]](_0xb9f4[75],function(_0x539fx13){console[_0xb9f4[39]](_0xb9f4[76],_0x539fx13)});_0x539fx22[_0xb9f4[19]]({report:_0x539fx15,query:_0x539fx10[_0xb9f4[22]],extractedId:_0x539fx21[_0xb9f4[27]],user:_0x539fx10[_0xb9f4[43]],type:_0x539fx20})})[_0xb9f4[18]](function(_0x539fx13){console[_0xb9f4[39]](_0x539fx13);return handleError(_0x539fx11,_0x539fx13)});return _0x539fx11[_0xb9f4[26]](200)}function getReportPath(_0x539fx25,_0x539fx24,_0x539fx26){_0x539fx26= _0x539fx25[_0xb9f4[92]]+ _0xb9f4[93]+ _0x539fx26;if(_0x539fx25[_0xb9f4[32]]=== _0xb9f4[94]){return _0x539fx26}else {return getReportPath(_[_0xb9f4[85]](_0x539fx24,{id:_0x539fx25[_0xb9f4[32]]}),_0x539fx24,_0x539fx26)}}function getConditions(_0x539fx29){if(!_0x539fx29){return _0xb9f4[54]};for(var _0x539fx2a=_0xb9f4[95],_0x539fx2b=0;_0x539fx2b< _0x539fx29[_0xb9f4[96]][_0xb9f4[58]];_0x539fx2b++){_0x539fx2b> 0&& (_0x539fx2a+= _0xb9f4[87]+ _0x539fx29[_0xb9f4[97]]+ _0xb9f4[87]);_0x539fx2a+= _0x539fx29[_0xb9f4[96]][_0x539fx2b][_0xb9f4[98]]?getConditions(_0x539fx29[_0xb9f4[96]][_0x539fx2b][_0xb9f4[98]]):_0x539fx29[_0xb9f4[96]][_0x539fx2b][_0xb9f4[99]]+ _0xb9f4[87]+ _0x539fx29[_0xb9f4[96]][_0x539fx2b][_0xb9f4[100]]+ _0xb9f4[101]+ (_0x539fx29[_0xb9f4[96]][_0x539fx2b][_0xb9f4[100]]=== _0xb9f4[102]?_0xb9f4[103]+ _0x539fx29[_0xb9f4[96]][_0x539fx2b][_0xb9f4[60]]+ _0xb9f4[103]:_0x539fx29[_0xb9f4[96]][_0x539fx2b][_0xb9f4[60]])+ _0xb9f4[104]};return _0x539fx2a+ _0xb9f4[105]}exports[_0xb9f4[106]]= function(_0x539fx10,_0x539fx11){return DefaultReport[_0xb9f4[34]](_0x539fx10[_0xb9f4[28]][_0xb9f4[27]],{include:[{all:true}]})[_0xb9f4[21]](function(_0x539fx15){if(!_0x539fx15){return _0x539fx11[_0xb9f4[26]](404)};return _0x539fx11[_0xb9f4[19]](_0x539fx15)})[_0xb9f4[18]](function(_0x539fx13){return handleError(_0x539fx11,_0x539fx13)})};exports[_0xb9f4[107]]= function(_0x539fx10,_0x539fx11){var _0x539fx2c;return sequelize[_0xb9f4[112]](function(_0x539fx2d){return DefaultReport[_0xb9f4[36]]({method:[_0xb9f4[35],{DefaultReportId:_0x539fx10[_0xb9f4[28]][_0xb9f4[27]]}]})[_0xb9f4[34]](_0x539fx10[_0xb9f4[28]][_0xb9f4[27]])[_0xb9f4[21]](function(_0x539fx15){if(!_0x539fx15){return _0x539fx11[_0xb9f4[26]](404)};var _0x539fx2e=_0x539fx15[_0xb9f4[52]];console[_0xb9f4[39]](_0x539fx2e);delete _0x539fx2e[_0xb9f4[27]];delete _0x539fx2e[_0xb9f4[108]];delete _0x539fx2e[_0xb9f4[109]];_0x539fx2e[_0xb9f4[32]]= _0x539fx10[_0xb9f4[110]][_0xb9f4[32]];_0x539fx2c= _[_0xb9f4[111]](_0x539fx2e.Fields,_0xb9f4[52]);return CustomReport[_0xb9f4[91]](_0x539fx2e,{transaction:_0x539fx2d})})[_0xb9f4[21]](function(_0x539fx15){return [_0x539fx15,_0x539fx2c]})[_0xb9f4[42]](createCopyFields(_0x539fx2d))})[_0xb9f4[21]](function(){return _0x539fx11[_0xb9f4[26]](201)})[_0xb9f4[18]](function(_0x539fx13){console[_0xb9f4[39]](_0x539fx13);return handleError(_0x539fx11,_0x539fx13)})};function createCopyFields(_0x539fx2d){return function(_0x539fx15,_0x539fx30){if(_0x539fx30&& Array[_0xb9f4[113]](_0x539fx30)&& _0x539fx30[_0xb9f4[58]]){var _0x539fx31=reportBuildUtils[_0xb9f4[114]](_0x539fx15[_0xb9f4[33]]);if(_0x539fx31){var _0x539fx32;return _0x539fx31[_0xb9f4[129]]()[_0xb9f4[21]](function(_0x539fx33){_0x539fx32= _[_0xb9f4[115]](_0x539fx33);var _0x539fx34=[];var _0x539fx35=_[_0xb9f4[117]](_0x539fx30,_0xb9f4[116]);_[_0xb9f4[65]](_0x539fx35,function(_0x539fx36,_0x539fx1e){if(_0x539fx1e!== _0xb9f4[118]&& _0x539fx1e!== _0xb9f4[119]){_0x539fx36[0][_0xb9f4[122]][_0xb9f4[121]][_0xb9f4[66]](function(_0x539fx37){_0x539fx37[_0xb9f4[120]]= _0x539fx15[_0xb9f4[27]]});_0x539fx36[0][_0xb9f4[122]][_0xb9f4[31]]+= _0xb9f4[123]+ sr({length:5});_0x539fx34[_0xb9f4[124]](Metric[_0xb9f4[91]](_0x539fx36[0][_0xb9f4[122]][_0xb9f4[52]],{include:[{model:ReportField,as:_0xb9f4[121]}],transaction:_0x539fx2d}))}else {_0x539fx36[_0xb9f4[66]](function(_0x539fx37){if(_[_0xb9f4[125]](_0x539fx32,_0x539fx37[_0xb9f4[99]])|| _0x539fx37[_0xb9f4[126]]){_0x539fx37[_0xb9f4[120]]= _0x539fx15[_0xb9f4[27]];_0x539fx34[_0xb9f4[124]](ReportField[_0xb9f4[91]](_0x539fx37,{transaction:_0x539fx2d}))}else {throw  new sequelize.Error(_0xb9f4[127]+ _0x539fx37[_0xb9f4[99]]+ _0xb9f4[128])}})}});return _0x539fx34})[_0xb9f4[40]]()}else {throw  new sequelize.Error(_0xb9f4[130])}}}}exports[_0xb9f4[91]]= function(_0x539fx10,_0x539fx11){return DefaultReport[_0xb9f4[91]](_0x539fx10[_0xb9f4[110]])[_0xb9f4[21]](function(_0x539fx15){return _0x539fx11[_0xb9f4[20]](201)[_0xb9f4[19]](_0x539fx15)})[_0xb9f4[18]](function(_0x539fx13){return handleError(_0x539fx11,_0x539fx13)})};exports[_0xb9f4[131]]= function(_0x539fx10,_0x539fx11){if(_0x539fx10[_0xb9f4[110]][_0xb9f4[27]]){delete _0x539fx10[_0xb9f4[110]][_0xb9f4[27]]};return DefaultReport[_0xb9f4[34]](_0x539fx10[_0xb9f4[28]][_0xb9f4[27]])[_0xb9f4[21]](function(_0x539fx15){if(!_0x539fx15){return _0x539fx11[_0xb9f4[26]](404)};var _0x539fx38=_[_0xb9f4[132]](_0x539fx15,_0x539fx10[_0xb9f4[110]]);return _0x539fx38[_0xb9f4[133]]()})[_0xb9f4[21]](function(_0x539fx15){return _0x539fx11[_0xb9f4[20]](200)[_0xb9f4[19]](_0x539fx15)})[_0xb9f4[18]](function(_0x539fx13){return handleError(_0x539fx11,_0x539fx13)})};exports[_0xb9f4[134]]= function(_0x539fx10,_0x539fx11){return DefaultReport[_0xb9f4[34]](_0x539fx10[_0xb9f4[28]][_0xb9f4[27]])[_0xb9f4[21]](function(_0x539fx15){if(!_0x539fx15){return _0x539fx11[_0xb9f4[26]](404)};return _0x539fx15[_0xb9f4[134]]()})[_0xb9f4[21]](function(){return _0x539fx11[_0xb9f4[26]](204)})[_0xb9f4[18]](function(_0x539fx13){return handleError(_0x539fx11,_0x539fx13)})};function handleError(_0x539fx11,_0x539fx13){return _0x539fx11[_0xb9f4[20]](500)[_0xb9f4[19]](_0x539fx13)}
\ No newline at end of file