@haus-storefront-react/vendure-plugin-configs 0.0.8 → 0.0.10
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 +24 -0
- package/badge.js +5 -5
- package/badge.mjs +73 -73
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## 0.0.9 (2025-07-04)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated core to 0.0.9
|
|
6
|
+
- Updated common/utils to 0.0.9
|
|
7
|
+
- Updated shared/types to 0.0.9
|
|
8
|
+
|
|
9
|
+
## 0.0.8 (2025-07-03)
|
|
10
|
+
|
|
11
|
+
### 🚀 Features
|
|
12
|
+
|
|
13
|
+
- add ProductBadge component for enhanced product presentation ([#26](https://github.com/WeAreHausTech/haus-storefront-components/pull/26))
|
|
14
|
+
|
|
15
|
+
### 🧱 Updated Dependencies
|
|
16
|
+
|
|
17
|
+
- Updated core to 0.0.8
|
|
18
|
+
- Updated common/utils to 0.0.8
|
|
19
|
+
- Updated shared/types to 0.0.8
|
|
20
|
+
|
|
21
|
+
### ❤️ Thank You
|
|
22
|
+
|
|
23
|
+
- Johanna Bertils @johannabertils
|
|
24
|
+
|
|
1
25
|
## 0.0.7 (2025-07-03)
|
|
2
26
|
|
|
3
27
|
### 🧱 Updated Dependencies
|
package/badge.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("./index-CATkY-bf.js"),S=require("./index-BKGQQxdW.js"),B=require("react"),Ge=require("react-i18next"),Ye=require("i18next"),Fe=require("@tanstack/react-query"),ie=require("react-native");function ln(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const A=ln(B),U=new xe.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const r=e?U.getSettings().availablePositions[e]:U.getSettings().defaultPositions;return{badges:xe.lodashExports.filter(t,i=>r?r.includes(i.position):!0),availablePositions:r}}},queryUpdates:{},settings:{defaultPositions:["top-left","top-right","bottom-left","bottom-right"],availablePositions:{productListItem:["top-left","top-right","bottom-left","bottom-right"],productDetail:["top-left","top-right","bottom-left","bottom-right"],imageCarousel:["top-left","top-right","bottom-left","bottom-right"]}}});U.setQueryUpdates({product:{fields:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]},search:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]},products:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]},briefProducts:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]}});U.setRequests({getBadges:async()=>U.getSdk().createRequest({operation:"badges",fields:["totalItems",{items:["id","createdAt","updatedAt","collectionId","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]},{options:{take:100}},!1).then(t=>t.data).catch(t=>({message:t.message,errorCode:t.code||"unknown"}))});function fn(t){const e=[];function r(i,o){const s=A.createContext(o),a=e.length;e.push(s);const u=l=>{const d=S.compilerRuntimeExports.c(8);let m,b,p;d[0]!==l?({scope:p,children:m,...b}=l,d[0]=l,d[1]=m,d[2]=b,d[3]=p):(m=d[1],b=d[2],p=d[3]);const y=p?.[t]?.[a]||s;let h;h=b;const v=h;let w;return d[4]!==y.Provider||d[5]!==m||d[6]!==v?(w=S.jsxRuntimeExports.jsx(y.Provider,{value:v,children:m}),d[4]=y.Provider,d[5]=m,d[6]=v,d[7]=w):w=d[7],w};u.displayName=i+"Provider";function c(l,d){const m=d?.[t]?.[a]||s,b=A.useContext(m);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${l}\` must be used within \`${i}\``)}return[u,c]}function n(){const i=e.map(o=>A.createContext(o));return function(s){const a=s?.[t]||i;return A.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return n.scopeName=t,[r,n]}const dn=Symbol("radix.slottable");function pn(...t){return e=>t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}function mn(t,e){const r={...e};for(const n in e){const i=t[n],o=e[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...a)=>{const u=o(...a);return i(...a),u}:i&&(r[n]=i):n==="style"?r[n]=hn(i,o):n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...t,...r}}function hn(t,e){return typeof t=="function"&&typeof e=="function"?r=>ie.StyleSheet.flatten([t(r),e(r)]):typeof t=="function"?r=>e?ie.StyleSheet.flatten([t(r),e]):t(r):typeof e=="function"?r=>t?ie.StyleSheet.flatten([t,e(r)]):e(r):ie.StyleSheet.flatten([t,e].filter(Boolean))}function yn(t){return A.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===dn}function bn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function gn(t,e){const r=A.forwardRef((n,i)=>{const{children:o,...s}=n;if(A.isValidElement(o)){const a=bn(o),u=mn(s,o.props);return o.type!==A.Fragment&&(u.ref=i?pn(i,a):a),A.cloneElement(o,u)}return A.Children.count(o)>1?A.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}function ye(t){const e=gn("Slot"),r=A.forwardRef((n,i)=>{const o=S.compilerRuntimeExports.c(15);let s,a;o[0]!==n?({children:s,...a}=n,o[0]=n,o[1]=s,o[2]=a):(s=o[1],a=o[2]);let u;if(o[3]!==s||o[4]!==i||o[5]!==a){u=Symbol.for("react.early_return_sentinel");e:{const l=A.Children.toArray(s),d=l.find(yn);if(d){const m=d.props.children,b=l.map(h=>h===d?A.Children.count(m)>1?A.Children.only(null):A.isValidElement(m)?m.props.children:null:h),p=A.isValidElement(m)?A.cloneElement(m,void 0,b):null;let y;o[7]!==i||o[8]!==a||o[9]!==p?(y=S.jsxRuntimeExports.jsx(e,{...a,ref:i,children:p}),o[7]=i,o[8]=a,o[9]=p,o[10]=y):y=o[10],u=y;break e}}o[3]=s,o[4]=i,o[5]=a,o[6]=u}else u=o[6];if(u!==Symbol.for("react.early_return_sentinel"))return u;let c;return o[11]!==s||o[12]!==i||o[13]!==a?(c=S.jsxRuntimeExports.jsx(e,{...a,ref:i,children:s}),o[11]=s,o[12]=i,o[13]=a,o[14]=c):c=o[14],c});return r.displayName="Slot",r}let _e;typeof window<"u"?(window.__STORE_I18N_INSTANCE__||(window.__STORE_I18N_INSTANCE__=Ye.createInstance()),window.__STORE_I18N_INSTANCE__.use(Ge.initReactI18next),_e=window.__STORE_I18N_INSTANCE__):(_e=Ye.createInstance(),_e.use(Ge.initReactI18next));function Me(t){"@babel/helpers - typeof";return Me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(t)}function kt(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Me(XMLHttpRequest))==="object"}function vn(t){return!!t&&typeof t.then=="function"}function wn(t){return vn(t)?t:Promise.resolve(t)}function Ze(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function et(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ze(Object(r),!0).forEach(function(n){Sn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Sn(t,e,r){return(e=On(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function On(t){var e=En(t,"string");return L(e)=="symbol"?e:e+""}function En(t,e){if(L(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(L(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function L(t){"@babel/helpers - typeof";return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(t)}var D=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?D=global.fetch:typeof window<"u"&&window.fetch&&(D=window.fetch);var G;kt()&&(typeof global<"u"&&global.XMLHttpRequest?G=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(G=window.XMLHttpRequest));var pe;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?pe=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(pe=window.ActiveXObject));typeof D!="function"&&(D=void 0);if(!D&&!G&&!pe)try{Promise.resolve().then(()=>require("./browser-ponyfill-ByZyuJ42.js")).then(t=>t.browserPonyfill).then(function(t){D=t.default}).catch(function(){})}catch{}var Be=function(e,r){if(r&&L(r)==="object"){var n="";for(var i in r)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(r[i]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},tt=function(e,r,n,i){var o=function(u){if(!u.ok)return n(u.statusText||"Error",{status:u.status});u.text().then(function(c){n(null,{status:u.status,data:c})}).catch(n)};if(i){var s=i(e,r);if(s instanceof Promise){s.then(o).catch(n);return}}typeof fetch=="function"?fetch(e,r).then(o).catch(n):D(e,r).then(o).catch(n)},nt=!1,An=function(e,r,n,i){e.queryStringParams&&(r=Be(r,e.queryStringParams));var o=et({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(o["Content-Type"]="application/json");var s=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,a=et({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},nt?{}:s),u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{tt(r,a,i,u)}catch(c){if(!s||Object.keys(s).length===0||!c.message||c.message.indexOf("not implemented")<0)return i(c);try{Object.keys(s).forEach(function(l){delete a[l]}),tt(r,a,i,u),nt=!0}catch(l){i(l)}}},Tn=function(e,r,n,i){n&&L(n)==="object"&&(n=Be("",n).slice(1)),e.queryStringParams&&(r=Be(r,e.queryStringParams));try{var o=G?new G:new pe("MSXML2.XMLHTTP.3.0");o.open(n?"POST":"GET",r,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var s=e.customHeaders;if(s=typeof s=="function"?s():s,s)for(var a in s)o.setRequestHeader(a,s[a]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(u){console&&console.log(u)}},Rn=function(e,r,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},D&&r.indexOf("file:")!==0)return An(e,r,n,i);if(kt()||typeof ActiveXObject=="function")return Tn(e,r,n,i);i(new Error("No fetch and no xhr implementation found!"))};function X(t){"@babel/helpers - typeof";return X=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(t)}function rt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Pe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rt(Object(r),!0).forEach(function(n){Nt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jt(n.key),n)}}function kn(t,e,r){return e&&Pn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nt(t,e,r){return(e=jt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jt(t){var e=Nn(t,"string");return X(e)=="symbol"?e:e+""}function Nn(t,e){if(X(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(X(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var jn=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(r){return JSON.parse(r)},stringify:JSON.stringify,parsePayload:function(r,n,i){return Nt({},n,i||"")},parseLoadPayload:function(r,n){},request:Rn,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},qn=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_n(this,t),this.services=e,this.options=r,this.allOptions=n,this.type="backend",this.init(e,r,n)}return kn(t,[{key:"init",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=Pe(Pe(Pe({},jn()),this.options||{}),i),this.allOptions=o,this.services&&this.options.reloadInterval){var s=setInterval(function(){return n.reload()},this.options.reloadInterval);X(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(r,n,i){this._readAny(r,r,n,n,i)}},{key:"read",value:function(r,n,i){this._readAny([r],r,[n],n,i)}},{key:"_readAny",value:function(r,n,i,o,s){var a=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(r,i)),u=wn(u),u.then(function(c){if(!c)return s(null,{});var l=a.services.interpolator.interpolate(c,{lng:r.join("+"),ns:i.join("+")});a.loadUrl(l,s,n,o)})}},{key:"loadUrl",value:function(r,n,i,o){var s=this,a=typeof i=="string"?[i]:i,u=typeof o=="string"?[o]:o,c=this.options.parseLoadPayload(a,u);this.options.request(this.options,r,c,function(l,d){if(d&&(d.status>=500&&d.status<600||!d.status))return n("failed loading "+r+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return n("failed loading "+r+"; status code: "+d.status,!1);if(!d&&l&&l.message){var m=l.message.toLowerCase(),b=["failed","fetch","network","load"].find(function(h){return m.indexOf(h)>-1});if(b)return n("failed loading "+r+": "+l.message,!0)}if(l)return n(l,!1);var p,y;try{typeof d.data=="string"?p=s.options.parse(d.data,i,o):p=d.data}catch{y="failed parsing "+r+" to json"}if(y)return n(y,!1);n(null,p)})}},{key:"create",value:function(r,n,i,o,s){var a=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var u=this.options.parsePayload(n,i,o),c=0,l=[],d=[];r.forEach(function(m){var b=a.options.addPath;typeof a.options.addPath=="function"&&(b=a.options.addPath(m,n));var p=a.services.interpolator.interpolate(b,{lng:m,ns:n});a.options.request(a.options,p,u,function(y,h){c+=1,l.push(y),d.push(h),c===r.length&&typeof s=="function"&&s(l,d)})})}}},{key:"reload",value:function(){var r=this,n=this.services,i=n.backendConnector,o=n.languageUtils,s=n.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],c=function(d){var m=o.toResolveHierarchy(d);m.forEach(function(b){u.indexOf(b)<0&&u.push(b)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(l){return c(l)}),u.forEach(function(l){r.allOptions.ns.forEach(function(d){i.read(l,d,"read",null,null,function(m,b){m&&s.warn("loading namespace ".concat(d," for language ").concat(l," failed"),m),!m&&b&&s.log("loaded namespace ".concat(d," for language ").concat(l),b),i.loaded("".concat(l,"|").concat(d),m,b)})})})}}}])}();qn.type="backend";let Ue;typeof window<"u"?(window.__STORE_SDK_CONTEXT__||(window.__STORE_SDK_CONTEXT__=B.createContext(void 0)),Ue=window.__STORE_SDK_CONTEXT__):Ue=B.createContext(void 0);const Cn=()=>{const t=B.useContext(Ue);return t||console.error("You must wrap your component in a <DataProvider>"),t?.sdkType==="dummy"||t?.sdkType==="vendure",t};new Fe.QueryClient;function qt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Dn}=Object.prototype,{getPrototypeOf:ze}=Object,{iterator:be,toStringTag:Ct}=Symbol,ge=(t=>e=>{const r=Dn.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),N=t=>(t=t.toLowerCase(),e=>ge(e)===t),ve=t=>e=>typeof e===t,{isArray:z}=Array,Y=ve("undefined");function xn(t){return t!==null&&!Y(t)&&t.constructor!==null&&!Y(t.constructor)&&_(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Dt=N("ArrayBuffer");function Fn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Dt(t.buffer),e}const Mn=ve("string"),_=ve("function"),xt=ve("number"),we=t=>t!==null&&typeof t=="object",Bn=t=>t===!0||t===!1,le=t=>{if(ge(t)!=="object")return!1;const e=ze(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Ct in t)&&!(be in t)},Un=N("Date"),Ln=N("File"),In=N("Blob"),$n=N("FileList"),Hn=t=>we(t)&&_(t.pipe),Vn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||_(t.append)&&((e=ge(t))==="formdata"||e==="object"&&_(t.toString)&&t.toString()==="[object FormData]"))},Wn=N("URLSearchParams"),[Xn,zn,Jn,Qn]=["ReadableStream","Request","Response","Headers"].map(N),Kn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Z(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),z(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(n=0;n<s;n++)a=o[n],e.call(null,t[a],a,t)}}function Ft(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const F=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mt=t=>!Y(t)&&t!==F;function Le(){const{caseless:t}=Mt(this)&&this||{},e={},r=(n,i)=>{const o=t&&Ft(e,i)||i;le(e[o])&&le(n)?e[o]=Le(e[o],n):le(n)?e[o]=Le({},n):z(n)?e[o]=n.slice():e[o]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Z(arguments[n],r);return e}const Gn=(t,e,r,{allOwnKeys:n}={})=>(Z(e,(i,o)=>{r&&_(i)?t[o]=qt(i,r):t[o]=i},{allOwnKeys:n}),t),Yn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Zn=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},er=(t,e,r,n)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&ze(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},tr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},nr=t=>{if(!t)return null;if(z(t))return t;let e=t.length;if(!xt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},rr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ze(Uint8Array)),ir=(t,e)=>{const n=(t&&t[be]).call(t);let i;for(;(i=n.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},or=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},sr=N("HTMLFormElement"),ar=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),it=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),ur=N("RegExp"),Bt=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Z(r,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(n[o]=s||i)}),Object.defineProperties(t,n)},cr=t=>{Bt(t,(e,r)=>{if(_(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(_(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},lr=(t,e)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return z(t)?n(t):n(String(t).split(e)),r},fr=()=>{},dr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function pr(t){return!!(t&&_(t.append)&&t[Ct]==="FormData"&&t[be])}const mr=t=>{const e=new Array(10),r=(n,i)=>{if(we(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const o=z(n)?[]:{};return Z(n,(s,a)=>{const u=r(s,i+1);!Y(u)&&(o[a]=u)}),e[i]=void 0,o}}return n};return r(t,0)},hr=N("AsyncFunction"),yr=t=>t&&(we(t)||_(t))&&_(t.then)&&_(t.catch),Ut=((t,e)=>t?setImmediate:e?((r,n)=>(F.addEventListener("message",({source:i,data:o})=>{i===F&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),F.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",_(F.postMessage)),br=typeof queueMicrotask<"u"?queueMicrotask.bind(F):typeof process<"u"&&process.nextTick||Ut,gr=t=>t!=null&&_(t[be]),f={isArray:z,isArrayBuffer:Dt,isBuffer:xn,isFormData:Vn,isArrayBufferView:Fn,isString:Mn,isNumber:xt,isBoolean:Bn,isObject:we,isPlainObject:le,isReadableStream:Xn,isRequest:zn,isResponse:Jn,isHeaders:Qn,isUndefined:Y,isDate:Un,isFile:Ln,isBlob:In,isRegExp:ur,isFunction:_,isStream:Hn,isURLSearchParams:Wn,isTypedArray:rr,isFileList:$n,forEach:Z,merge:Le,extend:Gn,trim:Kn,stripBOM:Yn,inherits:Zn,toFlatObject:er,kindOf:ge,kindOfTest:N,endsWith:tr,toArray:nr,forEachEntry:ir,matchAll:or,isHTMLForm:sr,hasOwnProperty:it,hasOwnProp:it,reduceDescriptors:Bt,freezeMethods:cr,toObjectSet:lr,toCamelCase:ar,noop:fr,toFiniteNumber:dr,findKey:Ft,global:F,isContextDefined:Mt,isSpecCompliantForm:pr,toJSONObject:mr,isAsyncFn:hr,isThenable:yr,setImmediate:Ut,asap:br,isIterable:gr};function g(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}f.inherits(g,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const Lt=g.prototype,It={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{It[t]={value:t}});Object.defineProperties(g,It);Object.defineProperty(Lt,"isAxiosError",{value:!0});g.from=(t,e,r,n,i,o)=>{const s=Object.create(Lt);return f.toFlatObject(t,s,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),g.call(s,t.message,e,r,n,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const vr=null;function Ie(t){return f.isPlainObject(t)||f.isArray(t)}function $t(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function ot(t,e,r){return t?t.concat(e).map(function(i,o){return i=$t(i),!r&&o?"["+i+"]":i}).join(r?".":""):e}function wr(t){return f.isArray(t)&&!t.some(Ie)}const Sr=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function Se(t,e,r){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=f.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!f.isUndefined(h[y])});const n=r.metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(f.isDate(p))return p.toISOString();if(f.isBoolean(p))return p.toString();if(!u&&f.isBlob(p))throw new g("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(p)||f.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,y,h){let v=p;if(p&&!h&&typeof p=="object"){if(f.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(f.isArray(p)&&wr(p)||(f.isFileList(p)||f.endsWith(y,"[]"))&&(v=f.toArray(p)))return y=$t(y),v.forEach(function(E,q){!(f.isUndefined(E)||E===null)&&e.append(s===!0?ot([y],q,o):s===null?y:y+"[]",c(E))}),!1}return Ie(p)?!0:(e.append(ot(h,y,o),c(p)),!1)}const d=[],m=Object.assign(Sr,{defaultVisitor:l,convertValue:c,isVisitable:Ie});function b(p,y){if(!f.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),f.forEach(p,function(v,w){(!(f.isUndefined(v)||v===null)&&i.call(e,v,f.isString(w)?w.trim():w,y,m))===!0&&b(v,y?y.concat(w):[w])}),d.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return b(t),e}function st(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Je(t,e){this._pairs=[],t&&Se(t,this,e)}const Ht=Je.prototype;Ht.append=function(e,r){this._pairs.push([e,r])};Ht.toString=function(e){const r=e?function(n){return e.call(this,n,st)}:st;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function Or(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vt(t,e,r){if(!e)return t;const n=r&&r.encode||Or;f.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(i?o=i(e,r):o=f.isURLSearchParams(e)?e.toString():new Je(e,r).toString(n),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class at{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Wt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Er=typeof URLSearchParams<"u"?URLSearchParams:Je,Ar=typeof FormData<"u"?FormData:null,Tr=typeof Blob<"u"?Blob:null,Rr={isBrowser:!0,classes:{URLSearchParams:Er,FormData:Ar,Blob:Tr},protocols:["http","https","file","blob","url","data"]},Qe=typeof window<"u"&&typeof document<"u",$e=typeof navigator=="object"&&navigator||void 0,_r=Qe&&(!$e||["ReactNative","NativeScript","NS"].indexOf($e.product)<0),Pr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kr=Qe&&window.location.href||"http://localhost",Nr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qe,hasStandardBrowserEnv:_r,hasStandardBrowserWebWorkerEnv:Pr,navigator:$e,origin:kr},Symbol.toStringTag,{value:"Module"})),T={...Nr,...Rr};function jr(t,e){return Se(t,new T.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,o){return T.isNode&&f.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function qr(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Cr(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}function Xt(t){function e(r,n,i,o){let s=r[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),u=o>=r.length;return s=!s&&f.isArray(i)?i.length:s,u?(f.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a):((!i[s]||!f.isObject(i[s]))&&(i[s]=[]),e(r,n,i[s],o)&&f.isArray(i[s])&&(i[s]=Cr(i[s])),!a)}if(f.isFormData(t)&&f.isFunction(t.entries)){const r={};return f.forEachEntry(t,(n,i)=>{e(qr(n),i,r,0)}),r}return null}function Dr(t,e,r){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const ee={transitional:Wt,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=f.isObject(e);if(o&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return i?JSON.stringify(Xt(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jr(e,this.formSerializer).toString();if((a=f.isFileList(e))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Se(a?{"files[]":e}:e,u&&new u,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),Dr(e)):e}],transformResponse:[function(e){const r=this.transitional||ee.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(n&&!this.responseType||i)){const s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?g.from(a,g.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{ee.headers[t]={}});const xr=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Fr=t=>{const e={};let r,n,i;return t&&t.split(`
|
|
2
|
-
`).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||e[r]&&xr[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},ut=Symbol("internals");function Q(t){return t&&String(t).trim().toLowerCase()}function fe(t){return t===!1||t==null?t:f.isArray(t)?t.map(fe):String(t)}function Mr(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Br=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function
|
|
3
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[ut]=this[ut]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Q(s);n[a]||(Lr(i,s),n[a]=!0)}return f.isArray(e)?e.forEach(o):o(e),this}};P.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(P.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});f.freezeMethods(P);function Ne(t,e){const r=this||ee,n=e||r,i=P.from(n.headers);let o=n.data;return f.forEach(t,function(a){o=a.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function zt(t){return!!(t&&t.__CANCEL__)}function J(t,e,r){g.call(this,t??"canceled",g.ERR_CANCELED,e,r),this.name="CanceledError"}f.inherits(J,g,{__CANCEL__:!0});function Jt(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ir(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function $r(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),l=n[o];s||(s=c),r[i]=u,n[i]=c;let d=o,m=0;for(;d!==i;)m+=r[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s<e)return;const b=l&&c-l;return b?Math.round(m*1e3/b):void 0}}function Hr(t,e){let r=0,n=1e3/e,i,o;const s=(c,l=Date.now())=>{r=l,i=null,o&&(clearTimeout(o),o=null),t.apply(null,c)};return[(...c)=>{const l=Date.now(),d=l-r;d>=n?s(c,l):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},n-d)))},()=>i&&s(i)]}const me=(t,e,r=3)=>{let n=0;const i=$r(50,250);return Hr(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,u=s-n,c=i(u),l=s<=a;n=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a&&l?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},r)},ct=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},lt=t=>(...e)=>f.asap(()=>t(...e)),Vr=T.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,T.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(T.origin),T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent)):()=>!0,Wr=T.hasStandardBrowserEnv?{write(t,e,r,n,i,o){const s=[t+"="+encodeURIComponent(e)];f.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),f.isString(n)&&s.push("path="+n),f.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Xr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function zr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Qt(t,e,r){let n=!Xr(e);return t&&(n||r==!1)?zr(t,e):e}const ft=t=>t instanceof P?{...t}:t;function I(t,e){e=e||{};const r={};function n(c,l,d,m){return f.isPlainObject(c)&&f.isPlainObject(l)?f.merge.call({caseless:m},c,l):f.isPlainObject(l)?f.merge({},l):f.isArray(l)?l.slice():l}function i(c,l,d,m){if(f.isUndefined(l)){if(!f.isUndefined(c))return n(void 0,c,d,m)}else return n(c,l,d,m)}function o(c,l){if(!f.isUndefined(l))return n(void 0,l)}function s(c,l){if(f.isUndefined(l)){if(!f.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function a(c,l,d){if(d in e)return n(c,l);if(d in t)return n(void 0,c)}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,l,d)=>i(ft(c),ft(l),d,!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(l){const d=u[l]||i,m=d(t[l],e[l],l);f.isUndefined(m)&&d!==a||(r[l]=m)}),r}const Kt=t=>{const e=I({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;e.headers=s=P.from(s),e.url=Vt(Qt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(f.isFormData(r)){if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((u=s.getContentType())!==!1){const[c,...l]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...l].join("; "))}}if(T.hasStandardBrowserEnv&&(n&&f.isFunction(n)&&(n=n(e)),n||n!==!1&&Vr(e.url))){const c=i&&o&&Wr.read(o);c&&s.set(i,c)}return e},Jr=typeof XMLHttpRequest<"u",Qr=Jr&&function(t){return new Promise(function(r,n){const i=Kt(t);let o=i.data;const s=P.from(i.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:c}=i,l,d,m,b,p;function y(){b&&b(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(i.method.toUpperCase(),i.url,!0),h.timeout=i.timeout;function v(){if(!h)return;const E=P.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:E,config:t,request:h};Jt(function(x){r(x),y()},function(x){n(x),y()},R),h=null}"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(v)},h.onabort=function(){h&&(n(new g("Request aborted",g.ECONNABORTED,t,h)),h=null)},h.onerror=function(){n(new g("Network Error",g.ERR_NETWORK,t,h)),h=null},h.ontimeout=function(){let q=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const R=i.transitional||Wt;i.timeoutErrorMessage&&(q=i.timeoutErrorMessage),n(new g(q,R.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,t,h)),h=null},o===void 0&&s.setContentType(null),"setRequestHeader"in h&&f.forEach(s.toJSON(),function(q,R){h.setRequestHeader(R,q)}),f.isUndefined(i.withCredentials)||(h.withCredentials=!!i.withCredentials),a&&a!=="json"&&(h.responseType=i.responseType),c&&([m,p]=me(c,!0),h.addEventListener("progress",m)),u&&h.upload&&([d,b]=me(u),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(l=E=>{h&&(n(!E||E.type?new J(null,t,h):E),h.abort(),h=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const w=Ir(i.url);if(w&&T.protocols.indexOf(w)===-1){n(new g("Unsupported protocol "+w+":",g.ERR_BAD_REQUEST,t));return}h.send(o||null)})},Kr=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const o=function(c){if(!i){i=!0,a();const l=c instanceof Error?c:this.reason;n.abort(l instanceof g?l:new J(l instanceof Error?l.message:l))}};let s=e&&setTimeout(()=>{s=null,o(new g(`timeout ${e} of ms exceeded`,g.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o));const{signal:u}=n;return u.unsubscribe=()=>f.asap(a),u}},Gr=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},Yr=async function*(t,e){for await(const r of Zr(t))yield*Gr(r,e)},Zr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},dt=(t,e,r,n)=>{const i=Yr(t,e);let o=0,s,a=u=>{s||(s=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:c,value:l}=await i.next();if(c){a(),u.close();return}let d=l.byteLength;if(r){let m=o+=d;r(m)}u.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(u){return a(u),i.return()}},{highWaterMark:2})},Oe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Gt=Oe&&typeof ReadableStream=="function",ei=Oe&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Yt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ti=Gt&&Yt(()=>{let t=!1;const e=new Request(T.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),pt=64*1024,He=Gt&&Yt(()=>f.isReadableStream(new Response("").body)),he={stream:He&&(t=>t.body)};Oe&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!he[e]&&(he[e]=f.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new g(`Response type '${e}' is not supported`,g.ERR_NOT_SUPPORT,n)})})})(new Response);const ni=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request(T.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await ei(t)).byteLength},ri=async(t,e)=>{const r=f.toFiniteNumber(t.getContentLength());return r??ni(e)},ii=Oe&&(async t=>{let{url:e,method:r,data:n,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:u,responseType:c,headers:l,withCredentials:d="same-origin",fetchOptions:m}=Kt(t);c=c?(c+"").toLowerCase():"text";let b=Kr([i,o&&o.toAbortSignal()],s),p;const y=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let h;try{if(u&&ti&&r!=="get"&&r!=="head"&&(h=await ri(l,n))!==0){let R=new Request(e,{method:"POST",body:n,duplex:"half"}),C;if(f.isFormData(n)&&(C=R.headers.get("content-type"))&&l.setContentType(C),R.body){const[x,re]=ct(h,me(lt(u)));n=dt(R.body,pt,x,re)}}f.isString(d)||(d=d?"include":"omit");const v="credentials"in Request.prototype;p=new Request(e,{...m,signal:b,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:v?d:void 0});let w=await fetch(p,m);const E=He&&(c==="stream"||c==="response");if(He&&(a||E&&y)){const R={};["status","statusText","headers"].forEach(Ke=>{R[Ke]=w[Ke]});const C=f.toFiniteNumber(w.headers.get("content-length")),[x,re]=a&&ct(C,me(lt(a),!0))||[];w=new Response(dt(w.body,pt,x,()=>{re&&re(),y&&y()}),R)}c=c||"text";let q=await he[f.findKey(he,c)||"text"](w,t);return!E&&y&&y(),await new Promise((R,C)=>{Jt(R,C,{data:q,headers:P.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:p})})}catch(v){throw y&&y(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,t,p),{cause:v.cause||v}):g.from(v,v&&v.code,t,p)}}),Ve={http:vr,xhr:Qr,fetch:ii};f.forEach(Ve,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const mt=t=>`- ${t}`,oi=t=>f.isFunction(t)||t===null||t===!1,Zt={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let o=0;o<e;o++){r=t[o];let s;if(n=r,!oi(r)&&(n=Ve[(s=String(r)).toLowerCase()],n===void 0))throw new g(`Unknown adapter '${s}'`);if(n)break;i[s||"#"+o]=n}if(!n){const o=Object.entries(i).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since :
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("./index-CATkY-bf.js"),S=require("./index-BKGQQxdW.js"),B=require("react"),Ge=require("react-i18next"),Ye=require("i18next"),Fe=require("@tanstack/react-query"),ie=require("react-native");function ln(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const A=ln(B),U=new xe.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const r=e?U.getSettings().availablePositions[e]:U.getSettings().defaultPositions;return{badges:xe.lodashExports.filter(t,i=>r?r.includes(i.position):!0),availablePositions:r}}},queryUpdates:{},settings:{defaultPositions:["top-left","top-right","bottom-left","bottom-right"],availablePositions:{productListItem:["top-left","top-right","bottom-left","bottom-right"],productDetail:["top-left","top-right","bottom-left","bottom-right"],imageCarousel:["top-left","top-right","bottom-left","bottom-right"]}}});U.setQueryUpdates({product:{fields:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]},search:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]},products:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]},briefProducts:{fields:[{items:[{badges:["id","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]}]}});U.setRequests({getBadges:async()=>U.getSdk().createRequest({operation:"badges",fields:["totalItems",{items:["id","createdAt","updatedAt","collectionId","position","assetId",{asset:["id","name","preview","source"]},{collection:["id","name"]}]}]},{options:{take:100}},!1).then(t=>t.data).catch(t=>({message:t.message,errorCode:t.code||"unknown"}))});function fn(t){const e=[];function r(i,o){const s=A.createContext(o),a=e.length;e.push(s);const u=l=>{const d=S.compilerRuntimeExports.c(8);let m,b,p;d[0]!==l?({scope:p,children:m,...b}=l,d[0]=l,d[1]=m,d[2]=b,d[3]=p):(m=d[1],b=d[2],p=d[3]);const y=p?.[t]?.[a]||s;let h;h=b;const v=h;let w;return d[4]!==y.Provider||d[5]!==m||d[6]!==v?(w=S.jsxRuntimeExports.jsx(y.Provider,{value:v,children:m}),d[4]=y.Provider,d[5]=m,d[6]=v,d[7]=w):w=d[7],w};u.displayName=i+"Provider";function c(l,d){const m=d?.[t]?.[a]||s,b=A.useContext(m);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${l}\` must be used within \`${i}\``)}return[u,c]}function n(){const i=e.map(o=>A.createContext(o));return function(s){const a=s?.[t]||i;return A.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return n.scopeName=t,[r,n]}const dn=Symbol("radix.slottable");function pn(...t){return e=>t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}function mn(t,e){const r={...e};for(const n in e){const i=t[n],o=e[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...a)=>{const u=o(...a);return i(...a),u}:i&&(r[n]=i):n==="style"?r[n]=hn(i,o):n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...t,...r}}function hn(t,e){return typeof t=="function"&&typeof e=="function"?r=>ie.StyleSheet.flatten([t(r),e(r)]):typeof t=="function"?r=>e?ie.StyleSheet.flatten([t(r),e]):t(r):typeof e=="function"?r=>t?ie.StyleSheet.flatten([t,e(r)]):e(r):ie.StyleSheet.flatten([t,e].filter(Boolean))}function yn(t){return A.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===dn}function bn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function gn(t,e){const r=A.forwardRef((n,i)=>{const{children:o,...s}=n;if(A.isValidElement(o)){const a=bn(o),u=mn(s,o.props);return o.type!==A.Fragment&&(u.ref=i?pn(i,a):a),A.cloneElement(o,u)}return A.Children.count(o)>1?A.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}function ye(t){const e=gn("Slot"),r=A.forwardRef((n,i)=>{const o=S.compilerRuntimeExports.c(15);let s,a;o[0]!==n?({children:s,...a}=n,o[0]=n,o[1]=s,o[2]=a):(s=o[1],a=o[2]);let u;if(o[3]!==s||o[4]!==i||o[5]!==a){u=Symbol.for("react.early_return_sentinel");e:{const l=A.Children.toArray(s),d=l.find(yn);if(d){const m=d.props.children,b=l.map(h=>h===d?A.Children.count(m)>1?A.Children.only(null):A.isValidElement(m)?m.props.children:null:h),p=A.isValidElement(m)?A.cloneElement(m,void 0,b):null;let y;o[7]!==i||o[8]!==a||o[9]!==p?(y=S.jsxRuntimeExports.jsx(e,{...a,ref:i,children:p}),o[7]=i,o[8]=a,o[9]=p,o[10]=y):y=o[10],u=y;break e}}o[3]=s,o[4]=i,o[5]=a,o[6]=u}else u=o[6];if(u!==Symbol.for("react.early_return_sentinel"))return u;let c;return o[11]!==s||o[12]!==i||o[13]!==a?(c=S.jsxRuntimeExports.jsx(e,{...a,ref:i,children:s}),o[11]=s,o[12]=i,o[13]=a,o[14]=c):c=o[14],c});return r.displayName="Slot",r}let W;try{W=require("@react-native-async-storage/async-storage").default}catch{W=null}const _e=typeof window<"u"&&typeof window.localStorage<"u",Pe=!!W,ke={},Me={getItem:async t=>Pe?W.getItem(t):_e?window.localStorage.getItem(t):ke[t]||null,setItem:async(t,e)=>{if(Pe)return W.setItem(t,e);if(_e){window.localStorage.setItem(t,e);return}ke[t]=e},removeItem:async t=>{if(Pe)return W.removeItem(t);if(_e){window.localStorage.removeItem(t);return}delete ke[t]}};let Ne;typeof window<"u"?(window.__STORE_I18N_INSTANCE__||(window.__STORE_I18N_INSTANCE__=Ye.createInstance()),window.__STORE_I18N_INSTANCE__.use(Ge.initReactI18next),Ne=window.__STORE_I18N_INSTANCE__):(Ne=Ye.createInstance(),Ne.use(Ge.initReactI18next));function Be(t){"@babel/helpers - typeof";return Be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Be(t)}function kt(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Be(XMLHttpRequest))==="object"}function vn(t){return!!t&&typeof t.then=="function"}function wn(t){return vn(t)?t:Promise.resolve(t)}function Ze(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function et(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ze(Object(r),!0).forEach(function(n){Sn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Sn(t,e,r){return(e=On(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function On(t){var e=En(t,"string");return L(e)=="symbol"?e:e+""}function En(t,e){if(L(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(L(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function L(t){"@babel/helpers - typeof";return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(t)}var D=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?D=global.fetch:typeof window<"u"&&window.fetch&&(D=window.fetch);var G;kt()&&(typeof global<"u"&&global.XMLHttpRequest?G=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(G=window.XMLHttpRequest));var pe;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?pe=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(pe=window.ActiveXObject));typeof D!="function"&&(D=void 0);if(!D&&!G&&!pe)try{Promise.resolve().then(()=>require("./browser-ponyfill-ByZyuJ42.js")).then(t=>t.browserPonyfill).then(function(t){D=t.default}).catch(function(){})}catch{}var Ue=function(e,r){if(r&&L(r)==="object"){var n="";for(var i in r)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(r[i]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},tt=function(e,r,n,i){var o=function(u){if(!u.ok)return n(u.statusText||"Error",{status:u.status});u.text().then(function(c){n(null,{status:u.status,data:c})}).catch(n)};if(i){var s=i(e,r);if(s instanceof Promise){s.then(o).catch(n);return}}typeof fetch=="function"?fetch(e,r).then(o).catch(n):D(e,r).then(o).catch(n)},nt=!1,An=function(e,r,n,i){e.queryStringParams&&(r=Ue(r,e.queryStringParams));var o=et({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(o["Content-Type"]="application/json");var s=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,a=et({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},nt?{}:s),u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{tt(r,a,i,u)}catch(c){if(!s||Object.keys(s).length===0||!c.message||c.message.indexOf("not implemented")<0)return i(c);try{Object.keys(s).forEach(function(l){delete a[l]}),tt(r,a,i,u),nt=!0}catch(l){i(l)}}},Tn=function(e,r,n,i){n&&L(n)==="object"&&(n=Ue("",n).slice(1)),e.queryStringParams&&(r=Ue(r,e.queryStringParams));try{var o=G?new G:new pe("MSXML2.XMLHTTP.3.0");o.open(n?"POST":"GET",r,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var s=e.customHeaders;if(s=typeof s=="function"?s():s,s)for(var a in s)o.setRequestHeader(a,s[a]);o.onreadystatechange=function(){o.readyState>3&&i(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(u){console&&console.log(u)}},Rn=function(e,r,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},D&&r.indexOf("file:")!==0)return An(e,r,n,i);if(kt()||typeof ActiveXObject=="function")return Tn(e,r,n,i);i(new Error("No fetch and no xhr implementation found!"))};function X(t){"@babel/helpers - typeof";return X=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},X(t)}function rt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function je(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rt(Object(r),!0).forEach(function(n){Nt(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jt(n.key),n)}}function kn(t,e,r){return e&&Pn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nt(t,e,r){return(e=jt(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jt(t){var e=Nn(t,"string");return X(e)=="symbol"?e:e+""}function Nn(t,e){if(X(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(X(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var jn=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(r){return JSON.parse(r)},stringify:JSON.stringify,parsePayload:function(r,n,i){return Nt({},n,i||"")},parseLoadPayload:function(r,n){},request:Rn,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},qn=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_n(this,t),this.services=e,this.options=r,this.allOptions=n,this.type="backend",this.init(e,r,n)}return kn(t,[{key:"init",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=r,this.options=je(je(je({},jn()),this.options||{}),i),this.allOptions=o,this.services&&this.options.reloadInterval){var s=setInterval(function(){return n.reload()},this.options.reloadInterval);X(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(r,n,i){this._readAny(r,r,n,n,i)}},{key:"read",value:function(r,n,i){this._readAny([r],r,[n],n,i)}},{key:"_readAny",value:function(r,n,i,o,s){var a=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(r,i)),u=wn(u),u.then(function(c){if(!c)return s(null,{});var l=a.services.interpolator.interpolate(c,{lng:r.join("+"),ns:i.join("+")});a.loadUrl(l,s,n,o)})}},{key:"loadUrl",value:function(r,n,i,o){var s=this,a=typeof i=="string"?[i]:i,u=typeof o=="string"?[o]:o,c=this.options.parseLoadPayload(a,u);this.options.request(this.options,r,c,function(l,d){if(d&&(d.status>=500&&d.status<600||!d.status))return n("failed loading "+r+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return n("failed loading "+r+"; status code: "+d.status,!1);if(!d&&l&&l.message){var m=l.message.toLowerCase(),b=["failed","fetch","network","load"].find(function(h){return m.indexOf(h)>-1});if(b)return n("failed loading "+r+": "+l.message,!0)}if(l)return n(l,!1);var p,y;try{typeof d.data=="string"?p=s.options.parse(d.data,i,o):p=d.data}catch{y="failed parsing "+r+" to json"}if(y)return n(y,!1);n(null,p)})}},{key:"create",value:function(r,n,i,o,s){var a=this;if(this.options.addPath){typeof r=="string"&&(r=[r]);var u=this.options.parsePayload(n,i,o),c=0,l=[],d=[];r.forEach(function(m){var b=a.options.addPath;typeof a.options.addPath=="function"&&(b=a.options.addPath(m,n));var p=a.services.interpolator.interpolate(b,{lng:m,ns:n});a.options.request(a.options,p,u,function(y,h){c+=1,l.push(y),d.push(h),c===r.length&&typeof s=="function"&&s(l,d)})})}}},{key:"reload",value:function(){var r=this,n=this.services,i=n.backendConnector,o=n.languageUtils,s=n.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],c=function(d){var m=o.toResolveHierarchy(d);m.forEach(function(b){u.indexOf(b)<0&&u.push(b)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(l){return c(l)}),u.forEach(function(l){r.allOptions.ns.forEach(function(d){i.read(l,d,"read",null,null,function(m,b){m&&s.warn("loading namespace ".concat(d," for language ").concat(l," failed"),m),!m&&b&&s.log("loaded namespace ".concat(d," for language ").concat(l),b),i.loaded("".concat(l,"|").concat(d),m,b)})})})}}}])}();qn.type="backend";let Le;typeof window<"u"?(window.__STORE_SDK_CONTEXT__||(window.__STORE_SDK_CONTEXT__=B.createContext(void 0)),Le=window.__STORE_SDK_CONTEXT__):Le=B.createContext(void 0);const Cn=()=>{const t=B.useContext(Le);return t||console.error("You must wrap your component in a <DataProvider>"),t?.sdkType==="dummy"||t?.sdkType==="vendure",t};new Fe.QueryClient;function qt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Dn}=Object.prototype,{getPrototypeOf:ze}=Object,{iterator:be,toStringTag:Ct}=Symbol,ge=(t=>e=>{const r=Dn.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),N=t=>(t=t.toLowerCase(),e=>ge(e)===t),ve=t=>e=>typeof e===t,{isArray:z}=Array,Y=ve("undefined");function xn(t){return t!==null&&!Y(t)&&t.constructor!==null&&!Y(t.constructor)&&_(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Dt=N("ArrayBuffer");function Fn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Dt(t.buffer),e}const Mn=ve("string"),_=ve("function"),xt=ve("number"),we=t=>t!==null&&typeof t=="object",Bn=t=>t===!0||t===!1,le=t=>{if(ge(t)!=="object")return!1;const e=ze(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Ct in t)&&!(be in t)},Un=N("Date"),Ln=N("File"),In=N("Blob"),$n=N("FileList"),Hn=t=>we(t)&&_(t.pipe),Vn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||_(t.append)&&((e=ge(t))==="formdata"||e==="object"&&_(t.toString)&&t.toString()==="[object FormData]"))},Wn=N("URLSearchParams"),[Xn,zn,Jn,Qn]=["ReadableStream","Request","Response","Headers"].map(N),Kn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Z(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),z(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(n=0;n<s;n++)a=o[n],e.call(null,t[a],a,t)}}function Ft(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const F=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Mt=t=>!Y(t)&&t!==F;function Ie(){const{caseless:t}=Mt(this)&&this||{},e={},r=(n,i)=>{const o=t&&Ft(e,i)||i;le(e[o])&&le(n)?e[o]=Ie(e[o],n):le(n)?e[o]=Ie({},n):z(n)?e[o]=n.slice():e[o]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&Z(arguments[n],r);return e}const Gn=(t,e,r,{allOwnKeys:n}={})=>(Z(e,(i,o)=>{r&&_(i)?t[o]=qt(i,r):t[o]=i},{allOwnKeys:n}),t),Yn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Zn=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},er=(t,e,r,n)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&ze(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},tr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},nr=t=>{if(!t)return null;if(z(t))return t;let e=t.length;if(!xt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},rr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ze(Uint8Array)),ir=(t,e)=>{const n=(t&&t[be]).call(t);let i;for(;(i=n.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},or=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},sr=N("HTMLFormElement"),ar=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),it=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),ur=N("RegExp"),Bt=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Z(r,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(n[o]=s||i)}),Object.defineProperties(t,n)},cr=t=>{Bt(t,(e,r)=>{if(_(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(_(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},lr=(t,e)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return z(t)?n(t):n(String(t).split(e)),r},fr=()=>{},dr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function pr(t){return!!(t&&_(t.append)&&t[Ct]==="FormData"&&t[be])}const mr=t=>{const e=new Array(10),r=(n,i)=>{if(we(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const o=z(n)?[]:{};return Z(n,(s,a)=>{const u=r(s,i+1);!Y(u)&&(o[a]=u)}),e[i]=void 0,o}}return n};return r(t,0)},hr=N("AsyncFunction"),yr=t=>t&&(we(t)||_(t))&&_(t.then)&&_(t.catch),Ut=((t,e)=>t?setImmediate:e?((r,n)=>(F.addEventListener("message",({source:i,data:o})=>{i===F&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),F.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",_(F.postMessage)),br=typeof queueMicrotask<"u"?queueMicrotask.bind(F):typeof process<"u"&&process.nextTick||Ut,gr=t=>t!=null&&_(t[be]),f={isArray:z,isArrayBuffer:Dt,isBuffer:xn,isFormData:Vn,isArrayBufferView:Fn,isString:Mn,isNumber:xt,isBoolean:Bn,isObject:we,isPlainObject:le,isReadableStream:Xn,isRequest:zn,isResponse:Jn,isHeaders:Qn,isUndefined:Y,isDate:Un,isFile:Ln,isBlob:In,isRegExp:ur,isFunction:_,isStream:Hn,isURLSearchParams:Wn,isTypedArray:rr,isFileList:$n,forEach:Z,merge:Ie,extend:Gn,trim:Kn,stripBOM:Yn,inherits:Zn,toFlatObject:er,kindOf:ge,kindOfTest:N,endsWith:tr,toArray:nr,forEachEntry:ir,matchAll:or,isHTMLForm:sr,hasOwnProperty:it,hasOwnProp:it,reduceDescriptors:Bt,freezeMethods:cr,toObjectSet:lr,toCamelCase:ar,noop:fr,toFiniteNumber:dr,findKey:Ft,global:F,isContextDefined:Mt,isSpecCompliantForm:pr,toJSONObject:mr,isAsyncFn:hr,isThenable:yr,setImmediate:Ut,asap:br,isIterable:gr};function g(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}f.inherits(g,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const Lt=g.prototype,It={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{It[t]={value:t}});Object.defineProperties(g,It);Object.defineProperty(Lt,"isAxiosError",{value:!0});g.from=(t,e,r,n,i,o)=>{const s=Object.create(Lt);return f.toFlatObject(t,s,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),g.call(s,t.message,e,r,n,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const vr=null;function $e(t){return f.isPlainObject(t)||f.isArray(t)}function $t(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function ot(t,e,r){return t?t.concat(e).map(function(i,o){return i=$t(i),!r&&o?"["+i+"]":i}).join(r?".":""):e}function wr(t){return f.isArray(t)&&!t.some($e)}const Sr=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function Se(t,e,r){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=f.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!f.isUndefined(h[y])});const n=r.metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(i))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(f.isDate(p))return p.toISOString();if(f.isBoolean(p))return p.toString();if(!u&&f.isBlob(p))throw new g("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(p)||f.isTypedArray(p)?u&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,y,h){let v=p;if(p&&!h&&typeof p=="object"){if(f.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(f.isArray(p)&&wr(p)||(f.isFileList(p)||f.endsWith(y,"[]"))&&(v=f.toArray(p)))return y=$t(y),v.forEach(function(E,q){!(f.isUndefined(E)||E===null)&&e.append(s===!0?ot([y],q,o):s===null?y:y+"[]",c(E))}),!1}return $e(p)?!0:(e.append(ot(h,y,o),c(p)),!1)}const d=[],m=Object.assign(Sr,{defaultVisitor:l,convertValue:c,isVisitable:$e});function b(p,y){if(!f.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),f.forEach(p,function(v,w){(!(f.isUndefined(v)||v===null)&&i.call(e,v,f.isString(w)?w.trim():w,y,m))===!0&&b(v,y?y.concat(w):[w])}),d.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return b(t),e}function st(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Je(t,e){this._pairs=[],t&&Se(t,this,e)}const Ht=Je.prototype;Ht.append=function(e,r){this._pairs.push([e,r])};Ht.toString=function(e){const r=e?function(n){return e.call(this,n,st)}:st;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function Or(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vt(t,e,r){if(!e)return t;const n=r&&r.encode||Or;f.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(i?o=i(e,r):o=f.isURLSearchParams(e)?e.toString():new Je(e,r).toString(n),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class at{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Wt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Er=typeof URLSearchParams<"u"?URLSearchParams:Je,Ar=typeof FormData<"u"?FormData:null,Tr=typeof Blob<"u"?Blob:null,Rr={isBrowser:!0,classes:{URLSearchParams:Er,FormData:Ar,Blob:Tr},protocols:["http","https","file","blob","url","data"]},Qe=typeof window<"u"&&typeof document<"u",He=typeof navigator=="object"&&navigator||void 0,_r=Qe&&(!He||["ReactNative","NativeScript","NS"].indexOf(He.product)<0),Pr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kr=Qe&&window.location.href||"http://localhost",Nr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qe,hasStandardBrowserEnv:_r,hasStandardBrowserWebWorkerEnv:Pr,navigator:He,origin:kr},Symbol.toStringTag,{value:"Module"})),T={...Nr,...Rr};function jr(t,e){return Se(t,new T.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,o){return T.isNode&&f.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function qr(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Cr(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}function Xt(t){function e(r,n,i,o){let s=r[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),u=o>=r.length;return s=!s&&f.isArray(i)?i.length:s,u?(f.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a):((!i[s]||!f.isObject(i[s]))&&(i[s]=[]),e(r,n,i[s],o)&&f.isArray(i[s])&&(i[s]=Cr(i[s])),!a)}if(f.isFormData(t)&&f.isFunction(t.entries)){const r={};return f.forEachEntry(t,(n,i)=>{e(qr(n),i,r,0)}),r}return null}function Dr(t,e,r){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const ee={transitional:Wt,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=f.isObject(e);if(o&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return i?JSON.stringify(Xt(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jr(e,this.formSerializer).toString();if((a=f.isFileList(e))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Se(a?{"files[]":e}:e,u&&new u,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),Dr(e)):e}],transformResponse:[function(e){const r=this.transitional||ee.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(n&&!this.responseType||i)){const s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?g.from(a,g.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:T.classes.FormData,Blob:T.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{ee.headers[t]={}});const xr=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Fr=t=>{const e={};let r,n,i;return t&&t.split(`
|
|
2
|
+
`).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||e[r]&&xr[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},ut=Symbol("internals");function Q(t){return t&&String(t).trim().toLowerCase()}function fe(t){return t===!1||t==null?t:f.isArray(t)?t.map(fe):String(t)}function Mr(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Br=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function qe(t,e,r,n,i){if(f.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!f.isString(e)){if(f.isString(n))return e.indexOf(n)!==-1;if(f.isRegExp(n))return n.test(e)}}function Ur(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Lr(t,e){const r=f.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,o,s){return this[n].call(this,e,i,o,s)},configurable:!0})})}let P=class{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function o(a,u,c){const l=Q(u);if(!l)throw new Error("header name must be a non-empty string");const d=f.findKey(i,l);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||u]=fe(a))}const s=(a,u)=>f.forEach(a,(c,l)=>o(c,l,u));if(f.isPlainObject(e)||e instanceof this.constructor)s(e,r);else if(f.isString(e)&&(e=e.trim())&&!Br(e))s(Fr(e),r);else if(f.isObject(e)&&f.isIterable(e)){let a={},u,c;for(const l of e){if(!f.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[c=l[0]]=(u=a[c])?f.isArray(u)?[...u,l[1]]:[u,l[1]]:l[1]}s(a,r)}else e!=null&&o(r,e,n);return this}get(e,r){if(e=Q(e),e){const n=f.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return Mr(i);if(f.isFunction(r))return r.call(this,i,n);if(f.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Q(e),e){const n=f.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||qe(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function o(s){if(s=Q(s),s){const a=f.findKey(n,s);a&&(!r||qe(n,n[a],a,r))&&(delete n[a],i=!0)}}return f.isArray(e)?e.forEach(o):o(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!e||qe(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const r=this,n={};return f.forEach(this,(i,o)=>{const s=f.findKey(n,o);if(s){r[s]=fe(i),delete r[o];return}const a=e?Ur(o):String(o).trim();a!==o&&delete r[o],r[a]=fe(i),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return f.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&f.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[ut]=this[ut]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Q(s);n[a]||(Lr(i,s),n[a]=!0)}return f.isArray(e)?e.forEach(o):o(e),this}};P.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(P.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});f.freezeMethods(P);function Ce(t,e){const r=this||ee,n=e||r,i=P.from(n.headers);let o=n.data;return f.forEach(t,function(a){o=a.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function zt(t){return!!(t&&t.__CANCEL__)}function J(t,e,r){g.call(this,t??"canceled",g.ERR_CANCELED,e,r),this.name="CanceledError"}f.inherits(J,g,{__CANCEL__:!0});function Jt(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ir(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function $r(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),l=n[o];s||(s=c),r[i]=u,n[i]=c;let d=o,m=0;for(;d!==i;)m+=r[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),c-s<e)return;const b=l&&c-l;return b?Math.round(m*1e3/b):void 0}}function Hr(t,e){let r=0,n=1e3/e,i,o;const s=(c,l=Date.now())=>{r=l,i=null,o&&(clearTimeout(o),o=null),t.apply(null,c)};return[(...c)=>{const l=Date.now(),d=l-r;d>=n?s(c,l):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},n-d)))},()=>i&&s(i)]}const me=(t,e,r=3)=>{let n=0;const i=$r(50,250);return Hr(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,u=s-n,c=i(u),l=s<=a;n=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:u,rate:c||void 0,estimated:c&&a&&l?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},r)},ct=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},lt=t=>(...e)=>f.asap(()=>t(...e)),Vr=T.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,T.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(T.origin),T.navigator&&/(msie|trident)/i.test(T.navigator.userAgent)):()=>!0,Wr=T.hasStandardBrowserEnv?{write(t,e,r,n,i,o){const s=[t+"="+encodeURIComponent(e)];f.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),f.isString(n)&&s.push("path="+n),f.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Xr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function zr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Qt(t,e,r){let n=!Xr(e);return t&&(n||r==!1)?zr(t,e):e}const ft=t=>t instanceof P?{...t}:t;function I(t,e){e=e||{};const r={};function n(c,l,d,m){return f.isPlainObject(c)&&f.isPlainObject(l)?f.merge.call({caseless:m},c,l):f.isPlainObject(l)?f.merge({},l):f.isArray(l)?l.slice():l}function i(c,l,d,m){if(f.isUndefined(l)){if(!f.isUndefined(c))return n(void 0,c,d,m)}else return n(c,l,d,m)}function o(c,l){if(!f.isUndefined(l))return n(void 0,l)}function s(c,l){if(f.isUndefined(l)){if(!f.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function a(c,l,d){if(d in e)return n(c,l);if(d in t)return n(void 0,c)}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,l,d)=>i(ft(c),ft(l),d,!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(l){const d=u[l]||i,m=d(t[l],e[l],l);f.isUndefined(m)&&d!==a||(r[l]=m)}),r}const Kt=t=>{const e=I({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;e.headers=s=P.from(s),e.url=Vt(Qt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let u;if(f.isFormData(r)){if(T.hasStandardBrowserEnv||T.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((u=s.getContentType())!==!1){const[c,...l]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...l].join("; "))}}if(T.hasStandardBrowserEnv&&(n&&f.isFunction(n)&&(n=n(e)),n||n!==!1&&Vr(e.url))){const c=i&&o&&Wr.read(o);c&&s.set(i,c)}return e},Jr=typeof XMLHttpRequest<"u",Qr=Jr&&function(t){return new Promise(function(r,n){const i=Kt(t);let o=i.data;const s=P.from(i.headers).normalize();let{responseType:a,onUploadProgress:u,onDownloadProgress:c}=i,l,d,m,b,p;function y(){b&&b(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(i.method.toUpperCase(),i.url,!0),h.timeout=i.timeout;function v(){if(!h)return;const E=P.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:E,config:t,request:h};Jt(function(x){r(x),y()},function(x){n(x),y()},R),h=null}"onloadend"in h?h.onloadend=v:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(v)},h.onabort=function(){h&&(n(new g("Request aborted",g.ECONNABORTED,t,h)),h=null)},h.onerror=function(){n(new g("Network Error",g.ERR_NETWORK,t,h)),h=null},h.ontimeout=function(){let q=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const R=i.transitional||Wt;i.timeoutErrorMessage&&(q=i.timeoutErrorMessage),n(new g(q,R.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,t,h)),h=null},o===void 0&&s.setContentType(null),"setRequestHeader"in h&&f.forEach(s.toJSON(),function(q,R){h.setRequestHeader(R,q)}),f.isUndefined(i.withCredentials)||(h.withCredentials=!!i.withCredentials),a&&a!=="json"&&(h.responseType=i.responseType),c&&([m,p]=me(c,!0),h.addEventListener("progress",m)),u&&h.upload&&([d,b]=me(u),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",b)),(i.cancelToken||i.signal)&&(l=E=>{h&&(n(!E||E.type?new J(null,t,h):E),h.abort(),h=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const w=Ir(i.url);if(w&&T.protocols.indexOf(w)===-1){n(new g("Unsupported protocol "+w+":",g.ERR_BAD_REQUEST,t));return}h.send(o||null)})},Kr=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const o=function(c){if(!i){i=!0,a();const l=c instanceof Error?c:this.reason;n.abort(l instanceof g?l:new J(l instanceof Error?l.message:l))}};let s=e&&setTimeout(()=>{s=null,o(new g(`timeout ${e} of ms exceeded`,g.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o));const{signal:u}=n;return u.unsubscribe=()=>f.asap(a),u}},Gr=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},Yr=async function*(t,e){for await(const r of Zr(t))yield*Gr(r,e)},Zr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},dt=(t,e,r,n)=>{const i=Yr(t,e);let o=0,s,a=u=>{s||(s=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:c,value:l}=await i.next();if(c){a(),u.close();return}let d=l.byteLength;if(r){let m=o+=d;r(m)}u.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(u){return a(u),i.return()}},{highWaterMark:2})},Oe=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Gt=Oe&&typeof ReadableStream=="function",ei=Oe&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Yt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ti=Gt&&Yt(()=>{let t=!1;const e=new Request(T.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),pt=64*1024,Ve=Gt&&Yt(()=>f.isReadableStream(new Response("").body)),he={stream:Ve&&(t=>t.body)};Oe&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!he[e]&&(he[e]=f.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new g(`Response type '${e}' is not supported`,g.ERR_NOT_SUPPORT,n)})})})(new Response);const ni=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request(T.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await ei(t)).byteLength},ri=async(t,e)=>{const r=f.toFiniteNumber(t.getContentLength());return r??ni(e)},ii=Oe&&(async t=>{let{url:e,method:r,data:n,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:u,responseType:c,headers:l,withCredentials:d="same-origin",fetchOptions:m}=Kt(t);c=c?(c+"").toLowerCase():"text";let b=Kr([i,o&&o.toAbortSignal()],s),p;const y=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let h;try{if(u&&ti&&r!=="get"&&r!=="head"&&(h=await ri(l,n))!==0){let R=new Request(e,{method:"POST",body:n,duplex:"half"}),C;if(f.isFormData(n)&&(C=R.headers.get("content-type"))&&l.setContentType(C),R.body){const[x,re]=ct(h,me(lt(u)));n=dt(R.body,pt,x,re)}}f.isString(d)||(d=d?"include":"omit");const v="credentials"in Request.prototype;p=new Request(e,{...m,signal:b,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:v?d:void 0});let w=await fetch(p,m);const E=Ve&&(c==="stream"||c==="response");if(Ve&&(a||E&&y)){const R={};["status","statusText","headers"].forEach(Ke=>{R[Ke]=w[Ke]});const C=f.toFiniteNumber(w.headers.get("content-length")),[x,re]=a&&ct(C,me(lt(a),!0))||[];w=new Response(dt(w.body,pt,x,()=>{re&&re(),y&&y()}),R)}c=c||"text";let q=await he[f.findKey(he,c)||"text"](w,t);return!E&&y&&y(),await new Promise((R,C)=>{Jt(R,C,{data:q,headers:P.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:p})})}catch(v){throw y&&y(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,t,p),{cause:v.cause||v}):g.from(v,v&&v.code,t,p)}}),We={http:vr,xhr:Qr,fetch:ii};f.forEach(We,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const mt=t=>`- ${t}`,oi=t=>f.isFunction(t)||t===null||t===!1,Zt={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let o=0;o<e;o++){r=t[o];let s;if(n=r,!oi(r)&&(n=We[(s=String(r)).toLowerCase()],n===void 0))throw new g(`Unknown adapter '${s}'`);if(n)break;i[s||"#"+o]=n}if(!n){const o=Object.entries(i).map(([a,u])=>`adapter ${a} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since :
|
|
4
4
|
`+o.map(mt).join(`
|
|
5
|
-
`):" "+mt(o[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:
|
|
6
|
-
`+o):n.stack=o}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=I(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&de.assertOptions(n,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),i!=null&&(f.isFunction(i)?r.paramsSerializer={serialize:i}:de.assertOptions(i,{encode:j.function,serialize:j.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),de.assertOptions(r,{baseUrl:j.spelling("baseURL"),withXsrfToken:j.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&f.merge(o.common,o[r.method]);o&&f.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),r.headers=P.concat(s,o);const a=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(u=u&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let l,d=0,m;if(!u){const p=[ht.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),m=p.length,l=Promise.resolve(r);d<m;)l=l.then(p[d++],p[d++]);return l}m=a.length;let b=r;for(d=0;d<m;){const p=a[d++],y=a[d++];try{b=p(b)}catch(h){y.call(this,h);break}}try{l=ht.call(this,b)}catch(p){return Promise.reject(p)}for(d=0,m=c.length;d<m;)l=l.then(c[d++],c[d++]);return l}getUri(e){e=I(this.defaults,e);const r=Qt(e.baseURL,e.url,e.allowAbsoluteUrls);return Vt(r,e.params,e.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(e){M.prototype[e]=function(r,n){return this.request(I(n||{},{method:e,url:r,data:(n||{}).data}))}});f.forEach(["post","put","patch"],function(e){function r(n){return function(o,s,a){return this.request(I(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}M.prototype[e]=r(),M.prototype[e+"Form"]=r(!0)});let ai=class tn{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{n.subscribe(a),o=a}).then(i);return s.cancel=function(){n.unsubscribe(o)},s},e(function(o,s,a){n.reason||(n.reason=new J(o,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new tn(function(i){e=i}),cancel:e}}};function ui(t){return function(r){return t.apply(null,r)}}function ci(t){return f.isObject(t)&&t.isAxiosError===!0}const We={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};Object.entries(We).forEach(([t,e])=>{We[e]=t});function nn(t){const e=new M(t),r=qt(M.prototype.request,e);return f.extend(r,M.prototype,e,{allOwnKeys:!0}),f.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return nn(I(t,i))},r}const O=nn(ee);O.Axios=M;O.CanceledError=J;O.CancelToken=ai;O.isCancel=zt;O.VERSION=en;O.toFormData=Se;O.AxiosError=g;O.Cancel=O.CanceledError;O.all=function(e){return Promise.all(e)};O.spread=ui;O.isAxiosError=ci;O.mergeConfig=I;O.AxiosHeaders=P;O.formToJSON=t=>Xt(f.isHTMLForm(t)?new FormData(t):t);O.getAdapter=Zt.getAdapter;O.HttpStatusCode=We;O.default=O;const{Axios:xi,AxiosError:bt,CanceledError:Fi,isCancel:Mi,CancelToken:Bi,VERSION:Ui,all:Li,Cancel:Ii,isAxiosError:$i,spread:Hi,toFormData:Vi,AxiosHeaders:Wi,HttpStatusCode:Xi,formToJSON:zi,getAdapter:Ji,mergeConfig:Qi}=O,li=t=>xe.lodashExports.some(t,e=>e&&e.errorCode!==void 0)||t?.errorCode!==void 0;let W;try{W=require("@react-native-async-storage/async-storage").default}catch{W=null}const qe=typeof window<"u"&&typeof window.localStorage<"u",Ce=!!W,De={},Xe={getItem:async t=>Ce?W.getItem(t):qe?window.localStorage.getItem(t):De[t]||null,setItem:async(t,e)=>{if(Ce)return W.setItem(t,e);if(qe){window.localStorage.setItem(t,e);return}De[t]=e},removeItem:async t=>{if(Ce)return W.removeItem(t);if(qe){window.localStorage.removeItem(t);return}delete De[t]}};typeof window<"u"?window.__STORE_QUERY_CLIENT__||(window.__STORE_QUERY_CLIENT__=new Fe.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})):new Fe.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}});const rn="auth_token",fi="https://localhost:3000/shop-api",on=O.create({baseURL:fi,withCredentials:!0,headers:{"vendure-token":""}});let di=async(t,e)=>{await e(t)};on.interceptors.request.use(async t=>(di(t,async r=>{const n=await Xe.getItem(rn),i=await Xe.getItem("channelToken");n&&(r.headers.Authorization=`Bearer ${n}`),i&&(r.headers["vendure-token"]=i)}),t));on.interceptors.response.use(t=>{const e=t.headers["vendure-auth-token"];if(e&&Xe.setItem(rn,e),li(t.data.data)){const r=Object.values(t.data.data)[0],n=new bt(r.errorCode);return n.response=t,n.request=t.request,n.config=t.config,Promise.reject(n)}if(t.data.errors?.length>0){const r=t.data.errors[0],n=new bt(r.message);return n.response=t,n.request=t.request,n.config=t.config,Promise.reject(n)}return t},t=>Promise.reject(t));var k={},oe={},se={},ae={},gt;function te(){if(gt)return ae;gt=1,Object.defineProperty(ae,"__esModule",{value:!0});var t;return function(e){e.Mutation="mutation",e.Query="query",e.Subscription="subscription"}(t||(t={})),ae.default=t,ae}var $={},K={},vt;function pi(){if(vt)return K;vt=1,Object.defineProperty(K,"__esModule",{value:!0}),K.isNestedField=void 0;function t(e){return typeof e=="object"&&e.hasOwnProperty("operation")&&e.hasOwnProperty("variables")&&e.hasOwnProperty("fields")||typeof e=="object"&&e.hasOwnProperty("operation")&&e.hasOwnProperty("fragment")&&e.hasOwnProperty("fields")}return K.isNestedField=t,K}var wt;function ne(){if(wt)return $;wt=1;var t=$&&$.__assign||function(){return t=Object.assign||function(n){for(var i,o=1,s=arguments.length;o<s;o++){i=arguments[o];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])}return n},t.apply(this,arguments)};Object.defineProperty($,"__esModule",{value:!0});var e=pi(),r=function(){function n(){}return n.resolveVariables=function(i){for(var o={},s=0,a=i;s<a.length;s++){var u=a[s],c=u.variables,l=u.fields;o=t(t(t({},o),c),l&&n.getNestedVariables(l)||{})}return o},n.queryDataNameAndArgumentMap=function(i){return i&&Object.keys(i).length?"(".concat(Object.entries(i).reduce(function(o,s,a){var u=s[0],c=s[1];return"".concat(o).concat(a!==0?", ":"").concat(c&&c.name?c.name:u,": $").concat(u)},""),")"):""},n.queryFieldsMap=function(i){var o=this;return i?i.map(function(s){if((0,e.isNestedField)(s))return n.queryNestedFieldMap(s);if(typeof s=="object"){var a="";return Object.entries(s).forEach(function(u,c,l){var d=u[0],m=u[1];a+="".concat(d," ").concat(m.length>0?"{ "+o.queryFieldsMap(m)+" }":""),c<l.length-1&&(a+=", ")}),a}else return"".concat(s)}).join(", "):""},n.operationOrAlias=function(i){return typeof i=="string"?i:"".concat(i.alias,": ").concat(i.name)},n.isFragment=function(i){var o;return(o=i?.fragment===!0)!==null&&o!==void 0?o:!1},n.operationOrFragment=function(i){return n.isFragment(i)?i.operation:n.operationOrAlias(i.operation)},n.getFragment=function(i){return n.isFragment(i)?"... on ":""},n.queryNestedFieldMap=function(i){return"".concat(n.getFragment(i)).concat(n.operationOrFragment(i)," ").concat(this.isFragment(i)?"":this.queryDataNameAndArgumentMap(i.variables)," ").concat(i.fields.length>0?"{ "+this.queryFieldsMap(i.fields)+" }":"")},n.queryVariablesMap=function(i,o){var s={},a=function(u){u&&Object.keys(u).map(function(c){s[c]=typeof u[c]=="object"?u[c].value:u[c]})};return a(i),o&&typeof o=="object"&&a(n.getNestedVariables(o)),s},n.getNestedVariables=function(i){var o={};function s(a){return a?.forEach(function(u){if((0,e.isNestedField)(u))o=t(t(t({},u.variables),o),u.fields&&s(u.fields));else if(typeof u=="object")for(var c=0,l=Object.entries(u);c<l.length;c++){var d=l[c],m=d[1];s(m)}}),o}return s(i),o},n.queryDataType=function(i){var o="String",s=typeof i=="object"?i.value:i;if(i?.type!=null)o=i.type;else{var a=Array.isArray(s)?s[0]:s;switch(typeof a){case"object":o="Object";break;case"boolean":o="Boolean";break;case"number":o=a%1===0?"Int":"Float";break}}return typeof i=="object"&&(i.list===!0?o="[".concat(o,"]"):Array.isArray(i.list)&&(o="[".concat(o).concat(i.list[0]?"!":"","]")),i.required&&(o+="!")),o},n}();return $.default=r,$}var St;function mi(){if(St)return se;St=1,Object.defineProperty(se,"__esModule",{value:!0});var t=te(),e=ne(),r=function(){function n(i){Array.isArray(i)?this.variables=e.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields,this.operation=i.operation)}return n.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},n.prototype.mutationsBuilder=function(i){var o=this,s=i.map(function(a){return o.operation=a.operation,o.variables=a.variables,o.fields=a.fields,o.operationTemplate(a.operation)});return this.operationWrapperTemplate(e.default.resolveVariables(i),s.join(`
|
|
5
|
+
`):" "+mt(o[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:We};function De(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new J(null,t)}function ht(t){return De(t),t.headers=P.from(t.headers),t.data=Ce.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Zt.getAdapter(t.adapter||ee.adapter)(t).then(function(n){return De(t),n.data=Ce.call(t,t.transformResponse,n),n.headers=P.from(n.headers),n},function(n){return zt(n)||(De(t),n&&n.response&&(n.response.data=Ce.call(t,t.transformResponse,n.response),n.response.headers=P.from(n.response.headers))),Promise.reject(n)})}const en="1.10.0",Ee={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ee[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const yt={};Ee.transitional=function(e,r,n){function i(o,s){return"[Axios v"+en+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,a)=>{if(e===!1)throw new g(i(s," has been removed"+(r?" in "+r:"")),g.ERR_DEPRECATED);return r&&!yt[s]&&(yt[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,s,a):!0}};Ee.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function si(t,e,r){if(typeof t!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],s=e[o];if(s){const a=t[o],u=a===void 0||s(a,o,t);if(u!==!0)throw new g("option "+o+" must be "+u,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+o,g.ERR_BAD_OPTION)}}const de={assertOptions:si,validators:Ee},j=de.validators;let M=class{constructor(e){this.defaults=e||{},this.interceptors={request:new at,response:new at}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
6
|
+
`+o):n.stack=o}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=I(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&de.assertOptions(n,{silentJSONParsing:j.transitional(j.boolean),forcedJSONParsing:j.transitional(j.boolean),clarifyTimeoutError:j.transitional(j.boolean)},!1),i!=null&&(f.isFunction(i)?r.paramsSerializer={serialize:i}:de.assertOptions(i,{encode:j.function,serialize:j.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),de.assertOptions(r,{baseUrl:j.spelling("baseURL"),withXsrfToken:j.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&f.merge(o.common,o[r.method]);o&&f.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),r.headers=P.concat(s,o);const a=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(u=u&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let l,d=0,m;if(!u){const p=[ht.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,c),m=p.length,l=Promise.resolve(r);d<m;)l=l.then(p[d++],p[d++]);return l}m=a.length;let b=r;for(d=0;d<m;){const p=a[d++],y=a[d++];try{b=p(b)}catch(h){y.call(this,h);break}}try{l=ht.call(this,b)}catch(p){return Promise.reject(p)}for(d=0,m=c.length;d<m;)l=l.then(c[d++],c[d++]);return l}getUri(e){e=I(this.defaults,e);const r=Qt(e.baseURL,e.url,e.allowAbsoluteUrls);return Vt(r,e.params,e.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(e){M.prototype[e]=function(r,n){return this.request(I(n||{},{method:e,url:r,data:(n||{}).data}))}});f.forEach(["post","put","patch"],function(e){function r(n){return function(o,s,a){return this.request(I(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}M.prototype[e]=r(),M.prototype[e+"Form"]=r(!0)});let ai=class tn{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{n.subscribe(a),o=a}).then(i);return s.cancel=function(){n.unsubscribe(o)},s},e(function(o,s,a){n.reason||(n.reason=new J(o,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new tn(function(i){e=i}),cancel:e}}};function ui(t){return function(r){return t.apply(null,r)}}function ci(t){return f.isObject(t)&&t.isAxiosError===!0}const Xe={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};Object.entries(Xe).forEach(([t,e])=>{Xe[e]=t});function nn(t){const e=new M(t),r=qt(M.prototype.request,e);return f.extend(r,M.prototype,e,{allOwnKeys:!0}),f.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return nn(I(t,i))},r}const O=nn(ee);O.Axios=M;O.CanceledError=J;O.CancelToken=ai;O.isCancel=zt;O.VERSION=en;O.toFormData=Se;O.AxiosError=g;O.Cancel=O.CanceledError;O.all=function(e){return Promise.all(e)};O.spread=ui;O.isAxiosError=ci;O.mergeConfig=I;O.AxiosHeaders=P;O.formToJSON=t=>Xt(f.isHTMLForm(t)?new FormData(t):t);O.getAdapter=Zt.getAdapter;O.HttpStatusCode=Xe;O.default=O;const{Axios:xi,AxiosError:bt,CanceledError:Fi,isCancel:Mi,CancelToken:Bi,VERSION:Ui,all:Li,Cancel:Ii,isAxiosError:$i,spread:Hi,toFormData:Vi,AxiosHeaders:Wi,HttpStatusCode:Xi,formToJSON:zi,getAdapter:Ji,mergeConfig:Qi}=O,li=t=>xe.lodashExports.some(t,e=>e&&e.errorCode!==void 0)||t?.errorCode!==void 0;typeof window<"u"?window.__STORE_QUERY_CLIENT__||(window.__STORE_QUERY_CLIENT__=new Fe.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})):new Fe.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}});const rn="auth_token",fi="https://localhost:3000/shop-api",on=O.create({baseURL:fi,withCredentials:!0,headers:{"vendure-token":""}});let di=async(t,e)=>{await e(t)};on.interceptors.request.use(async t=>(di(t,async r=>{const n=await Me.getItem(rn),i=await Me.getItem("channelToken");n&&(r.headers.Authorization=`Bearer ${n}`),i&&(r.headers["vendure-token"]=i)}),t));on.interceptors.response.use(t=>{const e=t.headers["vendure-auth-token"];if(e&&Me.setItem(rn,e),li(t.data.data)){const r=Object.values(t.data.data)[0],n=new bt(r.errorCode);return n.response=t,n.request=t.request,n.config=t.config,Promise.reject(n)}if(t.data.errors?.length>0){const r=t.data.errors[0],n=new bt(r.message);return n.response=t,n.request=t.request,n.config=t.config,Promise.reject(n)}return t},t=>Promise.reject(t));var k={},oe={},se={},ae={},gt;function te(){if(gt)return ae;gt=1,Object.defineProperty(ae,"__esModule",{value:!0});var t;return function(e){e.Mutation="mutation",e.Query="query",e.Subscription="subscription"}(t||(t={})),ae.default=t,ae}var $={},K={},vt;function pi(){if(vt)return K;vt=1,Object.defineProperty(K,"__esModule",{value:!0}),K.isNestedField=void 0;function t(e){return typeof e=="object"&&e.hasOwnProperty("operation")&&e.hasOwnProperty("variables")&&e.hasOwnProperty("fields")||typeof e=="object"&&e.hasOwnProperty("operation")&&e.hasOwnProperty("fragment")&&e.hasOwnProperty("fields")}return K.isNestedField=t,K}var wt;function ne(){if(wt)return $;wt=1;var t=$&&$.__assign||function(){return t=Object.assign||function(n){for(var i,o=1,s=arguments.length;o<s;o++){i=arguments[o];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])}return n},t.apply(this,arguments)};Object.defineProperty($,"__esModule",{value:!0});var e=pi(),r=function(){function n(){}return n.resolveVariables=function(i){for(var o={},s=0,a=i;s<a.length;s++){var u=a[s],c=u.variables,l=u.fields;o=t(t(t({},o),c),l&&n.getNestedVariables(l)||{})}return o},n.queryDataNameAndArgumentMap=function(i){return i&&Object.keys(i).length?"(".concat(Object.entries(i).reduce(function(o,s,a){var u=s[0],c=s[1];return"".concat(o).concat(a!==0?", ":"").concat(c&&c.name?c.name:u,": $").concat(u)},""),")"):""},n.queryFieldsMap=function(i){var o=this;return i?i.map(function(s){if((0,e.isNestedField)(s))return n.queryNestedFieldMap(s);if(typeof s=="object"){var a="";return Object.entries(s).forEach(function(u,c,l){var d=u[0],m=u[1];a+="".concat(d," ").concat(m.length>0?"{ "+o.queryFieldsMap(m)+" }":""),c<l.length-1&&(a+=", ")}),a}else return"".concat(s)}).join(", "):""},n.operationOrAlias=function(i){return typeof i=="string"?i:"".concat(i.alias,": ").concat(i.name)},n.isFragment=function(i){var o;return(o=i?.fragment===!0)!==null&&o!==void 0?o:!1},n.operationOrFragment=function(i){return n.isFragment(i)?i.operation:n.operationOrAlias(i.operation)},n.getFragment=function(i){return n.isFragment(i)?"... on ":""},n.queryNestedFieldMap=function(i){return"".concat(n.getFragment(i)).concat(n.operationOrFragment(i)," ").concat(this.isFragment(i)?"":this.queryDataNameAndArgumentMap(i.variables)," ").concat(i.fields.length>0?"{ "+this.queryFieldsMap(i.fields)+" }":"")},n.queryVariablesMap=function(i,o){var s={},a=function(u){u&&Object.keys(u).map(function(c){s[c]=typeof u[c]=="object"?u[c].value:u[c]})};return a(i),o&&typeof o=="object"&&a(n.getNestedVariables(o)),s},n.getNestedVariables=function(i){var o={};function s(a){return a?.forEach(function(u){if((0,e.isNestedField)(u))o=t(t(t({},u.variables),o),u.fields&&s(u.fields));else if(typeof u=="object")for(var c=0,l=Object.entries(u);c<l.length;c++){var d=l[c],m=d[1];s(m)}}),o}return s(i),o},n.queryDataType=function(i){var o="String",s=typeof i=="object"?i.value:i;if(i?.type!=null)o=i.type;else{var a=Array.isArray(s)?s[0]:s;switch(typeof a){case"object":o="Object";break;case"boolean":o="Boolean";break;case"number":o=a%1===0?"Int":"Float";break}}return typeof i=="object"&&(i.list===!0?o="[".concat(o,"]"):Array.isArray(i.list)&&(o="[".concat(o).concat(i.list[0]?"!":"","]")),i.required&&(o+="!")),o},n}();return $.default=r,$}var St;function mi(){if(St)return se;St=1,Object.defineProperty(se,"__esModule",{value:!0});var t=te(),e=ne(),r=function(){function n(i){Array.isArray(i)?this.variables=e.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields,this.operation=i.operation)}return n.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},n.prototype.mutationsBuilder=function(i){var o=this,s=i.map(function(a){return o.operation=a.operation,o.variables=a.variables,o.fields=a.fields,o.operationTemplate(a.operation)});return this.operationWrapperTemplate(e.default.resolveVariables(i),s.join(`
|
|
7
7
|
`))},n.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(i,o,s){return"".concat(i).concat(s!==0?", ":"").concat(o,": $").concat(o)},""),")"):""},n.prototype.queryDataArgumentAndTypeMap=function(i){return Object.keys(i).length?"(".concat(Object.keys(i).reduce(function(o,s,a){return"".concat(o).concat(a!==0?", ":"","$").concat(s,": ").concat(e.default.queryDataType(i[s]))},""),")"):""},n.prototype.operationWrapperTemplate=function(i,o){var s=typeof this.operation=="string"?this.operation:this.operation.name;return{query:"".concat(t.default.Mutation," ").concat(s.charAt(0).toUpperCase()+s.slice(1)," ").concat(this.queryDataArgumentAndTypeMap(i),` {
|
|
8
8
|
`).concat(o,`
|
|
9
9
|
}`),variables:e.default.queryVariablesMap(i)}},n.prototype.operationTemplate=function(i){var o=typeof i=="string"?i:"".concat(i.alias,": ").concat(i.name);return"".concat(o," ").concat(this.queryDataNameAndArgumentMap(),` {
|
package/badge.mjs
CHANGED
|
@@ -214,18 +214,45 @@ function ge(t) {
|
|
|
214
214
|
});
|
|
215
215
|
return r.displayName = "Slot", r;
|
|
216
216
|
}
|
|
217
|
-
let
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
let H;
|
|
218
|
+
try {
|
|
219
|
+
H = require("@react-native-async-storage/async-storage").default;
|
|
220
|
+
} catch {
|
|
221
|
+
H = null;
|
|
222
|
+
}
|
|
223
|
+
const Ne = typeof window < "u" && typeof window.localStorage < "u", Pe = !!H, qe = {}, Be = {
|
|
224
|
+
getItem: async (t) => Pe ? H.getItem(t) : Ne ? window.localStorage.getItem(t) : qe[t] || null,
|
|
225
|
+
setItem: async (t, e) => {
|
|
226
|
+
if (Pe)
|
|
227
|
+
return H.setItem(t, e);
|
|
228
|
+
if (Ne) {
|
|
229
|
+
window.localStorage.setItem(t, e);
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
qe[t] = e;
|
|
233
|
+
},
|
|
234
|
+
removeItem: async (t) => {
|
|
235
|
+
if (Pe)
|
|
236
|
+
return H.removeItem(t);
|
|
237
|
+
if (Ne) {
|
|
238
|
+
window.localStorage.removeItem(t);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
delete qe[t];
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
let je;
|
|
245
|
+
typeof window < "u" ? (window.__STORE_I18N_INSTANCE__ || (window.__STORE_I18N_INSTANCE__ = Ze.createInstance()), window.__STORE_I18N_INSTANCE__.use(Ye), je = window.__STORE_I18N_INSTANCE__) : (je = Ze.createInstance(), je.use(Ye));
|
|
246
|
+
function Ue(t) {
|
|
220
247
|
"@babel/helpers - typeof";
|
|
221
|
-
return
|
|
248
|
+
return Ue = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
222
249
|
return typeof e;
|
|
223
250
|
} : function(e) {
|
|
224
251
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
225
|
-
},
|
|
252
|
+
}, Ue(t);
|
|
226
253
|
}
|
|
227
254
|
function jt() {
|
|
228
|
-
return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" :
|
|
255
|
+
return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : Ue(XMLHttpRequest)) === "object";
|
|
229
256
|
}
|
|
230
257
|
function Tn(t) {
|
|
231
258
|
return !!t && typeof t.then == "function";
|
|
@@ -294,7 +321,7 @@ if (!D && !G && !me)
|
|
|
294
321
|
});
|
|
295
322
|
} catch {
|
|
296
323
|
}
|
|
297
|
-
var
|
|
324
|
+
var Le = function(e, r) {
|
|
298
325
|
if (r && B(r) === "object") {
|
|
299
326
|
var n = "";
|
|
300
327
|
for (var i in r)
|
|
@@ -324,7 +351,7 @@ var Ue = function(e, r) {
|
|
|
324
351
|
}
|
|
325
352
|
typeof fetch == "function" ? fetch(e, r).then(o).catch(n) : D(e, r).then(o).catch(n);
|
|
326
353
|
}, rt = !1, Pn = function(e, r, n, i) {
|
|
327
|
-
e.queryStringParams && (r =
|
|
354
|
+
e.queryStringParams && (r = Le(r, e.queryStringParams));
|
|
328
355
|
var o = tt({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
|
|
329
356
|
typeof window > "u" && typeof global < "u" && typeof global.process < "u" && global.process.versions && global.process.versions.node && (o["User-Agent"] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")")), n && (o["Content-Type"] = "application/json");
|
|
330
357
|
var a = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, s = tt({
|
|
@@ -346,7 +373,7 @@ var Ue = function(e, r) {
|
|
|
346
373
|
}
|
|
347
374
|
}
|
|
348
375
|
}, qn = function(e, r, n, i) {
|
|
349
|
-
n && B(n) === "object" && (n =
|
|
376
|
+
n && B(n) === "object" && (n = Le("", n).slice(1)), e.queryStringParams && (r = Le(r, e.queryStringParams));
|
|
350
377
|
try {
|
|
351
378
|
var o = G ? new G() : new me("MSXML2.XMLHTTP.3.0");
|
|
352
379
|
o.open(n ? "POST" : "GET", r, 1), e.crossDomain || o.setRequestHeader("X-Requested-With", "XMLHttpRequest"), o.withCredentials = !!e.withCredentials, n && o.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), o.overrideMimeType && o.overrideMimeType("application/json");
|
|
@@ -389,7 +416,7 @@ function it(t, e) {
|
|
|
389
416
|
}
|
|
390
417
|
return r;
|
|
391
418
|
}
|
|
392
|
-
function
|
|
419
|
+
function Ce(t) {
|
|
393
420
|
for (var e = 1; e < arguments.length; e++) {
|
|
394
421
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
395
422
|
e % 2 ? it(Object(r), !0).forEach(function(n) {
|
|
@@ -464,7 +491,7 @@ var Mn = function() {
|
|
|
464
491
|
key: "init",
|
|
465
492
|
value: function(r) {
|
|
466
493
|
var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
467
|
-
if (this.services = r, this.options =
|
|
494
|
+
if (this.services = r, this.options = Ce(Ce(Ce({}, Mn()), this.options || {}), i), this.allOptions = o, this.services && this.options.reloadInterval) {
|
|
468
495
|
var a = setInterval(function() {
|
|
469
496
|
return n.reload();
|
|
470
497
|
}, this.options.reloadInterval);
|
|
@@ -564,10 +591,10 @@ var Mn = function() {
|
|
|
564
591
|
}]);
|
|
565
592
|
}();
|
|
566
593
|
Bn.type = "backend";
|
|
567
|
-
let
|
|
568
|
-
typeof window < "u" ? (window.__STORE_SDK_CONTEXT__ || (window.__STORE_SDK_CONTEXT__ = pe(void 0)),
|
|
594
|
+
let Ie;
|
|
595
|
+
typeof window < "u" ? (window.__STORE_SDK_CONTEXT__ || (window.__STORE_SDK_CONTEXT__ = pe(void 0)), Ie = window.__STORE_SDK_CONTEXT__) : Ie = pe(void 0);
|
|
569
596
|
const Un = () => {
|
|
570
|
-
const t = hn(
|
|
597
|
+
const t = hn(Ie);
|
|
571
598
|
return t || console.error("You must wrap your component in a <DataProvider>"), t?.sdkType === "dummy" || t?.sdkType === "vendure", t;
|
|
572
599
|
};
|
|
573
600
|
new Me();
|
|
@@ -622,10 +649,10 @@ function Ut(t, e) {
|
|
|
622
649
|
return null;
|
|
623
650
|
}
|
|
624
651
|
const x = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Lt = (t) => !Y(t) && t !== x;
|
|
625
|
-
function
|
|
652
|
+
function $e() {
|
|
626
653
|
const { caseless: t } = Lt(this) && this || {}, e = {}, r = (n, i) => {
|
|
627
654
|
const o = t && Ut(e, i) || i;
|
|
628
|
-
le(e[o]) && le(n) ? e[o] =
|
|
655
|
+
le(e[o]) && le(n) ? e[o] = $e(e[o], n) : le(n) ? e[o] = $e({}, n) : z(n) ? e[o] = n.slice() : e[o] = n;
|
|
629
656
|
};
|
|
630
657
|
for (let n = 0, i = arguments.length; n < i; n++)
|
|
631
658
|
arguments[n] && Z(arguments[n], r);
|
|
@@ -761,7 +788,7 @@ const wr = (t) => {
|
|
|
761
788
|
isTypedArray: cr,
|
|
762
789
|
isFileList: Jn,
|
|
763
790
|
forEach: Z,
|
|
764
|
-
merge:
|
|
791
|
+
merge: $e,
|
|
765
792
|
extend: rr,
|
|
766
793
|
trim: nr,
|
|
767
794
|
stripBOM: ir,
|
|
@@ -845,7 +872,7 @@ g.from = (t, e, r, n, i, o) => {
|
|
|
845
872
|
}, (s) => s !== "isAxiosError"), g.call(a, t.message, e, r, n, i), a.cause = t, a.name = t.name, o && Object.assign(a, o), a;
|
|
846
873
|
};
|
|
847
874
|
const Tr = null;
|
|
848
|
-
function
|
|
875
|
+
function He(t) {
|
|
849
876
|
return f.isPlainObject(t) || f.isArray(t);
|
|
850
877
|
}
|
|
851
878
|
function Wt(t) {
|
|
@@ -857,7 +884,7 @@ function at(t, e, r) {
|
|
|
857
884
|
}).join(r ? "." : "") : e;
|
|
858
885
|
}
|
|
859
886
|
function _r(t) {
|
|
860
|
-
return f.isArray(t) && !t.some(
|
|
887
|
+
return f.isArray(t) && !t.some(He);
|
|
861
888
|
}
|
|
862
889
|
const Rr = f.toFlatObject(f, {}, null, function(e) {
|
|
863
890
|
return /^is[A-Z]/.test(e);
|
|
@@ -899,12 +926,12 @@ function Ae(t, e, r) {
|
|
|
899
926
|
);
|
|
900
927
|
}), !1;
|
|
901
928
|
}
|
|
902
|
-
return
|
|
929
|
+
return He(p) ? !0 : (e.append(at(h, y, o), c(p)), !1);
|
|
903
930
|
}
|
|
904
931
|
const d = [], m = Object.assign(Rr, {
|
|
905
932
|
defaultVisitor: l,
|
|
906
933
|
convertValue: c,
|
|
907
|
-
isVisitable:
|
|
934
|
+
isVisitable: He
|
|
908
935
|
});
|
|
909
936
|
function b(p, y) {
|
|
910
937
|
if (!f.isUndefined(p)) {
|
|
@@ -1038,13 +1065,13 @@ const Jt = {
|
|
|
1038
1065
|
Blob: qr
|
|
1039
1066
|
},
|
|
1040
1067
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1041
|
-
}, Qe = typeof window < "u" && typeof document < "u",
|
|
1068
|
+
}, Qe = typeof window < "u" && typeof document < "u", Ve = typeof navigator == "object" && navigator || void 0, Cr = Qe && (!Ve || ["ReactNative", "NativeScript", "NS"].indexOf(Ve.product) < 0), Dr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1042
1069
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Fr = Qe && window.location.href || "http://localhost", xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1043
1070
|
__proto__: null,
|
|
1044
1071
|
hasBrowserEnv: Qe,
|
|
1045
1072
|
hasStandardBrowserEnv: Cr,
|
|
1046
1073
|
hasStandardBrowserWebWorkerEnv: Dr,
|
|
1047
|
-
navigator:
|
|
1074
|
+
navigator: Ve,
|
|
1048
1075
|
origin: Fr
|
|
1049
1076
|
}, Symbol.toStringTag, { value: "Module" })), E = {
|
|
1050
1077
|
...xr,
|
|
@@ -1203,7 +1230,7 @@ function Hr(t) {
|
|
|
1203
1230
|
return e;
|
|
1204
1231
|
}
|
|
1205
1232
|
const Vr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
1206
|
-
function
|
|
1233
|
+
function De(t, e, r, n, i) {
|
|
1207
1234
|
if (f.isFunction(n))
|
|
1208
1235
|
return n.call(this, e, r);
|
|
1209
1236
|
if (i && (e = r), !!f.isString(e)) {
|
|
@@ -1277,7 +1304,7 @@ let R = class {
|
|
|
1277
1304
|
has(e, r) {
|
|
1278
1305
|
if (e = K(e), e) {
|
|
1279
1306
|
const n = f.findKey(this, e);
|
|
1280
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
1307
|
+
return !!(n && this[n] !== void 0 && (!r || De(this, this[n], n, r)));
|
|
1281
1308
|
}
|
|
1282
1309
|
return !1;
|
|
1283
1310
|
}
|
|
@@ -1287,7 +1314,7 @@ let R = class {
|
|
|
1287
1314
|
function o(a) {
|
|
1288
1315
|
if (a = K(a), a) {
|
|
1289
1316
|
const s = f.findKey(n, a);
|
|
1290
|
-
s && (!r ||
|
|
1317
|
+
s && (!r || De(n, n[s], s, r)) && (delete n[s], i = !0);
|
|
1291
1318
|
}
|
|
1292
1319
|
}
|
|
1293
1320
|
return f.isArray(e) ? e.forEach(o) : o(e), i;
|
|
@@ -1297,7 +1324,7 @@ let R = class {
|
|
|
1297
1324
|
let n = r.length, i = !1;
|
|
1298
1325
|
for (; n--; ) {
|
|
1299
1326
|
const o = r[n];
|
|
1300
|
-
(!e ||
|
|
1327
|
+
(!e || De(this, this[o], o, e, !0)) && (delete this[o], i = !0);
|
|
1301
1328
|
}
|
|
1302
1329
|
return i;
|
|
1303
1330
|
}
|
|
@@ -1364,7 +1391,7 @@ f.reduceDescriptors(R.prototype, ({ value: t }, e) => {
|
|
|
1364
1391
|
};
|
|
1365
1392
|
});
|
|
1366
1393
|
f.freezeMethods(R);
|
|
1367
|
-
function
|
|
1394
|
+
function Fe(t, e) {
|
|
1368
1395
|
const r = this || ee, n = e || r, i = R.from(n.headers);
|
|
1369
1396
|
let o = n.data;
|
|
1370
1397
|
return f.forEach(t, function(s) {
|
|
@@ -1727,8 +1754,8 @@ const Zt = (t) => {
|
|
|
1727
1754
|
}
|
|
1728
1755
|
}).headers.has("Content-Type");
|
|
1729
1756
|
return t && !e;
|
|
1730
|
-
}), mt = 64 * 1024,
|
|
1731
|
-
stream:
|
|
1757
|
+
}), mt = 64 * 1024, We = en && tn(() => f.isReadableStream(new Response("").body)), ye = {
|
|
1758
|
+
stream: We && ((t) => t.body)
|
|
1732
1759
|
};
|
|
1733
1760
|
Ee && ((t) => {
|
|
1734
1761
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
|
|
@@ -1802,8 +1829,8 @@ const ui = async (t) => {
|
|
|
1802
1829
|
credentials: v ? d : void 0
|
|
1803
1830
|
});
|
|
1804
1831
|
let w = await fetch(p, m);
|
|
1805
|
-
const O =
|
|
1806
|
-
if (
|
|
1832
|
+
const O = We && (c === "stream" || c === "response");
|
|
1833
|
+
if (We && (s || O && y)) {
|
|
1807
1834
|
const T = {};
|
|
1808
1835
|
["status", "statusText", "headers"].forEach((Ge) => {
|
|
1809
1836
|
T[Ge] = w[Ge];
|
|
@@ -1839,12 +1866,12 @@ const ui = async (t) => {
|
|
|
1839
1866
|
}
|
|
1840
1867
|
) : g.from(v, v && v.code, t, p);
|
|
1841
1868
|
}
|
|
1842
|
-
}),
|
|
1869
|
+
}), Xe = {
|
|
1843
1870
|
http: Tr,
|
|
1844
1871
|
xhr: ti,
|
|
1845
1872
|
fetch: li
|
|
1846
1873
|
};
|
|
1847
|
-
f.forEach(
|
|
1874
|
+
f.forEach(Xe, (t, e) => {
|
|
1848
1875
|
if (t) {
|
|
1849
1876
|
try {
|
|
1850
1877
|
Object.defineProperty(t, "name", { value: e });
|
|
@@ -1862,7 +1889,7 @@ const ht = (t) => `- ${t}`, fi = (t) => f.isFunction(t) || t === null || t === !
|
|
|
1862
1889
|
for (let o = 0; o < e; o++) {
|
|
1863
1890
|
r = t[o];
|
|
1864
1891
|
let a;
|
|
1865
|
-
if (n = r, !fi(r) && (n =
|
|
1892
|
+
if (n = r, !fi(r) && (n = Xe[(a = String(r)).toLowerCase()], n === void 0))
|
|
1866
1893
|
throw new g(`Unknown adapter '${a}'`);
|
|
1867
1894
|
if (n)
|
|
1868
1895
|
break;
|
|
@@ -1882,24 +1909,24 @@ const ht = (t) => `- ${t}`, fi = (t) => f.isFunction(t) || t === null || t === !
|
|
|
1882
1909
|
}
|
|
1883
1910
|
return n;
|
|
1884
1911
|
},
|
|
1885
|
-
adapters:
|
|
1912
|
+
adapters: Xe
|
|
1886
1913
|
};
|
|
1887
|
-
function
|
|
1914
|
+
function xe(t) {
|
|
1888
1915
|
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
1889
1916
|
throw new J(null, t);
|
|
1890
1917
|
}
|
|
1891
1918
|
function yt(t) {
|
|
1892
|
-
return
|
|
1919
|
+
return xe(t), t.headers = R.from(t.headers), t.data = Fe.call(
|
|
1893
1920
|
t,
|
|
1894
1921
|
t.transformRequest
|
|
1895
1922
|
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), nn.getAdapter(t.adapter || ee.adapter)(t).then(function(n) {
|
|
1896
|
-
return
|
|
1923
|
+
return xe(t), n.data = Fe.call(
|
|
1897
1924
|
t,
|
|
1898
1925
|
t.transformResponse,
|
|
1899
1926
|
n
|
|
1900
1927
|
), n.headers = R.from(n.headers), n;
|
|
1901
1928
|
}, function(n) {
|
|
1902
|
-
return Qt(n) || (
|
|
1929
|
+
return Qt(n) || (xe(t), n && n.response && (n.response.data = Fe.call(
|
|
1903
1930
|
t,
|
|
1904
1931
|
t.transformResponse,
|
|
1905
1932
|
n.response
|
|
@@ -2160,7 +2187,7 @@ function mi(t) {
|
|
|
2160
2187
|
function hi(t) {
|
|
2161
2188
|
return f.isObject(t) && t.isAxiosError === !0;
|
|
2162
2189
|
}
|
|
2163
|
-
const
|
|
2190
|
+
const ze = {
|
|
2164
2191
|
Continue: 100,
|
|
2165
2192
|
SwitchingProtocols: 101,
|
|
2166
2193
|
Processing: 102,
|
|
@@ -2225,8 +2252,8 @@ const Xe = {
|
|
|
2225
2252
|
NotExtended: 510,
|
|
2226
2253
|
NetworkAuthenticationRequired: 511
|
|
2227
2254
|
};
|
|
2228
|
-
Object.entries(
|
|
2229
|
-
|
|
2255
|
+
Object.entries(ze).forEach(([t, e]) => {
|
|
2256
|
+
ze[e] = t;
|
|
2230
2257
|
});
|
|
2231
2258
|
function an(t) {
|
|
2232
2259
|
const e = new M(t), r = Ft(M.prototype.request, e);
|
|
@@ -2252,7 +2279,7 @@ S.mergeConfig = U;
|
|
|
2252
2279
|
S.AxiosHeaders = R;
|
|
2253
2280
|
S.formToJSON = (t) => Kt(f.isHTMLForm(t) ? new FormData(t) : t);
|
|
2254
2281
|
S.getAdapter = nn.getAdapter;
|
|
2255
|
-
S.HttpStatusCode =
|
|
2282
|
+
S.HttpStatusCode = ze;
|
|
2256
2283
|
S.default = S;
|
|
2257
2284
|
const {
|
|
2258
2285
|
Axios: zi,
|
|
@@ -2272,33 +2299,6 @@ const {
|
|
|
2272
2299
|
getAdapter: ao,
|
|
2273
2300
|
mergeConfig: so
|
|
2274
2301
|
} = S, yi = (t) => Pt.some(t, (e) => e && e.errorCode !== void 0) || t?.errorCode !== void 0;
|
|
2275
|
-
let H;
|
|
2276
|
-
try {
|
|
2277
|
-
H = require("@react-native-async-storage/async-storage").default;
|
|
2278
|
-
} catch {
|
|
2279
|
-
H = null;
|
|
2280
|
-
}
|
|
2281
|
-
const De = typeof window < "u" && typeof window.localStorage < "u", Fe = !!H, xe = {}, ze = {
|
|
2282
|
-
getItem: async (t) => Fe ? H.getItem(t) : De ? window.localStorage.getItem(t) : xe[t] || null,
|
|
2283
|
-
setItem: async (t, e) => {
|
|
2284
|
-
if (Fe)
|
|
2285
|
-
return H.setItem(t, e);
|
|
2286
|
-
if (De) {
|
|
2287
|
-
window.localStorage.setItem(t, e);
|
|
2288
|
-
return;
|
|
2289
|
-
}
|
|
2290
|
-
xe[t] = e;
|
|
2291
|
-
},
|
|
2292
|
-
removeItem: async (t) => {
|
|
2293
|
-
if (Fe)
|
|
2294
|
-
return H.removeItem(t);
|
|
2295
|
-
if (De) {
|
|
2296
|
-
window.localStorage.removeItem(t);
|
|
2297
|
-
return;
|
|
2298
|
-
}
|
|
2299
|
-
delete xe[t];
|
|
2300
|
-
}
|
|
2301
|
-
};
|
|
2302
2302
|
typeof window < "u" ? window.__STORE_QUERY_CLIENT__ || (window.__STORE_QUERY_CLIENT__ = new Me({
|
|
2303
2303
|
defaultOptions: {
|
|
2304
2304
|
queries: {
|
|
@@ -2331,12 +2331,12 @@ let gi = async (t, e) => {
|
|
|
2331
2331
|
await e(t);
|
|
2332
2332
|
};
|
|
2333
2333
|
un.interceptors.request.use(async (t) => (gi(t, async (r) => {
|
|
2334
|
-
const n = await
|
|
2334
|
+
const n = await Be.getItem(sn), i = await Be.getItem("channelToken");
|
|
2335
2335
|
n && (r.headers.Authorization = `Bearer ${n}`), i && (r.headers["vendure-token"] = i);
|
|
2336
2336
|
}), t));
|
|
2337
2337
|
un.interceptors.response.use((t) => {
|
|
2338
2338
|
const e = t.headers["vendure-auth-token"];
|
|
2339
|
-
if (e &&
|
|
2339
|
+
if (e && Be.setItem(sn, e), yi(t.data.data)) {
|
|
2340
2340
|
const r = Object.values(t.data.data)[0], n = new gt(r.errorCode);
|
|
2341
2341
|
return n.response = t, n.request = t.request, n.config = t.config, Promise.reject(n);
|
|
2342
2342
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haus-storefront-react/vendure-plugin-configs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@haus-storefront-react/common-utils": "0.0.
|
|
45
|
-
"@haus-storefront-react/core": "0.0.
|
|
46
|
-
"@haus-storefront-react/shared-types": "0.0.
|
|
44
|
+
"@haus-storefront-react/common-utils": "0.0.10",
|
|
45
|
+
"@haus-storefront-react/core": "0.0.10",
|
|
46
|
+
"@haus-storefront-react/shared-types": "0.0.10"
|
|
47
47
|
}
|
|
48
48
|
}
|