1import{g as _,e as h,b as O,d as C,f as I,H as A,n as y,C as L,c as w,I as f,h as c,A as m,i as G}from"./get-store-code.DRixfapQ.js";const H=async({url:E,method:o=A.GET,requestHeaders:d,body:t,keepalive:T})=>{if(typeof window>"u")return{data:null,error:null,status:null};const i=new Date().valueOf();let r,u,a;r=_(E,window?.GB_NEXT_INTERNAL?.baseUrl??"https://gymbeam.<domain>");try{u=h(new Headers(d),{url:window?.location?.href,token:I(),segment:C(),userAgent:window?.navigator?.userAgent??"",traceId:window?.GB_NEXT_INTERNAL?.traceId,groupCode:O()});const e=o!=="GET"&&t;e&&d?.["Content-Type"]==null&&u.set("Content-Type","application/json");const{data:l,success:N,status:n,headers:p}=await y({url:r,method:o,headers:u,body:e?u.get("Content-Type")==="application/x-www-form-urlencoded"?t:JSON.stringify(t):void 0,timeoutMs:L,keepalive:T});if(a=p,!N){const g=l?.message?.toString(),R={message:g||`Request failed with status code ${n}`,status:n,fromBody:!!g};return w({source:"src/common/api/rest/fetch.client.ts",level:"warn",context:{duration:`${Date.now()-i}ms`,method:o,url:c(r,JSON.stringify(t)),status:n,...f&&{response:l},responseHeaders:a?Object.fromEntries(a.entries()):void 0}}),{data:null,error:R,status:n}}if(window.GB_NEXT_INTERNAL?.debug?.queries){var s=window.GB_NEXT_INTERNAL.debug.queries;s.push({operation:c(r,JSON.stringify(t)),duration:Date.now()-i,status:n,timestamp:Date.now()}),s.length>20&&s.shift()}return{data:l,error:null,status:n}}catch(e){if(w({source:"src/common/api/rest/fetch.client.ts",level:"warn",context:{duration:`${Date.now()-i}ms`,method:o,url:c(r,JSON.stringify(t)),error:{message:e?.message??e??m.GENERIC_ERROR,cause:e?.cause,category:G},responseHeaders:a?Object.fromEntries(a.entries()):void 0}}),window.GB_NEXT_INTERNAL?.debug?.queries){var s=window.GB_NEXT_INTERNAL.debug.queries;s.push({operation:c(r,JSON.stringify(t)),duration:Date.now()-i,status:null,timestamp:Date.now()}),s.length>20&&s.shift()}return{data:null,error:{message:e?.message??m.GENERIC_ERROR,status:e?.cause,fromBody:!1},status:e?.cause??null}}};export{H as c};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.