import{b as c,c as m}from"/build/_shared/chunk-25GQKOZQ.js";import{a as f}from"/build/_shared/chunk-VWINT4H3.js";import{a as u}from"/build/_shared/chunk-WMXOFRMM.js";import{d as n}from"/build/_shared/chunk-G5WX4PPA.js";var a=n(c(),1);var i=n(c(),1),o=class{configuration;constructor(t){this.configuration=t}analytics(){return new i.AnalyticsApi(this.configuration)}apiKey(){return new i.ApiKeyApi(this.configuration)}auth(){return new i.AuthApi(this.configuration)}environment(){return new i.EnvironmentApi(this.configuration)}log(){return new i.LogApi(this.configuration)}membership(){return new i.MembershipApi(this.configuration)}project(){return new i.ProjectApi(this.configuration)}team(){return new i.TeamApi(this.configuration)}trace(){return new i.TraceApi(this.configuration)}};var p=n(m(),1);var s=n(f(),1),F=e=>async t=>{let r=await s.authenticator.isAuthenticated(t.request,{failureRedirect:u.auth.login}),A=new a.Configuration({basePath:p.env.SERVER_BASE_URL,accessToken:r.accessToken}),h=new o(A);return e({...t,api:h,user:r.user})};export{F as a};
