const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/backup-success.js?v=1764830988434","js/public.js?v=1764830988434","js/page_layout.js?v=1764830988434","js/vue.js?v=1764830988434","js/__commonjsHelpers__.js?v=1764830988434","js/naive.js?v=1764830988434","js/common.js?v=1764830988434","css/page_layout.css?v=1764830988434","css/public.css?v=1764830988434","js/backup-error.js?v=1764830988434"])))=>i.map(i=>d[i]);
import{_ as e,a as s,d as a,n as t}from"./page_layout.js?v=1764830988434";import{_ as o}from"./index.js?v=1764830988434";import{_ as i}from"./index102.js?v=1764830988434";import{J as n,K as r}from"./utils.js?v=1764830988434";import{e as p,a as c}from"./public.js?v=1764830988434";import{k as _,P as l,e as m,o as u,b as f,R as d,V as k,an as g,W as h,S as b,a3 as w,a2 as x,U as j,_ as y}from"./vue.js?v=1764830988434";import{bH as v,da as C}from"./naive.js?v=1764830988434";import"./common.js?v=1764830988434";import"./__commonjsHelpers__.js?v=1764830988434";import"./soft.js?v=1764830988434";import"./site.js?v=1764830988434";const I={class:"p-16px"},B={class:"h-250px"},R=_({__name:"index",props:{onRefresh:{},type:{default:"backup"}},emits:["close"],setup(_,{emit:R}){const{t:z}=l(),E=y(()=>s(()=>import("./backup-success.js?v=1764830988434"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),D=y(()=>s(()=>import("./backup-error.js?v=1764830988434"),__vite__mapDeps([9,1,2,3,4,5,6,7,8]))),P=R,U=_,V=p("backup"===U.type?z("Config.Backup.index_80"):z("Config.Backup.index_81")),A=p("backup"===U.type?z("Config.Backup.index_82"):z("Config.Backup.index_83")),H=m({}),L=()=>{const e="backup"===U.type?z("Config.Backup.index_78"):z("Config.Backup.index_79");c({title:z("Config.Backup.index_14"),content:e,onConfirm:async()=>{T&&clearInterval(T),await n({timestamp:void 0}),O()}})},O=()=>{T&&clearInterval(T),P("close"),U.onRefresh()};let T=null;const J=async()=>{const{message:e}=await r({type:U.type});if(a(e)){if(H.task_msg=e.task_msg,H.exec_log=e.exec_log,H.progress=e.progress,100!==e.progress&&2!==e.task_status&&3!==e.task_status||T&&clearInterval(T),2===e.task_status||3===e.task_status)return U.onRefresh(),V.data.type=U.type,V.data.backup_file_info={name:e.backup_file_info.backup_name,files_size:t(Number(e.backup_file_info.backup_file_size)),end_time:e.backup_file_info.done_time,time_count:"backup"===U.type?e.backup_file_info.total_time:e.backup_file_info.restore_total_time,backup_file_sha256:e.backup_file_info.backup_file_sha256},V.show=!0,void(T&&clearInterval(T));3===e.task_status&&(U.onRefresh(),A.data.errData=e.err_info,A.show=!0,T&&clearInterval(T))}};return u(()=>{J(),T=window.setInterval(()=>{J()},2e3)}),f(()=>{T&&clearInterval(T)}),(s,a)=>{const t=v,n=e,r=C,p=i,c=o;return k(),d("div",I,[g("",!0),h(r,{class:"flex-nowrap! items-center my-10px",size:5},{default:w(()=>[h(t,{height:24,percentage:j(H).progress,"indicator-placement":"inside",processing:j(H).progress<100,status:"success"},null,8,["percentage","processing"]),j(H).progress<100?(k(),x(n,{key:0,name:"base-error",class:"text-error",size:20,onClick:L})):g("",!0)]),_:1}),b("div",B,[h(p,{log:j(H).exec_log},null,8,["log"])]),h(c,{show:j(V).show,"onUpdate:show":a[0]||(a[0]=e=>j(V).show=e),title:j(V).title,data:j(V).data,width:"600","min-height":350,component:j(E),onClose:O},null,8,["show","title","data","component"]),h(c,{show:j(A).show,"onUpdate:show":a[1]||(a[1]=e=>j(A).show=e),title:j(A).title,data:j(A).data,width:"600","min-height":350,component:j(D),onClose:O},null,8,["show","title","data","component"])])}}});export{R as default};
