1 var _0x6b41=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\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\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","\x73\x74\x69\x63\x6B\x79\x3A\x62\x61\x6C\x61\x6E\x63\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\x31","\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"];_0x6b41[0];var csv=require(_0x6b41[1]);var PdfMake=require(_0x6b41[2]);var _=require(_0x6b41[3]);var util=require(_0x6b41[4]);var ExtractedReport=require(_0x6b41[6])[_0x6b41[5]];var License=require(_0x6b41[6])[_0x6b41[7]];var Setting=require(_0x6b41[6])[_0x6b41[8]];var sequelize=require(_0x6b41[6])[_0x6b41[9]];var fs=require(_0x6b41[10]);var moment=require(_0x6b41[11]);var Promise=require(_0x6b41[12]);var base64=Promise[_0x6b41[15]](require(_0x6b41[14])[_0x6b41[13]]);var sr=require(_0x6b41[16]);var path=require(_0x6b41[17]);var config=require(_0x6b41[18]);var reportBuildUtils=require(_0x6b41[19]);var license=require(_0x6b41[20]);var fonts={Roboto:{normal:path[_0x6b41[23]](config[_0x6b41[21]],_0x6b41[22]),bold:path[_0x6b41[23]](config[_0x6b41[21]],_0x6b41[24]),italics:path[_0x6b41[23]](config[_0x6b41[21]],_0x6b41[25]),bolditalics:path[_0x6b41[23]](config[_0x6b41[21]],_0x6b41[25])}};process[_0x6b41[34]](_0x6b41[26],function(_0x7591x13){if(_0x7591x13!== _0x6b41[27]){general(_0x7591x13[_0x6b41[28]],_0x7591x13[_0x6b41[29]],_0x7591x13[_0x6b41[30]],_0x7591x13[_0x6b41[32]][_0x6b41[31]](),_0x7591x13[_0x6b41[33]])}});function general(_0x7591x15,_0x7591x16,_0x7591x17,_0x7591x18,_0x7591x19){extract(_0x7591x15,_0x7591x16,_0x7591x17,_0x7591x18,_0x7591x19)}function extract(_0x7591x15,_0x7591x1b,_0x7591x17,_0x7591x18,_0x7591x19){var _0x7591x1c,_0x7591x1d;return License[_0x6b41[70]](1)[_0x6b41[60]](function(_0x7591x23){_0x7591x1c= _0x7591x23;return Setting[_0x6b41[70]](1)})[_0x6b41[60]](function(_0x7591x28){_0x7591x1d= _0x7591x28;return _0x7591x15[_0x6b41[69]]})[_0x6b41[60]](reportBuildUtils[_0x6b41[68]](_0x7591x19))[_0x6b41[60]](function(_0x7591x27){return [_0x7591x27,_0x7591x15]})[_0x6b41[67]](reportBuildUtils[_0x6b41[66]](_0x7591x1b))[_0x6b41[60]](reportBuildUtils[_0x6b41[65]]())[_0x6b41[60]](function(_0x7591x1f){if(_0x7591x1f){if(_[_0x6b41[38]](_0x7591x1f)){if(_0x7591x1f[_0x6b41[39]]){_[_0x6b41[43]](_0x7591x1f,function(_0x7591x20){_[_0x6b41[42]](_0x7591x20,function(_0x7591x21,_0x7591x22){if(_0x7591x21 instanceof Date){_0x7591x20[_0x7591x22]= moment(_0x7591x21)[_0x6b41[41]](_0x6b41[40]).toString()}})});switch(_0x7591x18){case _0x6b41[61]:var _0x7591x23=_0x7591x1c?JSON[_0x6b41[47]](license[_0x6b41[46]](_0x7591x1c[_0x6b41[44]],_0x7591x1c[_0x6b41[45]])):null;var _0x7591x24=(_0x7591x1d&& !_0x7591x1d[_0x6b41[48]]&& _0x7591x1d[_0x6b41[49]]&& _0x7591x23&& _0x7591x23[_0x6b41[50]])?path[_0x6b41[23]](config[_0x6b41[51]],_0x6b41[52],_0x6b41[53],_0x6b41[54],_0x7591x1d[_0x6b41[49]]):path[_0x6b41[23]](config[_0x6b41[51]],_0x6b41[52],_0x6b41[53],_0x6b41[54],_0x6b41[55],_0x6b41[56]);return base64(_0x7591x24)[_0x6b41[60]](function(_0x7591x25){var _0x7591x26=_0x7591x24[_0x6b41[59]](_0x6b41[58])[_0x6b41[57]]();return createPdf(_0x7591x1f,_0x7591x15,_0x7591x1b,_0x7591x17,_0x7591x25,_0x7591x26)});case _0x6b41[62]:return createCsv(_0x7591x1f,_0x7591x15,_0x7591x1b,_0x7591x17);default:return createCsv(_0x7591x1f,_0x7591x15,_0x7591x1b,_0x7591x17)}}else {return updateExtracted(_0x7591x17,null,_0x6b41[63])}}else {return updateExtracted(_0x7591x17,null,_0x7591x1f)}}else {return updateExtracted(_0x7591x17,null,_0x6b41[64])}})[_0x6b41[37]](function(_0x7591x1e){console[_0x6b41[35]](_0x7591x1e);return updateExtracted(_0x7591x17,null,_0x6b41[36])})}function createPdf(_0x7591x1f,_0x7591x15,_0x7591x1b,_0x7591x2a,_0x7591x2b,_0x7591x26){switch(_0x7591x26){case _0x6b41[72]:_0x7591x26= _0x6b41[71];break;default:};var _0x7591x2c=sr({length:20,prefix:_0x6b41[73]+ _0x7591x15[_0x6b41[74]]+ _0x6b41[75],suffix:_0x6b41[76]});var _0x7591x2d=[];_[_0x6b41[43]](_0x7591x15.Fields,function(_0x7591x2e){_0x7591x2d[_0x6b41[79]]({text:String(_0x7591x2e[_0x6b41[77]]),style:_0x6b41[78]})});var _0x7591x2f=[_0x7591x2d];_[_0x6b41[43]](_0x7591x1f,function(_0x7591x2e){var _0x7591x20=[];_[_0x6b41[42]](_0x7591x2e,function(_0x7591x30,_0x7591x22){_0x7591x20[_0x6b41[79]](_0x7591x30?String(_0x7591x30):_0x6b41[80])});_0x7591x2f[_0x6b41[79]](_0x7591x20)});var _0x7591x31=[{text:_0x7591x15[_0x6b41[74]],style:_0x6b41[81]}];if(_0x7591x15[_0x6b41[82]]){_0x7591x31[_0x6b41[79]]({text:_0x7591x15[_0x6b41[82]]|| _0x6b41[80],color:_0x6b41[83],margin:[0,0,0,5]})};if(_0x7591x1b[_0x6b41[84]]){_0x7591x31[_0x6b41[79]]({text:[{text:_0x6b41[85],style:_0x6b41[86]},moment(_0x7591x1b[_0x6b41[84]])[_0x6b41[89]](_0x6b41[88])[_0x6b41[41]](_0x6b41[87]).toString(),{text:_0x6b41[90],style:_0x6b41[86]},moment(_0x7591x1b[_0x6b41[92]]|| _0x7591x1b[_0x6b41[84]])[_0x6b41[91]](_0x6b41[88])[_0x6b41[41]](_0x6b41[87]).toString()]})};var _0x7591x32=[];_0x7591x32[_0x6b41[79]]({style:_0x6b41[93],table:{headerRows:1,dontBreakRows:true,body:_0x7591x2f}});var _0x7591x33={pageOrientation:_0x6b41[94],pageMargins:[15,90,15,25],header:function(){return {margin:[15,15,0,0],columns:[{table:{widths:[100,_0x6b41[95]],body:[[{image:_0x6b41[96]+ _0x7591x26+ _0x6b41[97]+ _0x7591x2b,fit:[100,60]},_0x7591x31]]},layout:_0x6b41[98]}]}},content:_0x7591x32,footer:function(_0x7591x34,_0x7591x35){return {columns:[{text:_0x7591x34.toString()+ _0x6b41[99]+ _0x7591x35,alignment:_0x6b41[100]}]}},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:_0x6b41[101],wordWrap:_0x6b41[102]},label:{bold:true,color:_0x6b41[101]}}};var _0x7591x36= new PdfMake(fonts);var _0x7591x37=_0x7591x36[_0x6b41[103]](_0x7591x33);if(_0x7591x37){var _0x7591x38=fs[_0x6b41[105]](config[_0x6b41[104]]+ _0x7591x2c);_0x7591x38[_0x6b41[34]](_0x6b41[106],function(){return updateExtracted(_0x7591x2a,null,_0x6b41[107])});_0x7591x38[_0x6b41[34]](_0x6b41[108],function(){return updateExtracted(_0x7591x2a,_0x7591x2c,_0x6b41[109])});_0x7591x37[_0x6b41[110]](_0x7591x38);_0x7591x37[_0x6b41[111]]()}else {return updateExtracted(_0x7591x2a,null,_0x6b41[112])}}function createCsv(_0x7591x1f,_0x7591x15,_0x7591x1b,_0x7591x2a){var _0x7591x2c=sr({length:20,prefix:_0x6b41[73]+ _0x7591x15[_0x6b41[74]]+ _0x6b41[75],suffix:_0x6b41[113]});var _0x7591x3a=csv(_0x7591x1f);if(_0x7591x3a){fs[_0x6b41[115]](config[_0x6b41[104]]+ _0x7591x2c,_0x7591x3a,function(_0x7591x1e){if(_0x7591x1e){console[_0x6b41[35]](_0x7591x1e);return updateExtracted(_0x7591x2a,null,_0x6b41[114])}else {return updateExtracted(_0x7591x2a,_0x7591x2c,_0x6b41[109])}})}else {return updateExtracted(_0x7591x2a,null,_0x6b41[116])}}function updateExtracted(_0x7591x2a,_0x7591x2c,_0x7591x3c){return ExtractedReport[_0x6b41[122]]({status:_0x7591x3c,savename:_0x7591x2c},{where:{id:_0x7591x2a}})[_0x6b41[60]](function(){console[_0x6b41[35]](_0x6b41[121])})[_0x6b41[37]](function(_0x7591x1e){console[_0x6b41[35]](_0x6b41[120]+ _0x7591x1e)})[_0x6b41[119]](function(){process[_0x6b41[118]]({message:_0x6b41[117],status:_0x7591x3c})})}