@haus-storefront-react/currency-picker 0.0.52-1 → 0.0.52-4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,42 @@
1
+ ## 0.0.52-3 (2025-12-12)
2
+
3
+ ### 🚀 Features
4
+
5
+ - enhance SDK and HTTP client integration
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated store/hooks to 0.0.52-3
10
+ - Updated core to 0.0.52-3
11
+ - Updated common/utils to 0.0.52-3
12
+ - Updated shared/types to 0.0.52-3
13
+
14
+ ## 0.0.52-2 (2025-12-12)
15
+
16
+ ### 🚀 Features
17
+
18
+ - enhance SDK and HTTP client integration
19
+
20
+ ### 🧱 Updated Dependencies
21
+
22
+ - Updated store/hooks to 0.0.52-2
23
+ - Updated core to 0.0.52-2
24
+ - Updated common/utils to 0.0.52-2
25
+ - Updated shared/types to 0.0.52-2
26
+
27
+ ## 0.0.52-1 (2025-12-11)
28
+
29
+ ### 🚀 Features
30
+
31
+ - enhance SDK and HTTP client integration
32
+
33
+ ### 🧱 Updated Dependencies
34
+
35
+ - Updated store/hooks to 0.0.52-1
36
+ - Updated core to 0.0.52-1
37
+ - Updated common/utils to 0.0.52-1
38
+ - Updated shared/types to 0.0.52-1
39
+
1
40
  ## 0.0.52 (2025-12-11)
2
41
 
3
42
  ### 🚀 Features
package/index.js CHANGED
@@ -31,7 +31,7 @@ function print() { __p += __j.call(arguments, '') }
31
31
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...i){const a=new this(r);return i.forEach(u=>a.set(u)),a}static accessor(r){const a=(this[ol]=this[ol]={accessors:{}}).accessors,u=this.prototype;function c(f){const p=or(f);a[p]||(Nv(u,f),a[p]=!0)}return S.isArray(r)?r.forEach(c):c(r),this}};Ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(Ue.prototype,({value:o},r)=>{let i=r[0].toUpperCase()+r.slice(1);return{get:()=>o,set(a){this[i]=a}}});S.freezeMethods(Ue);function ns(o,r){const i=this||fr,a=r||i,u=Ue.from(a.headers);let c=a.data;return S.forEach(o,function(p){c=p.call(i,c,u.normalize(),r?r.status:void 0)}),u.normalize(),c}function Kl(o){return!!(o&&o.__CANCEL__)}function Fn(o,r,i){j.call(this,o??"canceled",j.ERR_CANCELED,r,i),this.name="CanceledError"}S.inherits(Fn,j,{__CANCEL__:!0});function Yl(o,r,i){const a=i.config.validateStatus;!i.status||!a||a(i.status)?o(i):r(new j("Request failed with status code "+i.status,[j.ERR_BAD_REQUEST,j.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function Pv(o){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return r&&r[1]||""}function Iv(o,r){o=o||10;const i=new Array(o),a=new Array(o);let u=0,c=0,f;return r=r!==void 0?r:1e3,function(m){const y=Date.now(),v=a[c];f||(f=y),i[u]=m,a[u]=y;let A=c,I=0;for(;A!==u;)I+=i[A++],A=A%o;if(u=(u+1)%o,u===c&&(c=(c+1)%o),y-f<r)return;const L=v&&y-v;return L?Math.round(I*1e3/L):void 0}}function Dv(o,r){let i=0,a=1e3/r,u,c;const f=(y,v=Date.now())=>{i=v,u=null,c&&(clearTimeout(c),c=null),o(...y)};return[(...y)=>{const v=Date.now(),A=v-i;A>=a?f(y,v):(u=y,c||(c=setTimeout(()=>{c=null,f(u)},a-A)))},()=>u&&f(u)]}const yi=(o,r,i=3)=>{let a=0;const u=Iv(50,250);return Dv(c=>{const f=c.loaded,p=c.lengthComputable?c.total:void 0,m=f-a,y=u(m),v=f<=p;a=f;const A={loaded:f,total:p,progress:p?f/p:void 0,bytes:m,rate:y||void 0,estimated:y&&p&&v?(p-f)/y:void 0,event:c,lengthComputable:p!=null,[r?"download":"upload"]:!0};o(A)},i)},sl=(o,r)=>{const i=o!=null;return[a=>r[0]({lengthComputable:i,total:o,loaded:a}),r[1]]},al=o=>(...r)=>S.asap(()=>o(...r)),kv=Re.hasStandardBrowserEnv?((o,r)=>i=>(i=new URL(i,Re.origin),o.protocol===i.protocol&&o.host===i.host&&(r||o.port===i.port)))(new URL(Re.origin),Re.navigator&&/(msie|trident)/i.test(Re.navigator.userAgent)):()=>!0,Fv=Re.hasStandardBrowserEnv?{write(o,r,i,a,u,c,f){if(typeof document>"u")return;const p=[`${o}=${encodeURIComponent(r)}`];S.isNumber(i)&&p.push(`expires=${new Date(i).toUTCString()}`),S.isString(a)&&p.push(`path=${a}`),S.isString(u)&&p.push(`domain=${u}`),c===!0&&p.push("secure"),S.isString(f)&&p.push(`SameSite=${f}`),document.cookie=p.join("; ")},read(o){if(typeof document>"u")return null;const r=document.cookie.match(new RegExp("(?:^|; )"+o+"=([^;]*)"));return r?decodeURIComponent(r[1]):null},remove(o){this.write(o,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Lv(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function Mv(o,r){return r?o.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):o}function Jl(o,r,i){let a=!Lv(r);return o&&(a||i==!1)?Mv(o,r):r}const ul=o=>o instanceof Ue?{...o}:o;function un(o,r){r=r||{};const i={};function a(y,v,A,I){return S.isPlainObject(y)&&S.isPlainObject(v)?S.merge.call({caseless:I},y,v):S.isPlainObject(v)?S.merge({},v):S.isArray(v)?v.slice():v}function u(y,v,A,I){if(S.isUndefined(v)){if(!S.isUndefined(y))return a(void 0,y,A,I)}else return a(y,v,A,I)}function c(y,v){if(!S.isUndefined(v))return a(void 0,v)}function f(y,v){if(S.isUndefined(v)){if(!S.isUndefined(y))return a(void 0,y)}else return a(void 0,v)}function p(y,v,A){if(A in r)return a(y,v);if(A in o)return a(void 0,y)}const m={url:c,method:c,data:c,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:p,headers:(y,v,A)=>u(ul(y),ul(v),A,!0)};return S.forEach(Object.keys({...o,...r}),function(v){const A=m[v]||u,I=A(o[v],r[v],v);S.isUndefined(I)&&A!==p||(i[v]=I)}),i}const Ql=o=>{const r=un({},o);let{data:i,withXSRFToken:a,xsrfHeaderName:u,xsrfCookieName:c,headers:f,auth:p}=r;if(r.headers=f=Ue.from(f),r.url=jl(Jl(r.baseURL,r.url,r.allowAbsoluteUrls),o.params,o.paramsSerializer),p&&f.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):""))),S.isFormData(i)){if(Re.hasStandardBrowserEnv||Re.hasStandardBrowserWebWorkerEnv)f.setContentType(void 0);else if(S.isFunction(i.getHeaders)){const m=i.getHeaders(),y=["content-type","content-length"];Object.entries(m).forEach(([v,A])=>{y.includes(v.toLowerCase())&&f.set(v,A)})}}if(Re.hasStandardBrowserEnv&&(a&&S.isFunction(a)&&(a=a(r)),a||a!==!1&&kv(r.url))){const m=u&&c&&Fv.read(c);m&&f.set(u,m)}return r},qv=typeof XMLHttpRequest<"u",Uv=qv&&function(o){return new Promise(function(i,a){const u=Ql(o);let c=u.data;const f=Ue.from(u.headers).normalize();let{responseType:p,onUploadProgress:m,onDownloadProgress:y}=u,v,A,I,L,R;function k(){L&&L(),R&&R(),u.cancelToken&&u.cancelToken.unsubscribe(v),u.signal&&u.signal.removeEventListener("abort",v)}let P=new XMLHttpRequest;P.open(u.method.toUpperCase(),u.url,!0),P.timeout=u.timeout;function $(){if(!P)return;const X=Ue.from("getAllResponseHeaders"in P&&P.getAllResponseHeaders()),ce={data:!p||p==="text"||p==="json"?P.responseText:P.response,status:P.status,statusText:P.statusText,headers:X,config:o,request:P};Yl(function(ue){i(ue),k()},function(ue){a(ue),k()},ce),P=null}"onloadend"in P?P.onloadend=$:P.onreadystatechange=function(){!P||P.readyState!==4||P.status===0&&!(P.responseURL&&P.responseURL.indexOf("file:")===0)||setTimeout($)},P.onabort=function(){P&&(a(new j("Request aborted",j.ECONNABORTED,o,P)),P=null)},P.onerror=function(he){const ce=he&&he.message?he.message:"Network Error",Oe=new j(ce,j.ERR_NETWORK,o,P);Oe.event=he||null,a(Oe),P=null},P.ontimeout=function(){let he=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const ce=u.transitional||Gl;u.timeoutErrorMessage&&(he=u.timeoutErrorMessage),a(new j(he,ce.clarifyTimeoutError?j.ETIMEDOUT:j.ECONNABORTED,o,P)),P=null},c===void 0&&f.setContentType(null),"setRequestHeader"in P&&S.forEach(f.toJSON(),function(he,ce){P.setRequestHeader(ce,he)}),S.isUndefined(u.withCredentials)||(P.withCredentials=!!u.withCredentials),p&&p!=="json"&&(P.responseType=u.responseType),y&&([I,R]=yi(y,!0),P.addEventListener("progress",I)),m&&P.upload&&([A,L]=yi(m),P.upload.addEventListener("progress",A),P.upload.addEventListener("loadend",L)),(u.cancelToken||u.signal)&&(v=X=>{P&&(a(!X||X.type?new Fn(null,o,P):X),P.abort(),P=null)},u.cancelToken&&u.cancelToken.subscribe(v),u.signal&&(u.signal.aborted?v():u.signal.addEventListener("abort",v)));const ae=Pv(u.url);if(ae&&Re.protocols.indexOf(ae)===-1){a(new j("Unsupported protocol "+ae+":",j.ERR_BAD_REQUEST,o));return}P.send(c||null)})},Bv=(o,r)=>{const{length:i}=o=o?o.filter(Boolean):[];if(r||i){let a=new AbortController,u;const c=function(y){if(!u){u=!0,p();const v=y instanceof Error?y:this.reason;a.abort(v instanceof j?v:new Fn(v instanceof Error?v.message:v))}};let f=r&&setTimeout(()=>{f=null,c(new j(`timeout ${r} of ms exceeded`,j.ETIMEDOUT))},r);const p=()=>{o&&(f&&clearTimeout(f),f=null,o.forEach(y=>{y.unsubscribe?y.unsubscribe(c):y.removeEventListener("abort",c)}),o=null)};o.forEach(y=>y.addEventListener("abort",c));const{signal:m}=a;return m.unsubscribe=()=>S.asap(p),m}},Wv=function*(o,r){let i=o.byteLength;if(i<r){yield o;return}let a=0,u;for(;a<i;)u=a+r,yield o.slice(a,u),a=u},$v=async function*(o,r){for await(const i of Hv(o))yield*Wv(i,r)},Hv=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}const r=o.getReader();try{for(;;){const{done:i,value:a}=await r.read();if(i)break;yield a}}finally{await r.cancel()}},ll=(o,r,i,a)=>{const u=$v(o,r);let c=0,f,p=m=>{f||(f=!0,a&&a(m))};return new ReadableStream({async pull(m){try{const{done:y,value:v}=await u.next();if(y){p(),m.close();return}let A=v.byteLength;if(i){let I=c+=A;i(I)}m.enqueue(new Uint8Array(v))}catch(y){throw p(y),y}},cancel(m){return p(m),u.return()}},{highWaterMark:2})},cl=64*1024,{isFunction:li}=S,Vv=(({Request:o,Response:r})=>({Request:o,Response:r}))(S.global),{ReadableStream:fl,TextEncoder:dl}=S.global,hl=(o,...r)=>{try{return!!o(...r)}catch{return!1}},jv=o=>{o=S.merge.call({skipUndefined:!0},Vv,o);const{fetch:r,Request:i,Response:a}=o,u=r?li(r):typeof fetch=="function",c=li(i),f=li(a);if(!u)return!1;const p=u&&li(fl),m=u&&(typeof dl=="function"?(R=>k=>R.encode(k))(new dl):async R=>new Uint8Array(await new i(R).arrayBuffer())),y=c&&p&&hl(()=>{let R=!1;const k=new i(Re.origin,{body:new fl,method:"POST",get duplex(){return R=!0,"half"}}).headers.has("Content-Type");return R&&!k}),v=f&&p&&hl(()=>S.isReadableStream(new a("").body)),A={stream:v&&(R=>R.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(R=>{!A[R]&&(A[R]=(k,P)=>{let $=k&&k[R];if($)return $.call(k);throw new j(`Response type '${R}' is not supported`,j.ERR_NOT_SUPPORT,P)})});const I=async R=>{if(R==null)return 0;if(S.isBlob(R))return R.size;if(S.isSpecCompliantForm(R))return(await new i(Re.origin,{method:"POST",body:R}).arrayBuffer()).byteLength;if(S.isArrayBufferView(R)||S.isArrayBuffer(R))return R.byteLength;if(S.isURLSearchParams(R)&&(R=R+""),S.isString(R))return(await m(R)).byteLength},L=async(R,k)=>{const P=S.toFiniteNumber(R.getContentLength());return P??I(k)};return async R=>{let{url:k,method:P,data:$,signal:ae,cancelToken:X,timeout:he,onDownloadProgress:ce,onUploadProgress:Oe,responseType:ue,headers:it,withCredentials:ze="same-origin",fetchOptions:cn}=Ql(R),fn=r||fetch;ue=ue?(ue+"").toLowerCase():"text";let mt=Bv([ae,X&&X.toAbortSignal()],he),_t=null;const Ke=mt&&mt.unsubscribe&&(()=>{mt.unsubscribe()});let Lt;try{if(Oe&&y&&P!=="get"&&P!=="head"&&(Lt=await L(it,$))!==0){let T=new i(k,{method:"POST",body:$,duplex:"half"}),W;if(S.isFormData($)&&(W=T.headers.get("content-type"))&&it.setContentType(W),T.body){const[ne,ie]=sl(Lt,yi(al(Oe)));$=ll(T.body,cl,ne,ie)}}S.isString(ze)||(ze=ze?"include":"omit");const Ce=c&&"credentials"in i.prototype,Be={...cn,signal:mt,method:P.toUpperCase(),headers:it.normalize().toJSON(),body:$,duplex:"half",credentials:Ce?ze:void 0};_t=c&&new i(k,Be);let ye=await(c?fn(_t,cn):fn(k,Be));const Kt=v&&(ue==="stream"||ue==="response");if(v&&(ce||Kt&&Ke)){const T={};["status","statusText","headers"].forEach(De=>{T[De]=ye[De]});const W=S.toFiniteNumber(ye.headers.get("content-length")),[ne,ie]=ce&&sl(W,yi(al(ce),!0))||[];ye=new a(ll(ye.body,cl,ne,()=>{ie&&ie(),Ke&&Ke()}),T)}ue=ue||"text";let Et=await A[S.findKey(A,ue)||"text"](ye,R);return!Kt&&Ke&&Ke(),await new Promise((T,W)=>{Yl(T,W,{data:Et,headers:Ue.from(ye.headers),status:ye.status,statusText:ye.statusText,config:R,request:_t})})}catch(Ce){throw Ke&&Ke(),Ce&&Ce.name==="TypeError"&&/Load failed|fetch/i.test(Ce.message)?Object.assign(new j("Network Error",j.ERR_NETWORK,R,_t),{cause:Ce.cause||Ce}):j.from(Ce,Ce&&Ce.code,R,_t)}}},Gv=new Map,Xl=o=>{let r=o&&o.env||{};const{fetch:i,Request:a,Response:u}=r,c=[a,u,i];let f=c.length,p=f,m,y,v=Gv;for(;p--;)m=c[p],y=v.get(m),y===void 0&&v.set(m,y=p?new Map:jv(r)),v=y;return y};Xl();const hs={http:lv,xhr:Uv,fetch:{get:Xl}};S.forEach(hs,(o,r)=>{if(o){try{Object.defineProperty(o,"name",{value:r})}catch{}Object.defineProperty(o,"adapterName",{value:r})}});const pl=o=>`- ${o}`,zv=o=>S.isFunction(o)||o===null||o===!1;function Kv(o,r){o=S.isArray(o)?o:[o];const{length:i}=o;let a,u;const c={};for(let f=0;f<i;f++){a=o[f];let p;if(u=a,!zv(a)&&(u=hs[(p=String(a)).toLowerCase()],u===void 0))throw new j(`Unknown adapter '${p}'`);if(u&&(S.isFunction(u)||(u=u.get(r))))break;c[p||"#"+f]=u}if(!u){const f=Object.entries(c).map(([m,y])=>`adapter ${m} `+(y===!1?"is not supported by the environment":"is not available in the build"));let p=i?f.length>1?`since :
32
32
  `+f.map(pl).join(`
33
33
  `):" "+pl(f[0]):"as no adapter specified";throw new j("There is no suitable adapter to dispatch the request "+p,"ERR_NOT_SUPPORT")}return u}const Zl={getAdapter:Kv,adapters:hs};function rs(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new Fn(null,o)}function gl(o){return rs(o),o.headers=Ue.from(o.headers),o.data=ns.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",!1),Zl.getAdapter(o.adapter||fr.adapter,o)(o).then(function(a){return rs(o),a.data=ns.call(o,o.transformResponse,a),a.headers=Ue.from(a.headers),a},function(a){return Kl(a)||(rs(o),a&&a.response&&(a.response.data=ns.call(o,o.transformResponse,a.response),a.response.headers=Ue.from(a.response.headers))),Promise.reject(a)})}const ec="1.13.2",Ei={};["object","boolean","number","function","string","symbol"].forEach((o,r)=>{Ei[o]=function(a){return typeof a===o||"a"+(r<1?"n ":" ")+o}});const ml={};Ei.transitional=function(r,i,a){function u(c,f){return"[Axios v"+ec+"] Transitional option '"+c+"'"+f+(a?". "+a:"")}return(c,f,p)=>{if(r===!1)throw new j(u(f," has been removed"+(i?" in "+i:"")),j.ERR_DEPRECATED);return i&&!ml[f]&&(ml[f]=!0,console.warn(u(f," has been deprecated since v"+i+" and will be removed in the near future"))),r?r(c,f,p):!0}};Ei.spelling=function(r){return(i,a)=>(console.warn(`${a} is likely a misspelling of ${r}`),!0)};function Yv(o,r,i){if(typeof o!="object")throw new j("options must be an object",j.ERR_BAD_OPTION_VALUE);const a=Object.keys(o);let u=a.length;for(;u-- >0;){const c=a[u],f=r[c];if(f){const p=o[c],m=p===void 0||f(p,c,o);if(m!==!0)throw new j("option "+c+" must be "+m,j.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new j("Unknown option "+c,j.ERR_BAD_OPTION)}}const _i={assertOptions:Yv,validators:Ei},bt=_i.validators;let sn=class{constructor(r){this.defaults=r||{},this.interceptors={request:new il,response:new il}}async request(r,i){try{return await this._request(r,i)}catch(a){if(a instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const c=u.stack?u.stack.replace(/^.+\n/,""):"";try{a.stack?c&&!String(a.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(a.stack+=`
34
- `+c):a.stack=c}catch{}}throw a}}_request(r,i){typeof r=="string"?(i=i||{},i.url=r):i=r||{},i=un(this.defaults,i);const{transitional:a,paramsSerializer:u,headers:c}=i;a!==void 0&&_i.assertOptions(a,{silentJSONParsing:bt.transitional(bt.boolean),forcedJSONParsing:bt.transitional(bt.boolean),clarifyTimeoutError:bt.transitional(bt.boolean)},!1),u!=null&&(S.isFunction(u)?i.paramsSerializer={serialize:u}:_i.assertOptions(u,{encode:bt.function,serialize:bt.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),_i.assertOptions(i,{baseUrl:bt.spelling("baseURL"),withXsrfToken:bt.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let f=c&&S.merge(c.common,c[i.method]);c&&S.forEach(["delete","get","head","post","put","patch","common"],R=>{delete c[R]}),i.headers=Ue.concat(f,c);const p=[];let m=!0;this.interceptors.request.forEach(function(k){typeof k.runWhen=="function"&&k.runWhen(i)===!1||(m=m&&k.synchronous,p.unshift(k.fulfilled,k.rejected))});const y=[];this.interceptors.response.forEach(function(k){y.push(k.fulfilled,k.rejected)});let v,A=0,I;if(!m){const R=[gl.bind(this),void 0];for(R.unshift(...p),R.push(...y),I=R.length,v=Promise.resolve(i);A<I;)v=v.then(R[A++],R[A++]);return v}I=p.length;let L=i;for(;A<I;){const R=p[A++],k=p[A++];try{L=R(L)}catch(P){k.call(this,P);break}}try{v=gl.call(this,L)}catch(R){return Promise.reject(R)}for(A=0,I=y.length;A<I;)v=v.then(y[A++],y[A++]);return v}getUri(r){r=un(this.defaults,r);const i=Jl(r.baseURL,r.url,r.allowAbsoluteUrls);return jl(i,r.params,r.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(r){sn.prototype[r]=function(i,a){return this.request(un(a||{},{method:r,url:i,data:(a||{}).data}))}});S.forEach(["post","put","patch"],function(r){function i(a){return function(c,f,p){return this.request(un(p||{},{method:r,headers:a?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}sn.prototype[r]=i(),sn.prototype[r+"Form"]=i(!0)});let Jv=class tc{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(c){i=c});const a=this;this.promise.then(u=>{if(!a._listeners)return;let c=a._listeners.length;for(;c-- >0;)a._listeners[c](u);a._listeners=null}),this.promise.then=u=>{let c;const f=new Promise(p=>{a.subscribe(p),c=p}).then(u);return f.cancel=function(){a.unsubscribe(c)},f},r(function(c,f,p){a.reason||(a.reason=new Fn(c,f,p),i(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const i=this._listeners.indexOf(r);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const r=new AbortController,i=a=>{r.abort(a)};return this.subscribe(i),r.signal.unsubscribe=()=>this.unsubscribe(i),r.signal}static source(){let r;return{token:new tc(function(u){r=u}),cancel:r}}};function Qv(o){return function(i){return o.apply(null,i)}}function Xv(o){return S.isObject(o)&&o.isAxiosError===!0}const us={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(us).forEach(([o,r])=>{us[r]=o});function nc(o){const r=new sn(o),i=Dl(sn.prototype.request,r);return S.extend(i,sn.prototype,r,{allOwnKeys:!0}),S.extend(i,r,null,{allOwnKeys:!0}),i.create=function(u){return nc(un(o,u))},i}const de=nc(fr);de.Axios=sn;de.CanceledError=Fn;de.CancelToken=Jv;de.isCancel=Kl;de.VERSION=ec;de.toFormData=Si;de.AxiosError=j;de.Cancel=de.CanceledError;de.all=function(r){return Promise.all(r)};de.spread=Qv;de.isAxiosError=Xv;de.mergeConfig=un;de.AxiosHeaders=Ue;de.formToJSON=o=>zl(S.isHTMLForm(o)?new FormData(o):o);de.getAdapter=Zl.getAdapter;de.HttpStatusCode=us;de.default=de;const{Axios:E0,AxiosError:_l,CanceledError:x0,isCancel:T0,CancelToken:R0,VERSION:O0,all:C0,Cancel:N0,isAxiosError:P0,spread:I0,toFormData:D0,AxiosHeaders:k0,HttpStatusCode:F0,formToJSON:L0,getAdapter:M0,mergeConfig:q0}=de,Zv=o=>Nl.some(o,r=>r&&r.errorCode!==void 0)||o?.errorCode!==void 0,yl=typeof window<"u";class rc{constructor(r={}){this.requestStrategy=async(i,a)=>{await a(i)},this.responseStrategy=async(i,a)=>{await a(i)},this.defaultBaseUrl=r.defaultBaseUrl,this.useGlobalSingletons=r.useGlobalSingletons??!1,this.globalQueryClientKey=r.globalQueryClientKey||"__STORE_QUERY_CLIENT__",this.globalAxiosKey=r.globalAxiosKey||"__STORE_API_CLIENT__",this.createQueryClientImpl=r.createQueryClient||(()=>new an.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})),this.createAxiosImpl=r.createAxios||(i=>{const a=de.create({baseURL:i||this.defaultBaseUrl,withCredentials:!0});return this.configureAxios(a)})}getQueryClient(r){if(yl){if(r?.client)return r.client;if(this.useGlobalSingletons){const i=globalThis,a=i[this.globalQueryClientKey];if(a)return a;const u=this.createQueryClientImpl();return i[this.globalQueryClientKey]=u,u}return this.queryClientSingleton||(this.queryClientSingleton=this.createQueryClientImpl()),this.queryClientSingleton}return this.createQueryClientImpl()}getAxiosInstance(){if(yl){if(this.useGlobalSingletons){const r=globalThis,i=r[this.globalAxiosKey];if(i)return i;const a=this.configureAxios(this.createAxiosImpl());return r[this.globalAxiosKey]=a,a}return this.axiosSingleton||(this.axiosSingleton=this.configureAxios(this.createAxiosImpl())),this.axiosSingleton}return this.configureAxios(this.createAxiosImpl())}setDefaultApiBaseUrl(r){this.defaultBaseUrl=r}async setApiUrl(r){const i=this.getAxiosInstance();i.defaults.baseURL=r}setRequestInterceptorStrategy(r){this.requestStrategy=r,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}setResponseInterceptorStrategy(r){this.responseStrategy=r,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}getAxiosProxy(){return new Proxy({},{get:(r,i)=>{const a=this.getAxiosInstance(),u=Reflect.get(a,i);return typeof u=="function"?u.bind(a):u},set:(r,i,a)=>Reflect.set(this.getAxiosInstance(),i,a)})}getQueryClientProxy(){return new Proxy({},{get:(r,i)=>{const a=this.getQueryClient(),u=Reflect.get(a,i);return typeof u=="function"?u.bind(a):u},set:(r,i,a)=>Reflect.set(this.getQueryClient(),i,a)})}configureAxios(r){return r.interceptors.request.clear(),r.interceptors.response.clear(),r.interceptors.request.use(async i=>{const a=async u=>{};return await this.requestStrategy(i,a),i}),r.interceptors.response.use(async i=>{const a=async u=>{};return await this.responseStrategy(i,a),i}),r}}const ic="auth_token",e0="lang",ls="currencyCode",xi=new rc({createQueryClient:()=>new an.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}}),createAxios:o=>de.create({baseURL:o,withCredentials:!0,headers:{"vendure-token":""}}),useGlobalSingletons:!0,globalQueryClientKey:"__STORE_QUERY_CLIENT__",globalAxiosKey:"__STORE_API_CLIENT__"});xi.setRequestInterceptorStrategy(async(o,r)=>{const i=await At.getItem(ic),a=await At.getItem("channelToken"),u=await At.getItem(ls),c=await At.getItem(e0);i&&(o.headers.Authorization=`Bearer ${i}`),a&&(o.headers["vendure-token"]=a),o.params=o.params||{},u&&(o.params.currencyCode=u),c&&(o.params.languageCode=c),await r(o)});xi.setResponseInterceptorStrategy(async(o,r)=>{const i=o.headers["vendure-auth-token"];if(i&&At.setItem(ic,i),Zv(o.data.data)){const a=Object.values(o.data.data)[0],u=new _l(a.errorCode);return u.response=o,u.config=o.config,Promise.reject(u)}if(o.data.errors?.length>0){const a=o.data.errors[0],u=new _l(a.message);return u.response=o,u.config=o.config,Promise.reject(u)}await r(o)});xi.getAxiosProxy();xi.getQueryClientProxy();const t0=globalThis.__STORE_SDK_CONTEXT__||=ht.createContext(void 0),oc=()=>{const r=ht.useContext(t0)?.sdk;return r||console.error("You must wrap your component in a <DataProvider>"),r?.sdkType==="dummy"||r?.sdkType==="vendure",r};var dt={},ci={},fi={},di={},vl;function dr(){if(vl)return di;vl=1,Object.defineProperty(di,"__esModule",{value:!0});var o;return function(r){r.Mutation="mutation",r.Query="query",r.Subscription="subscription"}(o||(o={})),di.default=o,di}var Cn={},sr={},wl;function n0(){if(wl)return sr;wl=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.isNestedField=void 0;function o(r){return typeof r=="object"&&r.hasOwnProperty("operation")&&r.hasOwnProperty("variables")&&r.hasOwnProperty("fields")||typeof r=="object"&&r.hasOwnProperty("operation")&&r.hasOwnProperty("fragment")&&r.hasOwnProperty("fields")}return sr.isNestedField=o,sr}var bl;function hr(){if(bl)return Cn;bl=1;var o=Cn&&Cn.__assign||function(){return o=Object.assign||function(a){for(var u,c=1,f=arguments.length;c<f;c++){u=arguments[c];for(var p in u)Object.prototype.hasOwnProperty.call(u,p)&&(a[p]=u[p])}return a},o.apply(this,arguments)};Object.defineProperty(Cn,"__esModule",{value:!0});var r=n0(),i=function(){function a(){}return a.resolveVariables=function(u){for(var c={},f=0,p=u;f<p.length;f++){var m=p[f],y=m.variables,v=m.fields;c=o(o(o({},c),y),v&&a.getNestedVariables(v)||{})}return c},a.queryDataNameAndArgumentMap=function(u){return u&&Object.keys(u).length?"(".concat(Object.entries(u).reduce(function(c,f,p){var m=f[0],y=f[1];return"".concat(c).concat(p!==0?", ":"").concat(y&&y.name?y.name:m,": $").concat(m)},""),")"):""},a.queryFieldsMap=function(u){var c=this;return u?u.map(function(f){if((0,r.isNestedField)(f))return a.queryNestedFieldMap(f);if(typeof f=="object"){var p="";return Object.entries(f).forEach(function(m,y,v){var A=m[0],I=m[1];p+="".concat(A," ").concat(I.length>0?"{ "+c.queryFieldsMap(I)+" }":""),y<v.length-1&&(p+=", ")}),p}else return"".concat(f)}).join(", "):""},a.operationOrAlias=function(u){return typeof u=="string"?u:"".concat(u.alias,": ").concat(u.name)},a.isFragment=function(u){var c;return(c=u?.fragment===!0)!==null&&c!==void 0?c:!1},a.operationOrFragment=function(u){return a.isFragment(u)?u.operation:a.operationOrAlias(u.operation)},a.getFragment=function(u){return a.isFragment(u)?"... on ":""},a.queryNestedFieldMap=function(u){return"".concat(a.getFragment(u)).concat(a.operationOrFragment(u)," ").concat(this.isFragment(u)?"":this.queryDataNameAndArgumentMap(u.variables)," ").concat(u.fields.length>0?"{ "+this.queryFieldsMap(u.fields)+" }":"")},a.queryVariablesMap=function(u,c){var f={},p=function(m){m&&Object.keys(m).map(function(y){f[y]=typeof m[y]=="object"?m[y].value:m[y]})};return p(u),c&&typeof c=="object"&&p(a.getNestedVariables(c)),f},a.getNestedVariables=function(u){var c={};function f(p){return p?.forEach(function(m){if((0,r.isNestedField)(m))c=o(o(o({},m.variables),c),m.fields&&f(m.fields));else if(typeof m=="object")for(var y=0,v=Object.entries(m);y<v.length;y++){var A=v[y],I=A[1];f(I)}}),c}return f(u),c},a.queryDataType=function(u){var c="String",f=typeof u=="object"?u.value:u;if(u?.type!=null)c=u.type;else{var p=Array.isArray(f)?f[0]:f;switch(typeof p){case"object":c="Object";break;case"boolean":c="Boolean";break;case"number":c=p%1===0?"Int":"Float";break}}return typeof u=="object"&&(u.list===!0?c="[".concat(c,"]"):Array.isArray(u.list)&&(c="[".concat(c).concat(u.list[0]?"!":"","]")),u.required&&(c+="!")),c},a}();return Cn.default=i,Cn}var Al;function r0(){if(Al)return fi;Al=1,Object.defineProperty(fi,"__esModule",{value:!0});var o=dr(),r=hr(),i=function(){function a(u){Array.isArray(u)?this.variables=r.default.resolveVariables(u):(this.variables=u.variables,this.fields=u.fields,this.operation=u.operation)}return a.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},a.prototype.mutationsBuilder=function(u){var c=this,f=u.map(function(p){return c.operation=p.operation,c.variables=p.variables,c.fields=p.fields,c.operationTemplate(p.operation)});return this.operationWrapperTemplate(r.default.resolveVariables(u),f.join(`
34
+ `+c):a.stack=c}catch{}}throw a}}_request(r,i){typeof r=="string"?(i=i||{},i.url=r):i=r||{},i=un(this.defaults,i);const{transitional:a,paramsSerializer:u,headers:c}=i;a!==void 0&&_i.assertOptions(a,{silentJSONParsing:bt.transitional(bt.boolean),forcedJSONParsing:bt.transitional(bt.boolean),clarifyTimeoutError:bt.transitional(bt.boolean)},!1),u!=null&&(S.isFunction(u)?i.paramsSerializer={serialize:u}:_i.assertOptions(u,{encode:bt.function,serialize:bt.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),_i.assertOptions(i,{baseUrl:bt.spelling("baseURL"),withXsrfToken:bt.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let f=c&&S.merge(c.common,c[i.method]);c&&S.forEach(["delete","get","head","post","put","patch","common"],R=>{delete c[R]}),i.headers=Ue.concat(f,c);const p=[];let m=!0;this.interceptors.request.forEach(function(k){typeof k.runWhen=="function"&&k.runWhen(i)===!1||(m=m&&k.synchronous,p.unshift(k.fulfilled,k.rejected))});const y=[];this.interceptors.response.forEach(function(k){y.push(k.fulfilled,k.rejected)});let v,A=0,I;if(!m){const R=[gl.bind(this),void 0];for(R.unshift(...p),R.push(...y),I=R.length,v=Promise.resolve(i);A<I;)v=v.then(R[A++],R[A++]);return v}I=p.length;let L=i;for(;A<I;){const R=p[A++],k=p[A++];try{L=R(L)}catch(P){k.call(this,P);break}}try{v=gl.call(this,L)}catch(R){return Promise.reject(R)}for(A=0,I=y.length;A<I;)v=v.then(y[A++],y[A++]);return v}getUri(r){r=un(this.defaults,r);const i=Jl(r.baseURL,r.url,r.allowAbsoluteUrls);return jl(i,r.params,r.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(r){sn.prototype[r]=function(i,a){return this.request(un(a||{},{method:r,url:i,data:(a||{}).data}))}});S.forEach(["post","put","patch"],function(r){function i(a){return function(c,f,p){return this.request(un(p||{},{method:r,headers:a?{"Content-Type":"multipart/form-data"}:{},url:c,data:f}))}}sn.prototype[r]=i(),sn.prototype[r+"Form"]=i(!0)});let Jv=class tc{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(c){i=c});const a=this;this.promise.then(u=>{if(!a._listeners)return;let c=a._listeners.length;for(;c-- >0;)a._listeners[c](u);a._listeners=null}),this.promise.then=u=>{let c;const f=new Promise(p=>{a.subscribe(p),c=p}).then(u);return f.cancel=function(){a.unsubscribe(c)},f},r(function(c,f,p){a.reason||(a.reason=new Fn(c,f,p),i(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const i=this._listeners.indexOf(r);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const r=new AbortController,i=a=>{r.abort(a)};return this.subscribe(i),r.signal.unsubscribe=()=>this.unsubscribe(i),r.signal}static source(){let r;return{token:new tc(function(u){r=u}),cancel:r}}};function Qv(o){return function(i){return o.apply(null,i)}}function Xv(o){return S.isObject(o)&&o.isAxiosError===!0}const us={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(us).forEach(([o,r])=>{us[r]=o});function nc(o){const r=new sn(o),i=Dl(sn.prototype.request,r);return S.extend(i,sn.prototype,r,{allOwnKeys:!0}),S.extend(i,r,null,{allOwnKeys:!0}),i.create=function(u){return nc(un(o,u))},i}const de=nc(fr);de.Axios=sn;de.CanceledError=Fn;de.CancelToken=Jv;de.isCancel=Kl;de.VERSION=ec;de.toFormData=Si;de.AxiosError=j;de.Cancel=de.CanceledError;de.all=function(r){return Promise.all(r)};de.spread=Qv;de.isAxiosError=Xv;de.mergeConfig=un;de.AxiosHeaders=Ue;de.formToJSON=o=>zl(S.isHTMLForm(o)?new FormData(o):o);de.getAdapter=Zl.getAdapter;de.HttpStatusCode=us;de.default=de;const{Axios:E0,AxiosError:_l,CanceledError:x0,isCancel:T0,CancelToken:R0,VERSION:O0,all:C0,Cancel:N0,isAxiosError:P0,spread:I0,toFormData:D0,AxiosHeaders:k0,HttpStatusCode:F0,formToJSON:L0,getAdapter:M0,mergeConfig:q0}=de,Zv=o=>(o&&Nl.some(o,r=>r&&r?.errorCode!==void 0)||o?.errorCode!==void 0)&&o!==void 0,yl=typeof window<"u";class rc{constructor(r={}){this.requestStrategy=async(i,a)=>{await a(i)},this.responseStrategy=async(i,a)=>{await a(i)},this.defaultBaseUrl=r.defaultBaseUrl,this.useGlobalSingletons=r.useGlobalSingletons??!1,this.globalQueryClientKey=r.globalQueryClientKey||"__STORE_QUERY_CLIENT__",this.globalAxiosKey=r.globalAxiosKey||"__STORE_API_CLIENT__",this.createQueryClientImpl=r.createQueryClient||(()=>new an.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})),this.createAxiosImpl=r.createAxios||(i=>{const a=de.create({baseURL:i||this.defaultBaseUrl,withCredentials:!0});return this.configureAxios(a)})}getQueryClient(r){if(yl){if(r?.client)return r.client;if(this.useGlobalSingletons){const i=globalThis,a=i[this.globalQueryClientKey];if(a)return a;const u=this.createQueryClientImpl();return i[this.globalQueryClientKey]=u,u}return this.queryClientSingleton||(this.queryClientSingleton=this.createQueryClientImpl()),this.queryClientSingleton}return this.createQueryClientImpl()}getAxiosInstance(){if(yl){if(this.useGlobalSingletons){const r=globalThis,i=r[this.globalAxiosKey];if(i)return i;const a=this.configureAxios(this.createAxiosImpl());return r[this.globalAxiosKey]=a,a}return this.axiosSingleton||(this.axiosSingleton=this.configureAxios(this.createAxiosImpl())),this.axiosSingleton}return this.configureAxios(this.createAxiosImpl())}setDefaultApiBaseUrl(r){this.defaultBaseUrl=r}async setApiUrl(r){const i=this.getAxiosInstance();i.defaults.baseURL=r}setRequestInterceptorStrategy(r){this.requestStrategy=r,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}setResponseInterceptorStrategy(r){this.responseStrategy=r,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}getAxiosProxy(){return new Proxy({},{get:(r,i)=>{const a=this.getAxiosInstance(),u=Reflect.get(a,i);return typeof u=="function"?u.bind(a):u},set:(r,i,a)=>Reflect.set(this.getAxiosInstance(),i,a)})}getQueryClientProxy(){return new Proxy({},{get:(r,i)=>{const a=this.getQueryClient(),u=Reflect.get(a,i);return typeof u=="function"?u.bind(a):u},set:(r,i,a)=>Reflect.set(this.getQueryClient(),i,a)})}configureAxios(r){return r.interceptors.request.clear(),r.interceptors.response.clear(),r.interceptors.request.use(async i=>{const a=async u=>{};return await this.requestStrategy(i,a),i}),r.interceptors.response.use(async i=>{const a=async u=>{};return await this.responseStrategy(i,a),i}),r}}const ic="auth_token",e0="lang",ls="currencyCode",xi=new rc({createQueryClient:()=>new an.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}}),createAxios:o=>de.create({baseURL:o,withCredentials:!0,headers:{"vendure-token":""}}),useGlobalSingletons:!0,globalQueryClientKey:"__STORE_QUERY_CLIENT__",globalAxiosKey:"__STORE_API_CLIENT__"});xi.setRequestInterceptorStrategy(async(o,r)=>{const i=await At.getItem(ic),a=await At.getItem("channelToken"),u=await At.getItem(ls),c=await At.getItem(e0);i&&(o.headers.Authorization=`Bearer ${i}`),a&&(o.headers["vendure-token"]=a),o.params=o.params||{},u&&(o.params.currencyCode=u),c&&(o.params.languageCode=c),await r(o)});xi.setResponseInterceptorStrategy(async(o,r)=>{const i=o.headers["vendure-auth-token"];if(i&&At.setItem(ic,i),Zv(o.data.data)){const a=Object.values(o.data.data)[0],u=new _l(a.errorCode);return u.response=o,u.config=o.config,Promise.reject(u)}if(o.data.errors?.length>0){const a=o.data.errors[0],u=new _l(a.message);return u.response=o,u.config=o.config,Promise.reject(u)}await r(o)});xi.getAxiosProxy();xi.getQueryClientProxy();const t0=globalThis.__STORE_SDK_CONTEXT__||=ht.createContext(void 0),oc=()=>{const r=ht.useContext(t0)?.sdk;return r||console.error("You must wrap your component in a <DataProvider>"),r?.sdkType==="dummy"||r?.sdkType==="vendure",r};var dt={},ci={},fi={},di={},vl;function dr(){if(vl)return di;vl=1,Object.defineProperty(di,"__esModule",{value:!0});var o;return function(r){r.Mutation="mutation",r.Query="query",r.Subscription="subscription"}(o||(o={})),di.default=o,di}var Cn={},sr={},wl;function n0(){if(wl)return sr;wl=1,Object.defineProperty(sr,"__esModule",{value:!0}),sr.isNestedField=void 0;function o(r){return typeof r=="object"&&r.hasOwnProperty("operation")&&r.hasOwnProperty("variables")&&r.hasOwnProperty("fields")||typeof r=="object"&&r.hasOwnProperty("operation")&&r.hasOwnProperty("fragment")&&r.hasOwnProperty("fields")}return sr.isNestedField=o,sr}var bl;function hr(){if(bl)return Cn;bl=1;var o=Cn&&Cn.__assign||function(){return o=Object.assign||function(a){for(var u,c=1,f=arguments.length;c<f;c++){u=arguments[c];for(var p in u)Object.prototype.hasOwnProperty.call(u,p)&&(a[p]=u[p])}return a},o.apply(this,arguments)};Object.defineProperty(Cn,"__esModule",{value:!0});var r=n0(),i=function(){function a(){}return a.resolveVariables=function(u){for(var c={},f=0,p=u;f<p.length;f++){var m=p[f],y=m.variables,v=m.fields;c=o(o(o({},c),y),v&&a.getNestedVariables(v)||{})}return c},a.queryDataNameAndArgumentMap=function(u){return u&&Object.keys(u).length?"(".concat(Object.entries(u).reduce(function(c,f,p){var m=f[0],y=f[1];return"".concat(c).concat(p!==0?", ":"").concat(y&&y.name?y.name:m,": $").concat(m)},""),")"):""},a.queryFieldsMap=function(u){var c=this;return u?u.map(function(f){if((0,r.isNestedField)(f))return a.queryNestedFieldMap(f);if(typeof f=="object"){var p="";return Object.entries(f).forEach(function(m,y,v){var A=m[0],I=m[1];p+="".concat(A," ").concat(I.length>0?"{ "+c.queryFieldsMap(I)+" }":""),y<v.length-1&&(p+=", ")}),p}else return"".concat(f)}).join(", "):""},a.operationOrAlias=function(u){return typeof u=="string"?u:"".concat(u.alias,": ").concat(u.name)},a.isFragment=function(u){var c;return(c=u?.fragment===!0)!==null&&c!==void 0?c:!1},a.operationOrFragment=function(u){return a.isFragment(u)?u.operation:a.operationOrAlias(u.operation)},a.getFragment=function(u){return a.isFragment(u)?"... on ":""},a.queryNestedFieldMap=function(u){return"".concat(a.getFragment(u)).concat(a.operationOrFragment(u)," ").concat(this.isFragment(u)?"":this.queryDataNameAndArgumentMap(u.variables)," ").concat(u.fields.length>0?"{ "+this.queryFieldsMap(u.fields)+" }":"")},a.queryVariablesMap=function(u,c){var f={},p=function(m){m&&Object.keys(m).map(function(y){f[y]=typeof m[y]=="object"?m[y].value:m[y]})};return p(u),c&&typeof c=="object"&&p(a.getNestedVariables(c)),f},a.getNestedVariables=function(u){var c={};function f(p){return p?.forEach(function(m){if((0,r.isNestedField)(m))c=o(o(o({},m.variables),c),m.fields&&f(m.fields));else if(typeof m=="object")for(var y=0,v=Object.entries(m);y<v.length;y++){var A=v[y],I=A[1];f(I)}}),c}return f(u),c},a.queryDataType=function(u){var c="String",f=typeof u=="object"?u.value:u;if(u?.type!=null)c=u.type;else{var p=Array.isArray(f)?f[0]:f;switch(typeof p){case"object":c="Object";break;case"boolean":c="Boolean";break;case"number":c=p%1===0?"Int":"Float";break}}return typeof u=="object"&&(u.list===!0?c="[".concat(c,"]"):Array.isArray(u.list)&&(c="[".concat(c).concat(u.list[0]?"!":"","]")),u.required&&(c+="!")),c},a}();return Cn.default=i,Cn}var Al;function r0(){if(Al)return fi;Al=1,Object.defineProperty(fi,"__esModule",{value:!0});var o=dr(),r=hr(),i=function(){function a(u){Array.isArray(u)?this.variables=r.default.resolveVariables(u):(this.variables=u.variables,this.fields=u.fields,this.operation=u.operation)}return a.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},a.prototype.mutationsBuilder=function(u){var c=this,f=u.map(function(p){return c.operation=p.operation,c.variables=p.variables,c.fields=p.fields,c.operationTemplate(p.operation)});return this.operationWrapperTemplate(r.default.resolveVariables(u),f.join(`
35
35
  `))},a.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(u,c,f){return"".concat(u).concat(f!==0?", ":"").concat(c,": $").concat(c)},""),")"):""},a.prototype.queryDataArgumentAndTypeMap=function(u){return Object.keys(u).length?"(".concat(Object.keys(u).reduce(function(c,f,p){return"".concat(c).concat(p!==0?", ":"","$").concat(f,": ").concat(r.default.queryDataType(u[f]))},""),")"):""},a.prototype.operationWrapperTemplate=function(u,c){var f=typeof this.operation=="string"?this.operation:this.operation.name;return{query:"".concat(o.default.Mutation," ").concat(f.charAt(0).toUpperCase()+f.slice(1)," ").concat(this.queryDataArgumentAndTypeMap(u),` {
36
36
  `).concat(c,`
37
37
  }`),variables:r.default.queryVariablesMap(u)}},a.prototype.operationTemplate=function(u){var c=typeof u=="string"?u:"".concat(u.alias,": ").concat(u.name);return"".concat(c," ").concat(this.queryDataNameAndArgumentMap(),` {
package/index.mjs CHANGED
@@ -6243,7 +6243,7 @@ const {
6243
6243
  formToJSON: H0,
6244
6244
  getAdapter: V0,
6245
6245
  mergeConfig: j0
6246
- } = de, i0 = (o) => Il.some(o, (r) => r && r.errorCode !== void 0) || o?.errorCode !== void 0, yl = typeof window < "u";
6246
+ } = de, i0 = (o) => (o && Il.some(o, (r) => r && r?.errorCode !== void 0) || o?.errorCode !== void 0) && o !== void 0, yl = typeof window < "u";
6247
6247
  class oc {
6248
6248
  constructor(r = {}) {
6249
6249
  this.requestStrategy = async (i, a) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haus-storefront-react/currency-picker",
3
- "version": "0.0.52-1",
3
+ "version": "0.0.52-4",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -11,9 +11,9 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@haus-storefront-react/common-utils": "0.0.52-1",
15
- "@haus-storefront-react/core": "0.0.52-1",
16
- "@haus-storefront-react/hooks": "0.0.52-1",
17
- "@haus-storefront-react/shared-types": "0.0.52-1"
14
+ "@haus-storefront-react/common-utils": "0.0.52-4",
15
+ "@haus-storefront-react/core": "0.0.52-4",
16
+ "@haus-storefront-react/hooks": "0.0.52-4",
17
+ "@haus-storefront-react/shared-types": "0.0.52-4"
18
18
  }
19
19
  }