import{m as s,b as a,c as t,W as e,X as n,i,bA as o,u as l}from"./page_layout.js?v=1763625242172";import{a as c,b as r,m}from"./public.js?v=1763625242172";import{u}from"./soft.js?v=1763625242172";const p=async e=>{const{close:i}=s.loading("Processing, please wait...");try{const{message:s}=await a({sName:e});if(t(s)){const a=s.versions[0].full_version;c({title:"Install plugin",content:"Are you sure to install [".concat(s.title," v").concat(a,"] plugin?"),onConfirm:async()=>{s.status?await o({sName:s.name,version:a,upgrade:a}):await o({sName:s.name,version:a}),n()}})}}finally{i()}},g=async(o,l)=>{const{close:r}=s.loading("Processing, please wait...");try{const{message:s}=await a({sName:o});if(t(s)){const a=s.versions[0].full_version;c({title:"Install plugin",content:"Are you sure to install [".concat(s.title," v").concat(a,"] plugin?"),onConfirm:async()=>{const{message:o}=await e({sName:s.name,version:a,upgrade:a,type:1});if(t(o)){if(o.result)return void n();await u({name:o.name,tmp_path:o.tmp_path,title:i.global.t("Soft.index_21")},(()=>{null==l||l()}))}}})}}finally{r()}},f=async(e,n,i=!1)=>l().isFree?(r({source:n}),Promise.reject()):await(async(e,n=!0)=>{let i;n&&(i=s.loading("Processing, please wait..."));try{const{message:s}=await a({sName:e});return t(s)&&s.setup?s:(m(e),Promise.reject())}finally{n&&(null==i||i.close())}})(e,i),y=s=>{const a=s.replace(/-+[{0-9},.,]+$/,"");return"/static/img/soft_ico/ico-".concat(a,".png")};export{f as c,y as g,p as i,g as u};
