const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/ssl-log.js?v=1764233927359","js/index104.js?v=1764233927359","js/page_layout.js?v=1764233927359","js/vue.js?v=1764233927359","js/__commonjsHelpers__.js?v=1764233927359","js/naive.js?v=1764233927359","js/common.js?v=1764233927359","js/public.js?v=1764233927359","css/public.css?v=1764233927359","css/page_layout.css?v=1764233927359","css/index19.css?v=1764233927359"])))=>i.map(i=>d[i]);
import{bf as s,_ as a,T as t,a as e,d as o,m as i,p as n}from"./page_layout.js?v=1764233927359";import{_ as l}from"./index.js?v=1764233927359";import{e as r,y as c,z as p}from"./public.js?v=1764233927359";import{k as u,P as d,r as m,o as _,b as w,R as f,V as g,W as h,a3 as k,S as v,U as y,a4 as S,_ as T}from"./vue.js?v=1764233927359";import{bH as b}from"./naive.js?v=1764233927359";const x=()=>s.post("/ssl_domain?action=get_panel_domain"),j=a=>s.post("/ssl_domain?action=set_panel_domain_ssl",{domain:JSON.stringify(a.domain)},{requestOptions:{loading:"Installing certificate, please wait...",successMessage:!1}}),D={class:"panel-ssl-progress"},J={class:"progress-label"},L={class:"w-120px"},E=n(u({__name:"ssl-lets-progress",props:{task_id:{type:Number,default:0},isJump:{type:Boolean,default:!0},onFinish:{type:Function,default:()=>{}}},emits:["close"],setup(n,{emit:u}){const x=T(()=>e(()=>import("./ssl-log.js?v=1764233927359"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),{t:j}=d(),E=u,F=m({});let I=null;const O=m(!1),z=r(j("SSL.Domain.index_5")),C=async(a=!1)=>{var t,e;try{a&&(O.value=!0);const{message:r}=await(e={task_id:n.task_id},s.post("/ssl_domain?action=ssl_tasks_status",e));if(o(r)&&(F.value=r,-1===r.task_code)){E("close");const s=r.task_result.match(/Error:\s*(\[[\s\S]+\])$/);if(s&&s[1]){const a=s[1];try{const s=c.parse(a);p(s)}catch(l){i.error(j("SSL.index_31"))}}else i.error(j("SSL.index_31"));return}100===F.value.task_status?(I&&clearTimeout(I),E("close"),null==(t=n.onFinish)||t.call(n),i.success(j("Config.Safe.Ssl.index_11")),n.isJump&&setTimeout(()=>{window.location.href=window.location.href.split("?")[0]+"?_t="+Date.now()},1e3)):N()}catch(l){n.isJump&&setTimeout(()=>{window.location.href=window.location.href.split("?")[0]+"?_t="+Date.now()},1e3)}finally{a&&(O.value=!1)}},N=()=>{I&&clearTimeout(I),I=window.setTimeout(()=>{C()},3e3)};return _(()=>{C(!0)}),w(()=>{I&&(clearTimeout(I),I=null)}),(s,e)=>{const o=b,i=a,n=t,r=l;return g(),f("div",D,[h(n,{show:y(O)},{default:k(()=>[v("div",{class:"progress-item",onClick:e[0]||(e[0]=s=>{return a=y(F),z.data.path=a.task_log,void(z.show=!0);var a})},[v("span",J,S(y(F).task_name),1),v("div",L,[h(o,{percentage:y(F).task_status,type:"line",status:"success",processing:100!==y(F).task_status,"indicator-placement":"inside"},null,8,["percentage","processing"])]),h(i,{name:"base-left-logs",size:"18"})])]),_:1},8,["show"]),h(r,{show:y(z).show,"onUpdate:show":e[1]||(e[1]=s=>y(z).show=s),title:y(z).title,data:y(z).data,width:700,height:450,footer:!1,component:y(x)},null,8,["show","title","data","component"])])}}}),[["__scopeId","data-v-82c005c3"]]);export{E as a,x as g,j as s};
