import{i as e,n as t}from"./rolldown-runtime-ConPGZeh.js";import{Nn as n,Xn as r,Yr as i}from"./vendor-primevue-D1-E3-0M.js";import{n as a,r as o}from"./vendor-vue-W0uRz0qB.js";var s,c=t((()=>{o(),n(),s=a(`serverConfig`,()=>{let e=i({}),t=r(()=>Object.values(e.value)),n=r(()=>t.value.filter(e=>e.initialValue!==e.value)),revertChanges=()=>{for(let e of n.value)e.value=e.initialValue},a=r(()=>t.value.reduce((e,t)=>{let n=t.category?.[0]??`General`;return e[n]=e[n]||[],e[n].push(t),e},{})),o=r(()=>Object.fromEntries(t.value.map(e=>[e.id,e.value===e.defaultValue||e.value===null||e.value===void 0?void 0:e.value]))),s=r(()=>{let e=Object.assign({},...t.value.map(e=>e.value===e.defaultValue||e.value===null||e.value===void 0?{}:e.getValue?e.getValue(e.value):{[e.id]:e.value}));return Object.fromEntries(Object.entries(e).map(([e,t])=>t===!0?[e,``]:[e,t.toString()]))}),c=r(()=>Object.entries(s.value).map(([e,t])=>[`--${e}`,t]).flat().filter(e=>e!==``).join(` `));function loadServerConfig(t,n){for(let r of t){let t=n[r.id]??r.defaultValue;e.value[r.id]={...r,value:t,initialValue:t}}}return{serverConfigById:e,serverConfigs:t,modifiedConfigs:n,serverConfigsByCategory:a,serverConfigValues:o,launchArgs:s,commandLineArgs:c,revertChanges,loadServerConfig}})}));export{s as n,c as t};
//# sourceMappingURL=serverConfigStore-DrxDnpOi.js.map