import{E as r,a as i}from"./router.ba9fc25a.js";import"./outputWidgets.800838e3.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="3c0e67d7-f9fd-44b9-b129-5762704241d9",o._sentryDebugIdIdentifier="sentry-dbid-3c0e67d7-f9fd-44b9-b129-5762704241d9")}catch{}})();class a extends Error{constructor(e,t){super(e),this.status=t}static async fromResponse(e){const t=await e.text();return new a(t,e.status)}}class p{static async get(e){const s=await(await fetch(`${r.cloudApi}/console/${e}`,{headers:{...i.headers}})).text();return s?JSON.parse(s):null}static async post(e,t){const s=await fetch(`${r.cloudApi}/console/${e}`,{method:"POST",headers:{"Content-Type":"application/json",...i.headers},body:JSON.stringify(t)});if(!s.ok)throw await a.fromResponse(s);const n=await s.text();return n?JSON.parse(n):null}static async patch(e,t){const s=await fetch(`${r.cloudApi}/console/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json",...i.headers},body:JSON.stringify(t)});if(!s.ok)throw await a.fromResponse(s);const n=await s.text();return n?JSON.parse(n):null}static async delete(e){const t=await fetch(`${r.cloudApi}/console/${e}`,{method:"DELETE",headers:{"Content-Type":"application/json",...i.headers}});if(!t.ok)throw await a.fromResponse(t)}}export{p as C};
//# sourceMappingURL=gateway.872328f1.js.map
