Built motion from commit 683a3d1.|0.0.135
[motion.git] / server / utils / report_extraction.js
index 2dfe41f..d6592d9 100644 (file)
@@ -1 +1 @@
-var _0x59a1=["\x74\x6F\x2D\x63\x73\x76","\x70\x64\x66\x6D\x61\x6B\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4C\x69\x63\x65\x6E\x73\x65","\x53\x65\x74\x74\x69\x6E\x67\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x73","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x65\x6E\x63\x6F\x64\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x66\x6F\x6E\x74\x73","\x52\x6F\x62\x6F\x74\x6F\x2D\x52\x65\x67\x75\x6C\x61\x72\x2E\x74\x74\x66","\x6A\x6F\x69\x6E","\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x2E\x74\x74\x66","\x52\x6F\x62\x6F\x74\x6F\x2D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x70\x6F\x72\x74","\x71\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x49\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x74\x79\x70\x65","\x75\x73\x65\x72","\x6F\x6E","\x6C\x6F\x67","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x64\x65\x63\x72\x79\x70\x74","\x70\x61\x72\x73\x65","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x63\x75\x73\x74\x6F\x6D","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x6C\x6F\x67\x6F\x2D\x62\x69\x67\x2D\x70\x64\x66\x2E\x70\x6E\x67","\x70\x6F\x70","\x2E","\x73\x70\x6C\x69\x74","\x74\x68\x65\x6E","\x70\x64\x66","\x63\x73\x76","\x65\x6D\x70\x74\x79","\x71\x75\x65\x72\x79\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6A\x70\x65\x67","\x6A\x70\x67","\x72\x65\x70\x6F\x72\x74\x5F","\x6E\x61\x6D\x65","\x5F","\x2E\x70\x64\x66","\x61\x6C\x69\x61\x73","\x74\x61\x62\x6C\x65\x48\x65\x61\x64\x65\x72","\x70\x75\x73\x68","","\x68\x65\x61\x64\x65\x72","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x23\x38\x32\x38\x36\x38\x32","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x46\x72\x6F\x6D\x3A\x20","\x6C\x61\x62\x65\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x20\x20\x54\x6F\x3A\x20","\x65\x6E\x64\x4F\x66","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65\x45\x78\x61\x6D\x70\x6C\x65","\x6C\x61\x6E\x64\x73\x63\x61\x70\x65","\x2A","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65\x2F","\x3B\x62\x61\x73\x65\x36\x34\x2C","\x6E\x6F\x42\x6F\x72\x64\x65\x72\x73","\x20\x6F\x66\x20","\x63\x65\x6E\x74\x65\x72","\x62\x6C\x61\x63\x6B","\x62\x72\x65\x61\x6B\x2D\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x50\x64\x66\x4B\x69\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x72\x65\x70\x6F\x72\x74\x73","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x65\x72\x72\x6F\x72","\x70\x64\x66\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x70\x69\x70\x65","\x65\x6E\x64","\x70\x64\x66\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x2E\x63\x73\x76","\x63\x73\x76\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x63\x73\x76\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68\x65\x64","\x73\x65\x6E\x64","\x66\x69\x6E\x61\x6C\x6C\x79","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x77\x69\x74\x68\x20\x65\x72\x72\x6F\x72\x20\x3A\x20","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];var csv=require(_0x59a1[0]);var PdfMake=require(_0x59a1[1]);var _=require(_0x59a1[2]);var util=require(_0x59a1[3]);var ExtractedReport=require(_0x59a1[5])[_0x59a1[4]];var License=require(_0x59a1[5])[_0x59a1[6]];var Settings=require(_0x59a1[5])[_0x59a1[7]];var sequelize=require(_0x59a1[5])[_0x59a1[8]];var fs=require(_0x59a1[9]);var moment=require(_0x59a1[10]);var Promise=require(_0x59a1[11]);var base64=Promise[_0x59a1[14]](require(_0x59a1[13])[_0x59a1[12]]);var sr=require(_0x59a1[15]);var path=require(_0x59a1[16]);var config=require(_0x59a1[17]);var reportBuildUtils=require(_0x59a1[18]);var license=require(_0x59a1[19]);var fonts={Roboto:{normal:path[_0x59a1[22]](config[_0x59a1[20]],_0x59a1[21]),bold:path[_0x59a1[22]](config[_0x59a1[20]],_0x59a1[23]),italics:path[_0x59a1[22]](config[_0x59a1[20]],_0x59a1[24]),bolditalics:path[_0x59a1[22]](config[_0x59a1[20]],_0x59a1[24])}};process[_0x59a1[32]](_0x59a1[25],function(_0xc5adx13){general(_0xc5adx13[_0x59a1[26]],_0xc5adx13[_0x59a1[27]],_0xc5adx13[_0x59a1[28]],_0xc5adx13[_0x59a1[30]][_0x59a1[29]](),_0xc5adx13[_0x59a1[31]])});function general(_0xc5adx15,_0xc5adx16,_0xc5adx17,_0xc5adx18,_0xc5adx19){extract(_0xc5adx15,_0xc5adx16,_0xc5adx17,_0xc5adx18,_0xc5adx19)}function extract(_0xc5adx15,_0xc5adx1b,_0xc5adx17,_0xc5adx18,_0xc5adx19){var _0xc5adx1c,_0xc5adx1d;return License[_0x59a1[68]](1)[_0x59a1[58]](function(_0xc5adx23){_0xc5adx1c= _0xc5adx23;return Settings[_0x59a1[68]](1)})[_0x59a1[58]](function(_0xc5adx28){_0xc5adx1d= _0xc5adx28;return _0xc5adx15[_0x59a1[67]]})[_0x59a1[58]](reportBuildUtils[_0x59a1[66]](_0xc5adx19))[_0x59a1[58]](function(_0xc5adx27){return [_0xc5adx27,_0xc5adx15]})[_0x59a1[65]](reportBuildUtils[_0x59a1[64]](_0xc5adx1b))[_0x59a1[58]](reportBuildUtils[_0x59a1[63]]())[_0x59a1[58]](function(_0xc5adx1f){if(_0xc5adx1f){if(_[_0x59a1[36]](_0xc5adx1f)){if(_0xc5adx1f[_0x59a1[37]]){_[_0x59a1[41]](_0xc5adx1f,function(_0xc5adx20){_[_0x59a1[40]](_0xc5adx20,function(_0xc5adx21,_0xc5adx22){if(_0xc5adx21 instanceof  Date){_0xc5adx20[_0xc5adx22]= moment(_0xc5adx21)[_0x59a1[39]](_0x59a1[38]).toString()}})});switch(_0xc5adx18){case _0x59a1[59]:var _0xc5adx23=_0xc5adx1c?JSON[_0x59a1[45]](license[_0x59a1[44]](_0xc5adx1c[_0x59a1[43]][_0x59a1[42]])):null;var _0xc5adx24=(_0xc5adx1d&& !_0xc5adx1d[_0x59a1[46]]&& _0xc5adx1d[_0x59a1[47]]&& _0xc5adx23&& _0xc5adx23[_0x59a1[48]])?path[_0x59a1[22]](config[_0x59a1[49]],_0x59a1[50],_0x59a1[51],_0x59a1[52],_0xc5adx1d[_0x59a1[47]]):path[_0x59a1[22]](config[_0x59a1[49]],_0x59a1[50],_0x59a1[51],_0x59a1[52],_0x59a1[53],_0x59a1[54]);return base64(_0xc5adx24)[_0x59a1[58]](function(_0xc5adx25){var _0xc5adx26=_0xc5adx24[_0x59a1[57]](_0x59a1[56])[_0x59a1[55]]();return createPdf(_0xc5adx1f,_0xc5adx15,_0xc5adx1b,_0xc5adx17,_0xc5adx25,_0xc5adx26)});case _0x59a1[60]:return createCsv(_0xc5adx1f,_0xc5adx15,_0xc5adx1b,_0xc5adx17);default:return createCsv(_0xc5adx1f,_0xc5adx15,_0xc5adx1b,_0xc5adx17)}}else {return updateExtracted(_0xc5adx17,null,_0x59a1[61])}}else {return updateExtracted(_0xc5adx17,null,_0xc5adx1f)}}else {return updateExtracted(_0xc5adx17,null,_0x59a1[62])}})[_0x59a1[35]](function(_0xc5adx1e){console[_0x59a1[33]](_0xc5adx1e);return updateExtracted(_0xc5adx17,null,_0x59a1[34])})}function createPdf(_0xc5adx1f,_0xc5adx15,_0xc5adx1b,_0xc5adx2a,_0xc5adx2b,_0xc5adx26){switch(_0xc5adx26){case _0x59a1[70]:_0xc5adx26= _0x59a1[69];break;default:};var _0xc5adx2c=sr({length:20,prefix:_0x59a1[71]+ _0xc5adx15[_0x59a1[72]]+ _0x59a1[73],suffix:_0x59a1[74]});var _0xc5adx2d=[];_[_0x59a1[41]](_0xc5adx15.Fields,function(_0xc5adx2e){_0xc5adx2d[_0x59a1[77]]({text:String(_0xc5adx2e[_0x59a1[75]]),style:_0x59a1[76]})});var _0xc5adx2f=[_0xc5adx2d];_[_0x59a1[41]](_0xc5adx1f,function(_0xc5adx2e){var _0xc5adx20=[];_[_0x59a1[40]](_0xc5adx2e,function(_0xc5adx30,_0xc5adx22){_0xc5adx20[_0x59a1[77]](_0xc5adx30?String(_0xc5adx30):_0x59a1[78])});_0xc5adx2f[_0x59a1[77]](_0xc5adx20)});var _0xc5adx31=[{text:_0xc5adx15[_0x59a1[72]],style:_0x59a1[79]}];if(_0xc5adx15[_0x59a1[80]]){_0xc5adx31[_0x59a1[77]]({text:_0xc5adx15[_0x59a1[80]]|| _0x59a1[78],color:_0x59a1[81],margin:[0,0,0,5]})};if(_0xc5adx1b[_0x59a1[82]]){_0xc5adx31[_0x59a1[77]]({text:[{text:_0x59a1[83],style:_0x59a1[84]},moment(_0xc5adx1b[_0x59a1[82]])[_0x59a1[87]](_0x59a1[86])[_0x59a1[39]](_0x59a1[85]).toString(),{text:_0x59a1[88],style:_0x59a1[84]},moment(_0xc5adx1b[_0x59a1[90]]|| _0xc5adx1b[_0x59a1[82]])[_0x59a1[89]](_0x59a1[86])[_0x59a1[39]](_0x59a1[85]).toString()]})};var _0xc5adx32=[];_0xc5adx32[_0x59a1[77]]({style:_0x59a1[91],table:{headerRows:1,dontBreakRows:true,body:_0xc5adx2f}});var _0xc5adx33={pageOrientation:_0x59a1[92],pageMargins:[15,90,15,25],header:function(){return {margin:[15,15,0,0],columns:[{table:{widths:[100,_0x59a1[93]],body:[[{image:_0x59a1[94]+ _0xc5adx26+ _0x59a1[95]+ _0xc5adx2b,fit:[100,60]},_0xc5adx31]]},layout:_0x59a1[96]}]}},content:_0xc5adx32,footer:function(_0xc5adx34,_0xc5adx35){return {columns:[{text:_0xc5adx34.toString()+ _0x59a1[97]+ _0xc5adx35,alignment:_0x59a1[98]}]}},styles:{header:{fontSize:18,bold:true,margin:[0,0,0,5]},tableExample:{margin:[0,0,0,5],fontSize:8},tableHeader:{bold:true,fontSize:8,color:_0x59a1[99],wordWrap:_0x59a1[100]},label:{bold:true,color:_0x59a1[99]}}};var _0xc5adx36= new PdfMake(fonts);var _0xc5adx37=_0xc5adx36[_0x59a1[101]](_0xc5adx33);if(_0xc5adx37){var _0xc5adx38=fs[_0x59a1[103]](config[_0x59a1[102]]+ _0xc5adx2c);_0xc5adx38[_0x59a1[32]](_0x59a1[104],function(){return updateExtracted(_0xc5adx2a,null,_0x59a1[105])});_0xc5adx38[_0x59a1[32]](_0x59a1[106],function(){return updateExtracted(_0xc5adx2a,_0xc5adx2c,_0x59a1[107])});_0xc5adx37[_0x59a1[108]](_0xc5adx38);_0xc5adx37[_0x59a1[109]]()}else {return updateExtracted(_0xc5adx2a,null,_0x59a1[110])}}function createCsv(_0xc5adx1f,_0xc5adx15,_0xc5adx1b,_0xc5adx2a){var _0xc5adx2c=sr({length:20,prefix:_0x59a1[71]+ _0xc5adx15[_0x59a1[72]]+ _0x59a1[73],suffix:_0x59a1[111]});var _0xc5adx3a=csv(_0xc5adx1f);if(_0xc5adx3a){fs[_0x59a1[113]](config[_0x59a1[102]]+ _0xc5adx2c,_0xc5adx3a,function(_0xc5adx1e){if(_0xc5adx1e){console[_0x59a1[33]](_0xc5adx1e);return updateExtracted(_0xc5adx2a,null,_0x59a1[112])}else {return updateExtracted(_0xc5adx2a,_0xc5adx2c,_0x59a1[107])}})}else {return updateExtracted(_0xc5adx2a,null,_0x59a1[114])}}function updateExtracted(_0xc5adx2a,_0xc5adx2c,_0xc5adx3c){return ExtractedReport[_0x59a1[120]]({status:_0xc5adx3c,savename:_0xc5adx2c},{where:{id:_0xc5adx2a}})[_0x59a1[58]](function(){console[_0x59a1[33]](_0x59a1[119])})[_0x59a1[35]](function(_0xc5adx1e){console[_0x59a1[33]](_0x59a1[118]+ _0xc5adx1e)})[_0x59a1[117]](function(){process[_0x59a1[116]]({message:_0x59a1[115],status:_0xc5adx3c})})}
\ No newline at end of file
+var _0xae71=["\x74\x6F\x2D\x63\x73\x76","\x70\x64\x66\x6D\x61\x6B\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4C\x69\x63\x65\x6E\x73\x65","\x53\x65\x74\x74\x69\x6E\x67\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x73","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x65\x6E\x63\x6F\x64\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x66\x6F\x6E\x74\x73","\x52\x6F\x62\x6F\x74\x6F\x2D\x52\x65\x67\x75\x6C\x61\x72\x2E\x74\x74\x66","\x6A\x6F\x69\x6E","\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x2E\x74\x74\x66","\x52\x6F\x62\x6F\x74\x6F\x2D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x6D\x65\x73\x73\x61\x67\x65","\x72\x65\x70\x6F\x72\x74","\x71\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x49\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x74\x79\x70\x65","\x75\x73\x65\x72","\x6F\x6E","\x6C\x6F\x67","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x64\x65\x63\x72\x79\x70\x74","\x70\x61\x72\x73\x65","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x63\x75\x73\x74\x6F\x6D","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x6C\x6F\x67\x6F\x2D\x62\x69\x67\x2D\x70\x64\x66\x2E\x70\x6E\x67","\x70\x6F\x70","\x2E","\x73\x70\x6C\x69\x74","\x74\x68\x65\x6E","\x70\x64\x66","\x63\x73\x76","\x65\x6D\x70\x74\x79","\x71\x75\x65\x72\x79\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6A\x70\x65\x67","\x6A\x70\x67","\x72\x65\x70\x6F\x72\x74\x5F","\x6E\x61\x6D\x65","\x5F","\x2E\x70\x64\x66","\x61\x6C\x69\x61\x73","\x74\x61\x62\x6C\x65\x48\x65\x61\x64\x65\x72","\x70\x75\x73\x68","","\x68\x65\x61\x64\x65\x72","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x23\x38\x32\x38\x36\x38\x32","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x46\x72\x6F\x6D\x3A\x20","\x6C\x61\x62\x65\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x20\x20\x54\x6F\x3A\x20","\x65\x6E\x64\x4F\x66","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65\x45\x78\x61\x6D\x70\x6C\x65","\x6C\x61\x6E\x64\x73\x63\x61\x70\x65","\x2A","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65\x2F","\x3B\x62\x61\x73\x65\x36\x34\x2C","\x6E\x6F\x42\x6F\x72\x64\x65\x72\x73","\x20\x6F\x66\x20","\x63\x65\x6E\x74\x65\x72","\x62\x6C\x61\x63\x6B","\x62\x72\x65\x61\x6B\x2D\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x50\x64\x66\x4B\x69\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x72\x65\x70\x6F\x72\x74\x73","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x65\x72\x72\x6F\x72","\x70\x64\x66\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x70\x69\x70\x65","\x65\x6E\x64","\x70\x64\x66\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x2E\x63\x73\x76","\x63\x73\x76\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x63\x73\x76\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68\x65\x64","\x73\x65\x6E\x64","\x66\x69\x6E\x61\x6C\x6C\x79","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x77\x69\x74\x68\x20\x65\x72\x72\x6F\x72\x20\x3A\x20","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];var csv=require(_0xae71[0]);var PdfMake=require(_0xae71[1]);var _=require(_0xae71[2]);var util=require(_0xae71[3]);var ExtractedReport=require(_0xae71[5])[_0xae71[4]];var License=require(_0xae71[5])[_0xae71[6]];var Settings=require(_0xae71[5])[_0xae71[7]];var sequelize=require(_0xae71[5])[_0xae71[8]];var fs=require(_0xae71[9]);var moment=require(_0xae71[10]);var Promise=require(_0xae71[11]);var base64=Promise[_0xae71[14]](require(_0xae71[13])[_0xae71[12]]);var sr=require(_0xae71[15]);var path=require(_0xae71[16]);var config=require(_0xae71[17]);var reportBuildUtils=require(_0xae71[18]);var license=require(_0xae71[19]);var fonts={Roboto:{normal:path[_0xae71[22]](config[_0xae71[20]],_0xae71[21]),bold:path[_0xae71[22]](config[_0xae71[20]],_0xae71[23]),italics:path[_0xae71[22]](config[_0xae71[20]],_0xae71[24]),bolditalics:path[_0xae71[22]](config[_0xae71[20]],_0xae71[24])}};process[_0xae71[32]](_0xae71[25],function(_0x8131x13){general(_0x8131x13[_0xae71[26]],_0x8131x13[_0xae71[27]],_0x8131x13[_0xae71[28]],_0x8131x13[_0xae71[30]][_0xae71[29]](),_0x8131x13[_0xae71[31]])});function general(_0x8131x15,_0x8131x16,_0x8131x17,_0x8131x18,_0x8131x19){extract(_0x8131x15,_0x8131x16,_0x8131x17,_0x8131x18,_0x8131x19)}function extract(_0x8131x15,_0x8131x1b,_0x8131x17,_0x8131x18,_0x8131x19){var _0x8131x1c,_0x8131x1d;return License[_0xae71[68]](1)[_0xae71[58]](function(_0x8131x23){_0x8131x1c= _0x8131x23;return Settings[_0xae71[68]](1)})[_0xae71[58]](function(_0x8131x28){_0x8131x1d= _0x8131x28;return _0x8131x15[_0xae71[67]]})[_0xae71[58]](reportBuildUtils[_0xae71[66]](_0x8131x19))[_0xae71[58]](function(_0x8131x27){return [_0x8131x27,_0x8131x15]})[_0xae71[65]](reportBuildUtils[_0xae71[64]](_0x8131x1b))[_0xae71[58]](reportBuildUtils[_0xae71[63]]())[_0xae71[58]](function(_0x8131x1f){if(_0x8131x1f){if(_[_0xae71[36]](_0x8131x1f)){if(_0x8131x1f[_0xae71[37]]){_[_0xae71[41]](_0x8131x1f,function(_0x8131x20){_[_0xae71[40]](_0x8131x20,function(_0x8131x21,_0x8131x22){if(_0x8131x21 instanceof  Date){_0x8131x20[_0x8131x22]= moment(_0x8131x21)[_0xae71[39]](_0xae71[38]).toString()}})});switch(_0x8131x18){case _0xae71[59]:var _0x8131x23=_0x8131x1c?JSON[_0xae71[45]](license[_0xae71[44]](_0x8131x1c[_0xae71[43]][_0xae71[42]])):null;var _0x8131x24=(_0x8131x1d&& !_0x8131x1d[_0xae71[46]]&& _0x8131x1d[_0xae71[47]]&& _0x8131x23&& _0x8131x23[_0xae71[48]])?path[_0xae71[22]](config[_0xae71[49]],_0xae71[50],_0xae71[51],_0xae71[52],_0x8131x1d[_0xae71[47]]):path[_0xae71[22]](config[_0xae71[49]],_0xae71[50],_0xae71[51],_0xae71[52],_0xae71[53],_0xae71[54]);return base64(_0x8131x24)[_0xae71[58]](function(_0x8131x25){var _0x8131x26=_0x8131x24[_0xae71[57]](_0xae71[56])[_0xae71[55]]();return createPdf(_0x8131x1f,_0x8131x15,_0x8131x1b,_0x8131x17,_0x8131x25,_0x8131x26)});case _0xae71[60]:return createCsv(_0x8131x1f,_0x8131x15,_0x8131x1b,_0x8131x17);default:return createCsv(_0x8131x1f,_0x8131x15,_0x8131x1b,_0x8131x17)}}else {return updateExtracted(_0x8131x17,null,_0xae71[61])}}else {return updateExtracted(_0x8131x17,null,_0x8131x1f)}}else {return updateExtracted(_0x8131x17,null,_0xae71[62])}})[_0xae71[35]](function(_0x8131x1e){console[_0xae71[33]](_0x8131x1e);return updateExtracted(_0x8131x17,null,_0xae71[34])})}function createPdf(_0x8131x1f,_0x8131x15,_0x8131x1b,_0x8131x2a,_0x8131x2b,_0x8131x26){switch(_0x8131x26){case _0xae71[70]:_0x8131x26= _0xae71[69];break;default:};var _0x8131x2c=sr({length:20,prefix:_0xae71[71]+ _0x8131x15[_0xae71[72]]+ _0xae71[73],suffix:_0xae71[74]});var _0x8131x2d=[];_[_0xae71[41]](_0x8131x15.Fields,function(_0x8131x2e){_0x8131x2d[_0xae71[77]]({text:String(_0x8131x2e[_0xae71[75]]),style:_0xae71[76]})});var _0x8131x2f=[_0x8131x2d];_[_0xae71[41]](_0x8131x1f,function(_0x8131x2e){var _0x8131x20=[];_[_0xae71[40]](_0x8131x2e,function(_0x8131x30,_0x8131x22){_0x8131x20[_0xae71[77]](_0x8131x30?String(_0x8131x30):_0xae71[78])});_0x8131x2f[_0xae71[77]](_0x8131x20)});var _0x8131x31=[{text:_0x8131x15[_0xae71[72]],style:_0xae71[79]}];if(_0x8131x15[_0xae71[80]]){_0x8131x31[_0xae71[77]]({text:_0x8131x15[_0xae71[80]]|| _0xae71[78],color:_0xae71[81],margin:[0,0,0,5]})};if(_0x8131x1b[_0xae71[82]]){_0x8131x31[_0xae71[77]]({text:[{text:_0xae71[83],style:_0xae71[84]},moment(_0x8131x1b[_0xae71[82]])[_0xae71[87]](_0xae71[86])[_0xae71[39]](_0xae71[85]).toString(),{text:_0xae71[88],style:_0xae71[84]},moment(_0x8131x1b[_0xae71[90]]|| _0x8131x1b[_0xae71[82]])[_0xae71[89]](_0xae71[86])[_0xae71[39]](_0xae71[85]).toString()]})};var _0x8131x32=[];_0x8131x32[_0xae71[77]]({style:_0xae71[91],table:{headerRows:1,dontBreakRows:true,body:_0x8131x2f}});var _0x8131x33={pageOrientation:_0xae71[92],pageMargins:[15,90,15,25],header:function(){return {margin:[15,15,0,0],columns:[{table:{widths:[100,_0xae71[93]],body:[[{image:_0xae71[94]+ _0x8131x26+ _0xae71[95]+ _0x8131x2b,fit:[100,60]},_0x8131x31]]},layout:_0xae71[96]}]}},content:_0x8131x32,footer:function(_0x8131x34,_0x8131x35){return {columns:[{text:_0x8131x34.toString()+ _0xae71[97]+ _0x8131x35,alignment:_0xae71[98]}]}},styles:{header:{fontSize:18,bold:true,margin:[0,0,0,5]},tableExample:{margin:[0,0,0,5],fontSize:8},tableHeader:{bold:true,fontSize:8,color:_0xae71[99],wordWrap:_0xae71[100]},label:{bold:true,color:_0xae71[99]}}};var _0x8131x36= new PdfMake(fonts);var _0x8131x37=_0x8131x36[_0xae71[101]](_0x8131x33);if(_0x8131x37){var _0x8131x38=fs[_0xae71[103]](config[_0xae71[102]]+ _0x8131x2c);_0x8131x38[_0xae71[32]](_0xae71[104],function(){return updateExtracted(_0x8131x2a,null,_0xae71[105])});_0x8131x38[_0xae71[32]](_0xae71[106],function(){return updateExtracted(_0x8131x2a,_0x8131x2c,_0xae71[107])});_0x8131x37[_0xae71[108]](_0x8131x38);_0x8131x37[_0xae71[109]]()}else {return updateExtracted(_0x8131x2a,null,_0xae71[110])}}function createCsv(_0x8131x1f,_0x8131x15,_0x8131x1b,_0x8131x2a){var _0x8131x2c=sr({length:20,prefix:_0xae71[71]+ _0x8131x15[_0xae71[72]]+ _0xae71[73],suffix:_0xae71[111]});var _0x8131x3a=csv(_0x8131x1f);if(_0x8131x3a){fs[_0xae71[113]](config[_0xae71[102]]+ _0x8131x2c,_0x8131x3a,function(_0x8131x1e){if(_0x8131x1e){console[_0xae71[33]](_0x8131x1e);return updateExtracted(_0x8131x2a,null,_0xae71[112])}else {return updateExtracted(_0x8131x2a,_0x8131x2c,_0xae71[107])}})}else {return updateExtracted(_0x8131x2a,null,_0xae71[114])}}function updateExtracted(_0x8131x2a,_0x8131x2c,_0x8131x3c){return ExtractedReport[_0xae71[120]]({status:_0x8131x3c,savename:_0x8131x2c},{where:{id:_0x8131x2a}})[_0xae71[58]](function(){console[_0xae71[33]](_0xae71[119])})[_0xae71[35]](function(_0x8131x1e){console[_0xae71[33]](_0xae71[118]+ _0x8131x1e)})[_0xae71[117]](function(){process[_0xae71[116]]({message:_0xae71[115],status:_0x8131x3c})})}
\ No newline at end of file