1 var _0x3061=["\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x74\x69\x66\x66\x32\x70\x64\x66","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x46\x61\x78\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x4E\x65\x77\x20\x46\x61\x78\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x66\x72\x6F\x6D\x20\x25\x73","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x66\x6F\x72\x6D\x61\x74","\x63\x6C\x6F\x6E\x65","\x45\x72\x72\x6F\x72\x20\x72\x65\x63\x65\x69\x76\x69\x6E\x67\x20\x66\x61\x78\x20\x6D\x65\x73\x73\x61\x67\x65","\x63\x61\x74\x63\x68","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x69\x6E\x62\x6F\x75\x6E\x64","\x2F","\x6A\x6F\x69\x6E","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x70\x61\x72\x73\x65","\x2E\x70\x64\x66","\x69\x64","\x63\x72\x65\x61\x74\x65","\x46\x61\x78\x20\x72\x6F\x6F\x6D\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2F\x63\x72\x65\x61\x74\x65\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x66\x72\x6F\x6D","\x74\x6F","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x4E\x45\x57","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x78\x70\x6F\x72\x74\x73"];var fs=require(_0x3061[0]);var util=require(_0x3061[1]);var path=require(_0x3061[2]);var config=require(_0x3061[3]);var _=require(_0x3061[4]);var Promise=require(_0x3061[5]);var tiff2pdf=Promise[_0x3061[7]](require(_0x3061[6]));var FaxAccount=require(_0x3061[9])[_0x3061[8]];var FaxRoom=require(_0x3061[9])[_0x3061[10]];var FaxMessage=require(_0x3061[9])[_0x3061[11]];var FaxAttachment=require(_0x3061[9])[_0x3061[12]];function Fax(_0xfeafxd){console[_0x3061[14]](_0x3061[13])}Fax[_0x3061[16]][_0x3061[15]]=function(_0xfeafxe){console[_0x3061[14]](util[_0x3061[19]](_0x3061[17],_0xfeafxe[_0x3061[18]]));var _0xfeafxf=_[_0x3061[20]](_0xfeafxe);var _0xfeafx10;return FaxAccount[_0x3061[48]]({where:{localstationid:_0xfeafxe[_0x3061[43]]}})[_0x3061[31]](function(_0xfeafx18){if(!_0xfeafx18){throw new Error(_0x3061[46])};console[_0x3061[14]](_0x3061[47],_0xfeafxe[_0x3061[43]]);_0xfeafx10=_0xfeafx18;return FaxRoom[_0x3061[48]]({where:{from:_0xfeafxe[_0x3061[18]],FaxAccountId:_0xfeafx18[_0x3061[35]]}})})[_0x3061[31]](function(_0xfeafx17){if(_0xfeafx17){return _0xfeafx17[_0x3061[44]]({lastEvent:_0x3061[40]})}else {return FaxRoom[_0x3061[36]]({from:_0xfeafxf[_0x3061[18]],account:_0xfeafx10[_0x3061[32]],status:_0x3061[45],lastEvent:_0x3061[40],FaxAccountId:_0xfeafx10[_0x3061[35]]})}})[_0x3061[31]](function(_0xfeafx17){if(!_0xfeafx17){throw new Error(_0x3061[37])};_0xfeafxf[_0x3061[38]]=_0xfeafx17[_0x3061[35]];_0xfeafxf[_0x3061[39]]=_0x3061[40];_0xfeafxf[_0x3061[41]]=_0xfeafxf[_0x3061[18]];_0xfeafxf[_0x3061[42]]=_0xfeafxf[_0x3061[43]];return FaxMessage[_0x3061[36]](_0xfeafxf)})[_0x3061[31]](function(_0xfeafx13){var _0xfeafx14=[];var _0xfeafx15=path[_0x3061[33]](_0xfeafxe[_0x3061[23]])[_0x3061[32]];var _0xfeafx16=_0xfeafx15+_0x3061[34];return FaxAttachment[_0x3061[36]]({path:path[_0x3061[30]](config[_0x3061[24]],_0x3061[25],_0x3061[26],_0x3061[27],_0x3061[28],_0x3061[29],_0xfeafx16),basename:_0xfeafx16,name:_0xfeafx15,FaxMessageId:_0xfeafx13[_0x3061[35]]})})[_0x3061[31]](function(_0xfeafx12){return tiff2pdf(_0xfeafxe[_0x3061[23]],path[_0x3061[30]](config[_0x3061[24]],_0x3061[25],_0x3061[26],_0x3061[27],_0x3061[28],_0x3061[29]))})[_0x3061[22]](function(_0xfeafx11){console[_0x3061[14]](_0x3061[21],_0xfeafx11)})};module[_0x3061[49]]=Fax