PageSourceSearch

https://dashboard.zid.sa/assets/api-client-D_tCewYb.js

js zid.sa collected 2026-10-02 14:35:21 UTC 21,016 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`c1ec93f8e845e18feea3c224284a004d27aa63a6`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`2e9ecd07-272e-4e5c-bd2c-5040a43a22bb`,e._sentryDebugIdIdentifier=`sentry-dbid-2e9ecd07-272e-4e5c-bd2c-5040a43a22bb`)}catch{}})();var e=()=>typeof window>`u`?null:window.localStorage.getItem(`_t`),t=e=>window?.localStorage?.setItem(`_t`,e),n=()=>window?.localStorage?.removeItem(`_t`),r=()=>Number(window?.localStorage?.getItem(`_slt`)||`0`),i=e=>window?.localStorage?.setItem(`_slt`,String(e)),a=()=>window?.localStorage?.removeItem(`_slt`),o=()=>Number(window?.localStorage?.getItem(`_lat`)||`0`),s=()=>window?.localStorage?.setItem(`_lat`,String(Date.now())),c=()=>window?.localStorage?.removeItem(`_lat`),l=t=>{!t||t!==e()||(n(),a(),c(),window.location.reload())},ee=1440,te=()=>{let t=e(),n=o();if(!t||!n)return!1;let i=r()||ee;return Date.now()-n>i*60*1e3},u=class extends Error{response;request;options;constructor(e,t,n){let r=`${e.status||e.status===0?e.status:``} ${e.statusText||``}`.trim(),i=r?`status code ${r}`:`an unknown error`;super(`Request failed with ${i}: ${t.method} ${t.url}`),this.name=`HTTPError`,this.response=e,this.request=t,this.options=n}},d=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name=`TimeoutError`,this.request=e}},f=(()=>{let e=!1,t=!1,n=typeof globalThis.ReadableStream==`function`,r=typeof globalThis.Request==`function`;if(n&&r)try{t=new globalThis.Request(`https://empty.invalid`,{body:new globalThis.ReadableStream,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`)}catch(e){if(e instanceof Error&&e.message===`unsupported BodyInit type`)return!1;throw e}return e&&!t})(),p=typeof globalThis.AbortController==`function`,ne=typeof globalThis.AbortSignal==`function`&&typeof globalThis.AbortSignal.any==`function`,re=typeof globalThis.ReadableStream==`function`,ie=typeof globalThis.FormData==`function`,m=[`get`,`post`,`put`,`patch`,`head`,`delete`],ae={json:`application/json`,text:`text/*`,formData:`multipart/form-data`,arrayBuffer:`*/*`,blob:`*/*`},h=2147483647,oe=new TextEncoder().encode(`------WebKitFormBoundaryaxpyiPgbbPti10Rw`).length,g=Symbol(`stop`),_={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},v={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},y=e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(let[n,r]of e)t+=oe,t+=new TextEncoder().encode(`Content-Disposition: form-data; name="${n}"`).length,t+=typeof r==`string`?new TextEncoder().encode(r).length:r.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if(typeof e==`string`)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if(`byteLength`in e)return e.byteLength;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);return new TextEncoder().encode(t).length}catch{return 0}return 0},b=(e,t)=>{let n=Number(e.headers.get(`content-length`))||0,r=0;return e.status===204?(t&&t({percent:1,totalBytes:n,transferredBytes:r},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(i){let a=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:n},new Uint8Array);async function o(){let{done:e,value:s}=await a.read();if(e){i.close();return}t&&(r+=s.byteLength,t({percent:n===0?0:r/n,transferredBytes:r,totalBytes:n},s)),i.enqueue(s),await o()}await o()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},se=(e,t)=>{let n=y(e.body),r=0;return new Request(e,{duplex:`half`,body:new ReadableStream({async start(i){let a=e.body instanceof ReadableStream?e.body.getReader():new Response(``).body.getReader();async function o(){let{done:e,value:s}=await a.read();if(e){t&&t({percent:1,transferredBytes:r,totalBytes:Math.max(n,r)},new Uint8Array),i.close();return}r+=s.byteLength;let c=n===0?0:r/n;(n<r||c===1)&&(c=.99),t&&t({percent:Number(c.toFixed(2)),transferredBytes:r,totalBytes:n},s),i.enqueue(s),await o()}await o()}})})},x=e=>typeof e==`object`&&!!e,S=(...e)=>{for(let t of e)if((!x(t)||Array.isArray(t))&&t!==void 0)throw TypeError("The `options` argument must be an object");return E({},...e)},C=(e={},t={})=>{let n=new globalThis.Headers(e),r=t instanceof globalThis.Headers,i=new globalThis.Headers(t);for(let[e,t]of i.entries())r&&t===`undefined`||t===void 0?n.delete(e):n.set(e,t);return n};function w(e,t,n){return Object.hasOwn(t,n)&&t[n]===void 0?[]:E(e[n]??[],t[n]??[])}var T=(e={},t={})=>({beforeRequest:w(e,t,`beforeRequest`),beforeRetry:w(e,t,`beforeRetry`),afterResponse:w(e,t,`afterResponse`),beforeError:w(e,t,`beforeError`)}),E=(...e)=>{let t={},n={},r={};for(let i of e)if(Array.isArray(i))Array.isArray(t)||(t=[]),t=[...t,...i];else if(x(i)){for(let[e,n]of Object.entries(i))x(n)&&e in t&&(n=E(t[e],n)),t={...t,[e]:n};x(i.hooks)&&(r=T(r,i.hooks),t.hooks=r),x(i.headers)&&(n=C(n,i.headers),t.headers=n)}return t},ce=e=>m.includes(e)?e.toUpperCase():e,D={limit:2,methods:[`get`,`put`,`head`,`delete`,`options`,`trace`],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:1/0,backoffLimit:1/0,delay:e=>.3*2**(e-1)*1e3},le=(e={})=>
1{if(typeof e==`number`)return{...D,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error(`retry.methods must be an array`);if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error(`retry.statusCodes must be an array`);return{...D,...e}};async function ue(e,t,n,r){return new Promise((i,a)=>{let o=setTimeout(()=>{n&&n.abort(),a(new d(e))},r.timeout);r.fetch(e,t).then(i).catch(a).then(()=>{clearTimeout(o)})})}async function de(e,{signal:t}){return new Promise((n,r)=>{t&&(t.throwIfAborted(),t.addEventListener(`abort`,i,{once:!0}));function i(){clearTimeout(a),r(t.reason)}let a=setTimeout(()=>{t?.removeEventListener(`abort`,i),n()},e)})}var O=(e,t)=>{let n={};for(let r in t)!(r in v)&&!(r in _)&&!(r in e)&&(n[r]=t[r]);return n},k=class e{static create(t,n){let r=new e(t,n),i=async()=>{if(typeof r._options.timeout==`number`&&r._options.timeout>2147483647)throw RangeError(`The \`timeout\` option cannot be greater than ${h}`);await Promise.resolve();let e=await r._fetch();for(let t of r._options.hooks.afterResponse){let n=await t(r.request,r._options,r._decorateResponse(e.clone()));n instanceof globalThis.Response&&(e=n)}if(r._decorateResponse(e),!e.ok&&r._options.throwHttpErrors){let t=new u(e,r.request,r._options);for(let e of r._options.hooks.beforeError)t=await e(t);throw t}if(r._options.onDownloadProgress){if(typeof r._options.onDownloadProgress!=`function`)throw TypeError("The `onDownloadProgress` option must be a function");if(!re)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");return b(e.clone(),r._options.onDownloadProgress)}return e},a=(r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(i):i()).finally(async()=>{r.request.bodyUsed||await r.request.body?.cancel()});for(let[e,t]of Object.entries(ae))a[e]=async()=>{r.request.headers.set(`accept`,r.request.headers.get(`accept`)||t);let i=await a;
1if(e===`json`){if(i.status===204||(await i.clone().arrayBuffer()).byteLength===0)return``;if(n.parseJson)return n.parseJson(await i.text())}return i[e]()};return a}request;abortController;_retryCount=0;_input;_options;constructor(e,t={}){if(this._input=e,this._options={...t,headers:C(this._input.headers,t.headers),hooks:T({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},t.hooks),method:ce(t.method??this._input.method??`GET`),prefixUrl:String(t.prefixUrl||``),retry:le(t.retry),throwHttpErrors:t.throwHttpErrors!==!1,timeout:t.timeout??1e4,fetch:t.fetch??globalThis.fetch.bind(globalThis)},typeof this._input!=`string`&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&typeof this._input==`string`){if(this._input.startsWith(`/`))throw Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith(`/`)||(this._options.prefixUrl+=`/`),this._input=this._options.prefixUrl+this._input}if(p&&ne){let e=this._options.signal??this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=e?AbortSignal.any([e,this.abortController.signal]):this.abortController.signal}if(f&&(this._options.duplex=`half`),this._options.json!==void 0&&(this._options.body=this._options.stringifyJson?.(this._options.json)??JSON.stringify(this._options.json),this._options.headers.set(`content-type`,this._options.headers.get(`content-type`)??`application/json`)),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let e=`?`+(typeof this._options.searchParams==`string`?this._options.searchParams.replace(/^\?/,``):new URLSearchParams(this._options.searchParams).toString()),t=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,e);(ie&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers[`content-type`])&&this.request.headers.delete(`content-type`),this.request=new globalThis.Request(new globalThis.Request(t,{...this.request}),this._options)}if(this._options.onUploadProgress){if(typeof this._options.onUploadProgress!=`function`)throw TypeError("The `onUploadProgress` option must be a function");if(!f)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=se(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof d)throw e;if(e instanceof u){if(!this._options.retry.statusCodes.includes(e.response.status))throw e;let t=e.response.headers.get(`Retry-After`)??e.response.headers.get(`RateLimit-Reset`)??e.response.headers.get(`X-RateLimit-Reset`)??e.response.headers.get(`X-Rate-Limit-Reset`);if(t&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t)*1e3;Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse(`2024-01-01`)&&(e-=Date.now());let n=this._options.retry.maxRetryAfter??e;return e<n?e:n}if(e.response.status===413)throw e}let t=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,t)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(t){let n=Math.min(this._calculateRetryDelay(t),h);if(this._retryCount<1)throw t;await de(n,{signal:this._options.signal});for(let e of this._options.hooks.beforeRetry)if(await e({request:this.request,options:this._options,error:t,retryCount:this._retryCount})===g)return;return this._retry(e)}}async _fetch(){for(let e of this._options.hooks.beforeRequest){let t=await e(this.request,this._options);if(t instanceof Request){this.request=t;break}if(t instanceof Response)return t}let e=O(this.request,this._options),t=this.request;return this.request=t.clone(),this._options.timeout===!1?this._options.fetch(t,e):ue(t,e,this.abortController,this._options)}},A=e=>{let t=(t,n)=>k.create(t,S(e,n));for(let n of m)t[n]=(t,r)=>k.create(t,S(e,r,{method:n}));return t.create=e=>A(S(e)),t.extend=t=>(typeof t==`function`&&(t=t(e??{})),A(S(e,t))),t.stop=g,t},j=A(),M=class extends u{name=`ApiError`;constructor(e,t){super(e.response,e.request,e.options),this.message=t||e?.message,this.stack=e?.stack,this.cause=e?.cause}}
1,N=class extends M{name=`ApiBadRequest`},P=class extends M{name=`ApiErrorNotFound`},F=class extends M{name=`ApiErrorUnauthorized`},I=class extends M{name=`ApiErrorForbidden`},L=class extends M{name=`ApiErrorTooManyRequests`},R=class extends M{name=`ApiErrorTimeout`},z=class extends M{name=`ApiErrorServer`},B=e=>{if(!e?.response?.status)return e;if(e.response.status>=500)return new z(e);switch(e.response.status){case 400:case 422:return new N(e);case 401:return new F(e);case 403:return new I(e);case 404:return new P(e);case 408:return new R(e);case 429:return new L(e);default:return e}},V=async t=>{if(t?.url)try{let n=new URL(t.url),r=window?.localStorage?.getItem(`acceptLanguage`)||`en`;if(t.headers.has(`accept-language`)||t.headers.set(`accept-language`,r),!n?.pathname||me.includes(n.pathname)||U(n.pathname))return;let i=e(),a=window?.localStorage?.getItem(`storeId`);i&&t.headers.set(`x-manager-token`,i),a&&(t.headers.set(`role`,`Manager`),t.headers.set(`store-id`,a))}catch(e){console.warn(`authTokenInterceptor-err`,e)}},H=async(e,n,r)=>{try{let e=new URL(r?.url);if(![`/v1/managers/login`,`/v1/managers/otp-auth/register`,`/v1/managers/otp-auth/login`,`/v1/managers/social-login`,`/v1/managers/registration/social-register`,`/v1/managers/user-impersonations/login-by-token`,`/v1/managers/store/md/session`].includes(e?.pathname))return r;let n=await r.clone().json();n?.user?.access_token&&t(n.user.access_token);let a=n?.user?.md_session_lifetime??n?.md_session_lifetime;a&&i(a),s()}catch(e){console.warn(`authTokenResponseHandler-err`,e)}return r},fe=async e=>{if(e?.response?.status===401){let t=new URL(e?.request?.url);if(he.includes(t?.pathname)||U(t?.pathname??``))return e;l(e.request.headers.get(`x-manager-token`))}return e},pe=e=>{throw B(e)},me=[`/v1/managers/login`,`/v1/managers/account/confirm-email-change`,`/v1/managers/account/confirm-mobile-change`,`/v1/managers/moderators/confirm-new-moderator`,`/v1/managers/verify/merchant/mail`],he=[`/v1/managers/store/marketplace-connect/trendyol-activation`,`/v1/managers/account/confirm-email-change`,`/v1/managers/account/confirm-mobile-change`,`/v1/managers/moderators/confirm-new-moderator`,`/v1/managers/verify/merchant/mail`],ge=/^\/v1\/managers\/store\/user-impersonations\/[^/]+(\/(approve|reject))?\/?$/,U=e=>ge.test(e),_e=j.create({prefixUrl:`https://hermod.zid.sa/`,timeout:9e4,headers:{accept:`application/json`,"Content-Type":`application/json`},hooks:{beforeError:[fe,pe],beforeRequest:[V],afterResponse:[H]},retry:{limit:1,delay:e=>2**(e-1)*2e3},credentials:`include`}),ve=class extends Error{name=`UnexpectedResponseError`;status;statusText;url;constructor(e){let t=`Unexpected response: ${e.status} ${e.statusText} from ${e.url}`;super(t),this.status=e.status,this.statusText=e.statusText,this.url=e.url}},W=e=>{throw new ve(e)},ye=async e=>{try{return await e.json()}catch{throw W(e)}},G=e=>e instanceof File||e instanceof Blob,be=(e,t,n,r)=>{e.append(t,r?n?`1`:`0`:n.toString())},K=(e,t,n)=>{let r=n instanceof File?n.name:`blob`,i=r.includes(`.`)?r.split(`.`).pop():``,a=i?`file.${i}`:`file`;e.append(String(t),n,a)},xe=(e,t,n=!1)=>{let r=new FormData,i=e[t];return i&&G(i)&&K(r,t,i),Object.entries(e).forEach(([e,i])=>{e!==t.toString()&&i!==void 0&&(typeof i==`boolean`?be(r,e,i,n):r.append(e,String(i)))}),r},Se=(e,t,n)=>{let r=new FormData,i=e[t];return Array.isArray(i)?i.forEach(e=>{e&&G(e)&&K(r,`${String(t)}[]`,e)}):i&&G(i)&&K(r,`${String(t)}${n?`[0]`:`[]`}`,i),Object.entries(e).forEach(([e,n])=>{e!==t.toString()&&n!==void 0&&r.append(e,String(n))}),r},q=(e,t=new FormData,n=``)=>{for(let[r,i]of Object.entries(e)){let e=n?`${n}[${r}]`:r;typeof i==`object`&&i&&!(i instanceof File)?q(i,t,e):t.append(e,i instanceof File?i:String(i))}return t},Ce=e=>{if(!e)return{};let t={};return Object.entries(e).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach((n,r)=>{t[`${e}[${r}]`]=String(n)}):t[e]=String(n))}),t},we=e=>{let t={};if(!e||!Object.keys(e).length)return t;for(let[n,r]of Object.entries(e)){let e=Te[n];e&&(r||(t[e]=void 0),n===`authorizationToken`?t[e]=`Bearer ${r}`:n===`role`?t[e]=Ee?.[r]||void 0:t[e]=r)}return t},Te={authorizationToken:`authorization`,managerToken:`x-manager-token`,customerToken:`x-customer-token`,officerToken:`x-officer-token`,cartToken:`cart-session-id`,storeId:`store-id`,currency:`currency`,acceptLanguage:`accept-language`,customerIp:`customer-ip`,customerIpCountry:`customer-ip-country`,merchantIp:`merchant-ip`,merchantIpCountry:`merchant-ip-country`,requestId:`x-request-id`,role:`role`},Ee={manager:`Manager`,customer:`Customer`},De=e=>{let t=new URLSearchParams;return Object.entries(e).forEach(([e,n])=>
1{Array.isArray(n)?n.forEach(n=>t.append(`${e}[]`,String(n))):n!=null&&t.append(e,String(n))}),t},Oe=e=>{if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(typeof e==`string`)return e||void 0;if(typeof e==`boolean`)return e},J=e=>e instanceof u,ke=e=>J(e)&&e.response.status===404,Ae=async t=>{if(t?.url)try{let n=new URL(t.url);if(!n?.pathname||Ne.includes(n.pathname))return;let r=e();r&&t.headers.set(`x-manager-token`,r)}catch(e){console.warn(`authTokenInterceptor-err`,e)}},je=async(e,n,r)=>{try{let e=new URL(r?.url);if(![`/v1/managers/login`,`/v1/managers/otp-auth/register`,`/v1/managers/otp-auth/login`,`/v1/managers/social-login`,`/v1/managers/registration/social-register`,`/v1/managers/user-impersonations/login-by-token`,`/v1/managers/store/md/session`].includes(e?.pathname))return r;let n=await r.clone().json();n?.user?.access_token&&t(n.user.access_token)}catch(e){console.warn(`authTokenResponseHandler-err`,e)}return r},Me=async e=>{if(e?.response?.status===401){let t=new URL(e?.request?.url);if(Pe.includes(t?.pathname))return e;l(e.request.headers.get(`x-manager-token`))}return e},Ne=[`/v1/managers/login`],Pe=[`/v1/managers/store/marketplace-connect/trendyol-activation`,`/v1/managers/store/marketplace-connect/trendyol-rev-share/activation-popup`,`/v1/managers/store/marketplace-connect/trendyol-rev-share/activation-popup/record-display`,`/v1/managers/latest-features`],Fe=j.create({prefixUrl:`https://prdt-web.zid.sa/_analytics/api`,timeout:9e4,headers:{accept:`application/json`,"Content-Type":`application/json`},hooks:{beforeError:[Me],beforeRequest:[Ae],afterResponse:[je]},retry:{limit:1,delay:e=>2**(e-1)*2e3},credentials:`include`}),Y=e=>e?.map(e=>({id:e?.id||``,available_quantity:e.available_quantity||0,is_infinite:e.is_infinite||!1,location:typeof e?.location==`object`?e.location.id:e.location})),Ie=(e,...t)=>{if(e!=null&&e!==``){let t=Number(e);if(!Number.isNaN(t))return t}for(let e of t)if(e!=null&&e!==``){let t=Number(e);if(!Number.isNaN(t))return t}return 0},X=(e,t)=>{if(e==null||e===``){if(t==null||t===``)return null;let e=Number(t);return Number.isNaN(e)?null:e}let n=Number(e);return Number.isNaN(n)?null:n},Z=e=>!!e?.attributes?.length,Q=(e,t,n)=>{if(!e&&!t)return null;let r=e??t,i=t?.stocks?.[0]??e?.stocks?.[0],a=t?.stocks?Y(t.stocks):Y(e?.stocks);return{...r,...t??{},attributes:Z(e)?e.attributes:t?.attributes??e?.attributes??[],price:Ie(t?.price,e?.price,n.price),sale_price:X(t?.sale_price,e?.sale_price),cost:X(t?.cost,e?.cost),barcode:t?.barcode??e?.barcode??``,quantity:t?.quantity??e?.quantity??i?.available_quantity??0,is_infinite:t?.is_infinite??e?.is_infinite??i?.is_infinite??!1,parent_id:e?.parent_id??t?.parent_id??n.id,stocks:a??[],images:t?.images??e?.images??[],id:e?.id??t?.id??r.id,name:t?.name??e?.name??r.name,sku:t?.sku??e?.sku??r.sku}},Le=(e,t,n)=>{let r=new Map((e??[]).map(e=>[e.id,e]));return t.map(e=>Q(r.get(e.id),e,n)).filter(e=>e!==null)},$=(e,t,n)=>{let r=e??[],i=r.some(Z),a=new Map(t.map(e=>[e.id,e])),o=new Map(r.map(e=>[e.id,e]));if(i){let e=r.map(e=>Q(e,a.get(e.id),n)).filter(e=>e!==null),i=new Set(r.map(e=>e.id)),o=t.filter(e=>!i.has(e.id)).map(e=>Q(void 0,e,n)).filter(e=>e!==null);return[...e,...o]}return t.length>0?t.map(e=>Q(o.get(e.id),e,n)).filter(e=>e!==null):r},Re=j.create({prefixUrl:`https://hermod.zid.sa/v1`,timeout:9e4,headers:{accept:`application/json`,"Content-Type":`application/json`},hooks:{beforeRequest:[async t=>{if(t?.url)try{let n=window?.localStorage?.getItem(`acceptLanguage`);n&&t.headers.set(`accept-language`,n);let r=e(),i=window?.localStorage?.getItem(`storeId`);r&&t.headers.set(`Access-Token`,r),i&&t.headers.set(`Store-Id`,i)}catch(e){console.warn(`customizableReports-authInterceptor-err`,e)}}]},retry:{limit:1,delay:e=>2**(e-1)*2e3}}),ze=e=>{let t=e.visualization_dimension_id,n=e.dimensions??[];return t&&n.some(e=>e.id===t)?t:n[0]?.id??null},Be=e=>{let t=e.visualization_metric_id,n=e.metrics.filter(Boolean);return t&&n.some(e=>e.id===t)?t:n[0]?.id??null},Ve=j.create({prefixUrl:`https://n8n.zid.dev`,timeout:3e4,retry:{limit:1,delay:e=>2**(e-1)*2e3}});export{u as C,s as D,te as E,t as O,d as S,l as T,ye as _,$ as a,N as b,J as c,De as d,we as f,xe as g,q as h,Re as i,ke as l,Se as m,Be as n,Le as o,Ce as p,ze as r,Fe as s,Ve as t,Oe as u,W as v,e as w,j as x,_e as y};
2//# sourceMappingURL=api-client-D_tCewYb.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.