(this["webpackJsonpcloudreve-frontend"]=this["webpackJsonpcloudreve-frontend"]||[]).push([[2],{102:function(e,t,a){"use strict";a.r(t),a.d(t,"setFileList",(function(){return r})),a.d(t,"setDirList",(function(){return o})),a.d(t,"setSortMethod",(function(){return i})),a.d(t,"setSideBar",(function(){return l})),a.d(t,"updateFileList",(function(){return s})),a.d(t,"changeSortMethod",(function(){return p})),a.d(t,"toggleObjectInfoSidebar",(function(){return u}));var n=a(62),r=function(e){return{type:"SET_FILE_LIST",list:e}},o=function(e){return{type:"SET_DIR_LIST",list:e}},i=function(e){return{type:"SET_SORT_METHOD",method:e}},l=function(e){return{type:"SET_SIDE_BAR",open:e}},c={sizePos:function(e,t){return e.size-t.size},sizeRes:function(e,t){return t.size-e.size},namePos:function(e,t){return e.name.localeCompare(t.name,navigator.languages[0]||navigator.language,{numeric:!0,ignorePunctuation:!0})},nameRev:function(e,t){return t.name.localeCompare(e.name,navigator.languages[0]||navigator.language,{numeric:!0,ignorePunctuation:!0})},timePos:function(e,t){return Date.parse(e.date)-Date.parse(t.date)},timeRev:function(e,t){return Date.parse(t.date)-Date.parse(e.date)}},s=function(e){return function(t,a){var n=a().viewUpdate.sortMethod,i=e.filter((function(e){return"dir"===e.type})),l=e.filter((function(e){return"file"===e.type})),s=c[n];t(o(i.sort(s))),t(r(l.sort(s)))}},p=function(e){return function(t,a){var n=a().explorer,l=n.fileList,s=n.dirList,p=c[e];t(i(e)),t(o(s.sort(p))),t(r(l.sort(p)))}},u=function(e){return function(t,a){a();e&&t(Object(n.b)()),t(l(!0))}}},11:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"c",(function(){return l}));var n=a(163),r=a.n(n),o=a(19),i="/api/v3",l=function(){return i},c=r.a.create({baseURL:l(),withCredentials:!0,crossDomain:!0});function s(e,t,a){this.code=t,this.message=e||"\u672a\u77e5\u9519\u8bef",this.message+=a?" "+a:"",this.stack=(new Error).stack}s.prototype=Object.create(Error.prototype),s.prototype.constructor=s,c.interceptors.response.use((function(e){if(e.rawData=e.data,e.data=e.data.data,void 0!==e.rawData.code&&0!==e.rawData.code&&203!==e.rawData.code)throw 401===e.rawData.code&&(o.a.signout(),window.location.href="/login"),40008===e.rawData.code&&(window.location.href="/home"),new s(e.rawData.msg,e.rawData.code,e.rawData.error);return e}),(function(e){return Promise.reject(e)})),t.b=c},126:function(e,t,a){"use strict";var n=a(9),r=a(0),o=a.n(r),i=a(394);t.a=function(e){var t=e.children,a=e.enable,l=Object(r.useState)(!1),c=Object(n.a)(l,2),s=c[0],p=c[1],u=window.scrollY,d=window.scrollY;return Object(r.useEffect)((function(){a&&window.addEventListener("scroll",(function(e){return function(e){var t=e.currentTarget;u>t.scrollY?d-t.scrollY>50&&(d=t.scrollY,p(!1)):u50&&(d=t.scrollY,p(!0)),u=t.scrollY}(e)}))}),[a]),o.a.createElement(i.a,{in:!s},t)}},129:function(e,t,a){"use strict";a.r(t),a.d(t,"initState",(function(){return o}));var n=a(10),r=a(36),o={dndSignal:!1,dndTarget:null,dndSource:null,fileList:[],dirList:[],selected:[],selectProps:{isMultiple:!1,withFolder:!1,withFile:!1},lastSelect:{file:{id:"",name:"",size:0,type:"file",date:""},index:-1},shiftSelectedIds:[],imgPreview:{first:{id:"",name:"",size:0,type:"file",date:""},other:[]},keywords:"",fileSave:!1,sideBarOpen:!1},i=function(e){var t=e.length>1,a=!1,n=!1;return e.forEach((function(e){"dir"===e.type?a=!0:"file"===e.type&&(n=!0)})),{isMultiple:t,withFolder:a,withFile:n}};t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DRAG_AND_DROP":return Object.assign({},e,{dndSignal:!e.dndSignal,dndTarget:t.target,dndSource:t.source});case"SET_FILE_LIST":return Object.assign({},e,{fileList:t.list});case"SET_DIR_LIST":return Object.assign({},e,{dirList:t.list});case"ADD_SELECTED_TARGETS":var a=[].concat(Object(r.a)(e.selected),Object(r.a)(t.targets));return Object.assign({},e,{selected:a,selectProps:i(a)});case"SET_SELECTED_TARGET":var l=t.targets;return Object.assign({},e,{selected:l,selectProps:i(l)});case"RMOVE_SELECTED_TARGETS":var c=t.fileIds,s=e.selected.filter((function(e){return!c.includes(e.id)}));return Object.assign({},e,{selected:s,selectProps:i(s)});case"REFRESH_FILE_LIST":return Object.assign({},e,{selected:[],selectProps:{isMultiple:!1,withFolder:!1,withFile:!1}});case"SEARCH_MY_FILE":return Object.assign({},e,{selected:[],selectProps:{isMultiple:!1,withFolder:!1,withFile:!1},keywords:t.keywords});case"SHOW_IMG_PREIVEW":return Object.assign({},e,{imgPreview:{first:t.first,other:e.fileList}});case"SAVE_FILE":return Object(n.a)(Object(n.a)({},e),{},{fileSave:!e.fileSave});case"SET_LAST_SELECT":var p=t.file,u=t.index;return Object(n.a)(Object(n.a)({},e),{},{lastSelect:{file:p,index:u}});case"SET_SHIFT_SELECTED_IDS":var d=t.shiftSelectedIds;return Object(n.a)(Object(n.a)({},e),{},{shiftSelectedIds:d});case"SET_NAVIGATOR":return Object(n.a)(Object(n.a)({},e),{},{selected:[],selectProps:{isMultiple:!1,withFolder:!1,withFile:!1},keywords:""});case"SET_SIDE_BAR":return Object(n.a)(Object(n.a)({},e),{},{sideBarOpen:t.open});default:return e}}},13:function(e,t,a){"use strict";var n={isHomePage:function(e){return"/home"===e},isSharePage:function(e){return e&&e.startsWith("/s/")},isAdminPage:function(e){return e&&e.startsWith("/admin")},isLoginPage:function(e){return e&&e.startsWith("/login")},isMobile:function(){return window.innerWidth<600}};t.a=n},145:function(e,t,a){"use strict";var n=a(6),r=a(0),o=a.n(r),i=a(84),l=a(93),c=a(35),s=Object(l.a)((function(e){return{loader:Object(n.a)({width:"70%",padding:40},e.breakpoints.down("md"),{width:"100%",padding:10})}})),p=function(e){return o.a.createElement(i.b,{backgroundColor:e.dark?"#333":"#f5f6f7",foregroundColor:e.dark?"#636363":"#eee",className:e.className})};t.a=function(){var e=Object(c.a)(),t=s();return o.a.createElement("div",null,o.a.createElement(p,{dark:"dark"===e.palette.type,className:t.loader}))}},178:function(e,t,a){"use strict";var n=a(6),r=a(0),o=a.n(r),i=a(93),l=a(43),c=a(337),s=a.n(c),p=a(336),u=a.n(p),d=a(8),m=a(4),h=a(64),g=a(19),f=a(27),b=a.n(f),E=Object(i.a)((function(){return{icon:{color:"rgb(255, 255, 255)",opacity:"0.54"}}}));t.a=function(e){var t=e.position,a=Object(d.e)((function(e){return e.siteConfig.theme.palette.type})),i=Object(d.d)(),c=Object(r.useCallback)((function(){return i(Object(m.N)())}),[i]),p=a&&"light"===a||!a,f=a&&"dark"===a,v=E();return o.a.createElement(h.a,{title:p?"\u5207\u6362\u5230\u6df1\u8272\u6a21\u5f0f":"\u5207\u6362\u5230\u6d45\u8272\u6a21\u5f0f",placement:"bottom"},o.a.createElement(l.a,{className:b()(Object(n.a)({},v.icon,"left"===t)),onClick:function(){g.a.SetPreference("theme_mode",p?"dark":"light"),c()},color:"inherit"},p&&o.a.createElement(u.a,null),f&&o.a.createElement(s.a,null)))}},18:function(e,t,a){"use strict";a.d(t,"r",(function(){return n})),a.d(t,"i",(function(){return r})),a.d(t,"p",(function(){return o})),a.d(t,"q",(function(){return i})),a.d(t,"a",(function(){return l})),a.d(t,"f",(function(){return c})),a.d(t,"e",(function(){return s})),a.d(t,"c",(function(){return p})),a.d(t,"d",(function(){return u})),a.d(t,"m",(function(){return d})),a.d(t,"g",(function(){return m})),a.d(t,"k",(function(){return h})),a.d(t,"n",(function(){return g})),a.d(t,"b",(function(){return f})),a.d(t,"h",(function(){return b})),a.d(t,"s",(function(){return E})),a.d(t,"o",(function(){return v})),a.d(t,"j",(function(){return O})),a.d(t,"l",(function(){return j})),a.d(t,"t",(function(){return w}));var n=function(e){if(0===e||"0"===e)return"0 B";var t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(1)+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][t]},r=function(e){return e},o=function(e,t,a){if(a){var n=new Date;n.setTime(n.getTime()+24*a*60*60*1e3)}document.cookie=e+"="+(t||"")+"; path=/"},i=function(e,t){var a=window.location.href;if(a.indexOf(e+"=")>=0){var n=a.substring(0,a.indexOf(e)),r=a.substring(a.indexOf(e));a=n+e+"="+t+(r=(r=r.substring(r.indexOf("=")+1)).indexOf("&")>=0?r.substring(r.indexOf("&")):"")}else a.indexOf("?")<0?a+="?"+e+"="+t:a+="&"+e+"="+t;a!==window.location.href&&window.history.pushState(null,null,a)},l=function(){return!window.isSharePage||(window.isSharePage?!!window.shareInfo.allowPreview||-1!==window.userInfo.uid:void 0)},c=function(e){var t=window.location.href;return-1!==t.indexOf("?"+e+"=")||-1!==t.indexOf("&"+e+"=")},s=function(e){window.document.querySelector("meta[name=theme-color]").setAttribute("content",e)};function p(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))}function u(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function d(e){var t=null!==e?e.substr(1).split("/"):this.props.path.substr(1).split("/");return"/"+t.slice(0,t.length-1).join("/")}function m(e){return"/"===e.path?e.path+e.name:e.path+"/"+e.name}function h(e){return parseInt(e,16).toString(2).padStart(8,"0")}function g(e,t){var a=t||"/";return(e=e.map((function(t,n){return n&&(t=t.replace(new RegExp("^"+a),"")),n!==e.length-1&&(t=t.replace(new RegExp(a+"$"),"")),t}))).join(a)}function f(e){var t=e.split("/");return t.pop(),""===t.join("/")?"/":t.join("/")}function b(e){return e.split("/").pop()}function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:+new Date;if(e){var t=new Date(e),a=t.getFullYear(),n=t.getMonth()+1,r=t.getDate(),o=t.getHours(),i=t.getMinutes(),l=t.getSeconds();return a+"-"+n+"-"+r+" "+o+":"+i+":"+l}return""}function v(e){for(var t="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=a.length,r=0;r=0};function w(){var e=window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(e,"px"))}},180:function(e,t,a){"use strict";a.d(t,"a",(function(){return C}));var n=a(9),r=a(0),o=a.n(r),i=a(93),l=a(43),c=a(226),s=a(135),p=a(346),u=a.n(p),d=a(347),m=a.n(d),h=a(348),g=a.n(h),f=a(349),b=a.n(f),E=a(199),v=a(8),O=a(19),j=a(4),w=a(102),y=Object(i.a)((function(e){return{sideButton:{padding:"8px",marginRight:"5px"}}})),x=["A-Z","Z-A","\u6700\u65e9","\u6700\u65b0","\u6700\u5c0f","\u6700\u5927"];function C(e){var t=e.isSmall,a=e.share,i=e.inherit,p=Object(v.d)(),d=Object(v.e)((function(e){return e.viewUpdate.explorerViewMethod})),h=Object(r.useCallback)((function(e){return p(Object(j.c)(e))}),[p]),f=Object(r.useCallback)((function(e){return p(Object(w.changeSortMethod)(e))}),[p]),C=Object(r.useCallback)((function(e){return p(Object(j.J)(e))}),[p]),k=Object(r.useState)(null),S=Object(n.a)(k,2),N=S[0],L=S[1],T=Object(r.useState)(0),R=Object(n.a)(T,2),P=R[0],F=R[1],I=function(){var e="icon"===d?"list":"list"===d?"smallIcon":"icon";O.a.SetPreference("view_method",e),h(e)},D=y();return o.a.createElement(o.a.Fragment,null,"icon"===d&&o.a.createElement(l.a,{title:"\u5217\u8868\u5c55\u793a",className:D.sideButton,onClick:I,color:i?"inherit":"default"},o.a.createElement(u.a,{fontSize:t?"small":"default"})),"list"===d&&o.a.createElement(l.a,{title:"\u5c0f\u56fe\u6807\u5c55\u793a",className:D.sideButton,onClick:I,color:i?"inherit":"default"},o.a.createElement(m.a,{fontSize:t?"small":"default"})),"smallIcon"===d&&o.a.createElement(l.a,{title:"\u5927\u56fe\u6807\u5c55\u793a",className:D.sideButton,onClick:I,color:i?"inherit":"default"},o.a.createElement(g.a,{fontSize:t?"small":"default"})),o.a.createElement(l.a,{title:"\u6392\u5e8f\u65b9\u5f0f",className:D.sideButton,onClick:function(e){L(e.currentTarget)},color:i?"inherit":"default"},o.a.createElement(b.a,{fontSize:t?"small":"default"})),o.a.createElement(c.a,{id:"sort-menu",anchorEl:N,open:Boolean(N),onClose:function(){return L(null)}},x.map((function(e,t){return o.a.createElement(s.a,{key:e,selected:t===P,onClick:function(e){return function(e,t){F(t);f({0:"namePos",1:"nameRev",2:"timePos",3:"timeRev",4:"sizePos",5:"sizeRes"}[t]),L(null)}(0,t)}},e)}))),a&&o.a.createElement(l.a,{title:"\u7531 "+a.creator.nick+" \u521b\u5efa",className:D.sideButton,onClick:function(e){return C(e.currentTarget)},style:{padding:5}},o.a.createElement(E.a,{style:{height:23,width:23},src:"/api/v3/user/avatar/"+a.creator.key+"/s"})))}},19:function(e,t,a){"use strict";var n={isAuthenticated:!1,authenticate:function(e){n.SetUser(e),n.isAuthenticated=!0},GetUser:function(){return JSON.parse(localStorage.getItem("user")||"null")},SetUser:function(e){localStorage.setItem("user",JSON.stringify(e))},Check:function(){return!!n.isAuthenticated||null!==localStorage.getItem("user")&&!n.GetUser().anonymous},signout:function(){n.isAuthenticated=!1;var e=n.GetUser();e.id=0,localStorage.setItem("user",JSON.stringify(e))},SetPreference:function(e,t){var a=JSON.parse(localStorage.getItem("user_preference")||"{}");(a=null==a?{}:a)[e]=t,localStorage.setItem("user_preference",JSON.stringify(a))},GetPreference:function(e){var t=JSON.parse(localStorage.getItem("user_preference")||"{}");return t&&t[e]?t[e]:null}};t.a=n},192:function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(6),r=a(0),o=a.n(r),i=a(93),l=a(181),c=a.n(l),s=a(373),p=a.n(s),u=a(126),d=a(13),m=a(232),h=a(64),g=a(6424),f=a(117),b=a(3),E=Object(i.a)((function(e){return{fab:{margin:0,top:"auto",right:20,bottom:20,left:"auto",zIndex:5,position:"fixed"},badge:{position:"absolute",bottom:26,top:"auto",zIndex:9999,right:7},fabProgress:{color:f.a[500],position:"absolute",top:-6,left:-6,zIndex:1},wrapper:{margin:e.spacing(1),position:"relative"},buttonSuccess:{backgroundColor:f.a[500],"&:hover":{backgroundColor:f.a[700]}}}}));function v(e){var t=E(),a=Object(b.a)(Object(n.a)({},t.buttonSuccess,"success"===e.status));return o.a.createElement(u.a,{enable:d.a.isMobile()},o.a.createElement("div",{className:t.fab},o.a.createElement("div",{className:t.wrapper},o.a.createElement(h.a,{title:"\u4fdd\u5b58",placement:"left"},o.a.createElement(m.a,{onClick:e.onClick,color:"primary",className:a,disabled:"loading"===e.status,"aria-label":"add"},"success"===e.status?o.a.createElement(p.a,null):o.a.createElement(c.a,null))),"loading"===e.status&&o.a.createElement(g.a,{size:68,className:t.fabProgress}))))}},194:function(e,t,a){"use strict";a.r(t);var n=a(6),r=a(23),o=a(24),i=a(25),l=a(26),c=a(0),s=a.n(c),p=a(8),u=a(4),d=a(72),m=a(11),h=a(6477),g=a(6501),f=a(6479),b=a(6506),E=a(6502),v=a(6486),O=a(6424),j=a(6500),w=a(7),y=a(93),x=a(197),C=Object(y.a)({avatar:{backgroundColor:x.a[100],color:x.a[600]},loadingContainer:{display:"flex"},loading:{marginTop:10,marginLeft:20}});function k(){var e=C(),t=Object(p.e)((function(e){return e.viewUpdate.modals.loading})),a=Object(p.e)((function(e){return e.viewUpdate.modals.loadingText}));return s.a.createElement(h.a,{"aria-labelledby":"simple-dialog-title",open:t},s.a.createElement(f.a,null,s.a.createElement(j.a,{className:e.loadingContainer},s.a.createElement(O.a,{color:"secondary"}),s.a.createElement("div",{className:e.loading},a))))}var S=a(9),N=Object(y.a)((function(e){return{contentFix:{padding:"10px 24px 0px 24px"},wrapper:{margin:e.spacing(1),position:"relative"},buttonProgress:{color:e.palette.secondary.light,position:"absolute",top:"50%",left:"50%",marginTop:-12,marginLeft:-12}}}));function L(e){var t=Object(c.useState)(""),a=Object(S.a)(t,2),n=a[0],r=a[1],o=Object(c.useState)(""),i=Object(S.a)(o,2),l=i[0],b=i[1],w=Object(p.d)(),y=Object(c.useCallback)((function(e,t,a,n){return w(Object(u.O)(e,t,a,n))}),[w]),x=Object(c.useCallback)((function(e){w(Object(u.E)(e))}),[w]),C=Object(c.useCallback)((function(){w(Object(u.z)())}),[w]),k=N();return s.a.createElement(h.a,{open:e.open,onClose:e.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u590d\u5236\u5230"),s.a.createElement(d.a,{presentPath:e.presentPath,selected:e.selected,onSelect:function(e){var t="/"===e.path?e.path+e.name:e.path+"/"+e.name;r(t),b(e.name)}}),""!==n&&s.a.createElement(f.a,{className:k.contentFix},s.a.createElement(j.a,null,"\u590d\u5236\u5230 ",s.a.createElement("strong",null,l))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:e.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:k.wrapper},s.a.createElement(v.a,{onClick:function(t){null!=t&&t.preventDefault(),x(!0);var a=[],r=[];"dir"===e.selected[0].type?a.push(e.selected[0].id):r.push(e.selected[0].id),m.b.post("/object/copy",{src_dir:e.selected[0].path,src:{dirs:a,items:r},dst:"//"===n?"/":n}).then((function(){e.onClose(),C(),x(!1)})).catch((function(e){y("top","right",e.message,"error"),x(!1)}))},color:"primary",disabled:""===n||e.modalsLoading},"\u786e\u5b9a",e.modalsLoading&&s.a.createElement(O.a,{size:24,className:k.buttonProgress})))))}var T=a(10),R=a(6533),P=a(397),F=a(198),I=a(54),D=a(61),M=a(55),_=a(115),A=a.n(_),U=a(368),W=a.n(U),z=a(367),B=a.n(z),G=a(392),H=a(151),V=a(6428),q=a(6411),Y=a(6412),K=a(46),J=a(76),Q=a.n(J),$=a(6421),X=a(6504),Z=a(6505),ee=a(43),te=a(6503),ae=a(6429),ne=a(64),re=a(135),oe=a(399),ie=a(190),le=a.n(ie),ce=Object(y.a)((function(e){return{widthAnimation:{},shareUrl:{minWidth:"400px"},wrapper:{margin:e.spacing(1),position:"relative"},buttonProgress:{color:e.palette.secondary.light,position:"absolute",top:"50%",left:"50%"},flexCenter:{alignItems:"center"},noFlex:{display:"block"},scoreCalc:{marginTop:10}}})),se=Q()({root:{border:"0px solid rgba(0, 0, 0, .125)",boxShadow:"none","&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&$expanded":{margin:"auto"}},expanded:{}})(V.a),pe=Q()({root:{padding:0,"&$expanded":{}},content:{margin:0,display:"initial","&$expanded":{margin:"0 0"}},expanded:{}})(q.a),ue=Q()((function(e){return{root:{padding:24,backgroundColor:e.palette.background.default}}}))(Y.a);function de(e){var t=Object(p.d)(),a=ce(),r=Object(c.useCallback)((function(e,a,n,r){return t(Object(u.O)(e,a,n,r))}),[t]),o=s.a.useState(!1),i=Object(S.a)(o,2),l=i[0],d=i[1],j=s.a.useState(""),w=Object(S.a)(j,2),y=w[0],x=w[1],C=s.a.useState({password:"",downloads:1,expires:86400,showPassword:!1}),k=Object(S.a)(C,2),N=k[0],L=k[1],_=s.a.useState({password:!1,expire:!1,preview:!0}),U=Object(S.a)(_,2),z=U[0],V=U[1],q=function(e){return function(t){"password"===e&&(""===t.target.value?V(Object(T.a)(Object(T.a)({},z),{},{password:!1})):V(Object(T.a)(Object(T.a)({},z),{},{password:!0}))),L(Object(T.a)(Object(T.a)({},N),{},Object(n.a)({},e,t.target.value)))}},Y=function(e){return function(t,a){d(!!a&&e)}},J=function(e){return function(){z[e]||Y(e)(null,!0),"password"===e&&z[e]&&L(Object(T.a)(Object(T.a)({},N),{},{password:""})),V(Object(T.a)(Object(T.a)({},z),{},Object(n.a)({},e,!z[e])))}},Q=function(){e.onClose(),setTimeout((function(){x("")}),500)};return s.a.createElement(h.a,{open:e.open,onClose:Q,"aria-labelledby":"form-dialog-title",className:a.widthAnimation,maxWidth:"xs",fullWidth:!0},s.a.createElement(g.a,{id:"form-dialog-title"},"\u521b\u5efa\u5206\u4eab\u94fe\u63a5"),""===y&&s.a.createElement(s.a.Fragment,null,s.a.createElement(H.a,null),s.a.createElement(F.a,null,s.a.createElement(se,{expanded:"password"===l,onChange:Y("password")},s.a.createElement(pe,{"aria-controls":"panel1a-content",id:"panel1a-header"},s.a.createElement(D.a,{button:!0},s.a.createElement(M.a,null,s.a.createElement(A.a,null)),s.a.createElement(I.a,{primary:"\u4f7f\u7528\u5bc6\u7801\u4fdd\u62a4"}),s.a.createElement(G.a,null,s.a.createElement(R.a,{checked:z.password,onChange:J("password")})))),s.a.createElement(ue,null,s.a.createElement(P.a,{variant:"outlined",color:"secondary",fullWidth:!0},s.a.createElement($.a,{htmlFor:"filled-adornment-password"},"\u5206\u4eab\u5bc6\u7801"),s.a.createElement(ae.a,{fullWidth:!0,id:"outlined-adornment-password",type:N.showPassword?"text":"password",value:N.password,onChange:q("password"),endAdornment:s.a.createElement(te.a,{position:"end"},s.a.createElement(ne.a,{title:"\u968f\u673a\u751f\u6210"},s.a.createElement(ee.a,{"aria-label":"toggle password visibility",onClick:function(){V(Object(T.a)(Object(T.a)({},z),{},{password:!0})),L(Object(T.a)(Object(T.a)({},N),{},{password:Math.random().toString(36).substr(2).slice(2,8),showPassword:!0}))},edge:"end"},s.a.createElement(B.a,null))),s.a.createElement(ee.a,{"aria-label":"toggle password visibility",onClick:function(){L(Object(T.a)(Object(T.a)({},N),{},{showPassword:!N.showPassword}))},onMouseDown:function(e){e.preventDefault()},edge:"end"},s.a.createElement(le.a,{on:N.showPassword,onIcon:s.a.createElement(X.a,null),offIcon:s.a.createElement(Z.a,null)}))),labelWidth:70})))),s.a.createElement(se,{expanded:"expire"===l,onChange:Y("expire")},s.a.createElement(pe,{"aria-controls":"panel1a-content",id:"panel1a-header"},s.a.createElement(D.a,{button:!0},s.a.createElement(M.a,null,s.a.createElement(W.a,null)),s.a.createElement(I.a,{primary:"\u81ea\u52a8\u8fc7\u671f"}),s.a.createElement(G.a,null,s.a.createElement(R.a,{checked:z.expire,onChange:J("expire")})))),s.a.createElement(ue,{className:a.flexCenter},s.a.createElement(P.a,{style:{marginRight:10}},s.a.createElement(oe.a,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:N.downloads,onChange:q("downloads")},s.a.createElement(re.a,{value:1},"1 \u6b21\u4e0b\u8f7d"),s.a.createElement(re.a,{value:2},"2 \u6b21\u4e0b\u8f7d"),s.a.createElement(re.a,{value:3},"3 \u6b21\u4e0b\u8f7d"),s.a.createElement(re.a,{value:4},"4 \u6b21\u4e0b\u8f7d"),s.a.createElement(re.a,{value:5},"5 \u6b21\u4e0b\u8f7d"),s.a.createElement(re.a,{value:20},"20 \u6b21\u4e0b\u8f7d"),s.a.createElement(re.a,{value:50},"50 \u6b21\u4e0b\u8f7d"),s.a.createElement(re.a,{value:100},"100 \u6b21\u4e0b\u8f7d"))),s.a.createElement(K.a,null,"\u6216\u8005"),s.a.createElement(P.a,{style:{marginRight:10,marginLeft:10}},s.a.createElement(oe.a,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:N.expires,onChange:q("expires")},s.a.createElement(re.a,{value:300},"5 \u5206\u949f"),s.a.createElement(re.a,{value:3600},"1 \u5c0f\u65f6"),s.a.createElement(re.a,{value:86400},"1 \u5929"),s.a.createElement(re.a,{value:604800},"7 \u5929"),s.a.createElement(re.a,{value:2592e3},"30 \u5929"))),s.a.createElement(K.a,null,"\u540e\u8fc7\u671f"))),s.a.createElement(se,{expanded:"preview"===l,onChange:Y("preview")},s.a.createElement(pe,{"aria-controls":"panel1a-content",id:"panel1a-header"},s.a.createElement(D.a,{button:!0},s.a.createElement(M.a,null,s.a.createElement(A.a,null)),s.a.createElement(I.a,{primary:"\u5141\u8bb8\u9884\u89c8"}),s.a.createElement(G.a,null,s.a.createElement(R.a,{checked:z.preview,onChange:J("preview")})))),s.a.createElement(ue,null,s.a.createElement(K.a,null,"\u662f\u5426\u5141\u8bb8\u5728\u5206\u4eab\u9875\u9762\u9884\u89c8\u6587\u4ef6\u5185\u5bb9")))),s.a.createElement(H.a,null)),""!==y&&s.a.createElement(f.a,null,s.a.createElement(b.a,{onFocus:function(e){return e.target.select()},autoFocus:!0,inputProps:{readonly:!0},label:"\u5206\u4eab\u94fe\u63a5",value:y,variant:"outlined",fullWidth:!0})),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:Q},"\u5173\u95ed"),""===y&&s.a.createElement("div",{className:a.wrapper},s.a.createElement(v.a,{onClick:function(t){t.preventDefault(),e.setModalsLoading(!0);var a={id:e.selected[0].id,is_dir:"dir"===e.selected[0].type,password:N.password,downloads:z.expire?N.downloads:-1,expire:N.expires,preview:z.preview};m.b.post("/share",a).then((function(t){x(t.data),L({password:"",downloads:1,expires:86400,showPassword:!1}),V({password:!1,expire:!1}),e.setModalsLoading(!1)})).catch((function(t){r("top","right",t.message,"error"),e.setModalsLoading(!1)}))},color:"secondary",disabled:e.modalsLoading},"\u521b\u5efa\u5206\u4eab\u94fe\u63a5",e.modalsLoading&&s.a.createElement(O.a,{size:24,className:a.buttonProgress})))))}var me=a(20),he=a(13),ge=a(18),fe=Object(y.a)((function(e){return{contentFix:{padding:"10px 24px 0px 24px"},wrapper:{margin:e.spacing(1),position:"relative"},buttonProgress:{color:e.palette.secondary.light,position:"absolute",top:"50%",left:"50%",marginTop:-12,marginLeft:-12}}}));function be(e){var t=Object(c.useState)(""),a=Object(S.a)(t,2),n=a[0],r=a[1],o=Object(c.useState)(""),i=Object(S.a)(o,2),l=i[0],b=i[1],w=Object(p.d)(),y=Object(c.useCallback)((function(e,t,a,n){return w(Object(u.O)(e,t,a,n))}),[w]),x=Object(c.useCallback)((function(e){w(Object(u.E)(e))}),[w]),C=fe();return s.a.createElement(h.a,{open:e.open,onClose:e.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u89e3\u538b\u9001\u81f3"),s.a.createElement(d.a,{presentPath:e.presentPath,selected:e.selected,onSelect:function(e){var t="/"===e.path?e.path+e.name:e.path+"/"+e.name;r(t),b(e.name)}}),""!==n&&s.a.createElement(f.a,{className:C.contentFix},s.a.createElement(j.a,null,"\u89e3\u538b\u9001\u81f3 ",s.a.createElement("strong",null,l))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:e.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:C.wrapper},s.a.createElement(v.a,{onClick:function(t){null!=t&&t.preventDefault(),x(!0),m.b.post("/file/decompress",{src:Object(ge.g)(e.selected[0]),dst:"//"===n?"/":n}).then((function(){e.onClose(),y("top","right","\u89e3\u538b\u7f29\u4efb\u52a1\u5df2\u521b\u5efa","success"),x(!1)})).catch((function(e){y("top","right",e.message,"error"),x(!1)}))},color:"primary",disabled:""===n||e.modalsLoading},"\u786e\u5b9a",e.modalsLoading&&s.a.createElement(O.a,{size:24,className:C.buttonProgress})))))}var Ee=Object(y.a)((function(e){return{contentFix:{padding:"10px 24px 0px 24px",backgroundColor:e.palette.background.default},wrapper:{margin:e.spacing(1),position:"relative"},buttonProgress:{color:e.palette.secondary.light,position:"absolute",top:"50%",left:"50%",marginTop:-12,marginLeft:-12}}}));function ve(e){var t=Object(c.useState)(""),a=Object(S.a)(t,2),n=a[0],r=a[1],o=Object(c.useState)(""),i=Object(S.a)(o,2),l=i[0],w=i[1],y=Object(c.useState)(""),x=Object(S.a)(y,2),C=(x[0],x[1]),k=Object(p.d)(),N=Object(c.useCallback)((function(e,t,a,n){return k(Object(u.O)(e,t,a,n))}),[k]),L=Object(c.useCallback)((function(e){k(Object(u.E)(e))}),[k]),T=Ee();return s.a.createElement(h.a,{open:e.open,onClose:e.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u5b58\u653e\u5230"),s.a.createElement(d.a,{presentPath:e.presentPath,selected:e.selected,onSelect:function(e){var t="/"===e.path?e.path+e.name:e.path+"/"+e.name;r(t),C(e.name)}}),""!==n&&s.a.createElement(f.a,{className:T.contentFix},s.a.createElement(j.a,null,s.a.createElement(b.a,{onChange:function(e){return w(e.target.value)},value:l,fullWidth:!0,autoFocus:!0,id:"standard-basic",label:"\u538b\u7f29\u6587\u4ef6\u540d"}))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:e.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:T.wrapper},s.a.createElement(v.a,{onClick:function(t){null!=t&&t.preventDefault(),L(!0);var a=[],r=[];e.selected.map((function(e){"dir"===e.type?a.push(e.id):r.push(e.id)})),m.b.post("/file/compress",{src:{dirs:a,items:r},name:l,dst:"//"===n?"/":n}).then((function(){e.onClose(),N("top","right","\u538b\u7f29\u4efb\u52a1\u5df2\u521b\u5efa","success"),L(!1)})).catch((function(e){N("top","right",e.message,"error"),L(!1)}))},color:"primary",disabled:""===n||""===l||e.modalsLoading},"\u786e\u5b9a",e.modalsLoading&&s.a.createElement(O.a,{size:24,className:T.buttonProgress})))))}var Oe=function(e){Object(i.a)(a,e);var t=Object(l.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,i=new Array(o),l=0;l0)return void e.scoreHandler(e.archiveDownload);e.archiveDownload()}else if("\u83b7\u53d6\u4e0b\u8f7d\u5730\u5740..."===t.loadingText){if(he.a.isSharePage(e.props.location.pathname)&&e.props.share&&e.props.share.score>0)return void e.scoreHandler(e.Download);e.Download()}}else e.dragMove(t.dndSource,t.dndTarget)},e.scoreHandler=function(e){e()},e.Download=function(){var t="";if(e.props.selected[0].key){var a="/"===e.props.selected[0].path?e.props.selected[0].path+e.props.selected[0].name:e.props.selected[0].path+"/"+e.props.selected[0].name;t="/share/download/"+e.props.selected[0].key+"?path="+encodeURIComponent(a)}else t="/file/download/"+e.props.selected[0].id;m.b.put(t).then((function(t){window.location.assign(t.data),e.onClose(),e.downloaded=!0})).catch((function(t){e.props.toggleSnackbar("top","right",t.message,"error"),e.onClose()}))},e.archiveDownload=function(){var t=[],a=[];e.props.selected.map((function(e){return"dir"===e.type?t.push(e.id):a.push(e.id),null}));var n="/file/archive",r={items:a,dirs:t};he.a.isSharePage(e.props.location.pathname)&&(n="/share/archive/"+window.shareInfo.key,r.path=e.props.selected[0].path),m.b.post(n,r).then((function(t){0===t.rawData.code?(e.onClose(),window.location.assign(t.data)):e.props.toggleSnackbar("top","right",t.rawData.msg,"warning"),e.onClose(),e.props.refreshStorage()})).catch((function(t){e.props.toggleSnackbar("top","right",t.message,"error"),e.onClose()}))},e.submitRemove=function(t){t.preventDefault(),e.props.setModalsLoading(!0);var a=[],n=[];e.props.selected.map((function(e){"dir"===e.type?a.push(e.id):n.push(e.id)})),m.b.delete("/object",{data:{items:n,dirs:a}}).then((function(t){0===t.rawData.code?(e.onClose(),setTimeout(e.props.refreshFileList,500)):e.props.toggleSnackbar("top","right",t.rawData.msg,"warning"),e.props.setModalsLoading(!1),e.props.refreshStorage()})).catch((function(t){e.props.toggleSnackbar("top","right",t.message,"error"),e.props.setModalsLoading(!1)}))},e.submitMove=function(t){null!=t&&t.preventDefault(),e.props.setModalsLoading(!0);var a=[],n=[];e.props.selected.map((function(e){"dir"===e.type?a.push(e.id):n.push(e.id)})),m.b.patch("/object",{action:"move",src_dir:e.props.selected[0].path,src:{dirs:a,items:n},dst:e.DragSelectedPath?e.DragSelectedPath:"//"===e.state.selectedPath?"/":e.state.selectedPath}).then((function(){e.onClose(),e.props.refreshFileList(),e.props.setModalsLoading(!1)})).catch((function(t){e.props.toggleSnackbar("top","right",t.message,"error"),e.props.setModalsLoading(!1)})).then((function(){e.props.closeAllModals()}))},e.dragMove=function(t,a){0===e.props.selected.length&&(e.props.selected[0]=t);var n=!0;e.props.selected.map((function(e){(e.id!==a.id||e.type!==a.type)&&e.path!==a.path+("/"===a.path?"":"/")+a.name||(n=!1)})),n&&(e.DragSelectedPath="/"===a.path?a.path+a.name:a.path+"/"+a.name,e.props.openLoadingDialog("\u5904\u7406\u4e2d..."),e.submitMove())},e.submitRename=function(t){t.preventDefault(),e.props.setModalsLoading(!0);var a=e.state.newName,n={dirs:[],items:[]};"dir"===e.props.selected[0].type?n.dirs[0]=e.props.selected[0].id:n.items[0]=e.props.selected[0].id,-1!==e.props.dirList.findIndex((function(e){return e.name===a}))||-1!==e.props.fileList.findIndex((function(e){return e.name===a}))?(e.props.toggleSnackbar("top","right","\u65b0\u540d\u79f0\u4e0e\u5df2\u6709\u6587\u4ef6\u91cd\u590d","warning"),e.props.setModalsLoading(!1)):m.b.post("/object/rename",{action:"rename",src:n,new_name:a}).then((function(){e.onClose(),e.props.refreshFileList(),e.props.setModalsLoading(!1)})).catch((function(t){e.props.toggleSnackbar("top","right",t.message,"error"),e.props.setModalsLoading(!1)}))},e.submitCreateNewFolder=function(t){t.preventDefault(),e.props.setModalsLoading(!0),-1!==e.props.dirList.findIndex((function(t){return t.name===e.state.newFolderName}))?(e.props.toggleSnackbar("top","right","\u6587\u4ef6\u5939\u540d\u79f0\u91cd\u590d","warning"),e.props.setModalsLoading(!1)):m.b.put("/directory",{path:("/"===e.props.path?"":e.props.path)+"/"+e.state.newFolderName}).then((function(){e.onClose(),e.props.refreshFileList(),e.props.setModalsLoading(!1)})).catch((function(t){e.props.setModalsLoading(!1),e.props.toggleSnackbar("top","right",t.message,"error")}))},e.submitCreateNewFile=function(t){t.preventDefault(),e.props.setModalsLoading(!0),-1!==e.props.dirList.findIndex((function(t){return t.name===e.state.newFileName}))?(e.props.toggleSnackbar("top","right","\u6587\u4ef6\u540d\u79f0\u91cd\u590d","warning"),e.props.setModalsLoading(!1)):m.b.post("/file/create",{path:("/"===e.props.path?"":e.props.path)+"/"+e.state.newFileName}).then((function(){e.onClose(),e.props.refreshFileList(),e.props.setModalsLoading(!1)})).catch((function(t){e.props.setModalsLoading(!1),e.props.toggleSnackbar("top","right",t.message,"error")}))},e.submitTorrentDownload=function(t){t.preventDefault(),e.props.setModalsLoading(!0),m.b.post("/aria2/torrent/"+e.props.selected[0].id,{dst:"//"===e.state.selectedPath?"/":e.state.selectedPath}).then((function(){e.props.toggleSnackbar("top","right","\u4efb\u52a1\u5df2\u521b\u5efa","success"),e.onClose(),e.props.setModalsLoading(!1)})).catch((function(t){e.props.toggleSnackbar("top","right",t.message,"error"),e.props.setModalsLoading(!1)}))},e.submitDownload=function(t){t.preventDefault(),e.props.setModalsLoading(!0),m.b.post("/aria2/url",{url:e.state.downloadURL,dst:"//"===e.state.selectedPath?"/":e.state.selectedPath}).then((function(){e.props.toggleSnackbar("top","right","\u4efb\u52a1\u5df2\u521b\u5efa","success"),e.onClose(),e.props.setModalsLoading(!1)})).catch((function(t){e.props.toggleSnackbar("top","right",t.message,"error"),e.props.setModalsLoading(!1)}))},e.setMoveTarget=function(t){var a="/"===t.path?t.path+t.name:t.path+"/"+t.name;e.setState({selectedPath:a,selectedPathName:t.name})},e.remoteDownloadNext=function(){e.props.closeAllModals(),e.setState({remoteDownloadPathSelect:!0})},e.onClose=function(){e.setState({newFolderName:"",newFileName:"",newName:"",selectedPath:"",selectedPathName:"",secretShare:!1,sharePwd:"",downloadURL:"",shareUrl:"",remoteDownloadPathSelect:!1,source:""}),e.newNameSuffix="",e.props.closeAllModals()},e.handleChange=function(t){return function(a){e.setState(Object(n.a)({},t,a.target.checked))}},e}return Object(o.a)(a,[{key:"render",value:function(){var e=this,t=this.props.classes;return s.a.createElement("div",null,s.a.createElement(k,null),s.a.createElement(h.a,{open:this.props.modalsStatus.getSource,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u83b7\u53d6\u6587\u4ef6\u5916\u94fe"),s.a.createElement(f.a,null,s.a.createElement("form",{onSubmit:this.submitCreateNewFolder},s.a.createElement(b.a,{autoFocus:!0,margin:"dense",id:"newFolderName",label:"\u5916\u94fe\u5730\u5740",type:"text",value:this.state.source,fullWidth:!0}))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:this.onClose},"\u5173\u95ed"))),s.a.createElement(h.a,{open:this.props.modalsStatus.createNewFolder,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u65b0\u5efa\u6587\u4ef6\u5939"),s.a.createElement(f.a,null,s.a.createElement("form",{onSubmit:this.submitCreateNewFolder},s.a.createElement(b.a,{autoFocus:!0,margin:"dense",id:"newFolderName",label:"\u6587\u4ef6\u5939\u540d\u79f0",type:"text",value:this.state.newFolderName,onChange:function(t){return e.handleInputChange(t)},fullWidth:!0}))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(v.a,{onClick:this.submitCreateNewFolder,color:"primary",disabled:""===this.state.newFolderName||this.props.modalsLoading},"\u521b\u5efa",this.props.modalsLoading&&s.a.createElement(O.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(h.a,{open:this.props.modalsStatus.createNewFile,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u65b0\u5efa\u6587\u4ef6"),s.a.createElement(f.a,null,s.a.createElement("form",{onSubmit:this.submitCreateNewFile},s.a.createElement(b.a,{autoFocus:!0,margin:"dense",id:"newFileName",label:"\u6587\u4ef6\u540d\u79f0",type:"text",value:this.state.newFileName,onChange:function(t){return e.handleInputChange(t)},fullWidth:!0}))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(v.a,{onClick:this.submitCreateNewFile,color:"primary",disabled:""===this.state.newFileName||this.props.modalsLoading},"\u521b\u5efa",this.props.modalsLoading&&s.a.createElement(O.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(h.a,{open:this.props.modalsStatus.rename,onClose:this.onClose,"aria-labelledby":"form-dialog-title",maxWidth:"sm",fullWidth:!0},s.a.createElement(g.a,{id:"form-dialog-title"},"\u91cd\u547d\u540d"),s.a.createElement(f.a,null,s.a.createElement(j.a,null,"\u8f93\u5165"," ",s.a.createElement("strong",null,1===this.props.selected.length?this.props.selected[0].name:"")," ","\u7684\u65b0\u540d\u79f0\uff1a"),s.a.createElement("form",{onSubmit:this.submitRename},s.a.createElement(b.a,{autoFocus:!0,margin:"dense",id:"newName",label:"\u65b0\u540d\u79f0",type:"text",value:this.state.newName,onChange:function(t){return e.handleInputChange(t)},fullWidth:!0}))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(v.a,{onClick:this.submitRename,color:"primary",disabled:""===this.state.newName||this.props.modalsLoading},"\u786e\u5b9a",this.props.modalsLoading&&s.a.createElement(O.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(L,{open:this.props.modalsStatus.copy,onClose:this.onClose,presentPath:this.props.path,selected:this.props.selected,modalsLoading:this.props.modalsLoading}),s.a.createElement(h.a,{open:this.props.modalsStatus.move,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u79fb\u52a8\u81f3"),s.a.createElement(d.a,{presentPath:this.props.path,selected:this.props.selected,onSelect:this.setMoveTarget}),""!==this.state.selectedPath&&s.a.createElement(f.a,{className:t.contentFix},s.a.createElement(j.a,null,"\u79fb\u52a8\u81f3"," ",s.a.createElement("strong",null,this.state.selectedPathName))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(v.a,{onClick:this.submitMove,color:"primary",disabled:""===this.state.selectedPath||this.props.modalsLoading},"\u786e\u5b9a",this.props.modalsLoading&&s.a.createElement(O.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(h.a,{open:this.props.modalsStatus.remove,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u5220\u9664\u5bf9\u8c61"),s.a.createElement(f.a,null,s.a.createElement(j.a,null,"\u786e\u5b9a\u8981\u5220\u9664",1===this.props.selected.length&&s.a.createElement("strong",null," ",this.props.selected[0].name," "),this.props.selected.length>1&&s.a.createElement("span",null,"\u8fd9",this.props.selected.length,"\u4e2a\u5bf9\u8c61"),"\u5417\uff1f")),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(v.a,{onClick:this.submitRemove,color:"primary",disabled:this.props.modalsLoading},"\u786e\u5b9a",this.props.modalsLoading&&s.a.createElement(O.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(de,{open:this.props.modalsStatus.share,onClose:this.onClose,modalsLoading:this.props.modalsLoading,setModalsLoading:this.props.setModalsLoading,selected:this.props.selected}),s.a.createElement(h.a,{open:this.props.modalsStatus.music,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u97f3\u9891\u64ad\u653e"),s.a.createElement(f.a,null,s.a.createElement(j.a,null,0!==this.props.selected.length&&s.a.createElement("audio",{controls:!0,src:he.a.isSharePage(this.props.location.pathname)?m.a+"/share/preview/"+this.props.selected[0].key+(this.props.selected[0].key?"?path="+encodeURIComponent("/"===this.props.selected[0].path?this.props.selected[0].path+this.props.selected[0].name:this.props.selected[0].path+"/"+this.props.selected[0].name):""):m.a+"/file/preview/"+this.props.selected[0].id}))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:this.onClose},"\u5173\u95ed"))),s.a.createElement(h.a,{open:this.props.modalsStatus.remoteDownload,onClose:this.onClose,"aria-labelledby":"form-dialog-title",fullWidth:!0},s.a.createElement(g.a,{id:"form-dialog-title"},"\u65b0\u5efa\u79bb\u7ebf\u4e0b\u8f7d\u4efb\u52a1"),s.a.createElement(f.a,null,s.a.createElement(j.a,null,s.a.createElement(b.a,{label:"\u6587\u4ef6\u5730\u5740",autoFocus:!0,fullWidth:!0,id:"downloadURL",onChange:this.handleInputChange,placeholder:"\u8f93\u5165\u6587\u4ef6\u4e0b\u8f7d\u5730\u5740\uff0c\u652f\u6301 HTTP(s)/FTP/\u78c1\u529b\u94fe"}))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:this.onClose},"\u5173\u95ed"),s.a.createElement(v.a,{onClick:this.remoteDownloadNext,color:"primary",disabled:this.props.modalsLoading||""===this.state.downloadURL},"\u4e0b\u4e00\u6b65"))),s.a.createElement(h.a,{open:this.state.remoteDownloadPathSelect,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u9009\u62e9\u5b58\u50a8\u4f4d\u7f6e"),s.a.createElement(d.a,{presentPath:this.props.path,selected:this.props.selected,onSelect:this.setMoveTarget}),""!==this.state.selectedPath&&s.a.createElement(f.a,{className:t.contentFix},s.a.createElement(j.a,null,"\u4e0b\u8f7d\u81f3"," ",s.a.createElement("strong",null,this.state.selectedPathName))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(v.a,{onClick:this.submitDownload,color:"primary",disabled:""===this.state.selectedPath||this.props.modalsLoading},"\u521b\u5efa\u4efb\u52a1",this.props.modalsLoading&&s.a.createElement(O.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(h.a,{open:this.props.modalsStatus.torrentDownload,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(g.a,{id:"form-dialog-title"},"\u9009\u62e9\u5b58\u50a8\u4f4d\u7f6e"),s.a.createElement(d.a,{presentPath:this.props.path,selected:this.props.selected,onSelect:this.setMoveTarget}),""!==this.state.selectedPath&&s.a.createElement(f.a,{className:t.contentFix},s.a.createElement(j.a,null,"\u4e0b\u8f7d\u81f3"," ",s.a.createElement("strong",null,this.state.selectedPathName))),s.a.createElement(E.a,null,s.a.createElement(v.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(v.a,{onClick:this.submitTorrentDownload,color:"primary",disabled:""===this.state.selectedPath||this.props.modalsLoading},"\u521b\u5efa\u4efb\u52a1",this.props.modalsLoading&&s.a.createElement(O.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(be,{open:this.props.modalsStatus.decompress,onClose:this.onClose,presentPath:this.props.path,selected:this.props.selected,modalsLoading:this.props.modalsLoading}),s.a.createElement(ve,{open:this.props.modalsStatus.compress,onClose:this.onClose,presentPath:this.props.path,selected:this.props.selected,modalsLoading:this.props.modalsLoading}))}}]),a}(c.Component),je=Object(p.c)((function(e){return{path:e.navigator.path,selected:e.explorer.selected,modalsStatus:e.viewUpdate.modals,modalsLoading:e.viewUpdate.modalsLoading,dirList:e.explorer.dirList,fileList:e.explorer.fileList,dndSignale:e.explorer.dndSignal,dndTarget:e.explorer.dndTarget,dndSource:e.explorer.dndSource,loading:e.viewUpdate.modals.loading,loadingText:e.viewUpdate.modals.loadingText}}),(function(e){return{closeAllModals:function(){e(Object(u.d)())},toggleSnackbar:function(t,a,n,r){e(Object(u.O)(t,a,n,r))},setModalsLoading:function(t){e(Object(u.E)(t))},refreshFileList:function(){e(Object(u.z)())},refreshStorage:function(){e(Object(u.A)())},openLoadingDialog:function(t){e(Object(u.p)(t))}}}))(Object(w.a)((function(e){return{wrapper:{margin:e.spacing(1),position:"relative"},buttonProgress:{color:e.palette.secondary.light,position:"absolute",top:"50%",left:"50%",marginTop:-12,marginLeft:-12},contentFix:{padding:"10px 24px 0px 24px"}}}))(Object(me.j)(Oe)));t.default=je},228:function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return y}));var n=a(118),r=a.n(n),o=a(185),i=a(9),l=a(6),c=a(0),s=a.n(c),p=a(95),u=a(93),d=a(20),m=a(11),h=a(8),g=a(4),f=a(62),b=a(310),E=a.n(b),v=a(192),O=a(13),j=a(145),w=Object(u.a)((function(e){var t;return{layout:(t={width:"auto",marginTop:"30px",marginLeft:e.spacing(3),marginRight:e.spacing(3)},Object(l.a)(t,e.breakpoints.up(1100+2*e.spacing(3)),{width:1100,marginLeft:"auto",marginRight:"auto"}),Object(l.a)(t,"marginBottom",50),t),player:{borderRadius:"4px"},root:{backgroundColor:"white",borderRadius:"8px"},"@global":{".for-toolbar":{overflowX:"auto!important"}}}}));function y(){var t=Object(c.useState)(""),a=Object(i.a)(t,2),n=a[0],l=a[1],u=Object(c.useState)(""),b=Object(i.a)(u,2),y=b[0],x=b[1],C=Object(c.useState)(!0),k=Object(i.a)(C,2),S=k[0],N=k[1],L=Object(d.i)(),T=s.a.createRef(),R=Object(d.g)(),P=new URLSearchParams(Object(d.g)().search),F=Object(d.h)().id,I=Object(h.d)(),D=Object(c.useCallback)((function(e){return I(Object(f.a)(e))}),[I]),M=Object(c.useCallback)((function(e,t,a,n){return I(Object(g.O)(e,t,a,n))}),[I]);Object(c.useEffect)((function(){if(O.a.isSharePage(R.pathname))D(P.get("name"));else{var e=P.get("p").split("/");D(e[e.length-1])}}),[L.params[0],R]),Object(c.useEffect)((function(){var t="/file/content/"+P.get("id");O.a.isSharePage(R.pathname)&&(t="/share/content/"+F,""!==P.get("share_path")&&(t+="?path="+encodeURIComponent(P.get("share_path")))),N(!0),m.b.get(t,{responseType:"arraybuffer"}).then((function(t){var a=new e(t.rawData,"binary").toString();l(a)})).catch((function(e){M("top","right","\u65e0\u6cd5\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c"+e.message,"error")})).then((function(){N(!1)}))}),[L.params[0]]);var _=function(e){return new Promise((function(t,a){var n=new FileReader;n.readAsDataURL(e),n.onload=function(){return t(n.result)},n.onerror=function(e){return a(e)}}))},A=function(){x("loading"),m.b.put("/file/update/"+P.get("id"),n).then((function(){x("success"),setTimeout((function(){return x("")}),2e3)})).catch((function(e){x(""),M("top","right",e.message,"error")}))},U=function(){var e=Object(o.a)(r.a.mark((function e(t){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=T.current,e.t1=t.name,e.next=4,_(t);case 4:e.t2=e.sent,e.t0.$img2Url.call(e.t0,e.t1,e.t2),console.log(t);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),W=w();return s.a.createElement("div",{className:W.layout},s.a.createElement(p.a,{className:W.root,elevation:1},S&&s.a.createElement(j.a,null),!S&&s.a.createElement(E.a,{ref:T,value:n,onSave:function(){return A()},addImg:function(e){return U(e)},onChange:function(e){return l(e)},toolbar:{h1:!0,h2:!0,h3:!0,h4:!0,img:!0,link:!0,code:!0,preview:!0,expand:!0,undo:!0,redo:!0,save:!1,subfield:!0}})),!O.a.isSharePage(R.pathname)&&s.a.createElement(v.a,{onClick:A,status:y}))}}).call(this,a(241).Buffer)},229:function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return C}));var n=a(9),r=a(6),o=a(0),i=a.n(o),l=a(35),c=a(95),s=a(93),p=a(20),u=a(11),d=a(8),m=a(4),h=a(62),g=a(13),f=a(192),b=a(39),E=a(145),v=a(397),O=a(399),j=a(135),w=a(151),y=i.a.lazy((function(){return Promise.all([a.e(0),a.e(1)]).then(a.t.bind(null,6457,7))})),x=Object(s.a)((function(e){var t;return{layout:(t={width:"auto",marginTop:"30px",marginLeft:e.spacing(3),marginRight:e.spacing(3)},Object(r.a)(t,e.breakpoints.up(1100+2*e.spacing(3)),{width:1100,marginLeft:"auto",marginRight:"auto"}),Object(r.a)(t,"marginBottom",50),t),editor:{borderRadius:"4px"},"@global":{".overflow-guard":{borderRadius:"4px!important"}},formControl:{margin:"8px 16px 8px 16px"},toobar:{textAlign:"right"}}}));function C(){var t=Object(o.useState)(""),a=Object(n.a)(t,2),r=a[0],s=a[1],C=Object(o.useState)(""),k=Object(n.a)(C,2),S=k[0],N=k[1],L=Object(o.useState)(!0),T=Object(n.a)(L,2),R=T[0],P=T[1],F=Object(o.useState)("javascript"),I=Object(n.a)(F,2),D=I[0],M=I[1],_=Object(p.i)(),A=Object(p.g)(),U=new URLSearchParams(Object(p.g)().search),W=Object(p.h)().id,z=Object(l.a)(),B=Object(d.d)(),G=Object(o.useCallback)((function(e){return B(Object(h.a)(e))}),[B]),H=Object(o.useCallback)((function(e,t,a,n){return B(Object(m.O)(e,t,a,n))}),[B]);Object(o.useEffect)((function(){if(g.a.isSharePage(A.pathname)){var e=U.get("name").split(".");M(b.a[e.pop()]),G(U.get("name"))}else{var t=U.get("p").split("/"),a=U.get("p").split(".");M(b.a[a.pop()]),G(t[t.length-1])}}),[_.params[0],A]),Object(o.useEffect)((function(){var t="/file/content/"+U.get("id");g.a.isSharePage(A.pathname)&&(t="/share/content/"+W,""!==U.get("share_path")&&(t+="?path="+encodeURIComponent(U.get("share_path")))),P(!0),u.b.get(t,{responseType:"arraybuffer"}).then((function(t){var a=new e(t.rawData,"binary").toString();s(a)})).catch((function(e){H("top","right","\u65e0\u6cd5\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c"+e.message,"error")})).then((function(){P(!1)}))}),[_.params[0]]);var V=x(),q=g.a.isSharePage(A.pathname);return i.a.createElement("div",{className:V.layout},i.a.createElement(c.a,{className:V.root,elevation:1},i.a.createElement("div",{className:V.toobar},i.a.createElement(v.a,{className:V.formControl},i.a.createElement(O.a,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:D,onChange:function(e){return M(e.target.value)}},Array.from(new Set(Object.keys(b.a).map((function(e){return b.a[e]})))).map((function(e,t){return i.a.createElement(j.a,{value:e,key:t},e)}))))),i.a.createElement(w.a,null),R&&i.a.createElement(E.a,null),!R&&i.a.createElement(o.Suspense,{fallback:i.a.createElement(E.a,null)},i.a.createElement(y,{height:"600",language:D,theme:"dark"===z.palette.type?"vs-dark":"vs",value:r,options:{readOnly:q,extraEditorClassName:V.editor},onChange:function(e){return s(e)}}))),!q&&i.a.createElement(f.a,{onClick:function(){N("loading"),u.b.put("/file/update/"+U.get("id"),r).then((function(){N("success"),setTimeout((function(){return N("")}),2e3)})).catch((function(e){N(""),H("top","right",e.message,"error")}))},status:S}))}}).call(this,a(241).Buffer)},308:function(e,t,a){"use strict";var n=a(23),r=a(24),o=a(25),i=a(26),l=a(130),c=a(0),s=a.n(c),p=a(8),u=(a(4),a(27)),d=a.n(u),m=a(353),h=a.n(m),g=a(354),f=a.n(g),b=a(177),E=a.n(b),v=a(351),O=a.n(v),j=a(352),w=a.n(j),y=a(396),x=a(43),C=a(7),k=a(6419),S={success:O.a,warning:w.a,error:h.a,info:f.a};var N=Object(C.a)((function(e){return{success:{backgroundColor:e.palette.success.main},error:{backgroundColor:e.palette.error.dark},info:{backgroundColor:e.palette.info.main},warning:{backgroundColor:e.palette.warning.main},icon:{fontSize:20},iconVariant:{opacity:.9,marginRight:e.spacing(1)},message:{display:"flex",alignItems:"center"}}}))((function(e){var t=e.classes,a=e.className,n=e.message,r=e.onClose,o=e.variant,i=Object(l.a)(e,["classes","className","message","onClose","variant"]),c=S[o];return s.a.createElement(y.a,Object.assign({className:d()(t[o],a),"aria-describedby":"client-snackbar",message:s.a.createElement("span",{id:"client-snackbar",className:t.message},s.a.createElement(c,{className:d()(t.icon,t.iconVariant)}),n),action:[s.a.createElement(x.a,{key:"close","aria-label":"Close",color:"inherit",className:t.close,onClick:r},s.a.createElement(E.a,{className:t.icon}))]},i))})),L=function(e){Object(o.a)(a,e);var t=Object(i.a)(a);function a(){var e;Object(n.a)(this,a);for(var r=arguments.length,o=new Array(r),i=0;i1||!this.props.isMultiple&&this.props.withFile)&&(i||_.a.isSharePage(this.props.location.pathname))&&s.a.createElement($.a,{in:this.props.selected.length>1||!this.props.isMultiple&&this.props.withFile},s.a.createElement(Q.a,{color:"inherit",className:r.menuIcon,onClick:function(){return n.props.setSelectedTarget([])}},s.a.createElement(f.a,null))),this.props.selected.length<=1&&!(!this.props.isMultiple&&this.props.withFile)&&s.a.createElement(X.a,{variant:"h6",color:"inherit",noWrap:!0,onClick:function(){n.props.history.push("/")}},this.props.subTitle?this.props.subTitle:this.props.title),!this.props.isMultiple&&this.props.withFile&&!_.a.isMobile()&&s.a.createElement(X.a,{variant:"h6",color:"inherit",noWrap:!0},this.props.selected[0].name," ",(i||_.a.isSharePage(this.props.location.pathname))&&"("+Object(D.r)(this.props.selected[0].size)+")"),this.props.selected.length>1&&!_.a.isMobile()&&s.a.createElement(X.a,{variant:"h6",color:"inherit",noWrap:!0},this.props.selected.length,"\u4e2a\u5bf9\u8c61"),this.props.selected.length<=1&&!(!this.props.isMultiple&&this.props.withFile)&&s.a.createElement(A.a,null),s.a.createElement("div",{className:r.grow}),(this.props.selected.length>1||!this.props.isMultiple&&this.props.withFile)&&!i&&!_.a.isSharePage(this.props.location.pathname)&&oe.a.Check(this.props.isLogin)&&!Object(D.f)("share")&&s.a.createElement("div",{className:r.sectionForFile},s.a.createElement(Z.a,{title:"\u4fdd\u5b58"},s.a.createElement(Q.a,{color:"inherit",onClick:function(){return n.props.saveFile()}},s.a.createElement(T.a,null)))),(this.props.selected.length>1||!this.props.isMultiple&&this.props.withFile)&&(i||c)&&s.a.createElement("div",{className:r.sectionForFile},!this.props.isMultiple&&this.props.withFile&&Object(F.g)(this.props.selected[0].name)&&s.a.createElement($.a,{in:!this.props.isMultiple&&this.props.withFile&&Object(F.g)(this.props.selected[0].name)},s.a.createElement(Z.a,{title:"\u6253\u5f00"},s.a.createElement(Q.a,{color:"inherit",onClick:function(){return n.props.openPreview()}},s.a.createElement(E.a,null)))),!this.props.isMultiple&&this.props.withFile&&s.a.createElement($.a,{in:!this.props.isMultiple&&this.props.withFile},s.a.createElement(Z.a,{title:"\u4e0b\u8f7d"},s.a.createElement(Q.a,{color:"inherit",onClick:function(){return n.openDownload()}},s.a.createElement(O.a,null)))),(this.props.isMultiple||this.props.withFolder)&&o.group.allowArchiveDownload&&s.a.createElement($.a,{in:(this.props.isMultiple||this.props.withFolder)&&o.group.allowArchiveDownload},s.a.createElement(Z.a,{title:"\u6253\u5305\u4e0b\u8f7d"},s.a.createElement(Q.a,{color:"inherit",onClick:function(){return n.archiveDownload()}},s.a.createElement(O.a,null)))),!this.props.isMultiple&&this.props.withFolder&&s.a.createElement($.a,{in:!this.props.isMultiple&&this.props.withFolder},s.a.createElement(Z.a,{title:"\u8fdb\u5165\u76ee\u5f55"},s.a.createElement(Q.a,{color:"inherit",onClick:function(){return n.props.navigateTo("/"===n.props.path?n.props.path+n.props.selected[0].name:n.props.path+"/"+n.props.selected[0].name)}},s.a.createElement(w.a,null)))),!this.props.isMultiple&&!_.a.isMobile()&&!c&&s.a.createElement($.a,{in:!this.props.isMultiple},s.a.createElement(Z.a,{title:"\u5206\u4eab"},s.a.createElement(Q.a,{color:"inherit",onClick:function(){return n.props.openShareDialog()}},s.a.createElement(h.a,null)))),!this.props.isMultiple&&!c&&s.a.createElement($.a,{in:!this.props.isMultiple},s.a.createElement(Z.a,{title:"\u91cd\u547d\u540d"},s.a.createElement(Q.a,{color:"inherit",onClick:function(){return n.props.openRenameDialog()}},s.a.createElement(x.a,null)))),!c&&s.a.createElement("div",{style:{display:"flex"}},!_.a.isMobile()&&s.a.createElement($.a,{in:0!==this.props.selected.length&&!_.a.isMobile()},s.a.createElement(Z.a,{title:"\u79fb\u52a8"},s.a.createElement(Q.a,{color:"inherit",onClick:function(){return n.props.openMoveDialog()}},s.a.createElement(k.a,null)))),s.a.createElement($.a,{in:0!==this.props.selected.length},s.a.createElement(Z.a,{title:"\u5220\u9664"},s.a.createElement(Q.a,{color:"inherit",onClick:function(){return n.props.openRemoveDialog()}},s.a.createElement(N.a,null)))),_.a.isMobile()&&s.a.createElement($.a,{in:0!==this.props.selected.length&&_.a.isMobile()},s.a.createElement(Z.a,{title:"\u66f4\u591a\u64cd\u4f5c"},s.a.createElement(Q.a,{color:"inherit",onClick:function(){return n.props.changeContextMenu("file",!0)}},s.a.createElement(ue.a,null)))))),this.props.selected.length<=1&&!(!this.props.isMultiple&&this.props.withFile)&&s.a.createElement(W.a,null),this.props.selected.length<=1&&!(!this.props.isMultiple&&this.props.withFile)&&i&&_.a.isMobile()&&s.a.createElement(me.a,{inherit:!0}))),this.loadUploader(),s.a.createElement(ee.a,{smUp:!0,implementation:"css"},s.a.createElement(te.a,{container:this.props.container,variant:"temporary",classes:{paper:r.drawerPaper},anchor:"left",open:this.state.mobileOpen,onClose:this.handleDrawerToggle,onOpen:function(){return n.setState((function(){return{mobileOpen:!0}}))},disableDiscovery:d,ModalProps:{keepMounted:!0}},p)),s.a.createElement(ee.a,{xsDown:!0,implementation:"css"},s.a.createElement(ae.a,{classes:{paper:u()((t={},Object(l.a)(t,r.drawerOpen,this.props.desktopOpen),Object(l.a)(t,r.drawerClose,!this.props.desktopOpen),t))},className:u()(r.drawer,(a={},Object(l.a)(a,r.drawerOpen,this.props.desktopOpen),Object(l.a)(a,r.drawerClose,!this.props.desktopOpen),a)),variant:"persistent",anchor:"left",open:this.props.desktopOpen},s.a.createElement("div",{className:r.toolbar}),p)))}}]),c}(c.Component),ge=Object(d.c)((function(e){return{desktopOpen:e.viewUpdate.open,selected:e.explorer.selected,isMultiple:e.explorer.selectProps.isMultiple,withFolder:e.explorer.selectProps.withFolder,withFile:e.explorer.selectProps.withFile,path:e.navigator.path,keywords:e.explorer.keywords,title:e.siteConfig.title,subTitle:e.viewUpdate.subTitle,loadUploader:e.viewUpdate.loadUploader,isLogin:e.viewUpdate.isLogin}}),(function(e){return{handleDesktopToggle:function(t){e(Object(I.f)(t))},setSelectedTarget:function(t){e(Object(I.H)(t))},navigateTo:function(t){e(Object(I.h)(t))},openCreateFolderDialog:function(){e(Object(I.m)())},changeContextMenu:function(t,a){e(Object(I.b)(t,a))},searchMyFile:function(t){e(Object(I.C)(t))},saveFile:function(){e(Object(I.B)())},openMusicDialog:function(){e(Object(I.r)())},showImgPreivew:function(t){e(Object(I.M)(t))},toggleSnackbar:function(t,a,n,r){e(Object(I.O)(t,a,n,r))},openRenameDialog:function(){e(Object(I.v)())},openMoveDialog:function(){e(Object(I.q)())},openRemoveDialog:function(){e(Object(I.u)())},openShareDialog:function(){e(Object(I.x)())},openLoadingDialog:function(t){e(Object(I.p)(t))},setSessionStatus:function(){e(Object(I.I)())},openPreview:function(){e(Object(I.s)())}}}))(Object(ne.a)(Object(re.a)((function(e){var t,a;return{appBar:(t={marginLeft:240},Object(l.a)(t,e.breakpoints.down("xs"),{marginLeft:270}),Object(l.a)(t,"zIndex",e.zIndex.drawer+1),Object(l.a)(t,"transition"," background-color 250ms"),t),drawer:{width:0,flexShrink:0},drawerDesktop:{width:240,flexShrink:0},icon:{marginRight:e.spacing(2)},menuButton:Object(l.a)({marginRight:20},e.breakpoints.up("sm"),{display:"none"}),menuButtonDesktop:Object(l.a)({marginRight:20},e.breakpoints.down("sm"),{display:"none"}),menuIcon:{marginRight:20},toolbar:e.mixins.toolbar,drawerPaper:{width:270},upDrawer:{overflowX:"hidden"},drawerOpen:{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen})},drawerClose:{transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:0},content:{flexGrow:1,padding:e.spacing(3)},grow:{flexGrow:1},badge:{top:1,right:-15},nested:{paddingLeft:e.spacing(4)},sectionForFile:{display:"flex"},extendedIcon:{marginRight:e.spacing(1)},addButton:{marginLeft:"40px",marginTop:"25px",marginBottom:"15px"},fabButton:{borderRadius:"100px"},badgeFix:{right:"10px"},iconFix:{marginLeft:"16px"},dividerFix:{marginTop:"8px"},folderShareIcon:{verticalAlign:"sub",marginRight:"5px"},shareInfoContainer:{display:"flex",marginTop:"15px",marginBottom:"20px",marginLeft:"28px",textDecoration:"none"},shareAvatar:{width:"40px",height:"40px"},stickFooter:{bottom:"0px",position:"absolute",backgroundColor:e.palette.background.paper,width:"100%"},ownerInfo:{marginLeft:"10px",width:"150px"},minStickDrawer:(a={overflowY:"auto"},Object(l.a)(a,e.breakpoints.up("sm"),{height:"calc(var(--vh, 100vh) - 145px)"}),Object(l.a)(a,e.breakpoints.down("sm"),{minHeight:"calc(var(--vh, 100vh) - 360px)"}),a)}}))(Object(G.j)(he))));t.a=ge}).call(this,a(206))},332:function(e,t,a){"use strict";var n=a(23),r=a(24),o=a(25),i=a(26),l=a(6),c=a(0),s=a.n(c),p=a(333),u=a.n(p),d=a(111),m=a(174),h=a.n(m),g=a(92),f=a.n(g),b=a(8),E=a(4),v=a(235),O=a(393),j=a(231),w=a(95),y=a(135),x=a(55),C=a(54),k=a(46),S=a(7),N=a(20),L=a(13),T=a(132);Object(T.configure)({ignoreTags:[]});var R={SEARCH:"enter"},P=function(e){Object(o.a)(a,e);var t=Object(i.a)(a);function a(e){var r;return Object(n.a)(this,a),(r=t.call(this,e)).handlers={SEARCH:function(e){L.a.isHomePage(r.props.location.pathname)?r.searchMyFile():r.searchShare(),e.target.blur()}},r.handleChange=function(e){var t=e.currentTarget;r.input=e.target.value,r.setState({anchorEl:t,input:e.target.value})},r.cancelSuggest=function(){r.setState({input:""})},r.searchMyFile=function(){r.props.searchMyFile("keywords/"+r.input)},r.searchShare=function(){r.props.history.push("/search?keywords="+encodeURIComponent(r.input))},r.state={anchorEl:null,input:""},r}return Object(r.a)(a,[{key:"render",value:function(){var e=this,t=this.props.classes,a=this.state.anchorEl,n=""!==this.state.input?"simple-popper":null,r=L.a.isHomePage(this.props.location.pathname);return s.a.createElement("div",{className:t.search},s.a.createElement("div",{className:t.searchIcon},s.a.createElement(u.a,null)),s.a.createElement(T.HotKeys,{keyMap:R,handlers:this.handlers},s.a.createElement(v.a,{placeholder:"\u641c\u7d22...",classes:{root:t.inputRoot,input:t.inputInput},onChange:this.handleChange,onBlur:this.cancelSuggest,value:this.state.input})),s.a.createElement(O.a,{id:n,open:""!==this.state.input,anchorEl:a,className:t.suggestBox,transition:!0},(function(a){var n=a.TransitionProps;return s.a.createElement(j.a,Object.assign({},n,{timeout:350}),s.a.createElement(w.a,{square:!0},r&&s.a.createElement(y.a,{onClick:e.searchMyFile},s.a.createElement(x.a,{className:t.icon},s.a.createElement(h.a,null)),s.a.createElement(C.a,{classes:{primary:t.primary},primary:s.a.createElement(k.a,{noWrap:!0},"\u5728\u6211\u7684\u6587\u4ef6\u4e2d\u641c\u7d22"," ",s.a.createElement("strong",null,e.state.input))})),s.a.createElement(y.a,{onClick:e.searchShare},s.a.createElement(x.a,{className:t.icon},s.a.createElement(f.a,null)),s.a.createElement(C.a,{classes:{primary:t.primary},primary:s.a.createElement(k.a,{noWrap:!0},"\u5728\u5168\u7ad9\u5206\u4eab\u4e2d\u641c\u7d22"," ",s.a.createElement("strong",null,e.state.input))}))))})))}}]),a}(c.Component),F=Object(b.c)((function(){return{}}),(function(e){return{searchMyFile:function(t){e(Object(E.C)(t))}}}))(Object(S.a)((function(e){var t;return{search:(t={},Object(l.a)(t,e.breakpoints.down("sm"),{display:"none"}),Object(l.a)(t,"position","relative"),Object(l.a)(t,"borderRadius",e.shape.borderRadius),Object(l.a)(t,"backgroundColor",Object(d.fade)(e.palette.common.white,.15)),Object(l.a)(t,"&:hover",{backgroundColor:Object(d.fade)(e.palette.common.white,.25)}),Object(l.a)(t,"marginRight",e.spacing(2)),Object(l.a)(t,"marginLeft",0),Object(l.a)(t,"width","100%"),Object(l.a)(t,e.breakpoints.up("sm"),{marginLeft:e.spacing(7.2),width:"auto"}),t),searchIcon:{width:e.spacing(9),height:"100%",position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},inputRoot:{color:"inherit",width:"100%"},inputInput:Object(l.a)({paddingTop:e.spacing(1),paddingRight:e.spacing(1),paddingBottom:e.spacing(1),paddingLeft:e.spacing(7),transition:e.transitions.create("width"),width:"100%"},e.breakpoints.up("md"),{width:200,"&:focus":{width:300}}),suggestBox:{zIndex:"9999",width:364}}}))(Object(N.j)(P)));t.a=F},334:function(e,t,a){"use strict";var n=a(23),r=a(24),o=a(25),i=a(26),l=a(6),c=a(0),s=a.n(c),p=a(335),u=a.n(p),d=a(8),m=a(11),h=a(18),g=a(4),f=a(151),b=a(6409),E=a(64),v=a(46),O=a(7),j=a(108),w=a(20),y=function(e){Object(o.a)(a,e);var t=Object(i.a)(a);function a(){var e;Object(n.a)(this,a);for(var r=arguments.length,o=new Array(r),i=0;i=1?(t=100,e.props.toggleSnackbar("top","right","\u60a8\u7684\u5df2\u7528\u5bb9\u91cf\u5df2\u8d85\u8fc7\u5bb9\u91cf\u914d\u989d\uff0c\u8bf7\u5c3d\u5feb\u5220\u9664\u591a\u4f59\u6587\u4ef6\u6216\u8d2d\u4e70\u5bb9\u91cf","warning")):t=a.data.used/a.data.total*100,e.setState({percent:t,used:Object(h.r)(a.data.used),total:Object(h.r)(a.data.total)})})).catch((function(){}))},e}return Object(r.a)(a,[{key:"componentWillUnmount",value:function(){this.firstLoad=!1}},{key:"render",value:function(){var e=this,t=this.props.classes;return s.a.createElement("div",{onMouseEnter:function(){return e.setState({showExpand:!0})},onMouseLeave:function(){return e.setState({showExpand:!1})},className:t.stickFooter},s.a.createElement(f.a,null),s.a.createElement(j.a,null,s.a.createElement("div",{className:t.storageContainer},s.a.createElement(u.a,{className:t.iconFix}),s.a.createElement("div",{className:t.detail},"\u5b58\u50a8\u7a7a\u95f4"," ",s.a.createElement(b.a,{className:t.bar,color:"secondary",variant:"determinate",value:this.state.percent}),s.a.createElement("div",{className:t.info},s.a.createElement(E.a,{title:"\u5df2\u4f7f\u7528 "+(null===this.state.used?" -- ":this.state.used)+", \u5171 "+(null===this.state.total?" -- ":this.state.total),placement:"top"},s.a.createElement(v.a,{variant:"caption",noWrap:!0,color:"textSecondary"},"\u5df2\u4f7f\u7528"," ",null===this.state.used?" -- ":this.state.used)))))))}}]),a}(c.Component),x=Object(d.c)((function(e){return{refresh:e.viewUpdate.storageRefresh,isLogin:e.viewUpdate.isLogin}}),(function(e){return{toggleSnackbar:function(t,a,n,r){e(Object(g.O)(t,a,n,r))}}}))(Object(O.a)((function(e){var t;return{iconFix:{marginLeft:"32px",marginRight:"17px",color:e.palette.text.secondary,marginTop:"2px"},textFix:{padding:" 0 0 0 16px"},storageContainer:{display:"flex",marginTop:"15px",textAlign:"left",marginBottom:"11px"},detail:{width:"100%",marginRight:"35px"},info:(t={width:"131px",overflow:"hidden",textOverflow:"ellipsis"},Object(l.a)(t,e.breakpoints.down("xs"),{width:"162px"}),Object(l.a)(t,"marginTop","5px"),t),bar:{marginTop:"5px"},stickFooter:{backgroundColor:e.palette.background.paper}}}))(Object(w.j)(y)));t.a=x},339:function(e,t,a){"use strict";var n=a(23),r=a(24),o=a(25),i=a(26),l=a(0),c=a.n(l),s=a(8),p=a(4),u=a(46),d=a(7),m=a(19),h=a(178),g=a(199),f=function(e){Object(o.a)(a,e);var t=Object(i.a)(a);function a(){var e;Object(n.a)(this,a);for(var r=arguments.length,o=new Array(r),i=0;i=t.length?null:t[a]}}},b=function(){for(var e=arguments.length,t=new Array(e),a=0;a1?c-1:0),p=1;p1?s-1:0),u=1;u0&&(j.forEach((function(e){var t=document.querySelector("script[src='".concat(e,"']"));null!=t&&t.parentNode.removeChild(t)})),j=[])};var x=function(){return function(e){var t=function(t){Object(o.a)(l,t);var a=Object(i.a)(l);function l(e,t){var r;return Object(n.a)(this,l),(r=a.call(this,e,t)).state={isScriptLoaded:!1,isScriptLoadSucceed:!1},r._isMounted=!1,r}return Object(r.a)(l,[{key:"componentDidMount",value:function(){var e=this;this._isMounted=!0,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h,a=function(e){var t="object"===typeof e?e.src:e;if(v.indexOf(t)<0)return function(a){var n=O[t]||[];if(n.push(a),O[t]=n,1===n.length)return g(e)((function(e){O[t].forEach((function(a){return a(e,t)})),delete O[t]}))}},n=e.map((function(e){return Array.isArray(e)?e.map(a):a(e)}));E.apply(void 0,Object(p.a)(n))((function(e,t){e?j.push(t):Array.isArray(t)?t.forEach(w):w(t)}))((function(e){y(),t(e)}))}([["/static/js/uploader/moxie.js"],["/static/js/uploader/plupload.dev.js"],["/static/js/uploader/i18n/zh_CN.js"],["/static/js/uploader/ui.js"],["/static/js/uploader/uploader_"+window.policyType+".js"]],(function(t){e._isMounted&&e.setState({isScriptLoaded:!0,isScriptLoadSucceed:!t},(function(){t||e.props.onScriptLoaded()}))}))}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"render",value:function(){var t=Object(s.a)(Object(s.a)(Object(s.a)({},this.props),this.state),{},{ref:"wrappedInstance"});return c.a.createElement(e,t)}}]),l}(l.Component);return t.defaultProps={onScriptLoaded:h},d()(t,e)}},C=a(8),k=a(4),S=a(6),N=a(177),L=a.n(N),T=a(330),R=a.n(T),P=a(101),F=a.n(P),I=a(91),D=a.n(I),M=a(6478),_=a(111),A=a(6404),U=a(6477),W=a(6407),z=a(6408),B=a(43),G=a(46),H=a(6479),V=a(198),q=a(61),Y=a(54),K=a(392),J=a(64),Q=a(151),$=a(7),X=a(41),Z=a(217),ee=function(e){Object(o.a)(a,e);var t=Object(i.a)(a);function a(){var e;Object(n.a)(this,a);for(var r=arguments.length,o=new Array(r),i=0;i99&&c.a.createElement("div",null,"\u5904\u7406\u4e2d..."))}),3===a.status&&c.a.createElement(Y.a,{className:t.listAction,primary:c.a.createElement("span",{className:t.fileName},a.name),secondary:a.status}),4===a.status&&c.a.createElement(Y.a,{className:t.listAction,primary:c.a.createElement("span",{className:t.fileName},a.name),secondary:c.a.createElement("div",{className:t.errorStatus},a.errMsg,c.a.createElement("br",null))}),5===a.status&&c.a.createElement(Y.a,{className:t.listAction,primary:c.a.createElement("span",{className:t.fileName},a.name),secondary:c.a.createElement("div",{className:t.successStatus},"\u5df2\u5b8c\u6210",c.a.createElement("br",null))}),c.a.createElement(K.a,{className:t.delete},4!==a.status&&c.a.createElement(B.a,{"aria-label":"Delete",onClick:function(){return e.cancelUpload(a)}},c.a.createElement(F.a,null)),4===a.status&&c.a.createElement(J.a,{title:"\u91cd\u8bd5"},c.a.createElement(B.a,{"aria-label":"Delete",onClick:function(){return e.reQueue(a)}},c.a.createElement(D.a,null))))),c.a.createElement(Q.a,null))})))))}}]),a}(l.Component),te=Object($.a)((function(e){var t;return{appBar:{position:"relative"},flex:{flex:1},progressBar:{marginTop:5},minHight:(t={},Object(S.a)(t,e.breakpoints.up("sm"),{minWidth:500}),Object(S.a)(t,"padding",0),t),dialogContent:{padding:0},successStatus:{color:"#4caf50"},errorStatus:{color:"#ff5722",wordBreak:"break-all"},listAction:{marginLeft:20,marginRight:20},delete:{zIndex:9},progressContainer:{position:"relative"},progressContent:{position:"relative",zIndex:9},progress:{transition:"width .4s linear",zIndex:1,height:"100%",position:"absolute",left:0,top:0},fileName:{wordBreak:"break-all"}}}))(Object(M.a)()(Object(Z.a)(ee))),ae=a(19),ne=a(9),re=a(93),oe=a(6480),ie=a(6481),le=a(6539),ce=a(6482),se=a(112),pe=a.n(se),ue=a(225),de=a.n(ue),me=a(126),he=a(13),ge=a(391),fe=a(29),be=Object(re.a)((function(){return{fab:{margin:0,top:"auto",right:20,bottom:20,left:"auto",zIndex:5,position:"fixed"},badge:{position:"absolute",bottom:26,top:"auto",zIndex:9999,right:7},"@global":{".MuiSpeedDialAction-staticTooltipLabel":{width:100}}}}));function Ee(e){var t=Object(l.useState)(!1),a=Object(ne.a)(t,2),n=a[0],r=a[1],o=Object(l.useState)(5),i=Object(ne.a)(o,2),s=i[0],p=i[1],u=be(),d=Object(C.d)(),m=Object(l.useCallback)((function(e,t,a,n){return d(Object(k.O)(e,t,a,n))}),[d]),h=Object(l.useCallback)((function(){return d(Object(k.m)())}),[d]),g=Object(l.useCallback)((function(){return d(Object(k.l)())}),[d]);Object(l.useEffect)((function(){p(e.Queued)}),[e.Queued]);var f=function(e){var t=document.getElementsByClassName(e)[0];document.body.contains(t)?t.click():m("top","right","\u4e0a\u4f20\u7ec4\u4ef6\u8fd8\u672a\u52a0\u8f7d\u5b8c\u6210","warning")},b=function(){n&&(0!==s?e.openFileList():f("uploadFileForm"))};return c.a.createElement(me.a,{enable:!0},c.a.createElement(oe.a,{badgeContent:s,classes:{badge:u.badge},className:u.fab,invisible:0===s,color:"primary"},c.a.createElement(ge.a,{open:n&&he.a.isMobile()}),c.a.createElement(ie.a,{ariaLabel:"SpeedDial openIcon example",hidden:!1,tooltipTitle:"\u4e0a\u4f20\u6587\u4ef6",icon:c.a.createElement(le.a,{openIcon:!he.a.isMobile()&&c.a.createElement(de.a,null)}),onClose:function(){r(!1)},FabProps:{onClick:function(){return!he.a.isMobile()&&b()},color:"secondary"},onOpen:function(){r(!0)},open:n},he.a.isMobile()&&c.a.createElement(ce.a,{key:"UploadFile",icon:c.a.createElement(de.a,null),tooltipOpen:!0,tooltipTitle:"\u4e0a\u4f20\u6587\u4ef6",onClick:function(){return b()},title:"\u4e0a\u4f20\u6587\u4ef6"}),!he.a.isMobile()&&c.a.createElement(ce.a,{key:"UploadFolder",icon:c.a.createElement(fe.m,null),tooltipOpen:!0,tooltipTitle:"\u4e0a\u4f20\u76ee\u5f55",onClick:function(){return f("uploadFolderForm")},title:"\u4e0a\u4f20\u76ee\u5f55"}),c.a.createElement(ce.a,{key:"NewFolder",icon:c.a.createElement(pe.a,null),tooltipOpen:!0,tooltipTitle:"\u65b0\u5efa\u76ee\u5f55",onClick:function(){return h()},title:"\u65b0\u5efa\u76ee\u5f55"}),c.a.createElement(ce.a,{key:"NewFile",icon:c.a.createElement(fe.i,null),tooltipOpen:!0,tooltipTitle:"\u65b0\u5efa\u6587\u4ef6",onClick:function(){return g()},title:"\u65b0\u5efa\u6587\u4ef6"}))))}var ve=a(18),Oe=!1,je=function(e){Object(o.a)(a,e);var t=Object(i.a)(a);function a(e){var r;return Object(n.a)(this,a),(r=t.call(this,e)).reQueue=function(e){r.uploader.addFile(e.getSource()),r.props.toggleSnackbar("top","right","\u6587\u4ef6\u5df2\u7ecf\u91cd\u65b0\u52a0\u5165\u4e0a\u4f20\u961f\u5217","info")},r.fileAdd=function(e,t){var a=window.currntPath?window.currntPath:r.props.path;if(""===r.props.keywords&&window.location.pathname.toLowerCase().startsWith("/home")){window.fileList.openFileList();var n=t.filter((function(t){var a=".ds_store"===t.name.toLowerCase();return a&&e.removeFile(t),!a})).map((function(e){var t=e.getSource();return t.relativePath&&""!==t.relativePath?(e.path=Object(ve.b)(Object(ve.n)([a,t.relativePath])),window.pathCache[e.id]=Object(ve.b)(Object(ve.n)([a,t.relativePath]))):(window.pathCache[e.id]=a,e.path=a),e}));window.fileList.enQueue(n)}else window.plupload.each(t,(function(t){e.removeFile(t)}))},r.openFileList=function(){window.fileList.openFileList()},r.state={queued:0},r}return Object(r.a)(a,[{key:"setRef",value:function(e){window.fileList=e}},{key:"cancelUpload",value:function(e){this.uploader.removeFile(e)}},{key:"getChunkSize",value:function(e){return"qiniu"===e?4194304:"onedrive"===e?104857600:0}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this,a=e.isScriptLoaded,n=e.isScriptLoadSucceed;if(a&&!this.props.isScriptLoaded)if(n){if(Oe)return;Oe=!0;var r=ae.a.GetUser();this.uploader=window.Qiniu.uploader({runtimes:"html5",browse_button:["pickfiles","pickfolder"],container:"container",drop_element:"container",max_file_size:"0.00mb"===r.policy.maxSize?0:r.policy.maxSize,dragdrop:!0,chunk_size:this.getChunkSize(r.policy.saveType),filters:{mime_types:null===r.policy.allowedType||0===r.policy.allowedType.length?[]:[{title:"files",extensions:r.policy.allowedType.join(",")}]},multi_selection:!0,uptoken_url:"/api/v3/file/upload/credential",uptoken:"local"===r.policy.saveType?"token":null,domain:"s",max_retries:0,get_new_uptoken:!0,auto_start:!0,log_level:5,init:{FilesAdded:this.fileAdd,BeforeUpload:function(){},QueueChanged:function(e){t.setState({queued:e.total.queued})},UploadProgress:function(e,t){window.fileList.updateStatus(t)},UploadComplete:function(e,a){if(0!==a.length){console.log("UploadComplete",a[0].status,a[0]);for(var n=0;n1)){var u=Object(n.l)(),d=l().explorer,m=d.selected,h=d.lastSelect,g=d.dirList,f=d.fileList;if(i&&!r&&!o&&0!==m.length&&e.type===h.file.type){t(c(m.map((function(e){return e.id}))));var b=Math.min(h.index,a),E=Math.max(h.index,a),v=("dir"===e.type?g:f).slice(b,E+1);return t(s(v))}return t(function(e,t){return{type:"SET_LAST_SELECT",file:e,index:t}}(e,a)),t({type:"SET_SHIFT_SELECTED_IDS",shiftSelectedIds:[]}),r&&!u||o&&u?t(-1!==m.findIndex((function(t){return t.id===e.id}))?c([e.id]):s([e])):t(p([e]))}}};a.d(t,"h",(function(){return h})),a.d(t,"i",(function(){return g})),a.d(t,"f",(function(){return f})),a.d(t,"e",(function(){return b})),a.d(t,"c",(function(){return E})),a.d(t,"N",(function(){return v})),a.d(t,"b",(function(){return O})),a.d(t,"G",(function(){return j})),a.d(t,"F",(function(){return w})),a.d(t,"m",(function(){return y})),a.d(t,"l",(function(){return x})),a.d(t,"L",(function(){return C})),a.d(t,"J",(function(){return k})),a.d(t,"v",(function(){return S})),a.d(t,"w",(function(){return N})),a.d(t,"q",(function(){return L})),a.d(t,"u",(function(){return T})),a.d(t,"x",(function(){return R})),a.d(t,"a",(function(){return P})),a.d(t,"I",(function(){return F})),a.d(t,"r",(function(){return I})),a.d(t,"t",(function(){return D})),a.d(t,"y",(function(){return M})),a.d(t,"n",(function(){return _})),a.d(t,"j",(function(){return A})),a.d(t,"o",(function(){return U})),a.d(t,"k",(function(){return W})),a.d(t,"p",(function(){return z})),a.d(t,"d",(function(){return B})),a.d(t,"O",(function(){return G})),a.d(t,"g",(function(){return H})),a.d(t,"E",(function(){return V})),a.d(t,"z",(function(){return q})),a.d(t,"C",(function(){return Y})),a.d(t,"M",(function(){return K})),a.d(t,"A",(function(){return J})),a.d(t,"B",(function(){return Q})),a.d(t,"K",(function(){return $})),a.d(t,"H",(function(){return p})),a.d(t,"s",(function(){return u})),a.d(t,"D",(function(){return d}));var m=function(e,t){return{type:"SET_NAVIGATOR",path:e,navigatorLoading:t}},h=function(e){return function(t,a){var n=a(),r=e!==n.navigator.path;t(m(e,r))}},g=function(){return function(e,t){var a=t(),n=a.navigator.path.split("/");n.pop();var r=1===n.length?"/":n.join("/"),o=r!==a.navigator.path;e(m(r,o))}},f=function(e){return{type:"DRAWER_TOGGLE",open:e}},b=function(e,t){return{type:"DRAG_AND_DROP",source:e,target:t}},E=function(e){return{type:"CHANGE_VIEW_METHOD",method:e}},v=function(){return{type:"TOGGLE_DAYLIGHT_MODE"}},O=function(e,t){return{type:"CHANGE_CONTEXT_MENU",menuType:e,open:t}},j=function(e){return{type:"SET_NAVIGATOR_LOADING_STATUE",status:e}},w=function(e,t){return{type:"SET_NAVIGATOR_ERROR",status:e,msg:t}},y=function(){return{type:"OPEN_CREATE_FOLDER_DIALOG"}},x=function(){return{type:"OPEN_CREATE_FILE_DIALOG"}},C=function(e){return{type:"SET_USER_POPOVER",anchor:e}},k=function(e){return{type:"SET_SHARE_USER_POPOVER",anchor:e}},S=function(){return{type:"OPEN_RENAME_DIALOG"}},N=function(e){return{type:"OPEN_RESAVE_DIALOG",key:e}},L=function(){return{type:"OPEN_MOVE_DIALOG"}},T=function(){return{type:"OPEN_REMOVE_DIALOG"}},R=function(){return{type:"OPEN_SHARE_DIALOG"}},P=function(e){return{type:"APPLY_THEME",theme:e}},F=function(e){return{type:"SET_SESSION_STATUS",status:e}},I=function(){return{type:"OPEN_MUSIC_DIALOG"}},D=function(){return{type:"OPEN_REMOTE_DOWNLOAD_DIALOG"}},M=function(){return{type:"OPEN_TORRENT_DOWNLOAD_DIALOG"}},_=function(){return{type:"OPEN_DECOMPRESS_DIALOG"}},A=function(){return{type:"OPEN_COMPRESS_DIALOG"}},U=function(){return{type:"OPEN_GET_SOURCE_DIALOG"}},W=function(){return{type:"OPEN_COPY_DIALOG"}},z=function(e){return{type:"OPEN_LOADING_DIALOG",text:e}},B=function(){return{type:"CLOSE_ALL_MODALS"}},G=function(e,t,a,n){return{type:"TOGGLE_SNACKBAR",vertical:e,horizontal:t,msg:a,color:n}},H=function(){return{type:"ENABLE_LOAD_UPLOADER"}},V=function(e){return{type:"SET_MODALS_LOADING",status:e}},q=function(){return{type:"REFRESH_FILE_LIST"}},Y=function(e){return{type:"SEARCH_MY_FILE",keywords:e}},K=function(e){return{type:"SHOW_IMG_PREIVEW",first:e}},J=function(){return{type:"REFRESH_STORAGE"}},Q=function(){return{type:"SAVE_FILE"}},$=function(e){return{type:"SET_SITE_CONFIG",config:e}}},41:function(e,t,a){"use strict";var n,r=a(0),o=a.n(r),i=a(39),l=a(327),c=a.n(l),s=a(326),p=a.n(s),u=a(325),d=a.n(u),m=a(328),h=a.n(m),g=a(29),f=a(174),b=a.n(f),E=a(21),v=a(329),O=a.n(v),j=a(199),w={audio:{color:"#651fff",icon:d.a},video:{color:"#d50000",icon:p.a},image:{color:"#d32f2f",icon:c.a},pdf:{color:"#f44336",icon:h.a},word:{color:"#538ce5",icon:g.k},ppt:{color:"rgb(239, 99, 63)",icon:g.j},excel:{color:"#4caf50",icon:g.h},text:{color:"#607d8b",icon:g.E},torrent:{color:"#5c6bc0",icon:g.B},zip:{color:"#f9a825",icon:g.L},excute:{color:"#1a237e",icon:g.K},android:{color:"#8bc34a",icon:g.d},file:{color:"#607d8b",icon:b.a},php:{color:"#777bb3",icon:g.y},go:{color:"#16b3da",icon:g.w},python:{color:"#3776ab",icon:g.z},c:{color:"#a8b9cc",icon:g.u},cpp:{color:"#004482",icon:g.v},js:{color:"#f4d003",icon:g.x}};t.a=function(e){var t=O()(),a=e.fileName.split(".").pop().toLowerCase(),r="file";Object.keys(i.i).forEach((function(e){-1!==i.i[e].indexOf(a)&&(r=e)}));var l=w[r].icon;return n=function(e,t){return"light"===e.palette.type?t:Object(E.i)(t,.2)}(t,w[r].color),e.getColorValue&&e.getColorValue(n),o.a.createElement(o.a.Fragment,null,e.isUpload&&o.a.createElement(j.a,{className:e.className,style:{backgroundColor:n}},o.a.createElement(l,{className:e.iconClassName,style:{color:t.palette.background.paper}})),!e.isUpload&&o.a.createElement(l,{className:e.className,style:{color:n}}))}},62:function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return r}));var n=function(){return{type:"CLOSE_CONTEXT_MENU"}},r=function(e){return function(t,a){var n=a();document.title=null===e||void 0===e?n.siteConfig.title:e+" - "+n.siteConfig.title,t(function(e){return{type:"SET_SUBTITLE",title:e}}(e))}}},6341:function(e,t,a){e.exports=a(6402)},6402:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),o=a(33),i=a.n(o);function l(e,t){navigator.serviceWorker.register(e).then((function(e){e.onupdatefound=function(){var a=e.installing;null!=a&&(a.onstatechange=function(){"installed"===a.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://bit.ly/CRA-PWA."),t&&t.onUpdate&&t.onUpdate(e)):(console.log("Content is cached for offline use."),t&&t.onSuccess&&t.onSuccess(e)))})}})).catch((function(e){console.error("Error during service worker registration:",e)}))}var c=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 s=a(20),p=a(8),u=a(89),d=a(322),m=a(10),h=a(130),g=a(19);var f=function(e){var t=e.children,a=Object(h.a)(e,["children"]);return r.a.createElement(s.b,Object.assign({},a,{render:function(e){var n=e.location;return g.a.Check(a.isLogin)?t:r.a.createElement(s.a,{to:{pathname:"/login",state:{from:n}}})}}))},b=a(324),E=a(6406),v=a(308),O=a(123),j=a(21),w=a(93),y=a(6476),x=a(6529),C=a(18),k=a(184),S=a.n(k),N=Object(w.a)((function(e){return{icon:{fontSize:"160px"},emptyContainer:{bottom:"0",height:"300px",margin:"50px auto",width:"300px",color:Object(j.i)(e.palette.text.disabled,.4),textAlign:"center",paddingTop:"20px"},emptyInfoBig:{fontSize:"25px",color:Object(j.i)(e.palette.text.disabled,.4)}}}));function L(e){var t=N();return r.a.createElement("div",{className:t.emptyContainer},r.a.createElement(S.a,{className:t.icon}),r.a.createElement("div",{className:t.emptyInfoBig},e.msg))}var T=a(9),R=a(6),P=a(357),F=a.n(P),I=a(95),D=a(199),M=a(46),_=a(397),A=a(6421),U=a(6423),W=a(6486),z=a(151),B=a(6485),G=a(4),H=a(11),V=a(118),q=a.n(V),Y=a(185),K=a(13),J=function(e){if(void 0!==e.user&&!e.user.anonymous){var t=JSON.parse(e.themes),a=e.user;delete e.user,""!==a.preferred_theme&&void 0!==t[a.preferred_theme]&&(e.theme=t[a.preferred_theme]),g.a.authenticate(a)}return void 0!==e.user&&e.user.anonymous&&g.a.SetUser(e.user),e};function Q(){var e=g.a.GetUser();window.policyType=null!==e?e.policy.saveType:"local",window.uploadConfig=null!==e?e.policy:{},window.pathCache=[]}function $(){return($=Object(Y.a)(q.a.mark((function e(t){return q.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:H.b.get("/site/config").then((function(e){var a=JSON.parse(e.data.themes);e.data.theme=a[e.data.defaultTheme],e.data=J(e.data),t.dispatch(Object(G.K)(e.data)),localStorage.setItem("siteConfigCache",JSON.stringify(e.data));var n=g.a.GetPreference("view_method");n?t.dispatch(Object(G.c)(n)):K.a.isSharePage(window.location.pathname)?t.dispatch(Object(G.c)(e.data.share_view_method)):t.dispatch(Object(G.c)(e.data.home_view_method))})).catch((function(e){t.dispatch(Object(G.O)("top","right","\u65e0\u6cd5\u52a0\u8f7d\u7ad9\u70b9\u914d\u7f6e\uff1a"+e.message,"error"))})).then((function(){Q(),t.dispatch(Object(G.g)())}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var X=a(6487),Z=a(6488),ee=a(128),te=a.n(ee),ae=Object(w.a)((function(){return{icp:{padding:"8px 24px",position:"absolute",bottom:0}}})),ne=function(){var e=Object(p.e)((function(e){return e.siteConfig.siteICPId})),t=ae(),a=Object(s.g)(),o=Object(n.useState)(!0),i=Object(T.a)(o,2),l=i[0],c=i[1];return Object(n.useEffect)((function(){var t=K.a.isSharePage(a.pathname),n=K.a.isLoginPage(a.pathname);c(e&&(t||n))}),[e,a]),l?r.a.createElement("div",{className:t.icp},"\u5907\u6848\u53f7: ",r.a.createElement(B.a,{href:"https://beian.miit.gov.cn/",rel:"noopener noreferrer",target:"_blank"},e)):r.a.createElement(r.a.Fragment,null)},re=a(84),oe=function(){return r.a.createElement(re.d,{height:80,width:200,speed:2,primaryColor:"#f3f3f3",secondaryColor:"#e4e4e4"},r.a.createElement("rect",{x:"4",y:"4",rx:"7",ry:"7",width:"392",height:"116"}))};var ie=function(){return r.a.createElement(oe,null)},le=Object(n.forwardRef)((function(e,t){var a=e.captchaRef,o=e.setLoading,i=Oe(),l=Object(n.useState)(""),c=Object(T.a)(l,2),s=c[0],u=c[1],d=Object(n.useState)(null),m=Object(T.a)(d,2),h=m[0],g=m[1],f=Object(p.d)(),b=Object(n.useCallback)((function(e,t,a,n){return f(Object(G.O)(e,t,a,n))}),[f]),E=function(){H.b.get("/site/captcha").then((function(e){g(e.data),o(!1)})).catch((function(e){b("top","right","\u65e0\u6cd5\u52a0\u8f7d\u9a8c\u8bc1\u7801\uff1a"+e.message,"error")}))};return Object(n.useEffect)((function(){t.current=E,E()}),[]),Object(n.useEffect)((function(){a.current.captchaCode=s}),[s]),r.a.createElement("div",{className:i.captchaContainer},r.a.createElement(_.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement(A.a,{htmlFor:"captcha"},"\u9a8c\u8bc1\u7801"),r.a.createElement(U.a,{name:"captcha",onChange:function(e){return u(e.target.value)},type:"text",id:"captcha",value:s,autoComplete:!0}))," ",r.a.createElement("div",null,null===h&&r.a.createElement("div",{className:i.captchaPlaceholder},r.a.createElement(ie,null)),null!==h&&r.a.createElement("img",{src:h,alt:"captcha",onClick:E})))}));var ce=a(23),se=a(24),pe=a(109),ue=a(25),de=a(26),me=function(e){Object(ue.a)(a,e);var t=Object(de.a)(a);function a(){var e;return Object(ce.a)(this,a),(e=t.call(this)).handleExpired=e.handleExpired.bind(Object(pe.a)(e)),e.handleErrored=e.handleErrored.bind(Object(pe.a)(e)),e.handleChange=e.handleChange.bind(Object(pe.a)(e)),e.handleRecaptchaRef=e.handleRecaptchaRef.bind(Object(pe.a)(e)),e}return Object(se.a)(a,[{key:"getValue",value:function(){return this.props.grecaptcha&&void 0!==this._widgetId?this.props.grecaptcha.getResponse(this._widgetId):null}},{key:"getWidgetId",value:function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null}},{key:"execute",value:function(){var e=this.props.grecaptcha;if(e&&void 0!==this._widgetId)return e.execute(this._widgetId);this._executeRequested=!0}},{key:"reset",value:function(){this.props.grecaptcha&&void 0!==this._widgetId&&this.props.grecaptcha.reset(this._widgetId)}},{key:"handleExpired",value:function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)}},{key:"handleErrored",value:function(){this.props.onErrored&&this.props.onErrored()}},{key:"handleChange",value:function(e){this.props.onChange&&this.props.onChange(e)}},{key:"explicitRender",value:function(){if(this.props.grecaptcha&&this.props.grecaptcha.render&&void 0===this._widgetId){var e=document.createElement("div");this._widgetId=this.props.grecaptcha.render(e,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge}),this.captcha.appendChild(e)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())}},{key:"componentDidMount",value:function(){this.explicitRender()}},{key:"componentDidUpdate",value:function(){this.explicitRender()}},{key:"componentWillUnmount",value:function(){void 0!==this._widgetId&&(this.delayOfCaptchaIframeRemoving(),this.reset())}},{key:"delayOfCaptchaIframeRemoving",value:function(){var e=document.createElement("div");for(document.body.appendChild(e),e.style.display="none";this.captcha.firstChild;)e.appendChild(this.captcha.firstChild);setTimeout((function(){document.body.removeChild(e)}),5e3)}},{key:"handleRecaptchaRef",value:function(e){this.captcha=e}},{key:"render",value:function(){var e=this.props,t=(e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,Object(h.a)(e,["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl"]));return r.a.createElement("div",Object.assign({},t,{ref:this.handleRecaptchaRef}))}}]),a}(r.a.Component);me.displayName="ReCAPTCHA",me.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var he=a(355);var ge=Object(he.a)((function(){return"https://".concat("recaptcha.net","/recaptcha/api.js?onload=").concat("onloadcallback","&render=explicit")}),{callbackName:"onloadcallback",globalName:"grecaptcha"})(me),fe=function(e){var t=e.captchaRef,a=e.setLoading,o=Oe(),i=Object(n.useState)(""),l=Object(T.a)(i,2),c=l[0],s=l[1],u=Object(p.e)((function(e){return e.siteConfig.captcha_ReCaptchaKey}));return Object(n.useEffect)((function(){t.current.captchaCode=c}),[c]),Object(n.useEffect)((function(){return a(!1)}),[]),r.a.createElement("div",{className:o.captchaContainer},r.a.createElement(_.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement("div",null,r.a.createElement(ge,{style:{display:"inline-block"},sitekey:u,onChange:function(e){return s(e)},id:"captcha",name:"captcha"})))," ")};var be=a(356),Ee=a.n(be),ve=Object(n.forwardRef)((function(e,t){var a=e.captchaRef,n=e.setLoading,o=e.isValidateRef,i=e.submitRef,l=Object(p.e)((function(e){return e.siteConfig.tcaptcha_captcha_app_id}));return r.a.createElement(Ee.a,{url:"https://ssl.captcha.qq.com/TCaptcha.js",onLoad:function(){try{t.current=new window.TencentCaptcha(l,(function(e){0===e.ret?(a.current.ticket=e.ticket,a.current.randstr=e.randstr,o.current.isValidate=!0,i.current.submit(),console.log(i)):i.current.setLoading(!1)}))}catch(e){console.error(e)}n(!1)}})}));var Oe=Object(w.a)((function(e){return{captchaContainer:Object(R.a)({display:"flex",marginTop:"10px"},e.breakpoints.down("sm"),{display:"block"})}})),je=function(e,t){},we=function(){var e=Object(p.e)((function(e){return e.siteConfig.captcha_type})),t=Object(n.useState)(!0),a=Object(T.a)(t,2),o=a[0],i=a[1],l=Object(n.useRef)((function(){})),c=function(e,t){var a=Object(n.useRef)({isValidate:!0}),o=Object(n.useRef)({captchaCode:""}),i=Object(n.useCallback)((function(){return r.a.createElement(le,{captchaRef:o,ref:e,setLoading:t})}),[o,e,t]);return{isValidate:a,validate:je,captchaParamsRef:o,CaptchaRender:i}}(l,i),s=function(e){var t=Object(n.useRef)({isValidate:!0}),a=Object(n.useRef)({captchaCode:""}),o=Object(n.useCallback)((function(){return r.a.createElement(fe,{captchaRef:a,setLoading:e})}),[a,e]);return{isValidate:t,validate:je,captchaParamsRef:a,CaptchaRender:o}}(i),u=function(e){var t=Object(n.useRef)({isValidate:!1}),a=Object(n.useRef)({ticket:"",randstr:""}),o=Object(n.useRef)({submit:function(){},setLoading:function(){}}),i=Object(n.useRef)(),l=Object(n.useCallback)((function(){return r.a.createElement(ve,{captchaRef:a,setLoading:e,isValidateRef:t,submitRef:o,ref:i})}),[a,e,t,o,i]);return{isValidate:t,validate:function(e,t){o.current.submit=e,o.current.setLoading=t,i.current.show()},captchaParamsRef:a,CaptchaRender:l}}(i);switch(e){case"normal":return Object(m.a)(Object(m.a)({},c),{},{captchaRefreshRef:l,captchaLoading:o});case"recaptcha":return Object(m.a)(Object(m.a)({},s),{},{captchaRefreshRef:l,captchaLoading:o});case"tcaptcha":return Object(m.a)(Object(m.a)({},u),{},{captchaRefreshRef:l,captchaLoading:o});default:return Object(m.a)(Object(m.a)({},c),{},{captchaRefreshRef:l,captchaLoading:o})}},ye=Object(w.a)((function(e){var t;return{layout:(t={width:"auto",marginTop:"110px",marginLeft:e.spacing(3),marginRight:e.spacing(3)},Object(R.a)(t,e.breakpoints.up("sm"),{width:400,marginLeft:"auto",marginRight:"auto"}),Object(R.a)(t,"marginBottom",110),t),paper:{marginTop:e.spacing(8),display:"flex",flexDirection:"column",alignItems:"center",padding:"".concat(e.spacing(2),"px ").concat(e.spacing(3),"px ").concat(e.spacing(3),"px")},avatar:{margin:e.spacing(1),backgroundColor:e.palette.secondary.main},form:{width:"100%",marginTop:e.spacing(1)},submit:{marginTop:e.spacing(3)},link:{marginTop:"20px",display:"flex",width:"100%",justifyContent:"space-between"},captchaContainer:Object(R.a)({display:"flex",marginTop:"10px"},e.breakpoints.down("sm"),{display:"block"}),captchaPlaceholder:{width:200},buttonContainer:{display:"flex"},authnLink:{textAlign:"center",marginTop:16}}}));var xe=function(){var e=Object(n.useState)(""),t=Object(T.a)(e,2),a=t[0],o=t[1],i=Object(n.useState)(""),l=Object(T.a)(i,2),c=l[0],u=l[1],d=Object(n.useState)(!1),h=Object(T.a)(d,2),f=h[0],b=h[1],E=Object(n.useState)(!1),v=Object(T.a)(E,2),O=v[0],j=v[1],w=Object(n.useState)(!1),y=Object(T.a)(w,2),x=y[0],k=y[1],S=Object(n.useState)(""),N=Object(T.a)(S,2),L=N[0],R=N[1],P=Object(p.e)((function(e){return e.siteConfig.loginCaptcha})),V=Object(p.e)((function(e){return e.siteConfig.title})),q=Object(p.e)((function(e){return e.siteConfig.authn})),Y=Object(p.d)(),K=Object(n.useCallback)((function(e,t,a,n){return Y(Object(G.O)(e,t,a,n))}),[Y]),J=Object(n.useCallback)((function(e){return Y(Object(G.a)(e))}),[Y]),$=Object(n.useCallback)((function(e){return Y(Object(G.I)(e))}),[Y]),ee=Object(s.f)(),ae=Object(s.g)(),re=we(),oe=re.captchaLoading,ie=re.isValidate,le=re.validate,ce=re.CaptchaRender,se=re.captchaRefreshRef,pe=re.captchaParamsRef,ue=new URLSearchParams(Object(s.g)().search),de=ye();Object(n.useEffect)((function(){o(ue.get("username"))}),[ae]);var me=function(e){g.a.authenticate(e),""!==e.preferred_theme&&J(e.preferred_theme),Q(),$(!0),ee.push("/home"),K("top","right","\u767b\u5f55\u6210\u529f","success"),localStorage.removeItem("siteConfigCache")};return r.a.createElement("div",{className:de.layout},!x&&r.a.createElement(r.a.Fragment,null,r.a.createElement(I.a,{className:de.paper},r.a.createElement(D.a,{className:de.avatar},r.a.createElement(F.a,null)),r.a.createElement(M.a,{component:"h1",variant:"h5"},"\u767b\u5f55 ",V),!O&&r.a.createElement("form",{className:de.form,onSubmit:function e(t){t.preventDefault(),b(!0),ie.current.isValidate||!P?H.b.post("/user/session",Object(m.a)({userName:a,Password:c},pe.current)).then((function(e){b(!1),203===e.rawData.code?k(!0):me(e.data)})).catch((function(e){b(!1),K("top","right",e.message,"warning"),se.current()})):le((function(){return e(t)}),b)}},r.a.createElement(_.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement(A.a,{htmlFor:"email"},"\u7535\u5b50\u90ae\u7bb1"),r.a.createElement(U.a,{id:"email",type:"email",name:"email",onChange:function(e){return o(e.target.value)},autoComplete:!0,value:a,autoFocus:!0})),r.a.createElement(_.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement(A.a,{htmlFor:"password"},"\u5bc6\u7801"),r.a.createElement(U.a,{name:"password",onChange:function(e){return u(e.target.value)},type:"password",id:"password",value:c,autoComplete:!0})),P&&r.a.createElement(ce,null),r.a.createElement(W.a,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",disabled:f||!!P&&oe,className:de.submit},"\u767b\u5f55")),O&&r.a.createElement("form",{className:de.form},r.a.createElement(_.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement(A.a,{htmlFor:"email"},"\u7535\u5b50\u90ae\u7bb1"),r.a.createElement(U.a,{id:"email",type:"email",name:"email",onChange:function(e){return o(e.target.value)},autoComplete:!0,value:a,autoFocus:!0})),r.a.createElement(W.a,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",disabled:f,onClick:function(e){e.preventDefault(),navigator.credentials?(b(!0),H.b.get("/user/authn/"+a).then((function(e){var t=e.data;return console.log(t),t.publicKey.challenge=Object(C.c)(t.publicKey.challenge),t.publicKey.allowCredentials.forEach((function(e){e.id=Object(C.c)(e.id)})),navigator.credentials.get({publicKey:t.publicKey})})).then((function(e){var t=e.response.authenticatorData,n=e.response.clientDataJSON,r=e.rawId,o=e.response.signature,i=e.response.userHandle;return H.b.post("/user/authn/finish/"+a,JSON.stringify({id:e.id,rawId:Object(C.d)(r),type:e.type,response:{authenticatorData:Object(C.d)(t),clientDataJSON:Object(C.d)(n),signature:Object(C.d)(o),userHandle:Object(C.d)(i)}}))})).then((function(e){me(e.data)})).catch((function(e){console.log(e),K("top","right",e.message,"warning")})).then((function(){b(!1)}))):K("top","right","\u5f53\u524d\u6d4f\u89c8\u5668\u6216\u73af\u5883\u4e0d\u652f\u6301","warning")},className:de.submit},"\u4e0b\u4e00\u6b65")),r.a.createElement(z.a,null),r.a.createElement("div",{className:de.link},r.a.createElement("div",null,r.a.createElement(B.a,{href:"/forget"},"\u5fd8\u8bb0\u5bc6\u7801")),r.a.createElement("div",null,r.a.createElement(B.a,{href:"/signup"},"\u6ce8\u518c\u8d26\u53f7"))),r.a.createElement(ne,null)),q&&r.a.createElement("div",{className:de.authnLink},r.a.createElement(W.a,{color:"primary",onClick:function(){return j(!O)}},!O&&r.a.createElement(r.a.Fragment,null,r.a.createElement(X.a,{style:{marginRight:8}}),"\u4f7f\u7528\u5916\u90e8\u9a8c\u8bc1\u5668\u767b\u5f55"),O&&r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.a,{style:{marginRight:8}}),"\u4f7f\u7528\u5bc6\u7801\u767b\u5f55")))),x&&r.a.createElement(I.a,{className:de.paper},r.a.createElement(D.a,{className:de.avatar},r.a.createElement(te.a,null)),r.a.createElement(M.a,{component:"h1",variant:"h5"},"\u4e8c\u6b65\u9a8c\u8bc1"),r.a.createElement("form",{className:de.form,onSubmit:function(e){e.preventDefault(),b(!0),H.b.post("/user/2fa",{code:L}).then((function(e){b(!1),me(e.data)})).catch((function(e){b(!1),K("top","right",e.message,"warning")}))}},r.a.createElement(_.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement(A.a,{htmlFor:"code"},"\u8bf7\u8f93\u5165\u516d\u4f4d\u4e8c\u6b65\u9a8c\u8bc1\u4ee3\u7801"),r.a.createElement(U.a,{id:"code",type:"number",name:"code",onChange:function(e){return R(e.target.value)},autoComplete:!0,value:L,autoFocus:!0})),r.a.createElement(W.a,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",disabled:f,className:de.submit},"\u7ee7\u7eed\u767b\u5f55")," ")," ",r.a.createElement(z.a,null)))},Ce=a(6507),ke=a(220),Se=a(62),Ne=a(6490),Le=a(27),Te=a.n(Le),Re=a(108),Pe=a(64),Fe=a(7),Ie=a(41),De=a(104),Me=a.n(De),_e=a(71),Ae=a(6489),Ue=function(e){Object(ue.a)(a,e);var t=Object(de.a)(a);function a(){var e;Object(ce.a)(this,a);for(var n=arguments.length,r=new Array(n),o=0;o0&&r.a.createElement(r.a.Fragment,null,t.slice(0,3).map((function(e,o){return r.a.createElement("div",{key:e.id,className:n.cardDragged,style:{zIndex:t.length-o,transform:"rotateZ(".concat(2.5*-o,"deg)")}},Je(e,a,n))}))))},$e={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"};function Xe(e,t,a,n){if(!e||!t)return{display:"none"};var r=t.x,o=t.y;"list"===n&&(r+=a.x-e.x,o+=a.y-e.y);var i="translate(".concat(r,"px, ").concat(o,"px)");return{opacity:.5,transform:i,WebkitTransform:i}}var Ze=function(e){var t=Object(Ne.a)((function(e){return{item:e.getItem(),itemType:e.getItemType(),initialOffset:e.getInitialSourceClientOffset(),currentOffset:e.getSourceClientOffset(),pointerOffset:e.getInitialClientOffset(),isDragging:e.isDragging()}})),a=t.itemType,n=t.isDragging,o=t.item,i=t.initialOffset,l=t.currentOffset,c=t.pointerOffset,s=Object(p.e)((function(e){return e.viewUpdate.explorerViewMethod}));return n?r.a.createElement("div",{style:$e},r.a.createElement("div",{style:Xe(i,l,c,s)},function(){switch(a){case"object":return r.a.createElement(Qe,{object:o.object});default:return null}}())):null},et=a(36),tt=a(6496),at=a(6497),nt=a(6494),rt=a(6495),ot=a(6498),it=a(6499),lt=a(6424),ct=a(6537),st=a(365),pt=a.n(st),ut=a(132),dt=a(102),mt=a(129),ht={actions:dt,reducers:mt},gt=a(55),ft=a(135),bt=a(226),Et=a(6491),vt=a(6492),Ot=a(6493),jt=a(183),wt=a.n(jt),yt=a(94),xt=a.n(yt),Ct=a(133),kt=a.n(Ct),St=a(112),Nt=a.n(St),Lt=a(101),Tt=a.n(Lt),Rt=a(361),Pt=a.n(Rt),Ft=a(182),It=a.n(Ft),Dt=a(127),Mt=a.n(Dt),_t=a(360),At=a.n(_t),Ut=a(103),Wt=a.n(Ut),zt=a(92),Bt=a.n(zt),Gt=a(29),Ht=a(39),Vt=a(91),qt=a.n(Vt),Yt=Object(Fe.a)({root:{minWidth:38}})(gt.a),Kt=function(e){Object(ue.a)(a,e);var t=Object(de.a)(a);function a(){var e;Object(ce.a)(this,a);for(var n=arguments.length,o=new Array(n),i=0;i0&&"bottom"!=o&&(a.push(r.a.createElement(z.a,{key:n,className:e.props.classes.divider})),n++)})),a},e}return Object(se.a)(a,[{key:"render",value:function(){var e=this,t=this.props.classes,a=g.a.GetUser(),n=K.a.isHomePage(this.props.location.pathname);qt.a,kt.a,Gt.m,a.group.allowRemoteDownload,xt.a,Nt.a,Gt.i;return r.a.createElement("div",null,r.a.createElement(bt.a,{keepMounted:!0,open:this.props.menuOpen,onClose:function(){return e.props.changeContextMenu(e.props.menuType,!1)},anchorReference:"anchorPosition",anchorPosition:{top:this.Y,left:this.X},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},"empty"===this.props.menuType&&r.a.createElement("div",null,r.a.createElement(ft.a,{dense:!0,onClick:function(){e.props.refreshFileList(),e.props.changeContextMenu(e.props.menuType,!1)}},r.a.createElement(Yt,null,r.a.createElement(qt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u5237\u65b0")),r.a.createElement(z.a,{className:t.divider}),r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.clickUpload("uploadFileForm")}},r.a.createElement(Yt,null,r.a.createElement(kt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u4e0a\u4f20\u6587\u4ef6")),r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.clickUpload("uploadFolderForm")}},r.a.createElement(Yt,null,r.a.createElement(Gt.m,null)),r.a.createElement(M.a,{variant:"inherit"},"\u4e0a\u4f20\u76ee\u5f55")),a.group.allowRemoteDownload&&r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openRemoteDownloadDialog()}},r.a.createElement(Yt,null,r.a.createElement(xt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u79bb\u7ebf\u4e0b\u8f7d")),r.a.createElement(z.a,{className:t.divider}),r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openCreateFolderDialog()}},r.a.createElement(Yt,null,r.a.createElement(Nt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u521b\u5efa\u6587\u4ef6\u5939")),r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openCreateFileDialog()}},r.a.createElement(Yt,null,r.a.createElement(Gt.i,null)),r.a.createElement(M.a,{variant:"inherit"},"\u521b\u5efa\u6587\u4ef6"))),"empty"!==this.props.menuType&&r.a.createElement("div",null,!this.props.isMultiple&&this.props.withFolder&&r.a.createElement("div",null,r.a.createElement(ft.a,{dense:!0,onClick:this.enterFolder},r.a.createElement(Yt,null,r.a.createElement(It.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u8fdb\u5165")),n&&r.a.createElement(z.a,{className:t.divider})),!this.props.isMultiple&&this.props.withFile&&(!this.props.share||this.props.share.preview)&&Object(Ht.g)(this.props.selected[0].name)&&r.a.createElement("div",null,r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openPreview()}},r.a.createElement(Yt,null,r.a.createElement(Wt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u6253\u5f00"))),!this.props.isMultiple&&this.props.withFile&&r.a.createElement("div",null,r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.openDownload()}},r.a.createElement(Yt,null,r.a.createElement(xt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u4e0b\u8f7d")),n&&r.a.createElement(z.a,{className:t.divider})),(this.props.isMultiple||this.props.withFolder)&&(a.group.allowArchiveDownload||!n)&&r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.openArchiveDownload()}},r.a.createElement(Yt,null,r.a.createElement(xt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u6253\u5305\u4e0b\u8f7d")),!this.props.isMultiple&&this.props.withFile&&n&&a.policy.allowSource&&r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openGetSourceDialog()}},r.a.createElement(Yt,null,r.a.createElement(At.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u83b7\u53d6\u5916\u94fe")),!this.props.isMultiple&&n&&a.group.allowRemoteDownload&&this.props.withFile&&Object(Ht.h)(this.props.selected[0].name)&&r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openTorrentDownloadDialog()}},r.a.createElement(Yt,null,r.a.createElement(Gt.B,null)),r.a.createElement(M.a,{variant:"inherit"},"\u521b\u5efa\u79bb\u7ebf\u4e0b\u8f7d\u4efb\u52a1")),!this.props.isMultiple&&n&&a.group.compress&&this.props.withFile&&Object(Ht.f)(this.props.selected[0].name)&&r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openDecompressDialog()}},r.a.createElement(Yt,null,r.a.createElement(Et.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u89e3\u538b\u7f29")),n&&a.group.compress&&r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openCompressDialog()}},r.a.createElement(Yt,null,r.a.createElement(vt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u521b\u5efa\u538b\u7f29\u6587\u4ef6")),!this.props.isMultiple&&n&&r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openShareDialog()}},r.a.createElement(Yt,null,r.a.createElement(Bt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u521b\u5efa\u5206\u4eab\u94fe\u63a5")),!this.props.isMultiple&&n&&r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.toggleObjectInfoSidebar(!0)}},r.a.createElement(Yt,null,r.a.createElement(Ot.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u8be6\u7ec6\u4fe1\u606f")),!this.props.isMultiple&&n&&r.a.createElement(z.a,{className:t.divider}),!this.props.isMultiple&&n&&r.a.createElement("div",null,r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openRenameDialog()}},r.a.createElement(Yt,null,r.a.createElement(wt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u91cd\u547d\u540d")),""===this.props.keywords&&r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openCopyDialog()}},r.a.createElement(Yt,null,r.a.createElement(Pt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u590d\u5236"))),n&&r.a.createElement("div",null,""===this.props.keywords&&r.a.createElement(ft.a,{dense:!0,onClick:function(){return e.props.openMoveDialog()}},r.a.createElement(Yt,null,r.a.createElement(Mt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u79fb\u52a8")),r.a.createElement(z.a,{className:t.divider}),r.a.createElement(ft.a,{dense:!0,className:t.propover,onClick:function(){return e.props.openRemoveDialog()}},r.a.createElement(Yt,null,r.a.createElement(Tt.a,null)),r.a.createElement(M.a,{variant:"inherit"},"\u5220\u9664"))))))}}]),a}(n.Component),Jt=Object(p.c)((function(e){return{menuType:e.viewUpdate.contextType,menuOpen:e.viewUpdate.contextOpen,isMultiple:e.explorer.selectProps.isMultiple,withFolder:e.explorer.selectProps.withFolder,withFile:e.explorer.selectProps.withFile,path:e.navigator.path,selected:e.explorer.selected,keywords:e.explorer.keywords}}),(function(e){return{changeContextMenu:function(t,a){e(Object(G.b)(t,a))},setNavigatorLoadingStatus:function(t){e(Object(G.G)(t))},setSelectedTarget:function(t){e(Object(G.H)(t))},navigateTo:function(t){e(Object(G.h)(t))},openCreateFolderDialog:function(){e(Object(G.m)())},openCreateFileDialog:function(){e(Object(G.l)())},openRenameDialog:function(){e(Object(G.v)())},openMoveDialog:function(){e(Object(G.q)())},openRemoveDialog:function(){e(Object(G.u)())},openShareDialog:function(){e(Object(G.x)())},showImgPreivew:function(t){e(Object(G.M)(t))},openMusicDialog:function(){e(Object(G.r)())},toggleSnackbar:function(t,a,n,r){e(Object(G.O)(t,a,n,r))},openRemoteDownloadDialog:function(){e(Object(G.t)())},openTorrentDownloadDialog:function(){e(Object(G.y)())},openGetSourceDialog:function(){e(Object(G.o)())},openCopyDialog:function(){e(Object(G.k)())},openLoadingDialog:function(t){e(Object(G.p)(t))},openDecompressDialog:function(){e(Object(G.n)())},openCompressDialog:function(){e(Object(G.j)())},refreshFileList:function(){e(Object(G.z)())},openPreview:function(){e(Object(G.s)())},toggleObjectInfoSidebar:function(t){e(Object(dt.toggleObjectInfoSidebar)(t))}}}))(Object(Fe.a)((function(){return{propover:{},divider:{marginTop:4,marginBottom:4}}}))(Object(s.j)(Kt))),Qt=a(362),$t=a(364),Xt=a.n($t),Zt=function(e){Object(ue.a)(a,e);var t=Object(de.a)(a);function a(){var e;Object(ce.a)(this,a);for(var n=arguments.length,r=new Array(n),o=0;o0&&!e.props.share&&e.props.openRemoveDialog()},SELECT_ALL:function(t){t.preventDefault(),e.props.selected.length>=e.props.dirList.length+e.props.fileList.length?e.props.setSelectedTarget([]):e.props.setSelectedTarget([].concat(Object(et.a)(e.props.dirList),Object(et.a)(e.props.fileList)))}},Object(ut.configure)({ignoreTags:["input","select","textarea"]}),e}return Object(se.a)(a,[{key:"componentDidUpdate",value:function(){this.away=0}},{key:"render",value:function(){var e,t=this,a=this.props.classes,n=K.a.isHomePage(this.props.location.pathname),o=!this.props.loading&&(0!==this.props.dirList.length||0!==this.props.fileList.length),i=r.a.createElement(tt.a,{className:a.table},r.a.createElement(at.a,null,r.a.createElement(nt.a,null,r.a.createElement(rt.a,null,r.a.createElement(ct.a,{active:"namePos"===this.props.sortMethod||"nameRev"===this.props.sortMethod,direction:"namePos"===this.props.sortMethod?"asc":"des",onClick:function(){t.props.changeSort("namePos"===t.props.sortMethod?"nameRev":"namePos")}},"\u540d\u79f0","namePos"===this.props.sortMethod||"nameRev"===this.props.sortMethod?r.a.createElement("span",{className:a.visuallyHidden},"nameRev"===this.props.sortMethod?"sorted descending":"sorted ascending"):null)),r.a.createElement(rt.a,{className:a.hideAuto},r.a.createElement(ct.a,{active:"sizePos"===this.props.sortMethod||"sizeRes"===this.props.sortMethod,direction:"sizePos"===this.props.sortMethod?"asc":"des",onClick:function(){t.props.changeSort("sizePos"===t.props.sortMethod?"sizeRes":"sizePos")}},"\u5927\u5c0f","sizePos"===this.props.sortMethod||"sizeRes"===this.props.sortMethod?r.a.createElement("span",{className:a.visuallyHidden},"sizeRes"===this.props.sortMethod?"sorted descending":"sorted ascending"):null)),r.a.createElement(rt.a,{className:a.hideAuto},r.a.createElement(ct.a,{active:"timePos"===this.props.sortMethod||"timeRev"===this.props.sortMethod,direction:"timePos"===this.props.sortMethod?"asc":"des",onClick:function(){t.props.changeSort("timePos"===t.props.sortMethod?"timeRev":"timePos")}},"\u65e5\u671f","timePos"===this.props.sortMethod||"timeRev"===this.props.sortMethod?r.a.createElement("span",{className:a.visuallyHidden},"sizeRes"===this.props.sortMethod?"sorted descending":"sorted ascending"):null)))),r.a.createElement(ot.a,null,K.a.isMobile()&&"/"!==this.props.path&&r.a.createElement(ia,{file:{type:"up",name:"\u4e0a\u7ea7\u76ee\u5f55"}}),this.props.dirList.map((function(e,t){return r.a.createElement(ia,{key:e.id,file:e,index:t})})),this.props.fileList.map((function(e,t){return r.a.createElement(ia,{key:e.id,file:e,index:t})})))),l=r.a.createElement("div",{className:a.flexFix},0!==this.props.dirList.length&&r.a.createElement(r.a.Fragment,null,r.a.createElement(M.a,{"data-clickAway":"true",variant:"body2",className:a.typeHeader},"\u6587\u4ef6\u5939"),r.a.createElement(it.a,{"data-clickAway":"true",container:!0,spacing:0,alignItems:"flex-start"},this.props.dirList.map((function(e,t){return r.a.createElement(it.a,{key:e.id,item:!0,xs:6,md:3,sm:4,lg:2},r.a.createElement(ia,{key:e.id,file:e,index:t}))})))),0!==this.props.fileList.length&&r.a.createElement(r.a.Fragment,null,r.a.createElement(M.a,{"data-clickAway":"true",variant:"body2",className:a.typeHeader},"\u6587\u4ef6"),r.a.createElement(it.a,{"data-clickAway":"true",container:!0,spacing:0,alignItems:"flex-start"},this.props.fileList.map((function(e,t){return r.a.createElement(it.a,{key:e.id,item:!0,xs:6,md:3,sm:4,lg:2},r.a.createElement(ia,{key:e.id,index:t,file:e}))}))))),c="list"===this.props.viewMethod?i:l;return r.a.createElement("div",{onContextMenu:this.contextMenu,onClick:this.ClickAway,className:Te()((e={},Object(R.a)(e,a.root,"list"!==this.props.viewMethod),Object(R.a)(e,a.rootTable,"list"===this.props.viewMethod),Object(R.a)(e,a.rootShare,this.props.share),e),a.button)},r.a.createElement(ut.GlobalHotKeys,{handlers:this.handlers,keyMap:this.keyMap}),r.a.createElement(Jt,{share:this.props.share}),r.a.createElement(Qt.default,null),this.props.navigatorError&&r.a.createElement(I.a,{elevation:1,className:a.errorBox},r.a.createElement(M.a,{variant:"h5",component:"h3"},":( \u8bf7\u6c42\u65f6\u51fa\u73b0\u9519\u8bef"),r.a.createElement(M.a,{color:"textSecondary",className:a.errorMsg},this.props.navigatorErrorMsg.message)),this.props.loading&&!this.props.navigatorError&&r.a.createElement("div",{className:a.loading},r.a.createElement(lt.a,null)),""===this.props.keywords&&n&&0===this.props.dirList.length&&0===this.props.fileList.length&&!this.props.loading&&!this.props.navigatorError&&r.a.createElement("div",{className:a.emptyContainer},r.a.createElement(pt.a,{className:a.emptyIcon}),r.a.createElement("div",{className:a.emptyInfoBig},"\u62d6\u62fd\u6587\u4ef6\u81f3\u6b64"),r.a.createElement("div",{className:a.emptyInfoSmall},"\u6216\u70b9\u51fb\u53f3\u4e0b\u65b9\u201c\u4e0a\u4f20\u6587\u4ef6\u201d\u6309\u94ae\u6dfb\u52a0\u6587\u4ef6")),(""!==this.props.keywords&&0===this.props.dirList.length&&0===this.props.fileList.length&&!this.props.loading&&!this.props.navigatorError||0===this.props.dirList.length&&0===this.props.fileList.length&&!this.props.loading&&!this.props.navigatorError&&!n)&&r.a.createElement("div",{className:a.emptyContainer},r.a.createElement(S.a,{className:a.emptyIcon}),r.a.createElement("div",{className:a.emptyInfoBig},"\u4ec0\u4e48\u90fd\u6ca1\u6709\u627e\u5230")),o&&c)}}]),a}(n.Component),ca=Object(p.c)((function(e){return{path:e.navigator.path,drawerDesktopOpen:e.viewUpdate.open,viewMethod:e.viewUpdate.explorerViewMethod,sortMethod:e.viewUpdate.sortMethod,fileList:e.explorer.fileList,dirList:e.explorer.dirList,loading:e.viewUpdate.navigatorLoading,navigatorError:e.viewUpdate.navigatorError,navigatorErrorMsg:e.viewUpdate.navigatorErrorMsg,keywords:e.explorer.keywords,selected:e.explorer.selected}}),(function(e){return{navigateToPath:function(t){e(Object(G.h)(t))},changeContextMenu:function(t,a){e(Object(G.b)(t,a))},navigateUp:function(){e(Object(G.i)())},setSelectedTarget:function(t){e(Object(G.H)(t))},openRemoveDialog:function(){e(Object(G.u)())},changeSort:function(t){e(ht.actions.changeSortMethod(t))}}}))(Object(Fe.a)((function(e){var t,a;return{paper:{padding:e.spacing(2),textAlign:"center",color:e.palette.text.secondary,margin:"10px"},root:(t={flexGrow:1,padding:"10px",overflowY:"auto",height:"calc(100vh - 113px)"},Object(R.a)(t,e.breakpoints.up("sm"),{overflowY:"auto",height:"calc(100vh - 113px)"}),Object(R.a)(t,e.breakpoints.down("sm"),{height:"100%"}),t),rootTable:(a={padding:"0px",backgroundColor:e.palette.background.paper.white},Object(R.a)(a,e.breakpoints.up("sm"),{overflowY:"auto",height:"calc(100vh - 113px)"}),Object(R.a)(a,e.breakpoints.down("sm"),{height:"100%"}),a),typeHeader:{margin:"10px 25px",color:"#6b6b6b",fontWeight:"500"},loading:{justifyContent:"center",display:"flex",marginTop:"40px"},errorBox:{padding:e.spacing(4)},errorMsg:{marginTop:"10px"},emptyContainer:{bottom:"0",height:"300px",margin:"50px auto",width:"300px",color:e.palette.text.disabled,textAlign:"center",paddingTop:"20px"},emptyIcon:{fontSize:"160px"},emptyInfoBig:{fontSize:"25px",color:e.palette.text.disabled},emptyInfoSmall:{color:e.palette.text.hint},hideAuto:Object(R.a)({},e.breakpoints.down("sm"),{display:"none"}),flexFix:{minWidth:0},upButton:{marginLeft:"20px",marginTop:"10px",marginBottom:"10px"},clickAway:{height:"100%",width:"100%"},rootShare:{height:"100%",minHeight:500},visuallyHidden:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1}}}))(Object(s.j)(la))),sa=a(194),pa=a(53),ua=a.n(pa),da=a(370),ma=a.n(da),ha=a(369),ga=a.n(ha),fa=Object(w.a)((function(e){return{expandMore:{color:"#8d8d8d"},active:{boxShadow:"0 0 0 2px "+e.palette.primary.light},button:{textTransform:"none"}}}));function ba(e){var t=r.a.useRef(null),a=Object(na.a)({accept:"object",drop:function(){if(!e.more)return{folder:{id:-1,path:e.path,name:"/"===e.folder?"":e.folder}};t.current.click()},collect:function(e){return{isOver:e.isOver(),canDrop:e.canDrop()}}}),o=Object(T.a)(a,2),i=o[0],l=i.canDrop,c=i.isOver,s=o[1],p=l&&c;Object(n.useEffect)((function(){e.more&&p&&t.current.click()}),[p]);var u=fa();return r.a.createElement("span",{onClick:e.onClick,ref:t},r.a.createElement(W.a,{ref:s,className:Te()(Object(R.a)({},u.active,p),u.button),component:"span",title:e.title},e.more&&r.a.createElement(ga.a,null),!e.more&&r.a.createElement(r.a.Fragment,null,e.folder,e.last&&r.a.createElement(ma.a,{className:u.expandMore}))))}var Ea=a(54),va=Object(w.a)((function(e){return{active:{border:"2px solid "+e.palette.primary.light}}}));function Oa(e){var t=Object(na.a)({accept:"object",drop:function(){console.log({folder:{id:-1,path:e.path,name:"/"===e.folder?"":e.folder}})},collect:function(e){return{isOver:e.isOver(),canDrop:e.canDrop()}}}),a=Object(T.a)(t,2),o=a[0],i=o.canDrop,l=o.isOver,c=a[1],s=i&&l;Object(n.useEffect)((function(){e.setActiveStatus(e.id,s)}),[s]);var p=va();return r.a.createElement(ft.a,{ref:c,className:Te()(Object(R.a)({},p.active,s)),onClick:function(t){return e.navigateTo(t,e.id)}},r.a.createElement(gt.a,null,r.a.createElement(Ve.a,null)),r.a.createElement(Ea.a,{primary:e.folder}))}function ja(e){for(var t,a=e.folders.length,n=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:null;n.props.setNavigatorError(!1,null),n.setState({folders:null!==e?e.substr(1).split("/"):n.props.path.substr(1).split("/")});var t=null!==e?e:n.props.path,a=n.props.share?"/share/list/"+n.props.share.key:""===n.keywords?"/directory":"/file/search/";t=""===n.keywords?t:n.keywords,H.b.get(a+encodeURIComponent(t)).then((function(a){n.currentID=a.data.parent,n.props.updateFileList(a.data.objects),n.props.setNavigatorLoadingStatus(!1);var r=(null!==e?e.substr(1).split("/"):n.props.path.substr(1).split("/")).join(",");Object(C.p)("path_tmp",encodeURIComponent(r),1),""===n.keywords&&Object(C.q)("path",encodeURIComponent(t))})).catch((function(e){n.props.setNavigatorError(!0,e)})),n.checkOverFlow(!0)},n.redresh=function(e){n.props.setNavigatorLoadingStatus(!0),n.props.setNavigatorError(!1,"error"),n.renderPath(e)},n.UNSAFE_componentWillReceiveProps=function(e){n.props.keywords!==e.keywords&&(n.keywords=e.keywords),n.props.path!==e.path&&n.renderPath(e.path),n.props.refresh!==e.refresh&&n.redresh(e.path)},n.componentDidUpdate=function(e,t){var a;n.state.folders!==t.folders&&n.checkOverFlow(!0),n.props.drawerDesktopOpen!==e.drawerDesktopOpen&&(a=500,new Promise((function(e){return setTimeout(e,a)}))).then((function(){return n.checkOverFlow()}))},n.checkOverFlow=function(e){if((!n.overflowInitLock||e)&&null!==n.element.current){var t=n.element.current.offsetHeight0&&r.a.createElement("span",null,A(f.downloaded,f.total).toFixed(2),"% -"," ",0===f.downloaded?"0Bytes":Object(C.r)(f.downloaded),"/",0===f.total?"0Bytes":Object(C.r)(f.total)," ","-"," ","0"===f.speed?"0B/s":Object(C.r)(f.speed)+"/s"),0===f.total&&r.a.createElement("span",null," - "))),r.a.createElement(En.a,{className:a.contentSide},r.a.createElement(Na.a,null,r.a.createElement(kn.a,{className:Te()(Object(R.a)({},a.expanded,u===f.info.gid),a.expand)})))),r.a.createElement(_n,null,r.a.createElement(z.a,null),"multi"===f.info.bittorrent.mode&&r.a.createElement("div",{className:a.scroll},r.a.createElement(tt.a,{size:"small"},r.a.createElement(ot.a,null,U().map((function(e){return r.a.createElement(nt.a,{key:e.index,style:{background:"linear-gradient(to right, "+("dark"===o.palette.type?Object(j.a)(o.palette.primary.main,.4):Object(j.i)(o.palette.primary.main,.85))+" 0%,"+("dark"===o.palette.type?Object(j.a)(o.palette.primary.main,.4):Object(j.i)(o.palette.primary.main,.85))+" "+A(e.completedLength,e.length).toFixed(0)+"%,"+o.palette.background.paper+" "+A(e.completedLength,e.length).toFixed(0)+"%,"+o.palette.background.paper+" 100%)"}},r.a.createElement(rt.a,{component:"th",scope:"row"},r.a.createElement(M.a,{className:a.subFileName},r.a.createElement(Ie.a,{className:a.subFileIcon,fileName:e.path}),e.path)),r.a.createElement(rt.a,{component:"th",scope:"row"},r.a.createElement(M.a,{noWrap:!0}," ",Object(C.r)(e.length))),r.a.createElement(rt.a,{component:"th",scope:"row"},r.a.createElement(M.a,{noWrap:!0},A(e.completedLength,e.length).toFixed(2),"%")),r.a.createElement(rt.a,null,r.a.createElement(Pe.a,{title:"\u5220\u9664\u6b64\u6587\u4ef6"},r.a.createElement(Na.a,{onClick:function(){return function(e){w(!0);var t=U(),a=[],n=[];t.map((function(t){t.index!==e&&t.selected?(a.push(parseInt(t.index)),n.push(Object(m.a)(Object(m.a)({},t),{},{selected:"true"}))):n.push(Object(m.a)(Object(m.a)({},t),{},{selected:"false"}))})),H.b.put("/aria2/select/"+f.info.gid,{indexes:a}).then((function(){b(Object(m.a)(Object(m.a)({},f),{},{info:Object(m.a)(Object(m.a)({},f.info),{},{files:n})})),D("top","right","\u6587\u4ef6\u5df2\u5220\u9664","success")})).catch((function(e){D("top","right",e.message,"error")})).then((function(){w(!1)}))}(e.index)},disabled:O,size:"small"},r.a.createElement(Sn.a,null)))))}))))),r.a.createElement("div",{className:a.action},r.a.createElement(W.a,{className:a.actionButton,variant:"outlined",color:"secondary",onClick:function(){return i.push("/#/home?path="+encodeURIComponent(f.dst))}},"\u6253\u5f00\u5b58\u653e\u76ee\u5f55"),"multi"===f.info.bittorrent.mode&&r.a.createElement(W.a,{className:a.actionButton,variant:"outlined",color:"secondary",disabled:O,onClick:function(){S(!0),F(Object(et.a)(e.task.info.files))}},"\u9009\u62e9\u8981\u4e0b\u8f7d\u7684\u6587\u4ef6"),r.a.createElement(W.a,{className:a.actionButton,onClick:function(){w(!0),H.b.delete("/aria2/task/"+f.info.gid).then((function(){D("top","right","\u4efb\u52a1\u5df2\u53d6\u6d88\uff0c\u72b6\u6001\u4f1a\u5728\u7a0d\u540e\u66f4\u65b0","success")})).catch((function(e){D("top","right",e.message,"error")})).then((function(){w(!1)}))},variant:"contained",color:"secondary",disabled:O},"\u53d6\u6d88\u4efb\u52a1")),r.a.createElement(z.a,null),r.a.createElement("div",{className:a.info},""!==f.info.bitfield&&r.a.createElement("canvas",{width:"700",height:"100",ref:t,className:a.bitmap}),r.a.createElement(it.a,{container:!0},r.a.createElement(it.a,{container:!0,xs:12,sm:4},r.a.createElement(it.a,{item:!0,xs:4,className:a.infoTitle},"\u66f4\u65b0\u4e8e\uff1a"),r.a.createElement(it.a,{item:!0,xs:8,className:a.infoValue},r.a.createElement(La.a,{datetime:parseInt(f.update+"000"),locale:"zh_CN"}))),r.a.createElement(it.a,{container:!0,xs:12,sm:4},r.a.createElement(it.a,{item:!0,xs:4,className:a.infoTitle},"\u4e0a\u4f20\u5927\u5c0f\uff1a"),r.a.createElement(it.a,{item:!0,xs:8,className:a.infoValue},Object(C.r)(f.info.uploadLength))),r.a.createElement(it.a,{container:!0,xs:12,sm:4},r.a.createElement(it.a,{item:!0,xs:4,className:a.infoTitle},"\u4e0a\u4f20\u901f\u5ea6\uff1a"),r.a.createElement(it.a,{item:!0,xs:8,className:a.infoValue},Object(C.r)(f.info.uploadSpeed)," / s")),""!==f.info.bittorrent.mode&&r.a.createElement(r.a.Fragment,null,r.a.createElement(it.a,{container:!0,xs:12,sm:8},r.a.createElement(it.a,{item:!0,sm:2,xs:4,className:a.infoTitle},"InfoHash\uff1a"),r.a.createElement(it.a,{item:!0,sm:10,xs:8,style:{wordBreak:"break-all"},className:a.infoValue},f.info.infoHash)),r.a.createElement(it.a,{container:!0,xs:12,sm:4},r.a.createElement(it.a,{item:!0,xs:4,className:a.infoTitle},"\u505a\u79cd\u8005\uff1a"),r.a.createElement(it.a,{item:!0,xs:8,className:a.infoValue},f.info.numSeeders)),r.a.createElement(it.a,{container:!0,xs:12,sm:4},r.a.createElement(it.a,{item:!0,xs:4,className:a.infoTitle},"\u505a\u79cd\u4e2d\uff1a"),r.a.createElement(it.a,{item:!0,xs:8,className:a.infoValue},"true"===f.info.seeder?"\u662f":"\u5426"))),r.a.createElement(it.a,{container:!0,xs:12,sm:4},r.a.createElement(it.a,{item:!0,xs:4,className:a.infoTitle},"\u5206\u7247\u5927\u5c0f\uff1a"),r.a.createElement(it.a,{item:!0,xs:8,className:a.infoValue},Object(C.r)(f.info.pieceLength))),r.a.createElement(it.a,{container:!0,xs:12,sm:4},r.a.createElement(it.a,{item:!0,xs:4,className:a.infoTitle},"\u5206\u7247\u6570\u91cf\uff1a"),r.a.createElement(it.a,{item:!0,xs:8,className:a.infoValue},f.info.numPieces)))))))}var Wn=Cn()({root:{maxWidth:"100%",boxShadow:"none","&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&$expanded":{}},expanded:{}})(jn.a),zn=Cn()({root:{minHeight:0,padding:0,"&$expanded":{minHeight:56}},content:{maxWidth:"100%",margin:0,display:"flex","&$expanded":{margin:"0"}},expanded:{}})(yn.a),Bn=Cn()((function(e){return{root:{display:"block",padding:e.spacing(0)}}}))(wn.a),Gn=Object(w.a)((function(e){var t;return{card:{marginTop:"20px",justifyContent:"space-between"},iconContainer:Object(R.a)({width:"90px",height:"96px",padding:" 35px 29px 29px 29px",paddingLeft:"35px"},e.breakpoints.down("sm"),{display:"none"}),content:(t={width:"100%",minWidth:0},Object(R.a)(t,e.breakpoints.up("sm"),{borderInlineStart:"1px "+e.palette.divider+" solid"}),Object(R.a)(t,"textAlign","left"),t),contentSide:Object(R.a)({minWidth:0,paddingTop:"24px",paddingRight:"28px"},e.breakpoints.down("sm"),{display:"none"}),iconBig:{fontSize:"30px"},iconMultiple:{fontSize:"30px",color:"#607D8B"},progress:{marginTop:8,marginBottom:4},expand:{transition:".15s transform ease-in-out"},expanded:{transform:"rotate(180deg)"},subFileName:{display:"flex"},subFileIcon:{marginRight:"20px"},scroll:{overflowY:"auto"},action:{padding:e.spacing(2),textAlign:"right"},actionButton:{marginLeft:e.spacing(1)},info:{padding:e.spacing(2)},infoTitle:{fontWeight:700},infoValue:{color:e.palette.text.secondary}}}));function Hn(e){var t=Gn(),a=Object(Pa.a)(),o=Object(s.f)(),i=r.a.useState(!1),l=Object(T.a)(i,2),c=l[0],u=l[1],d=r.a.useState(!1),m=Object(T.a)(d,2),h=m[0],g=m[1],f=Object(p.d)(),b=Object(n.useCallback)((function(e,t,a,n){return f(Object(G.O)(e,t,a,n))}),[f]),E=Object(n.useCallback)((function(){return"."===e.task.name?"[\u672a\u77e5]":e.task.name}),[e.task.name]),v=Object(n.useCallback)((function(){return e.task.files.filter((function(e){return"true"===e.selected}))}),[e.task.files]),O=Object(n.useCallback)((function(){return e.task.files.length>1?r.a.createElement(On.a,{badgeContent:v().length,color:"secondary"},r.a.createElement(Ln.a,{className:t.iconMultiple})):r.a.createElement(Ie.a,{className:t.iconBig,fileName:E(e.task)})}),[e.task,t]);return r.a.createElement(Ja.a,{className:t.card},r.a.createElement(Wn,{square:!0,expanded:c,onChange:function(e,t){u(!!t)}},r.a.createElement(zn,{"aria-controls":"panel1d-content",id:"panel1d-header"},r.a.createElement("div",{className:t.iconContainer},O()),r.a.createElement(En.a,{className:t.content},r.a.createElement(M.a,{color:"primary",noWrap:!0},r.a.createElement(Pe.a,{title:E()},r.a.createElement("span",null,E()))),3===e.task.status&&r.a.createElement(Pe.a,{title:e.task.error},r.a.createElement(M.a,{variant:"body2",color:"error",noWrap:!0},"\u4e0b\u8f7d\u51fa\u9519\uff1a",e.task.error)),5===e.task.status&&r.a.createElement(M.a,{variant:"body2",color:"textSecondary",noWrap:!0},"\u5df2\u53d6\u6d88",""!==e.task.error&&r.a.createElement("span",null,"\uff1a",e.task.error)),4===e.task.status&&4===e.task.task_status&&r.a.createElement(M.a,{variant:"body2",style:{color:a.palette.success.main},noWrap:!0},"\u5df2\u5b8c\u6210"),4===e.task.status&&0===e.task.task_status&&r.a.createElement(M.a,{variant:"body2",style:{color:a.palette.success.light},noWrap:!0},"\u5df2\u5b8c\u6210\uff0c\u8f6c\u5b58\u6392\u961f\u4e2d"),4===e.task.status&&1===e.task.task_status&&r.a.createElement(M.a,{variant:"body2",style:{color:a.palette.success.light},noWrap:!0},"\u5df2\u5b8c\u6210\uff0c\u8f6c\u5b58\u5904\u7406\u4e2d"),4===e.task.status&&2===e.task.task_status&&r.a.createElement(M.a,{variant:"body2",color:"error",noWrap:!0},function(e){try{var t=JSON.parse(e);return t.msg+"\uff1a"+t.error}catch(a){return"\u6587\u4ef6\u8f6c\u5b58\u5931\u8d25"}}(e.task.task_error))),r.a.createElement(En.a,{className:t.contentSide},r.a.createElement(Na.a,null,r.a.createElement(kn.a,{className:Te()(Object(R.a)({},t.expanded,c),t.expand)})))),r.a.createElement(Bn,null,r.a.createElement(z.a,null),e.task.files.length>1&&r.a.createElement("div",{className:t.scroll},r.a.createElement(tt.a,null,r.a.createElement(ot.a,null,v().map((function(e){return r.a.createElement(nt.a,{key:e.index},r.a.createElement(rt.a,{component:"th",scope:"row"},r.a.createElement(M.a,{className:t.subFileName},r.a.createElement(Ie.a,{className:t.subFileIcon,fileName:e.path}),e.path)),r.a.createElement(rt.a,{component:"th",scope:"row"},r.a.createElement(M.a,{noWrap:!0}," ",Object(C.r)(e.length))),r.a.createElement(rt.a,{component:"th",scope:"row"},r.a.createElement(M.a,{noWrap:!0},(a=e.completedLength,n=e.length,0===n?0:a/n*100).toFixed(2),"%")));var a,n}))))),r.a.createElement("div",{className:t.action},r.a.createElement(W.a,{className:t.actionButton,variant:"outlined",color:"secondary",onClick:function(){return o.push("/#/home?path="+encodeURIComponent(e.task.dst))}},"\u6253\u5f00\u5b58\u653e\u76ee\u5f55"),r.a.createElement(W.a,{className:t.actionButton,onClick:function(){g(!0),H.b.delete("/aria2/task/"+e.task.gid).then((function(){b("top","right","\u5220\u9664\u6210\u529f","success")})).catch((function(e){b("top","right",e.message,"error")})).then((function(){window.location.reload()}))},variant:"contained",color:"secondary",disabled:h},"\u5220\u9664\u8bb0\u5f55")),r.a.createElement(z.a,null),r.a.createElement("div",{className:t.info},r.a.createElement(it.a,{container:!0},r.a.createElement(it.a,{container:!0,xs:12,sm:6},r.a.createElement(it.a,{item:!0,xs:4,className:t.infoTitle},"\u521b\u5efa\u65e5\u671f\uff1a"),r.a.createElement(it.a,{item:!0,xs:8,className:t.infoValue},e.task.create)),r.a.createElement(it.a,{container:!0,xs:12,sm:6},r.a.createElement(it.a,{item:!0,xs:4,className:t.infoTitle},"\u6700\u540e\u66f4\u65b0\uff1a"),r.a.createElement(it.a,{item:!0,xs:8,className:t.infoValue},e.task.update)))))))}var Vn=a(126),qn=a(232),Yn=a(6516),Kn=Object(w.a)((function(){return{fab:{margin:0,top:"auto",right:20,bottom:20,left:"auto",zIndex:5,position:"fixed"}}}));function Jn(){var e=Kn(),t=Object(p.d)(),a=Object(n.useCallback)((function(){return t(Object(G.t)())}),[t]);return r.a.createElement(r.a.Fragment,null,r.a.createElement(sa.default,null),r.a.createElement(Vn.a,{enable:!0},r.a.createElement(qn.a,{className:e.fab,color:"secondary",onClick:function(){return a()}},r.a.createElement(Yn.a,null))))}var Qn=function(e){Object(ue.a)(a,e);var t=Object(de.a)(a);function a(){var e;Object(ce.a)(this,a);for(var n=arguments.length,r=new Array(n),o=0;o0&&(e.interval=setTimeout(e.loadDownloading,1e3*t.data[0].interval))})).catch((function(t){e.props.toggleSnackbar("top","right",t.message,"error")}))},e.loadMore=function(){e.setState({loading:!0}),H.b.get("/aria2/finished?page="+ ++e.page).then((function(t){e.setState({finishedList:[].concat(Object(et.a)(e.state.finishedList),Object(et.a)(t.data)),loading:!1,continue:t.data.length>=10})})).catch((function(){e.props.toggleSnackbar("top","right","\u52a0\u8f7d\u5931\u8d25","error"),e.setState({loading:!1})}))},e}return Object(se.a)(a,[{key:"componentWillUnmount",value:function(){clearTimeout(this.interval)}},{key:"render",value:function(){var e=this.props.classes,t=g.a.GetUser();return r.a.createElement("div",{className:e.layout},t.group.allowRemoteDownload&&r.a.createElement(Jn,null),r.a.createElement(M.a,{color:"textSecondary",variant:"h4",className:e.title},"\u8fdb\u884c\u4e2d",r.a.createElement(Na.a,{disabled:this.state.loading,onClick:this.loadDownloading},r.a.createElement(qt.a,null))),this.state.downloading.map((function(e,t){return r.a.createElement(Un,{key:t,task:e})})),r.a.createElement(M.a,{color:"textSecondary",variant:"h4",className:e.title},"\u5df2\u5b8c\u6210"),r.a.createElement("div",{className:e.loadMore},this.state.finishedList.map((function(e,t){return e.files?r.a.createElement(Hn,{key:t,task:e}):null})),r.a.createElement(W.a,{size:"large",className:e.margin,disabled:!this.state.continue,onClick:this.loadMore},"\u52a0\u8f7d\u66f4\u591a")))}}]),a}(n.Component),$n=Object(p.c)((function(){return{}}),(function(e){return{toggleSnackbar:function(t,a,n,r){e(Object(G.O)(t,a,n,r))}}}))(Object(Fe.a)((function(e){return{actions:{display:"flex"},title:{marginTop:"20px"},layout:Object(R.a)({width:"auto",marginTop:"30px",marginLeft:e.spacing(3),marginRight:e.spacing(3)},e.breakpoints.up(1100+2*e.spacing(3)),{width:700,marginLeft:"auto",marginRight:"auto"}),shareTitle:{maxWidth:"200px"},avatarFile:{backgroundColor:e.palette.primary.light},avatarFolder:{backgroundColor:e.palette.secondary.light},gird:{marginTop:"30px"},hide:{display:"none"},loadingAnimation:{borderRadius:"6px 6px 0 0"},shareFix:{marginLeft:"20px"},loadMore:{textAlign:"center",marginTop:"20px",marginBottom:"20px"},margin:{marginTop:e.spacing(2)}}}))(Qn)),Xn=Object(w.a)((function(e){var t;return{loader:(t={width:"80%"},Object(R.a)(t,e.breakpoints.up("md"),{width:" 50%"}),Object(R.a)(t,"marginTop",30),t)}})),Zn=function(e){return r.a.createElement(re.c,{backgroundColor:e.dark?"#333":"#f5f6f7",foregroundColor:e.dark?"#636363":"#eee",className:e.className})};var er=function(){var e=Object(Pa.a)(),t=Xn();return r.a.createElement("div",{style:{textAlign:"center"}},r.a.createElement(Zn,{dark:"dark"===e.palette.type,className:t.loader}))},tr=function(e){Object(ue.a)(a,e);var t=Object(de.a)(a);function a(e){var n;Object(ce.a)(this,a),(n=t.call(this,e)).handleChange=function(e){return function(t){n.setState(Object(R.a)({},e,t.target.value))}},n.submit=function(e){e.preventDefault(),""!==n.state.pwd&&n.props.setPassowrd(n.state.pwd)};var r=new URLSearchParams(n.props.location.search);return n.state={pwd:r.get("password")},n}return Object(se.a)(a,[{key:"render",value:function(){var e=this.props.classes;return r.a.createElement("div",{className:e.layout},r.a.createElement(Ja.a,{className:e.card},r.a.createElement(Qa.a,{avatar:r.a.createElement(D.a,{"aria-label":"Recipe",src:"/api/v3/user/avatar/"+this.props.share.creator.key+"/l"}),title:this.props.share.creator.nick+" \u7684\u52a0\u5bc6\u5206\u4eab",subheader:this.props.share.create_date}),r.a.createElement(z.a,null),r.a.createElement(En.a,null,r.a.createElement("form",{onSubmit:this.submit},r.a.createElement(pn.a,{id:"pwd",label:"\u8f93\u5165\u5206\u4eab\u5bc6\u7801",value:this.state.pwd,onChange:this.handleChange("pwd"),margin:"normal",type:"password",autoFocus:!0,fullWidth:!0,color:"secondary"}))),r.a.createElement(ln.a,{className:e.actions,disableActionSpacing:!0},r.a.createElement(W.a,{onClick:this.submit,color:"secondary",className:e.continue,variant:"contained",disabled:""===this.state.pwd||this.props.loading},"\u7ee7\u7eed"))))}}]),a}(n.Component),ar=Object(p.c)((function(){return{}}),(function(e){return{toggleSnackbar:function(t,a,n,r){e(Object(G.O)(t,a,n,r))}}}))(Object(Fe.a)((function(e){return{card:{maxWidth:400,margin:"0 auto"},actions:{display:"flex"},layout:Object(R.a)({width:"auto",marginTop:"110px",marginLeft:e.spacing(3),marginRight:e.spacing(3)},e.breakpoints.up(1100+2*e.spacing(3)),{width:1100,marginLeft:"auto",marginRight:"auto"}),continue:{marginLeft:"auto",marginRight:"10px",marginRottom:"10px"}}}))(Object(s.j)(tr))),nr=Object(w.a)((function(e){return{boxHeader:{textAlign:"center",padding:24},avatar:{backgroundColor:e.palette.secondary.main,margin:"0 auto",width:50,height:50,cursor:"pointer"},shareDes:{marginTop:12},shareInfo:{color:e.palette.text.disabled,fontSize:14}}}));function rr(e){var t=nr(),a=Object(s.f)(),n=function(){a.push("/profile/"+e.share.creator.key),e.onClose&&e.onClose()};return r.a.createElement("div",{className:t.boxHeader},r.a.createElement(D.a,{className:t.avatar,alt:e.share.creator.nick,src:"/api/v3/user/avatar/"+e.share.creator.key+"/l",onClick:function(){return n()}}),r.a.createElement(M.a,{variant:"h6",className:t.shareDes},e.isFolder&&r.a.createElement(r.a.Fragment,null,"\u6b64\u5206\u4eab\u7531"," ",r.a.createElement(B.a,{onClick:function(){return n()},href:"javascript:void(0)",color:"inherit"},e.share.creator.nick)," ","\u521b\u5efa"),!e.isFolder&&r.a.createElement(r.a.Fragment,null," ",r.a.createElement(B.a,{onClick:function(){return n()},href:"javascript:void(0)",color:"inherit"},e.share.creator.nick)," ","\u5411\u60a8\u5206\u4eab\u4e86 1 \u4e2a\u6587\u4ef6")),r.a.createElement(M.a,{className:t.shareInfo},e.share.views," \u6b21\u6d4f\u89c8 \u2022 ",e.share.downloads," \u6b21\u4e0b\u8f7d \u2022"," ",e.share.expire>0?e.share.expire>=86400?Math.round(e.share.expire/86400)+" \u5929\u540e\u5230\u671f":Math.round(e.share.expire/3600)+" \u5c0f\u65f6\u540e\u5230\u671f":e.share.create_date))}Object(C.t)();var or=r.a.lazy((function(){return Promise.resolve().then(a.bind(null,194))})),ir=r.a.lazy((function(){return Promise.resolve().then(a.bind(null,362))})),lr=function(e){Object(ue.a)(a,e);var t=Object(de.a)(a);function a(){var e;Object(ce.a)(this,a);for(var n=arguments.length,r=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:zo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DRAWER_TOGGLE":return Object.assign({},e,{open:t.open});case"CHANGE_VIEW_METHOD":return Object.assign({},e,{explorerViewMethod:t.method});case"SET_NAVIGATOR_LOADING_STATUE":return Object.assign({},e,{navigatorLoading:t.status});case"SET_NAVIGATOR_ERROR":return Object.assign({},e,{navigatorError:t.status,navigatorErrorMsg:t.msg});case"OPEN_CREATE_FOLDER_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{createNewFolder:!0}),contextOpen:!1});case"OPEN_CREATE_FILE_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{createNewFile:!0}),contextOpen:!1});case"OPEN_RENAME_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{rename:!0}),contextOpen:!1});case"OPEN_REMOVE_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{remove:!0}),contextOpen:!1});case"OPEN_MOVE_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{move:!0}),contextOpen:!1});case"OPEN_RESAVE_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{resave:!0}),contextOpen:!1});case"SET_USER_POPOVER":return Object.assign({},e,{userPopoverAnchorEl:t.anchor});case"SET_SHARE_USER_POPOVER":return Object.assign({},e,{shareUserPopoverAnchorEl:t.anchor});case"OPEN_SHARE_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{share:!0}),contextOpen:!1});case"OPEN_MUSIC_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{music:!0}),contextOpen:!1});case"OPEN_REMOTE_DOWNLOAD_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{remoteDownload:!0}),contextOpen:!1});case"OPEN_TORRENT_DOWNLOAD_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{torrentDownload:!0}),contextOpen:!1});case"OPEN_DECOMPRESS_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{decompress:!0}),contextOpen:!1});case"OPEN_COMPRESS_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{compress:!0}),contextOpen:!1});case"OPEN_GET_SOURCE_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{getSource:!0}),contextOpen:!1});case"OPEN_COPY_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{copy:!0}),contextOpen:!1});case"OPEN_LOADING_DIALOG":return Object.assign({},e,{modals:Object.assign({},e.modals,{loading:!0,loadingText:t.text}),contextOpen:!1});case"CLOSE_CONTEXT_MENU":return Object.assign({},e,{contextOpen:!1});case"CLOSE_ALL_MODALS":return Object.assign({},e,{modals:Object.assign({},e.modals,{createNewFolder:!1,createNewFile:!1,rename:!1,move:!1,remove:!1,share:!1,music:!1,remoteDownload:!1,torrentDownload:!1,getSource:!1,resave:!1,copy:!1,loading:!1,compress:!1,decompress:!1})});case"TOGGLE_SNACKBAR":return Object.assign({},e,{snackbar:{toggle:!e.snackbar.toggle,vertical:t.vertical,horizontal:t.horizontal,msg:t.msg,color:t.color}});case"SET_MODALS_LOADING":return Object.assign({},e,{modalsLoading:t.status});case"SET_SESSION_STATUS":return Object(m.a)(Object(m.a)({},e),{},{isLogin:t.status});case"ENABLE_LOAD_UPLOADER":return Object.assign({},e,{loadUploader:!0});case"REFRESH_STORAGE":return Object.assign({},e,{storageRefresh:!e.storageRefresh});case"SEARCH_MY_FILE":return Object.assign({},e,{contextOpen:!1,navigatorError:!1,navigatorLoading:!0});case"CHANGE_CONTEXT_MENU":return e.contextOpen&&t.open?Object.assign({},e):Object.assign({},e,{contextOpen:t.open,contextType:t.menuType});case"SET_SUBTITLE":return Object.assign({},e,{subTitle:t.title});case"SET_SORT_METHOD":return Object(m.a)(Object(m.a)({},e),{},{sortMethod:t.method});case"SET_NAVIGATOR":return Object(m.a)(Object(m.a)({},e),{},{contextOpen:!1,navigatorError:!1,navigatorLoading:t.navigatorLoading});default:return e}},Go=a(124),Ho=function(e,t){return window.currntPath=e,Object.assign({},t,{navigator:Object.assign({},t.navigator,{path:e})})},Vo=function(e){var t=JSON.parse(localStorage.getItem("siteConfigCache"));null!=t&&(e.siteConfig=t);var a=new URL(window.location.href).searchParams.get("path");return e.navigator.path=null===a?"/":a,e.siteConfig=J(e.siteConfig),document.title=e.siteConfig.title,e}({siteConfig:{title:window.subTitle,siteICPId:"",loginCaptcha:!1,regCaptcha:!1,forgetCaptcha:!1,emailActive:!1,QQLogin:!1,themes:null,authn:!1,theme:{palette:{common:{black:"#000",white:"#fff"},background:{paper:"#fff",default:"#fafafa"},primary:{light:"#7986cb",main:"#3f51b5",dark:"#303f9f",contrastText:"#fff"},secondary:{light:"#ff4081",main:"#f50057",dark:"#c51162",contrastText:"#fff"},error:{light:"#e57373",main:"#f44336",dark:"#d32f2f",contrastText:"#fff"},text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},explorer:{filename:"#474849",icon:"#8f8f8f",bgSelected:"#D5DAF0",emptyIcon:"#e8e8e8"}}},captcha_ReCaptchaKey:"defaultKey",captcha_type:"normal",tcaptcha_captcha_app_id:""},navigator:{path:"/",refresh:!0}}),qo=function(e){Object(ue.a)(a,e);var t=Object(de.a)(a);function a(e){var n;return Object(ce.a)(this,a),(n=t.call(this,e)).state={hasError:!1,error:null,errorInfo:null},n}return Object(se.a)(a,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,errorInfo:t})}},{key:"render",value:function(){var e=this.props.classes;return this.state.hasError?r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",{className:e.h1},":("),r.a.createElement("h2",{className:e.h2},"\u9875\u9762\u6e32\u67d3\u51fa\u73b0\u9519\u8bef\uff0c\u8bf7\u5c1d\u8bd5\u5237\u65b0\u6b64\u9875\u9762\u3002"),this.state.error&&this.state.errorInfo&&this.state.errorInfo.componentStack&&r.a.createElement("details",null,r.a.createElement("summary",null,"\u9519\u8bef\u8be6\u60c5"),r.a.createElement("pre",null,r.a.createElement("code",null,this.state.error.toString())),r.a.createElement("pre",null,r.a.createElement("code",null,this.state.errorInfo.componentStack)))):this.props.children}}],[{key:"getDerivedStateFromError",value:function(){return{hasError:!0}}}]),a}(r.a.Component),Yo=Object(Fe.a)({h1:{color:"#a4a4a4",margin:"5px 0px"},h2:{margin:"15px 0px"}})(qo),Ko=a(87),Jo=a(318);a.d(t,"history",(function(){return $o}));var Qo=r.a.lazy((function(){return Promise.all([a.e(7),a.e(9)]).then(a.bind(null,7372))}));""!==window.location.hash&&(window.location.href=window.location.hash.split("#")[1]),function(e){if("serviceWorker"in navigator){if(new URL("",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",(function(){var t="".concat("","/service-worker.js");c?(!function(e,t){fetch(e).then((function(a){var n=a.headers.get("content-type");404===a.status||null!=n&&-1===n.indexOf("javascript")?navigator.serviceWorker.ready.then((function(e){e.unregister().then((function(){window.location.reload()}))})):l(e,t)})).catch((function(){console.log("No internet connection found. App is running in offline mode.")}))}(t,e),navigator.serviceWorker.ready.then((function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://bit.ly/CRA-PWA")}))):l(t,e)}))}}();var $o=Object(Ko.a)(),Xo=Object(u.a)(Object(Jo.a)($o),d.a);var Zo,ei=Object(u.d)((Zo=$o,function(e,t){var a=e||{},n=a.viewUpdate,r=a.explorer,o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vo,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_NAVIGATOR":return Ho(t.path,e);case"TOGGLE_DAYLIGHT_MODE":var a=Object.assign({},e);return void 0===a.siteConfig.theme.palette.type||"light"===a.siteConfig.theme.palette.type?Object(m.a)(Object(m.a)({},e),{},{siteConfig:Object(m.a)(Object(m.a)({},e.siteConfig),{},{theme:Object(m.a)(Object(m.a)({},e.siteConfig.theme),{},{palette:Object(m.a)(Object(m.a)({},e.siteConfig.theme.palette),{},{type:"dark"})})})}):Object(m.a)(Object(m.a)({},e),{},{siteConfig:Object(m.a)(Object(m.a)({},e.siteConfig),{},{theme:Object(m.a)(Object(m.a)({},e.siteConfig.theme),{},{palette:Object(m.a)(Object(m.a)({},e.siteConfig.theme.palette),{},{type:"light"})})})});case"APPLY_THEME":if(null!==e.siteConfig.themes){var n=JSON.parse(e.siteConfig.themes);return void 0===n[t.theme]?e:Object.assign({},e,{siteConfig:Object.assign({},e.siteConfig,{theme:n[t.theme]})})}break;case"NAVIGATOR_UP":return Ho(t.path,e);case"SET_SITE_CONFIG":return Object.assign({},e,{siteConfig:t.config});case"REFRESH_FILE_LIST":return Object.assign({},e,{navigator:Object.assign({},e.navigator,{refresh:!e.navigator.refresh})});case"SEARCH_MY_FILE":return Object.assign({},e,{navigator:Object.assign({},e.navigator,{path:"/\u641c\u7d22\u7ed3\u679c",refresh:""===e.explorer.keywords?e.navigator.refresh:!e.navigator.refresh})});default:return e}}(e,t),i=function(e){var t=Object(u.c)(e);return function(a,n){if(n.type&&!n.type.startsWith("@@")&&n.type.split("/").length>1){var r=n.type.split("/")[0],o=e[r];return Wo()(!!o,"reducer ".concat(r," doesn't exist")),o&&o(a,n)}return t(a,n)}}({viewUpdate:Bo,explorer:mt.default,router:Object(Go.b)(Zo)})({viewUpdate:n,explorer:r},t);return Object(m.a)(Object(m.a)({},o),i)}),Xo);!function(e){$.apply(this,arguments)}(ei),i.a.render(r.a.createElement(Yo,null,r.a.createElement(p.a,{store:ei},r.a.createElement(Go.a,{history:$o},r.a.createElement(s.d,null,r.a.createElement(s.b,{path:"/admin"},r.a.createElement(n.Suspense,{fallback:"Loading..."},r.a.createElement(Qo,null))),r.a.createElement(s.b,{exact:!0,path:""},r.a.createElement(Ao,null)))))),document.getElementById("root"))},72:function(e,t,a){"use strict";var n=a(6),r=a(23),o=a(24),i=a(25),l=a(26),c=a(0),s=a.n(c),p=a(74),u=a.n(p),d=a(53),m=a.n(d),h=a(366),g=a.n(h),f=a(8),b=a(27),E=a.n(b),v=a(4),O=a(395),j=a(135),w=a(55),y=a(54),x=a(392),C=a(43),k=a(7),S=a(11),N=function(e){Object(i.a)(a,e);var t=Object(l.a)(a);function a(){var e;Object(r.a)(this,a);for(var n=arguments.length,o=new Array(n),i=0;i