import{L as u}from"./CircularLoading-223w4e_R.js";import{e as f,V as p,$ as _,f as h,g as l,k as d,q as g,ar as m}from"./jwt-decode.esm-01iVuizL.js";import{E as a,a as y}from"./router-BE4iJyIf.js";import"./ts.worker-DFqcUvYQ.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},o=new Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="e6b5e32e-f8d8-4379-b67c-e4c697036a7e",t._sentryDebugIdIdentifier="sentry-dbid-e6b5e32e-f8d8-4379-b67c-e4c697036a7e")}catch{}})();const b={class:"authorize"},w={class:"content"},A=f({__name:"Authorize",setup(t){const o=p();return _(()=>{const{client_id:r,redirect_uri:s,response_type:n,state:i}=o.query,e=a.cloudApi.startsWith("https://")||a.cloudApi.startsWith("http://")?new URL(`${a.cloudApi}/oauth/authorize`):new URL(`${location.origin}${a.cloudApi}/oauth/authorize`);typeof r=="string"&&e.searchParams.set("client_id",r),typeof s=="string"&&e.searchParams.set("redirect_uri",s),typeof n=="string"&&e.searchParams.set("response_type",n),typeof i=="string"&&e.searchParams.set("state",i);const c=y.getAuthor();c?.jwt&&e.searchParams.set("session_token",c.jwt),window.location.href=e.toString()}),(r,s)=>(l(),h("div",b,[d("div",w,[s[0]||(s[0]=d("h1",null,"Authorizing...",-1)),g(u)])]))}}),L=m(A,[["__scopeId","data-v-57fe5408"]]);export{L as default};
//# sourceMappingURL=Authorize-D4vTi0Fv.js.map
