1(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"882b069bf3d395a597ad23b0dfc21031695d97ee"};var r=new t.Error().stack;r&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[r]="0f09d3ec-1b5c-4cb3-93c8-ae145e76579d",t._sentryDebugIdIdentifier="sentry-dbid-0f09d3ec-1b5c-4cb3-93c8-ae145e76579d")}catch{}})();var p="We are having trouble connecting. Please check your internet connection and try again.",l="There was an issue processing your request. Please try again later or contact support if the problem persists.",y="Operation failed, please try again later.",g="The size of the file is too large.",E=t=>{if(t instanceof o){const r=t.getErrors();return Object.values(r).flat()}return t instanceof Error?t.message:y},o=class a extends Error{httpStatusCode;json;constructor(r,e){super(),Object.setPrototypeOf(this,a.prototype),this.httpStatusCode=r,this.json=e,this.setErrorMessage()}setErrorMessage(){this.message=`HTTP Status Code: ${this.httpStatusCode}, Details: ${E(this)}`}getStatusCode(){return this.httpStatusCode}setJson(r){this.json=r,this.setErrorMessage()}getJson(){if(typeof this.json!="string")return this.json}getErrors(){if(this.httpStatusCode===-1)return{unknown:p};if(this.json&&this.httpStatusCode<500){if(typeof this.json=="string")return{unknown:this.json};if(this.json.errors)return this.json.errors;const r=this.json.detail||this.json.type||this.json.errorCode;if(r)return{unknown:r}}return{unknown:l}}},w=class i extends o{constructor(r=404,e){super(r,e),Object.setPrototypeOf(this,i.prototype)}},b=class c extends o{constructor(){super(413,g),Object.setPrototypeOf(this,c.prototype)}},T=class d extends o{constructor(){super(401),Object.setPrototypeOf(this,d.prototype)}};async function j(t){let r;try{r=await t.clone().json().catch(()=>t.clone().text())}catch{r=t.statusText}return r}function v(t,r){return t===401?new T:t===404?new w(t,r):t===413?new b:new o(t,r)}var P=class u extends o{constructor(){super(-1),Object.setPrototypeOf(this,u.prototype)}};class m{networkManager;constructor(r){this.networkManager=r}sendRequest=async r=>{const e=await this.networkManager.sendRequest(r).catch(()=>{throw new P});if(e.ok)return e;throw v(e.status,await j(e))};urlWithQuery(r,e){const s=new URLSearchParams;for(const[h,n]of Object.entries(e))if(n!==void 0)for(const f of Array.isArray(n)?n:[n])s.append(h,String(f));return`${r}?${s}`}createCommonHeaders=()=>{const r=new Headers;return r.append("content-type","application/json;charset=UTF-8"),r}}const S="X-Company-Id";class C{sendRequest=async r=>(r.companyId&&r.headers.set(S,r.companyId),await fetch(r.url,{method:r.method,headers:r.headers,body:r.body,credentials:"omit"}))}const k=new C;var O=(t=>(t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH",t.DELETE="DELETE",t))(O||{});export{P as F,m as G,o as H,w as N,O as R,T as U,k as b}; 2//# sourceMappingURL=magicRequest-DNGtzWi1.js.map
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.