try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`56925ba6-e8bf-4d6a-8e8c-f1ed455e2dee`,e._sentryDebugIdIdentifier=`sentry-dbid-56925ba6-e8bf-4d6a-8e8c-f1ed455e2dee`)}catch{}import"./rolldown-runtime-eb2nym32.js";import{_m as e,cg as t,cm as n,dm as r,im as i,lm as a,mm as o,om as s}from"./entry.client-dr7r6s9a.js";import{decodeContentAccessResponse as c}from"./converters-f7qua07c.js";n(),i(),r();var l=class{priority=0;headers;constructor(e,t){this.headers=new Headers({"Calling-App-Name":e,"Calling-App-Version":t})}intercept=async t=>e.fromRequest(t,{additionalHeaders:this.headers})};r();var u=`https://contentaccess.exp.xboxservices.com/`,d=t,f=class{fetch;config;cvProvider;tokenProvider;get baseUrl(){return this.config.baseUrl||u}constructor(e,t,n,r=globalThis.fetch){this.config=e,this.cvProvider=t,this.tokenProvider=n,this.fetch=o(r,{authenticator:new a(this.tokenProvider,!1),interceptors:{request:[new l(e.callingAppName,e.callingAppVersion),new s(this.cvProvider)]},timeoutMs:this.config.timeoutMs??d})}async fetchAllContentAccess(e,t,n){let r=new URL(`all/v1`,this.baseUrl);r.searchParams.set(`market`,e),r.searchParams.set(`offering`,t);let i=await(await this.fetch(r.toString(),{method:`GET`,signal:n?.signal})).arrayBuffer();return c(new Uint8Array(i))}};export{f as ContentAccessService};