Built motion from commit a5685af.|0.0.128
[motion.git] / server / utils / report_extraction.js
index 2f85862..18c382a 100644 (file)
@@ -1 +1 @@
-var _0xc8a7=["\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","\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","\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","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\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(_0xc8a7[0]);var PdfMake=require(_0xc8a7[1]);var _=require(_0xc8a7[2]);var util=require(_0xc8a7[3]);var ExtractedReport=require(_0xc8a7[5])[_0xc8a7[4]];var Settings=require(_0xc8a7[5])[_0xc8a7[6]];var sequelize=require(_0xc8a7[5])[_0xc8a7[7]];var fs=require(_0xc8a7[8]);var moment=require(_0xc8a7[9]);var Promise=require(_0xc8a7[10]);var base64=Promise[_0xc8a7[13]](require(_0xc8a7[12])[_0xc8a7[11]]);var sr=require(_0xc8a7[14]);var path=require(_0xc8a7[15]);var config=require(_0xc8a7[16]);var reportBuildUtils=require(_0xc8a7[17]);var license=require(_0xc8a7[18]);var fonts={Roboto:{normal:path[_0xc8a7[21]](config[_0xc8a7[19]],_0xc8a7[20]),bold:path[_0xc8a7[21]](config[_0xc8a7[19]],_0xc8a7[22]),italics:path[_0xc8a7[21]](config[_0xc8a7[19]],_0xc8a7[23]),bolditalics:path[_0xc8a7[21]](config[_0xc8a7[19]],_0xc8a7[23])}};process[_0xc8a7[31]](_0xc8a7[24],function(_0xca86x12){general(_0xca86x12[_0xc8a7[25]],_0xca86x12[_0xc8a7[26]],_0xca86x12[_0xc8a7[27]],_0xca86x12[_0xc8a7[29]][_0xc8a7[28]](),_0xca86x12[_0xc8a7[30]])});function general(_0xca86x14,_0xca86x15,_0xca86x16,_0xca86x17,_0xca86x18){extract(_0xca86x14,_0xca86x15,_0xca86x16,_0xca86x17,_0xca86x18)}function extract(_0xca86x14,_0xca86x1a,_0xca86x16,_0xca86x17,_0xca86x18){var _0xca86x1b;return Settings[_0xc8a7[67]](1)[_0xc8a7[56]](function(_0xca86x26){_0xca86x1b= _0xca86x26;return _0xca86x14[_0xc8a7[66]]})[_0xc8a7[56]](reportBuildUtils[_0xc8a7[65]](_0xca86x18))[_0xc8a7[56]](function(_0xca86x25){return [_0xca86x25,_0xca86x14]})[_0xc8a7[64]](reportBuildUtils[_0xc8a7[63]](_0xca86x1a))[_0xc8a7[56]](function(_0xca86x15){return _0xca86x15?sequelize[_0xc8a7[26]](_0xca86x15,{type:sequelize[_0xc8a7[62]][_0xc8a7[61]]}):[]})[_0xc8a7[56]](function(_0xca86x1d){if(_0xca86x1d){if(_0xca86x1d[_0xc8a7[35]]){_[_0xc8a7[39]](_0xca86x1d,function(_0xca86x1e){_[_0xc8a7[38]](_0xca86x1e,function(_0xca86x1f,_0xca86x20){if(_0xca86x1f instanceof  Date){_0xca86x1e[_0xca86x20]= moment(_0xca86x1f)[_0xc8a7[37]](_0xc8a7[36]).toString()}})});switch(_0xca86x17){case _0xc8a7[57]:var _0xca86x21=_0xca86x1b?JSON[_0xc8a7[43]](license[_0xc8a7[42]](_0xca86x1b[_0xc8a7[41]][_0xc8a7[40]])):null;var _0xca86x22=(_0xca86x1b&& !_0xca86x1b[_0xc8a7[44]]&& _0xca86x1b[_0xc8a7[45]]&& _0xca86x21&& _0xca86x21[_0xc8a7[46]])?path[_0xc8a7[21]](config[_0xc8a7[47]],_0xc8a7[48],_0xc8a7[49],_0xc8a7[50],_0xca86x1b[_0xc8a7[45]]):path[_0xc8a7[21]](config[_0xc8a7[47]],_0xc8a7[48],_0xc8a7[49],_0xc8a7[50],_0xc8a7[51],_0xc8a7[52]);return base64(_0xca86x22)[_0xc8a7[56]](function(_0xca86x23){var _0xca86x24=_0xca86x22[_0xc8a7[55]](_0xc8a7[54])[_0xc8a7[53]]();return createPdf(_0xca86x1d,_0xca86x14,_0xca86x1a,_0xca86x16,_0xca86x23,_0xca86x24)});case _0xc8a7[58]:return createCsv(_0xca86x1d,_0xca86x14,_0xca86x1a,_0xca86x16);default:return createCsv(_0xca86x1d,_0xca86x14,_0xca86x1a,_0xca86x16)}}else {return updateExtracted(_0xca86x16,null,_0xc8a7[59])}}else {return updateExtracted(_0xca86x16,null,_0xc8a7[60])}})[_0xc8a7[34]](function(_0xca86x1c){console[_0xc8a7[32]](_0xca86x1c);return updateExtracted(_0xca86x16,null,_0xc8a7[33])})}function createPdf(_0xca86x1d,_0xca86x14,_0xca86x1a,_0xca86x28,_0xca86x29,_0xca86x24){switch(_0xca86x24){case _0xc8a7[69]:_0xca86x24= _0xc8a7[68];break;default:};var _0xca86x2a=sr({length:20,prefix:_0xc8a7[70]+ _0xca86x14[_0xc8a7[71]]+ _0xc8a7[72],suffix:_0xc8a7[73]});var _0xca86x2b=[];_[_0xc8a7[39]](_0xca86x14.Fields,function(_0xca86x2c){_0xca86x2b[_0xc8a7[76]]({text:String(_0xca86x2c[_0xc8a7[74]]),style:_0xc8a7[75]})});var _0xca86x2d=[_0xca86x2b];_[_0xc8a7[39]](_0xca86x1d,function(_0xca86x2c){var _0xca86x1e=[];_[_0xc8a7[38]](_0xca86x2c,function(_0xca86x2e,_0xca86x20){_0xca86x1e[_0xc8a7[76]](_0xca86x2e?String(_0xca86x2e):_0xc8a7[77])});_0xca86x2d[_0xc8a7[76]](_0xca86x1e)});var _0xca86x2f=[{text:_0xca86x14[_0xc8a7[71]],style:_0xc8a7[78]}];if(_0xca86x14[_0xc8a7[79]]){_0xca86x2f[_0xc8a7[76]]({text:_0xca86x14[_0xc8a7[79]]|| _0xc8a7[77],color:_0xc8a7[80],margin:[0,0,0,5]})};if(_0xca86x1a[_0xc8a7[81]]){_0xca86x2f[_0xc8a7[76]]({text:[{text:_0xc8a7[82],style:_0xc8a7[83]},moment(_0xca86x1a[_0xc8a7[81]])[_0xc8a7[86]](_0xc8a7[85])[_0xc8a7[37]](_0xc8a7[84]).toString(),{text:_0xc8a7[87],style:_0xc8a7[83]},moment(_0xca86x1a[_0xc8a7[89]]|| _0xca86x1a[_0xc8a7[81]])[_0xc8a7[88]](_0xc8a7[85])[_0xc8a7[37]](_0xc8a7[84]).toString()]})};var _0xca86x30=[];_0xca86x30[_0xc8a7[76]]({style:_0xc8a7[90],table:{headerRows:1,dontBreakRows:true,body:_0xca86x2d}});var _0xca86x31={pageOrientation:_0xc8a7[91],pageMargins:[15,90,15,25],header:function(){return {margin:[15,15,0,0],columns:[{table:{widths:[100,_0xc8a7[92]],body:[[{image:_0xc8a7[93]+ _0xca86x24+ _0xc8a7[94]+ _0xca86x29,fit:[100,60]},_0xca86x2f]]},layout:_0xc8a7[95]}]}},content:_0xca86x30,footer:function(_0xca86x32,_0xca86x33){return {columns:[{text:_0xca86x32.toString()+ _0xc8a7[96]+ _0xca86x33,alignment:_0xc8a7[97]}]}},styles:{header:{fontSize:18,bold:true,margin:[0,0,0,5]},tableExample:{margin:[0,0,0,5]},tableHeader:{bold:true,fontSize:13,color:_0xc8a7[98],wordWrap:_0xc8a7[99]},label:{bold:true,color:_0xc8a7[98]}}};var _0xca86x34= new PdfMake(fonts);var _0xca86x35=_0xca86x34[_0xc8a7[100]](_0xca86x31);if(_0xca86x35){var _0xca86x36=fs[_0xc8a7[102]](config[_0xc8a7[101]]+ _0xca86x2a);_0xca86x36[_0xc8a7[31]](_0xc8a7[103],function(){return updateExtracted(_0xca86x28,null,_0xc8a7[104])});_0xca86x36[_0xc8a7[31]](_0xc8a7[105],function(){return updateExtracted(_0xca86x28,_0xca86x2a,_0xc8a7[106])});_0xca86x35[_0xc8a7[107]](_0xca86x36);_0xca86x35[_0xc8a7[108]]()}else {return updateExtracted(_0xca86x28,null,_0xc8a7[109])}}function createCsv(_0xca86x1d,_0xca86x14,_0xca86x1a,_0xca86x28){var _0xca86x2a=sr({length:20,prefix:_0xc8a7[70]+ _0xca86x14[_0xc8a7[71]]+ _0xc8a7[72],suffix:_0xc8a7[110]});var _0xca86x38=csv(_0xca86x1d);if(_0xca86x38){fs[_0xc8a7[112]](config[_0xc8a7[101]]+ _0xca86x2a,_0xca86x38,function(_0xca86x1c){if(_0xca86x1c){console[_0xc8a7[32]](_0xca86x1c);return updateExtracted(_0xca86x28,null,_0xc8a7[111])}else {return updateExtracted(_0xca86x28,_0xca86x2a,_0xc8a7[106])}})}else {return updateExtracted(_0xca86x28,null,_0xc8a7[113])}}function updateExtracted(_0xca86x28,_0xca86x2a,_0xca86x3a){return ExtractedReport[_0xc8a7[119]]({status:_0xca86x3a,savename:_0xca86x2a},{where:{id:_0xca86x28}})[_0xc8a7[56]](function(){console[_0xc8a7[32]](_0xc8a7[118])})[_0xc8a7[34]](function(_0xca86x1c){console[_0xc8a7[32]](_0xc8a7[117]+ _0xca86x1c)})[_0xc8a7[116]](function(){process[_0xc8a7[115]]({message:_0xc8a7[114],status:_0xca86x3a})})}
\ No newline at end of file
+var _0xe61d=["\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","\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","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\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(_0xe61d[0]);var PdfMake=require(_0xe61d[1]);var _=require(_0xe61d[2]);var util=require(_0xe61d[3]);var ExtractedReport=require(_0xe61d[5])[_0xe61d[4]];var License=require(_0xe61d[5])[_0xe61d[6]];var Settings=require(_0xe61d[5])[_0xe61d[7]];var sequelize=require(_0xe61d[5])[_0xe61d[8]];var fs=require(_0xe61d[9]);var moment=require(_0xe61d[10]);var Promise=require(_0xe61d[11]);var base64=Promise[_0xe61d[14]](require(_0xe61d[13])[_0xe61d[12]]);var sr=require(_0xe61d[15]);var path=require(_0xe61d[16]);var config=require(_0xe61d[17]);var reportBuildUtils=require(_0xe61d[18]);var license=require(_0xe61d[19]);var fonts={Roboto:{normal:path[_0xe61d[22]](config[_0xe61d[20]],_0xe61d[21]),bold:path[_0xe61d[22]](config[_0xe61d[20]],_0xe61d[23]),italics:path[_0xe61d[22]](config[_0xe61d[20]],_0xe61d[24]),bolditalics:path[_0xe61d[22]](config[_0xe61d[20]],_0xe61d[24])}};process[_0xe61d[32]](_0xe61d[25],function(_0x83aax13){general(_0x83aax13[_0xe61d[26]],_0x83aax13[_0xe61d[27]],_0x83aax13[_0xe61d[28]],_0x83aax13[_0xe61d[30]][_0xe61d[29]](),_0x83aax13[_0xe61d[31]])});function general(_0x83aax15,_0x83aax16,_0x83aax17,_0x83aax18,_0x83aax19){extract(_0x83aax15,_0x83aax16,_0x83aax17,_0x83aax18,_0x83aax19)}function extract(_0x83aax15,_0x83aax1b,_0x83aax17,_0x83aax18,_0x83aax19){var _0x83aax1c,_0x83aax1d;return License[_0xe61d[68]](1)[_0xe61d[57]](function(_0x83aax23){_0x83aax1c= _0x83aax23;return Settings[_0xe61d[68]](1)})[_0xe61d[57]](function(_0x83aax28){_0x83aax1d= _0x83aax28;return _0x83aax15[_0xe61d[67]]})[_0xe61d[57]](reportBuildUtils[_0xe61d[66]](_0x83aax19))[_0xe61d[57]](function(_0x83aax27){return [_0x83aax27,_0x83aax15]})[_0xe61d[65]](reportBuildUtils[_0xe61d[64]](_0x83aax1b))[_0xe61d[57]](function(_0x83aax16){return _0x83aax16?sequelize[_0xe61d[27]](_0x83aax16,{type:sequelize[_0xe61d[63]][_0xe61d[62]]}):[]})[_0xe61d[57]](function(_0x83aax1f){if(_0x83aax1f){if(_0x83aax1f[_0xe61d[36]]){_[_0xe61d[40]](_0x83aax1f,function(_0x83aax20){_[_0xe61d[39]](_0x83aax20,function(_0x83aax21,_0x83aax22){if(_0x83aax21 instanceof  Date){_0x83aax20[_0x83aax22]= moment(_0x83aax21)[_0xe61d[38]](_0xe61d[37]).toString()}})});switch(_0x83aax18){case _0xe61d[58]:var _0x83aax23=_0x83aax1c?JSON[_0xe61d[44]](license[_0xe61d[43]](_0x83aax1c[_0xe61d[42]][_0xe61d[41]])):null;var _0x83aax24=(_0x83aax1d&& !_0x83aax1d[_0xe61d[45]]&& _0x83aax1d[_0xe61d[46]]&& _0x83aax23&& _0x83aax23[_0xe61d[47]])?path[_0xe61d[22]](config[_0xe61d[48]],_0xe61d[49],_0xe61d[50],_0xe61d[51],_0x83aax1d[_0xe61d[46]]):path[_0xe61d[22]](config[_0xe61d[48]],_0xe61d[49],_0xe61d[50],_0xe61d[51],_0xe61d[52],_0xe61d[53]);return base64(_0x83aax24)[_0xe61d[57]](function(_0x83aax25){var _0x83aax26=_0x83aax24[_0xe61d[56]](_0xe61d[55])[_0xe61d[54]]();return createPdf(_0x83aax1f,_0x83aax15,_0x83aax1b,_0x83aax17,_0x83aax25,_0x83aax26)});case _0xe61d[59]:return createCsv(_0x83aax1f,_0x83aax15,_0x83aax1b,_0x83aax17);default:return createCsv(_0x83aax1f,_0x83aax15,_0x83aax1b,_0x83aax17)}}else {return updateExtracted(_0x83aax17,null,_0xe61d[60])}}else {return updateExtracted(_0x83aax17,null,_0xe61d[61])}})[_0xe61d[35]](function(_0x83aax1e){console[_0xe61d[33]](_0x83aax1e);return updateExtracted(_0x83aax17,null,_0xe61d[34])})}function createPdf(_0x83aax1f,_0x83aax15,_0x83aax1b,_0x83aax2a,_0x83aax2b,_0x83aax26){switch(_0x83aax26){case _0xe61d[70]:_0x83aax26= _0xe61d[69];break;default:};var _0x83aax2c=sr({length:20,prefix:_0xe61d[71]+ _0x83aax15[_0xe61d[72]]+ _0xe61d[73],suffix:_0xe61d[74]});var _0x83aax2d=[];_[_0xe61d[40]](_0x83aax15.Fields,function(_0x83aax2e){_0x83aax2d[_0xe61d[77]]({text:String(_0x83aax2e[_0xe61d[75]]),style:_0xe61d[76]})});var _0x83aax2f=[_0x83aax2d];_[_0xe61d[40]](_0x83aax1f,function(_0x83aax2e){var _0x83aax20=[];_[_0xe61d[39]](_0x83aax2e,function(_0x83aax30,_0x83aax22){_0x83aax20[_0xe61d[77]](_0x83aax30?String(_0x83aax30):_0xe61d[78])});_0x83aax2f[_0xe61d[77]](_0x83aax20)});var _0x83aax31=[{text:_0x83aax15[_0xe61d[72]],style:_0xe61d[79]}];if(_0x83aax15[_0xe61d[80]]){_0x83aax31[_0xe61d[77]]({text:_0x83aax15[_0xe61d[80]]|| _0xe61d[78],color:_0xe61d[81],margin:[0,0,0,5]})};if(_0x83aax1b[_0xe61d[82]]){_0x83aax31[_0xe61d[77]]({text:[{text:_0xe61d[83],style:_0xe61d[84]},moment(_0x83aax1b[_0xe61d[82]])[_0xe61d[87]](_0xe61d[86])[_0xe61d[38]](_0xe61d[85]).toString(),{text:_0xe61d[88],style:_0xe61d[84]},moment(_0x83aax1b[_0xe61d[90]]|| _0x83aax1b[_0xe61d[82]])[_0xe61d[89]](_0xe61d[86])[_0xe61d[38]](_0xe61d[85]).toString()]})};var _0x83aax32=[];_0x83aax32[_0xe61d[77]]({style:_0xe61d[91],table:{headerRows:1,dontBreakRows:true,body:_0x83aax2f}});var _0x83aax33={pageOrientation:_0xe61d[92],pageMargins:[15,90,15,25],header:function(){return {margin:[15,15,0,0],columns:[{table:{widths:[100,_0xe61d[93]],body:[[{image:_0xe61d[94]+ _0x83aax26+ _0xe61d[95]+ _0x83aax2b,fit:[100,60]},_0x83aax31]]},layout:_0xe61d[96]}]}},content:_0x83aax32,footer:function(_0x83aax34,_0x83aax35){return {columns:[{text:_0x83aax34.toString()+ _0xe61d[97]+ _0x83aax35,alignment:_0xe61d[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:_0xe61d[99],wordWrap:_0xe61d[100]},label:{bold:true,color:_0xe61d[99]}}};var _0x83aax36= new PdfMake(fonts);var _0x83aax37=_0x83aax36[_0xe61d[101]](_0x83aax33);if(_0x83aax37){var _0x83aax38=fs[_0xe61d[103]](config[_0xe61d[102]]+ _0x83aax2c);_0x83aax38[_0xe61d[32]](_0xe61d[104],function(){return updateExtracted(_0x83aax2a,null,_0xe61d[105])});_0x83aax38[_0xe61d[32]](_0xe61d[106],function(){return updateExtracted(_0x83aax2a,_0x83aax2c,_0xe61d[107])});_0x83aax37[_0xe61d[108]](_0x83aax38);_0x83aax37[_0xe61d[109]]()}else {return updateExtracted(_0x83aax2a,null,_0xe61d[110])}}function createCsv(_0x83aax1f,_0x83aax15,_0x83aax1b,_0x83aax2a){var _0x83aax2c=sr({length:20,prefix:_0xe61d[71]+ _0x83aax15[_0xe61d[72]]+ _0xe61d[73],suffix:_0xe61d[111]});var _0x83aax3a=csv(_0x83aax1f);if(_0x83aax3a){fs[_0xe61d[113]](config[_0xe61d[102]]+ _0x83aax2c,_0x83aax3a,function(_0x83aax1e){if(_0x83aax1e){console[_0xe61d[33]](_0x83aax1e);return updateExtracted(_0x83aax2a,null,_0xe61d[112])}else {return updateExtracted(_0x83aax2a,_0x83aax2c,_0xe61d[107])}})}else {return updateExtracted(_0x83aax2a,null,_0xe61d[114])}}function updateExtracted(_0x83aax2a,_0x83aax2c,_0x83aax3c){return ExtractedReport[_0xe61d[120]]({status:_0x83aax3c,savename:_0x83aax2c},{where:{id:_0x83aax2a}})[_0xe61d[57]](function(){console[_0xe61d[33]](_0xe61d[119])})[_0xe61d[35]](function(_0x83aax1e){console[_0xe61d[33]](_0xe61d[118]+ _0x83aax1e)})[_0xe61d[117]](function(){process[_0xe61d[116]]({message:_0xe61d[115],status:_0x83aax3c})})}
\ No newline at end of file