const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/ssl-log.js?v=1763625242172","js/index104.js?v=1763625242172","js/page_layout.js?v=1763625242172","js/vue.js?v=1763625242172","js/__commonjsHelpers__.js?v=1763625242172","js/naive.js?v=1763625242172","js/common.js?v=1763625242172","js/public.js?v=1763625242172","css/public.css?v=1763625242172","css/page_layout.css?v=1763625242172","css/index19.css?v=1763625242172"])))=>i.map(i=>d[i]);
import{bf as s,a,c as t,m as e,_ as o,T as i,p as n}from"./page_layout.js?v=1763625242172";import{_ as l}from"./index.js?v=1763625242172";import{e as r,y as c,z as p}from"./public.js?v=1763625242172";import{k as u,P as m,r as d,o as _,b as w,R as f,S as g,X as h,a3 as k,U as v,V as y,a4 as S,_ as T}from"./vue.js?v=1763625242172";import{bH as b}from"./naive.js?v=1763625242172";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((()=>a((()=>import("./ssl-log.js?v=1763625242172")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])))),{t:j}=m(),E=u,F=d({});let I=null;const O=d(!1),z=r(j("SSL.Domain.index_5")),C=async(a=!1)=>{var o,i;try{a&&(O.value=!0);const{message:r}=await(i={task_id:n.task_id},s.post("/ssl_domain?action=ssl_tasks_status",i));if(t(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){e.error(j("SSL.index_31"))}}else e.error(j("SSL.index_31"));return}100===F.value.task_status?(I&&clearTimeout(I),E("close"),null==(o=n.onFinish)||o.call(n),e.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,a)=>{const t=b,e=o,n=i,r=l;return f(),g("div",D,[h(n,{show:y(O)},{default:k((()=>[v("div",{class:"progress-item",onClick:a[0]||(a[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(t,{percentage:y(F).task_status,type:"line",status:"success",processing:100!==y(F).task_status,"indicator-placement":"inside"},null,8,["percentage","processing"])]),h(e,{name:"base-left-logs",size:"18"})])])),_:1},8,["show"]),h(r,{show:y(z).show,"onUpdate:show":a[1]||(a[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};
