System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./useLoop-legacy-CgPln_xQ.js?v=1773287522785","./FileIcon-legacy-CYrICTNK.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./soft-legacy-CzxZ2w7j.js?v=1773287522785","./copy-legacy-CoXPjkKf.js?v=1773287522785"],(function(e,t){"use strict";var l,s,a,n,o,i,c,r,p,d,u,x,g,f,m,v,y,k,b,h,w,j,_,C,T,$,L,P,F,H,R;return{setters:[e=>{l=e.c,s=e.i,a=e.C,n=e.n,o=e.h},e=>{i=e.u},e=>{c=e.a1,r=e.w,p=e.a2},e=>{d=e.k,u=e.al,x=e.w,g=e.$,f=e.Z,m=e.n,v=e.R,y=e.r,k=e.c,b=e._,h=e.a0,w=e.a9,j=e.aa,_=e.S,C=e.j,T=e.a8,$=e.F,L=e.P,P=e.ak},e=>{F=e.n,H=e.B,R=e.ab},null,null,null],execute:function(){var t=document.createElement("style");t.textContent=".task-logs[data-v-ee8b8ada]{height:180px;line-height:1.4;padding:10px;background-color:#333;border-bottom-left-radius:10px;border-bottom-right-radius:10px;color:#ececec;overflow:auto}.task-logs[data-v-93cb7b82]{max-height:180px;padding:10px;background-color:#333;border-bottom-left-radius:10px;border-bottom-right-radius:10px;color:#ececec;overflow:auto}\n/*$vite$:1*/",document.head.appendChild(t);const I=["innerHTML"],S=l(d({__name:"FileTaskLogs",props:{value:{type:String,default:""}},setup(e){const t=e,l=u("logsRef");return x((()=>t.value),(()=>{m((()=>{const e=l.value;if(e){const{scrollHeight:t}=e;e.scrollTop=t}}))}),{immediate:!0}),(t,s)=>(g(),f("div",{ref_key:"logsRef",ref:l,class:"task-logs",innerHTML:e.value||t.$t("file.task.noLogs")},null,8,I))}}),[["__scopeId","data-v-ee8b8ada"]]),B={class:"p-16px"},E={class:"flex items-center justify-between h-36px px-10px rounded-tl-10px rounded-tr-10px bg-#f5f5f5"},M={class:"max-w-360px"},q={class:"text-desc text-14px"},A={key:0,class:"p-10px"},D={class:"flex items-center justify-between mt-4px"},O={class:"flex"},Z={class:"mr-24px"},z={key:2,class:"mt-10px"},G={class:"flex items-center justify-between h-36px px-10px rounded-tl-10px rounded-tr-10px bg-#f5f5f5"},J={class:"text-desc text-14px"},K={class:"flex-1 w-0"},N={class:"min-w-0"},Q={class:"text-weak text-14px"},U=["onClick"];e("default",l(d({__name:"FileTask",props:{taskList:{type:Array,default:()=>[]},store:{type:Object,required:!0}},emits:["close"],setup(e,{emit:t}){const l=t,{t:d}=v(),u=y(e.taskList),x=k((()=>u.value[0]||{log:"",name:"",shell:""})),m=async()=>{const{message:t}=await c();n(t)&&t.length>0?u.value=t:(r(e.store),l("close"))},{loop:I,clearTimer:V}=i(m,2);I();const W=e=>{o({title:d("file.task.deleteTask"),content:d("file.task.confirmDeleteTask",{name:e.name,shell:e.shell}),onConfirm:async()=>{await p(e.id),(async()=>{V(),await m(),I()})()}})};return(e,t)=>{const l=F,n=H,o=R;return g(),f("div",B,[b("div",E,[b("div",M,[h(l,null,{default:w((()=>[b("span",q,j(_(x).name+e.$t("Public.Punctuation.Colon")+_(x).shell),1)])),_:1})]),h(n,{type:"primary",text:"",onClick:t[0]||(t[0]=e=>W(_(x)))},{default:w((()=>[C(j(e.$t("Public.Btn.Cancel")),1)])),_:1})]),_(s)(_(x).log)?(g(),f("div",A,[h(o,{type:"line",height:3,"show-indicator":!1,percentage:_(x).log.pre||0},null,8,["percentage"]),b("div",D,[b("span",O,[b("span",Z,j(_(x).log.used)+" / "+j(_(a)(_(x).log.total)),1),b("span",null,j(e.$t("file.task.estimatedRemaining"))+": "+j(_(x).log.total),1)]),b("span",null,j(_(x).log.speed)+"/s",1)])])):(g(),T(S,{key:1,value:_(x).log},null,8,["value"])),_(u).length>1?(g(),f("div",z,[b("div",G,[b("span",J,j(e.$t("file.task.waitingTasks")),1)]),(g(!0),f($,null,L(_(u).slice(1),(s=>(g(),f("div",{key:s.id,class:"flex items-center h-36px px-10px"},[b("div",K,[b("div",N,[h(l,null,{default:w((()=>[b("span",Q,j(s.name+e.$t("Public.Punctuation.Colon")+s.shell),1)])),_:2},1024)])]),b("div",{class:"flex items-center ml-12px cursor-pointer",onClick:e=>W(s)},t[1]||(t[1]=[b("i",{class:"i-streamline:delete-1-solid text-10px text-error"},null,-1)]),8,U)])))),128))])):P("",!0)])}}}),[["__scopeId","data-v-93cb7b82"]]))}}}));
