import{u as e,e as s,a as t,b as a,d as n,s as i,_ as o,R as l}from"./tableColumns.js?v=1753954525509";import{cO as r,c as p,cl as m,cI as u,e as c,cg as _,cJ as d,cK as f,x as g,o as v}from"./page_layout.js?v=1753954525509";import{ay as x,cD as y}from"./naive.js?v=1753954525509";import{k as h,r as w,U as b,a1 as j,a2 as k,Q as S,q as C,X as R,ah as U,V as $,W as z,a3 as L,j as P,P as N,w as B,N as H}from"./vue.js?v=1753954525509";import{R as I,b as q,h as D,K as F,L as K,M,N as A,a as J,d as O,c as Q,P as T,f as V}from"./public.js?v=1753954525509";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang4.js?v=1753954525509";import{_ as X}from"./index.vue_vue_type_script_setup_true_lang5.js?v=1753954525509";import{u as E}from"./soft.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang6.js?v=1753954525509";import"./soft2.js?v=1753954525509";import"./index.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1753954525509";const G=h({__name:"index",emits:["finish"],setup(e,{emit:s}){const t=s,a=w([]),n=async({file:e})=>{try{const s=new FormData;e.file&&s.append("plugin_zip",e.file);const{message:a}=await r(s);p(a)&&t("finish",a)}finally{a.value=[]}};return(e,s)=>{const t=x,i=m;return b(),j(i,{ref:"upload",class:"w-auto",action:"","file-list":R(a),"onUpdate:fileList":s[0]||(s[0]=e=>U(a)?a.value=e:null),"show-file-list":!1,multiple:!1,"custom-request":n},{default:k((()=>[S(t,{type:"primary"},{default:k((()=>[C(e.$slots,"default")])),_:3})])),_:3},8,["file-list"])}}}),Y={class:"box"},Z=c(h({__name:"index",setup(e){const s=u(),t=e=>{I(e,(()=>{s.setRefresh(!0)}))},a=()=>{window.open("https://www.aapanel.com/forum","_blank")};return(e,s)=>{const n=x;return b(),$("div",Y,[z("span",null,L(e.$t("Soft.index_22")),1),S(n,{type:"primary",class:"mx-10px",size:"small",onClick:a},{default:k((()=>[P(L(e.$t("Soft.index_23")),1)])),_:1}),S(G,{onFinish:t},{default:k((()=>[P(L(e.$t("Soft.index_24")),1)])),_:1})])}}}),[["__scopeId","data-v-86e313fd"]]),ee=h({__name:"index",setup(o){const{t:l}=N(),r=u(),{keys:m,table:c,columns:x}=q([e(),{key:"name",title:l("Soft.index_9"),width:"100",ellipsis:{tooltip:{width:"trigger"}},render:e=>e.author?e.author:l("Soft.index_11")},{key:"name",title:l("Soft.index_10"),ellipsis:{tooltip:{width:"trigger"}},render:e=>S("span",{innerHTML:e.ps},null)},{key:"name",title:l("Soft.index_12"),width:"80",render:e=>"0.00"===e.price||0===e.price?S("span",null,[l("Soft.index_13")]):S("span",{class:"color-#fc6d26"},["$".concat(e.price)])},s(),t(),a(),n(),D({width:200,align:"right",options:e=>[{label:l("Home.index_5"),show:F(e),onClick:()=>{const s=K(e),t={name:e.name,title:e.title,m_version:e.versions[s].m_version,version:e.versions[s].version,update_msg:e.versions[s].update_msg};M(t,(()=>{w()}))}},{label:l("Layout.Sider.mail_12"),show:e.setup&&!A(e),onClick:()=>{E(e)}},{label:-1===e.endtime?l("Component.Auth.index_3"):l("Soft.index_18"),show:A(e),onClick:()=>{const s={source:-1===e.endtime?31:32,plugin:{name:e.title,pid:e.pid,type:e.type,plugin:!0,renew:e.endtime,ps:e.ps}};J(s)}},{label:l("Public.Btn.Install"),show:!e.setup&&!A(e),onClick:()=>{O({title:l("Soft.index_25"),content:l("Soft.index_38",[e.title]),onConfirm:async()=>{const{message:s}=await _({sName:e.name,version:e.manager_version,type:0});I(s,(()=>{w()}))}})}},{label:l("Public.Btn.Uninstall"),show:e.setup,onClick:()=>{O({title:l("Public.Btn.Uninstall"),content:l("Soft.index_15",[e.title,e.version]),onConfirm:async()=>{e.version=e.name.includes("php-")?e.versions[0].m_version:e.version,await d({sName:e.name,version:e.version}),w()}})}}]})]),{loading:y,setLoading:h}=Q();B((()=>r.isRefresh),(e=>{e&&(r.setRefresh(!1),w())}));const w=async()=>{try{h(!0);const{message:e}=await f(H({...i,type:10}),!!i.force);p(e)&&(c.data=e.list.data,c.total=g(e.list.page))}finally{m.value=[],i.force=0,h(!1)}};return w(),(e,s)=>{const t=v,a=V,n=X,o=W;return b(),j(o,{class:"py-16px"},{table:k((()=>[S(a,{"row-key":"name",loading:R(y),data:R(c).data,columns:R(x)},{empty:k((()=>[S(t,{onClick:R(T)},{default:k((()=>[P(L(e.$t("Soft.index_26")),1)])),_:1},8,["onClick"])])),_:1},8,["loading","data","columns"])])),pageRight:k((()=>[S(n,{page:R(i).p,"onUpdate:page":s[0]||(s[0]=e=>R(i).p=e),"page-size":R(i).row,"onUpdate:pageSize":s[1]||(s[1]=e=>R(i).row=e),"item-count":R(c).total,onRefresh:w},null,8,["page","page-size","item-count"])])),_:1})}}}),se=h({__name:"index",setup:e=>(e,s)=>{const t=y;return b(),j(t,{class:"p-16px"},{default:k((()=>[S(o),S(l),S(Z),S(ee)])),_:1})}});export{se as default};
