text: (window.webpackJsonpvoice_manager=window.webpackJsonpvoice_manager||[]).push([[0],{285:function(e,t,a){e.exports=a(574)},290:function(e,t,a){},546:function(e,t,a){},573:function(e,t,a){e.exports=a.p+"static/media/logo4.16f2c303.jpeg"},574:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),o=a(10),l=a.n(o);a(290),Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));var c=a(39),i=a(12),s=a(13),u=a(15),m=a(14),d=a(16),p=a(37),g=a(48),h=(a(291),a(575)),f=a(588),b=h.a.Content,y=function(e){function t(){return Object(i.a)(this,t),Object(u.a)(this,Object(m.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){return r.a.createElement(h.a,{style:{padding:"0 24px 24px"}},r.a.createElement(f.a,{style:{margin:"16px 0"}},r.a.createElement(f.a.Item,null,"\u8bed\u97f3"),r.a.createElement(f.a.Item,null,"\u97f3\u9891\u7ba1\u7406\u5de5\u5177"),r.a.createElement(f.a.Item,null,"\u7b80\u4ecb")),r.a.createElement(b,{style:{background:"#fff",padding:24,margin:0,minHeight:280}},r.a.createElement("p",null,"\u5c0f\u6210\u672c\u5236\u4f5c\uff0c\u6b22\u8fcefork star "),r.a.createElement("p",null,"\u5236\u4f5c\u4eba : \u54cd\u54e5 "),r.a.createElement("p",null,"\u5236\u4f5c\u4eba : \u9756\u65e0\u6daf"),r.a.createElement("p",null,"\u5236\u4f5c\u4eba : coffee"),r.a.createElement("p",null,"\u5236\u4f5c\u4eba : \u98ce\u6ee1\u697c")))}}]),t}(r.a.Component),v=Object(p.g)(y),E=a(88),k=a(587),O=a(590),j=a(577),w=a(580),I=a(581),C=a(589),S=a(9),x=I.a.Dragger,_=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(r)))).onChange=function(e){var t=e.file.status;if("uploading"!==t&&console.log(e.file,e.fileList),"done"===t){var n=e.file.response;0!==parseInt(n.code)?(e.file.status="error",C.a.error("".concat(e.file.name," file upload failed. (Error:")+n.msg+")")):(a.props.setVolume.setState({current:1}),localStorage.setItem("task_id",n.data),C.a.success("".concat(e.file.name," file uploaded successfully.")))}else"error"===t&&C.a.error("".concat(e.file.name," file upload failed."))},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e={name:"file",multiple:!0,action:"/voice/upload",accept:".mp3, .wav",data:{token:localStorage.getItem("user_token")}};return r.a.createElement(x,Object.assign({},e,{onChange:this.onChange}),r.a.createElement("p",{className:"ant-upload-drag-icon"},r.a.createElement(S.a,{type:"inbox"})),r.a.createElement("p",{className:"ant-upload-text"},"\u70b9\u51fb\u6216\u8005\u62d6\u62fd\u6587\u4ef6\u4e0a\u4f20"))}}]),t}(r.a.Component),T=a(36),L=a(585),P=a(592),V=function(e){function t(){return Object(i.a)(this,t),Object(u.a)(this,Object(m.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){console.log(this.props.src);var e="http://"+window.location.host+this.props.src;return r.a.createElement("audio",{controls:"controls",src:e,style:this.props.style})}}]),t}(r.a.Component),N=function(e){function t(){return Object(i.a)(this,t),Object(u.a)(this,Object(m.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement(P.a,{title:"\u97f3\u9891\u4fe1\u606f",bordered:!0,style:{textAlign:"center"},size:"small"},r.a.createElement(P.a.Item,{label:"\u6587\u4ef6\u540d"},this.props.data.org_filename),r.a.createElement(P.a.Item,{label:"\u683c\u5f0f"},this.props.data.audio_type),r.a.createElement(P.a.Item,{label:"\u97f3\u91cf\u8bbe\u7f6e"},this.props.data.volume),r.a.createElement(P.a.Item,{label:"\u91c7\u6837\u7387"},this.props.data.framerate),r.a.createElement(P.a.Item,{label:"\u58f0\u9053\u6570"},this.props.data.channels),r.a.createElement(P.a.Item,{label:"\u65f6\u957f(s)"},this.props.data.duration)),r.a.createElement(P.a,{title:"\u97f3\u9891\u5bf9\u6bd4",bordered:!0,style:{textAlign:"center",marginTop:20},size:"small",layout:"vertical"},r.a.createElement(P.a.Item,{label:"Orginal Audio"},r.a.createElement(V,{src:this.props.data.http_org_filepath})),r.a.createElement(P.a.Item,{label:"Volumed Audio"},r.a.createElement(V,{src:this.props.data.http_vol_filepath}))))}}]),t}(r.a.Component),D=a(270),A=a(59),M=a.n(A);function R(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,n)}return a}function F(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?R(a,!0).forEach(function(t){Object(D.a)(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):R(a).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var K=M.a.create({baseURL:"",timeout:5e4,withCredentials:!0,xsrfCookieName:"xsrf-token"});K.interceptors.request.use(function(e){return e.headers["Content-Type"]="application/json;charset=UTF-8","get"===e.method||"delete"===e.method?e.params=F({},e.params):("post"===e.method||e.method,e.data=F({},e.data)),e},function(e){return Promise.reject(e)}),K.interceptors.response.use(function(e){return 200!==e.status?Promise.reject(new Error("\u7f51\u7edc\u5f02\u5e38\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5")):e},function(e){return Promise.reject(e)});var U=function(e,t){return new Promise(function(a,n){K.post(e,t).then(function(e){a&&a(e.data),console.log(e)}).catch(function(e){})})},q=function(){function e(){Object(i.a)(this,e)}return Object(s.a)(e,null,[{key:"login",value:function(e){return U("/voice/login",e)}},{key:"register",value:function(e){return U("/voice/register",e)}},{key:"setVolume",value:function(e){return U("/voice/volume",e)}},{key:"deleteVoiceById",value:function(e){return U("/voice/delete",e)}},{key:"getVoiceHistory",value:function(e){return U("/voice/history",e)}},{key:"downloadVoiceById",value:function(e){}},{key:"getVoiceInfo",value:function(e){return U("/voice/params",e)}},{key:"displayTtsList",value:function(e){return U("/aligner/display",e)}}]),e}(),B=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(r)))).state={ModalText:"Content of the modal",visible:!1,confirmLoading:!1,audioInfo:null,buttonDisabled:!0},a.showModal=function(){var e={token:localStorage.getItem("user_token"),task_id:localStorage.getItem("task_id")};q.getVoiceInfo(e).then(function(e){var t=e.code;0!==parseInt(t)?C.a.error(e.msg):a.setState({visible:!0,audioInfo:e.data,buttonDisabled:!1})}).catch(function(e){console.log(e)})},a.handleOk=function(){a.setState({ModalText:"The modal will be closed after two seconds",confirmLoading:!0}),setTimeout(function(){a.setState({visible:!1,confirmLoading:!1})},2e3)},a.handleCancel=function(){console.log("Clicked cancel button"),a.setState({visible:!1})},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.state,t=e.visible;e.confirmLoading,e.ModalText;return r.a.createElement("div",null,r.a.createElement(T.a,{type:"primary",disabled:0===this.props.status&&!localStorage.getItem("task_id"),style:{marginLeft:180},onClick:this.showModal},"\u9884\u89c8"),r.a.createElement(L.a,{visible:t,onCancel:this.handleCancel,closable:!1,footer:null,maskClosable:!0,width:800,bodyStyle:{paddingTop:50},centered:!0,destroyOnClose:!0},r.a.createElement(N,{data:this.state.audioInfo})))}}]),t}(r.a.Component),H=a(96),z=a(55),W=a(583),J=a(586),Y=(a(437),function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(r)))).state={inputValue:0,buttonLoading:!1,buttonDisabled:!0},a.onChange=function(e){a.setState({inputValue:e})},a.setVolume=function(){a.setState({buttonLoading:!0});var e={token:localStorage.getItem("user_token"),task_id:localStorage.getItem("task_id"),volume:a.state.inputValue};q.setVolume(e).then(function(e){var t=e.code;0!==parseInt(t)?C.a.error(e.msg):(a.props.setVolume.setState({current:2}),C.a.success("\u8bbe\u7f6e\u6210\u529f"),console.log(e)),a.setState({buttonLoading:!1})}).catch(function(e){C.a.error("\u8bbe\u7f6e\u5931\u8d25"),a.setState({buttonLoading:!1}),console.log(e.status)})},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.state.inputValue;return console.log(this.props.status),r.a.createElement(H.a,{style:{width:400}},r.a.createElement(z.a,{span:12},r.a.createElement(W.a,{min:-20,max:20,onChange:this.onChange,value:"number"===typeof e?e:0})),r.a.createElement(z.a,{span:2},r.a.createElement(J.a,{min:-20,max:20,style:{marginLeft:16},value:e,onChange:this.onChange})),r.a.createElement(z.a,{span:3},r.a.createElement(T.a,{type:"primary",onClick:this.setVolume,style:{marginLeft:100},loading:this.state.buttonLoading,disabled:0===this.props.status&&!localStorage.getItem("task_id")},"\u786e\u5b9a")),r.a.createElement(z.a,{span:3},r.a.createElement(B,{status:this.props.status})))}}]),t}(r.a.Component)),$=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(r)))).checkStatus=function(e){if(e.status>=200&&e.status<300)return e;var t=new Error(e.statusText);throw t.response=e,t},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement(T.a,{type:"primary",shape:"round",icon:"download",size:"large",disabled:this.props.status<2,onClick:function(){return t.downLoad()}},"Download"))}}]),t}(r.a.Component);$.downLoad=function(e){console.log("jintu"),null==e&&(e={token:localStorage.getItem("user_token"),task_id:localStorage.getItem("task_id")}),q.getVoiceInfo(e).then(function(t){var a=t.code;if(0!==parseInt(a))C.a.error(t.msg);else if(t.data.vol_filepath){var n=Object.keys(e),r=Object.values(e);console.log(n,r);var o="?";n.map(function(e,t){o+=e+"="+r[t]+"&"});var l="http://"+window.location.host+"/voice/download"+o;console.log(l);var c=(new Date).getTime(),i=document.createElement("a");i.style.display="none";var s=c+".mp3";i.href=l,i.download=s,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(i),C.a.success("\u4e0b\u8f7d\u6210\u529f\uff01")}else C.a.error("\u8bf7\u5148\u8c03\u8282\u97f3\u91cf\u540e\u518d\u4e0b\u8f7d")})};var G=$,Q=a(584),X=a(579),Z=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(r)))).state={ModalText:"Content of the modal",visible:!1,confirmLoading:!1,audioInfo:null},a.showModal=function(){var e={token:localStorage.getItem("user_token"),task_id:localStorage.getItem("task_id")};q.getVoiceInfo(e).then(function(e){var t=e.code;0!==parseInt(t)?C.a.error(e.msg):a.setState({visible:!0,audioInfo:e.data})}).catch(function(e){console.log(e)})},a.handleOk=function(){a.setState({ModalText:"The modal will be closed after two seconds",confirmLoading:!0}),setTimeout(function(){a.setState({visible:!1,confirmLoading:!1})},2e3)},a.handleCancel=function(){console.log("Clicked cancel button"),a.setState({visible:!1})},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.state.visible;return r.a.createElement("div",{style:{display:"inline"}},r.a.createElement("a",{onClick:this.showModal},"Preview"),r.a.createElement(L.a,{visible:e,onCancel:this.handleCancel,closable:!1,footer:null,maskClosable:!0,width:800,bodyStyle:{paddingTop:50},centered:!0,destroyOnClose:!0},r.a.createElement(N,{data:this.state.audioInfo})))}}]),t}(r.a.Component),ee=a(576),te=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(r)))).state={recordKey:a.props.recordKey},a.confirm=function(e){console.log(e),a.Delete()},a.cancel=function(e){console.log(e),C.a.error("Click on No")},a.Delete=function(){var e={token:localStorage.getItem("user_token"),task_id:a.props.taskId};q.deleteVoiceById(e).then(function(e){var t=e.code;console.log("\u5220\u9664",t);var n=a.props.table.state.data,r=a.state.recordKey;console.log(r);for(var o=0;o<n.length;o++)if(console.log(n[o].key),n[o].key==a.props.recordKey){n.splice(o,1);break}a.props.table.setState({data:n}),C.a.success("\u5220\u9664\u6210\u529f\uff01")})},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){return r.a.createElement(ee.a,{title:"Are you sure delete this task?",icon:r.a.createElement(S.a,{type:"question-circle-o",style:{color:"red"}}),onConfirm:this.confirm,onCancel:this.cancel,okText:"Yes",cancelText:"No"},r.a.createElement("a",null,"Delete"))}}]),t}(r.a.Component),ae=(Q.a.Search,h.a.Content),ne=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(o)))).getOneAudio=function(e){localStorage.setItem("task_id",e),console.log(e)},a.state={columns:[{title:"Filename",dataIndex:"filename",key:"filename",render:function(e,t){return r.a.createElement("a",{href:"/page/changeSize",onClick:function(){return a.getOneAudio(t.id)}},e)}},{title:"Type",dataIndex:"type",key:"type"},{title:"Volume",dataIndex:"volume",key:"volume"},{title:"CreateTime",dataIndex:"createtime",key:"createtime"},{title:"Tags",key:"tags",dataIndex:"tags",render:function(e){return r.a.createElement("span",null,e.map(function(e){var t=e.length>5?"geekblue":"green";return"complete"===e&&(t="green"),"upload"===e&&(t="geekblue"),r.a.createElement(O.a,{color:t,key:e},e.toUpperCase())}))}},{title:"Action",key:"action",render:function(e,t){return r.a.createElement("span",null,r.a.createElement(Z,{taskId:t.id}),r.a.createElement(j.a,{type:"vertical"}),t.tags.map(function(e){if("complete"===e){var a={token:localStorage.getItem("user_token"),task_id:t.id};return[r.a.createElement("a",{onClick:function(){return G.downLoad(a)}},"Download"),r.a.createElement(j.a,{type:"vertical"})]}}),r.a.createElement(te,{taskId:t.id,recordKey:t.key,table:Object(E.a)(a)}))}}],data:null},a.createNew=function(){localStorage.removeItem("task_id")},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentWillMount",value:function(){var e=this,t={token:localStorage.getItem("user_token")};q.getVoiceHistory(t).then(function(t){var a=t.code;0!==parseInt(a)?(C.a.warning(t.msg),-3===parseInt(a)&&localStorage.removeItem("user_token")):e.setState({data:t.data})})}},{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement(h.a,{style:{padding:"0 24px 24px"}},r.a.createElement(f.a,{style:{margin:"16px 0"}},r.a.createElement(f.a.Item,null,"\u8bed\u97f3"),r.a.createElement(f.a.Item,null,"\u97f3\u9891\u7ba1\u7406\u5de5\u5177"),r.a.createElement(f.a.Item,null,"\u97f3\u9891\u5927\u5c0f\u8c03\u6574")),r.a.createElement(ae,{style:{background:"#fff",padding:24,margin:0,minHeight:280}},r.a.createElement(g.b,{to:"/page/changeSize"},r.a.createElement(T.a,{type:"primary",icon:"plus",style:{marginBottom:20},onClick:this.createNew},"\u65b0\u5efa\u4efb\u52a1")),r.a.createElement(X.a,{style:{width:1300},columns:this.state.columns,dataSource:this.state.data}))))}}]),t}(r.a.Component),re=k.a.Step,oe=h.a.Content,le=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(o)))).state={current:0,extra:"",columns:[{title:"Filename",dataIndex:"filename",key:"filename",render:function(e,t){return r.a.createElement("a",{href:"/page/changeSize",onClick:function(){return a.getOneAudio(t.id)}},e)}},{title:"Type",dataIndex:"type",key:"type"},{title:"Volume",dataIndex:"volume",key:"volume"},{title:"CreateTime",dataIndex:"createtime",key:"createtime"},{title:"Tags",key:"tags",dataIndex:"tags",render:function(e){return r.a.createElement("span",null,e.map(function(e){var t=e.length>5?"geekblue":"green";return"complete"===e&&(t="green"),"upload"===e&&(t="geekblue"),r.a.createElement(O.a,{color:t,key:e},e.toUpperCase())}))}},{title:"Action",key:"action",render:function(e,t){return r.a.createElement("span",null,r.a.createElement(Z,{taskId:t.id}),r.a.createElement(j.a,{type:"vertical"}),t.tags.map(function(e){if("complete"===e){var a={token:localStorage.getItem("user_token"),task_id:t.id};return[r.a.createElement("a",{onClick:function(){return G.downLoad(a)}},"Download"),r.a.createElement(j.a,{type:"vertical"})]}}),r.a.createElement(te,{taskId:t.id,recordKey:t.key,table:Object(E.a)(a)}))}}],historyData:[]},a.checkLogin=function(){return!0},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentWillMount",value:function(){}},{key:"render",value:function(){return console.log(localStorage),r.a.createElement(h.a,{style:{padding:"0 50px 24px"}},r.a.createElement(f.a,{style:{margin:"16px 0"}},r.a.createElement(f.a.Item,null,"\u8bed\u97f3"),r.a.createElement(f.a.Item,null,"\u97f3\u9891\u7ba1\u7406\u5de5\u5177"),r.a.createElement(f.a.Item,null,"\u97f3\u9891\u5927\u5c0f\u8c03\u6574")),r.a.createElement(oe,{style:{background:"#fff",padding:24,margin:0,minHeight:280}},r.a.createElement("div",null,r.a.createElement(k.a,{direction:"vertical",current:this.state.current},r.a.createElement(re,{title:"\u4e0a\u4f20\u97f3\u9891\u6587\u4ef6",description:r.a.createElement(w.a,{style:{width:800},extra:r.a.createElement("span",{onClick:this.checkLogin},this.state.extra)},r.a.createElement(_,{file:!0,setVolume:this}))}),r.a.createElement(re,{title:"\u8bbe\u7f6e\u97f3\u91cf\u5927\u5c0f",description:r.a.createElement(w.a,{style:{width:800}},r.a.createElement(Y,{setVolume:this,status:this.state.current}))}),r.a.createElement(re,{title:"\u4e0b\u8f7d\u8f6c\u6362\u7ed3\u679c",description:r.a.createElement(w.a,{style:{width:800}},r.a.createElement(G,{status:this.state.current}))})))))}}]),t}(r.a.Component),ce=a(108),ie=a(582),se=a(69),ue=a(93),me=a(92),de=a(60),pe=function(e){return{type:"SET_TOKEN",token:e}},ge=function(e){return{type:"REMOVE_TOKEN",token:e}},he=(a(546),localStorage.getItem("user_token")),fe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:he,t=arguments.length>1?arguments[1]:void 0;switch(console.log("\u8fdb\u5165reduce\uff0c\u4e0b\u9762\u662freduce\u4e2d\u7684state"),console.log(e),t.type){case"SET_TOKEN":return console.log("set token"),{token:t.token};case"REMOVE_TOKEN":return console.log("remove token"),localStorage.removeItem("user_token"),{token:t.token};default:return console.log("default"),{state:e}}},be=Object(de.b)({operation_token:fe}),ye=Object(de.c)(be),ve=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(u.a)(this,Object(m.a)(t).call(this,e))).linkRegister=function(){a.props.history.push("/register")},a.handleSubmit=function(e){e.preventDefault(),a.props.form.validateFields(function(e,t){if(!e){console.log("Received values of form: ",t);var n={username:t.username,password:t.password};q.login(n).then(function(e){var t=e.code;console.log(e),0!==parseInt(t)?C.a.error(e.msg):(C.a.success("Login Success!"),localStorage.setItem("user_token",e.data),console.log(a.props),a.props.setToken(e.data),console.log(ye.getState()),a.props.history.push("/page"))})}})},a.state={password:"",email:"",errors:{},model:"login"},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getView",value:function(){var e=this.props.form.getFieldDecorator;return r.a.createElement(ie.a,{onSubmit:this.handleSubmit,className:"login-form"},r.a.createElement(ie.a.Item,null,e("username",{rules:[{required:!0,message:"Please input your username!"}]})(r.a.createElement(Q.a,{prefix:r.a.createElement(S.a,{type:"user",style:{color:"rgba(0,0,0,.25)"}}),placeholder:"Username"}))),r.a.createElement(ie.a.Item,null,e("password",{rules:[{required:!0,message:"Please input your Password!"}]})(r.a.createElement(Q.a,{prefix:r.a.createElement(S.a,{type:"lock",style:{color:"rgba(0,0,0,.25)"}}),type:"password",placeholder:"Password"}))),r.a.createElement(ie.a.Item,null,e("remember",{valuePropName:"checked",initialValue:!0})(r.a.createElement(ue.a,null,"Remember me")),r.a.createElement("a",{className:"login-form-forgot",href:"",style:{float:"right"}},"Forgot password"),r.a.createElement(T.a,{type:"primary",htmlType:"submit",className:"login-form-button",block:!0},"Log in"),"Or ",r.a.createElement("a",{href:"",onClick:this.linkRegister},"register now!")))}},{key:"render",value:function(){return r.a.createElement("div",{className:"contain"},r.a.createElement("div",{className:"login-form"},r.a.createElement("div",{className:"login-logo"},r.a.createElement("div",{className:"login-name"},"Audio Tool")),r.a.createElement("div",null,this.getView())))}}]),t}(r.a.Component),Ee=ie.a.create()(ve),ke=Object(p.g)(Ee);var Oe=Object(me.b)(function(e){return{state:e}},function(e){return Object(de.a)({setToken:pe},e)})(ke),je=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(r)))).state={ModalText:"Content of the modal",visible:!1,confirmLoading:!1},a.showModal=function(){a.props.history.push("/login")},a.handleOk=function(){a.setState({ModalText:"The modal will be closed after two seconds",confirmLoading:!0}),setTimeout(function(){a.setState({visible:!1,confirmLoading:!1})},2e3)},a.handleCancel=function(){console.log("Clicked cancel button"),a.setState({visible:!1})},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.state,t=e.visible;e.confirmLoading,e.ModalText;return r.a.createElement("div",{style:{float:"right"}},r.a.createElement(T.a,{type:"primary",onClick:this.showModal},"\u767b\u5f55"),r.a.createElement(L.a,{visible:t,onCancel:this.handleCancel,closable:!1,footer:null,maskClosable:!0,width:450,bodyStyle:{paddingTop:50},centered:!0,destroyOnClose:!0},r.a.createElement("h1",{style:{textAlign:"center",marginBottom:50}},"Voice Manager"),r.a.createElement(Oe,{modal:this,home:this.props.home})))}}]),t}(r.a.Component),we=Object(p.g)(je),Ie=h.a.Header,Ce=h.a.Content,Se=ce.a.Option,xe=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(r)))).state={confirmDirty:!1,autoCompleteResult:[]},a.handleSubmit=function(e){e.preventDefault(),a.props.form.validateFieldsAndScroll(function(e,t){if(!e){console.log("Received values of form: ",t);var n={email:t.email,password:t.password,nickname:t.nickname,phone:t.phone,prefix:t.prefix};q.register(n).then(function(e){var t=e.code;-1===parseInt(t)?C.a.error("Register failed!"):(C.a.success("Register Success!"),localStorage.setItem("user_token",e.data),a.props.history.push("/page"))})}})},a.handleConfirmBlur=function(e){var t=e.target.value;a.setState({confirmDirty:a.state.confirmDirty||!!t})},a.compareToFirstPassword=function(e,t,n){var r=a.props.form;t&&t!==r.getFieldValue("password")?n("Two passwords that you enter is inconsistent!"):n()},a.validateToNextPassword=function(e,t,n){var r=a.props.form;t&&a.state.confirmDirty&&r.validateFields(["confirm"],{force:!0}),n()},a.handleWebsiteChange=function(e){var t;t=e?[".com",".org",".net"].map(function(t){return"".concat(e).concat(t)}):[],a.setState({autoCompleteResult:t})},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.form.getFieldDecorator,t={wrapperCol:{xs:{span:24,offset:0},sm:{span:16,offset:8}}},a=e("prefix",{initialValue:"86"})(r.a.createElement(ce.a,{style:{width:70}},r.a.createElement(Se,{value:"86"},"+86"),r.a.createElement(Se,{value:"87"},"+87")));return r.a.createElement(h.a,null,r.a.createElement(Ie,null,r.a.createElement("h1",{style:{color:"white",float:"left"}},"Voice Manager"),r.a.createElement(we,null),r.a.createElement("span",{style:{color:"white",float:"right",marginRight:10}},"\u5df2\u6709\u8d26\u53f7\uff0c\u73b0\u5728\u5c31")),r.a.createElement(Ce,{style:{background:"#fff",padding:24,marginLeft:0,minHeight:250,paddingTop:50,paddingRight:200}},r.a.createElement("div",{style:{width:550,margin:"auto"}},r.a.createElement(ie.a,Object.assign({},{labelCol:{xs:{span:24},sm:{span:8}},wrapperCol:{xs:{span:24},sm:{span:16}}},{onSubmit:this.handleSubmit}),r.a.createElement(ie.a.Item,{label:"E-mail"},e("email",{rules:[{type:"email",message:"The input is not valid E-mail!"},{required:!0,message:"Please input your E-mail!"}]})(r.a.createElement(Q.a,null))),r.a.createElement(ie.a.Item,{label:"Password",hasFeedback:!0},e("password",{rules:[{required:!0,message:"Please input your password!"},{validator:this.validateToNextPassword}]})(r.a.createElement(Q.a.Password,null))),r.a.createElement(ie.a.Item,{label:"Confirm Password",hasFeedback:!0},e("confirm",{rules:[{required:!0,message:"Please confirm your password!"},{validator:this.compareToFirstPassword}]})(r.a.createElement(Q.a.Password,{onBlur:this.handleConfirmBlur}))),r.a.createElement(ie.a.Item,{label:r.a.createElement("span",null,"Nickname\xa0",r.a.createElement(se.a,{title:"What do you want others to call you?"},r.a.createElement(S.a,{type:"question-circle-o"})))},e("nickname",{rules:[{required:!0,message:"Please input your nickname!",whitespace:!0}]})(r.a.createElement(Q.a,null))),r.a.createElement(ie.a.Item,{label:"Phone Number"},e("phone",{rules:[{required:!0,message:"Please input your phone number!"}]})(r.a.createElement(Q.a,{addonBefore:a,style:{width:"100%"}}))),r.a.createElement(ie.a.Item,t,e("agreement",{valuePropName:"checked",rules:[{required:!0,message:"Please read the agreement!"}]})(r.a.createElement(ue.a,null,"I have read the ",r.a.createElement("a",{href:"/register"},"agreement")))),r.a.createElement(ie.a.Item,t,r.a.createElement(T.a,{type:"primary",htmlType:"submit",block:!0},"Register"))))))}}]),t}(r.a.Component),_e=(ie.a.create({name:"register"})(xe),h.a.Content),Te=(r.a.Component,h.a.Content),Le=(r.a.Component,a(591)),Pe=(r.a.Component,a(95)),Ve=a(141),Ne=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(o)))).state={show:r.a.createElement(T.a,null,"\u70b9\u51fb\u9009\u62e9\u8bed\u8a00")},a.language="",a.changechinese=function(){a.language="chinese",a.props.data(a.language),a.setState({show:r.a.createElement(T.a,null,"\u4e2d\u6587")})},a.changenglish=function(){a.language="english",a.props.data(a.language),a.setState({show:r.a.createElement(T.a,null,"\u82f1\u6587")})},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=r.a.createElement(Pe.a,null,r.a.createElement(Pe.a.Item,{key:"1"},r.a.createElement(S.a,{type:"user"}),r.a.createElement(T.a,{onClick:this.changechinese},"\u4e2d\u6587")),r.a.createElement(Pe.a.Item,{key:"2"},r.a.createElement(S.a,{type:"user"}),r.a.createElement(T.a,{onClick:this.changenglish},"\u82f1\u6587")));return r.a.createElement(Ve.a,{overlay:e},this.state.show)}}]),t}(r.a.Component),De=a(282),Ae=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(r)))).state={percent:0},a.showpercent=function(){M.a.post("/aligner/percent",{id:a.props.id}).then(function(e){return a.setState({percent:e.data.data})})},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this;this.interval=setInterval(function(){return e.showpercent()},1e3)}},{key:"componentDidUpdate",value:function(e,t,a){100===this.state.percent&&clearInterval(this.interval)}},{key:"componentWillUnmount",value:function(){clearInterval(this.interval)}},{key:"render",value:function(){return r.a.createElement(De.a,{percent:this.state.percent})}}]),t}(r.a.Component),Me=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(r)))).download=function(){var e={id:a.props.id};console.log(e);var t=Object.keys(e),n=Object.values(e);console.log(t,n);var r="?";t.map(function(e,t){r+=e+"="+n[t]+"&"});var o="http://"+window.location.host+"/aligner/download"+r;console.log(o);var l=(new Date).getTime(),c=document.createElement("a");c.style.display="none";var i=l+".mp3";c.href=o,c.download=i,document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(c),C.a.success("\u4e0b\u8f7d\u6210\u529f\uff01")},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this;return r.a.createElement("a",{onClick:function(){return e.download()}}," Download ")}}]),t}(r.a.Component),Re=function(e){function t(e,a){var n;return Object(i.a)(this,t),(n=Object(u.a)(this,Object(m.a)(t).call(this,e,a))).setlanguage=function(e){n.setState({language:e})},n.columns=[{title:"\u6587\u4ef6\u540d\u79f0",dataIndex:"org_filename",key:"org_filename"},{title:"\u4e0a\u4f20\u65f6\u95f4",dataIndex:"upload_time",key:"upload_time"},{title:"\u6587\u7ae0\u8bed\u8a00",dataIndex:"language",key:"language",render:function(e,t){return n.language(e,t)}},{title:"\u5904\u7406\u72b6\u6001",dataIndex:"tags",key:"tags",render:function(e,t){return n.show(e,t)}},{title:"\u53ef\u6267\u884c\u64cd\u4f5c",key:"action",render:function(e,t){return r.a.createElement("span",null,n.begin(e,t),r.a.createElement(j.a,{type:"vertical"}),r.a.createElement(Me,{id:t.task_id}))}}],n.begin=function(e,t){return 1===n.state.actionlist[t.task_id]?(n.state.showaction[t.task_id]=r.a.createElement(Ae,{id:t.task_id}),n.state.showaction[t.task_id]):r.a.createElement("a",{icon:"play-circle",onClick:function(){return n.text(t)}}," \u5f00\u59cb\u6253\u70b9 ")},n.render=function(){var e="";return(e=n.props.data?n.props.data:n.state.data)&&(e||(e=[]),e.forEach(function(e,t){console.log(e);var a=e.task_id;""!==e.language&&(n.state.resultlist[a]=e.result),""!==e.language&&(n.state.languagelist[a]=e.language),1===e.start&&0===e.success_&&(n.state.statuslist[a]=r.a.createElement(O.a,{color:"blue"}," \u5904\u7406\u4e2d "),n.state.actionlist[a]=1),1===e.success_&&(n.state.statuslist[a]=r.a.createElement(O.a,{color:"green"}," \u6210\u529f "),n.state.actionlist[a]=1),1===e.failed&&(n.state.statuslist[a]=r.a.createElement(O.a,{color:"red"}," \u5931\u8d25 "),n.state.actionlist[a]=1)})),r.a.createElement("div",null,r.a.createElement(X.a,{columns:n.columns,dataSource:e,style:{marginTop:20}}))},n.state={data:"",res:"",language:"",languagelist:[],statuslist:[],actionlist:[],showaction:[],resultlist:[]},n}return Object(d.a)(t,e),Object(s.a)(t,[{key:"language",value:function(e,t){return void 0!==this.state.languagelist[t.task_id]?this.state.languagelist[t.task_id]:r.a.createElement(Ne,{data:this.setlanguage})}},{key:"show",value:function(e,t){return void 0===this.state.statuslist[t.task_id]?r.a.createElement(O.a,{color:"orange"}," \u672a\u5f00\u59cb "):this.state.statuslist[t.task_id]}},{key:"componentDidMount",value:function(){var e=this;q.displayTtsList({page:0}).then(function(t){var a=t.data.data;e.setState({data:a})})}},{key:"display",value:function(){var e=this;q.displayTtsList({page:0}).then(function(t){var a=t.data.data;e.setState({data:a})})}},{key:"text",value:function(e){var t=this;if("chinese"===this.state.language){var a=e.task_id,n=this.state.statuslist;n[a]=r.a.createElement(O.a,{color:"blue"}," \u5904\u7406\u4e2d ");var o=this.state.actionlist;o[a]=1;var l=this.state.languagelist;l[a]="chinese",this.setState({statuslist:n,actionlist:o,languagelist:l}),M.a.post("/aligner/chinese",{id:e.task_id}).then(function(e){return t.setState({res:e.data.data},function(){n[a]=r.a.createElement(O.a,{color:"green"},"\u6210\u529f"),t.setState({statuslist:n})})})}else if("english"===this.state.language){var c=e.task_id,i=this.state.statuslist;i[c]=r.a.createElement(O.a,{color:"blue"}," \u5904\u7406\u4e2d ");var s=this.state.actionlist;s[c]=1;var u=this.state.languagelist;u[c]="english",this.setState({statuslist:i,actionlist:s,languagelist:u}),M.a.post("/aligner/english",{id:e.task_id}).then(function(e){t.setState({res:e.data.data},function(){i[c]=r.a.createElement(O.a,{color:"green"},"\u6210\u529f"),t.setState({statuslist:i})})})}}}]),t}(r.a.Component),Fe=I.a.Dragger,Ke=h.a.Content,Ue=function(e){function t(e,a){var n;return Object(i.a)(this,t),(n=Object(u.a)(this,Object(m.a)(t).call(this,e,a))).state={data:""},n}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this,t={action:"/aligner/upload",name:"file",multiple:!0,onChange:function(t){var a=t.file.status;"uploading"!==a&&M.a.post("/aligner/display",{page:0}).then(function(t){e.setState({data:t.data.data})}),"done"===a?C.a.success("".concat(t.file.name," file uploaded successfully.")):"error"===a&&C.a.error("".concat(t.file.name," file upload failed."))}};return r.a.createElement(h.a,{style:{padding:"0 24px 24px"}},r.a.createElement(f.a,{style:{margin:"16px 0"}},r.a.createElement(f.a.Item,null,"\u8bed\u97f3"),r.a.createElement(f.a.Item,null,"\u97f3\u9891\u7ba1\u7406\u5de5\u5177"),r.a.createElement(f.a.Item,null,"\u58f0\u97f3\u6253\u70b9")),r.a.createElement(Ke,{style:{background:"#fff",padding:24,margin:0,minHeight:280}},r.a.createElement("div",null,r.a.createElement(Le.a,{message:"\u4f7f\u7528\u987b\u77e5",description:r.a.createElement("div",null,r.a.createElement("p",null,"\u5728\u5f00\u59cb\u6253\u70b9\u524d \u8bf7\u5148\u9009\u62e9\u6587\u672c\u7684\u8bed\u8a00, \u5982\u679c\u4e2d\u6587\u6587\u672c\u4f7f\u7528\u82f1\u6587\u6253\u70b9\u3002\u90a3\u4e48\u7ed3\u679c\u60e8\u4e0d\u5fcd\u7779")),type:"info",showIcon:!0,style:{width:800}}),r.a.createElement("div",{style:{width:800,marginTop:40}},r.a.createElement(Fe,t,r.a.createElement("p",{className:"ant-upload-drag-icon"},r.a.createElement(S.a,{type:"inbox"})),r.a.createElement("p",{className:"ant-upload-text"},"\u70b9\u51fb\u6216\u5c06\u6587\u4ef6\u62d6\u62fd\u5230\u6b64\u5904\u4e0a\u4f20\u6587\u4ef6"))),r.a.createElement(Re,{data:this.state.data}))))}}]),t}(r.a.Component),qe={name:"\u97f3\u9891\u7ba1\u7406\u5de5\u5177",icon:"audio",key:"main"},Be=[{path:"/",exact:!0,menu:[],component:v,sidebarName:"\u9996\u9875"},{path:"/changeVolume",exact:!0,menu:[qe],component:le,sidebarName:"\u97f3\u9891\u5927\u5c0f\u8c03\u6574"},{path:"/chineseAligner",exact:!0,menu:[qe],component:Ue,sidebarName:"AI \u6253\u70b9"},{path:"/history",exact:!0,menu:[],component:ne}].map(function(e,t){return e.path="/page"+e.path,e}),He=function(e){var t=e.component;return r.a.createElement(p.b,{path:e.path,render:function(a){return r.a.createElement(t,Object.assign({},a,{routes:e.routes}))}})},ze=(Be.map(function(e,t){return r.a.createElement(He,Object.assign({key:t},e))}),a(578)),We=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(o)))).logout=function(){a.props.removeToken("")},a.menu=r.a.createElement(Pe.a,null,r.a.createElement(Pe.a.Item,null,r.a.createElement("a",{rel:"noopener noreferrer",href:"/",onClick:a.logout},"\u9000\u51fa"))),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){return console.log("###"),console.log(this.props),console.log("###"),r.a.createElement(Ve.a,{overlay:this.menu,placement:"bottomCenter"},r.a.createElement("a",{style:{float:"right"}},r.a.createElement(ze.a,{size:"large",icon:"user",style:{backgroundColor:"#87d068"},src:""},"User")))}}]),t}(r.a.Component),Je=Object(p.g)(We);var Ye=Object(me.b)(function(e){return{state:e}},function(e){return Object(de.a)({removeToken:ge},e)})(Je),$e=h.a.Header,Ge=function(e){function t(){return Object(i.a)(this,t),Object(u.a)(this,Object(m.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){return localStorage.getItem("user_token")?r.a.createElement(Ye,null):r.a.createElement(we,{home:this}),r.a.createElement($e,{className:"header"},r.a.createElement("div",{className:"logo",style:{float:"left",marginRight:80}},r.a.createElement("img",{src:a(573),alt:"",style:{height:50}})),r.a.createElement(Pe.a,{theme:"dark",mode:"horizontal",defaultSelectedKeys:["1"],style:{lineHeight:"64px"}},r.a.createElement(Pe.a.Item,{key:"1"},r.a.createElement(g.b,{to:"/"},"Speech"))))}}]),t}(r.a.Component),Qe=(Object(p.g)(Ge),Pe.a.SubMenu),Xe=h.a.Sider,Ze=function(e){function t(e){var a;Object(i.a)(this,t),a=Object(u.a)(this,Object(m.a)(t).call(this,e));for(var n=[],r=[],o=0;o<Be.length;o++)Be[o].path===e.location.pathname&&Be[o],Be[o].menu&&(0===Be[o].menu.length&&n.push(Be[o]),1===Be[o].menu.length&&r.push(Be[o]));return a.state={menuList:n,subMenuList:r},a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){return r.a.createElement("div",null,r.a.createElement(Xe,{width:200,style:{background:"#fff"}},r.a.createElement(Pe.a,{mode:"inline",defaultOpenKeys:["sub1"],style:{height:"100%",borderRight:0}},r.a.createElement(Qe,{key:"sub1",title:r.a.createElement("span",null,r.a.createElement(S.a,{type:"audio"}),"\u97f3\u9891\u7ba1\u7406\u5de5\u5177")},this.state.subMenuList.map(function(e,t){if("main"===e.menu[0].key)return r.a.createElement(Pe.a.Item,{key:e.path},r.a.createElement(g.b,{to:e.path},r.a.createElement("span",null,e.sidebarName)),r.a.createElement("span",null,e.sidebarName))})))))}}]),t}(r.a.Component),et=(Object(p.g)(Ze),h.a.Header,h.a.Content,h.a.Footer,h.a.Sider,function(e){function t(){return Object(i.a)(this,t),Object(u.a)(this,Object(m.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){}},{key:"render",value:function(){localStorage.getItem("user_token");return r.a.createElement(g.a,null,r.a.createElement(p.d,null,r.a.createElement(p.b,{path:"/page/changeVolume",component:le}),r.a.createElement(p.b,{path:"/page/chineseAligner",component:Ue})))}}]),t}(r.a.PureComponent)),tt=Object(c.a)();l.a.render(r.a.createElement(me.a,{store:ye},r.a.createElement(et,{history:tt}),","),document.getElementById("layout")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(function(e){e.unregister()})}},[[285,1,2]]]);
  //# sourceMappingURL=main.44ab7820.chunk.js.map