import{n as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{Ar as n,dr as r,sn as i}from"./vendor-Dcerr41Y.js";import{A as a,g as o,i as s,j as c}from"./vendor-vue-CzT6iKrm.js";import{Gi as l,Ki as u,or as d,sr as f,tr as p}from"./ws-DjAvcWfg.js";var m=t({usePluginStore:()=>h}),h,g=e((()=>{s(),c(),u(),d(),i(),h=a(`plugin-store`,()=>{let e=l();n(0);let t=n([]),i=o(`c3api/applied-plugins`,[]);r(i,t=>{for(let n of t)if(!f(n))try{p(`${e}/plugins/${n}/plugin.js`)}catch(e){console.error(`Failed to load plugin ${n}`,e)}},{immediate:!0});function a(t){i.value.includes(t)||i.value.push(t),p(`${e}/plugins/${t}/plugin.js`)}function s(e){let t=i.value.indexOf(e);t!==-1&&i.value.splice(t,1)}async function c(){let n=`${e}/plugins/list`,r=await fetch(n).then(e=>e.json());t.value=r}return{availPlugins:t,appliedPlugins:i,refreshList:c,enablePlugin:a,disablePlugin:s}})}));export{m as n,h as r,g as t};