Built motion from commit 2238b68.|1.0.18
[motion.git] / server / config / agi / lib / scripts / index.js
index 12dbb4b..1ae3fe2 100644 (file)
@@ -1 +1 @@
-var _0xaa55=["\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","\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","\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","\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"];_0xaa55[0];var fs=require(_0xaa55[1]);var path=require(_0xaa55[2]);var http=require(_0xaa55[3]);var https=require(_0xaa55[4]);var urlParse=require(_0xaa55[6])[_0xaa55[5]];var BPromise=require(_0xaa55[7]);var rs=require(_0xaa55[8]);var sox=require(_0xaa55[9]);var tts=require(_0xaa55[10]);var util=require(_0xaa55[11]);var querystring=require(_0xaa55[12]);var moment=require(_0xaa55[13]);var ISPEECH_API=_0xaa55[14];function downloadFile(_0xc365xf,_0xc365x10){return  new BPromise(function(_0xc365x11,_0xc365x12){var _0xc365x13=urlParse(_0xc365xf);var _0xc365x14=_0xc365x13[_0xaa55[15]]=== _0xaa55[16]?https:http;var _0xc365x15={host:_0xc365x13[_0xaa55[17]],path:_0xc365x13[_0xaa55[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0xaa55[18]}};_0xc365x14[_0xaa55[33]](_0xc365x15,function(_0xc365x17){if(_0xc365x17[_0xaa55[22]]!== 200){_0xc365x12( new Error(_0xaa55[23]+ _0xc365xf+ _0xaa55[24]+ _0xc365x17[_0xaa55[22]]+ _0xaa55[25]+ _0xc365x17[_0xaa55[26]]+ _0xaa55[27]));return};var _0xc365x18=fs[_0xaa55[28]](_0xc365x10);_0xc365x18[_0xaa55[21]](_0xaa55[29],function(){_0xc365x18[_0xaa55[30]](_0xc365x11)});_0xc365x18[_0xaa55[21]](_0xaa55[20],function(_0xc365x16){fs[_0xaa55[31]](_0xc365x10);_0xc365x12(_0xc365x16)});_0xc365x17[_0xaa55[32]](_0xc365x18)})[_0xaa55[21]](_0xaa55[20],function(_0xc365x16){_0xc365x12(_0xc365x16)})[_0xaa55[19]]()})}function uploadFile(_0xc365xf){return  new BPromise(function(_0xc365x11,_0xc365x12){var _0xc365x13=urlParse(_0xc365xf);var _0xc365x14=_0xc365x13[_0xaa55[15]]=== _0xaa55[16]?https:http;var _0xc365x15={host:_0xc365x13[_0xaa55[17]],path:_0xc365x13[_0xaa55[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0xaa55[18]}};_0xc365x14[_0xaa55[33]](_0xc365x15,function(_0xc365x17){if(_0xc365x17[_0xaa55[22]]!== 200){_0xc365x12( new Error(_0xaa55[23]+ _0xc365xf+ _0xaa55[24]+ _0xc365x17[_0xaa55[22]]+ _0xaa55[25]+ _0xc365x17[_0xaa55[26]]+ _0xaa55[27]));return};var _0xc365x1a=_0xaa55[34];_0xc365x17[_0xaa55[21]](_0xaa55[35],function(_0xc365x1b){_0xc365x1a+= _0xc365x1b});_0xc365x17[_0xaa55[21]](_0xaa55[19],function(){_0xc365x11(_0xc365x1a)})})[_0xaa55[21]](_0xaa55[20],function(_0xc365x16){_0xc365x12(_0xc365x16)})[_0xaa55[19]]()})}function tigerDialAPI(_0xc365xf,_0xc365x1d){return  new BPromise(function(_0xc365x11,_0xc365x12){var _0xc365x1e=JSON[_0xaa55[36]](_0xc365x1d);var _0xc365x13=urlParse(_0xc365xf);var _0xc365x14=_0xc365x13[_0xaa55[15]]=== _0xaa55[16]?https:http;var _0xc365x15={hostname:_0xc365x13[_0xaa55[37]],path:_0xc365x13[_0xaa55[2]],port:_0xc365x13[_0xaa55[38]],method:_0xaa55[39],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xaa55[40]}};var _0xc365x1f=_0xc365x14[_0xaa55[43]](_0xc365x15,function(_0xc365x17){if(_0xc365x17[_0xaa55[22]]!== 200){_0xc365x12( new Error(_0xaa55[23]+ _0xc365xf+ _0xaa55[24]+ _0xc365x17[_0xaa55[22]]+ _0xaa55[25]+ _0xc365x17[_0xaa55[26]]+ _0xaa55[27]));return};_0xc365x17[_0xaa55[42]](_0xaa55[41]);var _0xc365x1a=_0xaa55[34];_0xc365x17[_0xaa55[21]](_0xaa55[35],function(_0xc365x1b){_0xc365x1a+= _0xc365x1b});_0xc365x17[_0xaa55[21]](_0xaa55[19],function(){_0xc365x11(_0xc365x1a)})});_0xc365x1f[_0xaa55[21]](_0xaa55[20],function(_0xc365x16){_0xc365x12(_0xc365x16)});_0xc365x1f[_0xaa55[44]](_0xc365x1e);_0xc365x1f[_0xaa55[19]]()})}function convertFile(_0xc365x18,_0xc365x10){return  new BPromise(function(_0xc365x11,_0xc365x12){var _0xc365x21=sox[_0xaa55[46]](_0xc365x18,_0xc365x10,{sampleRate:8000,format:_0xaa55[45],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0xc365x21[_0xaa55[21]](_0xaa55[20],function(_0xc365x16){_0xc365x12(_0xc365x16)});_0xc365x21[_0xaa55[21]](_0xaa55[19],function(){_0xc365x11()});_0xc365x21[_0xaa55[47]]()})}function base64Encode(_0xc365x18){var _0xc365x23=fs[_0xaa55[48]](_0xc365x18);return  new Buffer(_0xc365x23).toString(_0xaa55[49])}exports[_0xaa55[50]]= function(_0xc365x24,_0xc365x25){var _0xc365x26;var _0xc365x27;return tts(_0xc365x24,_0xc365x25|| _0xaa55[59],1)[_0xaa55[53]](function(_0xc365xf){_0xc365x26= path[_0xaa55[57]](__dirname,_0xaa55[54],rs[_0xaa55[55]](4)+ _0xaa55[58]);return downloadFile(_0xc365xf,_0xc365x26)})[_0xaa55[53]](function(){_0xc365x27= path[_0xaa55[57]](__dirname,_0xaa55[54],rs[_0xaa55[55]](4)+ _0xaa55[56]);return convertFile(_0xc365x26,_0xc365x27)})[_0xaa55[53]](function(){fs[_0xaa55[31]](_0xc365x26);return _0xc365x27[_0xaa55[52]](_0xaa55[51])[0]})};exports[_0xaa55[60]]= function(_0xc365x28,_0xc365x24,_0xc365x25,_0xc365x29){var _0xc365xf=util[_0xaa55[62]](_0xaa55[61],ISPEECH_API,_0xc365x28,encodeURIComponent(_0xc365x24),_0xc365x25,_0xc365x29);var _0xc365x26=path[_0xaa55[57]](__dirname,_0xaa55[54],rs[_0xaa55[55]](4)+ _0xaa55[58]);var _0xc365x27;return downloadFile(_0xc365xf,_0xc365x26)[_0xaa55[53]](function(){_0xc365x27= path[_0xaa55[57]](__dirname,_0xaa55[54],rs[_0xaa55[55]](4)+ _0xaa55[56]);return convertFile(_0xc365x26,_0xc365x27)})[_0xaa55[53]](function(){fs[_0xaa55[31]](_0xc365x26);return _0xc365x27[_0xaa55[52]](_0xaa55[51])[0]})};exports[_0xaa55[63]]= function(_0xc365x26,_0xc365x28,_0xc365x25,_0xc365x2a){var _0xc365xf=util[_0xaa55[62]](_0xaa55[64],ISPEECH_API,_0xc365x28,_0xc365x25,base64Encode(_0xc365x26),_0xc365x2a?util[_0xaa55[62]](_0xaa55[65],encodeURIComponent(_0xc365x2a)):_0xaa55[66]);return uploadFile(_0xc365xf)[_0xaa55[53]](function(_0xc365x17){return querystring[_0xaa55[5]](_0xc365x17)})};exports[_0xaa55[67]]= function(_0xc365x2b,_0xc365x2c,_0xc365x2d,_0xc365x2e,_0xc365x2f){var _0xc365xf=_0xaa55[68];var _0xc365x1d={id_list:parseInt(_0xc365x2b),name:_0xc365x2c|| _0xaa55[34],phones:_0xc365x2d[_0xaa55[70]]()[_0xaa55[52]](_0xaa55[69]),description:_0xc365x2e|| _0xaa55[34],planningtime:moment()[_0xaa55[73]](_0xc365x2f|| 5,_0xaa55[72])[_0xaa55[62]](_0xaa55[71])};return tigerDialAPI(_0xc365xf,_0xc365x1d)[_0xaa55[53]](function(_0xc365x17){var _0xc365x30=JSON[_0xaa55[5]](_0xc365x17);if(_0xc365x30[_0xaa55[74]]> 0){return true};return false})};exports[_0xaa55[75]]= function(){return __dirname}
\ No newline at end of file
+var _0xe4a1=["\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"];_0xe4a1[0];var fs=require(_0xe4a1[1]);var path=require(_0xe4a1[2]);var http=require(_0xe4a1[3]);var https=require(_0xe4a1[4]);var urlParse=require(_0xe4a1[6])[_0xe4a1[5]];var BPromise=require(_0xe4a1[7]);var rs=require(_0xe4a1[8]);var sox=require(_0xe4a1[9]);var tts=require(_0xe4a1[10]);var util=require(_0xe4a1[11]);var querystring=require(_0xe4a1[12]);var moment=require(_0xe4a1[13]);var AWS=require(_0xe4a1[14]);var ISPEECH_API=_0xe4a1[15];function downloadFile(_0x74f3x10,_0x74f3x11){return  new BPromise(function(_0x74f3x12,_0x74f3x13){var _0x74f3x14=urlParse(_0x74f3x10);var _0x74f3x15=_0x74f3x14[_0xe4a1[16]]=== _0xe4a1[17]?https:http;var _0x74f3x16={host:_0x74f3x14[_0xe4a1[18]],path:_0x74f3x14[_0xe4a1[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0xe4a1[19]}};_0x74f3x15[_0xe4a1[34]](_0x74f3x16,function(_0x74f3x18){if(_0x74f3x18[_0xe4a1[23]]!== 200){_0x74f3x13( new Error(_0xe4a1[24]+ _0x74f3x10+ _0xe4a1[25]+ _0x74f3x18[_0xe4a1[23]]+ _0xe4a1[26]+ _0x74f3x18[_0xe4a1[27]]+ _0xe4a1[28]));return};var _0x74f3x19=fs[_0xe4a1[29]](_0x74f3x11);_0x74f3x19[_0xe4a1[22]](_0xe4a1[30],function(){_0x74f3x19[_0xe4a1[31]](_0x74f3x12)});_0x74f3x19[_0xe4a1[22]](_0xe4a1[21],function(_0x74f3x17){fs[_0xe4a1[32]](_0x74f3x11);_0x74f3x13(_0x74f3x17)});_0x74f3x18[_0xe4a1[33]](_0x74f3x19)})[_0xe4a1[22]](_0xe4a1[21],function(_0x74f3x17){_0x74f3x13(_0x74f3x17)})[_0xe4a1[20]]()})}function uploadFile(_0x74f3x10){return  new BPromise(function(_0x74f3x12,_0x74f3x13){var _0x74f3x14=urlParse(_0x74f3x10);var _0x74f3x15=_0x74f3x14[_0xe4a1[16]]=== _0xe4a1[17]?https:http;var _0x74f3x16={host:_0x74f3x14[_0xe4a1[18]],path:_0x74f3x14[_0xe4a1[2]],headers:{"\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74":_0xe4a1[19]}};_0x74f3x15[_0xe4a1[34]](_0x74f3x16,function(_0x74f3x18){if(_0x74f3x18[_0xe4a1[23]]!== 200){_0x74f3x13( new Error(_0xe4a1[24]+ _0x74f3x10+ _0xe4a1[25]+ _0x74f3x18[_0xe4a1[23]]+ _0xe4a1[26]+ _0x74f3x18[_0xe4a1[27]]+ _0xe4a1[28]));return};var _0x74f3x1b=_0xe4a1[35];_0x74f3x18[_0xe4a1[22]](_0xe4a1[36],function(_0x74f3x1c){_0x74f3x1b+= _0x74f3x1c});_0x74f3x18[_0xe4a1[22]](_0xe4a1[20],function(){_0x74f3x12(_0x74f3x1b)})})[_0xe4a1[22]](_0xe4a1[21],function(_0x74f3x17){_0x74f3x13(_0x74f3x17)})[_0xe4a1[20]]()})}function tigerDialAPI(_0x74f3x10,_0x74f3x1e){return  new BPromise(function(_0x74f3x12,_0x74f3x13){var _0x74f3x1f=JSON[_0xe4a1[37]](_0x74f3x1e);var _0x74f3x14=urlParse(_0x74f3x10);var _0x74f3x15=_0x74f3x14[_0xe4a1[16]]=== _0xe4a1[17]?https:http;var _0x74f3x16={hostname:_0x74f3x14[_0xe4a1[38]],path:_0x74f3x14[_0xe4a1[2]],port:_0x74f3x14[_0xe4a1[39]],method:_0xe4a1[40],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xe4a1[41]}};var _0x74f3x20=_0x74f3x15[_0xe4a1[44]](_0x74f3x16,function(_0x74f3x18){if(_0x74f3x18[_0xe4a1[23]]!== 200){_0x74f3x13( new Error(_0xe4a1[24]+ _0x74f3x10+ _0xe4a1[25]+ _0x74f3x18[_0xe4a1[23]]+ _0xe4a1[26]+ _0x74f3x18[_0xe4a1[27]]+ _0xe4a1[28]));return};_0x74f3x18[_0xe4a1[43]](_0xe4a1[42]);var _0x74f3x1b=_0xe4a1[35];_0x74f3x18[_0xe4a1[22]](_0xe4a1[36],function(_0x74f3x1c){_0x74f3x1b+= _0x74f3x1c});_0x74f3x18[_0xe4a1[22]](_0xe4a1[20],function(){_0x74f3x12(_0x74f3x1b)})});_0x74f3x20[_0xe4a1[22]](_0xe4a1[21],function(_0x74f3x17){_0x74f3x13(_0x74f3x17)});_0x74f3x20[_0xe4a1[45]](_0x74f3x1f);_0x74f3x20[_0xe4a1[20]]()})}function convertFile(_0x74f3x19,_0x74f3x11){return  new BPromise(function(_0x74f3x12,_0x74f3x13){var _0x74f3x22=sox[_0xe4a1[47]](_0x74f3x19,_0x74f3x11,{sampleRate:8000,format:_0xe4a1[46],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0x74f3x22[_0xe4a1[22]](_0xe4a1[21],function(_0x74f3x17){_0x74f3x13(_0x74f3x17)});_0x74f3x22[_0xe4a1[22]](_0xe4a1[20],function(){_0x74f3x12()});_0x74f3x22[_0xe4a1[48]]()})}function pollyResult(_0x74f3x24,_0x74f3x25,_0x74f3x26){return  new BPromise(function(_0x74f3x12,_0x74f3x13){_0x74f3x24[_0xe4a1[53]](_0x74f3x25,function(_0x74f3x17,_0x74f3x27){if(_0x74f3x17){_0x74f3x13(_0x74f3x17)}else {if(_0x74f3x27){if(_0x74f3x27[_0xe4a1[49]] instanceof  Buffer){fs[_0xe4a1[50]](_0x74f3x26,_0x74f3x27.AudioStream,function(_0x74f3x17){if(_0x74f3x17){_0x74f3x13(_0x74f3x17)}else {_0x74f3x12()}})}else {_0x74f3x13( new Error(_0xe4a1[51]))}}else {_0x74f3x13( new Error(_0xe4a1[52]))}}})})}function base64Encode(_0x74f3x19){var _0x74f3x29=fs[_0xe4a1[54]](_0x74f3x19);return  new Buffer(_0x74f3x29).toString(_0xe4a1[55])}exports[_0xe4a1[56]]= function(_0x74f3x2a,_0x74f3x2b){var _0x74f3x26;var _0x74f3x2c;return tts(_0x74f3x2a,_0x74f3x2b|| _0xe4a1[65],1)[_0xe4a1[59]](function(_0x74f3x10){_0x74f3x26= path[_0xe4a1[63]](__dirname,_0xe4a1[60],rs[_0xe4a1[61]](4)+ _0xe4a1[64]);return downloadFile(_0x74f3x10,_0x74f3x26)})[_0xe4a1[59]](function(){_0x74f3x2c= path[_0xe4a1[63]](__dirname,_0xe4a1[60],rs[_0xe4a1[61]](4)+ _0xe4a1[62]);return convertFile(_0x74f3x26,_0x74f3x2c)})[_0xe4a1[59]](function(){fs[_0xe4a1[32]](_0x74f3x26);return _0x74f3x2c[_0xe4a1[58]](_0xe4a1[57])[0]})};exports[_0xe4a1[66]]= function(_0x74f3x2d,_0x74f3x2a,_0x74f3x2b,_0x74f3x2e){var _0x74f3x10=util[_0xe4a1[68]](_0xe4a1[67],ISPEECH_API,_0x74f3x2d,encodeURIComponent(_0x74f3x2a),_0x74f3x2b,_0x74f3x2e);var _0x74f3x26=path[_0xe4a1[63]](__dirname,_0xe4a1[60],rs[_0xe4a1[61]](4)+ _0xe4a1[64]);var _0x74f3x2c;return downloadFile(_0x74f3x10,_0x74f3x26)[_0xe4a1[59]](function(){_0x74f3x2c= path[_0xe4a1[63]](__dirname,_0xe4a1[60],rs[_0xe4a1[61]](4)+ _0xe4a1[62]);return convertFile(_0x74f3x26,_0x74f3x2c)})[_0xe4a1[59]](function(){fs[_0xe4a1[32]](_0x74f3x26);return _0x74f3x2c[_0xe4a1[58]](_0xe4a1[57])[0]})};exports[_0xe4a1[69]]= function(_0x74f3x2f,_0x74f3x30,_0x74f3x31,_0x74f3x32,_0x74f3x2a){var _0x74f3x33= new AWS.Polly({accessKeyId:_0x74f3x2f,secretAccessKey:_0x74f3x30,region:_0x74f3x31});var _0x74f3x25={"\x54\x65\x78\x74":_0x74f3x2a,OutputFormat:_0xe4a1[70],VoiceId:_0x74f3x32};var _0x74f3x26=path[_0xe4a1[63]](__dirname,_0xe4a1[60],rs[_0xe4a1[61]](4)+ _0xe4a1[64]);var _0x74f3x2c;return pollyResult(_0x74f3x33,_0x74f3x25,_0x74f3x26)[_0xe4a1[59]](function(){_0x74f3x2c= path[_0xe4a1[63]](__dirname,_0xe4a1[60],rs[_0xe4a1[61]](4)+ _0xe4a1[62]);return convertFile(_0x74f3x26,_0x74f3x2c)})[_0xe4a1[59]](function(){fs[_0xe4a1[32]](_0x74f3x26);return _0x74f3x2c[_0xe4a1[58]](_0xe4a1[57])[0]})};exports[_0xe4a1[71]]= function(_0x74f3x26,_0x74f3x2d,_0x74f3x2b,_0x74f3x34){var _0x74f3x10=util[_0xe4a1[68]](_0xe4a1[72],ISPEECH_API,_0x74f3x2d,_0x74f3x2b,base64Encode(_0x74f3x26),_0x74f3x34?util[_0xe4a1[68]](_0xe4a1[73],encodeURIComponent(_0x74f3x34)):_0xe4a1[74]);return uploadFile(_0x74f3x10)[_0xe4a1[59]](function(_0x74f3x18){return querystring[_0xe4a1[5]](_0x74f3x18)})};exports[_0xe4a1[75]]= function(_0x74f3x35,_0x74f3x36,_0x74f3x37,_0x74f3x38,_0x74f3x39){var _0x74f3x10=_0xe4a1[76];var _0x74f3x1e={id_list:parseInt(_0x74f3x35),name:_0x74f3x36|| _0xe4a1[35],phones:_0x74f3x37[_0xe4a1[78]]()[_0xe4a1[58]](_0xe4a1[77]),description:_0x74f3x38|| _0xe4a1[35],planningtime:moment()[_0xe4a1[81]](_0x74f3x39|| 5,_0xe4a1[80])[_0xe4a1[68]](_0xe4a1[79])};return tigerDialAPI(_0x74f3x10,_0x74f3x1e)[_0xe4a1[59]](function(_0x74f3x18){var _0x74f3x3a=JSON[_0xe4a1[5]](_0x74f3x18);if(_0x74f3x3a[_0xe4a1[82]]> 0){return true};return false})};exports[_0xe4a1[83]]= function(){return __dirname}
\ No newline at end of file