Built motion from commit 55324429e.|1.0.25
[motion.git] / server / config / agi / lib / scripts / index.js
index 35bd118..d556a7c 100644 (file)
@@ -1 +1 @@
-var _0xc5d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x68\x74\x74\x70","\x68\x74\x74\x70\x73","\x70\x61\x72\x73\x65","\x75\x72\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x73\x6F\x78","\x67\x6F\x6F\x67\x6C\x65\x2D\x74\x74\x73\x2D\x61\x70\x69","\x75\x74\x69\x6C","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x6D\x6F\x6D\x65\x6E\x74","\x61\x77\x73\x2D\x73\x64\x6B","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x69\x73\x70\x65\x65\x63\x68\x2E\x6F\x72\x67\x2F\x61\x70\x69\x2F\x72\x65\x73\x74","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x74\x74\x70\x73\x3A","\x68\x6F\x73\x74","\x57\x48\x41\x54\x5F\x45\x56\x45\x52","\x65\x6E\x64","\x65\x72\x72\x6F\x72","\x6F\x6E","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x72\x65\x71\x75\x65\x73\x74\x20\x74\x6F\x20","\x20\x66\x61\x69\x6C\x65\x64\x2C\x20\x73\x74\x61\x74\x75\x73\x20\x63\x6F\x64\x65\x20\x3D\x20","\x20\x28","\x73\x74\x61\x74\x75\x73\x4D\x65\x73\x73\x61\x67\x65","\x29","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x66\x69\x6E\x69\x73\x68","\x63\x6C\x6F\x73\x65","\x75\x6E\x6C\x69\x6E\x6B","\x70\x69\x70\x65","\x67\x65\x74","","\x64\x61\x74\x61","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x68\x6F\x73\x74\x6E\x61\x6D\x65","\x70\x6F\x72\x74","\x50\x4F\x53\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x73\x65\x74\x45\x6E\x63\x6F\x64\x69\x6E\x67","\x72\x65\x71\x75\x65\x73\x74","\x77\x72\x69\x74\x65","\x77\x61\x76","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x73\x74\x61\x72\x74","\x41\x75\x64\x69\x6F\x53\x74\x72\x65\x61\x6D","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x49\x6E\x76\x61\x6C\x69\x64\x20\x64\x61\x74\x61\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x21","\x4E\x6F\x20\x64\x61\x74\x61\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x21","\x73\x79\x6E\x74\x68\x65\x73\x69\x7A\x65\x53\x70\x65\x65\x63\x68","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x62\x61\x73\x65\x36\x34","\x67\x6F\x6F\x67\x6C\x65\x54\x54\x53","\x2E","\x73\x70\x6C\x69\x74","\x74\x68\x65\x6E","\x74\x6D\x70","\x67\x65\x6E\x65\x72\x61\x74\x65","\x2E\x77\x61\x76","\x72\x65\x73\x6F\x6C\x76\x65","\x2E\x6D\x70\x33","\x65\x6E","\x69\x73\x70\x65\x65\x63\x68\x54\x54\x53","\x25\x73\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x63\x6F\x6E\x76\x65\x72\x74\x26\x74\x65\x78\x74\x3D\x25\x73\x26\x76\x6F\x69\x63\x65\x3D\x25\x73\x26\x73\x70\x65\x65\x64\x3D\x25\x73\x26\x66\x6F\x72\x6D\x61\x74\x3D\x6D\x70\x33","\x66\x6F\x72\x6D\x61\x74","\x61\x77\x73\x50\x6F\x6C\x6C\x79","\x6D\x70\x33","\x69\x73\x70\x65\x65\x63\x68\x41\x53\x52","\x25\x73\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x26\x6C\x6F\x63\x61\x6C\x65\x3D\x25\x73\x26\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3D\x61\x75\x64\x69\x6F\x2F\x78\x2D\x77\x61\x76\x26\x61\x75\x64\x69\x6F\x3D\x25\x73\x26\x25\x73","\x6D\x6F\x64\x65\x6C\x3D\x25\x73","\x66\x72\x65\x65\x66\x6F\x72\x6D\x3D\x33","\x74\x69\x67\x65\x72\x44\x69\x61\x6C\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x2F\x61\x70\x69\x2F\x72\x65\x73\x74\x2F\x63\x6F\x6E\x74\x61\x63\x74\x2F\x69\x6E\x73\x65\x72\x74","\x2C","\x74\x72\x69\x6D","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64","\x73\x74\x61\x74\x75\x73","\x64\x69\x72\x4E\x61\x6D\x65"];_0xc5d6[0];var fs=require(_0xc5d6[1]);var path=require(_0xc5d6[2]);var http=require(_0xc5d6[3]);var https=require(_0xc5d6[4]);var urlParse=require(_0xc5d6[6])[_0xc5d6[5]];var BPromise=require(_0xc5d6[7]);var rs=require(_0xc5d6[8]);var sox=require(_0xc5d6[9]);var tts=require(_0xc5d6[10]);var util=require(_0xc5d6[11]);var querystring=require(_0xc5d6[12]);var moment=require(_0xc5d6[13]);var AWS=require(_0xc5d6[14]);var ISPEECH_API=_0xc5d6[15];function downloadFile(_0x91f8x10,_0x91f8x11){return  new BPromise(function(_0x91f8x12,_0x91f8x13){var _0x91f8x14=urlParse(_0x91f8x10);var _0x91f8x15=_0x91f8x14[_0xc5d6[16]]=== _0xc5d6[17]?https:http;var _0x91f8x16={host:_0x91f8x14[_0xc5d6[18]],path:_0x91f8x14[_0xc5d6[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0xc5d6[19]}};_0x91f8x15[_0xc5d6[34]](_0x91f8x16,function(_0x91f8x18){if(_0x91f8x18[_0xc5d6[23]]!== 200){_0x91f8x13( new Error(_0xc5d6[24]+ _0x91f8x10+ _0xc5d6[25]+ _0x91f8x18[_0xc5d6[23]]+ _0xc5d6[26]+ _0x91f8x18[_0xc5d6[27]]+ _0xc5d6[28]));return};var _0x91f8x19=fs[_0xc5d6[29]](_0x91f8x11);_0x91f8x19[_0xc5d6[22]](_0xc5d6[30],function(){_0x91f8x19[_0xc5d6[31]](_0x91f8x12)});_0x91f8x19[_0xc5d6[22]](_0xc5d6[21],function(_0x91f8x17){fs[_0xc5d6[32]](_0x91f8x11);_0x91f8x13(_0x91f8x17)});_0x91f8x18[_0xc5d6[33]](_0x91f8x19)})[_0xc5d6[22]](_0xc5d6[21],function(_0x91f8x17){_0x91f8x13(_0x91f8x17)})[_0xc5d6[20]]()})}function uploadFile(_0x91f8x10){return  new BPromise(function(_0x91f8x12,_0x91f8x13){var _0x91f8x14=urlParse(_0x91f8x10);var _0x91f8x15=_0x91f8x14[_0xc5d6[16]]=== _0xc5d6[17]?https:http;var _0x91f8x16={host:_0x91f8x14[_0xc5d6[18]],path:_0x91f8x14[_0xc5d6[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0xc5d6[19]}};_0x91f8x15[_0xc5d6[34]](_0x91f8x16,function(_0x91f8x18){if(_0x91f8x18[_0xc5d6[23]]!== 200){_0x91f8x13( new Error(_0xc5d6[24]+ _0x91f8x10+ _0xc5d6[25]+ _0x91f8x18[_0xc5d6[23]]+ _0xc5d6[26]+ _0x91f8x18[_0xc5d6[27]]+ _0xc5d6[28]));return};var _0x91f8x1b=_0xc5d6[35];_0x91f8x18[_0xc5d6[22]](_0xc5d6[36],function(_0x91f8x1c){_0x91f8x1b+= _0x91f8x1c});_0x91f8x18[_0xc5d6[22]](_0xc5d6[20],function(){_0x91f8x12(_0x91f8x1b)})})[_0xc5d6[22]](_0xc5d6[21],function(_0x91f8x17){_0x91f8x13(_0x91f8x17)})[_0xc5d6[20]]()})}function tigerDialAPI(_0x91f8x10,_0x91f8x1e){return  new BPromise(function(_0x91f8x12,_0x91f8x13){var _0x91f8x1f=JSON[_0xc5d6[37]](_0x91f8x1e);var _0x91f8x14=urlParse(_0x91f8x10);var _0x91f8x15=_0x91f8x14[_0xc5d6[16]]=== _0xc5d6[17]?https:http;var _0x91f8x16={hostname:_0x91f8x14[_0xc5d6[38]],path:_0x91f8x14[_0xc5d6[2]],port:_0x91f8x14[_0xc5d6[39]],method:_0xc5d6[40],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xc5d6[41]}};var _0x91f8x20=_0x91f8x15[_0xc5d6[44]](_0x91f8x16,function(_0x91f8x18){if(_0x91f8x18[_0xc5d6[23]]!== 200){_0x91f8x13( new Error(_0xc5d6[24]+ _0x91f8x10+ _0xc5d6[25]+ _0x91f8x18[_0xc5d6[23]]+ _0xc5d6[26]+ _0x91f8x18[_0xc5d6[27]]+ _0xc5d6[28]));return};_0x91f8x18[_0xc5d6[43]](_0xc5d6[42]);var _0x91f8x1b=_0xc5d6[35];_0x91f8x18[_0xc5d6[22]](_0xc5d6[36],function(_0x91f8x1c){_0x91f8x1b+= _0x91f8x1c});_0x91f8x18[_0xc5d6[22]](_0xc5d6[20],function(){_0x91f8x12(_0x91f8x1b)})});_0x91f8x20[_0xc5d6[22]](_0xc5d6[21],function(_0x91f8x17){_0x91f8x13(_0x91f8x17)});_0x91f8x20[_0xc5d6[45]](_0x91f8x1f);_0x91f8x20[_0xc5d6[20]]()})}function convertFile(_0x91f8x19,_0x91f8x11){return  new BPromise(function(_0x91f8x12,_0x91f8x13){var _0x91f8x22=sox[_0xc5d6[47]](_0x91f8x19,_0x91f8x11,{sampleRate:8000,format:_0xc5d6[46],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0x91f8x22[_0xc5d6[22]](_0xc5d6[21],function(_0x91f8x17){_0x91f8x13(_0x91f8x17)});_0x91f8x22[_0xc5d6[22]](_0xc5d6[20],function(){_0x91f8x12()});_0x91f8x22[_0xc5d6[48]]()})}function pollyResult(_0x91f8x24,_0x91f8x25,_0x91f8x26){return  new BPromise(function(_0x91f8x12,_0x91f8x13){_0x91f8x24[_0xc5d6[53]](_0x91f8x25,function(_0x91f8x17,_0x91f8x27){if(_0x91f8x17){_0x91f8x13(_0x91f8x17)}else {if(_0x91f8x27){if(_0x91f8x27[_0xc5d6[49]] instanceof  Buffer){fs[_0xc5d6[50]](_0x91f8x26,_0x91f8x27.AudioStream,function(_0x91f8x17){if(_0x91f8x17){_0x91f8x13(_0x91f8x17)}else {_0x91f8x12()}})}else {_0x91f8x13( new Error(_0xc5d6[51]))}}else {_0x91f8x13( new Error(_0xc5d6[52]))}}})})}function base64Encode(_0x91f8x19){var _0x91f8x29=fs[_0xc5d6[54]](_0x91f8x19);return  new Buffer(_0x91f8x29).toString(_0xc5d6[55])}exports[_0xc5d6[56]]= function(_0x91f8x2a,_0x91f8x2b){var _0x91f8x26;var _0x91f8x2c;return tts(_0x91f8x2a,_0x91f8x2b|| _0xc5d6[65],1)[_0xc5d6[59]](function(_0x91f8x10){_0x91f8x26= path[_0xc5d6[63]](__dirname,_0xc5d6[60],rs[_0xc5d6[61]](4)+ _0xc5d6[64]);return downloadFile(_0x91f8x10,_0x91f8x26)})[_0xc5d6[59]](function(){_0x91f8x2c= path[_0xc5d6[63]](__dirname,_0xc5d6[60],rs[_0xc5d6[61]](4)+ _0xc5d6[62]);return convertFile(_0x91f8x26,_0x91f8x2c)})[_0xc5d6[59]](function(){fs[_0xc5d6[32]](_0x91f8x26);return _0x91f8x2c[_0xc5d6[58]](_0xc5d6[57])[0]})};exports[_0xc5d6[66]]= function(_0x91f8x2d,_0x91f8x2a,_0x91f8x2b,_0x91f8x2e){var _0x91f8x10=util[_0xc5d6[68]](_0xc5d6[67],ISPEECH_API,_0x91f8x2d,encodeURIComponent(_0x91f8x2a),_0x91f8x2b,_0x91f8x2e);var _0x91f8x26=path[_0xc5d6[63]](__dirname,_0xc5d6[60],rs[_0xc5d6[61]](4)+ _0xc5d6[64]);var _0x91f8x2c;return downloadFile(_0x91f8x10,_0x91f8x26)[_0xc5d6[59]](function(){_0x91f8x2c= path[_0xc5d6[63]](__dirname,_0xc5d6[60],rs[_0xc5d6[61]](4)+ _0xc5d6[62]);return convertFile(_0x91f8x26,_0x91f8x2c)})[_0xc5d6[59]](function(){fs[_0xc5d6[32]](_0x91f8x26);return _0x91f8x2c[_0xc5d6[58]](_0xc5d6[57])[0]})};exports[_0xc5d6[69]]= function(_0x91f8x2f,_0x91f8x30,_0x91f8x31,_0x91f8x32,_0x91f8x2a){var _0x91f8x33= new AWS.Polly({accessKeyId:_0x91f8x2f,secretAccessKey:_0x91f8x30,region:_0x91f8x31});var _0x91f8x25={"\x54\x65\x78\x74":_0x91f8x2a,OutputFormat:_0xc5d6[70],VoiceId:_0x91f8x32};var _0x91f8x26=path[_0xc5d6[63]](__dirname,_0xc5d6[60],rs[_0xc5d6[61]](4)+ _0xc5d6[64]);var _0x91f8x2c;return pollyResult(_0x91f8x33,_0x91f8x25,_0x91f8x26)[_0xc5d6[59]](function(){_0x91f8x2c= path[_0xc5d6[63]](__dirname,_0xc5d6[60],rs[_0xc5d6[61]](4)+ _0xc5d6[62]);return convertFile(_0x91f8x26,_0x91f8x2c)})[_0xc5d6[59]](function(){fs[_0xc5d6[32]](_0x91f8x26);return _0x91f8x2c[_0xc5d6[58]](_0xc5d6[57])[0]})};exports[_0xc5d6[71]]= function(_0x91f8x26,_0x91f8x2d,_0x91f8x2b,_0x91f8x34){var _0x91f8x10=util[_0xc5d6[68]](_0xc5d6[72],ISPEECH_API,_0x91f8x2d,_0x91f8x2b,base64Encode(_0x91f8x26),_0x91f8x34?util[_0xc5d6[68]](_0xc5d6[73],encodeURIComponent(_0x91f8x34)):_0xc5d6[74]);return uploadFile(_0x91f8x10)[_0xc5d6[59]](function(_0x91f8x18){return querystring[_0xc5d6[5]](_0x91f8x18)})};exports[_0xc5d6[75]]= function(_0x91f8x35,_0x91f8x36,_0x91f8x37,_0x91f8x38,_0x91f8x39){var _0x91f8x10=_0xc5d6[76];var _0x91f8x1e={id_list:parseInt(_0x91f8x35),name:_0x91f8x36|| _0xc5d6[35],phones:_0x91f8x37[_0xc5d6[78]]()[_0xc5d6[58]](_0xc5d6[77]),description:_0x91f8x38|| _0xc5d6[35],planningtime:moment()[_0xc5d6[81]](_0x91f8x39|| 5,_0xc5d6[80])[_0xc5d6[68]](_0xc5d6[79])};return tigerDialAPI(_0x91f8x10,_0x91f8x1e)[_0xc5d6[59]](function(_0x91f8x18){var _0x91f8x3a=JSON[_0xc5d6[5]](_0x91f8x18);if(_0x91f8x3a[_0xc5d6[82]]> 0){return true};return false})};exports[_0xc5d6[83]]= function(){return __dirname}
\ No newline at end of file
+var _0xe280=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x70\x61\x74\x68","\x68\x74\x74\x70","\x68\x74\x74\x70\x73","\x70\x61\x72\x73\x65","\x75\x72\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x61\x6E\x64\x6F\x6D\x73\x74\x72\x69\x6E\x67","\x73\x6F\x78","\x67\x6F\x6F\x67\x6C\x65\x2D\x74\x74\x73\x2D\x61\x70\x69","\x75\x74\x69\x6C","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x6D\x6F\x6D\x65\x6E\x74","\x61\x77\x73\x2D\x73\x64\x6B","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x69\x73\x70\x65\x65\x63\x68\x2E\x6F\x72\x67\x2F\x61\x70\x69\x2F\x72\x65\x73\x74","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x74\x74\x70\x73\x3A","\x68\x6F\x73\x74","\x57\x48\x41\x54\x5F\x45\x56\x45\x52","\x65\x6E\x64","\x65\x72\x72\x6F\x72","\x6F\x6E","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x72\x65\x71\x75\x65\x73\x74\x20\x74\x6F\x20","\x20\x66\x61\x69\x6C\x65\x64\x2C\x20\x73\x74\x61\x74\x75\x73\x20\x63\x6F\x64\x65\x20\x3D\x20","\x20\x28","\x73\x74\x61\x74\x75\x73\x4D\x65\x73\x73\x61\x67\x65","\x29","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x66\x69\x6E\x69\x73\x68","\x63\x6C\x6F\x73\x65","\x75\x6E\x6C\x69\x6E\x6B","\x70\x69\x70\x65","\x67\x65\x74","","\x64\x61\x74\x61","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x68\x6F\x73\x74\x6E\x61\x6D\x65","\x70\x6F\x72\x74","\x50\x4F\x53\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x73\x65\x74\x45\x6E\x63\x6F\x64\x69\x6E\x67","\x72\x65\x71\x75\x65\x73\x74","\x77\x72\x69\x74\x65","\x77\x61\x76","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x73\x74\x61\x72\x74","\x41\x75\x64\x69\x6F\x53\x74\x72\x65\x61\x6D","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x49\x6E\x76\x61\x6C\x69\x64\x20\x64\x61\x74\x61\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x21","\x4E\x6F\x20\x64\x61\x74\x61\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x61\x77\x73\x20\x50\x6F\x6C\x6C\x79\x21","\x73\x79\x6E\x74\x68\x65\x73\x69\x7A\x65\x53\x70\x65\x65\x63\x68","\x72\x65\x61\x64\x46\x69\x6C\x65\x53\x79\x6E\x63","\x62\x61\x73\x65\x36\x34","\x67\x6F\x6F\x67\x6C\x65\x54\x54\x53","\x2E","\x73\x70\x6C\x69\x74","\x74\x68\x65\x6E","\x74\x6D\x70","\x67\x65\x6E\x65\x72\x61\x74\x65","\x2E\x77\x61\x76","\x72\x65\x73\x6F\x6C\x76\x65","\x2E\x6D\x70\x33","\x65\x6E","\x69\x73\x70\x65\x65\x63\x68\x54\x54\x53","\x25\x73\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x63\x6F\x6E\x76\x65\x72\x74\x26\x74\x65\x78\x74\x3D\x25\x73\x26\x76\x6F\x69\x63\x65\x3D\x25\x73\x26\x73\x70\x65\x65\x64\x3D\x25\x73\x26\x66\x6F\x72\x6D\x61\x74\x3D\x6D\x70\x33","\x66\x6F\x72\x6D\x61\x74","\x61\x77\x73\x50\x6F\x6C\x6C\x79","\x6D\x70\x33","\x69\x73\x70\x65\x65\x63\x68\x41\x53\x52","\x25\x73\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x26\x6C\x6F\x63\x61\x6C\x65\x3D\x25\x73\x26\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3D\x61\x75\x64\x69\x6F\x2F\x78\x2D\x77\x61\x76\x26\x61\x75\x64\x69\x6F\x3D\x25\x73\x26\x25\x73","\x6D\x6F\x64\x65\x6C\x3D\x25\x73","\x66\x72\x65\x65\x66\x6F\x72\x6D\x3D\x33","\x74\x69\x67\x65\x72\x44\x69\x61\x6C\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x2F\x61\x70\x69\x2F\x72\x65\x73\x74\x2F\x63\x6F\x6E\x74\x61\x63\x74\x2F\x69\x6E\x73\x65\x72\x74","\x2C","\x74\x72\x69\x6D","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64","\x73\x74\x61\x74\x75\x73","\x64\x69\x72\x4E\x61\x6D\x65"];_0xe280[0];var fs=require(_0xe280[1]);var path=require(_0xe280[2]);var http=require(_0xe280[3]);var https=require(_0xe280[4]);var urlParse=require(_0xe280[6])[_0xe280[5]];var BPromise=require(_0xe280[7]);var rs=require(_0xe280[8]);var sox=require(_0xe280[9]);var tts=require(_0xe280[10]);var util=require(_0xe280[11]);var querystring=require(_0xe280[12]);var moment=require(_0xe280[13]);var AWS=require(_0xe280[14]);var ISPEECH_API=_0xe280[15];function downloadFile(_0x6539x10,_0x6539x11){return  new BPromise(function(_0x6539x12,_0x6539x13){var _0x6539x14=urlParse(_0x6539x10);var _0x6539x15=_0x6539x14[_0xe280[16]]=== _0xe280[17]?https:http;var _0x6539x16={host:_0x6539x14[_0xe280[18]],path:_0x6539x14[_0xe280[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0xe280[19]}};_0x6539x15[_0xe280[34]](_0x6539x16,function(_0x6539x18){if(_0x6539x18[_0xe280[23]]!== 200){_0x6539x13( new Error(_0xe280[24]+ _0x6539x10+ _0xe280[25]+ _0x6539x18[_0xe280[23]]+ _0xe280[26]+ _0x6539x18[_0xe280[27]]+ _0xe280[28]));return};var _0x6539x19=fs[_0xe280[29]](_0x6539x11);_0x6539x19[_0xe280[22]](_0xe280[30],function(){_0x6539x19[_0xe280[31]](_0x6539x12)});_0x6539x19[_0xe280[22]](_0xe280[21],function(_0x6539x17){fs[_0xe280[32]](_0x6539x11);_0x6539x13(_0x6539x17)});_0x6539x18[_0xe280[33]](_0x6539x19)})[_0xe280[22]](_0xe280[21],function(_0x6539x17){_0x6539x13(_0x6539x17)})[_0xe280[20]]()})}function uploadFile(_0x6539x10){return  new BPromise(function(_0x6539x12,_0x6539x13){var _0x6539x14=urlParse(_0x6539x10);var _0x6539x15=_0x6539x14[_0xe280[16]]=== _0xe280[17]?https:http;var _0x6539x16={host:_0x6539x14[_0xe280[18]],path:_0x6539x14[_0xe280[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0xe280[19]}};_0x6539x15[_0xe280[34]](_0x6539x16,function(_0x6539x18){if(_0x6539x18[_0xe280[23]]!== 200){_0x6539x13( new Error(_0xe280[24]+ _0x6539x10+ _0xe280[25]+ _0x6539x18[_0xe280[23]]+ _0xe280[26]+ _0x6539x18[_0xe280[27]]+ _0xe280[28]));return};var _0x6539x1b=_0xe280[35];_0x6539x18[_0xe280[22]](_0xe280[36],function(_0x6539x1c){_0x6539x1b+= _0x6539x1c});_0x6539x18[_0xe280[22]](_0xe280[20],function(){_0x6539x12(_0x6539x1b)})})[_0xe280[22]](_0xe280[21],function(_0x6539x17){_0x6539x13(_0x6539x17)})[_0xe280[20]]()})}function tigerDialAPI(_0x6539x10,_0x6539x1e){return  new BPromise(function(_0x6539x12,_0x6539x13){var _0x6539x1f=JSON[_0xe280[37]](_0x6539x1e);var _0x6539x14=urlParse(_0x6539x10);var _0x6539x15=_0x6539x14[_0xe280[16]]=== _0xe280[17]?https:http;var _0x6539x16={hostname:_0x6539x14[_0xe280[38]],path:_0x6539x14[_0xe280[2]],port:_0x6539x14[_0xe280[39]],method:_0xe280[40],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xe280[41]}};var _0x6539x20=_0x6539x15[_0xe280[44]](_0x6539x16,function(_0x6539x18){if(_0x6539x18[_0xe280[23]]!== 200){_0x6539x13( new Error(_0xe280[24]+ _0x6539x10+ _0xe280[25]+ _0x6539x18[_0xe280[23]]+ _0xe280[26]+ _0x6539x18[_0xe280[27]]+ _0xe280[28]));return};_0x6539x18[_0xe280[43]](_0xe280[42]);var _0x6539x1b=_0xe280[35];_0x6539x18[_0xe280[22]](_0xe280[36],function(_0x6539x1c){_0x6539x1b+= _0x6539x1c});_0x6539x18[_0xe280[22]](_0xe280[20],function(){_0x6539x12(_0x6539x1b)})});_0x6539x20[_0xe280[22]](_0xe280[21],function(_0x6539x17){_0x6539x13(_0x6539x17)});_0x6539x20[_0xe280[45]](_0x6539x1f);_0x6539x20[_0xe280[20]]()})}function convertFile(_0x6539x19,_0x6539x11){return  new BPromise(function(_0x6539x12,_0x6539x13){var _0x6539x22=sox[_0xe280[47]](_0x6539x19,_0x6539x11,{sampleRate:8000,format:_0xe280[46],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0x6539x22[_0xe280[22]](_0xe280[21],function(_0x6539x17){_0x6539x13(_0x6539x17)});_0x6539x22[_0xe280[22]](_0xe280[20],function(){_0x6539x12()});_0x6539x22[_0xe280[48]]()})}function pollyResult(_0x6539x24,_0x6539x25,_0x6539x26){return  new BPromise(function(_0x6539x12,_0x6539x13){_0x6539x24[_0xe280[53]](_0x6539x25,function(_0x6539x17,_0x6539x27){if(_0x6539x17){_0x6539x13(_0x6539x17)}else {if(_0x6539x27){if(_0x6539x27[_0xe280[49]] instanceof  Buffer){fs[_0xe280[50]](_0x6539x26,_0x6539x27.AudioStream,function(_0x6539x17){if(_0x6539x17){_0x6539x13(_0x6539x17)}else {_0x6539x12()}})}else {_0x6539x13( new Error(_0xe280[51]))}}else {_0x6539x13( new Error(_0xe280[52]))}}})})}function base64Encode(_0x6539x19){var _0x6539x29=fs[_0xe280[54]](_0x6539x19);return  new Buffer(_0x6539x29).toString(_0xe280[55])}exports[_0xe280[56]]= function(_0x6539x2a,_0x6539x2b){var _0x6539x26;var _0x6539x2c;return tts(_0x6539x2a,_0x6539x2b|| _0xe280[65],1)[_0xe280[59]](function(_0x6539x10){_0x6539x26= path[_0xe280[63]](__dirname,_0xe280[60],rs[_0xe280[61]](4)+ _0xe280[64]);return downloadFile(_0x6539x10,_0x6539x26)})[_0xe280[59]](function(){_0x6539x2c= path[_0xe280[63]](__dirname,_0xe280[60],rs[_0xe280[61]](4)+ _0xe280[62]);return convertFile(_0x6539x26,_0x6539x2c)})[_0xe280[59]](function(){fs[_0xe280[32]](_0x6539x26);return _0x6539x2c[_0xe280[58]](_0xe280[57])[0]})};exports[_0xe280[66]]= function(_0x6539x2d,_0x6539x2a,_0x6539x2b,_0x6539x2e){var _0x6539x10=util[_0xe280[68]](_0xe280[67],ISPEECH_API,_0x6539x2d,encodeURIComponent(_0x6539x2a),_0x6539x2b,_0x6539x2e);var _0x6539x26=path[_0xe280[63]](__dirname,_0xe280[60],rs[_0xe280[61]](4)+ _0xe280[64]);var _0x6539x2c;return downloadFile(_0x6539x10,_0x6539x26)[_0xe280[59]](function(){_0x6539x2c= path[_0xe280[63]](__dirname,_0xe280[60],rs[_0xe280[61]](4)+ _0xe280[62]);return convertFile(_0x6539x26,_0x6539x2c)})[_0xe280[59]](function(){fs[_0xe280[32]](_0x6539x26);return _0x6539x2c[_0xe280[58]](_0xe280[57])[0]})};exports[_0xe280[69]]= function(_0x6539x2f,_0x6539x30,_0x6539x31,_0x6539x32,_0x6539x2a){var _0x6539x33= new AWS.Polly({accessKeyId:_0x6539x2f,secretAccessKey:_0x6539x30,region:_0x6539x31});var _0x6539x25={"\x54\x65\x78\x74":_0x6539x2a,OutputFormat:_0xe280[70],VoiceId:_0x6539x32};var _0x6539x26=path[_0xe280[63]](__dirname,_0xe280[60],rs[_0xe280[61]](4)+ _0xe280[64]);var _0x6539x2c;return pollyResult(_0x6539x33,_0x6539x25,_0x6539x26)[_0xe280[59]](function(){_0x6539x2c= path[_0xe280[63]](__dirname,_0xe280[60],rs[_0xe280[61]](4)+ _0xe280[62]);return convertFile(_0x6539x26,_0x6539x2c)})[_0xe280[59]](function(){fs[_0xe280[32]](_0x6539x26);return _0x6539x2c[_0xe280[58]](_0xe280[57])[0]})};exports[_0xe280[71]]= function(_0x6539x26,_0x6539x2d,_0x6539x2b,_0x6539x34){var _0x6539x10=util[_0xe280[68]](_0xe280[72],ISPEECH_API,_0x6539x2d,_0x6539x2b,base64Encode(_0x6539x26),_0x6539x34?util[_0xe280[68]](_0xe280[73],encodeURIComponent(_0x6539x34)):_0xe280[74]);return uploadFile(_0x6539x10)[_0xe280[59]](function(_0x6539x18){return querystring[_0xe280[5]](_0x6539x18)})};exports[_0xe280[75]]= function(_0x6539x35,_0x6539x36,_0x6539x37,_0x6539x38,_0x6539x39){var _0x6539x10=_0xe280[76];var _0x6539x1e={id_list:parseInt(_0x6539x35),name:_0x6539x36|| _0xe280[35],phones:_0x6539x37[_0xe280[78]]()[_0xe280[58]](_0xe280[77]),description:_0x6539x38|| _0xe280[35],planningtime:moment()[_0xe280[81]](_0x6539x39|| 5,_0xe280[80])[_0xe280[68]](_0xe280[79])};return tigerDialAPI(_0x6539x10,_0x6539x1e)[_0xe280[59]](function(_0x6539x18){var _0x6539x3a=JSON[_0xe280[5]](_0x6539x18);if(_0x6539x3a[_0xe280[82]]> 0){return true};return false})};exports[_0xe280[83]]= function(){return __dirname}
\ No newline at end of file