(this["webpackJsonpcloudreve-frontend"]=this["webpackJsonpcloudreve-frontend"]||[]).push([[2],{112:function(e,t,a){"use strict";var n=a(6),r=a(0),o=a.n(r),i=a(101),c=a(106),l=a(42),s=Object(c.a)((function(e){return{loader:Object(n.a)({width:"70%",padding:40},e.breakpoints.down("md"),{width:"100%",padding:10})}})),u=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(l.a)(),t=s();return o.a.createElement("div",null,o.a.createElement(u,{dark:"dark"===e.palette.type,className:t.loader}))}},12:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"c",(function(){return m})),a.d(t,"d",(function(){return h}));var n=a(14),r=a(13),o=a(17),i=a(18),c=a(281),l=a(88),s=a.n(l),u=a(20),p=a(129),d="/api/v3",m=function(){return d},h=function(e,t,a,n){return m()+(e?"/share/preview/"+t+(""!==n?"?path="+encodeURIComponent(n):""):"/file/preview/"+a)},f=s.a.create({baseURL:m(),withCredentials:!0}),g=function(e){Object(o.a)(a,e);var t=Object(i.a)(a);function a(e,n,o){var i;return Object(r.a)(this,a),(i=t.call(this,e)).code=n,i.code=n,p.a.exists("errors.".concat(n),{ns:"common"})?i.message=p.a.t("errors.".concat(n),{ns:"common",message:e}):i.message=e||p.a.t("unknownError",{ns:"common"}),i.message+=o?" (".concat(o,")"):"",i.stack=(new Error).stack,i}return Object(n.a)(a)}(Object(c.a)(Error));f.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&&(u.a.signout(),window.location.href="/login"),40008===e.rawData.code&&(window.location.href="/home"),new g(e.rawData.msg,e.rawData.code,e.rawData.error);return e}),(function(e){return Promise.reject(e)})),t.b=f},123:function(e,t,a){"use strict";var n=a(10),r=a(0),o=a.n(r),i=a(453);t.a=function(e){var t=e.children,a=e.enable,c=e.hide,l=void 0!==c&&c,s=e.element,u=void 0===s?null:s,p=Object(r.useState)(!1),d=Object(n.a)(p,2),m=d[0],h=d[1],f=window.scrollY,g=window.scrollY;return Object(r.useEffect)((function(){a&&(u||window).addEventListener("scroll",(function(e){return function(e){var t=e.currentTarget,a=u?u.scrollTop:t.scrollY;f>a?g-a>50&&(g=a,h(!1)):f50&&(g=a,h(!0)),f=a}(e)}))}),[a]),o.a.createElement(i.a,{in:!m&&!l},t)}},125:function(e,t,a){"use strict";a.r(t),a.d(t,"initState",(function(){return o}));var n=a(9),r=a(38),o={dndSignal:!1,dndTarget:null,dndSource:null,fileList:[],dirList:[],selected:[],selectProps:{isMultiple:!1,withFolder:!1,withFile:!1,withSourceEnabled:!1},lastSelect:{file:{id:"",name:"",size:0,type:"file",date:"",path:"",create_date:""},index:-1},shiftSelectedIds:[],imgPreview:{first:{id:"",name:"",size:0,type:"file",date:"",path:"",create_date:""},other:[]},audioPreview:{first:{id:"",name:"",size:0,type:"file",date:"",path:"",create_date:""},other:[],playingName:null,paused:!1,isOpen:!1},fileSave:!1,sideBarOpen:!1},i=function(e){var t=e.length>1,a=!1,n=!1,r=!1;return e.forEach((function(e){"dir"===e.type?(a=!0,r=!0):"file"===e.type&&(n=!0,e.source_enabled&&(r=!0))})),{isMultiple:t,withFolder:a,withFile:n,withSourceEnabled:r}};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 c=t.targets;return Object.assign({},e,{selected:c,selectProps:i(c)});case"RMOVE_SELECTED_TARGETS":var l=t.fileIds,s=e.selected.filter((function(e){return!l.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,withSourceEnabled:!1}});case"SEARCH_MY_FILE":return Object.assign({},e,{selected:[],selectProps:{isMultiple:!1,withFolder:!1,withFile:!1,withSourceEnabled:!1},search:{keywords:t.keywords,searchPath:t.path}});case"SHOW_IMG_PREIVEW":return Object.assign({},e,{imgPreview:{first:t.first,other:e.fileList}});case"SHOW_AUDIO_PREVIEW":return Object.assign({},e,{audioPreview:Object(n.a)(Object(n.a)({},e.audioPreview),{},{first:t.first,other:e.fileList})});case"AUDIO_PREVIEW_SET_IS_OPEN":return Object.assign({},e,{audioPreview:Object(n.a)(Object(n.a)({},e.audioPreview),{},{isOpen:t.isOpen})});case"AUDIO_PREVIEW_SET_PLAYING":return Object.assign({},e,{audioPreview:Object(n.a)(Object(n.a)({},e.audioPreview),{},{playingName:t.playingName,paused:t.paused})});case"SAVE_FILE":return Object(n.a)(Object(n.a)({},e),{},{fileSave:!e.fileSave});case"SET_LAST_SELECT":var u=t.file,p=t.index;return Object(n.a)(Object(n.a)({},e),{},{lastSelect:{file:u,index:p}});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,withSourceEnabled:!1},search:void 0});case"SET_SIDE_BAR":return Object(n.a)(Object(n.a)({},e),{},{sideBarOpen:t.open});case"SET_CURRENT_POLICY":return Object(n.a)(Object(n.a)({},e),{},{currentPolicy:t.policy});default:return e}}},129:function(e,t,a){"use strict";var n=a(240),r=a(105),o=a(372),i=a(451);n.a.use(o.a).use(i.a).use(r.e).init({fallbackLng:"en-US",debug:!0,ns:["common","application"],load:"currentOnly",defaultNS:"application",interpolation:{escapeValue:!1}}),n.a.on("languageChanged",(function(e){document.documentElement.setAttribute("lang",e)})),t.a=n.a},154:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(11),r=a.n(n),o=a(27),i=a(12);function c(e,t,a,n){return l.apply(this,arguments)}function l(){return(l=Object(o.a)(r.a.mark((function e(t,a,n,o){var c;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c="",c=a?""===n?"/share/list/"+a.key:"/share/search/".concat(a.key,"/"):""===n?"/directory":"/file/search/",t=""===n?t:n,c+=encodeURIComponent(t),o&&(c="".concat(c,"?path=").concat(encodeURIComponent(o))),e.abrupt("return",i.b.get(c));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},155:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(11),r=a.n(n),o=a(27),i=a(12);function c(e){return l.apply(this,arguments)}function l(){return(l=Object(o.a)(r.a.mark((function e(t){var a,n;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="",t.key?(n="/"===t.path?t.path+t.name:t.path+"/"+t.name,a="/share/download/"+t.key+"?path="+encodeURIComponent(n)):a="/file/download/"+t.id,e.abrupt("return",i.b.put(a));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},16: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},2:function(e,t,a){"use strict";a.d(t,"j",(function(){return l})),a.d(t,"k",(function(){return s})),a.d(t,"i",(function(){return u})),a.d(t,"h",(function(){return p})),a.d(t,"e",(function(){return d})),a.d(t,"Q",(function(){return m})),a.d(t,"d",(function(){return h})),a.d(t,"I",(function(){return f})),a.d(t,"H",(function(){return g})),a.d(t,"o",(function(){return b})),a.d(t,"n",(function(){return E})),a.d(t,"N",(function(){return v})),a.d(t,"L",(function(){return O})),a.d(t,"x",(function(){return j})),a.d(t,"y",(function(){return k})),a.d(t,"s",(function(){return w})),a.d(t,"w",(function(){return y})),a.d(t,"z",(function(){return x})),a.d(t,"a",(function(){return C})),a.d(t,"K",(function(){return S})),a.d(t,"t",(function(){return N})),a.d(t,"v",(function(){return T})),a.d(t,"A",(function(){return P})),a.d(t,"p",(function(){return L})),a.d(t,"l",(function(){return R})),a.d(t,"q",(function(){return I})),a.d(t,"m",(function(){return F})),a.d(t,"r",(function(){return D})),a.d(t,"f",(function(){return _})),a.d(t,"R",(function(){return M})),a.d(t,"G",(function(){return A})),a.d(t,"B",(function(){return U})),a.d(t,"E",(function(){return z})),a.d(t,"P",(function(){return W})),a.d(t,"O",(function(){return B})),a.d(t,"b",(function(){return H})),a.d(t,"c",(function(){return G})),a.d(t,"C",(function(){return V})),a.d(t,"D",(function(){return q})),a.d(t,"M",(function(){return Y}));var n=a(9),r=a(40),o=a(125),i=a(51);a.d(t,"F",(function(){return r.selectFile})),a.d(t,"u",(function(){return r.openPreview})),a.d(t,"J",(function(){return r.setSelectedTarget})),t.g={actions:r,reducers:o};var c=function(e,t){return{type:"SET_NAVIGATOR",path:e,navigatorLoading:t}},l=function(e){return function(t,a){var r=a(),o=e!==r.navigator.path;o&&t(Object(i.g)(Object(n.a)(Object(n.a)({},r.viewUpdate.pagination),{},{page:1}))),t(c(e,o))}},s=function(){return function(e,t){var a=t(),r=a.navigator.path.split("/");r.pop();var o=1===r.length?"/":r.join("/"),l=o!==a.navigator.path;l&&e(Object(i.g)(Object(n.a)(Object(n.a)({},a.viewUpdate.pagination),{},{page:1}))),e(c(o,l))}},u=function(e){return{type:"DRAWER_TOGGLE",open:e}},p=function(e,t){return{type:"DRAG_AND_DROP",source:e,target:t}},d=function(e){return{type:"CHANGE_VIEW_METHOD",method:e}},m=function(){return{type:"TOGGLE_DAYLIGHT_MODE"}},h=function(e,t){return{type:"CHANGE_CONTEXT_MENU",menuType:e,open:t}},f=function(e){return{type:"SET_NAVIGATOR_LOADING_STATUE",status:e}},g=function(e,t){return{type:"SET_NAVIGATOR_ERROR",status:e,msg:t}},b=function(){return{type:"OPEN_CREATE_FOLDER_DIALOG"}},E=function(){return{type:"OPEN_CREATE_FILE_DIALOG"}},v=function(e){return{type:"SET_USER_POPOVER",anchor:e}},O=function(e){return{type:"SET_SHARE_USER_POPOVER",anchor:e}},j=function(){return{type:"OPEN_RENAME_DIALOG"}},k=function(e){return{type:"OPEN_RESAVE_DIALOG",key:e}},w=function(){return{type:"OPEN_MOVE_DIALOG"}},y=function(){return{type:"OPEN_REMOVE_DIALOG"}},x=function(){return{type:"OPEN_SHARE_DIALOG"}},C=function(e){return{type:"APPLY_THEME",theme:e}},S=function(e){return{type:"SET_SESSION_STATUS",status:e}},N=function(){return{type:"OPEN_MUSIC_DIALOG"}},T=function(){return{type:"OPEN_REMOTE_DOWNLOAD_DIALOG"}},P=function(){return{type:"OPEN_TORRENT_DOWNLOAD_DIALOG"}},L=function(){return{type:"OPEN_DECOMPRESS_DIALOG"}},R=function(){return{type:"OPEN_COMPRESS_DIALOG"}},I=function(e){return{type:"OPEN_GET_SOURCE_DIALOG",source:e}},F=function(){return{type:"OPEN_COPY_DIALOG"}},D=function(e){return{type:"OPEN_LOADING_DIALOG",text:e}},_=function(){return{type:"CLOSE_ALL_MODALS"}},M=function(e,t,a,n){return{type:"TOGGLE_SNACKBAR",vertical:e,horizontal:t,msg:a,color:n}},A=function(e){return{type:"SET_MODALS_LOADING",status:e}},U=function(){return{type:"REFRESH_FILE_LIST"}},z=function(e,t){return{type:"SEARCH_MY_FILE",keywords:e,path:t}},W=function(e){return{type:"SHOW_IMG_PREIVEW",first:e}},B=function(e){return{type:"SHOW_AUDIO_PREVIEW",first:e}},H=function(e){return{type:"AUDIO_PREVIEW_SET_IS_OPEN",isOpen:e}},G=function(e,t){return{type:"AUDIO_PREVIEW_SET_PLAYING",playingName:e,paused:t}},V=function(){return{type:"REFRESH_STORAGE"}},q=function(){return{type:"SAVE_FILE"}},Y=function(e){return{type:"SET_SITE_CONFIG",config:e}}},20: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&&void 0!==t[e]?t[e]:null},GetPreferenceWithDefault:function(e,t){return null!==n.GetPreference(e)?n.GetPreference(e):t}};t.a=n},200:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(13),r=a(14),o=a(33),i=function(){function e(t){Object(n.a)(this,e),this.limit=t,this.queue=[],this.processing=[]}return Object(r.a)(e,[{key:"enqueue",value:function(e){var t=this;return new Promise((function(a,n){t.queue.push({uploader:e,resolve:a,reject:n}),t.check()}))}},{key:"release",value:function(e){this.processing=this.processing.filter((function(t){return t!==e})),this.check()}},{key:"run",value:function(e){var t=this;if(this.queue=this.queue.filter((function(t){return t!==e})),this.processing.findIndex((function(t){return t.uploader.task.dst==e.uploader.task.dst&&t.uploader.task.file.name==e.uploader.task.name}))>-1)return e.reject(new o.k),void this.release(e);this.processing.push(e),e.uploader.run().then((function(){e.resolve(),t.release(e)}),(function(a){e.reject(a),t.release(e)}))}},{key:"check",value:function(){var e=this,t=this.processing.length,a=Math.max(0,this.limit-t);this.queue.slice(0,a).forEach((function(t){e.run(t)}))}}]),e}()},201:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(33),r=[function(e,t){if(void 0!=t.allowedSuffix&&t.allowedSuffix.length>0){var a=null===e||void 0===e?void 0:e.name.split(".").pop();if(null===a||!a||!t.allowedSuffix.includes(a))throw new n.e("File suffix not allowed in policy.","suffix",t)}},function(e,t){if(t.maxSize>0&&e.size>t.maxSize)throw new n.e("File size exceeds maximum limit.","size",t)}];function o(e,t){r.forEach((function(a){return a(e,t)}))}},202:function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return u})),a.d(t,"c",(function(){return p}));var n=a(9),r=a(88),o=a.n(r),i=a(33),c=o.a.CancelToken,l={transformResponse:[function(e){try{return JSON.parse(e)}catch(t){throw new i.s(e,t)}}]},s=Object(n.a)(Object(n.a)({},l),{},{baseURL:"/api/v3",withCredentials:!0});function u(e,t){return o.a.request(Object(n.a)(Object(n.a)(Object(n.a)({},l),t),{},{url:e})).catch((function(t){if(o.a.isCancel(t))throw new i.n;if(t instanceof i.s)throw t;throw new i.f(t,e)}))}function p(e,t){return u(e,Object(n.a)(Object(n.a)({},s),t))}},221:function(e,t,a){"use strict";var n=a(6),r=a(0),o=a.n(r),i=a(106),c=a(53),l=a(392),s=a.n(l),u=a(391),p=a.n(u),d=a(7),m=a(91),h=a(20),f=a(29),g=a.n(f),b=a(2),E=a(239),v=Object(i.a)((function(){return{icon:{color:"rgb(255, 255, 255)",opacity:"0.54"}}}));t.a=function(e){var t=e.position,a=Object(E.a)().t,i=Object(d.e)((function(e){return e.siteConfig.theme.palette.type})),l=Object(d.d)(),u=Object(r.useCallback)((function(){return l(Object(b.Q)())}),[l]),f=i&&"light"===i||!i,O=i&&"dark"===i,j=v();return o.a.createElement(m.a,{title:a(f?"navbar.toDarkMode":"navbar.toLightMode"),placement:"bottom"},o.a.createElement(c.a,{className:g()(Object(n.a)({},j.icon,"left"===t)),onClick:function(){h.a.SetPreference("theme_mode",f?"dark":"light"),u()},color:"inherit"},f&&o.a.createElement(p.a,null),O&&o.a.createElement(s.a,null)))}},222:function(e,t,a){"use strict";a.d(t,"a",(function(){return T}));var n=a(10),r=a(0),o=a.n(r),i=a(106),c=a(53),l=a(238),s=a(118),u=a(401),p=a.n(u),d=a(402),m=a.n(d),h=a(403),f=a.n(h),g=a(404),b=a.n(g),E=a(242),v=a(7),O=a(20),j=a(2),k=a(40),w=a(30),y=a(16),x=a(51),C=Object(i.a)((function(e){return{sideButton:{padding:"8px",marginRight:"5px"}}})),S=["A-Z","Z-A","\u6700\u65e9\u4e0a\u4f20","\u6700\u65b0\u4e0a\u4f20","\u6700\u65e9\u4fee\u6539","\u6700\u65b0\u4fee\u6539","\u6700\u5c0f","\u6700\u5927"],N=["50","100","200","500","1000"];function T(e){var t=e.isSmall,a=e.inherit,i=Object(v.d)(),u=Object(v.e)((function(e){return e.viewUpdate.explorerViewMethod})),d=Object(v.e)((function(e){return e.viewUpdate.shareInfo})),h=Object(v.e)((function(e){return e.viewUpdate.pagination.size})),g=Object(r.useCallback)((function(e){return i(Object(j.e)(e))}),[i]),T=Object(r.useCallback)((function(e){return i(Object(k.changeSortMethod)(e))}),[i]),P=Object(r.useCallback)((function(e){return i(Object(j.L)(e))}),[i]),L=Object(r.useCallback)((function(e){return i(Object(x.a)(e))}),[i]),R=Object(r.useState)(null),I=Object(n.a)(R,2),F=I[0],D=I[1],_=Object(r.useState)(null),M=Object(n.a)(_,2),A=M[0],U=M[1],z=Object(r.useState)(0),W=Object(n.a)(z,2),B=W[0],H=W[1],G=function(e){L(e),U(null)},V=function(){var e="icon"===u?"list":"list"===u?"smallIcon":"icon";O.a.SetPreference("view_method",e),g(e)},q=y.a.isMobile(),Y=C();return o.a.createElement(o.a.Fragment,null,"icon"===u&&o.a.createElement(c.a,{title:"\u5217\u8868\u5c55\u793a",className:Y.sideButton,onClick:V,color:a?"inherit":"default"},o.a.createElement(p.a,{fontSize:t?"small":"default"})),"list"===u&&o.a.createElement(c.a,{title:"\u5c0f\u56fe\u6807\u5c55\u793a",className:Y.sideButton,onClick:V,color:a?"inherit":"default"},o.a.createElement(m.a,{fontSize:t?"small":"default"})),"smallIcon"===u&&o.a.createElement(c.a,{title:"\u5927\u56fe\u6807\u5c55\u793a",className:Y.sideButton,onClick:V,color:a?"inherit":"default"},o.a.createElement(f.a,{fontSize:t?"small":"default"})),!q&&o.a.createElement(c.a,{title:"\u5206\u9875\u5927\u5c0f",className:Y.sideButton,onClick:function(e){U(e.currentTarget)},color:a?"inherit":"default"},o.a.createElement(w.o,{fontSize:t?"small":"default"})),o.a.createElement(l.a,{id:"sort-menu",anchorEl:A,open:Boolean(A),onClose:function(){return U(null)}},N.map((function(e,t){return o.a.createElement(s.a,{key:e,selected:e===h.toString(),onClick:function(){return G(parseInt(e))}},"".concat(e," / \u9875"))})),o.a.createElement(s.a,{selected:-1===h,onClick:function(){return G(-1)}},"\u4e0d\u5206\u9875")),o.a.createElement(c.a,{title:"\u6392\u5e8f\u65b9\u5f0f",className:Y.sideButton,onClick:function(e){D(e.currentTarget)},color:a?"inherit":"default"},o.a.createElement(b.a,{fontSize:t?"small":"default"})),o.a.createElement(l.a,{id:"sort-menu",anchorEl:F,open:Boolean(F),onClose:function(){return D(null)}},S.map((function(e,t){return o.a.createElement(s.a,{key:e,selected:t===B,onClick:function(e){return function(e,t){H(t);T({0:"namePos",1:"nameRev",2:"timePos",3:"timeRev",4:"modifyTimePos",5:"modifyTimeRev",6:"sizePos",7:"sizeRes"}[t]),D(null)}(0,t)}},e)}))),d&&o.a.createElement(c.a,{title:"\u7531 "+d.creator.nick+" \u521b\u5efa",className:Y.sideButton,onClick:function(e){return P(e.currentTarget)},style:{padding:5}},o.a.createElement(E.a,{style:{height:23,width:23},src:"/api/v3/user/avatar/"+d.creator.key+"/s"})))}},231: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(106),c=a(431),l=a.n(c),s=a(104),u=a.n(s),p=a(123),d=a(16),m=a(268),h=a(91),f=a(7011),g=a(143),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:g.a[500],position:"absolute",top:-6,left:-6,zIndex:1},wrapper:{margin:e.spacing(1),position:"relative"},buttonSuccess:{backgroundColor:g.a[500],"&:hover":{backgroundColor:g.a[700]}}}}));function v(e){var t=E(),a=Object(b.a)(Object(n.a)({},t.buttonSuccess,"success"===e.status));return o.a.createElement(p.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(u.a,null):o.a.createElement(l.a,null))),"loading"===e.status&&o.a.createElement(f.a,{size:68,className:t.fabProgress}))))}},233:function(e,t,a){"use strict";a.r(t);var n=a(6),r=a(13),o=a(14),i=a(17),c=a(18),l=a(0),s=a.n(l),u=a(7),p=a(80),d=a(12),m=a(7091),h=a(7092),f=a(7093),g=a(7116),b=a(7094),E=a(7095),v=a(7011),O=a(7112),j=a(8),k=a(106),w=a(236),y=Object(k.a)({avatar:{backgroundColor:w.a[100],color:w.a[600]},loadingContainer:{display:"flex"},loading:{marginTop:10,marginLeft:20}});function x(){var e=y(),t=Object(u.e)((function(e){return e.viewUpdate.modals.loading})),a=Object(u.e)((function(e){return e.viewUpdate.modals.loadingText}));return s.a.createElement(m.a,{"aria-labelledby":"simple-dialog-title",open:t},s.a.createElement(f.a,null,s.a.createElement(O.a,{className:e.loadingContainer},s.a.createElement(v.a,{color:"secondary"}),s.a.createElement("div",{className:e.loading},a))))}var C=a(10),S=a(2),N=Object(k.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 T(e){var t=Object(l.useState)(""),a=Object(C.a)(t,2),n=a[0],r=a[1],o=Object(l.useState)(""),i=Object(C.a)(o,2),c=i[0],g=i[1],j=Object(u.d)(),k=Object(l.useCallback)((function(e,t,a,n){return j(Object(S.R)(e,t,a,n))}),[j]),w=Object(l.useCallback)((function(e){j(Object(S.G)(e))}),[j]),y=Object(l.useCallback)((function(){j(Object(S.B)())}),[j]),x=N();return s.a.createElement(m.a,{open:e.open,onClose:e.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.a,{id:"form-dialog-title"},"\u590d\u5236\u5230"),s.a.createElement(p.a,{presentPath:e.presentPath,selected:e.selected,onSelect:function(e){var t="/"===e.path?e.path+e.name:e.path+"/"+e.name;r(t),g(e.name)}}),""!==n&&s.a.createElement(f.a,{className:x.contentFix},s.a.createElement(O.a,null,"\u590d\u5236\u5230 ",s.a.createElement("strong",null,c))),s.a.createElement(b.a,null,s.a.createElement(E.a,{onClick:e.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:x.wrapper},s.a.createElement(E.a,{onClick:function(t){null!=t&&t.preventDefault(),w(!0);var a=[],r=[];"dir"===e.selected[0].type?a.push(e.selected[0].id):r.push(e.selected[0].id),d.b.post("/object/copy",{src_dir:e.selected[0].path,src:{dirs:a,items:r},dst:"//"===n?"/":n}).then((function(){e.onClose(),y(),w(!1)})).catch((function(e){k("top","right",e.message,"error"),w(!1)}))},color:"primary",disabled:""===n||e.modalsLoading},"\u786e\u5b9a",e.modalsLoading&&s.a.createElement(v.a,{size:24,className:x.buttonProgress})))))}var P=a(9),L=a(7148),R=a(269),I=a(270),F=a(63),D=a(75),_=a(64),M=a(140),A=a.n(M),U=a(426),z=a.n(U),W=a(425),B=a.n(W),H=a(459),G=a(180),V=a(7017),q=a(7019),Y=a(7020),K=a(55),J=a(67),Z=a.n(J),$=a(7021),X=a(7114),Q=a(7115),ee=a(53),te=a(7113),ae=a(7042),ne=a(91),re=a(118),oe=a(462),ie=a(229),ce=a.n(ie),le=Object(k.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=Z()({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),ue=Z()({root:{padding:0,"&$expanded":{}},content:{margin:0,display:"initial","&$expanded":{margin:"0 0"}},expanded:{}})(q.a),pe=Z()((function(e){return{root:{padding:24,backgroundColor:e.palette.background.default}}}))(Y.a);function de(e){var t=Object(u.d)(),a=le(),r=Object(l.useCallback)((function(e,a,n,r){return t(Object(S.R)(e,a,n,r))}),[t]),o=Object(l.useRef)(null),i=s.a.useState(!1),c=Object(C.a)(i,2),p=c[0],O=c[1],j=s.a.useState(""),k=Object(C.a)(j,2),w=k[0],y=k[1],x=s.a.useState({password:"",downloads:1,expires:86400,showPassword:!1}),N=Object(C.a)(x,2),T=N[0],M=N[1],U=s.a.useState({password:!1,expire:!1,preview:!0}),W=Object(C.a)(U,2),V=W[0],q=W[1],Y=function(e){return function(t){"password"===e&&(""===t.target.value?q(Object(P.a)(Object(P.a)({},V),{},{password:!1})):q(Object(P.a)(Object(P.a)({},V),{},{password:!0}))),M(Object(P.a)(Object(P.a)({},T),{},Object(n.a)({},e,t.target.value)))}},J=function(e){return function(t,a){O(!!a&&e)}},Z=function(e){return function(){V[e]||J(e)(null,!0),"password"===e&&V[e]&&M(Object(P.a)(Object(P.a)({},T),{},{password:""})),q(Object(P.a)(Object(P.a)({},V),{},Object(n.a)({},e,!V[e])))}},ie=function(){e.onClose(),setTimeout((function(){y("")}),500)};return s.a.createElement(m.a,{open:e.open,onClose:ie,"aria-labelledby":"form-dialog-title",className:a.widthAnimation,maxWidth:"xs",fullWidth:!0},s.a.createElement(h.a,{id:"form-dialog-title"},"\u521b\u5efa\u5206\u4eab\u94fe\u63a5"),""===w&&s.a.createElement(s.a.Fragment,null,s.a.createElement(G.a,null),s.a.createElement(I.a,null,s.a.createElement(se,{expanded:"password"===p,onChange:J("password")},s.a.createElement(ue,{"aria-controls":"panel1a-content",id:"panel1a-header"},s.a.createElement(D.a,{button:!0},s.a.createElement(_.a,null,s.a.createElement(A.a,null)),s.a.createElement(F.a,{primary:"\u4f7f\u7528\u5bc6\u7801\u4fdd\u62a4"}),s.a.createElement(H.a,null,s.a.createElement(L.a,{checked:V.password,onChange:Z("password")})))),s.a.createElement(pe,null,s.a.createElement(R.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:T.showPassword?"text":"password",value:T.password,onChange:Y("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(){q(Object(P.a)(Object(P.a)({},V),{},{password:!0})),M(Object(P.a)(Object(P.a)({},T),{},{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(){M(Object(P.a)(Object(P.a)({},T),{},{showPassword:!T.showPassword}))},onMouseDown:function(e){e.preventDefault()},edge:"end"},s.a.createElement(ce.a,{on:T.showPassword,onIcon:s.a.createElement(X.a,null),offIcon:s.a.createElement(Q.a,null)}))),labelWidth:70})))),s.a.createElement(se,{expanded:"expire"===p,onChange:J("expire")},s.a.createElement(ue,{"aria-controls":"panel1a-content",id:"panel1a-header"},s.a.createElement(D.a,{button:!0},s.a.createElement(_.a,null,s.a.createElement(z.a,null)),s.a.createElement(F.a,{primary:"\u81ea\u52a8\u8fc7\u671f"}),s.a.createElement(H.a,null,s.a.createElement(L.a,{checked:V.expire,onChange:Z("expire")})))),s.a.createElement(pe,{className:a.flexCenter},s.a.createElement(R.a,{style:{marginRight:10}},s.a.createElement(oe.a,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:T.downloads,onChange:Y("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(R.a,{style:{marginRight:10,marginLeft:10}},s.a.createElement(oe.a,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:T.expires,onChange:Y("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"===p,onChange:J("preview")},s.a.createElement(ue,{"aria-controls":"panel1a-content",id:"panel1a-header"},s.a.createElement(D.a,{button:!0},s.a.createElement(_.a,null,s.a.createElement(A.a,null)),s.a.createElement(F.a,{primary:"\u5141\u8bb8\u9884\u89c8"}),s.a.createElement(H.a,null,s.a.createElement(L.a,{checked:V.preview,onChange:Z("preview")})))),s.a.createElement(pe,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(G.a,null)),""!==w&&s.a.createElement(f.a,null,s.a.createElement(g.a,{onFocus:function(e){return e.target.select()},autoFocus:!0,inputProps:{readonly:!0},label:"\u5206\u4eab\u94fe\u63a5",value:w,variant:"outlined",fullWidth:!0})),s.a.createElement(b.a,null,""!==w&&s.a.createElement("div",{className:a.wrapper},s.a.createElement(E.a,{onClick:function(){if(navigator.share){var t="\u6211\u5411\u4f60\u5206\u4eab\u4e86\uff1a".concat(e.selected[0].name," \u94fe\u63a5\uff1a").concat(w);o.current&&o.current.password&&(t+="\u5bc6\u7801\uff1a".concat(o.current.password)),navigator.share({text:t})}else navigator.clipboard&&(navigator.clipboard.writeText(w),r("top","right","\u5206\u4eab\u94fe\u63a5\u5df2\u590d\u5236","info"))},color:"secondary"},"\u53d1\u9001\u94fe\u63a5")),s.a.createElement(E.a,{onClick:ie},"\u5173\u95ed"),""===w&&s.a.createElement("div",{className:a.wrapper},s.a.createElement(E.a,{onClick:function(t){t.preventDefault(),e.setModalsLoading(!0);var a={id:e.selected[0].id,is_dir:"dir"===e.selected[0].type,password:T.password,downloads:V.expire?T.downloads:-1,expire:T.expires,preview:V.preview};o.current=a,d.b.post("/share",a).then((function(t){y(t.data),M({password:"",downloads:1,expires:86400,showPassword:!1}),q({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(v.a,{size:24,className:a.buttonProgress})))))}var me=a(19),he=a(16),fe=(a(25),a(40)),ge=Object(k.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(l.useState)(""),a=Object(C.a)(t,2),n=a[0],r=a[1],o=Object(l.useState)(""),i=Object(C.a)(o,2),c=i[0],d=i[1],g=Object(u.d)(),j=Object(l.useCallback)((function(e,t,a,n){return g(Object(S.R)(e,t,a,n))}),[g]),k=Object(l.useCallback)((function(e){g(Object(S.G)(e))}),[g]),w=Object(l.useCallback)((function(e){return g(Object(fe.submitDecompressTask)(e))}),[g]),y=ge();return s.a.createElement(m.a,{open:e.open,onClose:e.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.a,{id:"form-dialog-title"},"\u89e3\u538b\u9001\u81f3"),s.a.createElement(p.a,{presentPath:e.presentPath,selected:e.selected,onSelect:function(e){var t="/"===e.path?e.path+e.name:e.path+"/"+e.name;r(t),d(e.name)}}),""!==n&&s.a.createElement(f.a,{className:y.contentFix},s.a.createElement(O.a,null,"\u89e3\u538b\u7f29\u81f3 ",s.a.createElement("strong",null,c))),s.a.createElement(b.a,null,s.a.createElement(E.a,{onClick:e.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:y.wrapper},s.a.createElement(E.a,{onClick:function(t){null!=t&&t.preventDefault(),k(!0),w(n).then((function(){e.onClose(),j("top","right","\u89e3\u538b\u7f29\u4efb\u52a1\u5df2\u521b\u5efa","success"),k(!1)})).catch((function(e){j("top","right",e.message,"error"),k(!1)}))},color:"primary",disabled:""===n||e.modalsLoading},"\u786e\u5b9a",e.modalsLoading&&s.a.createElement(v.a,{size:24,className:y.buttonProgress})))))}var Ee=Object(k.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(l.useState)(""),a=Object(C.a)(t,2),n=a[0],r=a[1],o=Object(l.useState)(""),i=Object(C.a)(o,2),c=i[0],d=i[1],j=Object(l.useState)(""),k=Object(C.a)(j,2),w=(k[0],k[1]),y=Object(u.d)(),x=Object(l.useCallback)((function(e,t,a,n){return y(Object(S.R)(e,t,a,n))}),[y]),N=Object(l.useCallback)((function(e){y(Object(S.G)(e))}),[y]),T=Object(l.useCallback)((function(e,t){return y(Object(fe.submitCompressTask)(e,t))}),[y]),P=Ee();return s.a.createElement(m.a,{open:e.open,onClose:e.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.a,{id:"form-dialog-title"},"\u5b58\u653e\u5230"),s.a.createElement(p.a,{presentPath:e.presentPath,selected:e.selected,onSelect:function(e){var t="/"===e.path?e.path+e.name:e.path+"/"+e.name;r(t),w(e.name)}}),""!==n&&s.a.createElement(f.a,{className:P.contentFix},s.a.createElement(O.a,null,s.a.createElement(g.a,{onChange:function(e){return d(e.target.value)},value:c,fullWidth:!0,autoFocus:!0,id:"standard-basic",label:"\u538b\u7f29\u6587\u4ef6\u540d"}))),s.a.createElement(b.a,null,s.a.createElement(E.a,{onClick:e.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:P.wrapper},s.a.createElement(E.a,{onClick:function(t){null!=t&&t.preventDefault(),N(!0),T(c,n).then((function(){e.onClose(),x("top","right","\u538b\u7f29\u4efb\u52a1\u5df2\u521b\u5efa","success"),N(!1)})).catch((function(e){x("top","right",e.message,"error"),N(!1)}))},color:"primary",disabled:""===n||""===c||e.modalsLoading},"\u786e\u5b9a",e.modalsLoading&&s.a.createElement(v.a,{size:24,className:P.buttonProgress})))))}var Oe=Object(k.a)((function(e){return{}}));function je(){var e=Oe(),t=Object(u.e)((function(e){return e.viewUpdate.modals.option}));return s.a.createElement(m.a,{open:t&&t.open,onClose:t&&t.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.a,{id:"form-dialog-title"},t&&t.title),s.a.createElement(f.a,{dividers:"paper",className:e.content},s.a.createElement(I.a,{component:"nav","aria-label":"main mailbox folders"},t&&t.options.map((function(e){return s.a.createElement(D.a,{key:e.key,onClick:function(){return t&&t.callback(e)},button:!0},s.a.createElement(F.a,{primary:e.name,secondary:e.description}))})))),s.a.createElement(b.a,null,s.a.createElement(E.a,{onClick:t&&t.onClose},"\u53d6\u6d88")))}var ke=a(155),we=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(){var e;Object(r.a)(this,a);for(var o=arguments.length,i=new Array(o),c=0;c0?e.props.toggleSnackbar("top","right","".concat(a.length," \u4e2a\u4efb\u52a1\u521b\u5efa\u5931\u8d25\uff1a").concat(a.join(",")),"warning"):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}),e.newNameSuffix="",e.props.closeAllModals()},e.handleChange=function(t){return function(a){e.setState(Object(n.a)({},t,a.target.checked))}},e.copySource=function(){navigator.clipboard&&(navigator.clipboard.writeText(e.props.modalsStatus.getSource),e.props.toggleSnackbar("top","right","\u94fe\u63a5\u5df2\u590d\u5236","info"))},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(x,null),s.a.createElement(je,null),s.a.createElement(m.a,{open:this.props.modalsStatus.getSource,onClose:this.onClose,"aria-labelledby":"form-dialog-title",fullWidth:!0},s.a.createElement(h.a,{id:"form-dialog-title"},"\u83b7\u53d6\u6587\u4ef6\u5916\u94fe"),s.a.createElement(f.a,null,s.a.createElement(g.a,{autoFocus:!0,inputProps:{readonly:!0},label:"\u6587\u4ef6\u5916\u94fe",multiline:!0,value:this.props.modalsStatus.getSource,variant:"outlined",fullWidth:!0})),s.a.createElement(b.a,null,s.a.createElement(E.a,{onClick:this.copySource,color:"secondary"},"\u590d\u5236"),s.a.createElement(E.a,{onClick:this.onClose},"\u5173\u95ed"))),s.a.createElement(m.a,{open:this.props.modalsStatus.createNewFolder,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.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(g.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(b.a,null,s.a.createElement(E.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(E.a,{onClick:this.submitCreateNewFolder,color:"primary",disabled:""===this.state.newFolderName||this.props.modalsLoading},"\u521b\u5efa",this.props.modalsLoading&&s.a.createElement(v.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(m.a,{open:this.props.modalsStatus.createNewFile,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.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(g.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(b.a,null,s.a.createElement(E.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(E.a,{onClick:this.submitCreateNewFile,color:"primary",disabled:""===this.state.newFileName||this.props.modalsLoading},"\u521b\u5efa",this.props.modalsLoading&&s.a.createElement(v.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(m.a,{open:this.props.modalsStatus.rename,onClose:this.onClose,"aria-labelledby":"form-dialog-title",maxWidth:"sm",fullWidth:!0},s.a.createElement(h.a,{id:"form-dialog-title"},"\u91cd\u547d\u540d"),s.a.createElement(f.a,null,s.a.createElement(O.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(g.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(b.a,null,s.a.createElement(E.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(E.a,{onClick:this.submitRename,color:"primary",disabled:""===this.state.newName||this.props.modalsLoading},"\u786e\u5b9a",this.props.modalsLoading&&s.a.createElement(v.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(T,{open:this.props.modalsStatus.copy,onClose:this.onClose,presentPath:this.props.path,selected:this.props.selected,modalsLoading:this.props.modalsLoading}),s.a.createElement(m.a,{open:this.props.modalsStatus.move,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.a,{id:"form-dialog-title"},"\u79fb\u52a8\u81f3"),s.a.createElement(p.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(O.a,null,"\u79fb\u52a8\u81f3"," ",s.a.createElement("strong",null,this.state.selectedPathName))),s.a.createElement(b.a,null,s.a.createElement(E.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(E.a,{onClick:this.submitMove,color:"primary",disabled:""===this.state.selectedPath||this.props.modalsLoading},"\u786e\u5b9a",this.props.modalsLoading&&s.a.createElement(v.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(m.a,{open:this.props.modalsStatus.remove,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.a,{id:"form-dialog-title"},"\u5220\u9664\u5bf9\u8c61"),s.a.createElement(f.a,null,s.a.createElement(O.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(b.a,null,s.a.createElement(E.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(E.a,{onClick:this.submitRemove,color:"primary",disabled:this.props.modalsLoading},"\u786e\u5b9a",this.props.modalsLoading&&s.a.createElement(v.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(m.a,{open:this.props.modalsStatus.music,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.a,{id:"form-dialog-title"},"\u97f3\u9891\u64ad\u653e"),s.a.createElement(f.a,null,s.a.createElement(O.a,null,0!==this.props.selected.length&&s.a.createElement("audio",{controls:!0,src:he.a.isSharePage(this.props.location.pathname)?d.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):""):d.a+"/file/preview/"+this.props.selected[0].id}))),s.a.createElement(b.a,null,s.a.createElement(E.a,{onClick:this.onClose},"\u5173\u95ed"))),s.a.createElement(m.a,{open:this.props.modalsStatus.remoteDownload,onClose:this.onClose,"aria-labelledby":"form-dialog-title",fullWidth:!0},s.a.createElement(h.a,{id:"form-dialog-title"},"\u65b0\u5efa\u79bb\u7ebf\u4e0b\u8f7d\u4efb\u52a1"),s.a.createElement(f.a,null,s.a.createElement(O.a,null,s.a.createElement(g.a,{label:"\u6587\u4ef6\u5730\u5740",autoFocus:!0,fullWidth:!0,multiline:!0,id:"downloadURL",onChange:this.handleInputChange,placeholder:"\u8f93\u5165\u6587\u4ef6\u4e0b\u8f7d\u5730\u5740\uff0c\u4e00\u884c\u4e00\u4e2a\uff0c\u652f\u6301 HTTP(s)/FTP/\u78c1\u529b\u94fe"}))),s.a.createElement(b.a,null,s.a.createElement(E.a,{onClick:this.onClose},"\u5173\u95ed"),s.a.createElement(E.a,{onClick:this.remoteDownloadNext,color:"primary",disabled:this.props.modalsLoading||""===this.state.downloadURL},"\u4e0b\u4e00\u6b65"))),s.a.createElement(m.a,{open:this.state.remoteDownloadPathSelect,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.a,{id:"form-dialog-title"},"\u9009\u62e9\u5b58\u50a8\u4f4d\u7f6e"),s.a.createElement(p.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(O.a,null,"\u4e0b\u8f7d\u81f3"," ",s.a.createElement("strong",null,this.state.selectedPathName))),s.a.createElement(b.a,null,s.a.createElement(E.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(E.a,{onClick:this.submitDownload,color:"primary",disabled:""===this.state.selectedPath||this.props.modalsLoading},"\u521b\u5efa\u4efb\u52a1",this.props.modalsLoading&&s.a.createElement(v.a,{size:24,className:t.buttonProgress}))))),s.a.createElement(m.a,{open:this.props.modalsStatus.torrentDownload,onClose:this.onClose,"aria-labelledby":"form-dialog-title"},s.a.createElement(h.a,{id:"form-dialog-title"},"\u9009\u62e9\u5b58\u50a8\u4f4d\u7f6e"),s.a.createElement(p.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(O.a,null,"\u4e0b\u8f7d\u81f3"," ",s.a.createElement("strong",null,this.state.selectedPathName))),s.a.createElement(b.a,null,s.a.createElement(E.a,{onClick:this.onClose},"\u53d6\u6d88"),s.a.createElement("div",{className:t.wrapper},s.a.createElement(E.a,{onClick:this.submitTorrentDownload,color:"primary",disabled:""===this.state.selectedPath||this.props.modalsLoading},"\u521b\u5efa\u4efb\u52a1",this.props.modalsLoading&&s.a.createElement(v.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}(l.Component),ye=Object(u.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(S.f)())},toggleSnackbar:function(t,a,n,r){e(Object(S.R)(t,a,n,r))},setModalsLoading:function(t){e(Object(S.G)(t))},refreshFileList:function(){e(Object(S.B)())},refreshStorage:function(){e(Object(S.C)())},openLoadingDialog:function(t){e(Object(S.r)(t))}}}))(Object(j.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.k)(we)));t.default=ye},25:function(e,t,a){"use strict";a.d(t,"p",(function(){return n})),a.d(t,"h",(function(){return r})),a.d(t,"o",(function(){return o})),a.d(t,"d",(function(){return i})),a.d(t,"b",(function(){return c})),a.d(t,"c",(function(){return l})),a.d(t,"m",(function(){return s})),a.d(t,"f",(function(){return u})),a.d(t,"j",(function(){return p})),a.d(t,"a",(function(){return d})),a.d(t,"g",(function(){return m})),a.d(t,"e",(function(){return h})),a.d(t,"n",(function(){return f})),a.d(t,"i",(function(){return g})),a.d(t,"k",(function(){return b})),a.d(t,"l",(function(){return E})),a.d(t,"q",(function(){return v}));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){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)},i=function(e){window.document.querySelector("meta[name=theme-color]").setAttribute("content",e)};function c(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))}function l(e){return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function s(e){var t=null!==e?e.substr(1).split("/"):this.props.path.substr(1).split("/");return"/"+t.slice(0,t.length-1).join("/")}function u(e){return"/"===e.path?e.path+e.name:e.path+"/"+e.name}function p(e){return parseInt(e,16).toString(2).padStart(8,"0")}function d(e){if(!e)return"";var t=e.split("/");return t.pop(),""===t.join("/")?"/":t.join("/")}function m(e){return e.split("/").pop()}function h(e){return e.substring(0,e.lastIndexOf("."))||e}function f(e){for(var t="",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=a.length,r=0;r=0},E=function(){var e=window.navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),a=!!e.match(/WebKit/i);return t&&a&&!e.match(/CriOS/i)};function v(){var e=window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(e,"px"))}},265:function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return w}));var n=a(11),r=a.n(n),o=a(27),i=a(10),c=a(6),l=a(0),s=a.n(l),u=a(107),p=a(106),d=a(19),m=a(12),h=a(7),f=a(357),g=a.n(f),b=a(231),E=a(16),v=a(112),O=a(2),j=a(97),k=Object(p.a)((function(e){var t;return{layout:(t={width:"auto",marginTop:"30px",marginLeft:e.spacing(3),marginRight:e.spacing(3)},Object(c.a)(t,e.breakpoints.up(1100+2*e.spacing(3)),{marginLeft:e.spacing(12),marginRight:e.spacing(12)}),Object(c.a)(t,"marginBottom",50),t),player:{borderRadius:"4px"},root:{backgroundColor:"white",borderRadius:"8px"},"@global":{".for-toolbar":{overflowX:"auto!important"}}}}));function w(){var t=Object(l.useState)(""),a=Object(i.a)(t,2),n=a[0],c=a[1],p=Object(l.useState)(""),f=Object(i.a)(p,2),w=f[0],y=f[1],x=Object(l.useState)(!0),C=Object(i.a)(x,2),S=C[0],N=C[1],T=Object(d.j)(),P=s.a.createRef(),L=Object(d.h)(),R=new URLSearchParams(Object(d.h)().search),I=Object(d.i)().id;Object(j.a)(R,T,L);var F=Object(h.d)(),D=Object(l.useCallback)((function(e,t,a,n){return F(Object(O.R)(e,t,a,n))}),[F]);Object(l.useEffect)((function(){var t="/file/content/"+R.get("id");E.a.isSharePage(L.pathname)&&(t="/share/content/"+I,""!==R.get("share_path")&&(t+="?path="+encodeURIComponent(R.get("share_path")))),N(!0),m.b.get(t,{responseType:"arraybuffer"}).then((function(t){var a=new e(t.rawData,"binary").toString();c(a)})).catch((function(e){D("top","right","\u65e0\u6cd5\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c"+e.message,"error")})).then((function(){N(!1)}))}),[T.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)}}))},M=function(){y("loading"),m.b.put("/file/update/"+R.get("id"),n).then((function(){y("success"),setTimeout((function(){return y("")}),2e3)})).catch((function(e){y(""),D("top","right",e.message,"error")}))},A=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=P.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)}}(),U=k();return s.a.createElement("div",{className:U.layout},s.a.createElement(u.a,{className:U.root,elevation:1},S&&s.a.createElement(v.a,null),!S&&s.a.createElement(g.a,{ref:P,value:n,onSave:function(){return M()},addImg:function(e){return A(e)},onChange:function(e){return c(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}})),!E.a.isSharePage(L.pathname)&&s.a.createElement(b.a,{onClick:M,status:w}))}}).call(this,a(280).Buffer)},266:function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return S}));var n=a(10),r=a(6),o=a(0),i=a.n(o),c=a(42),l=a(107),s=a(106),u=a(19),p=a(12),d=a(7),m=a(16),h=a(231),f=a(46),g=a(112),b=a(269),E=a(7039),v=a(462),O=a(7040),j=a(118),k=a(180),w=a(2),y=a(97),x=i.a.lazy((function(){return Promise.all([a.e(0),a.e(1)]).then(a.t.bind(null,7066,7))})),C=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",40),t),editor:{borderRadius:"4px"},"@global":{".overflow-guard":{borderRadius:"4px!important"}},formControl:{margin:"8px 16px 8px 16px"},toobar:{textAlign:"right"}}}));function S(){var t=Object(o.useState)(""),a=Object(n.a)(t,2),r=a[0],s=a[1],S=Object(o.useState)(""),N=Object(n.a)(S,2),T=N[0],P=N[1],L=Object(o.useState)(!0),R=Object(n.a)(L,2),I=R[0],F=R[1],D=Object(o.useState)("javascript"),_=Object(n.a)(D,2),M=_[0],A=_[1],U=Object(o.useState)("off"),z=Object(n.a)(U,2),W=z[0],B=z[1],H=Object(u.j)(),G=Object(u.h)(),V=new URLSearchParams(Object(u.h)().search),q=Object(u.i)().id,Y=Object(c.a)(),K=Object(y.a)(V,H,G).title,J=Object(d.d)(),Z=Object(o.useCallback)((function(e,t,a,n){return J(Object(w.R)(e,t,a,n))}),[J]);Object(o.useEffect)((function(){var e=K.split(".");A(f.b[e.pop()])}),[K]),Object(o.useEffect)((function(){var t="/file/content/"+V.get("id");m.a.isSharePage(G.pathname)&&(t="/share/content/"+q,""!==V.get("share_path")&&(t+="?path="+encodeURIComponent(V.get("share_path")))),F(!0),p.b.get(t,{responseType:"arraybuffer"}).then((function(t){var a=new e(t.rawData,"binary").toString();s(a)})).catch((function(e){Z("top","right","\u65e0\u6cd5\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\uff0c"+e.message,"error")})).then((function(){F(!1)}))}),[H.params[0]]);var $=C(),X=m.a.isSharePage(G.pathname);return i.a.createElement("div",{className:$.layout},i.a.createElement(l.a,{className:$.root,elevation:1},i.a.createElement("div",{className:$.toobar},i.a.createElement(b.a,{className:$.formControl},i.a.createElement(E.a,{control:i.a.createElement(O.a,{onChange:function(e){return B(e.target.checked?"on":"off")}}),label:"\u81ea\u52a8\u6362\u884c"})),i.a.createElement(b.a,{className:$.formControl},i.a.createElement(v.a,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:M,onChange:function(e){return A(e.target.value)}},Array.from(new Set(Object.keys(f.b).map((function(e){return f.b[e]})))).map((function(e,t){return i.a.createElement(j.a,{value:e,key:t},e)}))))),i.a.createElement(k.a,null),I&&i.a.createElement(g.a,null),!I&&i.a.createElement(o.Suspense,{fallback:i.a.createElement(g.a,null)},i.a.createElement(x,{height:"calc(100vh - 198px)",language:M,theme:"dark"===Y.palette.type?"vs-dark":"vs",value:r,options:{readOnly:X,extraEditorClassName:$.editor,wordWrap:W},onChange:function(e){return s(e)}}))),!X&&i.a.createElement(h.a,{onClick:function(){P("loading"),p.b.put("/file/update/"+V.get("id"),r).then((function(){P("success"),setTimeout((function(){return P("")}),2e3)})).catch((function(e){P(""),Z("top","right",e.message,"error")}))},status:T}))}}).call(this,a(280).Buffer)},33:function(e,t,a){"use strict";a.d(t,"v",(function(){return n})),a.d(t,"u",(function(){return m})),a.d(t,"e",(function(){return h})),a.d(t,"t",(function(){return f})),a.d(t,"c",(function(){return b})),a.d(t,"d",(function(){return E})),a.d(t,"f",(function(){return v})),a.d(t,"g",(function(){return O})),a.d(t,"n",(function(){return j})),a.d(t,"r",(function(){return k})),a.d(t,"k",(function(){return w})),a.d(t,"h",(function(){return y})),a.d(t,"i",(function(){return x})),a.d(t,"j",(function(){return C})),a.d(t,"o",(function(){return S})),a.d(t,"p",(function(){return N})),a.d(t,"l",(function(){return T})),a.d(t,"m",(function(){return P})),a.d(t,"b",(function(){return L})),a.d(t,"a",(function(){return R})),a.d(t,"w",(function(){return I})),a.d(t,"q",(function(){return F})),a.d(t,"s",(function(){return D}));var n,r=a(108),o=a(68),i=a(17),c=a(18),l=a(13),s=a(14),u=a(37);!function(e){e.InvalidFile="InvalidFile",e.NoPolicySelected="NoPolicySelected",e.UnknownPolicyType="UnknownPolicyType",e.FailedCreateUploadSession="FailedCreateUploadSession",e.FailedDeleteUploadSession="FailedDeleteUploadSession",e.HTTPRequestFailed="HTTPRequestFailed",e.LocalChunkUploadFailed="LocalChunkUploadFailed",e.SlaveChunkUploadFailed="SlaveChunkUploadFailed",e.WriteCtxFailed="WriteCtxFailed",e.RemoveCtxFailed="RemoveCtxFailed",e.ReadCtxFailed="ReadCtxFailed",e.InvalidCtxData="InvalidCtxData",e.CtxExpired="CtxExpired",e.RequestCanceled="RequestCanceled",e.ProcessingTaskDuplicated="ProcessingTaskDuplicated",e.OneDriveChunkUploadFailed="OneDriveChunkUploadFailed",e.OneDriveEmptyFile="OneDriveEmptyFile",e.FailedFinishOneDriveUpload="FailedFinishOneDriveUpload",e.S3LikeChunkUploadFailed="S3LikeChunkUploadFailed",e.S3LikeUploadCallbackFailed="S3LikeUploadCallbackFailed",e.COSUploadCallbackFailed="COSUploadCallbackFailed",e.COSPostUploadFailed="COSPostUploadFailed",e.UpyunPostUploadFailed="UpyunPostUploadFailed",e.QiniuChunkUploadFailed="QiniuChunkUploadFailed",e.FailedFinishOSSUpload="FailedFinishOSSUpload",e.FailedFinishQiniuUpload="FailedFinishQiniuUpload",e.FailedTransformResponse="FailedTransformResponse"}(n||(n={}));var p=[n.FailedCreateUploadSession,n.HTTPRequestFailed,n.LocalChunkUploadFailed,n.SlaveChunkUploadFailed,n.RequestCanceled,n.ProcessingTaskDuplicated,n.FailedTransformResponse],d=[-1],m=function(){function e(t,a){Object(l.a)(this,e),this.name=t,this.message=a,this.stack=void 0,this.stack=(new Error).stack}return Object(s.a)(e,[{key:"Message",value:function(e){return this.message}},{key:"Retryable",value:function(){return p.includes(this.name)}}]),e}(),h=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e,r,o){var i;return Object(l.a)(this,a),(i=t.call(this,n.InvalidFile,e)).field=void 0,i.policy=void 0,i.field=r,i.policy=o,i}return Object(s.a)(a,[{key:"Message",value:function(e){return"size"==this.field?"\u6587\u4ef6\u5927\u5c0f\u8d85\u51fa\u5b58\u50a8\u7b56\u7565\u9650\u5236\uff08\u6700\u5927\uff1a".concat(Object(u.p)(this.policy.maxSize),"\uff09"):"\u5b58\u50a8\u7b56\u7565\u4e0d\u652f\u6301\u4e0a\u4f20\u6b64\u6269\u5c55\u540d\u7684\u6587\u4ef6\uff08\u5f53\u524d\u652f\u6301\uff1a".concat(this.policy.allowedSuffix?this.policy.allowedSuffix.join(","):"*","\uff09")}}]),a}(m),f=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e,r){var o;return Object(l.a)(this,a),(o=t.call(this,n.UnknownPolicyType,e)).policy=void 0,o.policy=r,o}return Object(s.a)(a)}(m),g=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e,n,r){var o;return Object(l.a)(this,a),(o=t.call(this,e,n)).response=r,o}return Object(s.a)(a,[{key:"Message",value:function(e){var t="".concat(this.message,": ").concat(this.response.msg);return this.response.error&&(t+=" (".concat(this.response.error,")")),t}},{key:"Retryable",value:function(){return Object(r.a)(Object(o.a)(a.prototype),"Retryable",this).call(this)&&d.includes(this.response.code)}}]),a}(m),b=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){return Object(l.a)(this,a),t.call(this,n.FailedCreateUploadSession,"",e)}return Object(s.a)(a,[{key:"Message",value:function(e){return this.message="\u65e0\u6cd5\u521b\u5efa\u4e0a\u4f20\u4f1a\u8bdd",Object(r.a)(Object(o.a)(a.prototype),"Message",this).call(this,e)}}]),a}(g),E=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){return Object(l.a)(this,a),t.call(this,n.FailedDeleteUploadSession,"",e)}return Object(s.a)(a,[{key:"Message",value:function(e){return this.message="\u65e0\u6cd5\u5220\u9664\u4e0a\u4f20\u4f1a\u8bdd",Object(r.a)(Object(o.a)(a.prototype),"Message",this).call(this,e)}}]),a}(g),v=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e,r){var o;return Object(l.a)(this,a),(o=t.call(this,n.HTTPRequestFailed,e.message)).axiosErr=e,o.url=r,o.response=void 0,o.response=e.response,o}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u8bf7\u6c42\u5931\u8d25: ".concat(this.axiosErr," (").concat(this.url,")")}}]),a}(m),O=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e,r){var o;return Object(l.a)(this,a),(o=t.call(this,n.LocalChunkUploadFailed,"",e)).chunkIndex=r,o}return Object(s.a)(a,[{key:"Message",value:function(e){return this.message="\u5206\u7247 [".concat(this.chunkIndex,"] \u4e0a\u4f20\u5931\u8d25"),Object(r.a)(Object(o.a)(a.prototype),"Message",this).call(this,e)}}]),a}(g),j=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(){return Object(l.a)(this,a),t.call(this,n.RequestCanceled,"Request canceled")}return Object(s.a)(a)}(m),k=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e,r){var o;return Object(l.a)(this,a),(o=t.call(this,n.SlaveChunkUploadFailed,"",e)).chunkIndex=r,o}return Object(s.a)(a,[{key:"Message",value:function(e){return this.message="\u5206\u7247 [".concat(this.chunkIndex,"] \u4e0a\u4f20\u5931\u8d25"),Object(r.a)(Object(o.a)(a.prototype),"Message",this).call(this,e)}}]),a}(g),w=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(){return Object(l.a)(this,a),t.call(this,n.ProcessingTaskDuplicated,"Processing task duplicated")}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u540c\u540d\u6587\u4ef6\u7684\u4e0a\u4f20\u4efb\u52a1\u5df2\u7ecf\u5728\u5904\u7406\u4e2d"}}]),a}(m),y=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){var r;return Object(l.a)(this,a),(r=t.call(this,n.OneDriveChunkUploadFailed,e.error.message)).response=e,r}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u5206\u7247\u4e0a\u4f20\u5931\u8d25: ".concat(this.message)}}]),a}(m),x=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(){return Object(l.a)(this,a),t.call(this,n.OneDriveEmptyFile,"empty file not supported")}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u6682\u4e0d\u652f\u6301\u4e0a\u4f20\u7a7a\u6587\u4ef6\u81f3 OneDrive\uff0c\u8bf7\u901a\u8fc7\u521b\u5efa\u6587\u4ef6\u6309\u94ae\u521b\u5efa\u7a7a\u6587\u4ef6"}}]),a}(m),C=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){return Object(l.a)(this,a),t.call(this,n.FailedFinishOneDriveUpload,"",e)}return Object(s.a)(a,[{key:"Message",value:function(e){return this.message="\u65e0\u6cd5\u5b8c\u6210\u6587\u4ef6\u4e0a\u4f20",Object(r.a)(Object(o.a)(a.prototype),"Message",this).call(this,e)}}]),a}(g),S=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){var r;return Object(l.a)(this,a),(r=t.call(this,n.S3LikeChunkUploadFailed,e.getElementsByTagName("Message")[0].innerHTML)).response=e,r}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u5206\u7247\u4e0a\u4f20\u5931\u8d25: ".concat(this.message)}}]),a}(m),N=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){var r;return Object(l.a)(this,a),(r=t.call(this,n.S3LikeChunkUploadFailed,e.getElementsByTagName("Message")[0].innerHTML)).response=e,r}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u65e0\u6cd5\u5b8c\u6210\u6587\u4ef6\u4e0a\u4f20: ".concat(this.message," (").concat(this.response.getElementsByTagName("Code")[0].innerHTML,")")}}]),a}(m),T=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){var r;return Object(l.a)(this,a),(r=t.call(this,n.QiniuChunkUploadFailed,e.error)).response=e,r}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u5206\u7247\u4e0a\u4f20\u5931\u8d25: ".concat(this.message)}}]),a}(m),P=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){var r;return Object(l.a)(this,a),(r=t.call(this,n.FailedFinishQiniuUpload,e.error)).response=e,r}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u65e0\u6cd5\u5b8c\u6210\u6587\u4ef6\u4e0a\u4f20: ".concat(this.message)}}]),a}(m),L=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){var r;return Object(l.a)(this,a),(r=t.call(this,n.COSPostUploadFailed,e.getElementsByTagName("Message")[0].innerHTML)).response=e,r}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u4e0a\u4f20\u5931\u8d25: ".concat(this.message," (").concat(this.response.getElementsByTagName("Code")[0].innerHTML,")")}}]),a}(m),R=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){return Object(l.a)(this,a),t.call(this,n.COSUploadCallbackFailed,"",e)}return Object(s.a)(a,[{key:"Message",value:function(e){return this.message="\u65e0\u6cd5\u5b8c\u6210\u6587\u4ef6\u4e0a\u4f20",Object(r.a)(Object(o.a)(a.prototype),"Message",this).call(this,e)}}]),a}(g),I=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){var r;return Object(l.a)(this,a),(r=t.call(this,n.UpyunPostUploadFailed,e.message)).response=e,r}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u4e0a\u4f20\u5931\u8d25: ".concat(this.message)}}]),a}(m),F=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e){return Object(l.a)(this,a),t.call(this,n.S3LikeUploadCallbackFailed,"",e)}return Object(s.a)(a,[{key:"Message",value:function(e){return this.message="\u65e0\u6cd5\u5b8c\u6210\u6587\u4ef6\u4e0a\u4f20",Object(r.a)(Object(o.a)(a.prototype),"Message",this).call(this,e)}}]),a}(g),D=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(e,r){var o;return Object(l.a)(this,a),(o=t.call(this,n.FailedTransformResponse,r.message)).response=e,o}return Object(s.a)(a,[{key:"Message",value:function(e){return"\u65e0\u6cd5\u89e3\u6790\u54cd\u5e94: ".concat(this.message," (").concat(this.response,")")}}]),a}(m)},355:function(e,t,a){"use strict";var n=a(13),r=a(14),o=a(17),i=a(18),c=a(122),l=a(0),s=a.n(l),u=a(7),p=a(29),d=a.n(p),m=a(408),h=a.n(m),f=a(409),g=a.n(f),b=a(219),E=a.n(b),v=a(406),O=a.n(v),j=a(407),k=a.n(j),w=a(460),y=a(53),x=a(8),C=a(7035),S=["classes","className","message","onClose","variant"],N={success:O.a,warning:k.a,error:h.a,info:g.a};var T=Object(x.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(c.a)(e,S),l=N[o];return s.a.createElement(w.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(l,{className:d()(t.icon,t.iconVariant)}),n),action:[s.a.createElement(y.a,{key:"close","aria-label":"Close",color:"inherit",className:t.close,onClick:r},s.a.createElement(E.a,{className:t.icon}))]},i))})),P=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;ie.size||0==t)&&(t=e.size);for(var a=[],n=Math.ceil(e.size/t),r=0;r",Array.isArray(e[a])){var n,r=Object(c.a)(e[a]);try{for(r.s();!(n=r.n()).done;){var o=n.value;t+="",t+="<"+a+">",t+=E(new Object(o))}}catch(i){r.e(i)}finally{r.f()}}else"object"==typeof e[a]?t+=E(new Object(e[a])):t+=e[a];t+=""}return t.replace(/<\/?[0-9]{1,}>/g,"")}function v(e,t){var a=document.createElement("input");return a.type="file",a.id="upload-file-input-".concat(e),t?(a.id="upload-folder-input-".concat(e),a.setAttribute("webkitdirectory","true"),a.setAttribute("mozdirectory","true")):(a.id="upload-file-input-".concat(e),a.multiple=!0),a.hidden=!0,document.body.appendChild(a),a}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";return(e=e.map((function(a,n){return n&&(a=a.replace(new RegExp("^"+t),"")),n!==e.length-1&&(a=a.replace(new RegExp(t+"$"),"")),a}))).join(t)}function j(e,t){return e.startsWith(t)?e.slice(t.length):e}function k(e,t){var a=t.webkitRelativePath;return a&&""!=a||(a=t.fsPath)&&""!=a?function(e){var t=e.split("/");return t.pop(),""===t.join("/")?"/":t.join("/")}(O([e,a=j(a,"/")])):e}function w(e){return y.apply(this,arguments)}function y(){return(y=Object(i.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,new Promise((function(e,a){t.readEntries(e,a)}));case 3:return e.abrupt("return",e.sent);case 6:e.prev=6,e.t0=e.catch(0),console.log(e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function x(e,t){return C.apply(this,arguments)}function C(){return(C=Object(i.a)(o.a.mark((function e(t,a){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,new Promise((function(e,n){t.file((function(t){t.fsPath=a,e(t)}))}));case 3:return e.abrupt("return",e.sent);case 6:e.prev=6,e.t0=e.catch(0),console.log(e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function S(e){return N.apply(this,arguments)}function N(){return(N=Object(i.a)(o.a.mark((function e(t){var a,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=[],e.next=3,w(t);case 3:r=e.sent;case 4:if(!(r.length>0)){e.next=11;break}return a.push.apply(a,Object(n.a)(r)),e.next=8,w(t);case 8:r=e.sent,e.next=4;break;case 11:return e.abrupt("return",a);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return P.apply(this,arguments)}function P(){return(P=Object(i.a)(o.a.mark((function e(t){var a,r,i,c,l,s,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a=[],r=[],i=0;i0)){e.next=23;break}if(l=r.shift()){e.next=7;break}return e.abrupt("continue",3);case 7:if(!l.isFile){e.next=15;break}return e.t0=a,e.next=11,x(l,l.fullPath);case 11:e.t1=e.sent,e.t0.push.call(e.t0,e.t1),e.next=21;break;case 15:if(!l.isDirectory){e.next=21;break}return s=l.createReader(),e.next=19,S(s);case 19:u=e.sent,r.push.apply(r,Object(n.a)(u));case 21:e.next=3;break;case 23:return e.abrupt("return",a);case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e){return!!e.dataTransfer&&e.dataTransfer.types.includes("Files")}a(201);var R=a(202);a.d(t,"p",(function(){return s})),a.d(t,"d",(function(){return u})),a.d(t,"q",(function(){return p})),a.d(t,"h",(function(){return d})),a.d(t,"o",(function(){return m})),a.d(t,"l",(function(){return h})),a.d(t,"b",(function(){return f})),a.d(t,"g",(function(){return g})),a.d(t,"j",(function(){return b})),a.d(t,"a",(function(){return E})),a.d(t,"f",(function(){return v})),a.d(t,"k",(function(){return O})),a.d(t,"r",(function(){return j})),a.d(t,"e",(function(){return k})),a.d(t,"c",(function(){return T})),a.d(t,"i",(function(){return L})),a.d(t,"m",(function(){return R.b})),a.d(t,"n",(function(){return R.c}))},370:function(e,t,a){"use strict";(function(e){var n=a(13),r=a(14),o=a(17),i=a(18),c=a(6),l=a(0),s=a.n(l),u=a(29),p=a.n(u),d=a(7),m=a(116),h=a.n(m),f=a(224),g=a.n(f),b=a(405),E=a.n(b),v=a(126),O=a.n(v),j=a(117),k=a.n(j),w=a(223),y=a.n(w),x=a(156),C=a.n(x),S=a(100),N=a.n(S),T=a(259),P=a.n(T),L=a(46),R=a(25),I=a(450),F=a(16),D=a(386),_=a(389),M=a(366),A=a(394),U=a(30),z=a(19),W=a(270),B=a(75),H=a(64),G=a(63),V=a(7026),q=a(7027),Y=a(53),K=a(92),J=a(55),Z=a(91),$=a(463),X=a(7041),Q=a(87),ee=a(260),te=a(8),ae=a(20),ne=a(12),re=a(395),oe=a(7032),ie=a(7033),ce=a(7034),le=a(7028),se=a(180),ue=a(222),pe=a(2),de=a(40),me=a(241);Object(R.q)();var he=function(t){Object(o.a)(l,t);var a=Object(i.a)(l);function l(e){var t;return Object(n.a)(this,l),(t=a.call(this,e)).UNSAFE_componentWillReceiveProps=function(e){0===t.props.selected.length!==(0===e.selected.length)&&Object(R.d)(0!==t.props.selected.length?"dark"===t.props.theme.palette.type?t.props.theme.palette.background.default:t.props.theme.palette.primary.main:t.props.theme.palette.background.default)},t.handleDrawerToggle=function(){t.setState((function(e){return{mobileOpen:!e.mobileOpen}}))},t.openDownload=function(){t.props.startDownload(t.props.shareInfo,t.props.selected[0])},t.archiveDownload=function(e){t.props.startBatchDownload(t.props.shareInfo)},t.signOut=function(){ne.b.delete("/user/session/").then((function(){t.props.toggleSnackbar("top","right",t.props.t("login.loggedOut"),"success"),ae.a.signout(),window.location.reload(),t.props.setSessionStatus(!1)})).catch((function(e){t.props.toggleSnackbar("top","right",e.message,"warning")})).finally((function(){t.handleClose()}))},t.state={mobileOpen:!1},t.UploaderRef=s.a.createRef(),t}return Object(r.a)(l,[{key:"UNSAFE_componentWillMount",value:function(){var e=this;this.unlisten=this.props.history.listen((function(){e.setState((function(){return{mobileOpen:!1}}))}))}},{key:"componentWillUnmount",value:function(){this.unlisten()}},{key:"componentDidMount",value:function(){Object(R.d)(this.props.selected.length<=1&&(this.props.isMultiple||!this.props.withFile)?this.props.theme.palette.primary.main:this.props.theme.palette.background.default)}},{key:"render",value:function(){var t,a=this,n=this.props,r=n.classes,o=n.t,i=ae.a.GetUser(this.props.isLogin),l=F.a.isHomePage(this.props.location.pathname),u=F.a.isSharePage(this.props.location.pathname),d=s.a.createElement("div",{id:"container",className:r.upDrawer},F.a.isMobile()&&s.a.createElement(A.a,null),ae.a.Check(this.props.isLogin)&&s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:r.minStickDrawer},s.a.createElement(re.a,null),s.a.createElement(W.a,null,s.a.createElement(B.a,{button:!0,key:"\u6211\u7684\u5206\u4eab",onClick:function(){return a.props.history.push("/shares?")}},s.a.createElement(H.a,null,s.a.createElement(h.a,{className:r.iconFix})),s.a.createElement(G.a,{primary:o("navbar.myShare")})),s.a.createElement(B.a,{button:!0,key:"\u79bb\u7ebf\u4e0b\u8f7d",onClick:function(){return a.props.history.push("/aria2?")}},s.a.createElement(H.a,null,s.a.createElement(k.a,{className:r.iconFix})),s.a.createElement(G.a,{primary:o("navbar.remoteDownload")})),i.group.webdav&&s.a.createElement(B.a,{button:!0,key:"WebDAV",onClick:function(){return a.props.history.push("/webdav?")}},s.a.createElement(H.a,null,s.a.createElement(oe.a,{className:r.iconFix})),s.a.createElement(G.a,{primary:o("navbar.connect")})),s.a.createElement(B.a,{button:!0,key:"\u4efb\u52a1\u961f\u5217",onClick:function(){return a.props.history.push("/tasks?")}},s.a.createElement(H.a,null,s.a.createElement(ie.a,{className:r.iconFix})),s.a.createElement(G.a,{primary:o("navbar.taskQueue")})),F.a.isMobile()&&s.a.createElement(s.a.Fragment,null,s.a.createElement(se.a,null),s.a.createElement(B.a,{button:!0,key:"\u4e2a\u4eba\u8bbe\u7f6e",onClick:function(){return a.props.history.push("/setting?")}},s.a.createElement(H.a,null,s.a.createElement(ce.a,{className:r.iconFix})),s.a.createElement(G.a,{primary:o("navbar.setting")})),s.a.createElement(B.a,{button:!0,key:"\u9000\u51fa\u767b\u5f55",onClick:this.signOut},s.a.createElement(H.a,null,s.a.createElement(U.C,{className:r.iconFix})),s.a.createElement(G.a,{primary:o("login.logout")}))))),s.a.createElement("div",null,s.a.createElement(_.a,null))),!ae.a.Check(this.props.isLogin)&&s.a.createElement("div",null,s.a.createElement(B.a,{button:!0,key:"\u767b\u5f55",onClick:function(){return a.props.history.push("/login")}},s.a.createElement(H.a,null,s.a.createElement(U.a,{className:r.iconFix})),s.a.createElement(G.a,{primary:o("login.signIn")})),this.props.registerEnabled&&s.a.createElement(B.a,{button:!0,key:"\u6ce8\u518c",onClick:function(){return a.props.history.push("/signup")}},s.a.createElement(H.a,null,s.a.createElement(U.c,{className:r.iconFix})),s.a.createElement(G.a,{primary:o("login.signUp")})))),m=e.browser&&/iPad|iPhone|iPod/.test(navigator.userAgent);return s.a.createElement("div",null,s.a.createElement(V.a,{position:"fixed",className:r.appBar,color:"dark"!==this.props.theme.palette.type&&0===this.props.selected.length?"primary":"default"},s.a.createElement(q.a,null,0===this.props.selected.length&&s.a.createElement(Y.a,{color:"inherit","aria-label":"Open drawer",onClick:this.handleDrawerToggle,className:r.menuButton},s.a.createElement(P.a,null)),0===this.props.selected.length&&s.a.createElement(Y.a,{color:"inherit","aria-label":"Open drawer",onClick:function(){return a.props.handleDesktopToggle(!a.props.desktopOpen)},className:r.menuButtonDesktop},s.a.createElement(P.a,null)),this.props.selected.length>0&&(l||F.a.isSharePage(this.props.location.pathname))&&s.a.createElement(K.a,{in:this.props.selected.length>0},s.a.createElement(Y.a,{color:"inherit",className:r.menuIcon,onClick:function(){return a.props.setSelectedTarget([])}},s.a.createElement(E.a,null))),0===this.props.selected.length&&s.a.createElement(J.a,{variant:"h6",color:"inherit",noWrap:!0,onClick:function(){a.props.history.push("/")}},this.props.subTitle?this.props.subTitle:this.props.title),!this.props.isMultiple&&(this.props.withFile||this.props.withFolder)&&!F.a.isMobile()&&s.a.createElement(J.a,{variant:"h6",color:"inherit",noWrap:!0},this.props.selected[0].name," ",this.props.withFile&&(l||F.a.isSharePage(this.props.location.pathname))&&"("+Object(R.p)(this.props.selected[0].size)+")"),this.props.selected.length>1&&!F.a.isMobile()&&s.a.createElement(J.a,{variant:"h6",color:"inherit",noWrap:!0},o("navbar.objectsSelected",{num:this.props.selected.length})),0===this.props.selected.length&&s.a.createElement(D.a,null),s.a.createElement("div",{className:r.grow}),this.props.selected.length>0&&(l||u)&&s.a.createElement("div",{className:r.sectionForFile},!this.props.isMultiple&&this.props.withFile&&Object(L.i)(this.props.selected[0].name)&&s.a.createElement(K.a,{in:!this.props.isMultiple&&this.props.withFile&&Object(L.i)(this.props.selected[0].name)},s.a.createElement(Z.a,{title:o("fileManager.open")},s.a.createElement(Y.a,{color:"inherit",onClick:function(){return a.props.openPreview(a.props.shareInfo)}},s.a.createElement(O.a,null)))),!this.props.isMultiple&&this.props.withFile&&s.a.createElement(K.a,{in:!this.props.isMultiple&&this.props.withFile},s.a.createElement(Z.a,{title:o("fileManager.download")},s.a.createElement(Y.a,{color:"inherit",onClick:function(){return a.openDownload()}},s.a.createElement(k.a,null)))),(this.props.isMultiple||this.props.withFolder)&&s.a.createElement(K.a,{in:this.props.isMultiple||this.props.withFolder},s.a.createElement(Z.a,{title:o("fileManager.batchDownload")},s.a.createElement(Y.a,{color:"inherit",disableClickAway:!0,onClick:function(){return a.archiveDownload()}},s.a.createElement(k.a,null)))),!this.props.isMultiple&&!F.a.isMobile()&&!u&&s.a.createElement(K.a,{in:!this.props.isMultiple},s.a.createElement(Z.a,{title:o("fileManager.share")},s.a.createElement(Y.a,{color:"inherit",onClick:function(){return a.props.openShareDialog()}},s.a.createElement(h.a,null)))),!this.props.isMultiple&&!u&&s.a.createElement(K.a,{in:!this.props.isMultiple},s.a.createElement(Z.a,{title:o("fileManager.rename")},s.a.createElement(Y.a,{color:"inherit",onClick:function(){return a.props.openRenameDialog()}},s.a.createElement(y.a,null)))),!u&&s.a.createElement("div",{style:{display:"flex"}},!F.a.isMobile()&&s.a.createElement(K.a,{in:0!==this.props.selected.length&&!F.a.isMobile()},s.a.createElement(Z.a,{title:o("fileManager.move")},s.a.createElement(Y.a,{color:"inherit",onClick:function(){return a.props.openMoveDialog()}},s.a.createElement(C.a,null)))),s.a.createElement(K.a,{in:0!==this.props.selected.length},s.a.createElement(Z.a,{title:o("fileManager.delete")},s.a.createElement(Y.a,{color:"inherit",onClick:function(){return a.props.openRemoveDialog()}},s.a.createElement(N.a,null)))),F.a.isMobile()&&s.a.createElement(K.a,{in:0!==this.props.selected.length&&F.a.isMobile()},s.a.createElement(Z.a,{title:o("fileManager.moreActions")},s.a.createElement(Y.a,{color:"inherit",onClick:function(){return a.props.changeContextMenu("file",!0)}},s.a.createElement(le.a,null)))))),this.props.selected.length<=1&&!(!this.props.isMultiple&&this.props.withFile)&&null!=this.props.audioPreviewPlayingName&&s.a.createElement(Y.a,{title:o("navbar.music"),className:r.sideButton,onClick:this.props.audioPreviewOpen,color:"inherit"},s.a.createElement(g.a,{fontSize:"default"})),0===this.props.selected.length&&s.a.createElement(M.a,null),0===this.props.selected.length&&F.a.isMobile()&&(l||this.props.shareInfo)&&s.a.createElement(ue.a,{inherit:!0}))),s.a.createElement(I.a,null),s.a.createElement($.a,{smUp:!0,implementation:"css"},s.a.createElement(X.a,{container:this.props.container,variant:"temporary",classes:{paper:r.drawerPaper},anchor:"left",open:this.state.mobileOpen,onClose:this.handleDrawerToggle,onOpen:function(){return a.setState((function(){return{mobileOpen:!0}}))},disableDiscovery:m,ModalProps:{keepMounted:!0}},d)),s.a.createElement($.a,{xsDown:!0,implementation:"css"},s.a.createElement(Q.a,{classes:{paper:r.drawerPaperDesktop},className:p()(r.drawer,(t={},Object(c.a)(t,r.drawerOpen,this.props.desktopOpen),Object(c.a)(t,r.drawerClose,!this.props.desktopOpen),t)),variant:"persistent",anchor:"left",open:this.props.desktopOpen},s.a.createElement("div",{className:r.toolbar}),d)))}}]),l}(l.Component),fe=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,title:e.siteConfig.title,subTitle:e.viewUpdate.subTitle,loadUploader:e.viewUpdate.loadUploader,isLogin:e.viewUpdate.isLogin,shareInfo:e.viewUpdate.shareInfo,registerEnabled:e.siteConfig.registerEnabled,audioPreviewPlayingName:e.explorer.audioPreview.playingName,audioPreviewIsOpen:e.explorer.audioPreview.isOpen}}),(function(e){return{handleDesktopToggle:function(t){e(Object(pe.i)(t))},setSelectedTarget:function(t){e(Object(pe.J)(t))},navigateTo:function(t){e(Object(pe.j)(t))},openCreateFolderDialog:function(){e(Object(pe.o)())},changeContextMenu:function(t,a){e(Object(pe.d)(t,a))},saveFile:function(){e(Object(pe.D)())},openMusicDialog:function(){e(Object(pe.t)())},showImgPreivew:function(t){e(Object(pe.P)(t))},toggleSnackbar:function(t,a,n,r){e(Object(pe.R)(t,a,n,r))},openRenameDialog:function(){e(Object(pe.x)())},openMoveDialog:function(){e(Object(pe.s)())},openRemoveDialog:function(){e(Object(pe.w)())},openShareDialog:function(){e(Object(pe.z)())},openLoadingDialog:function(t){e(Object(pe.r)(t))},setSessionStatus:function(){e(Object(pe.K)())},openPreview:function(t){e(Object(pe.u)(t))},audioPreviewOpen:function(){e(Object(pe.b)(!0))},startBatchDownload:function(t){e(Object(de.startBatchDownload)(t))},startDownload:function(t,a){e(Object(de.startDownload)(t,a))}}}))(Object(ee.a)(Object(te.a)((function(e){var t;return{appBar:(t={marginLeft:240},Object(c.a)(t,e.breakpoints.down("xs"),{marginLeft:270}),Object(c.a)(t,"zIndex",e.zIndex.drawer+1),Object(c.a)(t,"transition"," background-color 250ms"),t),drawer:{width:0,flexShrink:0},drawerDesktop:{width:240,flexShrink:0},icon:{marginRight:e.spacing(2)},menuButton:Object(c.a)({marginRight:20},e.breakpoints.up("sm"),{display:"none"}),menuButtonDesktop:Object(c.a)({marginRight:20},e.breakpoints.down("xs"),{display:"none"}),menuIcon:{marginRight:20},toolbar:e.mixins.toolbar,drawerPaper:{width:270},drawerPaperDesktop:{width:240},upDrawer:Object(c.a)({overflowX:"hidden"},e.breakpoints.up("sm"),{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between"}),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:{overflowY:"auto"}}}))(Object(z.k)(Object(me.a)()(he)))));t.a=fe}).call(this,a(276))},386:function(e,t,a){"use strict";var n=a(13),r=a(14),o=a(17),i=a(18),c=a(6),l=a(0),s=a.n(l),u=a(387),p=a.n(u),d=a(102),m=a(214),h=a.n(m),f=a(116),g=a.n(f),b=a(7),E=a(274),v=a(457),O=a(267),j=a(107),k=a(118),w=a(64),y=a(63),x=a(55),C=a(8),S=a(19),N=a(16),T=a(159),P=a(2),L=a(78),R=a.n(L),I=a(273),F=a(241);Object(T.configure)({ignoreTags:[]});var D={SEARCH:"enter"},_=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){N.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(e){return function(){r.props.searchMyFile("keywords/"+r.input,e)}},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,a=t.classes,n=t.t,r=this.state.anchorEl,o=""!==this.state.input?"simple-popper":null,i=N.a.isHomePage(this.props.location.pathname);return s.a.createElement("div",{className:a.search},s.a.createElement("div",{className:a.searchIcon},s.a.createElement(p.a,null)),s.a.createElement(T.HotKeys,{keyMap:D,handlers:this.handlers},s.a.createElement(E.a,{placeholder:n("navbar.searchPlaceholder"),classes:{root:a.inputRoot,input:a.inputInput},onChange:this.handleChange,onBlur:this.cancelSuggest,value:this.state.input})),s.a.createElement(v.a,{id:o,open:""!==this.state.input,anchorEl:r,className:a.suggestBox,transition:!0},(function(t){var n=t.TransitionProps;return s.a.createElement(O.a,Object.assign({},n,{timeout:350}),s.a.createElement(j.a,{square:!0},i&&s.a.createElement(k.a,{onClick:e.searchMyFile("")},s.a.createElement(w.a,{className:a.icon},s.a.createElement(h.a,null)),s.a.createElement(y.a,{classes:{primary:a.primary},primary:s.a.createElement(x.a,{noWrap:!0},s.a.createElement(I.a,{i18nKey:"navbar.searchInFiles",values:{name:e.state.input},components:[s.a.createElement("strong",{key:0})]}))})),i&&"/"!==e.props.path&&!e.props.search&&s.a.createElement(k.a,{onClick:e.searchMyFile(e.props.path)},s.a.createElement(w.a,{className:a.icon},s.a.createElement(R.a,null)),s.a.createElement(y.a,{classes:{primary:a.primary},primary:s.a.createElement(x.a,{noWrap:!0},s.a.createElement(I.a,{i18nKey:"navbar.searchInFolders",values:{name:e.state.input},components:[s.a.createElement("strong",{key:0})]}))})),s.a.createElement(k.a,{onClick:e.searchShare},s.a.createElement(w.a,{className:a.icon},s.a.createElement(g.a,null)),s.a.createElement(y.a,{classes:{primary:a.primary},primary:s.a.createElement(x.a,{noWrap:!0},s.a.createElement(I.a,{i18nKey:"navbar.searchInShares",values:{name:e.state.input},components:[s.a.createElement("strong",{key:0})]}))}))))})))}}]),a}(l.Component),M=Object(b.c)((function(e){return{path:e.navigator.path,search:e.explorer.search}}),(function(e){return{searchMyFile:function(t,a){e(Object(P.E)(t,a))}}}))(Object(C.a)((function(e){var t;return{search:(t={},Object(c.a)(t,e.breakpoints.down("sm"),{display:"none"}),Object(c.a)(t,"position","relative"),Object(c.a)(t,"borderRadius",e.shape.borderRadius),Object(c.a)(t,"backgroundColor",Object(d.fade)(e.palette.common.white,.15)),Object(c.a)(t,"&:hover",{backgroundColor:Object(d.fade)(e.palette.common.white,.25)}),Object(c.a)(t,"marginRight",e.spacing(2)),Object(c.a)(t,"marginLeft",0),Object(c.a)(t,"width","100%"),Object(c.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(c.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(S.k)(Object(F.a)()(_))));t.a=M},389:function(e,t,a){"use strict";var n=a(13),r=a(14),o=a(17),i=a(18),c=a(6),l=a(0),s=a.n(l),u=a(390),p=a.n(u),d=a(7),m=a(12),h=a(25),f=a(180),g=a(55),b=a(7029),E=a(91),v=a(8),O=a(134),j=a(19),k=a(2),w=a(241),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",e.props.t("navbar.exceedQuota"),"warning")):t=a.data.used/a.data.total*100,e.setState({percent:t,used:Object(h.p)(a.data.used),total:Object(h.p)(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,a=t.classes,n=t.t;return s.a.createElement("div",{onMouseEnter:function(){return e.setState({showExpand:!0})},onMouseLeave:function(){return e.setState({showExpand:!1})},className:a.stickFooter},s.a.createElement(f.a,null),s.a.createElement(O.a,null,s.a.createElement("div",{className:a.storageContainer},s.a.createElement(p.a,{className:a.iconFix}),s.a.createElement("div",{className:a.detail},s.a.createElement(g.a,{variant:"subtitle2"},n("navbar.storage")),s.a.createElement(b.a,{className:a.bar,color:"secondary",variant:"determinate",value:this.state.percent}),s.a.createElement("div",{className:a.info},s.a.createElement(E.a,{title:n("navbar.storageDetail",{used:null===this.state.used?" -- ":this.state.used,total:null===this.state.total?" -- ":this.state.total}),placement:"top"},s.a.createElement(g.a,{variant:"caption",noWrap:!0,color:"textSecondary"},null===this.state.used?" -- ":this.state.used," / ",null===this.state.total?" -- ":this.state.total)))))))}}]),a}(l.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(k.R)(t,a,n,r))}}}))(Object(v.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(c.a)(t,e.breakpoints.down("xs"),{width:"162px"}),Object(c.a)(t,"marginTop","5px"),t),bar:{marginTop:"5px"},stickFooter:{backgroundColor:e.palette.background.paper}}}))(Object(j.k)(Object(w.a)()(y))));t.a=x},394:function(e,t,a){"use strict";var n=a(13),r=a(14),o=a(17),i=a(18),c=a(0),l=a.n(c),s=a(7),u=a(55),p=a(8),d=a(20),m=a(221),h=a(242),f=a(2),g=a(241),b=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>>8^a[255&(t^e[n])];this.crc=t}},{key:"get",value:function(){return~this.crc}}]),e}();m.prototype.table=function(){var e,t,a,n=[];for(e=0;e<256;e++){for(a=e,t=0;t<8;t++)a=1&a?a>>>1^3988292384:a>>>1;n[e]=a}return n}();var h=function(e){var t=new Uint8Array(e);return{array:t,view:new DataView(t.buffer)}};window.ZIP=function(e){var t,a,n,r=Object.create(null),o=[],i=new TextEncoder,c=0,l=0;function s(){l++,(a=r[o[l]])?d():n&&p()}var u={enqueue:function(e){if(n)throw new TypeError("Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed");var l=e.name.trim(),u=new Date("undefined"===typeof e.lastModified?Date.now():e.lastModified);if(e.directory&&!l.endsWith("/")&&(l+="/"),r[l])throw new Error("File already exists.");var p=i.encode(l);o.push(l);var m=r[l]={level:0,ctrl:t,directory:!!e.directory,nameBuf:p,comment:i.encode(e.comment||""),compressedLength:0,uncompressedLength:0,writeHeader:function(){var e=h(26),a=h(30+p.length);m.offset=c,m.header=e,0===m.level||m.directory||e.view.setUint16(4,2048),e.view.setUint32(0,335546376),e.view.setUint16(6,(u.getHours()<<6|u.getMinutes())<<5|u.getSeconds()/2,!0),e.view.setUint16(8,(u.getFullYear()-1980<<4|u.getMonth()+1)<<5|u.getDate(),!0),e.view.setUint16(22,p.length,!0),a.view.setUint32(0,1347093252),a.array.set(e.array,4),a.array.set(p,30),c+=a.array.length,t.enqueue(a.array)},writeFooter:function(){var e=h(16);e.view.setUint32(0,1347094280),m.crc&&(m.header.view.setUint32(10,m.crc.get(),!0),m.header.view.setUint32(14,m.compressedLength,!0),m.header.view.setUint32(18,m.uncompressedLength,!0),e.view.setUint32(4,m.crc.get(),!0),e.view.setUint32(8,m.compressedLength,!0),e.view.setUint32(12,m.uncompressedLength,!0)),t.enqueue(e.array),c+=m.compressedLength+16,s()},fileLike:e};a||(a=m,d())},close:function(){if(n)throw new TypeError("Cannot close a readable stream that has already been requested to be closed");a||p(),n=!0}};function p(){var e,a,n=0,i=0;for(e=0;e=o.length+r.length?e(M([])):e(M([].concat(Object(c.a)(o),Object(c.a)(r))))}},B=function(e){return function(t,a){var n=a().viewUpdate,r=n.sortMethod,o=n.pagination,c=e.filter((function(e){return"dir"===e.type})),s=e.filter((function(e){return"file"===e.type})),u=z[r];t(L(c.sort(u))),t(P(s.sort(u)));var p=c.length+s.length;o.page*o.size>p&&t(Object(l.g)(Object(i.a)(Object(i.a)({},o),{},{page:Math.max(Math.ceil(p/o.size),1)})))}},H=function(e){return function(t,a){var n=a().explorer,r=n.fileList,o=n.dirList,i=z[e];x.a.SetPreference("sort",e),t(R(e)),t(L(o.slice().sort(i))),t(P(r.slice().sort(i)))}},G=function(e){return function(t,a){a();e&&t(Object(l.c)()),t(I(!0))}},V=function(e){return function(t,a){t(Object(N.r)("\u6b63\u5728\u51c6\u5907\u6253\u5305\u4e0b\u8f7d..."));var n=a(),r=n.explorer.selected,o=n.router.location.pathname,i=[],c=[];r.map((function(e){return"dir"===e.type?i.push(e.id):c.push(e.id),null}));var l="/file/archive",s={items:c,dirs:i};f.a.isSharePage(o)&&(l="/share/archive/"+e.key,s.path=r[0].path),b.b.post(l,s).then((function(e){0===e.rawData.code?(t(Object(N.f)()),window.location.assign(e.data)):t(Object(N.R)("top","right",e.rawData.msg,"warning")),t(Object(N.f)())})).catch((function(e){t(Object(N.R)("top","right",e.message,"error")),t(Object(N.f)())}))}},q=function(e,t){return function(){var a=Object(o.a)(r.a.mark((function a(n,o){var i,c,l,s;return r.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(i=o(),c=i.router.location.pathname,l=x.a.GetUser(),!f.a.isSharePage(c)||x.a.Check()||!l||l.group.shareDownload){a.next=5;break}return n(Object(N.R)("top","right","\u8bf7\u5148\u767b\u5f55","warning")),a.abrupt("return");case 5:return n(Object(N.d)("file",!1)),n(Object(N.r)("\u83b7\u53d6\u4e0b\u8f7d\u5730\u5740...")),a.prev=7,a.next=10,Object(T.a)(t||e);case 10:s=a.sent,window.location.assign(s.data),n(Object(N.f)()),a.next=19;break;case 15:a.prev=15,a.t0=a.catch(7),n(Object(N.R)("top","right",a.t0.message,"warning")),n(Object(N.f)());case 19:case"end":return a.stop()}}),a,null,[[7,15]])})));return function(e,t){return a.apply(this,arguments)}}()},Y=function(e){return function(){var t=Object(o.a)(r.a.mark((function t(a,n){var i,c,l,s,p,d;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a(Object(N.d)("file",!1)),i=n(),c=i.explorer.selected,!x.a.GetUser().group.allowArchiveDownload){t.next=16;break}return t.prev=4,t.next=7,a(y([{key:"client",name:"\u6d4f\u89c8\u5668\u7aef\u6253\u5305",description:"\u7531\u6d4f\u89c8\u5668\u5b9e\u65f6\u4e0b\u8f7d\u5e76\u6253\u5305\uff0c\u5e76\u975e\u6240\u6709\u73af\u5883\u90fd\u652f\u6301\u3002"},{key:"server",name:"\u670d\u52a1\u7aef\u4e2d\u8f6c\u6253\u5305",description:"\u7531\u670d\u52a1\u7aef\u4e2d\u8f6c\u6253\u5305\u5e76\u5b9e\u65f6\u53d1\u9001\u5230\u5ba2\u6237\u7aef\u4e0b\u8f7d\u3002"}],"\u9009\u62e9\u6253\u5305\u4e0b\u8f7d\u65b9\u5f0f"));case 7:l=t.sent,t.next=13;break;case 10:return t.prev=10,t.t0=t.catch(4),t.abrupt("return");case 13:if("server"!==l.key){t.next=16;break}return a(V(e)),t.abrupt("return");case 16:return a(Object(N.r)("\u5217\u53d6\u6587\u4ef6\u4e2d...")),s=[],t.prev=18,t.next=21,k(c,e);case 21:s=t.sent,t.next=29;break;case 24:return t.prev=24,t.t1=t.catch(18),a(Object(N.R)("top","right","\u5217\u53d6\u6587\u4ef6\u65f6\u51fa\u9519\uff1a".concat(t.t1.message),"warning")),a(Object(N.f)()),t.abrupt("return");case 29:if(a(Object(N.f)()),a(Object(N.R)("top","center","\u6253\u5305\u4e0b\u8f7d\u5df2\u5f00\u59cb\uff0c\u8bf7\u4e0d\u8981\u5173\u95ed\u6b64\u6807\u7b7e\u9875","info")),p=u.a.createWriteStream("archive.zip"),0,d=new window.ZIP({start:function(e){},pull:function(t){return Object(o.a)(r.a.mark((function a(){var n,o,i,c;return r.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(!(s.length>0)){a.next=17;break}if(!(n=s.pop())||"file"!==n.type){a.next=15;break}return o=j(n),i=Object(b.c)()+(f.a.isSharePage(location.pathname)?"/share/preview/"+e.key+(""!==o?"?path="+o:""):"/file/preview/"+n.id),a.prev=5,a.delegateYield(r.a.mark((function e(){var a,o,c;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(i,{cache:"no-cache"});case 2:return a=e.sent,o=function(){return a.body},c=Object(E.r)(Object(E.k)([n.path,n.name]),"/"),t.enqueue({name:c,stream:o}),e.abrupt("return",{v:void 0});case 7:case"end":return e.stop()}}),e)}))(),"t0",7);case 7:if("object"!==typeof(c=a.t0)){a.next=10;break}return a.abrupt("return",c.v);case 10:a.next=15;break;case 12:a.prev=12,a.t1=a.catch(5);case 15:a.next=0;break;case 17:t.close();case 18:case"end":return a.stop()}}),a,null,[[5,12]])})))()}}),!window.WritableStream||!d.pipeTo){t.next=36;break}return t.abrupt("return",d.pipeTo(p).then((function(){return a(Object(N.f)())})).catch((function(e){console.log(e),Object(N.R)("top","right","\u6253\u5305\u9047\u5230\u9519\u8bef\uff1a".concat(e&&e.message),"warning"),a(Object(N.f)())})));case 36:case"end":return t.stop()}}),t,null,[[4,10],[18,24]])})));return function(e,a){return t.apply(this,arguments)}}()},K=function(e,t,a){var n=j(t);return a?"/s/"+t.key+"/".concat(e,"?name=")+encodeURIComponent(t.name)+"&share_path="+n:"/".concat(e,"?p=")+n+"&id="+t.id},J=function(e,t,a){return function(n,r){n(Object(S.d)(K(e,t,a)))}},Z=function(e){return function(t,a){var n=a(),r=n.explorer.selected,o=n.router.location.pathname,i=f.a.isSharePage(o);if(i){var c=x.a.GetUser();if(!x.a.Check()&&c&&!c.group.shareDownload)return t(Object(N.R)("top","right","\u8bf7\u5148\u767b\u5f55","warning")),void t(Object(N.d)("file",!1))}switch(t(Object(N.d)("file",!1)),Object(C.i)(r[0].name)){case"img":return void t(Object(N.P)(r[0]));case"msDoc":return void t(J("doc",r[0],i));case"audio":return void t(Object(N.O)(r[0]));case"video":return void t(J("video",r[0],i));case"pdf":return void t(J("pdf",r[0],i));case"edit":return void t(J("text",r[0],i));case"code":return void t(J("code",r[0],i));case"epub":return void t(J("epub",r[0],i));default:return void t(q(e,r[0]))}}},$=function(e,t,a){var n=t.ctrlKey,r=t.metaKey,o=t.shiftKey;return function(t,i){if(!([n,o].filter(Boolean).length>1||[r,o].filter(Boolean).length>1)){var l=Object(g.k)(),s=i().explorer,u=s.selected,p=s.lastSelect,d=s.dirList,m=s.fileList;s.shiftSelectedIds;if(o&&!n&&!r&&0!==u.length){t(D(u.map((function(e){return e.id}))));var h=[].concat(Object(c.a)(d),Object(c.a)(m)),f=Math.min(p.index,a),b=Math.max(p.index,a),E=(e.type,h.slice(f,b+1));return t(_(E))}return t(A(e,a)),t(U([])),n&&!l||r&&l?t(-1!==u.findIndex((function(t){return t.id===e.id}))?D([e.id]):_([e])):t(M([e]))}}},X=function(e,t){return function(){var a=Object(o.a)(r.a.mark((function a(n,o){var i,c,l,s;return r.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=o(),c=i.explorer.selected,l=[],s=[],c.map((function(e){"dir"===e.type?l.push(e.id):s.push(e.id)})),a.next=5,b.b.post("/file/compress",{src:{dirs:l,items:s},name:e,dst:"//"===t?"/":t});case 5:return a.abrupt("return",a.sent);case 6:case"end":return a.stop()}}),a)})));return function(e,t){return a.apply(this,arguments)}}()},Q=["ibm866","iso8859_2","iso8859_3","iso8859_4","iso8859_5","iso8859_6","iso8859_7","iso8859_8","iso8859_8I","iso8859_10","iso8859_13","iso8859_14","iso8859_15","iso8859_16","koi8r","koi8u","macintosh","windows874","windows1250","windows1251","windows1252","windows1253","windows1254","windows1255","windows1256","windows1257","windows1258","macintoshcyrillic","gbk","big5","eucjp","iso2022jp","shiftjis","euckr","utf16be","utf16le"],ee=function(e){return function(){var t=Object(o.a)(r.a.mark((function t(a,n){var o,i,l,s,u;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=n(),i=o.explorer.selected,l="",!(i.length>0&&Object(C.c)(i[0].name))){t.next=14;break}return t.prev=3,u=Q.map((function(e){return{key:e,name:e.toUpperCase()}})),t.next=7,a(y([{key:"",name:"\u7f3a\u7701"},{key:"gb18030",name:"GB18030",description:"\u4e2d\u6587\u5e38\u89c1\u7f16\u7801"}].concat(Object(c.a)(u)),"\u9009\u62e9 ZIP \u6587\u4ef6\u7279\u6b8a\u5b57\u7b26\u7f16\u7801"));case 7:s=t.sent,t.next=13;break;case 10:throw t.prev=10,t.t0=t.catch(3),new Error("\u672a\u9009\u62e9\u7f16\u7801\u65b9\u5f0f");case 13:l=s.key;case 14:return t.next=16,b.b.post("/file/decompress",{src:Object(g.f)(i[0]),dst:"//"===e?"/":e,encoding:l});case 16:return t.abrupt("return",t.sent);case 17:case"end":return t.stop()}}),t,null,[[3,10]])})));return function(e,a){return t.apply(this,arguments)}}()},te=function(){return function(){var e=Object(o.a)(r.a.mark((function e(t,a){var n,o,i,c,l;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),o=n.explorer.selected,n.router.location.pathname,o.findIndex((function(e){return"dir"===e.type}))>=0&&t(Object(N.r)("\u5217\u53d6\u6587\u4ef6\u4e2d...")),i=[],e.prev=3,e.next=6,k(o,null);case 6:i=e.sent,e.next=14;break;case 9:return e.prev=9,e.t0=e.catch(3),t(Object(N.R)("top","right","\u5217\u53d6\u6587\u4ef6\u65f6\u51fa\u9519\uff1a".concat(e.t0.message),"warning")),t(Object(N.f)()),e.abrupt("return");case 14:if(t(Object(N.r)("\u751f\u6210\u5916\u94fe\u4e2d...")),0!==(c=i.filter((function(e){return e.source_enabled&&"file"===e.type})).map((function(e){return e.id}))).length){e.next=20;break}return t(Object(N.R)("top","right","\u6ca1\u6709\u53ef\u4ee5\u751f\u6210\u5916\u94fe\u7684\u6587\u4ef6","warning")),t(Object(N.f)()),e.abrupt("return");case 20:if(l=x.a.GetUser(),!(c.length>l.group.sourceBatch)){e.next=25;break}return t(Object(N.R)("top","right","\u5f53\u524d\u7528\u6237\u7ec4\u6700\u5927\u53ef\u540c\u65f6\u4e3a ".concat(l.group.sourceBatch," \u4e2a\u6587\u4ef6\u751f\u6210\u5916\u94fe"),"warning")),t(Object(N.f)()),e.abrupt("return");case 25:b.b.post("/file/source",{items:c}).then((function(e){console.log(e),t(Object(N.f)()),t(Object(N.q)(1==e.data.length?e.data[0].url:e.data.map((function(e){return"".concat(e.name,": ").concat(e.url).concat(e.error?e.error:"")})).join("\n")))})).catch((function(e){t(Object(N.R)("top","right",e.message,"warning")),t(Object(N.f)())}));case 26:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,a){return e.apply(this,arguments)}}()}},420:function(e,t,a){"use strict";a.r(t);var n=a(13),r=a(14),o=a(17),i=a(18),c=a(0),l=a.n(c),s=a(7),u=a(12),p=a(46),d=a(8),m=a(16),h=a(19),f=a(421),g=(a(6999),a(125)),b=a(2),E=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;i0&&void 0!==arguments[0]?arguments[0]:"OFF",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"UPLOAD",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;Object(m.a)(this,e),this.level=t,this.prefix=a,this.id=n}return Object(h.a)(e,[{key:"getPrintPrefix",value:function(e){return"Cloudreve-Uploader [".concat(e,"][").concat(this.prefix,"#").concat(this.id,"]:")}},{key:"info",value:function(){var e=["INFO"];if(e.includes(this.level)){for(var t,a=arguments.length,n=new Array(a),r=0;r"})),o+=""),e.next=4,Object(y.m)(t,{method:"post",cancelToken:r,responseType:"document",transformResponse:void 0,data:o,headers:a?{"content-type":"application/octet-stream","x-oss-forbid-overwrite":"true","x-oss-complete-all":"yes"}:{"content-type":"application/xhtml+xml"},validateStatus:function(e){return 200==e}}).catch((function(e){if(e instanceof b.f&&e.response)throw new b.p(e.response.data);throw e}));case 4:return i=e.sent,e.abrupt("return",i.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e,t,a,n,r){return W.apply(this,arguments)}function W(){return(W=Object(p.a)(u.a.mark((function e(t,a,n,r,o){var i;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.m)("".concat(t,"/").concat(n.index+1),{method:"put",headers:{"content-type":"application/octet-stream",authorization:"UpToken "+a},data:n.chunk,onUploadProgress:function(e){r({loaded:e.loaded,total:e.total})},cancelToken:o}).catch((function(e){if(e instanceof b.f&&e.response)throw new b.l(e.response.data);throw e}));case 2:return i=e.sent,e.abrupt("return",i.data);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function B(e,t,a,n){return H.apply(this,arguments)}function H(){return(H=Object(p.a)(u.a.mark((function e(t,a,n,r){var o,i;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={parts:n.map((function(e){return{etag:e.etag,partNumber:e.index+1}}))},e.next=3,Object(y.m)("".concat(t),{method:"post",headers:{"content-type":"application/json",authorization:"UpToken "+a},data:o,cancelToken:r}).catch((function(e){if(e instanceof b.f&&e.response)throw new b.m(e.response.data);throw e}));case 3:return i=e.sent,e.abrupt("return",i.data);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e,t,a,n,r,o,i,c,l,s,u){return V.apply(this,arguments)}function V(){return(V=Object(p.a)(u.a.mark((function e(t,a,n,r,o,i,c,l,s,p,d){var m,h;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(m=new FormData).append("policy",n),m.append("key",r),m.append("x-cos-meta-callback",o),m.append("x-cos-meta-key",i),m.append("q-sign-algorithm","sha1"),m.append("q-key-time",c),m.append("q-ak",s),m.append("q-signature",l),m.append("name",a.name),m.append("file",a),e.next=13,Object(y.m)("".concat(t),{method:"post",headers:{"content-type":"multipart/form-data"},data:m,onUploadProgress:function(e){p({loaded:e.loaded,total:e.total})},cancelToken:d,responseType:"document",transformResponse:void 0}).catch((function(e){if(e instanceof b.f&&e.response)throw new b.b(e.response.data);throw e}));case 13:return h=e.sent,e.abrupt("return",h.data);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(e,t){return Y.apply(this,arguments)}function Y(){return(Y=Object(p.a)(u.a.mark((function e(t,a){var n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.n)("callback/cos/".concat(t),{method:"get",data:"{}",cancelToken:a});case 2:if(0==(n=e.sent).data.code){e.next=5;break}throw new b.a(n.data);case 5:return e.abrupt("return",n.data.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(e,t,a,n,r,o){return J.apply(this,arguments)}function J(){return(J=Object(p.a)(u.a.mark((function e(t,a,n,r,o,i){var c,l;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(c=new FormData).append("policy",n),c.append("authorization",r),c.append("file",a),e.next=6,Object(y.m)("".concat(t),{method:"post",headers:{"content-type":"multipart/form-data"},data:c,onUploadProgress:function(e){o({loaded:e.loaded,total:e.total})},cancelToken:i}).catch((function(e){if(e instanceof b.f&&e.response)throw new b.w(e.response.data);throw e}));case 6:return l=e.sent,e.abrupt("return",l.data);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(e,t){return $.apply(this,arguments)}function $(){return($=Object(p.a)(u.a.mark((function e(t,a){var n;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.n)("callback/s3/".concat(t),{method:"get",data:"{}",cancelToken:a});case 2:if(0==(n=e.sent).data.code){e.next=5;break}throw new b.q(n.data);case 5:return e.abrupt("return",n.data.data);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e){e[e.added=0]="added",e[e.resumable=1]="resumable",e[e.initialized=2]="initialized",e[e.queued=3]="queued",e[e.preparing=4]="preparing",e[e.processing=5]="processing",e[e.finishing=6]="finishing",e[e.finished=7]="finished",e[e.error=8]="error",e[e.canceled=9]="canceled"}(f||(f={}));var X=[n.local,n.remote,n.qiniu,n.oss,n.onedrive,n.s3],Q=function(){function e(t,a){var n=this;Object(m.a)(this,e),this.task=t,this.manager=a,this.child=void 0,this.status=f.added,this.error=void 0,this.id=++e.id,this.logger=void 0,this.subscriber=void 0,this.cancelToken=j.a.source(),this.progress=void 0,this.lastTime=Date.now(),this.startTime=Date.now(),this.subscribe=function(e){n.subscriber=e},this.start=Object(p.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.logger.info("Activate uploading task"),n.transit(f.initialized),n.lastTime=n.startTime=Date.now(),e.prev=3,Object(O.a)(n.task.file,n.task.policy),e.next=12;break;case 7:return e.prev=7,e.t0=e.catch(3),n.logger.error("File validate failed with error:",e.t0),n.setError(e.t0),e.abrupt("return");case 12:n.logger.info("Enqueued in manager pool"),n.transit(f.queued),n.manager.pool.enqueue(n).catch((function(e){n.logger.info("Upload task failed with error:",e),n.setError(e)}));case 15:case"end":return e.stop()}}),e,null,[[3,7]])}))),this.run=Object(p.a)(u.a.mark((function e(){var t;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.logger.info("Start upload task, create upload session..."),n.transit(f.preparing),null!=(t=y.g(n.task,n.logger))){e.next=10;break}return e.next=6,x({path:n.task.dst,size:n.task.file.size,name:n.task.file.name,policy_id:n.task.policy.id,last_modified:n.task.file.lastModified},n.cancelToken.token);case 6:n.task.session=e.sent,n.logger.info("Upload session created:",n.task.session),e.next=14;break;case 10:n.task.session=t.session,n.task.resumed=!0,n.task.chunkProgress=t.chunkProgress,n.logger.info("Resume upload from cached ctx:",t);case 14:return n.transit(f.processing),e.next=17,n.upload();case 17:return e.next=19,n.afterUpload();case 19:y.l(n.task,n.logger),n.transit(f.finished),n.logger.info("Upload task completed");case 22:case"end":return e.stop()}}),e)}))),this.cancel=Object(p.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.status!==f.finished){e.next=2;break}return e.abrupt("return");case 2:return n.cancelToken.cancel(),e.next=5,n.cancelUploadSession();case 5:n.transit(f.canceled);case 6:case"end":return e.stop()}}),e)}))),this.reset=function(){n.cancelToken=w.a.CancelToken.source(),n.progress={total:{size:0,loaded:0,percent:0}}},this.cancelUploadSession=function(){return new Promise((function(e){y.l(n.task,n.logger),n.task.session?setTimeout((function(){var t;(function(e){return S.apply(this,arguments)})(null===(t=n.task.session)||void 0===t?void 0:t.sessionID).catch((function(e){n.logger.warn("Failed to cancel upload session: ",e)})).finally((function(){e()}))}),500):e()}))},this.logger=new g(this.manager.logger.level,"UPLOADER",this.id),this.logger.info("Initialize new uploader for task: ",t),this.subscriber={onTransition:function(e){},onError:function(e){},onProgress:function(e){},onMsg:function(e,t){}}}return Object(h.a)(e,[{key:"afterUpload",value:function(){var e=Object(p.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return");case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"setError",value:function(e){e instanceof b.u&&e.Retryable()&&X.includes(this.task.policy.type)||(this.logger.warn("Non-resume error occurs, clean resume ctx cache"),this.cancelUploadSession()),e instanceof b.n||(this.status=f.error,this.error=e,this.subscriber.onError(e))}},{key:"transit",value:function(e){this.status=e,this.subscriber.onTransition(e)}},{key:"getProgressInfoItem",value:function(e,t,a){return Object(d.a)({size:t,loaded:e,percent:e/t*100},null==a?{}:{fromCache:a})}},{key:"key",value:function(){return y.h(this.task)}}]),e}();Q.id=0;var ee,te=function(e){Object(E.a)(a,e);var t=Object(v.a)(a);function a(){var e;Object(m.a)(this,a);for(var n=arguments.length,r=new Array(n),o=0;o=this.progress.total.loaded)){e.next=12;break}return this.logger.info("This whole chunk is overlapped, skipping..."),this.updateChunkProgress(t.chunk.size,t.index),e.abrupt("return");case 12:return this.updateChunkProgress(0,t.index),o=this.progress.total.loaded+t.chunk.size-1,i=r-this.progress.total.loaded,t.chunk=t.chunk.slice(i),this.updateChunkProgress(i,t.index),e.abrupt("return",this.sendRange(t,r,o,i));case 18:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"afterUpload",value:function(){var e=Object(p.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.info("Finishing upload..."),this.transit(f.finishing),e.abrupt("return",F(this.task.session.sessionID,this.cancelToken.token));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),a}(te),ie=function(e){Object(E.a)(a,e);var t=Object(v.a)(a);function a(){return Object(m.a)(this,a),t.apply(this,arguments)}return Object(h.a)(a,[{key:"uploadChunk",value:function(){var e=Object(p.a)(u.a.mark((function e(t){var a,n=this;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",_(null===(a=this.task.session)||void 0===a?void 0:a.uploadURLs[t.index],t,(function(e){n.updateChunkProgress(e.loaded,t.index)}),this.cancelToken.token));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"afterUpload",value:function(){var e=Object(p.a)(u.a.mark((function e(){return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.info("Finishing multipart upload..."),this.transit(f.finishing),e.abrupt("return",A(this.task.session.completeURL,!0,this.task.chunkProgress,this.cancelToken.token));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),a}(te),ce=function(e){Object(E.a)(a,e);var t=Object(v.a)(a);function a(){return Object(m.a)(this,a),t.apply(this,arguments)}return Object(h.a)(a,[{key:"uploadChunk",value:function(){var e=Object(p.a)(u.a.mark((function e(t){var a,n,r,o=this;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z(null===(a=this.task.session)||void 0===a?void 0:a.uploadURLs[0],null===(n=this.task.session)||void 0===n?void 0:n.credential,t,(function(e){o.updateChunkProgress(e.loaded,t.index)}),this.cancelToken.token);case 2:r=e.sent,this.task.chunkProgress[t.index].etag=r.etag;case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"afterUpload",value:function(){var e=Object(p.a)(u.a.mark((function e(){var t,a;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.logger.info("Finishing multipart upload..."),this.transit(f.finishing),e.abrupt("return",B(null===(t=this.task.session)||void 0===t?void 0:t.uploadURLs[0],null===(a=this.task.session)||void 0===a?void 0:a.credential,this.task.chunkProgress,this.cancelToken.token));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),a}(te),le=function(e){Object(E.a)(a,e);var t=Object(v.a)(a);function a(){var e;Object(m.a)(this,a);for(var n=arguments.length,r=new Array(n),o=0;o1&&void 0!==arguments[1]?arguments[1]:ee.File;return new Promise((function(n){if(void 0==a.policy)throw a.logger.warn("Calling file selector while no policy is set"),new b.u(b.v.NoPolicySelected,"No policy selected.");a.fileInput.onchange=function(t){return a.fileSelectCallback(t,e,n)},a.directoryInput.onchange=function(t){return a.fileSelectCallback(t,e,n)},a.fileInput.value="",a.directoryInput.value="",t==ee.File?a.fileInput.click():a.directoryInput.click()}))},this.resumeTasks=function(){var e=Object(y.j)(a.logger);return e.length>0&&a.logger.info("Resumed ".concat(e.length," unfinished task(s) from local storage:"),e),e.filter((function(e){return e.chunkProgress.length>0&&e.chunkProgress[0].loaded>0})).map((function(e){return a.dispatchUploader(Object(d.a)(Object(d.a)({},e),{},{type:r.resumeHint}))}))},this.cleanupSessions=function(){Object(y.b)(a.logger)},this.fileSelectCallback=function(e,t,n){var o=[];if(e instanceof Event){var i=e.target;if(!e||!i||!i.files)return;i.files.length>0&&(o=Array.from(i.files))}else o=e;o.length>0&&n(o.map((function(e){return a.dispatchUploader({type:r.file,policy:a.policy,dst:Object(y.e)(t,e),file:e,size:e.size,name:e.name,chunkProgress:[],resumed:!1})})))},this.onFileDroppedIn=function(){var e=Object(p.a)(u.a.mark((function e(t){var n,r;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.dataTransfer&&t.dataTransfer.types.includes("Files"))){e.next=11;break}return a.o.onDropLeave&&a.o.onDropLeave(t),e.next=5,Object(y.c)(t.dataTransfer.items);case 5:return n=e.sent,console.log(n),e.next=9,new Promise((function(e){return a.fileSelectCallback(n,a.currentPath,e)}));case 9:r=e.sent,a.o.onDropFileAdded&&a.o.onDropFileAdded(r);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.logger=new g(t.logLevel,"MANAGER"),this.logger.info("Initialized with log level: ".concat(t.logLevel)),this.pool=new ne.a(t.concurrentLimit),this.fileInput=Object(y.f)(this.id,!1),this.directoryInput=Object(y.f)(this.id,!0),t.dropZone&&(this.logger.info("Drag and drop container set to:",t.dropZone),t.dropZone.addEventListener("dragenter",(function(e){Object(y.i)(e)&&(e.preventDefault(),t.onDropOver&&t.onDropOver(e))})),t.dropZone.addEventListener("dragleave",(function(e){Object(y.i)(e)&&(e.preventDefault(),t.onDropLeave&&t.onDropLeave(e))})),t.dropZone.addEventListener("drop",this.onFileDroppedIn))}return Object(h.a)(e,[{key:"dispatchUploader",value:function(e){if(e.type==r.resumeHint)return new pe(e,this);switch(e.policy.type){case n.local:return new ae(e,this);case n.remote:return new re(e,this);case n.onedrive:return new oe(e,this);case n.oss:return new ie(e,this);case n.qiniu:return new ce(e,this);case n.cos:return new le(e,this);case n.upyun:return new se(e,this);case n.s3:return new ue(e,this);default:throw new b.t("Unknown policy type.",e.policy)}}},{key:"setPolicy",value:function(e,t){if(this.policy=e,this.currentPath=t,void 0!=e)if(this.logger.info("Switching policy to:",e),void 0!=e.allowedSuffix&&e.allowedSuffix.length>0){var a=e.allowedSuffix.map((function(e){return"."+e})).join(",");this.logger.info("Set allowed file suffix to ".concat(a)),this.fileInput.setAttribute("accept",a)}else this.logger.info("Set allowed file suffix to *"),this.fileInput.removeAttribute("accept");else this.logger.info("Currently no policy selected")}}]),e}();de.id=0;var me=a(7),he=a(106),fe=a(7011),ge=a(7083),be=a(7084),Ee=a(7157),ve=a(7085),Oe=a(137),je=a.n(Oe),ke=a(263),we=a.n(ke),ye=a(123),xe=a(16),Ce=a(456),Se=a(30),Ne=a(143),Te=(a(3),a(2)),Pe=Object(he.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}},fabProgress:{color:Ne.a[500],position:"absolute",bottom:-6,left:-6,zIndex:1},buttonSuccess:{backgroundColor:Ne.a[500],"&:hover":{backgroundColor:Ne.a[700]}}}}));function Le(e){var t=Object(c.useState)(!1),a=Object(i.a)(t,2),n=a[0],r=a[1],o=Object(c.useState)(5),s=Object(i.a)(o,2),u=s[0],p=s[1],d=Object(me.e)((function(e){return e.navigator.path})),m=Pe(),h=Object(me.d)(),f=(Object(c.useCallback)((function(e,t,a,n){return h(Object(Te.R)(e,t,a,n))}),[h]),Object(c.useCallback)((function(){return h(Object(Te.o)())}),[h])),g=Object(c.useCallback)((function(){return h(Object(Te.n)())}),[h]);Object(c.useEffect)((function(){p(e.Queued)}),[e.Queued]);var b=function(){n&&(0!==u?e.openFileList():e.selectFile(d))},E=Object(c.useMemo)((function(){if(e.progress.totalSize>0)return l.a.createElement(fe.a,{key:1,size:68,variant:"determinate",value:e.progress.processedSize/e.progress.totalSize*100,className:m.fabProgress})}),[m,e.progress]);return l.a.createElement(ye.a,{enable:!0,hide:e.taskListOpen},l.a.createElement(ge.a,{badgeContent:u,classes:{badge:m.badge},className:m.fab,invisible:0===u,color:"primary"},l.a.createElement(Ce.a,{open:n&&xe.a.isMobile()}),l.a.createElement(be.a,{ariaLabel:"SpeedDial openIcon example",hidden:!1,tooltipTitle:"\u4e0a\u4f20\u6587\u4ef6",icon:l.a.createElement(Ee.a,{openIcon:!xe.a.isMobile()&&l.a.createElement(we.a,null)}),onClose:function(){r(!1)},FabProps:{onClick:function(){return!xe.a.isMobile()&&b()},color:"secondary"},onOpen:function(){r(!0)},open:n},xe.a.isMobile()&&l.a.createElement(ve.a,{key:"UploadFile",icon:l.a.createElement(we.a,null),tooltipOpen:!0,tooltipTitle:"\u4e0a\u4f20\u6587\u4ef6",onClick:function(){return b()},title:"\u4e0a\u4f20\u6587\u4ef6"}),!xe.a.isMobile()&&l.a.createElement(ve.a,{key:"UploadFolder",icon:l.a.createElement(Se.n,null),tooltipOpen:!0,tooltipTitle:"\u4e0a\u4f20\u76ee\u5f55",onClick:function(){return e.selectFile(d,ee.Directory)},title:"\u4e0a\u4f20\u76ee\u5f55"}),l.a.createElement(ve.a,{key:"NewFolder",icon:l.a.createElement(je.a,null),tooltipOpen:!0,tooltipTitle:"\u65b0\u5efa\u76ee\u5f55",onClick:function(){return f()},title:"\u65b0\u5efa\u76ee\u5f55"}),l.a.createElement(ve.a,{key:"NewFile",icon:l.a.createElement(Se.j,null),tooltipOpen:!0,tooltipTitle:"\u65b0\u5efa\u6587\u4ef6",onClick:function(){return g()},title:"\u65b0\u5efa\u6587\u4ef6"})),E))}var Re=a(19),Ie=a(6),Fe=a(7025),De=a(267),_e=a(7091),Me=a(7152),Ae=a(7026),Ue=a(7027),ze=a(91),We=a(53),Be=a(55),He=a(7098),Ge=a(7093),Ve=a(42),qe=a(7090),Ye=a(219),Ke=a.n(Ye),Je=a(385),Ze=a.n(Je),$e=a(384),Xe=a.n($e),Qe=a(29),et=a.n(Qe),tt=a(92),at=a(75),nt=a(63),rt=a(180),ot=a(54);var it=a(25),ct=a(102),lt=a(7151),st=a(100),ut=a.n(st),pt=a(115),dt=a.n(pt),mt=a(7088),ht=a(175),ft=a.n(ht),gt=a(67),bt=a.n(gt),Et=a(7017),vt=a(7019),Ot=a(7020),jt=a(7089),kt=(a(50),a(98)),wt=Object(he.a)((function(e){return{infoTitle:{fontWeight:700},infoValue:{color:e.palette.text.secondary,wordBreak:"break-all"}}}));function yt(e){var t=e.uploader,a=e.navigateToDst,n=e.error,r=wt(),o=[{name:"\u6587\u4ef6\u540d",value:t.task.name},{name:"\u6587\u4ef6\u5927\u5c0f",value:"".concat(Object(it.p)(t.task.size)," ").concat(t.task.session&&t.task.session.chunkSize>0?"(".concat(t.task.chunkProgress.length," \u4e2a\u5206\u7247, \u6bcf\u4e2a\u5206\u7247 ").concat(Object(it.p)(t.task.session.chunkSize),")"):"(\u65e0\u5206\u7247)")},{name:"\u5b58\u50a8\u7b56\u7565",value:t.task.policy.name},{name:"\u76ee\u7684\u8def\u5f84",value:l.a.createElement(mt.a,{href:"javascript:void",onClick:function(){return a(t.task.dst)}},"/"===t.task.dst?"\u6839\u76ee\u5f55":t.task.dst)},t.task.session?{name:"\u4e0a\u4f20\u4f1a\u8bdd",value:l.a.createElement(l.a.Fragment,null,l.a.createElement(kt.a,{datetime:t.task.session?1e3*t.task.session.expires:0,locale:"zh_CN"}),"\u8fc7\u671f")}:null,t.status===f.error?{name:"\u9519\u8bef\u4fe1\u606f",value:n}:null];return l.a.createElement(jt.a,{container:!0},o.map((function(e){return l.a.createElement(l.a.Fragment,null,e&&l.a.createElement(jt.a,{key:e.name,container:!0,xs:12},l.a.createElement(jt.a,{item:!0,xs:3,className:r.infoTitle},e.name,"\uff1a"),l.a.createElement(jt.a,{item:!0,xs:9,className:r.infoValue},e.value)))})))}var xt=Object(he.a)((function(e){return{progressContent:{position:"relative",zIndex:9},progress:{transition:"width .4s linear",zIndex:1,height:"100%",position:"absolute",left:0,top:0},progressContainer:{position:"relative"},listAction:{marginLeft:20,marginRight:20},wordBreak:{wordBreak:"break-all",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},successStatus:{color:e.palette.success.main},errorStatus:Object(Ie.a)({color:e.palette.warning.main,wordBreak:"break-all"},e.breakpoints.up("sm"),{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),disabledBadge:{marginLeft:e.spacing(1),height:18},delete:{zIndex:9},dstLink:{color:e.palette.success.main,fontWeight:600},fileNameContainer:{display:"flex",alignItems:"center"}}})),Ct=bt()({root:{maxWidth:"100%",boxShadow:"none","&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&$expanded":{margin:0}},expanded:{}})(Et.a),St=bt()({root:{minHeight:0,padding:0,display:"block","&$expanded":{}},content:{margin:0,display:"block","&$expanded":{margin:"0"}},expanded:{}})(vt.a),Nt=bt()((function(e){return{root:{paddingLeft:16,paddingRight:16,paddingTop:8,paddingBottom:8,display:"block",backgroundColor:e.palette.background.default}}}))(Ot.a),Tt=function(e){var t=e.message;return e instanceof b.u&&(t=e.Message("")),t};function Pt(e){var t=e.uploader,a=e.useAvgSpeed,n=e.onCancel,r=e.onClose,o=e.selectFile,s=e.onRefresh,u=xt(),p=Object(Ve.a)(),d=Object(c.useState)(!1),m=Object(i.a)(d,2),h=m[0],g=m[1],b=Object(c.useState)(!1),E=Object(i.a)(b,2),v=E[0],O=E[1],j=function(e){var t=Object(c.useRef)(0),a=Object(c.useState)(e.status),n=Object(i.a)(a,2),r=n[0],o=n[1],s=Object(c.useState)(e.error),u=Object(i.a)(s,2),p=u[0],d=u[1],m=Object(c.useState)(e.progress),h=Object(i.a)(m,2),f=h[0],g=h[1],b=Object(me.d)(),E=Object(c.useCallback)((function(e,t,a,n){return b(Object(Te.R)(e,t,a,n))}),[b]);Object(c.useEffect)((function(){e.subscribe({onTransition:function(e){o(e)},onError:function(t){d(t),o(e.status)},onProgress:function(e){g(e)},onMsg:function(e,t){E("top","right",e,t)}})}),[]);var v=l.a.useMemo((function(){if(null==f||null==f.total||null==f.total.loaded)return[0,0];var a=(Date.now()-(e.lastTime||0))/1e3,n=(Date.now()-(e.startTime||0))/1e3,r=f.total.loaded>t.current?Math.floor((f.total.loaded-t.current)/a):0,o=f.total.loaded>0?Math.floor(f.total.loaded/n):0;return t.current=f.total.loaded,e.lastTime=Date.now(),[r,o]}),[f]),O=Object(i.a)(v,2),j=O[0],k=O[1];return{status:r,error:p,progress:f,speed:j,speedAvg:k,retry:function(){e.reset(),e.start()}}}(t),k=j.status,w=j.error,y=j.progress,x=j.speed,C=j.speedAvg,S=j.retry,N=Object(qe.a)(p.breakpoints.down("sm")),T=Object(c.useState)(!1),P=Object(i.a)(T,2),L=P[0],R=P[1],I=Object(me.d)(),F=Object(c.useCallback)((function(e){return I(Object(Te.j)(e))}),[I]),D=function(e){r(null,"backdropClick"),F(e)};Object(c.useEffect)((function(){k>=f.finished&&s()}),[k]);var _=Object(c.useMemo)((function(){var e=Object(it.g)(t.task.dst);switch(k){case f.added:case f.initialized:case f.queued:return l.a.createElement("div",null,"\u6392\u961f\u4e2d...");case f.preparing:return l.a.createElement("div",null,"\u51c6\u5907\u4e2d...");case f.error:return l.a.createElement("div",{className:u.errorStatus},Tt(w),l.a.createElement("br",null));case f.finishing:return l.a.createElement("div",null,"\u5904\u7406\u4e2d...");case f.resumable:return l.a.createElement("div",null,"\u5df2\u4e0a\u4f20 ".concat(Object(it.p)(y.total.loaded)," , \u5171 ").concat(Object(it.p)(y.total.size)," - ").concat(y.total.percent.toFixed(2),"%"));case f.processing:return y?l.a.createElement("div",null,"".concat(function(e,t,a){var n=t;return a||(n=e),"".concat(Object(it.p)(n||0)," /s")}(x,C,a)," \u5df2\u4e0a\u4f20 ").concat(Object(it.p)(y.total.loaded)," , \u5171 ").concat(Object(it.p)(y.total.size)," - ").concat(y.total.percent.toFixed(2),"%")):l.a.createElement("div",null,"\u5df2\u4e0a\u4f20 - ");case f.finished:return l.a.createElement("div",{className:u.successStatus},"\u5df2\u4e0a\u4f20\u81f3"," ",l.a.createElement(ze.a,{title:t.task.dst},l.a.createElement(mt.a,{className:u.dstLink,href:"javascript:void",onClick:function(){return D(t.task.dst)}},""===e?"\u6839\u76ee\u5f55":e)),l.a.createElement("br",null));default:return l.a.createElement("div",null,"\u672a\u77e5")}}),[k,w,y,x,C,a]),M=Object(c.useMemo)((function(){return t.task.resumed&&!N?l.a.createElement(lt.a,{className:u.disabledBadge,size:"small",label:"\u65ad\u70b9\u7eed\u4f20"}):null}),[k,N]),A=Object(c.useMemo)((function(){return k!==f.resumable||N?null:l.a.createElement(lt.a,{className:u.disabledBadge,size:"small",color:"secondary",label:"\u53ef\u6062\u590d\u8fdb\u5ea6"})}),[k,N]),U=Object(c.useMemo)((function(){return k!==f.processing&&k!==f.finishing&&k!==f.resumable||!y?null:l.a.createElement("div",{style:{backgroundColor:"light"===p.palette.type?Object(ct.lighten)(p.palette.primary.main,.8):Object(ct.darken)(p.palette.background.paper,.2),width:y.total.percent+"%"},className:u.progress})}),[k,y,p]),z=Object(c.useMemo)((function(){return l.a.createElement(yt,{error:w&&Tt(w),navigateToDst:D,uploader:t})}),[t,v]),W=function(){R(!0),t.cancel().then((function(){R(!1),n((function(e){return e.id!=t.id}))}))},B=function(e){e.stopPropagation()},H=Object(c.useMemo)((function(){if(!h&&!N)return l.a.createElement(l.a.Fragment,null);var e=[{show:k===f.error,title:"\u91cd\u8bd5",click:S,icon:l.a.createElement(dt.a,null),loading:!1},{show:!0,title:k===f.finished?"\u5220\u9664\u4efb\u52a1\u8bb0\u5f55":"\u53d6\u6d88\u5e76\u5220\u9664",click:W,icon:l.a.createElement(ut.a,null),loading:L},{show:k===f.resumable,title:"\u9009\u53d6\u540c\u6837\u6587\u4ef6\u5e76\u6062\u590d\u4e0a\u4f20",click:function(){return o(t.task.dst,ee.File,t)},icon:l.a.createElement(ft.a,null),loading:!1}];return l.a.createElement(l.a.Fragment,null,e.map((function(e){return l.a.createElement(l.a.Fragment,null,e.show&&l.a.createElement(tt.a,{in:e.show},l.a.createElement(ze.a,{title:e.title},l.a.createElement(We.a,{onMouseDown:B,onTouchStart:B,disabled:e.loading,onClick:function(t){t.stopPropagation(),e.click()}},e.icon))))})))}),[k,L,h,N,t]),G=Object(c.useMemo)((function(){if(!N)return l.a.createElement(ot.a,{fileName:t.task.name,isUpload:!0})}),[t,N]);return l.a.createElement(l.a.Fragment,null,l.a.createElement(Ct,{square:!0,expanded:v,onChange:function(e,t){O(!!t)}},l.a.createElement(St,{"aria-controls":"panel1d-content",id:"panel1d-header"},l.a.createElement("div",{className:u.progressContainer,onMouseLeave:function(){return g(!1)},onMouseOver:function(){return g(!0)}},U,l.a.createElement(at.a,{className:u.progressContent,button:!0},G,l.a.createElement(nt.a,{className:u.listAction,primary:l.a.createElement("div",{className:u.fileNameContainer},l.a.createElement("div",{className:u.wordBreak},t.task.name),l.a.createElement("div",null,M),l.a.createElement("div",null,A)),secondary:l.a.createElement("div",{className:u.wordBreak},_)}),H))),l.a.createElement(Nt,null,z)),l.a.createElement(rt.a,null))}var Lt=a(7028),Rt=a(7096),It=a(238),Ft=a(118),Dt=a(64),_t=a(12),Mt=a(104),At=a.n(Mt),Ut=a(7021),zt=a(7023),Wt=a(7092),Bt=a(7094),Ht=a(7095),Gt=a(269),Vt=a(20),qt=Object(he.a)((function(e){return{}}));function Yt(e){var t=e.open,a=e.onClose,n=e.onSave,r=Object(c.useState)(Vt.a.GetPreferenceWithDefault("concurrent_limit","5")),o=Object(i.a)(r,2),s=o[0],u=o[1],p=qt();return l.a.createElement(_e.a,{fullWidth:!0,maxWidth:"xs",open:t,onClose:a,"aria-labelledby":"form-dialog-title"},l.a.createElement(Wt.a,{id:"form-dialog-title"},"\u4efb\u52a1\u5e76\u884c\u6570\u91cf"),l.a.createElement(Ge.a,null,l.a.createElement(Gt.a,{fullWidth:!0},l.a.createElement(Ut.a,{htmlFor:"component-helper"},"\u540c\u65f6\u4e0a\u4f20\u7684\u4efb\u52a1\u6570\u91cf"),l.a.createElement(zt.a,{type:"number",inputProps:{min:1,step:1,max:20},value:s,onChange:function(e){return u(e.target.value)}}))),l.a.createElement(Bt.a,null,l.a.createElement(Ht.a,{onClick:a},"\u53d6\u6d88"),l.a.createElement("div",{className:p.wrapper},l.a.createElement(Ht.a,{color:"primary",disabled:""===s,onClick:function(){return n(s)}},"\u786e\u5b9a"))))}var Kt=a(7097),Jt=Object(he.a)((function(e){return{icon:{minWidth:38}}}));function Zt(e){var t=e.anchorEl,a=e.onClose,n=e.uploadManager,o=e.deleteTask,s=e.useAvgSpeed,u=e.setUseAvgSpeed,p=e.filter,d=e.setFilter,m=e.sorter,h=e.setSorter,f=e.cleanFinished,g=Jt(),b=Object(me.d)(),E=Object(c.useState)(!1),v=Object(i.a)(E,2),O=v[0],j=v[1],k=Object(c.useCallback)((function(e,t,a,n){return b(Object(Te.R)(e,t,a,n))}),[b]),w=Object(c.useCallback)((function(){return b(Object(Te.C)())}),[b]),y=Boolean(t),x=y?"uploader-action-popover":void 0,C=Object(c.useMemo)((function(){return[{tooltip:"\u5217\u8868\u4e2d\u4e0d\u663e\u793a\u5df2\u5b8c\u6210\u3001\u5931\u8d25\u3001\u88ab\u53d6\u6d88\u7684\u4efb\u52a1",onClick:function(){return d("default"===p?"ongoing":"default")},icon:"default"!==p?l.a.createElement(At.a,null):l.a.createElement(Rt.a,null),text:"\u9690\u85cf\u5df2\u5b8c\u6210\u4efb\u52a1",divider:!0},{tooltip:"\u6700\u5148\u6dfb\u52a0\u7684\u4efb\u52a1\u6392\u5728\u6700\u524d",onClick:function(){return h("default")},icon:"default"===m?l.a.createElement(At.a,null):l.a.createElement(Rt.a,null),text:"\u6700\u5148\u6dfb\u52a0\u9760\u524d",divider:!1},{tooltip:"\u6700\u540e\u6dfb\u52a0\u7684\u4efb\u52a1\u6392\u5728\u6700\u524d",onClick:function(){return h("reverse")},icon:"reverse"===m?l.a.createElement(At.a,null):l.a.createElement(Rt.a,null),text:"\u6700\u540e\u6dfb\u52a0\u9760\u524d",divider:!0},{tooltip:"\u5355\u4e2a\u4efb\u52a1\u4e0a\u4f20\u901f\u5ea6\u5c55\u793a\u4e3a\u77ac\u65f6\u901f\u5ea6",onClick:function(){return u(!1)},icon:s?l.a.createElement(Rt.a,null):l.a.createElement(At.a,null),text:"\u77ac\u65f6\u901f\u5ea6",divider:!1},{tooltip:"\u5355\u4e2a\u4efb\u52a1\u4e0a\u4f20\u901f\u5ea6\u5c55\u793a\u4e3a\u5e73\u5747\u901f\u5ea6",onClick:function(){return u(!0)},icon:s?l.a.createElement(At.a,null):l.a.createElement(Rt.a,null),text:"\u5e73\u5747\u901f\u5ea6",divider:!0},{tooltip:"\u6e05\u7a7a\u670d\u52a1\u7aef\u6240\u6709\u672a\u5b8c\u6210\u7684\u4e0a\u4f20\u4f1a\u8bdd",onClick:function(){return n.cleanupSessions(),void _t.b.delete("/file/upload").then((function(e){0===e.rawData.code?k("top","right","\u4e0a\u4f20\u4f1a\u8bdd\u5df2\u6e05\u9664","success"):k("top","right",e.rawData.msg,"warning"),o((function(e){return e.task.type!==r.resumeHint})),w()})).catch((function(e){k("top","right",e.message,"error")}))},icon:l.a.createElement(Se.g,null),text:"\u6e05\u7a7a\u6240\u6709\u4e0a\u4f20\u4f1a\u8bdd",divider:!1},{tooltip:"\u6e05\u9664\u5217\u8868\u4e2d\u5df2\u5b8c\u6210\u3001\u5931\u8d25\u3001\u88ab\u53d6\u6d88\u7684\u4efb\u52a1",onClick:function(){return f()},icon:l.a.createElement(ut.a,null),text:"\u6e05\u9664\u5df2\u5b8c\u6210\u4efb\u52a1",divider:!0},{tooltip:"\u6e05\u9664\u5217\u8868\u4e2d\u5df2\u5b8c\u6210\u3001\u5931\u8d25\u3001\u88ab\u53d6\u6d88\u7684\u4efb\u52a1",onClick:function(){return j(!0)},icon:l.a.createElement(Kt.a,null),text:"\u8bbe\u7f6e\u5e76\u884c\u6570\u91cf",divider:!1}]}),[s,u,m,h,p,d,f]);return l.a.createElement(l.a.Fragment,null,l.a.createElement(It.a,{id:x,open:y,anchorEl:t,onClose:a},C.map((function(e){return l.a.createElement(l.a.Fragment,null,l.a.createElement(ze.a,{enterNextDelay:500,key:e.text,title:e.tooltip},l.a.createElement(Ft.a,{dense:!0,onClick:(t=e.onClick,function(){a(),t()})},l.a.createElement(Dt.a,{className:g.icon},e.icon),e.text)),e.divider&&l.a.createElement(rt.a,null));var t}))),l.a.createElement(Yt,{open:O,onClose:function(){return j(!1)},onSave:function(e){(e=parseInt(e))>0&&(Vt.a.SetPreference("concurrent_limit",e),n.changeConcurrentLimit(parseInt(e))),j(!1)}}))}var $t=a(452),Xt=a(71),Qt=l.a.forwardRef((function(e,t){return l.a.createElement(Fe.a,Object.assign({direction:"up",ref:t},e))})),ea=Object(he.a)((function(e){var t;return{rootOverwrite:{top:"auto!important",left:"auto!important"},appBar:{position:"relative"},flex:{flex:1},popup:{alignItems:"flex-end",justifyContent:"flex-end"},dialog:{margin:0,right:10,bottom:10,zIndex:9999,position:"fixed",inset:"-1!important"},paddingZero:{padding:0},dialogContent:(t={},Object(Ie.a)(t,e.breakpoints.up("md"),{width:500,minHeight:300,maxHeight:"calc(100vh - 140px)"}),Object(Ie.a)(t,"padding",0),Object(Ie.a)(t,"paddingTop","0!important"),t),virtualList:Object(Ie.a)({height:"100%",maxHeight:"calc(100vh - 56px)"},e.breakpoints.up("md"),{minHeight:300,maxHeight:"calc(100vh - 140px)"}),expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest})},expandIconExpanded:{transform:"rotate(180deg)"},toolbar:{paddingLeft:e.spacing(1),paddingRight:e.spacing(1)},progress:{transition:"width .4s linear",zIndex:-1,height:"100%",position:"absolute",left:0,top:0}}})),ta={default:function(e,t){return e.id-t.id},reverse:function(e,t){return t.id-e.id}},aa={default:function(e){return!0},ongoing:function(e){return e.status0?l.a.createElement(De.a,{in:p.totalSize>0&&!v},l.a.createElement("div",null,l.a.createElement("div",{style:{backgroundColor:(h.palette.type,Object(ct.lighten)(h.palette.primary.main,.2)),width:p.processedSize/p.totalSize*100+"%"},className:m.progress}))):null}),[p,v,m,h]),H=Object(c.useMemo)((function(){var e=o.filter(aa[L]).sort(ta[D]);return 0===e.length?l.a.createElement(Xt.a,{size:.5,top:63,primary:"\u6ca1\u6709\u4e0a\u4f20\u4efb\u52a1"}):l.a.createElement($t.a,{style:{height:(f?500:73)*e.length},className:m.virtualList,increaseViewportBy:180,data:e,itemContent:function(e,t){return l.a.createElement(Pt,{selectFile:r,onClose:W,onCancel:s,key:t.id,useAvgSpeed:w,uploader:t,filter:aa[L],onRefresh:function(){return z((function(e){return!e}))}})}})}),[m,o,w,f,L,D,U]);return l.a.createElement(l.a.Fragment,null,l.a.createElement(Zt,{deleteTask:s,onClose:function(){N(null)},uploadManager:u,anchorEl:S,useAvgSpeed:w,setUseAvgSpeed:function(e){Vt.a.SetPreference("use_avg_speed",e),y(e)},filter:L,sorter:D,setFilter:function(e){Vt.a.SetPreference("task_filter",e),R(e)},setSorter:function(e){Vt.a.SetPreference("task_sorter",e),_(e)},cleanFinished:function(){return d((function(e){return e.filter(aa.ongoing)}))}}),l.a.createElement(_e.a,{classes:{container:m.popup,root:et()(Object(Ie.a)({},m.rootOverwrite,!f))},className:et()(Object(Ie.a)({},m.dialog,!f)),fullScreen:f,open:a,onClose:W,TransitionComponent:Qt,disableEnforceFocus:!v,hideBackdrop:!v,disableBackdropClick:!v,disableScrollLock:!v},l.a.createElement(Me.a,{expanded:v||f,onChange:function(e,t){O(t)}},l.a.createElement(Ae.a,{className:m.appBar},B,l.a.createElement(Ue.a,{disableGutters:!0,className:m.toolbar},l.a.createElement(ze.a,{title:"\u9690\u85cf\u961f\u5217"},l.a.createElement(We.a,{color:"inherit",onClick:W,"aria-label":"Close"},l.a.createElement(Ke.a,null))),l.a.createElement(Be.a,{variant:"h6",color:"inherit",className:m.flex},"\u4e0a\u4f20\u961f\u5217"),l.a.createElement(ze.a,{title:"\u66f4\u591a\u64cd\u4f5c"},l.a.createElement(We.a,{color:"inherit",onClick:function(e){N(e.currentTarget)}},l.a.createElement(Lt.a,null))),l.a.createElement(ze.a,{title:"\u6dfb\u52a0\u65b0\u6587\u4ef6"},l.a.createElement(We.a,{color:"inherit",onClick:function(){return r(g)}},l.a.createElement(Xe.a,null))),!f&&l.a.createElement(ze.a,{title:"\u5c55\u5f00/\u6298\u53e0\u961f\u5217"},l.a.createElement(We.a,{color:"inherit",onClick:function(){return O(!v)}},l.a.createElement(Ze.a,{className:et()((t={},Object(Ie.a)(t,m.expandIconExpanded,v),Object(Ie.a)(t,m.expandIcon,!0),t))}))))),l.a.createElement(He.a,{className:m.paddingZero},l.a.createElement(Ge.a,{className:m.dialogContent},H)))))}var ra=a(354),oa=a(131),ia=a.n(oa),ca=Object(he.a)((function(e){return Object(ra.a)({backdrop:{zIndex:e.zIndex.drawer+1,color:"#fff",flexDirection:"column"}})}));function la(e){var t=e.open,a=ca();return l.a.createElement(Ce.a,{className:a.backdrop,open:t},l.a.createElement("div",null,l.a.createElement(ia.a,{style:{fontSize:80}})),l.a.createElement("div",null,l.a.createElement(Be.a,{variant:"h4"},"\u677e\u5f00\u9f20\u6807\u5f00\u59cb\u4e0a\u4f20")))}a.d(t,"a",(function(){return pa}));var sa=null,ua=-1;function pa(){var e=Object(c.useState)([]),t=Object(i.a)(e,2),a=t[0],n=t[1],r=Object(c.useState)(!1),s=Object(i.a)(r,2),u=s[0],p=s[1],d=Object(c.useState)(0),m=Object(i.a)(d,2),h=m[0],g=m[1],E=Object(c.useState)({totalSize:0,processedSize:0,total:0,processed:0}),v=Object(i.a)(E,2),O=v[0],j=v[1],k=Object(me.e)((function(e){return e.explorer.search})),w=Object(me.e)((function(e){return e.explorer.currentPolicy})),y=Object(me.e)((function(e){return e.viewUpdate.isLogin})),x=Object(me.e)((function(e){return e.navigator.path})),C=Object(me.e)((function(e){return e.viewUpdate.openFileSelector})),S=Object(me.e)((function(e){return e.viewUpdate.openFolderSelector})),N=Object(Re.h)(),T=Object(me.d)(),P=Object(c.useCallback)((function(e,t,a,n){return T(Object(Te.R)(e,t,a,n))}),[T]),L=Object(c.useCallback)((function(){return T(Object(Te.B)())}),[T]),R=Object(c.useCallback)((function(){return T(Object(Te.C)())}),[T]),I=Object(c.useMemo)((function(){return xe.a.isHomePage(N.pathname)&&y&&!k}),[N.pathname,y,k]),F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return function(t){null===e||1===t.length&&t[0].key()===e.key()?(t.forEach((function(e){return e.start()})),p(!0),n((function(a){return null!==e&&(a=a.filter((function(t){return t.key()!==e.key()}))),[].concat(Object(o.a)(a),Object(o.a)(t))}))):P("top","right","\u6240\u9009\u62e9\u6587\u4ef6\u4e0e\u539f\u59cb\u6587\u4ef6\u4e0d\u7b26","warning")}},D=Object(c.useMemo)((function(){return new de({logLevel:"INFO",concurrentLimit:parseInt(Vt.a.GetPreferenceWithDefault("concurrent_limit","5")),dropZone:document.querySelector("body"),onToast:function(e,t){P("top","right",t,e)},onDropOver:function(e){g((function(e){return!e}))},onDropLeave:function(e){g((function(e){return!e}))},onDropFileAdded:F()})}),[]);Object(c.useEffect)((function(){D.setPolicy(w,x)}),[w]),Object(c.useEffect)((function(){var e=D.resumeTasks();n((function(t){return[].concat(Object(o.a)(t),Object(o.a)(e))})),sa||(sa=setInterval((function(){var e={totalSize:0,processedSize:0,total:0,processed:0};n((function(t){return t.forEach((function(t){t.id<=ua||(e.totalSize+=t.task.size,e.total+=1,t.status!==f.finished&&t.status!==f.canceled&&t.status!==f.error||(e.processedSize+=t.task.size,e.processed+=1),t.status!==f.added&&t.status!==f.initialized&&t.status!==f.queued&&t.status!==f.preparing&&t.status!==f.processing&&t.status!==f.finishing||(e.processedSize+=t.progress?t.progress.total.loaded:0))})),e.total>0&&e.processed===e.total&&(ua=t[t.length-1].id),t})),e.total>0&&e.total===e.processed&&(L(),R()),j(e)}),2e3))}),[]);var _=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ee.File,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;p(!0),D.select(e,t).then(F(a)).catch((function(e){e instanceof b.u?P("top","right",e.Message(""),"warning"):P("top","right","\u51fa\u73b0\u672a\u77e5\u9519\u8bef\uff1a"+e.message,"error")}))};Object(c.useEffect)((function(){C>0&&_(x)}),[C]),Object(c.useEffect)((function(){S>0&&_(x,ee.Directory)}),[S]);return l.a.createElement(l.a.Fragment,null,I&&l.a.createElement(l.a.Fragment,null,l.a.createElement(la,{open:h>0}),l.a.createElement(Le,{progress:O,taskListOpen:u,selectFile:_,Queued:a.length,openFileList:function(){return p(!0)}}),l.a.createElement(na,{progress:O,uploadManager:D,taskList:a,open:u,onCancel:function(e){n((function(t){return t.filter(e)}))},selectFile:_,onClose:function(){return p(!1)},setUploaders:n})))}},46:function(e,t,a){"use strict";a.d(t,"g",(function(){return n})),a.d(t,"m",(function(){return o})),a.d(t,"a",(function(){return i})),a.d(t,"n",(function(){return c})),a.d(t,"b",(function(){return p})),a.d(t,"k",(function(){return d})),a.d(t,"l",(function(){return m})),a.d(t,"i",(function(){return h})),a.d(t,"j",(function(){return f})),a.d(t,"h",(function(){return g})),a.d(t,"c",(function(){return b})),a.d(t,"e",(function(){return j})),a.d(t,"f",(function(){return k})),a.d(t,"d",(function(){return w}));var n=["bmp","png","gif","jpg","jpeg","svg","webp"],r=["ppt","pptx","pps","doc","docx","xlsx","xls"],o=["ass","srt","vrr"],i=["mp3","ogg","wav","flac","m4a"],c=["mp4","mkv","webm","avi","m3u8","mov"],l=["pdf"],s=["md","txt"],u=["epub"],p={json:"json",php:"php",py:"python",bat:"bat",cpp:"cpp",c:"cpp",h:"cpp",cs:"csharp",css:"css",dockerfile:"dockerfile",go:"go",html:"html",ini:"ini",java:"java",js:"javascript",jsx:"javascript",less:"less",lua:"lua",sh:"shell",sql:"sql",xml:"xml",yaml:"yaml"},d={audio:["mp3","flac","ape","wav","acc","ogg","m4a"],video:["mp4","flv","avi","wmv","mkv","rm","rmvb","mov","ogv"],image:["bmp","iff","png","gif","jpg","jpeg","psd","svg","webp"],pdf:["pdf"],word:["doc","docx"],ppt:["ppt","pptx"],excel:["xls","xlsx","csv"],text:["txt","md","html"],torrent:["torrent"],zip:["zip","gz","xz","tar","rar","7z"],excute:["exe"],android:["apk"],php:["php"],go:["go"],python:["py"],cpp:["cpp"],c:["c"],js:["js","jsx"],epub:u},m={local:"\u672c\u673a",remote:"\u4ece\u673a",qiniu:"\u4e03\u725b",upyun:"\u53c8\u62cd\u4e91",oss:"\u963f\u91cc\u4e91 OSS",cos:"\u817e\u8baf\u4e91",onedrive:"OneDrive",s3:"Amazon S3"},h=function(e){var t=e.split(".").pop().toLowerCase();return-1!==n.indexOf(t)?"img":-1!==r.indexOf(t)?"msDoc":-1!==i.indexOf(t)?"audio":-1!==c.indexOf(t)?"video":-1!==s.indexOf(t)?"edit":-1!==l.indexOf(t)?"pdf":-1!==Object.keys(p).indexOf(t)?"code":-1!==u.indexOf(t)&&"epub"},f=function(e){var t=e.split(".").pop().toLowerCase();return-1!==d.torrent.indexOf(t)},g=function(e){var t=e.split(".").pop().toLowerCase();return"7z"!==t&&-1!==d.zip.indexOf(t)},b=function(e){return"zip"===e.split(".").pop().toLowerCase()},E=["\u6392\u961f\u4e2d","\u5904\u7406\u4e2d","\u5931\u8d25","\u53d6\u6d88","\u5df2\u5b8c\u6210"],v=["\u538b\u7f29","\u89e3\u538b\u7f29","\u6587\u4ef6\u4e2d\u8f6c","\u5bfc\u5165\u5916\u90e8\u76ee\u5f55"],O=["\u7b49\u5f85\u4e2d","\u538b\u7f29\u4e2d","\u89e3\u538b\u7f29\u4e2d","\u4e0b\u8f7d\u4e2d","\u8f6c\u5b58\u4e2d","\u7d22\u5f15\u4e2d","\u63d2\u5165\u4e2d"],j=function(e){return E[e]},k=function(e){return v[e]},w=function(e,t){return 2===e?"\u5df2\u5b8c\u6210 "+(t+1)+" \u4e2a\u6587\u4ef6":O[t]}},50:function(e,t,a){"use strict";a.d(t,"c",(function(){return p})),a.d(t,"b",(function(){return d})),a.d(t,"a",(function(){return m})),a.d(t,"d",(function(){return h}));var n=a(179),r=a.n(n),o=a(382),i=a.n(o),c=a(383),l=a.n(c),s=a(20);r.a.extend(l.a),r.a.extend(i.a);var u=s.a.GetPreference("timeZone"),p=u||"Asia/Shanghai";function d(){p=(p=s.a.GetPreference("timeZone"))||"Asia/Shanghai"}function m(e,t){return r()(e).tz(p).format(t)}function h(e){try{r()().tz(e).format()}catch(t){return!1}return!0}},51:function(e,t,a){"use strict";a.d(t,"c",(function(){return o})),a.d(t,"b",(function(){return i})),a.d(t,"f",(function(){return c})),a.d(t,"d",(function(){return l})),a.d(t,"e",(function(){return s})),a.d(t,"g",(function(){return u})),a.d(t,"h",(function(){return p})),a.d(t,"a",(function(){return d}));var n=a(9),r=a(20),o=function(){return{type:"CLOSE_CONTEXT_MENU"}},i=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))}},c=function(e){return{type:"SET_OPTION_MODAL",option:e}},l=function(){return{type:"OPEN_FILE_SELECTOR"}},s=function(){return{type:"OPEN_FOLDER_SELECTOR"}},u=function(e){return{type:"SET_PAGINATION",pagination:e}},p=function(e){return{type:"SET_SHARE_INFO",shareInfo:e}},d=function(e){return function(t,a){var o=a(),i=o.explorer,c=i.dirList,l=i.fileList,s=o.viewUpdate.pagination,p=c.length+l.length,d=s.page;s.page*e>p?d=Math.max(Math.ceil(p/e),1):-1===e&&(d=1),r.a.SetPreference("pagination",e),t(u(Object(n.a)(Object(n.a)({},s),{},{size:e,page:d})))}}},54:function(e,t,a){"use strict";var n,r=a(0),o=a.n(r),i=a(46),c=a(379),l=a.n(c),s=a(378),u=a.n(s),p=a(377),d=a.n(p),m=a(380),h=a.n(m),f=a(30),g=a(214),b=a.n(g),E=a(28),v=a(381),O=a.n(v),j=a(242),k=a(7014),w={audio:{color:"#651fff",icon:d.a},video:{color:"#d50000",icon:u.a},image:{color:"#d32f2f",icon:l.a},pdf:{color:"#f44336",icon:h.a},word:{color:"#538ce5",icon:f.l},ppt:{color:"rgb(239, 99, 63)",icon:f.k},excel:{color:"#4caf50",icon:f.i},text:{color:"#607d8b",icon:f.H},torrent:{color:"#5c6bc0",icon:f.D},zip:{color:"#f9a825",icon:f.O},excute:{color:"#1a237e",icon:f.N},android:{color:"#8bc34a",icon:f.d},file:{color:"#607d8b",icon:b.a},php:{color:"#777bb3",icon:f.A},go:{color:"#16b3da",icon:f.y},python:{color:"#3776ab",icon:f.B},c:{color:"#a8b9cc",icon:f.w},cpp:{color:"#004482",icon:f.x},js:{color:"#f4d003",icon:f.z},epub:{color:"#81b315",icon:k.a}};t.a=function(e){var t=O()(),a=e.fileName.split(".").pop().toLowerCase(),r="file";Object.keys(i.k).forEach((function(e){-1!==i.k[e].indexOf(a)&&(r=e)}));var c=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(c,{className:e.iconClassName,style:{color:t.palette.background.paper}})),!e.isUpload&&o.a.createElement(c,{className:e.className,style:{color:n}}))}},6942:function(e,t,a){e.exports=a(7010)},7010:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),o=a(41),i=a.n(o);function c(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 l=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(19),u=a(7),p=a(141),d=a(449),m=a(9),h=a(122),f=a(20),g=["children"];var b=function(e){var t=e.children,a=Object(h.a)(e,g);return r.a.createElement(s.b,Object.assign({},a,{render:function(e){var n=e.location;return f.a.Check(a.isLogin)?t:r.a.createElement(s.a,{to:{pathname:"/login",state:{from:n}}})}}))},E=["children"];var v=function(e){var t=e.children,a=Object(h.a)(e,E);return r.a.createElement(s.b,Object.assign({},a,{render:function(e){var n=e.location;return f.a.Check(a.isLogin)?r.a.createElement(s.a,{to:{pathname:"/home",state:{from:n}}}):t}}))},O=a(370),j=a(7090),k=a(355),w=a(151),y=a(28),x=a(106),C=a(7087),S=a(7144),N=a(25),T=a(410),P=a.n(T),L=Object(x.a)((function(e){return{icon:{fontSize:"160px"},emptyContainer:{bottom:"0",height:"300px",margin:"50px auto",width:"300px",color:Object(y.i)(e.palette.text.disabled,.4),textAlign:"center",paddingTop:"20px"},emptyInfoBig:{fontSize:"25px",color:Object(y.i)(e.palette.text.disabled,.4)}}}));function R(e){var t=L();return r.a.createElement("div",{className:t.emptyContainer},r.a.createElement(P.a,{className:t.icon}),r.a.createElement("div",{className:t.emptyInfoBig},e.msg))}var I=a(10),F=a(6),D=a(413),_=a.n(D),M=a(107),A=a(242),U=a(55),z=a(269),W=a(7021),B=a(7023),H=a(7095),G=a(180),V=a(7088),q=a(44),Y=a(12),K=a(7100),J=a(7101),Z=a(157),$=a.n(Z),X=a(16),Q=Object(x.a)((function(){return{icp:{padding:"8px 24px",position:"absolute",bottom:0}}})),ee=function(){var e=Object(u.e)((function(e){return e.siteConfig.siteICPId})),t=Q(),a=Object(s.h)(),o=Object(n.useState)(!0),i=Object(I.a)(o,2),c=i[0],l=i[1];return Object(n.useEffect)((function(){var t=X.a.isSharePage(a.pathname),n=X.a.isLoginPage(a.pathname);l(e&&(t||n))}),[e,a]),c?r.a.createElement("div",{className:t.icp},r.a.createElement(V.a,{href:"https://beian.miit.gov.cn/",rel:"noopener noreferrer",target:"_blank"},e)):r.a.createElement(r.a.Fragment,null)},te=a(101),ae=function(){return r.a.createElement(te.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 ne=function(){return r.a.createElement(ae,null)},re=a(2),oe=a(239),ie=Object(n.forwardRef)((function(e,t){var a=e.captchaRef,o=e.setLoading,i=Object(oe.a)().t,c=Oe(),l=Object(n.useState)(""),s=Object(I.a)(l,2),p=s[0],d=s[1],m=Object(n.useState)(null),h=Object(I.a)(m,2),f=h[0],g=h[1],b=Object(u.d)(),E=Object(n.useCallback)((function(e,t,a,n){return b(Object(re.R)(e,t,a,n))}),[b]),v=function(){Y.b.get("/site/captcha").then((function(e){g(e.data),o(!1)})).catch((function(e){E("top","right",i("login.captchaError",{message:e.message}),"error")}))};return Object(n.useEffect)((function(){t.current=v,v()}),[]),Object(n.useEffect)((function(){a.current.captchaCode=p}),[p]),r.a.createElement("div",{className:c.captchaContainer},r.a.createElement(z.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement(W.a,{htmlFor:"captcha"},i("login.captcha")),r.a.createElement(B.a,{name:"captcha",onChange:function(e){return d(e.target.value)},type:"text",id:"captcha",value:p,autoComplete:!0}))," ",r.a.createElement("div",null,null===f&&r.a.createElement("div",{className:c.captchaPlaceholder},r.a.createElement(ne,null)),null!==f&&r.a.createElement("img",{src:f,alt:"captcha",onClick:v})))}));var ce=a(13),le=a(14),se=a(135),ue=a(17),pe=a(18),de=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl"],me=function(e){Object(ue.a)(a,e);var t=Object(pe.a)(a);function a(){var e;return Object(ce.a)(this,a),(e=t.call(this)).handleExpired=e.handleExpired.bind(Object(se.a)(e)),e.handleErrored=e.handleErrored.bind(Object(se.a)(e)),e.handleChange=e.handleChange.bind(Object(se.a)(e)),e.handleRecaptchaRef=e.handleRecaptchaRef.bind(Object(se.a)(e)),e}return Object(le.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,de));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(411);var fe=Object(he.a)((function(){return"https://".concat("recaptcha.net","/recaptcha/api.js?onload=").concat("onloadcallback","&render=explicit")}),{callbackName:"onloadcallback",globalName:"grecaptcha"})(me),ge=function(e){var t=e.captchaRef,a=e.setLoading,o=Oe(),i=Object(n.useState)(""),c=Object(I.a)(i,2),l=c[0],s=c[1],p=Object(u.e)((function(e){return e.siteConfig.captcha_ReCaptchaKey}));return Object(n.useEffect)((function(){t.current.captchaCode=l}),[l]),Object(n.useEffect)((function(){return a(!1)}),[]),r.a.createElement("div",{className:o.captchaContainer},r.a.createElement(z.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement("div",null,r.a.createElement(fe,{style:{display:"inline-block"},sitekey:p,onChange:function(e){return s(e)},id:"captcha",name:"captcha"})))," ")};var be=a(412),Ee=a.n(be),ve=Object(n.forwardRef)((function(e,t){var a=e.captchaRef,n=e.setLoading,o=e.isValidateRef,i=e.submitRef,c=Object(u.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(c,(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(x.a)((function(e){return{captchaContainer:Object(F.a)({display:"flex",marginTop:"10px"},e.breakpoints.down("sm"),{display:"block"})}})),je=function(e,t){},ke=function(){var e=Object(u.e)((function(e){return e.siteConfig.captcha_type})),t=Object(n.useState)(!0),a=Object(I.a)(t,2),o=a[0],i=a[1],c=Object(n.useRef)((function(){})),l=function(e,t){var a=Object(n.useRef)({isValidate:!0}),o=Object(n.useRef)({captchaCode:""}),i=Object(n.useCallback)((function(){return r.a.createElement(ie,{captchaRef:o,ref:e,setLoading:t})}),[o,e,t]);return{isValidate:a,validate:je,captchaParamsRef:o,CaptchaRender:i}}(c,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(ge,{captchaRef:a,setLoading:e})}),[a,e]);return{isValidate:t,validate:je,captchaParamsRef:a,CaptchaRender:o}}(i),p=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)(),c=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:c}}(i);switch(e){case"normal":return Object(m.a)(Object(m.a)({},l),{},{captchaRefreshRef:c,captchaLoading:o});case"recaptcha":return Object(m.a)(Object(m.a)({},s),{},{captchaRefreshRef:c,captchaLoading:o});case"tcaptcha":return Object(m.a)(Object(m.a)({},p),{},{captchaRefreshRef:c,captchaLoading:o});default:return Object(m.a)(Object(m.a)({},l),{},{captchaRefreshRef:c,captchaLoading:o})}},we=Object(x.a)((function(e){var t;return{layout:(t={width:"auto",marginTop:"110px",marginLeft:e.spacing(3),marginRight:e.spacing(3)},Object(F.a)(t,e.breakpoints.up("sm"),{width:400,marginLeft:"auto",marginRight:"auto"}),Object(F.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(F.a)({display:"flex",marginTop:"10px"},e.breakpoints.down("sm"),{display:"block"}),captchaPlaceholder:{width:200},buttonContainer:{display:"flex"},authnLink:{textAlign:"center",marginTop:16}}}));var ye=function(){var e=Object(oe.a)().t,t=Object(n.useState)(""),a=Object(I.a)(t,2),o=a[0],i=a[1],c=Object(n.useState)(""),l=Object(I.a)(c,2),p=l[0],d=l[1],h=Object(n.useState)(!1),g=Object(I.a)(h,2),b=g[0],E=g[1],v=Object(n.useState)(!1),O=Object(I.a)(v,2),j=O[0],k=O[1],w=Object(n.useState)(!1),y=Object(I.a)(w,2),x=y[0],C=y[1],S=Object(n.useState)(""),T=Object(I.a)(S,2),P=T[0],L=T[1],R=Object(u.e)((function(e){return e.siteConfig.loginCaptcha})),F=Object(u.e)((function(e){return e.siteConfig.registerEnabled})),D=Object(u.e)((function(e){return e.siteConfig.title})),Z=Object(u.e)((function(e){return e.siteConfig.authn})),X=Object(u.d)(),Q=Object(n.useCallback)((function(e,t,a,n){return X(Object(re.R)(e,t,a,n))}),[X]),te=Object(n.useCallback)((function(e){return X(Object(re.a)(e))}),[X]),ae=Object(n.useCallback)((function(e){return X(Object(re.K)(e))}),[X]),ne=Object(s.g)(),ie=Object(s.h)(),ce=ke(),le=ce.captchaLoading,se=ce.isValidate,ue=ce.validate,pe=ce.CaptchaRender,de=ce.captchaRefreshRef,me=ce.captchaParamsRef,he=new URLSearchParams(Object(s.h)().search),fe=we();Object(n.useEffect)((function(){i(he.get("username"))}),[ie]);var ge=function(t){f.a.authenticate(t),""!==t.preferred_theme&&te(t.preferred_theme),ae(!0),ne.push("/home"),Q("top","right",e("login.success"),"success"),localStorage.removeItem("siteConfigCache")};return r.a.createElement("div",{className:fe.layout},!x&&r.a.createElement(r.a.Fragment,null,r.a.createElement(M.a,{className:fe.paper},r.a.createElement(A.a,{className:fe.avatar},r.a.createElement(_.a,null)),r.a.createElement(U.a,{component:"h1",variant:"h5"},e("login.title",{title:D})),!j&&r.a.createElement("form",{className:fe.form,onSubmit:function e(t){t.preventDefault(),E(!0),se.current.isValidate||!R?Y.b.post("/user/session",Object(m.a)({userName:o,Password:p},me.current)).then((function(e){E(!1),203===e.rawData.code?C(!0):ge(e.data)})).catch((function(e){E(!1),Q("top","right",e.message,"warning"),de.current()})):ue((function(){return e(t)}),E)}},r.a.createElement(z.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement(W.a,{htmlFor:"email"},e("login.email")),r.a.createElement(B.a,{id:"email",type:"email",name:"email",onChange:function(e){return i(e.target.value)},autoComplete:!0,value:o,autoFocus:!0})),r.a.createElement(z.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement(W.a,{htmlFor:"password"},e("login.password")),r.a.createElement(B.a,{name:"password",onChange:function(e){return d(e.target.value)},type:"password",id:"password",value:p,autoComplete:!0})),R&&r.a.createElement(pe,null),r.a.createElement(H.a,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",disabled:b||!!R&&le,className:fe.submit},e("login.signIn"))),j&&r.a.createElement("form",{className:fe.form},r.a.createElement(z.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement(W.a,{htmlFor:"email"},e("login.email")),r.a.createElement(B.a,{id:"email",type:"email",name:"email",onChange:function(e){return i(e.target.value)},autoComplete:!0,value:o,autoFocus:!0})),r.a.createElement(H.a,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",disabled:b,onClick:function(t){t.preventDefault(),navigator.credentials?(E(!0),Y.b.get("/user/authn/"+o).then((function(e){var t=e.data;return console.log(t),t.publicKey.challenge=Object(N.b)(t.publicKey.challenge),t.publicKey.allowCredentials.forEach((function(e){e.id=Object(N.b)(e.id)})),navigator.credentials.get({publicKey:t.publicKey})})).then((function(e){var t=e.response.authenticatorData,a=e.response.clientDataJSON,n=e.rawId,r=e.response.signature,i=e.response.userHandle;return Y.b.post("/user/authn/finish/"+o,JSON.stringify({id:e.id,rawId:Object(N.c)(n),type:e.type,response:{authenticatorData:Object(N.c)(t),clientDataJSON:Object(N.c)(a),signature:Object(N.c)(r),userHandle:Object(N.c)(i)}}))})).then((function(e){ge(e.data)})).catch((function(e){console.log(e),Q("top","right",e.message,"warning")})).then((function(){E(!1)}))):Q("top","right",e("login.browserNotSupport"),"warning")},className:fe.submit},e("login.continue"))),r.a.createElement(G.a,null),r.a.createElement("div",{className:fe.link},r.a.createElement("div",null,r.a.createElement(V.a,{component:q.a,to:"/forget"},e("login.forgetPassword"))),r.a.createElement("div",null,F&&r.a.createElement(V.a,{component:q.a,to:"/signup"},e("login.signUpAccount")))),r.a.createElement(ee,null)),Z&&r.a.createElement("div",{className:fe.authnLink},r.a.createElement(H.a,{color:"primary",onClick:function(){return k(!j)}},!j&&r.a.createElement(r.a.Fragment,null,r.a.createElement(K.a,{style:{marginRight:8}}),e("login.useFIDO2")),j&&r.a.createElement(r.a.Fragment,null,r.a.createElement(J.a,{style:{marginRight:8}}),e("login.usePassword"))))),x&&r.a.createElement(M.a,{className:fe.paper},r.a.createElement(A.a,{className:fe.avatar},r.a.createElement($.a,null)),r.a.createElement(U.a,{component:"h1",variant:"h5"},e("login.2FA")),r.a.createElement("form",{className:fe.form,onSubmit:function(e){e.preventDefault(),E(!0),Y.b.post("/user/2fa",{code:P}).then((function(e){E(!1),ge(e.data)})).catch((function(e){E(!1),Q("top","right",e.message,"warning")}))}},r.a.createElement(z.a,{margin:"normal",required:!0,fullWidth:!0},r.a.createElement(W.a,{htmlFor:"code"},e("login.input2FACode")),r.a.createElement(B.a,{id:"code",type:"number",name:"code",onChange:function(e){return L(e.target.value)},autoComplete:!0,value:P,autoFocus:!0})),r.a.createElement(H.a,{type:"submit",fullWidth:!0,variant:"contained",color:"primary",disabled:b,className:fe.submit},e("login.continue"))," ")," ",r.a.createElement(G.a,null)))},xe=a(7117),Ce=a(261),Se=a(51),Ne=a(7103),Te=a(29),Pe=a.n(Te),Le=a(134),Re=a(91),Ie=a(8),Fe=a(54),De=a(127),_e=a.n(De),Me=a(92),Ae=a(7102),Ue=a(414),ze=a.n(Ue),We=a(37),Be=Object(x.a)((function(e){return{highlight:{backgroundColor:e.palette.warning.light}}}));function He(e){var t=e.name,a=Be(),n=Object(u.e)((function(e){return e.explorer.search}));return n?r.a.createElement(ze.a,{highlightClassName:a.highlight,searchWords:Object(We.r)(n.keywords,"keywords/").split(" "),autoEscape:!0,textToHighlight:t}):t}var Ge=function(e){Object(ue.a)(a,e);var t=Object(pe.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)")}},et(e,a,n))}))))},at={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"};function nt(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 rt=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,o=t.isDragging,i=t.item,c=t.initialOffset,l=t.currentOffset,s=t.pointerOffset,p=Object(u.e)((function(e){return e.viewUpdate.explorerViewMethod})),d=Object(n.useMemo)((function(){switch(a){case"object":return r.a.createElement(tt,{object:i.object});default:return null}}),[a,i]);return o?r.a.createElement("div",{style:at},r.a.createElement("div",{style:nt(c,l,s,p)},d)):null},ot=a(38),it=a(7109),ct=a(7110),lt=a(7107),st=a(7108),ut=a(7111),pt=a(7089),dt=a(7011),mt=a(7153),ht=a(159),ft=a(64),gt=a(118),bt=a(238),Et=a(7104),vt=a(7105),Ot=a(7106),jt=a(223),kt=a.n(jt),wt=a(117),yt=a.n(wt),xt=a(131),Ct=a.n(xt),St=a(137),Nt=a.n(St),Tt=a(100),Pt=a.n(Tt),Lt=a(419),Rt=a.n(Lt),It=a(417),Ft=a.n(It),Dt=a(156),_t=a.n(Dt),Mt=a(418),At=a.n(Mt),Ut=a(126),zt=a.n(Ut),Wt=a(116),Bt=a.n(Wt),Ht=a(30),Gt=a(46),Vt=a(115),qt=a.n(Vt),Yt=a(40),Kt=Object(Ie.a)({root:{minWidth:38}})(ft.a),Jt=function(e){Object(ue.a)(a,e);var t=Object(pe.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(G.a,{key:n,className:e.props.classes.divider})),n++)})),a},e}return Object(le.a)(a,[{key:"render",value:function(){var e=this,t=this.props.classes,a=f.a.GetUser(),n=X.a.isHomePage(this.props.location.pathname);qt.a,Ct.a,Ht.n,a.group.allowRemoteDownload,yt.a,Nt.a,Ht.j;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(gt.a,{dense:!0,onClick:function(){e.props.refreshFileList(),e.props.changeContextMenu(e.props.menuType,!1)}},r.a.createElement(Kt,null,r.a.createElement(qt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u5237\u65b0")),r.a.createElement(G.a,{className:t.divider}),r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openFileSelector()}},r.a.createElement(Kt,null,r.a.createElement(Ct.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u4e0a\u4f20\u6587\u4ef6")),r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openFolderSelector()}},r.a.createElement(Kt,null,r.a.createElement(Ht.n,null)),r.a.createElement(U.a,{variant:"inherit"},"\u4e0a\u4f20\u76ee\u5f55")),a.group.allowRemoteDownload&&r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openRemoteDownloadDialog()}},r.a.createElement(Kt,null,r.a.createElement(yt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u79bb\u7ebf\u4e0b\u8f7d")),r.a.createElement(G.a,{className:t.divider}),r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openCreateFolderDialog()}},r.a.createElement(Kt,null,r.a.createElement(Nt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u521b\u5efa\u6587\u4ef6\u5939")),r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openCreateFileDialog()}},r.a.createElement(Kt,null,r.a.createElement(Ht.j,null)),r.a.createElement(U.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(gt.a,{dense:!0,onClick:this.enterFolder},r.a.createElement(Kt,null,r.a.createElement(Ft.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u8fdb\u5165")),n&&r.a.createElement(G.a,{className:t.divider})),!this.props.isMultiple&&this.props.withFile&&(!this.props.share||this.props.share.preview)&&Object(Gt.i)(this.props.selected[0].name)&&r.a.createElement("div",null,r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openPreview()}},r.a.createElement(Kt,null,r.a.createElement(zt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u6253\u5f00"))),!this.props.isMultiple&&this.props.withFile&&r.a.createElement("div",null,r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.openDownload(e.props.share)}},r.a.createElement(Kt,null,r.a.createElement(yt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u4e0b\u8f7d")),n&&r.a.createElement(G.a,{className:t.divider})),(this.props.isMultiple||this.props.withFolder)&&r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.openArchiveDownload()}},r.a.createElement(Kt,null,r.a.createElement(yt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u6253\u5305\u4e0b\u8f7d")),n&&a.group.sourceBatch>0&&this.props.withSourceEnabled&&r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.batchGetSource()}},r.a.createElement(Kt,null,r.a.createElement(At.a,null)),r.a.createElement(U.a,{variant:"inherit"},this.props.isMultiple||this.props.withFolder&&!this.props.withFile?"\u6279\u91cf\u83b7\u53d6\u5916\u94fe":"\u83b7\u53d6\u5916\u94fe")),!this.props.isMultiple&&n&&a.group.allowRemoteDownload&&this.props.withFile&&Object(Gt.j)(this.props.selected[0].name)&&r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openTorrentDownloadDialog()}},r.a.createElement(Kt,null,r.a.createElement(Ht.D,null)),r.a.createElement(U.a,{variant:"inherit"},"\u521b\u5efa\u79bb\u7ebf\u4e0b\u8f7d\u4efb\u52a1")),!this.props.isMultiple&&n&&a.group.compress&&this.props.withFile&&Object(Gt.h)(this.props.selected[0].name)&&r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openDecompressDialog()}},r.a.createElement(Kt,null,r.a.createElement(Et.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u89e3\u538b\u7f29")),n&&a.group.compress&&r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openCompressDialog()}},r.a.createElement(Kt,null,r.a.createElement(vt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u521b\u5efa\u538b\u7f29\u6587\u4ef6")),!this.props.isMultiple&&n&&r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openShareDialog()}},r.a.createElement(Kt,null,r.a.createElement(Bt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u521b\u5efa\u5206\u4eab\u94fe\u63a5")),!this.props.isMultiple&&n&&r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.toggleObjectInfoSidebar(!0)}},r.a.createElement(Kt,null,r.a.createElement(Ot.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u8be6\u7ec6\u4fe1\u606f")),!this.props.isMultiple&&n&&r.a.createElement(G.a,{className:t.divider}),!this.props.isMultiple&&n&&r.a.createElement("div",null,r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openRenameDialog()}},r.a.createElement(Kt,null,r.a.createElement(kt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u91cd\u547d\u540d")),!this.props.search&&r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openCopyDialog()}},r.a.createElement(Kt,null,r.a.createElement(Rt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u590d\u5236"))),n&&r.a.createElement("div",null,!this.props.search&&r.a.createElement(gt.a,{dense:!0,onClick:function(){return e.props.openMoveDialog()}},r.a.createElement(Kt,null,r.a.createElement(_t.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u79fb\u52a8")),r.a.createElement(G.a,{className:t.divider}),r.a.createElement(gt.a,{dense:!0,className:t.propover,onClick:function(){return e.props.openRemoveDialog()}},r.a.createElement(Kt,null,r.a.createElement(Pt.a,null)),r.a.createElement(U.a,{variant:"inherit"},"\u5220\u9664"))))))}}]),a}(n.Component),Zt=Object(u.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,withSourceEnabled:e.explorer.selectProps.withSourceEnabled,path:e.navigator.path,selected:e.explorer.selected,search:e.explorer.search}}),(function(e){return{changeContextMenu:function(t,a){e(Object(re.d)(t,a))},setNavigatorLoadingStatus:function(t){e(Object(re.I)(t))},setSelectedTarget:function(t){e(Object(Yt.setSelectedTarget)(t))},navigateTo:function(t){e(Object(re.j)(t))},openCreateFolderDialog:function(){e(Object(re.o)())},openCreateFileDialog:function(){e(Object(re.n)())},openRenameDialog:function(){e(Object(re.x)())},openMoveDialog:function(){e(Object(re.s)())},openRemoveDialog:function(){e(Object(re.w)())},openShareDialog:function(){e(Object(re.z)())},showImgPreivew:function(t){e(Object(re.P)(t))},openMusicDialog:function(){e(Object(re.t)())},toggleSnackbar:function(t,a,n,r){e(Object(re.R)(t,a,n,r))},openRemoteDownloadDialog:function(){e(Object(re.v)())},openTorrentDownloadDialog:function(){e(Object(re.A)())},openCopyDialog:function(){e(Object(re.m)())},openLoadingDialog:function(t){e(Object(re.r)(t))},openDecompressDialog:function(){e(Object(re.p)())},openCompressDialog:function(){e(Object(re.l)())},refreshFileList:function(){e(Object(re.B)())},openPreview:function(t){e(Object(Yt.openPreview)(t))},toggleObjectInfoSidebar:function(t){e(Object(Yt.toggleObjectInfoSidebar)(t))},startBatchDownload:function(t){e(Object(Yt.startBatchDownload)(t))},openFileSelector:function(){e(Object(Se.d)())},openFolderSelector:function(){e(Object(Se.e)())},startDownload:function(t,a){e(Object(Yt.startDownload)(t,a))},batchGetSource:function(){e(Object(Yt.batchGetSource)())}}}))(Object(Ie.a)((function(){return{propover:{},divider:{marginTop:4,marginBottom:4}}}))(Object(s.k)(Jt))),$t=a(420),Xt=a(422),Qt=a.n(Xt),ea=a(50),ta=function(e){Object(ue.a)(a,e);var t=Object(pe.a)(a);function a(){var e;Object(ce.a)(this,a);for(var n=arguments.length,r=new Array(n),o=0;o=t.scrollHeight;e.current&&!n&&window.requestAnimationFrame(a)},r=function a(){t.scrollTop-=10,e.current&&t.scrollTop>0&&window.requestAnimationFrame(a)},o=Object(ca.throttle)((function(t){var n=t.clientY<100,o=window.innerHeight-t.clientY<100;e.current||!n&&!o?n||o||(e.current=!1):(e.current=!0,n&&window.requestAnimationFrame(r),o&&window.requestAnimationFrame(a))}),300);return{addEventListenerForWindow:function(){window.addEventListener("dragover",o,!1)},removeEventListenerForWindow:function(){window.removeEventListener("dragover",o,!1),e.current=!1}}},sa=Object(x.a)((function(){return{container:{padding:"7px"},fixFlex:{minWidth:0},dragging:{opacity:.4}}}));function ua(e){var t,a=Object(u.e)((function(e){return e.navigator.path})),o=Object(u.e)((function(e){return e.viewUpdate.shareInfo})),i=Object(u.e)((function(e){return e.explorer.selected})),c=Object(u.e)((function(e){return e.viewUpdate.explorerViewMethod})),l=Object(u.e)((function(e){return e.navigator.path})),p=Object(s.h)(),d=Object(u.d)(),m=Object(n.useCallback)((function(e,t){return d(Object(re.d)(e,t))}),[d]),h=Object(n.useCallback)((function(e){return d(Object(re.J)(e))}),[d]),f=Object(n.useCallback)((function(e){return d(Object(re.j)(e))}),[d]),g=(Object(n.useCallback)((function(e,t,a,n){return d(Object(re.R)(e,t,a,n))}),[d]),Object(n.useCallback)((function(e,t){return d(Object(re.h)(e,t))}),[d])),b=(Object(n.useCallback)((function(e){return d(Object(re.r)(e))}),[d]),Object(n.useCallback)((function(e){return d(Object(re.u)(e))}),[d])),E=Object(n.useCallback)((function(e,t){return d(E(e,t))}),[d]),v=sa(),O=function(t){"up"!==e.file.type&&(t.preventDefault(),-1===i.findIndex((function(t){return t===e.file}))&&h([e.file]),m("file",!0))},j=function(t){d(Object(re.F)(e.file,t,e.index))},k=function(){f("/"===a?a+e.file.name:a+"/"+e.file.name)},w=function(t){"up"!==e.file.type?(j(t),"dir"!==e.file.type||t.ctrlKey||t.metaKey||t.shiftKey||k()):f(Object(N.m)(l))},y=function(){"up"!==e.file.type&&("dir"!==e.file.type?b(o):k())},x=function(e){return e.stopPropagation(),e.shiftKey||(e.ctrlKey=!0),j(e),!1},C=la(),S=C.addEventListenerForWindow,T=C.removeEventListenerForWindow,P=Object(na.a)({item:{object:e.file,type:"object",selected:Object(ot.a)(i),viewMethod:c},begin:function(){S()},end:function(e,t){T();var a=t.getDropResult();e&&a&&a.folder&&(e.object.id===a.folder.id&&e.object.type===a.folder.type||g(e.object,a.folder))},canDrag:function(){return!X.a.isMobile()&&X.a.isHomePage(p.pathname)},collect:function(e){return{isDragging:e.isDragging()}}}),L=Object(I.a)(P,3),R=L[0].isDragging,D=L[1],_=L[2];return Object(n.useEffect)((function(){_(Object(ra.a)(),{captureDraggingState:!0})}),[]),"list"===c?r.a.createElement(r.a.Fragment,null,"dir"===e.file.type&&r.a.createElement(ia,{isListView:!0,pref:D,className:Pe()(v.container,Object(F.a)({},v.dragging,R)),onIconClick:x,contextMenu:O,handleClick:w,handleDoubleClick:y.bind(this),folder:e.file}),"dir"!==e.file.type&&r.a.createElement(aa,{pref:D,className:Pe()(v.container,Object(F.a)({},v.dragging,R)),onIconClick:x,contextMenu:O,handleClick:w,handleDoubleClick:y.bind(this),file:e.file})):r.a.createElement("div",{ref:D,className:Pe()((t={},Object(F.a)(t,v.container,"list"!==c),Object(F.a)(t,v.dragging,R),t))},r.a.createElement("div",{className:v.fixFlex,onContextMenu:O,onClick:w,onDoubleClick:y.bind(this)},"dir"===e.file.type&&"list"!==c&&r.a.createElement(ia,{isListView:!1,onIconClick:x,folder:e.file}),"file"===e.file.type&&"icon"===c&&r.a.createElement(Ke,{onIconClick:x,ref:D,file:e.file}),"file"===e.file.type&&"smallIcon"===c&&r.a.createElement(Ve,{onIconClick:x,file:e.file})))}var pa=a(71);var da=Object(x.a)((function(e){var t;return{paper:{padding:e.spacing(2),textAlign:"center",color:e.palette.text.secondary,margin:"10px"},root:Object(F.a)({padding:"10px"},e.breakpoints.up("sm"),{height:"calc(100vh - 113px)"}),rootTable:Object(F.a)({padding:"0px",backgroundColor:e.palette.background.paper.white},e.breakpoints.up("sm"),{height:"calc(100vh - 113px)"}),typeHeader:{margin:"10px 25px",color:"#6b6b6b",fontWeight:"500"},loading:{justifyContent:"center",display:"flex",marginTop:"40px"},errorBox:{padding:e.spacing(4)},errorMsg:{marginTop:"10px"},hideAuto:Object(F.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},gridContainer:(t={},Object(F.a)(t,e.breakpoints.down("sm"),{gridTemplateColumns:"repeat(auto-fill,minmax(180px,1fr))!important"}),Object(F.a)(t,e.breakpoints.up("md"),{gridTemplateColumns:"repeat(auto-fill,minmax(220px,1fr))!important"}),Object(F.a)(t,"display","grid!important"),t),gridItem:{flex:"1 1 220px!important"}}})),ma={DELETE_FILE:"del",SELECT_ALL_SHOWED:"".concat(Object(N.k)()?"command":"ctrl","+a"),SELECT_ALL:"".concat(Object(N.k)()?"command":"ctrl","+shift+a"),DESELECT_ALL:"esc"};function ha(e){var t,a=e.share,o=Object(s.h)(),i=Object(u.d)(),c=Object(u.e)((function(e){return e.explorer.selected})),l=Object(u.e)((function(e){return e.explorer.search})),p=Object(u.e)((function(e){return e.viewUpdate.navigatorLoading})),d=Object(u.e)((function(e){return e.navigator.path})),m=Object(u.e)((function(e){return e.viewUpdate.sortMethod})),h=Object(u.e)((function(e){return e.viewUpdate.navigatorErrorMsg})),f=Object(u.e)((function(e){return e.viewUpdate.navigatorError})),g=Object(u.e)((function(e){return e.viewUpdate.explorerViewMethod})),b=Object(n.useCallback)((function(){return i(Object(re.w)())}),[i]),E=Object(n.useCallback)((function(e){return i(Object(re.J)(e))}),[i]),v=Object(n.useCallback)((function(e,t){return i(Object(re.d)(e,t))}),[i]),O=Object(n.useCallback)((function(e){return i(re.g.actions.changeSortMethod(e))}),[i]),j=Object(n.useCallback)((function(){return i(re.g.actions.selectAll())}),[i]),k=function(){var e=Object(u.e)((function(e){return e.explorer.fileList})),t=Object(u.e)((function(e){return e.explorer.dirList})),a=Object(u.e)((function(e){return e.viewUpdate.pagination})),r=Object(n.useMemo)((function(){var n,r,o,i=(n=[].concat(Object(ot.a)(t),Object(ot.a)(e)),r=a.size,o=a.page,-1===r?n:n.slice((o-1)*r,o*r)),c=[],l=[];i.forEach((function(e){return"dir"===e.type?c.push(e):l.push(e)}));var s=a.size*(a.page-1);return{dirList:c,fileList:l,startIndex:s}}),[t,e,a]);return{dirList:r.dirList,fileList:r.fileList,startIndex:r.startIndex}}(),w=k.dirList,y=k.fileList,x=k.startIndex,C={DELETE_FILE:function(){c.length>0&&!a&&b()},SELECT_ALL_SHOWED:function(e){e.preventDefault(),c.length>=w.length+y.length?E([]):E([].concat(Object(ot.a)(w),Object(ot.a)(y)))},SELECT_ALL:function(e){e.preventDefault(),j()},DESELECT_ALL:function(e){e.preventDefault(),E([])}};Object(n.useEffect)((function(){return Object(ht.configure)({ignoreTags:["input","select","textarea"]})}),[]);var S=da(),N=X.a.isHomePage(o.pathname),T=!p&&(0!==w.length||0!==y.length),P=Object(n.useMemo)((function(){return r.a.createElement(it.a,{className:S.table},r.a.createElement(ct.a,null,r.a.createElement(lt.a,null,r.a.createElement(st.a,null,r.a.createElement(mt.a,{active:"namePos"===m||"nameRev"===m,direction:"namePos"===m?"asc":"des",onClick:function(){O("namePos"===m?"nameRev":"namePos")}},"\u540d\u79f0","namePos"===m||"nameRev"===m?r.a.createElement("span",{className:S.visuallyHidden},"nameRev"===m?"sorted descending":"sorted ascending"):null)),r.a.createElement(st.a,{className:S.hideAuto},r.a.createElement(mt.a,{active:"sizePos"===m||"sizeRes"===m,direction:"sizePos"===m?"asc":"des",onClick:function(){O("sizePos"===m?"sizeRes":"sizePos")}},"\u5927\u5c0f","sizePos"===m||"sizeRes"===m?r.a.createElement("span",{className:S.visuallyHidden},"sizeRes"===m?"sorted descending":"sorted ascending"):null)),r.a.createElement(st.a,{className:S.hideAuto},r.a.createElement(mt.a,{active:"modifyTimePos"===m||"modifyTimeRev"===m,direction:"modifyTimePos"===m?"asc":"des",onClick:function(){O("modifyTimePos"===m?"modifyTimeRev":"modifyTimePos")}},"\u4fee\u6539\u65e5\u671f","modifyTimePos"===m||"modifyTimeRev"===m?r.a.createElement("span",{className:S.visuallyHidden},"sizeRes"===m?"sorted descending":"sorted ascending"):null)))),r.a.createElement(ut.a,null,X.a.isMobile()&&"/"!==d&&r.a.createElement(ua,{file:{type:"up",name:"\u4e0a\u7ea7\u76ee\u5f55"}}),w.map((function(e,t){return r.a.createElement(ua,{key:e.id,file:e,index:x+t})})),y.map((function(e,t){return r.a.createElement(ua,{key:e.id,file:e,index:x+w.length+t})}))))}),[w,y,d,m,O]),L=Object(n.useMemo)((function(){return r.a.createElement("div",{className:S.flexFix},0!==w.length&&r.a.createElement(r.a.Fragment,null,r.a.createElement(U.a,{"data-clickAway":"true",variant:"body2",className:S.typeHeader},"\u6587\u4ef6\u5939"),r.a.createElement(pt.a,{"data-clickAway":"true",container:!0,spacing:0,alignItems:"flex-start",className:S.gridContainer},w.map((function(e,t){return r.a.createElement(pt.a,{key:e.id,item:!0,className:S.gridItem},r.a.createElement(ua,{key:e.id,file:e,index:x+t}))})))),0!==y.length&&r.a.createElement(r.a.Fragment,null,r.a.createElement(U.a,{"data-clickAway":"true",variant:"body2",className:S.typeHeader},"\u6587\u4ef6"),r.a.createElement(pt.a,{"data-clickAway":"true",container:!0,spacing:0,alignItems:"flex-start",className:S.gridContainer},y.map((function(e,t){return r.a.createElement(pt.a,{className:S.gridItem,key:e.id,item:!0},r.a.createElement(ua,{key:e.id,index:x+w.length+t,file:e}))})))))}),[w,y,S]),R="list"===g?P:L;return r.a.createElement("div",{onContextMenu:function(e){e.preventDefault(),l||X.a.isSharePage(o.pathname)||p||v("empty",!0)},onClick:function(e){e.target.dataset.clickaway&&E([])},className:Pe()((t={},Object(F.a)(t,S.root,"list"!==g),Object(F.a)(t,S.rootTable,"list"===g),Object(F.a)(t,S.rootShare,a),t),S.button)},r.a.createElement(ht.GlobalHotKeys,{handlers:C,allowChanges:!0,keyMap:ma}),r.a.createElement(Zt,{share:a}),r.a.createElement($t.default,null),f&&r.a.createElement(M.a,{elevation:1,className:S.errorBox},r.a.createElement(U.a,{variant:"h5",component:"h3"},":( \u8bf7\u6c42\u65f6\u51fa\u73b0\u9519\u8bef"),r.a.createElement(U.a,{color:"textSecondary",className:S.errorMsg},h.message)),p&&!f&&r.a.createElement("div",{className:S.loading},r.a.createElement(dt.a,null)),!l&&N&&0===w.length&&0===y.length&&!p&&!f&&r.a.createElement(pa.a,{primary:"\u62d6\u62fd\u6587\u4ef6\u81f3\u6b64",secondary:"\u6216\u70b9\u51fb\u53f3\u4e0b\u65b9\u201c\u4e0a\u4f20\u6587\u4ef6\u201d\u6309\u94ae\u6dfb\u52a0\u6587\u4ef6"}),(l&&0===w.length&&0===y.length&&!p&&!f||0===w.length&&0===y.length&&!p&&!f&&!N)&&r.a.createElement(pa.a,{primary:"\u4ec0\u4e48\u90fd\u6ca1\u6709\u627e\u5230"}),T&&R)}var fa=a(233),ga=a(62),ba=a.n(ga),Ea=a(428),va=a.n(Ea),Oa=a(427),ja=a.n(Oa),ka=Object(x.a)((function(e){return{expandMore:{color:"#8d8d8d"},active:{boxShadow:"0 0 0 2px "+e.palette.primary.light},button:{textTransform:"none"}}}));function wa(e){var t=r.a.useRef(null),a=Object(oa.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(I.a)(a,2),i=o[0],c=i.canDrop,l=i.isOver,s=o[1],u=c&&l;Object(n.useEffect)((function(){e.more&&u&&t.current.click()}),[u]);var p=ka();return r.a.createElement("span",{onClick:e.onClick,ref:t},r.a.createElement(H.a,{ref:s,className:Pe()(Object(F.a)({},p.active,u),p.button),component:"span",title:e.title},e.more&&r.a.createElement(ja.a,null),!e.more&&r.a.createElement(r.a.Fragment,null,e.folder,e.last&&r.a.createElement(va.a,{className:p.expandMore}))))}var ya=a(63),xa=Object(x.a)((function(e){return{active:{border:"2px solid "+e.palette.primary.light}}}));function Ca(e){var t=Object(oa.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(I.a)(t,2),o=a[0],i=o.canDrop,c=o.isOver,l=a[1],s=i&&c;Object(n.useEffect)((function(){e.setActiveStatus(e.id,s)}),[s]);var u=xa();return r.a.createElement(gt.a,{ref:l,className:Pe()(Object(F.a)({},u.active,s)),onClick:function(t){return e.navigateTo(t,e.id)}},r.a.createElement(ft.a,null,r.a.createElement(Ze.a,null)),r.a.createElement(ya.a,{primary:e.folder}))}function Sa(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;Object(Ta.a)(t,n.props.share,n.search?n.search.keywords:"",n.search?n.search.searchPath:"").then((function(e){n.currentID=e.data.parent,n.props.updateFileList(e.data.objects),n.props.setNavigatorLoadingStatus(!1),n.search||Object(N.o)("path",encodeURIComponent(t)),e.data.policy&&n.props.setCurrentPolicy({id:e.data.policy.id,name:e.data.policy.name,type:e.data.policy.type,maxSize:e.data.policy.max_size,allowedSuffix:e.data.policy.file_type})})).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.search!==e.search&&(n.search=e.search),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.offsetHeight1&&!c?r.a.createElement(r.a.Fragment,null,!h&&!f&&r.a.createElement("div",{className:e.placeholder}),r.a.createElement($a.a,{enable:!0,element:h||f?null:document.querySelector("#explorer-container")},r.a.createElement("div",{className:e.root},r.a.createElement(Ka.a,{renderItem:function(e){return r.a.createElement(Za,Object.assign({count:d,isMobile:h},e))},color:"secondary",count:d,page:i.page,onChange:function(e,t){p(Object(m.a)(Object(m.a)({},i),{},{page:t}))}})))):r.a.createElement("div",null)}var en=a(67),tn=a.n(en),an=function(e){Object(ue.a)(a,e);var t=Object(pe.a)(a);function a(e){var n;return Object(ce.a)(this,a),(n=t.call(this,e)).image=r.a.createRef(),n}return Object(le.a)(a,[{key:"componentWillUnmount",value:function(){this.props.setSelectedTarget([]),this.props.closeAllModals(),this.props.navigateTo("/")}},{key:"componentDidMount",value:function(){X.a.isHomePage(this.props.location.pathname)&&this.props.changeSubTitle(null)}},{key:"render",value:function(){var e,t=this.props.classes;return r.a.createElement("div",{className:Pe()((e={},Object(F.a)(e,t.rootShare,this.props.share),Object(F.a)(e,t.root,!this.props.share),e))},r.a.createElement(xe.a,{backend:Ce.a},r.a.createElement(fa.default,{share:this.props.share}),r.a.createElement(La,{isShare:this.props.isShare,share:this.props.share}),r.a.createElement("div",{className:t.explorer,id:"explorer-container"},r.a.createElement(ha,{share:this.props.share}),r.a.createElement(Qa,null)),r.a.createElement(rt,null)),r.a.createElement(Ya,null))}}]),a}(n.Component),nn=Object(u.c)((function(){return{}}),(function(e){return{changeSubTitle:function(t){e(Object(Se.b)(t))},setSelectedTarget:function(t){e(Object(re.J)(t))},toggleSnackbar:function(t,a,n,r){e(Object(re.R)(t,a,n,r))},closeAllModals:function(){e(Object(re.f)())},navigateTo:function(t){e(Object(re.j)(t))}}}))(tn()((function(e){return{root:Object(F.a)({display:"flex",flexDirection:"column",height:"calc(100vh - 64px)"},e.breakpoints.down("xs"),{height:"100%"}),rootShare:{display:"flex",flexDirection:"column",height:"100%",minHeight:500},explorer:{display:"flex",flexDirection:"column",overflowY:"auto",minHeight:500}}}))(Object(s.k)(an))),rn=a(97),on=a(7118),cn=a(7119),ln=a(7120),sn=a(112),un=a(7096),pn=a(104),dn=a.n(pn),mn=Object(x.a)((function(e){return{icon:{minWidth:38}}}));function hn(e){var t=e.options,a=e.anchorEl,n=e.handleClose,o=e.callback,i=e.selected,c=e.showIcon,l=void 0===c||c,s=mn();return r.a.createElement(bt.a,{id:"simple-menu",anchorEl:a,keepMounted:!0,open:Boolean(a),onClose:n},t.map((function(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(gt.a,{style:{whiteSpace:"normal"},dense:!0,onClick:function(){return o(e)}},l&&r.a.createElement(ft.a,{className:s.icon},e.name!==i?r.a.createElement(un.a,null):r.a.createElement(dn.a,null)),e.name))})))}var fn=a(155),gn=r.a.lazy((function(){return a.e(10).then(a.bind(null,8070))})),bn=[{name:"PotPlayer",url:function(e,t){return"potplayer://".concat(e)}},{name:"VLC",url:function(e,t){return"vlc://".concat(e)}},{name:"IINA",url:function(e,t){return"iina://weblink?url=".concat(e)}},{name:"nPlayer",url:function(e,t){return"nplayer-".concat(e)}},{name:"MXPlayer (Free)",url:function(e,t){return"intent:".concat(e,"#Intent;package=com.mxtech.videoplayer.ad;S.title=").concat(t,";end")}},{name:"MXPlayer (Pro)",url:function(e,t){return"intent:".concat(e,"#Intent;package=com.mxtech.videoplayer.pro;S.title=").concat(t,";end")}}],En=Object(x.a)((function(e){var t;return{layout:(t={width:"auto",marginTop:"30px",marginLeft:e.spacing(3),marginRight:e.spacing(3)},Object(F.a)(t,e.breakpoints.up(1100+2*e.spacing(3)),{width:1100,marginLeft:"auto",marginRight:"auto"}),Object(F.a)(t,"marginBottom",50),t),player:{borderRadius:"4px",height:600},actions:{marginTop:e.spacing(2)},actionButton:{marginRight:e.spacing(1),marginTop:e.spacing(1)}}}));function vn(){var e=Object(s.j)(),t=Object(s.h)(),a=new URLSearchParams(Object(s.h)().search),o=Object(s.i)().id,i=Object(u.d)(),c=Object(n.useCallback)((function(e,t,a,n){return i(Object(re.R)(e,t,a,n))}),[i]),l=Object(rn.a)(a,e,t),p=l.title,d=l.path,m=Object(Ma.a)(),h=Object(n.useState)(null),f=Object(I.a)(h,2),g=f[0],b=f[1],E=Object(s.g)(),v=Object(n.useState)([]),O=Object(I.a)(v,2),j=O[0],k=O[1],w=Object(n.useState)([]),y=Object(I.a)(w,2),x=y[0],C=y[1],S=Object(n.useState)([]),T=Object(I.a)(S,2),P=T[0],L=T[1],R=Object(n.useState)(null),F=Object(I.a)(R,2),D=F[0],_=F[1],A=Object(n.useState)(""),U=Object(I.a)(A,2),z=U[0],W=U[1],B=Object(n.useState)(null),G=Object(I.a)(B,2),V=G[0],q=G[1],K=Object(n.useState)(null),J=Object(I.a)(K,2),Z=J[0],$=J[1],Q=X.a.isSharePage(t.pathname);Object(n.useEffect)((function(){return g&&g.on("ready",(function(){g.autoHeight=!0})),function(){null!==g&&!Object(N.l)()&&document.pictureInPictureEnabled&&g.playing&&(g.pip=!0,g.query(".art-video").addEventListener("leavepictureinpicture",(function(){g.pause()}),!1))}}),[g]);var ee=En();Object(n.useEffect)((function(){if(null!==g){var e=Object(Y.d)(Q,o,a.get("id"),a.get("share_path"));e!==g.url&&(g.subtitle&&(g.subtitle.show=!1),g.switchUrl(e),d&&""!==d&&Object(Ta.a)(Object(N.a)(d),Q?{key:o}:null,"","").then((function(e){k(e.data.objects.filter((function(e){return"file"===e.type}))),L(e.data.objects.filter((function(e){return"file"===e.type&&-1!==Gt.n.indexOf(e.name.split(".").pop().toLowerCase())})))})))}}),[g,o,t,d]);var te=function(e){if(null!==g){var t=e.name.split(".").pop().toLowerCase();g.subtitle.switch(Object(Y.d)(Q,o,e.id,Object(We.k)([Object(N.a)(a.get("share_path")),e.name])),{type:t}),g.subtitle.show=!0,W(e.name),c("top","center","\u5b57\u5e55\u5207\u6362\u5230\uff1a".concat(e.name," "),"info")}};Object(n.useEffect)((function(){if(j.length>0){var e=j.filter((function(e){var t=e.name.split(".").pop().toLowerCase();return-1!==Gt.m.indexOf(t)&&(Object(N.e)(e.name)===Object(N.e)(p)&&te(e),!0)}));C(e)}}),[j]);return r.a.createElement("div",{className:ee.layout},r.a.createElement(M.a,{className:ee.root,elevation:1},r.a.createElement(n.Suspense,{fallback:r.a.createElement(sn.a,null)},r.a.createElement(gn,{option:{title:p,theme:m.palette.secondary.main,flip:!0,setting:!0,playbackRate:!0,aspectRatio:!0,hotkey:!0,pip:!0,fullscreen:!0,fullscreenWeb:!0,autoHeight:!0,whitelist:["*"],moreVideoAttr:{"webkit-playsinline":!0,playsInline:!0}},className:ee.player,getInstance:function(e){return b(e)}}))),r.a.createElement("div",{className:ee.actions},r.a.createElement(H.a,{onClick:function(e){0!==x.length?_(e.currentTarget):c("top","right","\u89c6\u9891\u76ee\u5f55\u4e0b\u6ca1\u6709\u53ef\u7528\u5b57\u5e55\u6587\u4ef6 (\u652f\u6301\uff1aASS/SRT/VTT)","warning")},className:ee.actionButton,startIcon:r.a.createElement(on.a,null),variant:"outlined"},"\u9009\u62e9\u5b57\u5e55"),P.length>=2&&r.a.createElement(H.a,{onClick:function(e){return q(e.currentTarget)},className:ee.actionButton,startIcon:r.a.createElement(cn.a,null),variant:"outlined"},"\u64ad\u653e\u5217\u8868"),r.a.createElement(H.a,{onClick:function(e){return $(e.currentTarget)},className:ee.actionButton,startIcon:r.a.createElement(ln.a,null),variant:"outlined"},"\u7528\u5916\u90e8\u64ad\u653e\u5668\u6253\u5f00")),r.a.createElement(hn,{selected:z,options:x,callback:function(e){_(null),te(e)},anchorEl:D,handleClose:function(){return _(null)}}),r.a.createElement(hn,{selected:p,options:P,callback:function(e){Q&&(e.key=o),Object(N.l)()?window.location.href=Object(Yt.getViewerURL)("video",e,Q):E.push(Object(Yt.getViewerURL)("video",e,Q))},anchorEl:V,handleClose:function(){return q(null)}}),r.a.createElement(hn,{showIcon:!1,options:bn,callback:function(e){var t={name:p};t.id=a.get("id"),t.path=Object(N.a)(d),Q&&(t.key=o),$(null),Object(fn.a)(t).then((function(t){window.location.assign(e.url(t.data,p))})).catch((function(e){c("top","right",e.message,"error")}))},anchorEl:Z,handleClose:function(){return $(null)}}))}var On=a(7121),jn=a(7122),kn=a(462),wn=Object(x.a)((function(e){return{cardContainer:{padding:e.spacing(1)},card:{maxWidth:400,margin:"0 auto"},actions:{display:"flex"},layout:Object(F.a)({width:"auto",marginTop:"50px",marginLeft:e.spacing(3),marginRight:e.spacing(3)},e.breakpoints.up(1100+2*e.spacing(3)),{width:1100,marginLeft:"auto",marginRight:"auto"}),shareTitle:{maxWidth:"200px"},avatarFile:{backgroundColor:e.palette.primary.light},avatarFolder:{backgroundColor:e.palette.secondary.light},gird:{marginTop:"30px"},loadMore:{textAlign:"right",marginTop:"20px",marginBottom:"40px"},badge:{marginLeft:e.spacing(1),height:17},orderSelect:{textAlign:"right",marginTop:5}}}));function yn(){var e=wn(),t=Object(u.d)(),a=new URLSearchParams(Object(s.h)().search),o=Object(s.h)(),i=Object(s.g)(),c=Object(n.useCallback)((function(e,a,n,r){return t(Object(re.R)(e,a,n,r))}),[t]),l=Object(n.useState)(1),p=Object(I.a)(l,2),d=p[0],m=p[1],h=Object(n.useState)(0),f=Object(I.a)(h,2),g=f[0],b=f[1],E=Object(n.useState)([]),v=Object(I.a)(E,2),O=v[0],j=v[1],k=Object(n.useState)("created_at DESC"),w=Object(I.a)(k,2),y=w[0],x=w[1],C=Object(n.useCallback)((function(e,t,a){var n=a.split(" ");Y.b.get("/share/search?page="+t+"&order_by="+n[0]+"&order="+n[1]+"&keywords="+encodeURIComponent(e)).then((function(e){b(e.data.total),j(e.data.items)})).catch((function(){c("top","right","\u52a0\u8f7d\u5931\u8d25","error")}))}),[]);Object(n.useEffect)((function(){var e=a.get("keywords");e?C(e,d,y):c("top","right","\u8bf7\u8f93\u5165\u641c\u7d22\u5173\u952e\u8bcd","warning")}),[o]);return r.a.createElement("div",{className:e.layout},r.a.createElement(pt.a,{container:!0},r.a.createElement(pt.a,{sm:6,xs:6},r.a.createElement(U.a,{color:"textSecondary",variant:"h4"},"\u641c\u7d22\u7ed3\u679c")),r.a.createElement(pt.a,{sm:6,xs:6,className:e.orderSelect},r.a.createElement(z.a,null,r.a.createElement(kn.a,{color:"secondary",onChange:function(e){x(e.target.value);var t=a.get("keywords");C(t,d,e.target.value)},value:y},r.a.createElement(gt.a,{value:"created_at DESC"},"\u521b\u5efa\u65e5\u671f\u7531\u665a\u5230\u65e9"),r.a.createElement(gt.a,{value:"created_at ASC"},"\u521b\u5efa\u65e5\u671f\u7531\u65e9\u5230\u665a"),r.a.createElement(gt.a,{value:"downloads DESC"},"\u4e0b\u8f7d\u6b21\u6570\u7531\u5927\u5230\u5c0f"),r.a.createElement(gt.a,{value:"downloads ASC"},"\u4e0b\u8f7d\u6b21\u6570\u7531\u5c0f\u5230\u5927"),r.a.createElement(gt.a,{value:"views DESC"},"\u6d4f\u89c8\u6b21\u6570\u7531\u5927\u5230\u5c0f"),r.a.createElement(gt.a,{value:"views ASC"},"\u6d4f\u89c8\u6b21\u6570\u7531\u5c0f\u5230\u5927"))))),r.a.createElement(pt.a,{container:!0,spacing:24,className:e.gird},0===O.length&&r.a.createElement(pa.a,{primary:"\u6ca1\u6709\u5206\u4eab\u8bb0\u5f55"}),O.map((function(t){return r.a.createElement(pt.a,{item:!0,xs:12,sm:4,key:t.id,className:e.cardContainer},r.a.createElement(On.a,{className:e.card},r.a.createElement(jn.a,{avatar:r.a.createElement("div",null,!t.is_dir&&r.a.createElement(Fe.a,{fileName:t.source?t.source.name:"",isUpload:!0})," ",t.is_dir&&r.a.createElement(A.a,{className:e.avatarFolder},r.a.createElement(Ze.a,null))),action:r.a.createElement(Re.a,{placement:"top",title:"\u6253\u5f00"},r.a.createElement(Da.a,{onClick:function(){return i.push("/s/"+t.key)}},r.a.createElement(zt.a,null))),title:r.a.createElement(Re.a,{placement:"top",title:t.source?t.source.name:"[\u539f\u59cb\u5bf9\u8c61\u4e0d\u5b58\u5728]"},r.a.createElement(U.a,{noWrap:!0,className:e.shareTitle},t.source?t.source.name:"[\u539f\u59cb\u5bf9\u8c61\u4e0d\u5b58\u5728]"," ")),subheader:r.a.createElement("span",null,"\u5206\u4eab\u4e8e"," ",r.a.createElement(_a.a,{datetime:t.create_date,locale:"zh_CN"}))})))}))),r.a.createElement("div",{className:e.loadMore},r.a.createElement(Ka.a,{count:Math.ceil(g/18),onChange:function(e,t){m(t);var n=a.get("keywords");C(n,t,y)},color:"secondary"}))," ")}var xn=a(140),Cn=a.n(xn),Sn=a(429),Nn=a.n(Sn),Tn=a(430),Pn=a.n(Tn),Ln=a(7123),Rn=a(7092),In=a(7093),Fn=a(7116),Dn=a(7094),_n=a(7151),Mn=a(7115),An=a(229),Un=a.n(An),zn=function(e){Object(ue.a)(a,e);var t=Object(pe.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("span",null,M(g.downloaded,g.total).toFixed(2),"% -"," ",0===g.downloaded?"0Bytes":Object(N.p)(g.downloaded),"/",0===g.total?"0Bytes":Object(N.p)(g.total)," ","-"," ","0"===g.speed?"0B/s":Object(N.p)(g.speed)+"/s"),0===g.total&&r.a.createElement("span",null," - "))),r.a.createElement(Bn.a,{className:a.contentSide},r.a.createElement(Da.a,null,r.a.createElement(Kn.a,{className:Pe()(Object(F.a)({},a.expanded,p===g.info.gid),a.expand)})))),r.a.createElement(or,null,r.a.createElement(G.a,null),"multi"===g.info.bittorrent.mode&&r.a.createElement("div",{className:a.scroll},r.a.createElement(it.a,{size:"small"},r.a.createElement(ut.a,null,A().map((function(e){return r.a.createElement(lt.a,{key:e.index,style:{background:"linear-gradient(to right, "+("dark"===o.palette.type?Object(y.a)(o.palette.primary.main,.4):Object(y.i)(o.palette.primary.main,.85))+" 0%,"+("dark"===o.palette.type?Object(y.a)(o.palette.primary.main,.4):Object(y.i)(o.palette.primary.main,.85))+" "+M(e.completedLength,e.length).toFixed(0)+"%,"+o.palette.background.paper+" "+M(e.completedLength,e.length).toFixed(0)+"%,"+o.palette.background.paper+" 100%)"}},r.a.createElement(st.a,{component:"th",scope:"row"},r.a.createElement(U.a,{className:a.subFileName},r.a.createElement(Fe.a,{className:a.subFileIcon,fileName:e.path}),e.path)),r.a.createElement(st.a,{component:"th",scope:"row"},r.a.createElement(U.a,{noWrap:!0}," ",Object(N.p)(e.length))),r.a.createElement(st.a,{component:"th",scope:"row"},r.a.createElement(U.a,{noWrap:!0},M(e.completedLength,e.length).toFixed(2),"%")),r.a.createElement(st.a,null,r.a.createElement(Re.a,{title:"\u5220\u9664\u6b64\u6587\u4ef6"},r.a.createElement(Da.a,{onClick:function(){return function(e){j(!0);var t=A(),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"}))})),Y.b.put("/aria2/select/"+g.info.gid,{indexes:a}).then((function(){b(Object(m.a)(Object(m.a)({},g),{},{info:Object(m.a)(Object(m.a)({},g.info),{},{files:n})})),D("top","right","\u6587\u4ef6\u5df2\u5220\u9664","success")})).catch((function(e){D("top","right",e.message,"error")})).then((function(){j(!1)}))}(e.index)},disabled:O,size:"small"},r.a.createElement(Jn.a,null)))))}))))),r.a.createElement("div",{className:a.action},r.a.createElement(H.a,{className:a.actionButton,variant:"outlined",color:"secondary",onClick:function(){return i.push("/home?path="+encodeURIComponent(g.dst))}},"\u6253\u5f00\u5b58\u653e\u76ee\u5f55"),"multi"===g.info.bittorrent.mode&&r.a.createElement(H.a,{className:a.actionButton,variant:"outlined",color:"secondary",disabled:O,onClick:function(){C(!0),L(Object(ot.a)(e.task.info.files))}},"\u9009\u62e9\u8981\u4e0b\u8f7d\u7684\u6587\u4ef6"),r.a.createElement(H.a,{className:a.actionButton,onClick:function(){j(!0),Y.b.delete("/aria2/task/"+g.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(){j(!1)}))},variant:"contained",color:"secondary",disabled:O},"\u53d6\u6d88\u4efb\u52a1")),r.a.createElement(G.a,null),r.a.createElement("div",{className:a.info},""!==g.info.bitfield&&r.a.createElement("canvas",{width:"700",height:"100",ref:t,className:a.bitmap}),r.a.createElement(pt.a,{container:!0},r.a.createElement(pt.a,{container:!0,xs:12,sm:4},r.a.createElement(pt.a,{item:!0,xs:4,className:a.infoTitle},"\u66f4\u65b0\u4e8e\uff1a"),r.a.createElement(pt.a,{item:!0,xs:8,className:a.infoValue},r.a.createElement(_a.a,{datetime:g.update,locale:"zh_CN"}))),r.a.createElement(pt.a,{container:!0,xs:12,sm:4},r.a.createElement(pt.a,{item:!0,xs:4,className:a.infoTitle},"\u4e0a\u4f20\u5927\u5c0f\uff1a"),r.a.createElement(pt.a,{item:!0,xs:8,className:a.infoValue},Object(N.p)(g.info.uploadLength))),r.a.createElement(pt.a,{container:!0,xs:12,sm:4},r.a.createElement(pt.a,{item:!0,xs:4,className:a.infoTitle},"\u4e0a\u4f20\u901f\u5ea6\uff1a"),r.a.createElement(pt.a,{item:!0,xs:8,className:a.infoValue},Object(N.p)(g.info.uploadSpeed)," / s")),""!==g.info.bittorrent.mode&&r.a.createElement(r.a.Fragment,null,r.a.createElement(pt.a,{container:!0,xs:12,sm:8},r.a.createElement(pt.a,{item:!0,sm:2,xs:4,className:a.infoTitle},"InfoHash\uff1a"),r.a.createElement(pt.a,{item:!0,sm:10,xs:8,style:{wordBreak:"break-all"},className:a.infoValue},g.info.infoHash)),r.a.createElement(pt.a,{container:!0,xs:12,sm:4},r.a.createElement(pt.a,{item:!0,xs:4,className:a.infoTitle},"\u505a\u79cd\u8005\uff1a"),r.a.createElement(pt.a,{item:!0,xs:8,className:a.infoValue},g.info.numSeeders)),r.a.createElement(pt.a,{container:!0,xs:12,sm:4},r.a.createElement(pt.a,{item:!0,xs:4,className:a.infoTitle},"\u505a\u79cd\u4e2d\uff1a"),r.a.createElement(pt.a,{item:!0,xs:8,className:a.infoValue},"true"===g.info.seeder?"\u662f":"\u5426"))),r.a.createElement(pt.a,{container:!0,xs:12,sm:4},r.a.createElement(pt.a,{item:!0,xs:4,className:a.infoTitle},"\u5206\u7247\u5927\u5c0f\uff1a"),r.a.createElement(pt.a,{item:!0,xs:8,className:a.infoValue},Object(N.p)(g.info.pieceLength))),r.a.createElement(pt.a,{container:!0,xs:12,sm:4},r.a.createElement(pt.a,{item:!0,xs:4,className:a.infoTitle},"\u5206\u7247\u6570\u91cf\uff1a"),r.a.createElement(pt.a,{item:!0,xs:8,className:a.infoValue},g.info.numPieces)))))))}var lr=tn()({root:{maxWidth:"100%",boxShadow:"none","&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&$expanded":{}},expanded:{}})(Vn.a),sr=tn()({root:{minHeight:0,padding:0,"&$expanded":{minHeight:56}},content:{maxWidth:"100%",margin:0,display:"flex","&$expanded":{margin:"0"}},expanded:{}})(Yn.a),ur=tn()((function(e){return{root:{display:"block",padding:e.spacing(0)}}}))(qn.a),pr=Object(x.a)((function(e){var t;return{card:{marginTop:"20px",justifyContent:"space-between"},iconContainer:Object(F.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(F.a)(t,e.breakpoints.up("sm"),{borderInlineStart:"1px "+e.palette.divider+" solid"}),Object(F.a)(t,"textAlign","left"),t),contentSide:Object(F.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 dr(e){var t=pr(),a=Object(Ma.a)(),o=Object(s.g)(),i=r.a.useState(!1),c=Object(I.a)(i,2),l=c[0],p=c[1],d=r.a.useState(!1),m=Object(I.a)(d,2),h=m[0],f=m[1],g=Object(u.d)(),b=Object(n.useCallback)((function(e,t,a,n){return g(Object(re.R)(e,t,a,n))}),[g]),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(Gn.a,{badgeContent:v().length,color:"secondary"},r.a.createElement($n.a,{className:t.iconMultiple})):r.a.createElement(Fe.a,{className:t.iconBig,fileName:E(e.task)})}),[e.task,t]);return r.a.createElement(On.a,{className:t.card},r.a.createElement(lr,{square:!0,expanded:l,onChange:function(e,t){p(!!t)}},r.a.createElement(sr,{"aria-controls":"panel1d-content",id:"panel1d-header"},r.a.createElement("div",{className:t.iconContainer},O()),r.a.createElement(Bn.a,{className:t.content},r.a.createElement(U.a,{color:"primary",noWrap:!0},r.a.createElement(Re.a,{title:E()},r.a.createElement("span",null,E()))),3===e.task.status&&r.a.createElement(Re.a,{title:e.task.error},r.a.createElement(U.a,{variant:"body2",color:"error",noWrap:!0},"\u4e0b\u8f7d\u51fa\u9519\uff1a",e.task.error)),5===e.task.status&&r.a.createElement(U.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(U.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(U.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(U.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(U.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(Bn.a,{className:t.contentSide},r.a.createElement(Da.a,null,r.a.createElement(Kn.a,{className:Pe()(Object(F.a)({},t.expanded,l),t.expand)})))),r.a.createElement(ur,null,r.a.createElement(G.a,null),e.task.files.length>1&&r.a.createElement("div",{className:t.scroll},r.a.createElement(it.a,null,r.a.createElement(ut.a,null,v().map((function(e){return r.a.createElement(lt.a,{key:e.index},r.a.createElement(st.a,{component:"th",scope:"row"},r.a.createElement(U.a,{className:t.subFileName},r.a.createElement(Fe.a,{className:t.subFileIcon,fileName:e.path}),e.path)),r.a.createElement(st.a,{component:"th",scope:"row"},r.a.createElement(U.a,{noWrap:!0}," ",Object(N.p)(e.length))),r.a.createElement(st.a,{component:"th",scope:"row"},r.a.createElement(U.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(H.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(H.a,{className:t.actionButton,onClick:function(){f(!0),Y.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(G.a,null),r.a.createElement("div",{className:t.info},r.a.createElement(pt.a,{container:!0},r.a.createElement(pt.a,{container:!0,xs:12,sm:6},r.a.createElement(pt.a,{item:!0,xs:4,className:t.infoTitle},"\u521b\u5efa\u65e5\u671f\uff1a"),r.a.createElement(pt.a,{item:!0,xs:8,className:t.infoValue},Object(ea.a)(e.task.create,"YYYY-MM-DD H:mm:ss"))),r.a.createElement(pt.a,{container:!0,xs:12,sm:6},r.a.createElement(pt.a,{item:!0,xs:4,className:t.infoTitle},"\u6700\u540e\u66f4\u65b0\uff1a"),r.a.createElement(pt.a,{item:!0,xs:8,className:t.infoValue},Object(ea.a)(e.task.update,"YYYY-MM-DD H:mm:ss"))))))))}var mr=a(268),hr=a(7128),fr=Object(x.a)((function(){return{fab:{margin:0,top:"auto",right:20,bottom:20,left:"auto",zIndex:5,position:"fixed"}}}));function gr(){var e=fr(),t=Object(u.d)(),a=Object(n.useCallback)((function(){return t(Object(re.v)())}),[t]);return r.a.createElement(r.a.Fragment,null,r.a.createElement(fa.default,null),r.a.createElement($a.a,{enable:!0},r.a.createElement(mr.a,{className:e.fab,color:"secondary",onClick:function(){return a()}},r.a.createElement(hr.a,null))))}var br=function(e){Object(ue.a)(a,e);var t=Object(pe.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.reduce((function(e,t){return e.interval0?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":Object(ea.a)(e.share.create_date,"YYYY-MM-DD H:mm:ss")))}Object(N.q)();var Cr=r.a.lazy((function(){return Promise.resolve().then(a.bind(null,233))})),Sr=r.a.lazy((function(){return Promise.resolve().then(a.bind(null,420))})),Nr=function(e){Object(ue.a)(a,e);var t=Object(pe.a)(a);function a(){var e;Object(ce.a)(this,a);for(var n=arguments.length,r=new Array(n),o=0;o=3&&(t=0),e.setState({looptype:t})},e.loopnext=function(){var t=e.state.currentIndex;if(0==e.state.looptype)(t+=1)>=e.state.items.length&&(t=0);else if(1==e.state.looptype);else if(2==e.state.looptype)if(e.state.items.length<=2)(t+=1)>=e.state.items.length&&(t=0);else for(;t==e.state.currentIndex;)t=Math.floor(Math.random()*e.state.items.length);e.state.currentIndex==t&&(e.myAudioRef.current.currentTime=0,e.play()),e.setState({currentIndex:t})},e.prev=function(){var t=e.state.currentIndex-1;t<0&&(t=e.state.items.length-1),e.setState({currentIndex:t})},e.next=function(){var t=e.state.currentIndex+1;t>=e.state.items.length&&(t=0),e.setState({currentIndex:t})},e.handleProgress=function(t,a){e.myAudioRef.current.currentTime=a},e}return Object(le.a)(a,[{key:"componentDidMount",value:function(){this.myAudioRef.current&&this.bindEvents(this.myAudioRef.current)}},{key:"componentDidUpdate",value:function(){this.myAudioRef.current&&this.bindEvents(this.myAudioRef.current)}},{key:"componentWillUnmount",value:function(){this.unbindEvents(this.myAudioRef.current)}},{key:"render",value:function(){var e,t=this,a=this.state,n=a.currentIndex,o=a.items,i=this.props,c=i.isOpen,l=i.classes;return r.a.createElement(Ba.a,{open:c,onClose:this.backgroundPlay,"aria-labelledby":"form-dialog-title",maxWidth:"xs",fullWidth:!0,keepMounted:!0},r.a.createElement(Rn.a,{id:"form-dialog-title"},"\u97f3\u9891\u64ad\u653e"),r.a.createElement(In.a,null,r.a.createElement(No.a,{className:l.list,dense:!0},o.map((function(e,a){var o="label-".concat(e.intro);return r.a.createElement(To.a,{key:e.src,dense:!0,button:!0,onClick:t.handleItemClick(a),selected:a==n},r.a.createElement(ft.a,null,a==n?r.a.createElement(pi.a,null):r.a.createElement(si.a,null)),r.a.createElement(ya.a,{id:o,primary:"".concat(e.intro)}))}))),r.a.createElement("audio",{ref:this.myAudioRef,src:null===(e=o[n])||void 0===e?void 0:e.src}),r.a.createElement("div",{style:{"padding-top":8}}),r.a.createElement(pt.a,{container:!0,spacing:2,alignItems:"center"},r.a.createElement(pt.a,{item:!0,xs:!0},r.a.createElement(ci.a,{classes:{root:l.slider_root},value:this.state.currentTime,onChange:this.handleProgress,step:1,min:0,max:this.state.duration,"aria-labelledby":"continuous-slider"})),r.a.createElement(pt.a,{item:!0},this.state.progressText)),r.a.createElement(pt.a,{container:!0,spacing:2,justifyContent:"center",justify:"center"},r.a.createElement(pt.a,{item:!0},r.a.createElement(Da.a,{edge:"end","aria-label":"",onClick:this.changeLoopType},0==this.state.looptype?r.a.createElement(Ei.a,null):1==this.state.looptype?r.a.createElement(vi.a,null):r.a.createElement(Oi.a,null))),r.a.createElement(pt.a,{item:!0},r.a.createElement(Da.a,{edge:"end","aria-label":"",onClick:this.prev},r.a.createElement(fi.a,null))),r.a.createElement(pt.a,{item:!0},r.a.createElement(Da.a,{edge:"end","aria-label":"",onClick:this.pause},r.a.createElement(bi.a,null))),r.a.createElement(pt.a,{item:!0},r.a.createElement(Da.a,{edge:"end","aria-label":"",onClick:this.play},r.a.createElement(pi.a,null))),r.a.createElement(pt.a,{item:!0},r.a.createElement(Da.a,{edge:"end","aria-label":"",onClick:this.next},r.a.createElement(mi.a,null))))),r.a.createElement(Dn.a,null,r.a.createElement(H.a,{onClick:this.handleClose},"\u9000\u51fa\u64ad\u653e"),r.a.createElement(H.a,{onClick:this.backgroundPlay},"\u540e\u53f0\u64ad\u653e")))}}]),a}(n.Component),wi=Object(u.c)((function(e){return{first:e.explorer.audioPreview.first,other:e.explorer.audioPreview.other,isOpen:e.explorer.audioPreview.isOpen,playingName:e.explorer.audioPreview.playingName}}),(function(e){return{showAudioPreview:function(t){e(Object(re.O)(t))},audioPreviewSetIsOpen:function(t){e(Object(re.b)(t))},audioPreviewSetPlaying:function(t,a){e(Object(re.c)(t,a))}}}))(Object(Ie.a)((function(e){return{list:{backgroundColor:e.palette.background.paper,position:"relative",overflow:"auto",maxHeight:300},slider_root:{"vertical-align":"middle"}}}))(Object(s.k)(ki))),yi=r.a.lazy((function(){return a.e(8).then(a.t.bind(null,7916,7)).then((function(e){return{default:e.ReactReader}}))})),xi=Object(x.a)((function(e){return{layout:{height:"calc(100vh - 64px)"},paper:{marginBottom:e.spacing(3)}}}));function Ci(){var e=Object(s.j)(),t=Object(s.h)(),a=new URLSearchParams(Object(s.h)().search),o=Object(s.i)().id,i=Object(rn.a)(a,e,t).path,c=X.a.isSharePage(t.pathname),l=Object(n.useState)(null),p=Object(I.a)(l,2),d=p[0],m=p[1],h=Object(u.d)(),f=(Object(n.useCallback)((function(e,t,a,n){return h(Object(re.R)(e,t,a,n))}),[h]),Object(n.useMemo)((function(){return Object(Y.d)(c,o,a.get("id"),a.get("share_path"))}),[o,t,i])),g=xi();return r.a.createElement("div",{className:g.layout},r.a.createElement(n.Suspense,{fallback:r.a.createElement(sn.a,null)},r.a.createElement(yi,{location:d,locationChanged:function(e){m(e)},epubInitOptions:{openAs:"epub"},showToc:!1,className:g.container,url:f})))}var Si=r.a.lazy((function(){return Promise.all([a.e(4),a.e(9),a.e(3)]).then(a.bind(null,8069))}));function Ni(){var e=Object(u.e)((function(e){return e.siteConfig.theme})),t=Object(u.e)((function(e){return e.viewUpdate.isLogin})),a=Object(j.a)("(prefers-color-scheme: dark)"),o=Object(oe.a)().t,i=r.a.useMemo((function(){e.palette.type=a?"dark":"light";var t=f.a.GetPreference("theme_mode");t&&(e.palette.type=t);var n=Object(w.a)(Object(m.a)(Object(m.a)({},e),{},{palette:Object(m.a)(Object(m.a)({},e.palette),{},{primary:Object(m.a)(Object(m.a)({},e.palette.primary),{},{main:"dark"===e.palette.type?Object(y.i)(e.palette.primary.main,.3):e.palette.primary.main})}),overrides:{MuiButton:{root:{textTransform:"none"}}}}));return Object(N.d)("dark"===e.palette.type?n.palette.background.default:n.palette.primary.main),n}),[a,e]),c=Object(x.a)((function(e){return{root:{display:"flex"},content:{flexGrow:1,padding:e.spacing(0),minWidth:0},toolbar:e.mixins.toolbar}}))(),l=Object(s.j)().path;return r.a.createElement(r.a.Fragment,null,r.a.createElement(C.a,{theme:i},r.a.createElement("div",{className:c.root,id:"container"},r.a.createElement(S.a,null),r.a.createElement(k.a,null),r.a.createElement(O.a,null),r.a.createElement("main",{className:c.content},r.a.createElement("div",{className:c.toolbar}),r.a.createElement(s.d,null,r.a.createElement(b,{exact:!0,path:l,isLogin:t},r.a.createElement(s.a,{to:{pathname:"/home"}})),r.a.createElement(b,{path:"".concat(l,"home"),isLogin:t},r.a.createElement(nn,null)),r.a.createElement(b,{path:"".concat(l,"video"),isLogin:t},r.a.createElement(vn,null)),r.a.createElement(b,{path:"".concat(l,"text"),isLogin:t},r.a.createElement(Ar.a,null)),r.a.createElement(b,{path:"".concat(l,"doc"),isLogin:t},r.a.createElement(Mr,null)),r.a.createElement(b,{path:"".concat(l,"pdf"),isLogin:t},r.a.createElement(n.Suspense,{fallback:r.a.createElement(jr,null)},r.a.createElement(Si,null))),r.a.createElement(b,{path:"".concat(l,"code"),isLogin:t},r.a.createElement(ii.a,null)),r.a.createElement(b,{path:"".concat(l,"epub"),isLogin:t},r.a.createElement(Ci,null)),r.a.createElement(b,{path:"".concat(l,"aria2"),isLogin:t},r.a.createElement(Er,null)),r.a.createElement(b,{path:"".concat(l,"shares"),isLogin:t},r.a.createElement(Wn,null)),r.a.createElement(s.b,{path:"".concat(l,"search"),isLogin:t},r.a.createElement(yn,null)),r.a.createElement(s.b,{path:"".concat(l,"setting"),isLogin:t},r.a.createElement(Yo,null)),r.a.createElement(b,{path:"".concat(l,"profile/:id"),isLogin:t},r.a.createElement(eo,null)),r.a.createElement(b,{path:"".concat(l,"webdav"),isLogin:t},r.a.createElement(Zr,null)),r.a.createElement(b,{path:"".concat(l,"tasks"),isLogin:t},r.a.createElement(Xr,null)),r.a.createElement(v,{exact:!0,path:"".concat(l,"login"),isLogin:t},r.a.createElement(ye,null)),r.a.createElement(v,{exact:!0,path:"".concat(l,"signup"),isLogin:t},r.a.createElement(Qo,null)),r.a.createElement(s.b,{path:"".concat(l,"activate"),exact:!0},r.a.createElement(ti,null)),r.a.createElement(s.b,{path:"".concat(l,"reset"),exact:!0},r.a.createElement(ni,null)),r.a.createElement(s.b,{path:"".concat(l,"forget"),exact:!0},r.a.createElement(oi,null)),r.a.createElement(s.b,{exact:!0,path:"".concat(l,"s/:id")},r.a.createElement(Dr,null)),r.a.createElement(s.b,{path:"".concat(l,"s/:id/video(/)*")},r.a.createElement(vn,null)),r.a.createElement(s.b,{path:"".concat(l,"s/:id/doc(/)*")},r.a.createElement(Mr,null)),r.a.createElement(s.b,{path:"".concat(l,"s/:id/text(/)*")},r.a.createElement(Ar.a,null)),r.a.createElement(s.b,{path:"".concat(l,"s/:id/pdf(/)*")},r.a.createElement(n.Suspense,{fallback:r.a.createElement(jr,null)},r.a.createElement(Si,null))),r.a.createElement(s.b,{path:"".concat(l,"s/:id/code(/)*")},r.a.createElement(ii.a,null)),r.a.createElement(s.b,{path:"".concat(l,"s/:id/epub(/)*")},r.a.createElement(Ci,null)),r.a.createElement(s.b,{path:"*"},r.a.createElement(R,{msg:o("pageNotFound",{ns:"common"})})))),r.a.createElement(wi,null))))}var Ti=a(11),Pi=a.n(Ti),Li=a(27),Ri=a(129),Ii=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]),f.a.authenticate(a)}return void 0!==e.user&&e.user.anonymous&&f.a.SetUser(e.user),e};function Fi(){return(Fi=Object(Li.a)(Pi.a.mark((function e(t){return Pi.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y.b.get("/site/config").then((function(e){var a=JSON.parse(e.data.themes);e.data.theme=a[e.data.defaultTheme],e.data=Ii(e.data),t.dispatch(Object(re.M)(e.data)),localStorage.setItem("siteConfigCache",JSON.stringify(e.data));var n=f.a.GetPreference("view_method");n?t.dispatch(Object(re.e)(n)):X.a.isSharePage(window.location.pathname)?t.dispatch(Object(re.e)(e.data.share_view_method)):t.dispatch(Object(re.e)(e.data.home_view_method))})).catch((function(e){t.dispatch(Object(re.R)("top","right",Ri.a.t("errLoadingSiteConfig",{ns:"common"})+e.message,"error"))}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Di=a(31),_i=a.n(Di),Mi={isLogin:f.a.Check(),open:!1,explorerViewMethod:"icon",sortMethod:f.a.GetPreferenceWithDefault("sort","timePos"),subTitle:null,contextType:"none",contextOpen:!1,menuOpen:!1,navigatorLoading:!0,navigatorError:!1,navigatorErrorMsg:null,modalsLoading:!1,storageRefresh:!1,userPopoverAnchorEl:null,shareUserPopoverAnchorEl:null,modals:{createNewFolder:!1,createNewFile:!1,rename:!1,move:!1,remove:!1,share:!1,music:!1,remoteDownload:!1,torrentDownload:!1,getSource:"",copy:!1,resave:!1,compress:!1,decompress:!1,loading:!1,loadingText:""},snackbar:{toggle:!1,vertical:"top",horizontal:"center",msg:"",color:""},pagination:{page:1,size:f.a.GetPreferenceWithDefault("pagination",100)},openFileSelector:0,openFolderSelector:0,shareInfo:null},Ai=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mi,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:t.source}),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:"",resave:!1,copy:!1,loading:!1,compress:!1,decompress:!1,option:void 0})});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"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});case"SET_OPTION_MODAL":return Object.assign({},e,{modals:Object.assign({},e.modals,{option:t.option}),contextOpen:!1});case"OPEN_FILE_SELECTOR":return Object(m.a)(Object(m.a)({},e),{},{openFileSelector:e.openFileSelector+1,contextOpen:!1});case"OPEN_FOLDER_SELECTOR":return Object(m.a)(Object(m.a)({},e),{},{openFolderSelector:e.openFolderSelector+1,contextOpen:!1});case"SET_PAGINATION":return Object(m.a)(Object(m.a)({},e),{},{pagination:t.pagination});case"SET_SHARE_INFO":return Object(m.a)(Object(m.a)({},e),{},{shareInfo:t.shareInfo});default:return e}},Ui=a(171),zi=function(e,t){return window.currntPath=e,Object.assign({},t,{navigator:Object.assign({},t.navigator,{path:e})})},Wi=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=Ii(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}}),Bi=a(241),Hi=function(e){Object(ue.a)(a,e);var t=Object(pe.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(le.a)(a,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,errorInfo:t})}},{key:"render",value:function(){var e=this.props,t=e.classes,a=e.t;return this.state.hasError?r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",{className:t.h1},":("),r.a.createElement("h2",{className:t.h2},a("renderError")),this.state.error&&this.state.errorInfo&&this.state.errorInfo.componentStack&&r.a.createElement("details",null,r.a.createElement("summary",null,a("errorDetails")),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),Gi=Object(Bi.a)(["common"])(Object(Ie.a)({h1:{color:"#a4a4a4",margin:"5px 0px"},h2:{margin:"15px 0px"}})(Hi)),Vi=a(72),qi=a(365);a.d(t,"history",(function(){return Ki}));var Yi=r.a.lazy((function(){return Promise.all([a.e(7),a.e(11)]).then(a.bind(null,8072))}));""!==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");l?(!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()}))})):c(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")}))):c(t,e)}))}}({onUpdate:function(e){alert(Ri.a.t("newVersionRefresh",{ns:"common"})),e&&e.waiting&&e.waiting.postMessage({type:"SKIP_WAITING"}),window.location.reload()}});var Ki=Object(Vi.a)(),Ji=Object(p.a)(Object(qi.a)(Ki),d.a);var Zi,$i=Object(p.c)((Zi=Ki,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]:Wi,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_NAVIGATOR":return zi(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 zi(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.search?!e.navigator.refresh:e.navigator.refresh})});default:return e}}(e,t),i=function(e){var t=Object(p.b)(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 _i()(!!o,"reducer ".concat(r," doesn't exist")),o&&o(a,n)}return t(a,n)}}({viewUpdate:Ai,explorer:ji.default,router:Object(Ui.b)(Zi)})({viewUpdate:n,explorer:r},t);return Object(m.a)(Object(m.a)({},o),i)}),Ji);!function(e){Fi.apply(this,arguments)}($i),i.a.render(r.a.createElement(n.Suspense,{fallback:"Loading..."},r.a.createElement(Gi,null,r.a.createElement(u.a,{store:$i},r.a.createElement(Ui.a,{history:Ki},r.a.createElement(s.d,null,r.a.createElement(s.b,{path:"/admin"},r.a.createElement(Yi,null)),r.a.createElement(s.b,{exact:!0,path:""},r.a.createElement(Ni,null))))))),document.getElementById("root"))},71:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),o=a(30),i=a(106),c=Object(i.a)((function(e){return{emptyContainer:{bottom:"0",color:e.palette.action.disabled,textAlign:"center",paddingTop:"20px"},emptyInfoBig:{fontSize:"25px",color:e.palette.action.disabled},emptyInfoSmall:{color:e.palette.action.disabled}}}));function l(e){var t=e.primary,a=e.secondary,n=e.top,i=void 0===n?20:n,l=e.size,s=void 0===l?1:l,u=c();return r.a.createElement("div",{style:{margin:"".concat(50*s,"px auto"),paddingTop:i},className:u.emptyContainer},r.a.createElement(o.E,{style:{fontSize:160*s}}),r.a.createElement("div",{style:{fontSize:25*s},className:u.emptyInfoBig},t),""!==a&&r.a.createElement("div",{className:u.emptyInfoSmall},a))}},80:function(e,t,a){"use strict";var n=a(6),r=a(13),o=a(14),i=a(17),c=a(18),l=a(0),s=a.n(l),u=a(78),p=a.n(u),d=a(62),m=a.n(d),h=a(424),f=a.n(h),g=a(7),b=a(29),E=a.n(b),v=a(458),O=a(118),j=a(64),k=a(63),w=a(459),y=a(53),x=a(8),C=a(12),S=a(2),N=function(e){Object(i.a)(a,e);var t=Object(c.a)(a);function a(){var e;Object(r.a)(this,a);for(var n=arguments.length,o=new Array(n),i=0;i