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]=`5c958103-ca5d-41c8-82df-b4467a05db9d`,e._sentryDebugIdIdentifier=`sentry-dbid-5c958103-ca5d-41c8-82df-b4467a05db9d`)}catch{}import"./rolldown-runtime-eb2nym32.js";import{Sp as e,cm as t,dm as n,fm as r,im as i,lg as a,lm as o,mm as s,mp as c,om as l,wp as u,xp as d}from"./entry.client-dr7r6s9a.js";n(),t(),i();var f=e({batchrsp:e({ver:u(),layout:u().optional(),items:c(e({item:u()})).optional(),errors:c(e({code:d(),msg:u()})).optional()})});function p(e){return f.parse(e)}var m=`https://arc.msn.com`,h=30*a,g=class{baseFetch;baseRequestInterceptors;requestFactory;config;constructor(e,t,n=globalThis.fetch){this.config=e,this.requestFactory=this.configureRequestFactory(e),this.baseFetch=n,this.baseRequestInterceptors=[new l(t)]}async fetchIrisMultiCreativeSinglePlacementBatchData({config:e,tokenProvider:t,requestInterceptors:n=[],abortSignal:r}){let{requestParams:i,passThroughParams:a,requestOverrides:c}=e,l={interceptors:{request:[...this.baseRequestInterceptors,...n]}};t&&(l.authenticator=new o(t,!1));let u=s(this.baseFetch,l),d;if(c){let e={...this.config,...c};d=this.configureRequestFactory(e)}else d=this.requestFactory;return p(await(await u(this.generateIrisRequest(d,{...i,...a},r))).json())}configureRequestFactory(e){let t={...this.config,...e};return r.withBaseUrl(t?.baseUrl||m).setCommonMaxRetries(t?.maxRetryCount??2).setCommonTimeout(t?.timeoutDelayMilliseconds??h)}generateIrisRequest(e,t,n){return e.get(`v4/api/selection`,{params:t,abortSignal:n}).request}};export{g as IrisService};