const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/PasteConfirm-Hi99i3Nk.js?v=1773287522785","js/index-BTglIPU2.js?v=1773287522785","js/vue-core-DJjvd5ZC.js?v=1773287522785","js/prismjs-BZPoR7_J.js?v=1773287522785","css/prismjs-D-3FhBe_.css?v=1773287522785","js/naive-ui--dJnpVcV.js?v=1773287522785","css/index-DEM1fxGq.css?v=1773287522785","js/FileIcon-eIHDRaxH.js?v=1773287522785","js/soft-Cjyfamvm.js?v=1773287522785","js/copy-D-wIKr0q.js?v=1773287522785","css/FileIcon-B9hXZxj1.css?v=1773287522785","js/CalcVerify-DzxM0pDk.js?v=1773287522785","css/CalcVerify-B2TI58_x.css?v=1773287522785","js/PasteSingleConfirm-DmK9eFTs.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785","js/UploadFile-Dg4rg0Qp.js?v=1773287522785","css/UploadFile-DTKe3Z22.css?v=1773287522785","js/RemoteDownload-DsBrKOv-.js?v=1773287522785","js/check-CNel7fTH.js?v=1773287522785","js/SearchFileContent-ow9Yna3_.js?v=1773287522785","js/files-BUbkyTRl.js?v=1773287522785","css/SearchFileContent-2hGRmR39.css?v=1773287522785","js/FavoriteList-BOQuT1AG.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-BeO8Hyma.js?v=1773287522785","js/data-BVsViUMm.js?v=1773287522785","js/useTableColumns-DDeyYvje.js?v=1773287522785","js/index-S15tYq5l.js?v=1773287522785","js/index-DIKmrNCq.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-DeTfbeeM.js?v=1773287522785","js/index-Cg6fMjw6.js?v=1773287522785","js/ShareList-BrSiLX86.js?v=1773287522785","js/ShareDetail.vue_vue_type_script_setup_true_lang-Vpbw-Uhg.js?v=1773287522785","js/Backup-CcpuDf2q.js?v=1773287522785","js/Recycle-Co5-BlL9.js?v=1773287522785","js/index.vue_vue_type_script_setup_true_lang-HxsqzSKU.js?v=1773287522785","js/index-BGYvyLDv.js?v=1773287522785","css/index-CJFLRSI8.css?v=1773287522785","css/Recycle-WlHkOxyl.css?v=1773287522785","js/Terminal-PiC2vW2v.js?v=1773287522785","js/terminal-CFfBeKvv.js?v=1773287522785","js/xterm-dpUsuiNl.js?v=1773287522785","css/xterm-Vgv5f8wO.css?v=1773287522785","js/useSocket-DTHwGZgK.js?v=1773287522785","js/xterm-addon-canvas-DELv9KNm.js?v=1773287522785","js/useLoading-CZ2gSAW7.js?v=1773287522785","css/terminal-jcJ-0jHK.css?v=1773287522785","js/SoftLink-Dl8GheA5.js?v=1773287522785","js/Share-CX6sFtoe.js?v=1773287522785","js/index-DRk77PlU.js?v=1773287522785","js/Permission-CP8D3DP2.js?v=1773287522785","css/Permission-rz-sc_1_.css?v=1773287522785","js/Properties-DUW_wpQJ.js?v=1773287522785","js/index-BRQskX9P.js?v=1773287522785","css/index-CCworjcO.css?v=1773287522785","css/Properties-B8hARkFa.css?v=1773287522785","js/Del-BqOIofE1.js?v=1773287522785","css/Del-Bg_F3qDY.css?v=1773287522785","js/Compression-BI1MAE3w.js?v=1773287522785","js/Decompress-CT22AIGW.js?v=1773287522785"])))=>i.map(i=>d[i]); import{x as zt,c as q,a3 as St,P as A,m as Ae,l as d,i as We,au as Rt,as as Ne,h as Ot,ao as Dt,C as Ft,w as Tt,t as Lt,bW as he,bX as Et,bY as Mt,bZ as It}from"./index-BTglIPU2.js?v=1773287522785";import{k as K,i as j,r as a,c as N,$ as C,a8 as V,a9 as m,_ as g,S as n,a0 as e,H as ge,Z as M,F as Y,P as de,L as te,j as E,aa as F,X,x as Vt,a3 as W,R as ee,f as Ue,an as At,o as ne,ak as Q,ao as Wt,al as $e,K as Nt,l as Pe,v as ze,ai as we,n as ce,aj as Be,w as ve,u as Ut,b as Bt,a5 as Kt,h as Gt,ad as Ke,p as Ge,a6 as jt,ac as Ht}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{F as ue,i as je,a as qt,d as be,c as ke,h as Se,b as Re,e as me,f as Oe,g as De,o as Yt,j as Fe,k as Te,l as Le,m as He,n as qe,p as Xt,q as Ye,r as Zt,s as Jt,t as Qt,v as en,u as tn,w as oe,x as ye,y as nn,z as H,A as on,B as ln,C as an,D as sn,E as rn,G as cn,H as un,I as fn,J as se,K as dn,L as pn,M as mn,N as vn,O as _n,P as hn,Q as yn}from"./FileIcon-eIHDRaxH.js?v=1773287522785";import{aI as bn,n as _e,q as Xe,B as ie,ai as Ce,aH as kn,b as fe,au as Ze,al as gn,at as wn,a9 as Cn,a5 as Je,a0 as xn,p as Ee,a2 as $n}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{c as Pn}from"./soft-Cjyfamvm.js?v=1773287522785";import{i as zn}from"./file-CN4ZrtIc.js?v=1773287522785";import{_ as Sn}from"./index.vue_vue_type_script_setup_true_lang-C5hb-Th7.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";import"./data-BVsViUMm.js?v=1773287522785";function Me(L){L.card_hover=!0}function Ie(L){L.card_hover=!1}const Rn={class:"video-container"},On=["src"],Dn={class:"video-list"},Fn=["onClick"],Tn=K({__name:"VideoPlayer",setup(L){const h=j("fileStore"),{videoWaitPreview:c,previewVideoShow:r,currentPreviewVideo:l}=h,p=a(),u=a(0),y=N(()=>"/download?filename=".concat(l.value.path));function v(){u.value=p.value.offsetHeight}return(k,b)=>{const T=bn,R=zt;return C(),V(R,{show:n(r),"onUpdate:show":b[0]||(b[0]=$=>X(r)?r.value=$:null),width:"70%",title:k.$t("file.videoPlayerModal.title"),onAfterEnter:v},{default:m(()=>[g("div",Rn,[g("video",{src:n(y),controls:"true",preload:"auto",width:"100%",ref_key:"videoRef",ref:p},null,8,On),g("div",Dn,[e(T,{style:ge({height:n(u)+"px"})},{default:m(()=>[(C(!0),M(Y,null,de(n(c),$=>(C(),M("div",{class:te(["video-item",{active:$.path==n(l).path}]),key:$.path,onClick:D=>l.value=$},[e(ue,{ext:"mp4"}),e(n(_e),null,{default:m(()=>[E(F($.name),1)]),_:2},1024)],10,Fn))),128))]),_:1},8,["style"])])])]),_:1},8,["show","title"])}}}),Ln=q(Tn,[["__scopeId","data-v-6be9ab69"]]),En=a([]),Mn=a(!1),In=a(null),Vn=a(1),{t:Ve}=St.global;function An(){const L=a(),h=a("list"),c=a("/www"),r=a([]),l=a(!1),p=a([]),u=a([]),y=a([]),v=a(),k=a(),b=a(),T=a([]),R=a([]),$=a({url:"http://",path:c.value,filename:""}),D=a({reference:"",per:0,speed:"0",used:"0",except:"--",total:0}),P=a(!1),x=a([]),f=a({text:"",exts:"html,php",path:c.value,is_subdir:0,mode:0,isword:0,iscase:1,noword:0});function _(){f.value={text:"",exts:"html,php",path:c.value,is_subdir:0,mode:0,isword:0,iscase:1,noword:0}}const i=a({}),o=a({files:0,times:0}),t=a([]),s=a([{label:Ve("file.favoriteListModal.management"),key:"management",icon:"settings"}]);function S(){s.value=[{label:Ve("file.favoriteListModal.management"),key:"management",icon:"settings"}]}const z=a([]),I=a([]),w=a({back_sub_dir:1,path:"",remark:""}),O=Vn,B=En,G=Mn,Z=In,re={PasteConfirm:()=>W(()=>A(()=>import("./PasteConfirm-Hi99i3Nk.js?v=1773287522785"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),PasteSingleConfirm:()=>W(()=>A(()=>import("./PasteSingleConfirm-DmK9eFTs.js?v=1773287522785"),__vite__mapDeps([13,1,2,3,4,5,6,14,7,8,9,10]))),UploadFile:()=>W(()=>A(()=>import("./UploadFile-Dg4rg0Qp.js?v=1773287522785"),__vite__mapDeps([15,1,2,3,4,5,6,7,8,9,10,16]))),RemoteDownload:()=>W(()=>A(()=>import("./RemoteDownload-DsBrKOv-.js?v=1773287522785"),__vite__mapDeps([17,1,2,3,4,5,6,14,18,7,8,9,10]))),SearchFileContent:()=>W(()=>A(()=>import("./SearchFileContent-ow9Yna3_.js?v=1773287522785"),__vite__mapDeps([19,1,2,3,4,5,6,20,7,8,9,10,21]))),FavoriteList:()=>W(()=>A(()=>import("./FavoriteList-BOQuT1AG.js?v=1773287522785"),__vite__mapDeps([22,1,2,3,4,5,6,23,24,7,8,9,10,25,26,27,28,29]))),ShareList:()=>W(()=>A(()=>import("./ShareList-BrSiLX86.js?v=1773287522785"),__vite__mapDeps([30,1,2,3,4,5,6,23,24,25,26,9,27,28,29,7,8,10,31,14]))),Backup:()=>W(()=>A(()=>import("./Backup-CcpuDf2q.js?v=1773287522785"),__vite__mapDeps([32,1,2,3,4,5,6,23,24,25,26,9,27,28,29]))),Recycle:()=>W(()=>A(()=>import("./Recycle-Co5-BlL9.js?v=1773287522785"),__vite__mapDeps([33,1,2,3,4,5,6,34,23,24,35,36,25,26,9,27,28,29,7,8,10,37]))),Terminal:()=>W(()=>A(()=>import("./Terminal-PiC2vW2v.js?v=1773287522785"),__vite__mapDeps([38,1,2,3,4,5,6,39,40,41,42,24,43,44,45]))),Softlink:()=>W(()=>A(()=>import("./SoftLink-Dl8GheA5.js?v=1773287522785"),__vite__mapDeps([46,1,2,3,4,5,6,14,7,8,9,10]))),Share:()=>W(()=>A(()=>import("./Share-CX6sFtoe.js?v=1773287522785"),__vite__mapDeps([47,1,2,3,4,5,6,14,48,7,8,9,10,31]))),Permission:()=>W(()=>A(()=>import("./Permission-CP8D3DP2.js?v=1773287522785"),__vite__mapDeps([49,1,2,3,4,5,6,23,24,25,26,9,27,28,29,7,8,10,50]))),Properties:()=>W(()=>A(()=>import("./Properties-DUW_wpQJ.js?v=1773287522785"),__vite__mapDeps([51,1,2,3,4,5,6,52,53,9,25,26,27,28,29,7,8,10,54]))),Del:()=>W(()=>A(()=>import("./Del-BqOIofE1.js?v=1773287522785"),__vite__mapDeps([55,11,1,2,3,4,5,6,12,7,8,9,10,56]))),Compression:()=>W(()=>A(()=>import("./Compression-BI1MAE3w.js?v=1773287522785"),__vite__mapDeps([57,1,2,3,4,5,6,14,7,8,9,10]))),Decompress:()=>W(()=>A(()=>import("./Decompress-CT22AIGW.js?v=1773287522785"),__vite__mapDeps([58,1,2,3,4,5,6,14,7,8,9,10])))},le=Vt(null),U=a(),pe=a(!1),ae=a(!1),Qe=a([]),et=a(!1),tt=a(!1),nt=a(!1),ot=a(!1),it=a(),lt=a(!1),at=N(()=>r.value.filter(J=>je(J)).map(J=>J.path)),st=N(()=>r.value.filter(J=>qt(J.ext)).map(J=>({path:J.path,name:J.nm}))),rt=a(""),ct=a({path:"",name:""}),ut=a(!1),ft=a(!1),dt=a(1),pt=a(0),mt=a(0),vt=a(1),_t=a(100),ht=a(""),yt=a("False"),bt=a(0),kt=a(null),gt=a(),wt=a([]),Ct=a(1),xt=a(0),$t=a(-1),Pt=a();return{mainRef:L,filesView:h,currentPath:c,fileList:r,tableLoading:l,normalTrList:p,trRectArr:u,choosedKeys:y,tableRef:v,dataTableRef:k,contextRef:b,normalCardList:T,cardRectArr:R,downloadFileFormData:$,downloadProgressData:D,downloadProgressShow:P,resourceManagerWindow:x,searchFileContentFormData:f,resetSearchFileContentFormData:_,searchRes:i,searchStatistics:o,favoriteList:t,favoriteOptions:s,resetFavoriteOptions:S,shareList:z,backupList:I,backupForm:w,fileOperationFlag:O,fileCopyCache:B,waitForPaste:G,copiedFile:Z,dynamicCmptObj:re,dynamicCmpt:le,dynamicCmptRef:U,fileRecycle:pe,menuShow:ae,uploadFileList:Qe,uploadShow:et,uploadComplete:tt,startUpload:nt,fileConflictShow:ot,optionToolsRef:it,isMiniScreen:lt,imgWaitPreview:at,videoWaitPreview:st,currentPreviewImg:rt,currentPreviewVideo:ct,previewShow:ut,previewVideoShow:ft,operationType:dt,dirNums:pt,fileNums:mt,page:vt,size:_t,sort:ht,reverse:yt,total:bt,currentFile:kt,choosePathRef:gt,diskMountPoint:wt,shareListPage:Ct,shareListTotal:xt,currentDirSize:$t,dragUploadRef:Pt}}const Wn={class:"drag-upload"},Nn={class:"upload-area"},Un={class:"tip"},Bn=K({__name:"DragUpload",setup(L,{expose:h}){const{t:c}=ee(),r=j("fileStore"),{uploadFileList:l,uploadShow:p,uploadComplete:u,startUpload:y}=r,v=a(!1),k=a(0);be(r,"UploadFile");function b(i){const o=i.dataTransfer;return o?o.types.some(t=>t==="Files"||t==="application/x-moz-file"):!1}function T(i){i.preventDefault(),b(i)&&(k.value++,v.value=!0)}function R(i){i.preventDefault(),b(i)&&(k.value--,k.value<=0&&(v.value=!1,k.value=0))}function $(i){i.preventDefault(),b(i)&&(i.dataTransfer.dropEffect="copy")}async function D(i){const o=[];for(let s=0;s{S.readEntries(w)});await P(z,o?"".concat(o,"/").concat(s.name):s.name)&&(t=!0)}else if(s.isFile){if(l.value.findIndex(I=>f("".concat(I.relativePath,"/").concat(I.file.name))==f(s.fullPath))!=-1){t=!0;continue}const z=await new Promise(I=>{s.file(I)});l.value.push({file:z,status:0,progress:0,relativePath:o?"".concat(o):""})}return t}async function x(i){var o;i.preventDefault(),b(i)&&(k.value=0,v.value=!1,(o=i.dataTransfer)!=null&&o.items&&(await D(i.dataTransfer.items),be(r,"UploadFile"),p.value=!0))}function f(i){return i.startsWith("/")?i.slice(1):i}function _(){document.ondragenter=T,document.ondragleave=R,document.ondragover=$,document.ondrop=x}return h({listenDragEvent:_}),Ue(()=>{_()}),(i,o)=>{const t=Xe;return C(),M("div",Wn,[e(t,{show:n(v),"onUpdate:show":o[0]||(o[0]=s=>X(v)?v.value=s:null)},{default:m(()=>[g("div",Nn,[g("span",Un,F(i.$t("file.uploadModal.dragFilesHere")),1)])]),_:1},8,["show"])])}}}),Kn=q(Bn,[["__scopeId","data-v-90e8c7cf"]]),Gn={class:"img-wrapper"},jn=["src"],Hn=K({__name:"ImagePreview",setup(L){const h=j("fileStore"),{imgWaitPreview:c,currentPreviewImg:r,previewShow:l}=h,p=a(.5),u=N(()=>"/download?filename=".concat(c.value[y.value])),y=a(0);function v(){y.value=c.value.findIndex(P=>P===r.value)}function k(){y.value>0&&y.value--}function b(){y.value2||(p.value+=.1)}function R(){p.value<.2||(p.value-=.1)}function $(){l.value=!1}function D(P){p.value-P.deltaY/1e3<.2||p.value-P.deltaY/1e3>2||(p.value-=P.deltaY/1e3)}return(P,x)=>{const f=Xe;return C(),V(f,{show:n(l),"onUpdate:show":x[0]||(x[0]=_=>X(l)?l.value=_:null),"close-on-esc":!1,"mask-closable":!1,"on-after-enter":v},{default:m(()=>[g("div",Gn,[g("img",{src:n(u),style:ge({transform:"translate(-50%, -50%) scale(".concat(n(p),")")}),onWheel:D},null,44,jn),g("div",{class:"tools"},[g("i",{class:"i-ic:outline-arrow-circle-left text-16 text-[#fff] cursor-pointer",onClick:k}),g("i",{class:"i-ic:baseline-zoom-in text-16 text-[#fff] cursor-pointer",onClick:T}),g("i",{class:"i-ic:baseline-zoom-out text-16 text-[#fff] cursor-pointer",onClick:R}),g("i",{class:"i-ic:outline-arrow-circle-right text-16 text-[#fff] cursor-pointer",onClick:b})]),g("i",{class:"i-iconoir:xmark-circle text-16 text-[#fff] cursor-pointer close-icon",onClick:$})])]),_:1},8,["show"])}}}),qn=q(Hn,[["__scopeId","data-v-7045f818"]]),Yn={key:0,class:"group-left"},Xn={key:1,class:"group-left"},Zn={class:"group-right"},Jn={class:"view-change"},Qn=K({__name:"ButtonGroup",props:{filesView:{type:String,default:"list"},filesViewModifiers:{}},emits:Wt(["viewChange"],["update:filesView"]),setup(L,{emit:h}){const c=h,{t:r}=ee(),l=j("fileStore"),{favoriteOptions:p,choosedKeys:u,waitForPaste:y,optionToolsRef:v,isMiniScreen:k}=l,b=At(L,"filesView"),T=N(()=>[{label:r("file.buttonGroup.createOptions.newDirectory"),key:"dir",icon:()=>e(d,{name:"file-dir",size:"16"},null)},{label:r("file.buttonGroup.createOptions.newFile"),key:"file",icon:()=>e(d,{name:"base-file",size:"16"},null)},{label:r("file.buttonGroup.createOptions.softLink"),key:"softlink",icon:()=>e(d,{name:"file-soft-link",size:"15"},null)}]),R=N(()=>[{label:r("file.buttonGroup.miniScreenOptions.upload"),key:"Upload",icon:()=>e(d,{name:"file-upload",size:"14"},null)},{label:r("file.buttonGroup.miniScreenOptions.remoteDownload"),key:"Remote Download",icon:()=>e(d,{name:"file-download",size:"16"},null)},{label:r("file.buttonGroup.miniScreenOptions.new"),key:"create",icon:()=>e(d,{name:"base-dir",size:"14",class:"mr-5px"},null),children:[{label:r("file.buttonGroup.createOptions.newDirectory"),key:"dir",icon:()=>e(d,{name:"file-dir",size:"16"},null)},{label:r("file.buttonGroup.createOptions.newFile"),key:"file",icon:()=>e(d,{name:"base-file",size:"16"},null)},{label:r("file.buttonGroup.createOptions.softLink"),key:"softlink",icon:()=>e(d,{name:"file-soft-link",size:"15"},null)}]},{label:r("file.buttonGroup.miniScreenOptions.searchFileContent"),key:"Search File Content",icon:()=>e(d,{name:"search",size:"14"},null)},{label:r("file.buttonGroup.miniScreenOptions.favorite"),key:"Favorite",icon:()=>e(d,{name:"file-favorite",size:"14",class:"mr-5px"},null),children:P.value},{label:r("file.buttonGroup.miniScreenOptions.shareList"),key:"Share List",icon:()=>e(d,{name:"file-share",size:"14"},null)},{label:r("file.buttonGroup.miniScreenOptions.terminal"),key:"Terminal",icon:()=>e(d,{name:"file-terminal",size:"14"},null)},{label:r("file.buttonGroup.miniScreenOptions.rootDirectory"),key:"Root Directory",icon:()=>e(d,{name:"file-disk",size:"14"},null)},{label:r("file.buttonGroup.miniScreenOptions.fileProtection"),key:"File/Dir protection",icon:()=>e(d,{name:"file-protect",size:"14"},null)}]);function $(o,t){switch(o){case"Upload":Se(l);break;case"Remote Download":Re(l);break;case"dir":me(l,"dir");break;case"file":me(l,"file");break;case"softlink":me(l,"softlink");break;case"Search File Content":Oe(l);break;case"Share List":Fe(l);break;case"Terminal":Te(l);break;case"Root Directory":Le(l);break;case"File/Dir protection":x();break;default:D(o,t)}}function D(o,t){De(l,o,t.meta)}const P=N(()=>p.value.map(o=>{function t(s){return s=="dir"?"file-dir":s=="settings"?"flow-action":"file-record"}return{key:o.key,icon:()=>e(d,{name:t(o.icon),size:"16"},null),label:()=>e("div",{class:"flex"},[e("div",{class:"max-w-300px"},[e(_e,null,{default:()=>[o.label]})])]),meta:{type:o.icon,name:o.label}}})),x=async()=>{const o=await Pn("tamper_core",75);We(o)&&Rt(o)};function f(){be(l,"Permission",o=>o.value.open())}function _(){Qt(l)}ne(()=>{ke(l),window.addEventListener("resize",()=>ke(l))});function i(o){en(l,o),c("viewChange",o)}return(o,t)=>{const s=d,S=ie,z=Ce,I=kn;return C(),M("div",{class:"button-group",ref_key:"optionToolsRef",ref:v},[!n(k)&&n(u).length<=1?(C(),M("div",Yn,[e(S,{onClick:t[0]||(t[0]=w=>n(Se)(n(l)))},{icon:m(()=>[e(s,{name:"file-upload",size:"14"})]),default:m(()=>[E(" "+F(o.$t("file.upload")),1)]),_:1}),e(S,{onClick:t[1]||(t[1]=w=>n(Re)(n(l)))},{icon:m(()=>[e(s,{name:"file-download",size:"16"})]),default:m(()=>[E(" "+F(o.$t("file.remoteDownload")),1)]),_:1}),e(z,{trigger:"hover",options:n(T),placement:"bottom-start","on-select":w=>n(me)(n(l),w)},{default:m(()=>[e(S,{"icon-placement":"right",class:"btn-behavior"},{default:m(()=>[e(s,{name:"base-dir",size:"14",class:"mr-5px"}),E(" "+F(o.$t("file.create"))+" ",1),e(s,{name:"base-arrow-right",size:"14"})]),_:1})]),_:1},8,["options","on-select"]),e(S,{onClick:t[2]||(t[2]=w=>n(Oe)(n(l)))},{icon:m(()=>[e(s,{name:"search",size:"14"})]),default:m(()=>[E(" "+F(o.$t("file.searchContent")),1)]),_:1}),e(z,{placement:"bottom-start",scrollable:!0,style:{maxHeight:"480px"},options:n(P),onSelect:t[4]||(t[4]=(w,O)=>n(De)(n(l),w,O.meta))},{default:m(()=>[e(S,{"icon-placement":"right",class:"btn-behavior",onClick:t[3]||(t[3]=w=>n(Yt)(n(l)))},{default:m(()=>[e(s,{name:"file-favorite",size:"14",class:"mr-5px"}),E(" "+F(o.$t("file.favorite"))+" ",1),e(s,{name:"base-arrow-right",size:"14"})]),_:1})]),_:1},8,["options"]),e(S,{onClick:t[5]||(t[5]=w=>n(Fe)(n(l)))},{icon:m(()=>[e(s,{name:"file-share",size:"14"})]),default:m(()=>[E(" "+F(o.$t("file.shareList")),1)]),_:1}),e(S,{onClick:t[6]||(t[6]=w=>n(Te)(n(l)))},{icon:m(()=>[e(s,{name:"file-terminal",size:"14"})]),default:m(()=>[E(" "+F(o.$t("file.terminal")),1)]),_:1}),t[16]||(t[16]=g("div",{class:"divider"},null,-1)),e(S,{onClick:t[7]||(t[7]=w=>n(Le)(n(l)))},{icon:m(()=>[e(s,{name:"file-disk",size:"14"})]),default:m(()=>[E(" "+F(o.$t("file.rootDirectory")),1)]),_:1}),t[17]||(t[17]=g("div",{class:"divider"},null,-1)),e(S,{onClick:x},{icon:m(()=>[e(s,{name:"file-protect",size:"14"})]),default:m(()=>[E(" "+F(o.$t("file.protection")),1)]),_:1})])):n(k)||n(u).length>1?(C(),M("div",Xn,[e(z,{placement:"bottom-start",scrollable:!0,"menu-props":()=>({style:"max-height: 480px"}),options:n(R),"on-select":$},{default:m(()=>[e(S,{"icon-placement":"right",class:"btn-behavior"},{default:m(()=>[e(s,{name:"base-dir",size:"14",class:"mr-5px"}),E(" "+F(o.$t("file.buttonGroup.fileOperations"))+" ",1),e(s,{name:"base-arrow-right",size:"14"})]),_:1})]),_:1},8,["options"])])):Q("",!0),g("div",Zn,[n(u).length>1?(C(),V(I,{key:0},{default:m(()=>[e(S,{onClick:t[8]||(t[8]=w=>n(He)(n(l)))},{icon:m(()=>[e(s,{name:"common-copy",size:"16"})]),default:m(()=>[E(" "+F(o.$t("file.copy")),1)]),_:1}),e(S,{onClick:t[9]||(t[9]=w=>n(qe)(n(l)))},{icon:m(()=>[e(s,{name:"file-cut",size:"16"})]),default:m(()=>[E(" "+F(o.$t("file.cut")),1)]),_:1}),e(S,{onClick:t[10]||(t[10]=w=>n(Xt)(n(l)))},{icon:m(()=>[e(s,{name:"file-compression",size:"16"})]),default:m(()=>[E(" "+F(o.$t("file.compress")),1)]),_:1}),e(S,{onClick:f},{icon:m(()=>[e(s,{name:"file-dir-permission",size:"16"})]),default:m(()=>[E(" "+F(o.$t("file.buttonGroup.permissions")),1)]),_:1}),e(S,{onClick:_},{icon:m(()=>[e(s,{name:"file-recycling-bin",size:"16"})]),default:m(()=>[E(" "+F(o.$t("file.delete")),1)]),_:1})]),_:1})):Q("",!0),n(y)?(C(),V(S,{key:1,onClick:t[11]||(t[11]=()=>n(Ye)(n(l)))},{icon:m(()=>[e(s,{name:"file-paste",size:"20"})]),default:m(()=>[E(" "+F(o.$t("file.paste")),1)]),_:1})):Q("",!0),e(S,{onClick:t[12]||(t[12]=w=>n(Zt)(n(l)))},{default:m(()=>[E(F(o.$t("file.backup")),1)]),_:1}),e(S,{onClick:t[13]||(t[13]=w=>n(Jt)(n(l)))},{icon:m(()=>[e(s,{name:"file-recycling-bin",size:"14"})]),default:m(()=>[E(" "+F(o.$t("file.recycleBin")),1)]),_:1}),g("div",Jn,[g("div",{class:te(["card",{active:b.value=="card"}]),onClick:t[14]||(t[14]=w=>i("card"))},[e(s,{name:"file-card-view",size:"14"})],2),t[18]||(t[18]=g("div",{class:"line"},null,-1)),g("div",{class:te(["list",{active:b.value=="list"}]),onClick:t[15]||(t[15]=w=>i("list"))},[e(s,{name:"file-list-view",size:"16"})],2)])])],512)}}}),eo=q(Qn,[["__scopeId","data-v-4b4098ec"]]),to={class:"path-dir"},no={class:"path-arrow reversal"},oo={class:"path-dir"},io={class:"path-arrow"},lo=["onClick"],ao={class:"path-dir"},so={class:"path-arrow"},ro=K({__name:"ChoosePath",props:{currentPath:{type:String,default:"/"}},emits:["pathChange"],setup(L,{expose:h,emit:c}){const r=L,l=c,{t:p}=ee(),u=j("fileStore"),y=a(""),v=$e("pathListRef"),k=a(0),b=N(()=>r.currentPath.split("/").filter(O=>O!=="").map((O,B)=>({name:O,originalIndex:B}))),T=N(()=>{if(!k.value||b.value.length===0)return b.value;const w=80,O=20,B=12,G=150;let Z=k.value-w;const re=[...b.value].reverse(),le=[];for(const U of re){const ae=Math.min(U.name.length*8,G)+O+B;if(Z>=ae)le.unshift(U),Z-=ae;else break}return le}),R=N(()=>T.value.length{const w=b.value.length-T.value.length;return b.value.slice(0,w)}),D=N(()=>{const w=$.value.map(O=>({key:O.originalIndex,label:O.name,icon:()=>e(d,{name:"file-dir",size:"16"},null)}));return w.unshift({key:"/",label:p("file.rootDirectory"),icon:()=>e(d,{name:"file-dir",size:"16"},null)}),w}),P=w=>{s(w)},x=a(!0),f=$e("inputRef");let _=null;ne(()=>{v.value&&(i(),_=new ResizeObserver(()=>{i()}),_.observe(v.value))}),Nt(()=>{_&&_.disconnect()});function i(){v.value&&(k.value=v.value.offsetWidth)}function o(w){x.value=w,x.value?(y.value="",ce(()=>{i()})):y.value=r.currentPath}const t=()=>{o(!1),ce(()=>{var w;(w=f.value)==null||w.focus()})};function s(w,O){const B=r.currentPath.split("/").filter(Z=>Z!=="");let G="";typeof w=="number"&&(B.splice(w+1),G="/"+B.join("/")),w=="/"&&(G="/"),l("pathChange",G),O==null||O.stopPropagation()}async function S(){var w;if(y.value==r.currentPath||y.value=="")(w=f.value)==null||w.blur(),o(!0);else if(!zn(y.value))o(!1);else try{const{message:O}=await Ne.post("/files?action=test_path",{path:y.value});if(We(O)&&O.exists)l("pathChange",O.path),o(!0);else{let B=y.value;Ot({title:p("file.pathNotExists"),content:p("file.pathNotExistsConfirm",{path:B}),onPublicClose:()=>o(!1),onConfirm:async()=>{await tn(B),l("pathChange",B)},onCancel(){var G;(G=f.value)==null||G.blur(),o(!0)}})}}catch(O){console.warn(O)}}h({handleEnterDown:S});function z(){const w=r.currentPath.split("/").filter(O=>O!=="");if(w.length!=0){w.pop();let O="/"+w.join("/");l("pathChange",O)}}function I(){oe(u)}return(w,O)=>{const B=ie,G=Ce,Z=_e,re=fe,le=Ze;return C(),V(le,null,{default:m(()=>[e(B,{onClick:z},{default:m(()=>[e(d,{name:"file-back",size:"16"})]),_:1}),n(x)?(C(),M("div",{key:0,ref_key:"pathListRef",ref:v,class:"path-list",onClick:t},[e(G,{trigger:"click",placement:"bottom-start",options:n(D),onSelect:P},{default:m(()=>[Pe(g("div",{class:"path-item",onClick:O[0]||(O[0]=U=>U.stopPropagation())},[g("div",to,[e(d,{name:"file-dir",size:"16"})]),g("div",no,[e(d,{name:"base-arrow-right"})])],512),[[ze,n(R)]])]),_:1},8,["options"]),Pe(g("div",{class:"path-item",onClick:O[1]||(O[1]=U=>s("/",U))},[g("div",oo,F(w.$t("file.rootDirectory")),1),g("div",io,[e(d,{name:"base-arrow-right"})])],512),[[ze,!n(R)]]),(C(!0),M(Y,null,de(n(T),(U,pe)=>(C(),M("div",{class:"path-item",key:"".concat(U,"_").concat(pe),onClick:ae=>s(U.originalIndex,ae)},[g("div",ao,[e(Z,{class:"max-w-150px!"},{default:m(()=>[E(F(U.name),1)]),_:2},1024)]),g("div",so,[e(d,{name:"base-arrow-right"})])],8,lo))),128))],512)):(C(),V(re,{key:1,ref_key:"inputRef",ref:f,value:n(y),"onUpdate:value":O[2]||(O[2]=U=>X(y)?y.value=U:null),class:"flex-1",placeholder:" ",onFocus:O[3]||(O[3]=U=>o(!1)),onBlur:O[4]||(O[4]=U=>o(!0)),onKeydown:we(S,["enter"])},null,8,["value"])),e(B,{onClick:I},{default:m(()=>[e(d,{name:"base-refresh",size:"16"})]),_:1})]),_:1})}}}),co=q(ro,[["__scopeId","data-v-ca757f3c"]]),uo={class:"filter-tools"},fo=K({__name:"SearchTools",setup(L){const h=j("fileStore"),{currentPath:c}=h,r=a(""),l=a(void 0),{choosePathRef:p}=h;async function u(){const v={search:r.value};h.page.value=1,l.value&&(v.all="True"),oe(h,v)}function y(v){c.value=v,h.page.value=1,oe(h)}return(v,k)=>{const b=gn,T=fe,R=d,$=ie,D=Ze;return C(),M("div",uo,[e(co,{ref_key:"choosePathRef",ref:p,class:"w-50%","current-path":n(c),onPathChange:y},null,8,["current-path"]),e(D,{class:"dir-search"},{default:m(()=>[e(T,{placeholder:v.$t("file.search"),status:"success",value:n(r),"onUpdate:value":k[1]||(k[1]=P=>X(r)?r.value=P:null),onKeyup:we(u,["enter"])},{suffix:m(()=>[e(b,{checked:n(l),"onUpdate:checked":k[0]||(k[0]=P=>X(l)?l.value=P:null)},{default:m(()=>[E(F(v.$t("file.includeSubdir")),1)]),_:1},8,["checked"])]),_:1},8,["placeholder","value"]),e($,{type:"primary",onClick:u},{icon:m(()=>[e(R,{name:"search",size:"16"})]),_:1})]),_:1})])}}}),po=q(fo,[["__scopeId","data-v-7bef8870"]]),xe=K({__name:"ContextMenu",setup(L,{expose:h}){const{t:c}=ee(),{addTab:r}=j("file-provide"),l=j("fileStore"),{waitForPaste:p}=l,u=a(!1),y=a("empty"),v=a(0),k=a(1),b=N(()=>{switch(y.value){case"single":return nn(l,$);case"multiple":return ye($.value,["copy","cut","permission","compression","del"]);default:return p.value?ye($.value,["refresh","upload","create","terminal","paste"]):ye($.value,["refresh","upload","create","terminal"])}});function T(x){x==="openNewWindow"&&R(),H(x,l),u.value=!1}function R(){const{choosedKeys:x,fileList:f}=l,_=on(f.value,x.value)[0];_&&r(_.path,_.nm)}const $=a({edit:{label:c("Public.Btn.Edit"),key:"edit",icon:()=>e(d,{name:"common-copy",size:"14"},null)},copy:{label:c("Public.Btn.Copy"),key:"copy",icon:()=>e(d,{name:"common-copy",size:"14"},null)},copyPath:{label:"Copy Path",key:"copyPath",icon:()=>e(d,{name:"common-copy",size:"14"},null)},cut:{label:c("file.fileOperation.cut"),key:"cut",icon:()=>e(d,{name:"file-cut",size:"16"},null)},permission:{label:c("file.fileOperation.permission"),key:"permission",icon:()=>e(d,{name:"file-dir-permission",size:"14"},null)},compression:{label:c("file.contextMenu.createCompression"),key:"compression",icon:()=>e(d,{name:"file-compression",size:"16"},null)},decompress:{label:c("file.fileOperation.decompress"),key:"decompress",icon:()=>e(d,{name:"file-compression",size:"16"},null)},conversion:{label:c("file.contextMenu.formatConversion"),key:"conversion",icon:()=>e(d,{name:"file-conversion",size:"16"},null)},del:{label:c("Public.Btn.Delete"),key:"del",icon:()=>e(d,{name:"file-recycling-bin",size:"16"},null)},refresh:{label:c("Public.Btn.Refresh"),key:"refresh",icon:()=>e(d,{name:"base-refresh",size:"14"},null)},upload:{label:c("Public.Btn.Upload"),key:"upload",icon:()=>e(d,{name:"file-upload",size:"16"},null)},create:{label:c("file.contextMenu.newFolderFile"),key:"create",icon:()=>e(d,{name:"base-dir",size:"14"},null),children:[{label:c("file.contextMenu.newFolder"),key:"createDir",icon:()=>e(d,{name:"base-dir",size:"14"},null)},{label:c("file.contextMenu.newFile"),key:"createFile",icon:()=>e(d,{name:"base-file",size:"14"},null)}]},download:{label:c("Public.Btn.Download"),key:"download",icon:()=>e(d,{name:"file-download",size:"16"},null)},terminal:{label:c("file.contextMenu.terminal"),key:"terminal",icon:()=>e(d,{name:"file-terminal",size:"16"},null)},paste:{label:c("file.contextMenu.paste"),key:"paste",icon:()=>e(d,{name:"file-paste",size:"16"},null)},open:{label:c("file.fileOperation.open"),key:"open",icon:()=>e(d,{name:"file-open",size:"16"},null)},openNewWindow:{label:c("file.contextMenu.openInNewWindow"),key:"openNewWindow",icon:()=>e(d,{name:"file-new-window",size:"14"},null)},share:{label:c("file.contextMenu.externalShare"),key:"share",icon:()=>e(d,{name:"file-share",size:"16"},null)},unShare:{label:c("file.contextMenu.cancelShare"),key:"unShare",icon:()=>e(d,{name:"file-share",size:"16"},null)},favorite:{label:c("file.contextMenu.addToFavorites"),key:"favorite",icon:()=>e(d,{name:"file-favorite",size:"14"},null)},unfavorite:{label:c("file.contextMenu.removeFromFavorites"),key:"unfavorite",icon:()=>e(d,{name:"file-favorite",size:"14"},null)},rename:{label:c("file.fileOperation.rename"),key:"rename",icon:()=>e(d,{name:"file-rename",size:"16"},null)},attrs:{label:c("file.contextMenu.properties"),key:"attrs",icon:()=>e(d,{name:"file-attrs",size:"16"},null)},"new-window":{label:c("file.contextMenu.openInNewWindow"),key:"new-window",icon:()=>e(d,{name:"file-new-window",size:"14"},null)},top:{label:c("file.contextMenu.pinToTop"),key:"top",icon:()=>e(d,{name:"file-top",size:"18"},null)},"file-sync":{label:c("file.contextMenu.fileSync"),key:"file-sync",icon:()=>e(d,{name:"common-copy",size:"16"},null)},scan:{label:c("file.contextMenu.malwareScan"),key:"scan",icon:()=>e(d,{name:"file-scan",size:"16"},null)},duplicate:{label:c("file.contextMenu.createCopy"),key:"duplicate",icon:()=>e(d,{name:"common-copy",size:"16"},null)},preview:{label:c("Public.Btn.Preview"),key:"preview",icon:()=>e(d,{name:"drag-preview",size:"14"},null)},playVideo:{label:c("Public.Btn.Play"),key:"playVideo",icon:()=>e(d,{name:"file-play-video",size:"16"},null)}});function D(){u.value=!1}function P(x,f){x.preventDefault(),u.value=!1,y.value=f,ce().then(()=>{u.value=!0,v.value=x.clientX,k.value=x.clientY})}return h({filesOperation:P}),(x,f)=>{const _=Ce;return C(),V(_,{placement:"bottom-start",trigger:"manual",x:n(v),y:n(k),options:n(b),show:n(u),"on-clickoutside":D,onSelect:T},null,8,["x","y","options","show"])}}}),mo={key:0,class:"operation-wrapper"},vo={class:"mr-4px"},_o={class:"mr-4px"},ho=K({__name:"FileOperation",props:{file:{}},setup(L){const h=L,c=a(),r=j("fileStore"),{isMiniScreen:l}=r,{t:p}=ee(),u=a([{label:p("Public.Btn.Download"),value:"download",handle:()=>H("download",r)},{label:p("Public.Btn.Copy"),value:"copy",handle:()=>H("copy",r)},{label:p("file.fileOperation.cut"),value:"cut",handle:()=>H("cut",r)},{label:p("file.fileOperation.rename"),value:"rename",handle:()=>H("rename",r)},{label:p("file.fileOperation.PMSN"),value:"permission",handle:()=>H("permission",r)},{label:p("file.fileOperation.compress"),value:"compress",handle:()=>H("compression",r)},{label:p("Public.Btn.Delete"),value:"delete",handle:()=>H("del",r)}]),y=N(()=>{if(je(h.file))return[{label:p("Public.Btn.Preview"),value:"preview",handle:()=>ln(r,h.file.path)},...u.value];if(h.file.type==="dir"){const b=[...u.value],T=b.findIndex(R=>R.value=="download");return b.splice(T,1),[{label:p("file.fileOperation.open"),value:"open",handle:()=>H("open",r)},...b]}if(an(h.file))return[{label:p("Public.Btn.Edit"),value:"edit",handle:()=>H("edit",r)},...u.value];if(sn(h.file.ext)){const b=[...u.value];return b.splice(-2,0,{label:p("file.fileOperation.decompress"),value:"decompress",handle:()=>H("decompress",r)}),b}return u.value});function v(b,T){const{choosedKeys:R}=T;let $="empty";b.target.closest("tr")&&(R.value.length>1?$="multiple":R.value.length==1?$="single":$="empty"),ce(()=>c.value.filesOperation(b,$))}function k(b){v(b,r)}return(b,T)=>{const R=ie,$=d;return C(),M(Y,null,[n(l)?(C(),V(R,{key:1,text:"",type:"primary","icon-placement":"right",onClick:k},{default:m(()=>[g("span",_o,F(b.$t("Public.Table.Action")),1),e($,{name:"down",size:"14"})]),_:1})):(C(),M("div",mo,[(C(!0),M(Y,null,de(n(y),D=>(C(),V(R,{key:D.value,text:"",type:"primary",onClick:Be(D.handle,["stop"])},{default:m(()=>[E(F(D.label),1)]),_:2},1032,["onClick"]))),128)),e(R,{text:"",type:"primary","icon-placement":"right",onClick:k},{default:m(()=>[g("span",vo,F(b.$t("Public.Btn.More")),1),e($,{name:"down",size:"14"})]),_:1})])),e(xe,{ref_key:"fileOperationContextRef",ref:c},null,512)],64)}}}),yo=q(ho,[["__scopeId","data-v-8efd67c4"]]),bo={key:1,class:"i-svg-spinners:90-ring-with-bg text-[#36ad6a] text-7"},ko=K({__name:"CalcSize",props:{path:{}},setup(L){const{t:h}=ee(),c=L,r=a(-1),l=a(!1);async function p(){if(r.value==-1)l.value=!0,r.value=await rn(c.path),l.value=!1;else return}return(u,y)=>{const v=ie;return n(l)?(C(),M("i",bo)):(C(),V(v,{key:0,text:"",type:"primary",onClick:p},{default:m(()=>[E(F(n(r)!==-1?n(r):n(h)("file.tableFooter.calculate")),1)]),_:1}))}}});function go(L){return typeof L=="function"||Object.prototype.toString.call(L)==="[object Object]"&&!Ut(L)}const wo=K({__name:"FileTable",setup(L){const h=j("fileStore"),{sort:c,reverse:r,tableRef:l,fileList:p,choosedKeys:u,tableLoading:y,contextRef:v,currentFile:k,dataTableRef:b}=h,T=a({}),R=t=>t.nm,$=t=>({"data-key":t.nm,onContextmenu(s){s.preventDefault(),fn(s,h)},onDblclick(){un(h,t)},onMouseenter(){t.operation_show=!0},onMouseleave(){t.operation_show=!1}}),D=t=>u.value.includes(t.nm)?"active-row normal-tr-".concat(t.nm):"normal-tr-".concat(t.nm),{t:P}=ee(),x=a([{type:"selection",width:40,className:"file-checkbox",cellProps(){return{style:{cursor:"pointer"}}}},{title:()=>P("file.fileName"),key:"name",width:"22%",minWidth:164,sorter:!0,sortOrder:!1,render(t){return t.isCreate?e("div",{class:"flex justify-between items-center gap-2.5 w-100%"},[e("div",{class:"flex justify-start items-center"},[e(ue,{ext:t.ext},null),e(fe,{"input-props":{autocomplete:"on",name:"filename"},value:t.editName,"onUpdate:value":s=>t.editName=s,autofocus:!0,id:"createInput",onKeydown:s=>{s.key==="Enter"&&(s.preventDefault(),se(h))},onBlur:()=>{se(h)}},null)])]):e("div",{class:"flex cursor-pointer",onClick:()=>dn(h,t)},[e("div",{class:"flex-1 flex items-center w-0 gap-4px"},[e("div",{class:"flex-1 w-0 flex items-center"},[e("div",{class:"flex items-center"},[e(ue,{ext:t.ext},null)]),e("div",{class:"min-w-0"},[e(_e,null,{default:()=>[e("span",{class:"hover:text-primary cursor-pointer"},[t.lnk?t.nm+t.lnk:t.nm])]})])]),e("div",{class:"flex items-center gap-4px"},[t.isShare?e(d,{name:"file-share",size:"16"},null):null,t.isFavorite?e(d,{name:"file-favorite",size:"16"},null):null])])])}},{title:()=>P("file.protected"),key:"protection",width:"8%",minWidth:114,render:t=>e("div",{class:"flex justify-start gap-4px items-center cursor-pointer",onClick:()=>pn(h,t)},[e("span",{class:t.protected===1?"text-primary":""},[t.protected==1?P("file.protectedStatus"):P("file.unprotectedStatus")]),e(d,{size:"14",name:t.protected==1?"file-lock":"file-unlock",class:t.protected===1?"text-primary":"text-weak"},null)])},{title:"PMSN/Owner",key:"accept",width:"8%",minWidth:108,sorter:!0,sortOrder:!1,render(t){return"".concat(t.acc," / ").concat(t.user)}},{title:()=>P("file.size"),key:"size",width:"7%",minWidth:90,sorter:!0,sortOrder:!1,render(t){if(t.type==="dir")return e(ko,{path:t.path},null);{let s;return e(ie,{type:"primary",text:!0},go(s=Ft(t.sz))?s:{default:()=>[s]})}}},{title:()=>P("file.modifyTime"),key:"mtime",width:"10%",minWidth:140,sorter:!0,sortOrder:!1,render(t){return Tt(t.mt)}},{title:()=>P("file.remarks"),key:"rmk",minWidth:164,render(t){return e("div",{class:"min-w-134px min-h-26px",onMouseenter:()=>i(t),onMouseleave:()=>o(t)},[t.remarks_hover?e(fe,{value:t.editRemarks,"onUpdate:value":s=>t.editRemarks=s,size:"small",onClick:s=>{s.preventDefault(),t.isEditRemarks=!0,T.value=t,k.value=t,k.value.editRemarks=t.rmk,k.value.isEditRemarks=!0},onBlur:()=>{se(h)},onKeydown:s=>{s.key==="Enter"&&(s.preventDefault(),se(h))}},null):e("span",{title:t.rmk},[t.rmk])])}},{title:()=>P("file.operation"),key:"operation",width:"22%",maxWidth:340,align:"right",render(t){if(t.operation_show||u.value.includes(t.nm))return e(yo,{file:t},null)}}]),f=t=>{x.value.forEach(s=>{const S=s;S.key===t.columnKey?S.sortOrder=t.order:S.sortOrder=!1}),Dt(t.order)?(r.value=t.order==="ascend"?"False":"True",c.value="".concat(t.columnKey)):(c.value="",r.value="False"),oe(h)};function _(t){u.value=t}function i(t){t.remarks_hover=!0,t.editRemarks=t.rmk}function o(t){t.isEditRemarks||(t.remarks_hover=!1)}return ve(u,()=>ke(h)),ne(()=>{cn(h),l.value.oncontextmenu=t=>{t.preventDefault(),!t.target.closest("tr")&&(u.value.length,v.value.filesOperation(t))}}),(t,s)=>{const S=wn;return C(),M(Y,null,[g("div",{ref_key:"tableRef",ref:l,class:"h-full relative"},[e(S,{class:"h-full",ref_key:"dataTableRef",ref:b,"flex-height":"",columns:n(x),"row-key":R,data:n(p),"row-class-name":D,"on-update:checked-row-keys":_,"row-props":$,"checked-row-keys":n(u),loading:n(y),"scrollbar-props":{trigger:"none"},"onUpdate:sorter":f},null,8,["columns","data","checked-row-keys","loading"])],512),e(xe,{ref_key:"contextRef",ref:v},null,512)],64)}}}),Co=q(wo,[["__scopeId","data-v-14098e72"]]),xo={class:"h-full overflow-auto"},$o=["onMouseenter","onMouseleave","onClick","data-key","onContextmenu","onDblclick"],Po={class:"single-line-ellipsis"},zo=["onMouseenter","onMouseleave","onClick","data-key","onContextmenu"],So=K({__name:"CardList",setup(L){const h=j("fileStore"),{normalCardList:c,cardRectArr:r,fileList:l,choosedKeys:p,tableLoading:u,currentFile:y}=h,v=a(),k=a(),b=a();ve(y,i=>{i!=null&&i.isCreate&&ce(()=>{const o=k.value.querySelector("input");o&&(o.focus(),o.select())})});const T=N(()=>l.value.map(i=>(p.value.includes(i.nm)?i.card_choosed=!0:i.card_choosed=!1,i)));ne(()=>{b.value=mn(k,D,x),k.value.oncontextmenu=i=>{i.preventDefault(),!i.target.closest("div.file-item")&&(p.value.length,v.value.filesOperation(i))}}),Bt(()=>{k.value.oncontextmenu=null});async function R(i){i.isRenameForCard||(p.value=[i.nm],i.type==="dir"&&await vn(h))}function $(i){i.isRenameForCard||i.type!=="dir"&&(p.value=[i.nm],_n(h))}function D(i){const o=[];for(let t=0;t1?v.value.filesOperation(i,"multiple"):(p.value.length==1||(p.value=[o.nm]),v.value.filesOperation(i,"single"))}return(i,o)=>{const t=Je,s=fe,S=Cn;return C(),M("div",xo,[e(S,{show:n(u),class:"h-full"},{default:m(()=>[g("div",{class:"card-list",ref_key:"cardListRef",ref:k,onContextmenu:f},[(C(!0),M(Y,null,de(n(T),z=>(C(),M(Y,{key:z.nm},[!z.isRenameForCard&&!z.isCreate?(C(),V(t,{key:0,trigger:"hover",placement:"bottom"},{trigger:m(()=>[g("div",{class:te(["file-item",{active:z.card_hover||z.card_choosed}]),onMouseenter:I=>n(Me)(z),onMouseleave:I=>n(Ie)(z),onClick:I=>R(z),"data-key":z.nm,onContextmenu:I=>_(I,z),onDblclick:I=>$(z)},[e(ue,{ext:z.ext,size:"large"},null,8,["ext"]),g("span",Po,F(z.nm),1)],42,$o)]),default:m(()=>[E(" "+F(z.nm),1)]),_:2},1024)):z.isRenameForCard||z.isCreate?(C(),M("div",{key:1,class:te(["file-item",{active:z.card_hover||z.card_choosed}]),onMouseenter:I=>n(Me)(z),onMouseleave:I=>n(Ie)(z),onClick:I=>R(z),"data-key":z.nm,onContextmenu:I=>_(I,z)},[e(ue,{ext:z.ext,size:"large"},null,8,["ext"]),e(s,{value:z.editName,"onUpdate:value":I=>z.editName=I,size:"small",autofocus:"",autoselect:"",onClick:Be(()=>!1,["stop"]),onKeydown:o[0]||(o[0]=we(()=>n(se)(n(h)),["enter"]))},null,8,["value","onUpdate:value"])],42,zo)):Q("",!0)],64))),128))],544)]),_:1},8,["show"]),e(xe,{ref_key:"contextRef",ref:v},null,512)])}}}),Ro=q(So,[["__scopeId","data-v-ae5d241c"]]),Oo={class:"flex items-center justify-between"},Do={class:"flex justify-start items-center whitespace-pre"},Fo={key:1,class:"i-svg-spinners:90-ring-with-bg text-7 text-primary"},To=K({__name:"FileTableFooter",setup(L){const{t:h}=ee(),c=j("fileStore"),{dirNums:r,fileNums:l,page:p,size:u,total:y,currentPath:v,currentDirSize:k}=c,b=a(!1),T=[100,500,1e3,1500,2e3];async function R(){try{b.value=!0;const $=await Ne.post("/files?action=GetDirSize",{path:v.value},{requestOptions:{isOriginalResult:!0}});k.value=$.message}catch($){console.warn($)}finally{b.value=!1}}return($,D)=>{const P=ie,x=Sn;return C(),M("div",Oo,[g("div",Do,[E(F(n(h)("file.tableFooter.summary",{dirNum:n(r),fileNum:n(l)}))+" ",1),n(b)?(C(),M("i",Fo)):(C(),M(Y,{key:0},[n(k)===-1?(C(),V(P,{key:0,type:"primary",text:"",onClick:R},{default:m(()=>[E(F(n(h)("file.tableFooter.calculate")),1)]),_:1})):(C(),V(P,{key:1,text:"",type:"primary"},{default:m(()=>[E(F(n(k)),1)]),_:1}))],64))]),e(x,{page:n(p),"onUpdate:page":D[0]||(D[0]=f=>X(p)?p.value=f:null),"page-size":n(u),"onUpdate:pageSize":D[1]||(D[1]=f=>X(u)?u.value=f:null),"item-count":n(y),"page-sizes":T,onRefresh:D[2]||(D[2]=()=>n(oe)(n(c)))},null,8,["page","page-size","item-count"])])}}}),Lo={class:"flex flex-col gap-16px h-full p-16px overflow-hidden"},Eo=K({__name:"main",props:{path:{default:"/"},view:{default:"list"}},emits:["currentPathChange","viewChange","rendered"],setup(L,{emit:h}){const c=L,r=a(),l=An(),p=Kt();Ge("fileStore",l);const{dynamicCmpt:u,dynamicCmptRef:y,currentPath:v,filesView:k,choosedKeys:b,mainRef:T,currentFile:R,dragUploadRef:$}=l;v.value=c.path,k.value=c.view;const D=h;ve(v,x=>{sessionStorage.setItem("currentPath",x),D("currentPathChange",x)});function P(x){D("viewChange",{view:x,currentPath:v.value})}return Ue(()=>{oe(l),document.onkeydown=async x=>{var i,o,t;const f=x.target;if(!(f.tagName==="INPUT"||f.tagName==="TEXTAREA"||p.path!="/files"||(i=R.value)!=null&&i.isCreate||(o=R.value)!=null&&o.isEditRemarks||(t=R.value)!=null&&t.isRename||document.querySelector(".n-dialog"))){if(x.ctrlKey&&x.key==="c"){if(b.value.length==0)return;await He(l)}if(x.ctrlKey&&x.key==="v"&&Ye(l),x.ctrlKey&&x.key==="x"){if(b.value.length==0)return;qe(l)}}}}),Gt(()=>{oe(l)}),yn(l),ne(()=>D("rendered",v.value)),(x,f)=>{const _=xn;return C(),M("div",{ref_key:"mainRef",ref:T,class:"flex-1 overflow-hidden"},[g("div",Lo,[g("div",null,[e(po)]),e(_),g("div",null,[e(eo,{"files-view":n(k),"onUpdate:filesView":f[0]||(f[0]=i=>X(k)?k.value=i:null),onViewChange:P},null,8,["files-view"])]),g("div",{ref_key:"listRef",ref:r,class:"flex-1 overflow-hidden",tabindex:"0"},[n(k)=="list"?(C(),V(Co,{key:0})):n(k)=="card"?(C(),V(Ro,{key:1})):Q("",!0)],512),e(To)]),(C(),V(Ke(n(u)),{ref_key:"dynamicCmptRef",ref:y},null,512)),e(Kn,{ref_key:"dragUploadRef",ref:$},null,512),e(qn),e(Ln)],512)}}}),Mo={ref:"fileRef",id:"file-main",class:"p-16px"},Io={class:"tabs"},Vo={class:"tabs-wrapper",ref:"tabWrapperRef"},Ao=["onClick"],Wo={class:"flex justify-start gap-5"},No={class:"tab-tit"},Uo={class:"tab-tit"},Bo=K({__name:"index",setup(L){const{mainHeight:h}=jt(Lt()),c=N(()=>h.value-16-16),r=a(),l=a(!1),p={id:"tab-0",title:"www",path:"/www",view:"list"},u=he("file-tabs",[Ee(p)]),y=he("file-tabs-active","tab-0"),v=he("file-tabs-view","list");ve(y,f=>{const _=u.value.find(i=>i.id==f);_&&(v.value=_.view)},{immediate:!0});const k=N(()=>{const f=u.value.find(_=>_.id==y.value);return f?f.path:"tab-0"});function b(f="",_=""){if(u.value.length>=14){Ae.warning("Only 14 tags can be opened at most");return}const i="tab-".concat(new Date().getTime()),o=Ee(p);o.id=i,f&&(o.path=f),_&&(o.title=_),u.value.push(o),y.value=i}Ge("file-provide",{addTab:b});function T(f){if(u.value.length==1){y.value=u.value[0].id;return}const _=u.value.findIndex(i=>i.id==f);u.value.splice(_,1),setTimeout(()=>y.value=u.value[u.value.length-1].id,50)}function R(f){y.value=f}function $(f){const _=f.split("/").slice(-1)[0];u.value.forEach(i=>{i.id==y.value&&(i.path=f,i.title=_==""?"/":_)})}function D({view:f,path:_}){v.value=f,u.value.forEach(i=>{i.id==y.value&&(i.path=_,i.view=f)})}function P(f){f=="left"?r.value.scrollLeft-=100:f=="right"&&(r.value.scrollLeft+=100)}ne(()=>{r.value.addEventListener("mousewheel",f=>{f.preventDefault(),r.value.scrollLeft+=f.deltaY})});function x(){const f=Mt("Path");if(f){const _="tab-".concat(new Date().getTime());u.value.push({id:_,title:f,path:f,view:"list"});const i=u.value.find(o=>o.path==f);i&&(y.value=i.id)}It("Path")}return x(),ne(async()=>{await Et("/static/ace/styles/icons.css?v=1773287522785")}),(f,_)=>{const i=d,o=Je,t=$n;return C(),M("div",Mo,[e(t,{style:ge({height:n(c)+"px"}),"content-style":{display:"flex",flexDirection:"column",overflow:"hidden"}},{default:m(()=>[g("div",Io,[g("div",{class:te(["tabs-scroll",{"has-scroll":n(l)}]),ref:"tabScrollRef"},[n(l)?(C(),M("div",{key:0,class:"left",onClick:_[0]||(_[0]=s=>P("left"))},_[3]||(_[3]=[g("i",{class:"i-tdesign:caret-left text-7"},null,-1)]))):Q("",!0),n(l)?(C(),M("div",{key:1,class:"right",onClick:_[1]||(_[1]=s=>P("right"))},_[4]||(_[4]=[g("i",{class:"i-tdesign:caret-right text-7"},null,-1)]))):Q("",!0),g("div",{class:"scroll-container",ref_key:"tabScrollContainerRef",ref:r},[g("div",Vo,[(C(!0),M(Y,null,de(n(u),s=>(C(),V(o,{placement:"bottom",key:s.id},{trigger:m(()=>[g("div",{class:te(["tab-item",{active:s.id==n(y)}]),onClick:S=>R(s.id)},[g("div",Wo,[e(i,{name:"file-dir",size:"18"}),g("span",No,F(s.title),1)]),s.id==n(y)&&n(u).length>1?(C(),V(i,{key:0,name:"base-error",size:"18",color:"#bbb",onClick:S=>T(s.id)},null,8,["onClick"])):Q("",!0)],10,Ao)]),default:m(()=>[g("span",Uo,F(s.title),1)]),_:2},1024))),128)),g("div",{class:"tab-item add",onClick:_[2]||(_[2]=s=>b())},_[5]||(_[5]=[g("i",{class:"i-pixel:plus-solid text-14px text-primary"},null,-1)]))],512)],512)],2)]),(C(),V(Ht,null,[(C(),V(Ke(Eo),{key:n(y),onCurrentPathChange:$,path:n(k),view:n(v),onViewChange:D},null,40,["path","view"]))],1024))]),_:1},8,["style"])],512)}}}),ei=q(Bo,[["__scopeId","data-v-8d5a5a1e"]]);export{ei as default};