1import"../chunks/CWj6FrbW.js";import"../chunks/69_IOA4Y.js";import{p as w,g as x,o as I,x as S,y as B,h as P,i as C,a as E,b as M,s as j,e as l,l as t,k as o,m as r}from"../chunks/7a2fV5I9.js";import{i as q}from"../chunks/Dw-yaK-_.js";import{i as z}from"../chunks/CWFN-V6k.js";import{t as c}from"../chunks/B1RxOmHW.js";import{g as d}from"../chunks/BnvOT63w.js";import{a as A,u as D}from"../chunks/B2GbTaMC.js";import{p as F}from"../chunks/BewnZnAa.js";import{P as G}from"../chunks/ClFM1s86.js";function V(f,u){w(u,!1);const i=()=>l(F,"$page",m),_=()=>l(y,"$i18n",m),[m,$]=j(),n=r(),y=x("i18n");let a=r(null),p=r(!1);const v=async s=>{const e=await D(localStorage.token,s).catch(h=>(c.error(`${h}`),null));e&&(c.success(_().t("Prompt updated successfully")),o(a,{id:e.id,name:e.name,command:e.command,content:e.content,version_id:e.version_id,tags:e.tags,access_grants:(e==null?void 0:e.access_grants)===void 0?[]:e==null?void 0:e.access_grants}))};I(async()=>{if(t(n)){const s=await A(localStorage.token,t(n)).catch(e=>(c.error(`${e}`),null));s?(o(p,!s.write_access),o(a,{id:s.id,name:s.name,command:s.command,content:s.content,version_id:s.version_id,tags:s.tags,access_grants:(s==null?void 0:s.access_grants)===void 0?[]:s==null?void 0:s.access_grants})):d("/workspace/prompts")}else d("/workspace/prompts")}),S(()=>i(),()=>{o(n,i().params.id)}),B(),z();var g=P(),b=C(g);{var k=s=>{G(s,{get prompt(){return t(a)},onSubmit:v,get disabled(){return t(p)},edit:!0})};q(b,s=>{t(a)&&s(k)})}E(f,g),M(),$()}export{V as component}; 2//# sourceMappingURL=44.DK1mFgRF.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.