@haus-storefront-react/vendure-plugin-configs 0.0.42 → 0.0.44
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 +16 -0
- package/badge.js +2 -2
- package/badge.mjs +2 -2
- package/campaign.js +1 -1
- package/campaign.mjs +1 -1
- package/{index-DHq-tHrl.mjs → index-DZUW5rtF.mjs} +125 -127
- package/index-jyV3VKB7.js +42 -0
- package/package.json +4 -4
- package/index-C5vj0ljt.js +0 -42
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 0.0.43 (2025-09-30)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated core to 0.0.43
|
|
6
|
+
- Updated common/utils to 0.0.43
|
|
7
|
+
- Updated shared/types to 0.0.43
|
|
8
|
+
|
|
9
|
+
## 0.0.42 (2025-09-29)
|
|
10
|
+
|
|
11
|
+
### 🧱 Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated core to 0.0.42
|
|
14
|
+
- Updated common/utils to 0.0.42
|
|
15
|
+
- Updated shared/types to 0.0.42
|
|
16
|
+
|
|
1
17
|
## 0.0.41 (2025-09-26)
|
|
2
18
|
|
|
3
19
|
### 🧱 Updated Dependencies
|
package/badge.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./index-CzxpJe9c.js"),E=require("./index-C5vj0ljt.js"),K=require("react"),vt=require("@tanstack/react-query");function Zt(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 T=Zt(K),U=new he.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const r=e?U.getSettings().availablePositions[e]:U.getSettings().defaultPositions;return{badges:he.lodashExports.filter(t,o=>r?r.includes(o.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 en(t){const e=[];function r(o,i){const s=T.createContext(i),a=e.length;e.push(s);const c=l=>{const f=E.compilerRuntimeExports.c(8);let m,g,p;f[0]!==l?({scope:p,children:m,...g}=l,f[0]=l,f[1]=m,f[2]=g,f[3]=p):(m=f[1],g=f[2],p=f[3]);const y=p?.[t]?.[a]||s,h=g;let w;return f[4]!==y.Provider||f[5]!==m||f[6]!==h?(w=E.jsxRuntimeExports.jsx(y.Provider,{value:h,children:m}),f[4]=y.Provider,f[5]=m,f[6]=h,f[7]=w):w=f[7],w};c.displayName=o+"Provider";function u(l,f){const m=f?.[t]?.[a]||s,g=T.useContext(m);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${o}\``)}return[c,u]}function n(){const o=e.map(i=>T.createContext(i));return function(s){const a=s?.[t]||o;return T.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return n.scopeName=t,[r,n]}function tn(t,e){if(e==="web")return t;const{src:r,alt:n,width:o,height:i,...s}=t,a=[typeof o=="number"?{width:o}:void 0,typeof i=="number"?{height:i}:void 0].filter(Boolean);let c;return a.length===1?c=a[0]:a.length>1&&(c=a),{...s,source:{uri:r},...c?{style:c}:{}}}function nn(t){const{src:e,alt:r,...n}=t;return e?{...n,source:{uri:e}}:n}const rn={div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",button:"Pressable",input:"TextInput",form:"View",section:"View",article:"View",nav:"View",header:"View",footer:"View",main:"View",aside:"View",ul:"View",ol:"View",li:"View",a:"Pressable",img:"Image",label:"Text",textarea:"TextInput",select:"Pressable",option:"Text"};function on(t,e){if(e==="web")return t;let r=null;try{r=require("react-native")}catch{r=null}if(!r)return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`),"div";const n=rn[t];if(!n)return console.warn(`No native component mapping found for '${t}', falling back to View`),r.View;if(n==="Image"){const i=K.forwardRef((s,a)=>{const c=E.compilerRuntimeExports.c(5);if(!s.src)return null;let u;c[0]!==s?(u=nn(s),c[0]=s,c[1]=u):u=c[1];let l;return c[2]!==a||c[3]!==u?(l=E.jsxRuntimeExports.jsx(r.Image,{ref:a,...u}),c[2]=a,c[3]=u,c[4]=l):l=c[4],l});return i.displayName="PlatformPrimitiveImage",i}const o=r[n];return o||(console.warn(`Native component '${n}' not found, falling back to View`),r.View)}const sn=Symbol("radix.slottable");function an(...t){return e=>t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}function cn(t,e){const r={...e};for(const n in e){const o=t[n],i=e[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const c=i(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]=un(o,i):n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...t,...r}}function un(t,e){let r=null;try{r=require("react-native")}catch{r=null}const n=r?.StyleSheet?.flatten;if(typeof t=="function"&&typeof e=="function")return i=>{const s=[t(i),e(i)];return n?n(s):s};if(typeof t=="function")return i=>{const s=e?[t(i),e]:t(i);return n?n(s):s};if(typeof e=="function")return i=>{const s=t?[t,e(i)]:e(i);return n?n(s):s};const o=[t,e].filter(Boolean);return n?n(o):o}function ln(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===sn}function dn(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 fn(t,e){const r=T.forwardRef((n,o)=>{const{children:i,...s}=n;if(T.isValidElement(i)){const a=dn(i),c=cn(s,i.props);return i.type!==T.Fragment&&(c.ref=o?an(o,a):a),T.cloneElement(i,c)}return T.Children.count(i)>1?T.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}function be(t,e=!1,r="div"){if(!e)return on(r,t);const n=fn("Slot"),o=T.forwardRef((i,s)=>{const a=E.compilerRuntimeExports.c(15);let c,u;a[0]!==i?({children:c,...u}=i,a[0]=i,a[1]=c,a[2]=u):(c=a[1],u=a[2]);let l;if(a[3]!==c||a[4]!==s||a[5]!==u){l=Symbol.for("react.early_return_sentinel");e:{const m=T.Children.toArray(c),g=m.find(ln);if(g){const p=g.props.children,y=m.map(S=>S===g?T.Children.count(p)>1?T.Children.only(null):T.isValidElement(p)?p.props.children:null:S),h=T.isValidElement(p)?T.cloneElement(p,void 0,y):null;let w;a[7]!==s||a[8]!==u||a[9]!==h?(w=E.jsxRuntimeExports.jsx(n,{...u,ref:s,children:h}),a[7]=s,a[8]=u,a[9]=h,a[10]=w):w=a[10],l=w;break e}}a[3]=c,a[4]=s,a[5]=u,a[6]=l}else l=a[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;let f;return a[11]!==c||a[12]!==s||a[13]!==u?(f=E.jsxRuntimeExports.jsx(n,{...u,ref:s,children:c}),a[11]=c,a[12]=s,a[13]=u,a[14]=f):f=a[14],f});return o.displayName="Slot",o}const pn="debug",_=()=>{try{if(typeof window>"u"||typeof localStorage>"u")return!1;const t=localStorage.getItem(pn);return t==="true"||t==="1"}catch{return!1}},mn=()=>{const t=(e,r,n=[])=>r?typeof e=="string"?[`<${r}> ${e}`,...n]:[`<${r}>`,e,...n]:Array.isArray(e)?[...e,...n]:[e,...n];return{log:(e,r,...n)=>{_()&&console.log(...t(e,r,n))},info:(e,r,...n)=>{_()&&console.info(...t(e,r,n))},warn:(e,r,...n)=>{_()&&console.warn(...t(e,r,n))},error:(e,r,...n)=>{_()&&console.error(...t(e,r,n))},debug:(e,r,...n)=>{_()&&console.debug(...t(e,r,n))},group:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.group(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupCollapsed:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.groupCollapsed(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupEnd:()=>{_()&&console.groupEnd()},table:(e,r,n)=>{_()&&(r&&console.log(`<${r}>`),console.table(e,n))},time:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.time(r?n?`<${r}> ${n}`:`<${r}>`:n)}},timeEnd:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.timeEnd(r?n?`<${r}> ${n}`:`<${r}>`:n)}}}},Et=mn();function hn(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}let Q;try{Q=require("@react-native-async-storage/async-storage").default}catch{Q=null}let qe=null;try{const{AsyncLocalStorage:t}=require("node:async_hooks");qe=new t}catch{qe=null}const V=typeof window<"u"&&typeof window.localStorage<"u",H=!!Q,se={},_e={getItem:async()=>null,setItem:async()=>{},removeItem:async()=>{}},xe=()=>{try{return qe?.getStore?.()??null}catch{return null}},F={getItem:async t=>{const e=!V&&!H?xe():null;return e?e.getItem(t):H?Q.getItem(t):V?new Promise(r=>{Promise.resolve().then(()=>{const n=window.localStorage.getItem(t),o=se[t];n!==o&&(se[t]=n||""),r(n)})}):_e.getItem(t)},setItem:async(t,e)=>{const r=!V&&!H?xe():null;return r?r.setItem(t,e):H?Q.setItem(t,e):V?new Promise((n,o)=>{Promise.resolve().then(()=>{try{window.localStorage.setItem(t,e);const i=window.localStorage.getItem(t);i===e?(se[t]=e,n()):o(new Error(`Failed to set localStorage item: expected "${e}", got "${i}"`))}catch(i){o(i)}})}):_e.setItem(t,e)},removeItem:async t=>{const e=!V&&!H?xe():null;return e?e.removeItem(t):H?Q.removeItem(t):V?new Promise((r,n)=>{Promise.resolve().then(()=>{try{window.localStorage.removeItem(t);const o=window.localStorage.getItem(t);o===null?(delete se[t],r()):n(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${o}"`))}catch(o){n(o)}})}):_e.removeItem(t)}},We=50,j={get:async()=>{try{const t=await F.getItem("eventHistory");return t?JSON.parse(t):[]}catch(t){return console.error("Error getting event history",t),[]}},set:async t=>{try{await F.setItem("eventHistory",JSON.stringify(t.slice(-We)))}catch(e){console.error("Error setting event history",e)}},clear:async()=>{try{await F.removeItem("eventHistory")}catch(t){console.error("Error clearing event history",t)}},push:async t=>{const e=await j.get();await j.set([{...t,timestamp:Date.now()},...e].slice(-We))},find:async t=>(await j.get()).find(r=>r.key===t.key&&r.identifier===t.identifier),filter:async(t,e)=>{const r=await j.get();return e?r.filter(e):r.filter(({key:n,identifier:o})=>(!n||t.key===n)&&(!o||t.identifier===o))}};function yn(){const t=globalThis;return t.__HAUS_EVENT_EMITTER__||=hn(),t.__HAUS_EVENT_EMITTER__}function $(t){const e=yn(),r=(...c)=>console.error(...c);j.get().then(c=>{const l=he.lodashExports.first(c)?.timestamp;l&&l<Date.now()-1e3*60*60&&(Et.info("Clearing event history since it is older than 1 hour:","eventBus",l),j.clear())});const n=(c,u,l)=>{const f=m=>{try{if(typeof m=="object"&&m!==null){const{identifier:g,data:p}=m;(!g||g===l)&&u(p)}else u(m)}catch(g){r(g)}};return e.on(c,f),()=>{o(c,u,l)}},o=(c,u,l)=>{const f=m=>{if(typeof m=="object"&&m!==null){const{identifier:g}=m;(!g||g===l)&&e.off(c,u)}};e.off(c,f)};return{on:n,off:o,once:(c,u,l)=>{const f=m=>{try{if(typeof m=="object"&&m!==null){const{identifier:g,data:p}=m;(!g||g===l)&&u(p)}else u(m)}finally{o(c,f,l)}};e.on(c,f)},emit:(c,u,...l)=>{const f={identifier:u,data:l.length===1?l[0]:l};j.push({key:c,identifier:u,payload:f.data}),e.emit(c,f)},getEventHistory:(c,u)=>j.filter({key:c,identifier:u})}}$();$();$();$();$();$();$();new vt.QueryClient;function At(t,e){return function(){return t.apply(e,arguments)}}const{toString:gn}=Object.prototype,{getPrototypeOf:Le}=Object,{iterator:we,toStringTag:Tt}=Symbol,Se=(t=>e=>{const r=gn.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),P=t=>(t=t.toLowerCase(),e=>Se(e)===t),ve=t=>e=>typeof e===t,{isArray:X}=Array,ee=ve("undefined");function bn(t){return t!==null&&!ee(t)&&t.constructor!==null&&!ee(t.constructor)&&N(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ot=P("ArrayBuffer");function wn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ot(t.buffer),e}const Sn=ve("string"),N=ve("function"),Rt=ve("number"),Ee=t=>t!==null&&typeof t=="object",vn=t=>t===!0||t===!1,fe=t=>{if(Se(t)!=="object")return!1;const e=Le(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Tt in t)&&!(we in t)},En=P("Date"),An=P("File"),Tn=P("Blob"),On=P("FileList"),Rn=t=>Ee(t)&&N(t.pipe),Nn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||N(t.append)&&((e=Se(t))==="formdata"||e==="object"&&N(t.toString)&&t.toString()==="[object FormData]"))},kn=P("URLSearchParams"),[_n,xn,Pn,Cn]=["ReadableStream","Request","Response","Headers"].map(P),Dn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function te(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),X(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let a;for(n=0;n<s;n++)a=i[n],e.call(null,t[a],a,t)}}function Nt(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}const B=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,kt=t=>!ee(t)&&t!==B;function Fe(){const{caseless:t}=kt(this)&&this||{},e={},r=(n,o)=>{const i=t&&Nt(e,o)||o;fe(e[i])&&fe(n)?e[i]=Fe(e[i],n):fe(n)?e[i]=Fe({},n):X(n)?e[i]=n.slice():e[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&te(arguments[n],r);return e}const qn=(t,e,r,{allOwnKeys:n}={})=>(te(e,(o,i)=>{r&&N(o)?t[i]=At(o,r):t[i]=o},{allOwnKeys:n}),t),Fn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),jn=(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)},Mn=(t,e,r,n)=>{let o,i,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&Le(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Bn=(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},In=t=>{if(!t)return null;if(X(t))return t;let e=t.length;if(!Rt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Un=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Le(Uint8Array)),Ln=(t,e)=>{const n=(t&&t[we]).call(t);let o;for(;(o=n.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},$n=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Vn=P("HTMLFormElement"),Hn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),ze=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Wn=P("RegExp"),_t=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};te(r,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(n[i]=s||o)}),Object.defineProperties(t,n)},zn=t=>{_t(t,(e,r)=>{if(N(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(N(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+"'")})}})},Jn=(t,e)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return X(t)?n(t):n(String(t).split(e)),r},Qn=()=>{},Kn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Xn(t){return!!(t&&N(t.append)&&t[Tt]==="FormData"&&t[we])}const Gn=t=>{const e=new Array(10),r=(n,o)=>{if(Ee(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;const i=X(n)?[]:{};return te(n,(s,a)=>{const c=r(s,o+1);!ee(c)&&(i[a]=c)}),e[o]=void 0,i}}return n};return r(t,0)},Yn=P("AsyncFunction"),Zn=t=>t&&(Ee(t)||N(t))&&N(t.then)&&N(t.catch),xt=((t,e)=>t?setImmediate:e?((r,n)=>(B.addEventListener("message",({source:o,data:i})=>{o===B&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),B.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",N(B.postMessage)),er=typeof queueMicrotask<"u"?queueMicrotask.bind(B):typeof process<"u"&&process.nextTick||xt,tr=t=>t!=null&&N(t[we]),d={isArray:X,isArrayBuffer:Ot,isBuffer:bn,isFormData:Nn,isArrayBufferView:wn,isString:Sn,isNumber:Rt,isBoolean:vn,isObject:Ee,isPlainObject:fe,isReadableStream:_n,isRequest:xn,isResponse:Pn,isHeaders:Cn,isUndefined:ee,isDate:En,isFile:An,isBlob:Tn,isRegExp:Wn,isFunction:N,isStream:Rn,isURLSearchParams:kn,isTypedArray:Un,isFileList:On,forEach:te,merge:Fe,extend:qn,trim:Dn,stripBOM:Fn,inherits:jn,toFlatObject:Mn,kindOf:Se,kindOfTest:P,endsWith:Bn,toArray:In,forEachEntry:Ln,matchAll:$n,isHTMLForm:Vn,hasOwnProperty:ze,hasOwnProp:ze,reduceDescriptors:_t,freezeMethods:zn,toObjectSet:Jn,toCamelCase:Hn,noop:Qn,toFiniteNumber:Kn,findKey:Nt,global:B,isContextDefined:kt,isSpecCompliantForm:Xn,toJSONObject:Gn,isAsyncFn:Yn,isThenable:Zn,setImmediate:xt,asap:er,isIterable:tr};function b(t,e,r,n,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(b,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:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Pt=b.prototype,Ct={};["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=>{Ct[t]={value:t}});Object.defineProperties(b,Ct);Object.defineProperty(Pt,"isAxiosError",{value:!0});b.from=(t,e,r,n,o,i)=>{const s=Object.create(Pt);return d.toFlatObject(t,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),b.call(s,t.message,e,r,n,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const nr=null;function je(t){return d.isPlainObject(t)||d.isArray(t)}function Dt(t){return d.endsWith(t,"[]")?t.slice(0,-2):t}function Je(t,e,r){return t?t.concat(e).map(function(o,i){return o=Dt(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function rr(t){return d.isArray(t)&&!t.some(je)}const or=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function Ae(t,e,r){if(!d.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=d.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!d.isUndefined(h[y])});const n=r.metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new b("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,y,h){let w=p;if(p&&!h&&typeof p=="object"){if(d.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&rr(p)||(d.isFileList(p)||d.endsWith(y,"[]"))&&(w=d.toArray(p)))return y=Dt(y),w.forEach(function(A,D){!(d.isUndefined(A)||A===null)&&e.append(s===!0?Je([y],D,i):s===null?y:y+"[]",u(A))}),!1}return je(p)?!0:(e.append(Je(h,y,i),u(p)),!1)}const f=[],m=Object.assign(or,{defaultVisitor:l,convertValue:u,isVisitable:je});function g(p,y){if(!d.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(p),d.forEach(p,function(w,S){(!(d.isUndefined(w)||w===null)&&o.call(e,w,d.isString(S)?S.trim():S,y,m))===!0&&g(w,y?y.concat(S):[S])}),f.pop()}}if(!d.isObject(t))throw new TypeError("data must be an object");return g(t),e}function Qe(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function $e(t,e){this._pairs=[],t&&Ae(t,this,e)}const qt=$e.prototype;qt.append=function(e,r){this._pairs.push([e,r])};qt.toString=function(e){const r=e?function(n){return e.call(this,n,Qe)}:Qe;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function ir(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ft(t,e,r){if(!e)return t;const n=r&&r.encode||ir;d.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(e,r):i=d.isURLSearchParams(e)?e.toString():new $e(e,r).toString(n),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Ke{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){d.forEach(this.handlers,function(n){n!==null&&e(n)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sr=typeof URLSearchParams<"u"?URLSearchParams:$e,ar=typeof FormData<"u"?FormData:null,cr=typeof Blob<"u"?Blob:null,ur={isBrowser:!0,classes:{URLSearchParams:sr,FormData:ar,Blob:cr},protocols:["http","https","file","blob","url","data"]},Ve=typeof window<"u"&&typeof document<"u",Me=typeof navigator=="object"&&navigator||void 0,lr=Ve&&(!Me||["ReactNative","NativeScript","NS"].indexOf(Me.product)<0),dr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fr=Ve&&window.location.href||"http://localhost",pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ve,hasStandardBrowserEnv:lr,hasStandardBrowserWebWorkerEnv:dr,navigator:Me,origin:fr},Symbol.toStringTag,{value:"Module"})),O={...pr,...ur};function mr(t,e){return Ae(t,new O.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return O.isNode&&d.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function hr(t){return d.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function yr(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}function Mt(t){function e(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=r.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&d.isArray(o[s])&&(o[s]=yr(o[s])),!a)}if(d.isFormData(t)&&d.isFunction(t.entries)){const r={};return d.forEachEntry(t,(n,o)=>{e(hr(n),o,r,0)}),r}return null}function gr(t,e,r){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const ne={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=d.isObject(e);if(i&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return o?JSON.stringify(Mt(e)):e;if(d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)||d.isReadableStream(e))return e;if(d.isArrayBufferView(e))return e.buffer;if(d.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return mr(e,this.formSerializer).toString();if((a=d.isFileList(e))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ae(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),gr(e)):e}],transformResponse:[function(e){const r=this.transitional||ne.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?b.from(a,b.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:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],t=>{ne.headers[t]={}});const br=d.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"]),wr=t=>{const e={};let r,n,o;return t&&t.split(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./index-CzxpJe9c.js"),E=require("./index-jyV3VKB7.js"),K=require("react"),vt=require("@tanstack/react-query");function Zt(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 T=Zt(K),U=new he.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const r=e?U.getSettings().availablePositions[e]:U.getSettings().defaultPositions;return{badges:he.lodashExports.filter(t,o=>r?r.includes(o.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 en(t){const e=[];function r(o,i){const s=T.createContext(i),a=e.length;e.push(s);const c=l=>{const f=E.compilerRuntimeExports.c(8);let m,g,p;f[0]!==l?({scope:p,children:m,...g}=l,f[0]=l,f[1]=m,f[2]=g,f[3]=p):(m=f[1],g=f[2],p=f[3]);const y=p?.[t]?.[a]||s,h=g;let w;return f[4]!==y.Provider||f[5]!==m||f[6]!==h?(w=E.jsxRuntimeExports.jsx(y.Provider,{value:h,children:m}),f[4]=y.Provider,f[5]=m,f[6]=h,f[7]=w):w=f[7],w};c.displayName=o+"Provider";function u(l,f){const m=f?.[t]?.[a]||s,g=T.useContext(m);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${o}\``)}return[c,u]}function n(){const o=e.map(i=>T.createContext(i));return function(s){const a=s?.[t]||o;return T.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return n.scopeName=t,[r,n]}function tn(t,e){if(e==="web")return t;const{src:r,alt:n,width:o,height:i,...s}=t,a=[typeof o=="number"?{width:o}:void 0,typeof i=="number"?{height:i}:void 0].filter(Boolean);let c;return a.length===1?c=a[0]:a.length>1&&(c=a),{...s,source:{uri:r},...c?{style:c}:{}}}function nn(t){const{src:e,alt:r,...n}=t;return e?{...n,source:{uri:e}}:n}const rn={div:"View",span:"Text",p:"Text",h1:"Text",h2:"Text",h3:"Text",h4:"Text",h5:"Text",h6:"Text",button:"Pressable",input:"TextInput",form:"View",section:"View",article:"View",nav:"View",header:"View",footer:"View",main:"View",aside:"View",ul:"View",ol:"View",li:"View",a:"Pressable",img:"Image",label:"Text",textarea:"TextInput",select:"Pressable",option:"Text"};function on(t,e){if(e==="web")return t;let r=null;try{r=require("react-native")}catch{r=null}if(!r)return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`),"div";const n=rn[t];if(!n)return console.warn(`No native component mapping found for '${t}', falling back to View`),r.View;if(n==="Image"){const i=K.forwardRef((s,a)=>{const c=E.compilerRuntimeExports.c(5);if(!s.src)return null;let u;c[0]!==s?(u=nn(s),c[0]=s,c[1]=u):u=c[1];let l;return c[2]!==a||c[3]!==u?(l=E.jsxRuntimeExports.jsx(r.Image,{ref:a,...u}),c[2]=a,c[3]=u,c[4]=l):l=c[4],l});return i.displayName="PlatformPrimitiveImage",i}const o=r[n];return o||(console.warn(`Native component '${n}' not found, falling back to View`),r.View)}const sn=Symbol("radix.slottable");function an(...t){return e=>t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}function cn(t,e){const r={...e};for(const n in e){const o=t[n],i=e[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const c=i(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]=un(o,i):n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...t,...r}}function un(t,e){let r=null;try{r=require("react-native")}catch{r=null}const n=r?.StyleSheet?.flatten;if(typeof t=="function"&&typeof e=="function")return i=>{const s=[t(i),e(i)];return n?n(s):s};if(typeof t=="function")return i=>{const s=e?[t(i),e]:t(i);return n?n(s):s};if(typeof e=="function")return i=>{const s=t?[t,e(i)]:e(i);return n?n(s):s};const o=[t,e].filter(Boolean);return n?n(o):o}function ln(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===sn}function dn(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 fn(t,e){const r=T.forwardRef((n,o)=>{const{children:i,...s}=n;if(T.isValidElement(i)){const a=dn(i),c=cn(s,i.props);return i.type!==T.Fragment&&(c.ref=o?an(o,a):a),T.cloneElement(i,c)}return T.Children.count(i)>1?T.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}function be(t,e=!1,r="div"){if(!e)return on(r,t);const n=fn("Slot"),o=T.forwardRef((i,s)=>{const a=E.compilerRuntimeExports.c(15);let c,u;a[0]!==i?({children:c,...u}=i,a[0]=i,a[1]=c,a[2]=u):(c=a[1],u=a[2]);let l;if(a[3]!==c||a[4]!==s||a[5]!==u){l=Symbol.for("react.early_return_sentinel");e:{const m=T.Children.toArray(c),g=m.find(ln);if(g){const p=g.props.children,y=m.map(S=>S===g?T.Children.count(p)>1?T.Children.only(null):T.isValidElement(p)?p.props.children:null:S),h=T.isValidElement(p)?T.cloneElement(p,void 0,y):null;let w;a[7]!==s||a[8]!==u||a[9]!==h?(w=E.jsxRuntimeExports.jsx(n,{...u,ref:s,children:h}),a[7]=s,a[8]=u,a[9]=h,a[10]=w):w=a[10],l=w;break e}}a[3]=c,a[4]=s,a[5]=u,a[6]=l}else l=a[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;let f;return a[11]!==c||a[12]!==s||a[13]!==u?(f=E.jsxRuntimeExports.jsx(n,{...u,ref:s,children:c}),a[11]=c,a[12]=s,a[13]=u,a[14]=f):f=a[14],f});return o.displayName="Slot",o}const pn="debug",_=()=>{try{if(typeof window>"u"||typeof localStorage>"u")return!1;const t=localStorage.getItem(pn);return t==="true"||t==="1"}catch{return!1}},mn=()=>{const t=(e,r,n=[])=>r?typeof e=="string"?[`<${r}> ${e}`,...n]:[`<${r}>`,e,...n]:Array.isArray(e)?[...e,...n]:[e,...n];return{log:(e,r,...n)=>{_()&&console.log(...t(e,r,n))},info:(e,r,...n)=>{_()&&console.info(...t(e,r,n))},warn:(e,r,...n)=>{_()&&console.warn(...t(e,r,n))},error:(e,r,...n)=>{_()&&console.error(...t(e,r,n))},debug:(e,r,...n)=>{_()&&console.debug(...t(e,r,n))},group:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.group(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupCollapsed:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.groupCollapsed(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupEnd:()=>{_()&&console.groupEnd()},table:(e,r,n)=>{_()&&(r&&console.log(`<${r}>`),console.table(e,n))},time:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.time(r?n?`<${r}> ${n}`:`<${r}>`:n)}},timeEnd:(e,r)=>{if(_()){const n=typeof e=="string"?e:void 0;console.timeEnd(r?n?`<${r}> ${n}`:`<${r}>`:n)}}}},Et=mn();function hn(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}let Q;try{Q=require("@react-native-async-storage/async-storage").default}catch{Q=null}let qe=null;try{const{AsyncLocalStorage:t}=require("node:async_hooks");qe=new t}catch{qe=null}const V=typeof window<"u"&&typeof window.localStorage<"u",H=!!Q,se={},_e={getItem:async()=>null,setItem:async()=>{},removeItem:async()=>{}},xe=()=>{try{return qe?.getStore?.()??null}catch{return null}},F={getItem:async t=>{const e=!V&&!H?xe():null;return e?e.getItem(t):H?Q.getItem(t):V?new Promise(r=>{Promise.resolve().then(()=>{const n=window.localStorage.getItem(t),o=se[t];n!==o&&(se[t]=n||""),r(n)})}):_e.getItem(t)},setItem:async(t,e)=>{const r=!V&&!H?xe():null;return r?r.setItem(t,e):H?Q.setItem(t,e):V?new Promise((n,o)=>{Promise.resolve().then(()=>{try{window.localStorage.setItem(t,e);const i=window.localStorage.getItem(t);i===e?(se[t]=e,n()):o(new Error(`Failed to set localStorage item: expected "${e}", got "${i}"`))}catch(i){o(i)}})}):_e.setItem(t,e)},removeItem:async t=>{const e=!V&&!H?xe():null;return e?e.removeItem(t):H?Q.removeItem(t):V?new Promise((r,n)=>{Promise.resolve().then(()=>{try{window.localStorage.removeItem(t);const o=window.localStorage.getItem(t);o===null?(delete se[t],r()):n(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${o}"`))}catch(o){n(o)}})}):_e.removeItem(t)}},We=50,j={get:async()=>{try{const t=await F.getItem("eventHistory");return t?JSON.parse(t):[]}catch(t){return console.error("Error getting event history",t),[]}},set:async t=>{try{await F.setItem("eventHistory",JSON.stringify(t.slice(-We)))}catch(e){console.error("Error setting event history",e)}},clear:async()=>{try{await F.removeItem("eventHistory")}catch(t){console.error("Error clearing event history",t)}},push:async t=>{const e=await j.get();await j.set([{...t,timestamp:Date.now()},...e].slice(-We))},find:async t=>(await j.get()).find(r=>r.key===t.key&&r.identifier===t.identifier),filter:async(t,e)=>{const r=await j.get();return e?r.filter(e):r.filter(({key:n,identifier:o})=>(!n||t.key===n)&&(!o||t.identifier===o))}};function yn(){const t=globalThis;return t.__HAUS_EVENT_EMITTER__||=hn(),t.__HAUS_EVENT_EMITTER__}function $(t){const e=yn(),r=(...c)=>console.error(...c);j.get().then(c=>{const l=he.lodashExports.first(c)?.timestamp;l&&l<Date.now()-1e3*60*60&&(Et.info("Clearing event history since it is older than 1 hour:","eventBus",l),j.clear())});const n=(c,u,l)=>{const f=m=>{try{if(typeof m=="object"&&m!==null){const{identifier:g,data:p}=m;(!g||g===l)&&u(p)}else u(m)}catch(g){r(g)}};return e.on(c,f),()=>{o(c,u,l)}},o=(c,u,l)=>{const f=m=>{if(typeof m=="object"&&m!==null){const{identifier:g}=m;(!g||g===l)&&e.off(c,u)}};e.off(c,f)};return{on:n,off:o,once:(c,u,l)=>{const f=m=>{try{if(typeof m=="object"&&m!==null){const{identifier:g,data:p}=m;(!g||g===l)&&u(p)}else u(m)}finally{o(c,f,l)}};e.on(c,f)},emit:(c,u,...l)=>{const f={identifier:u,data:l.length===1?l[0]:l};j.push({key:c,identifier:u,payload:f.data}),e.emit(c,f)},getEventHistory:(c,u)=>j.filter({key:c,identifier:u})}}$();$();$();$();$();$();$();new vt.QueryClient;function At(t,e){return function(){return t.apply(e,arguments)}}const{toString:gn}=Object.prototype,{getPrototypeOf:Le}=Object,{iterator:we,toStringTag:Tt}=Symbol,Se=(t=>e=>{const r=gn.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),P=t=>(t=t.toLowerCase(),e=>Se(e)===t),ve=t=>e=>typeof e===t,{isArray:X}=Array,ee=ve("undefined");function bn(t){return t!==null&&!ee(t)&&t.constructor!==null&&!ee(t.constructor)&&N(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ot=P("ArrayBuffer");function wn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ot(t.buffer),e}const Sn=ve("string"),N=ve("function"),Rt=ve("number"),Ee=t=>t!==null&&typeof t=="object",vn=t=>t===!0||t===!1,fe=t=>{if(Se(t)!=="object")return!1;const e=Le(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Tt in t)&&!(we in t)},En=P("Date"),An=P("File"),Tn=P("Blob"),On=P("FileList"),Rn=t=>Ee(t)&&N(t.pipe),Nn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||N(t.append)&&((e=Se(t))==="formdata"||e==="object"&&N(t.toString)&&t.toString()==="[object FormData]"))},kn=P("URLSearchParams"),[_n,xn,Pn,Cn]=["ReadableStream","Request","Response","Headers"].map(P),Dn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function te(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),X(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let a;for(n=0;n<s;n++)a=i[n],e.call(null,t[a],a,t)}}function Nt(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,o;for(;n-- >0;)if(o=r[n],e===o.toLowerCase())return o;return null}const B=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,kt=t=>!ee(t)&&t!==B;function Fe(){const{caseless:t}=kt(this)&&this||{},e={},r=(n,o)=>{const i=t&&Nt(e,o)||o;fe(e[i])&&fe(n)?e[i]=Fe(e[i],n):fe(n)?e[i]=Fe({},n):X(n)?e[i]=n.slice():e[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&te(arguments[n],r);return e}const qn=(t,e,r,{allOwnKeys:n}={})=>(te(e,(o,i)=>{r&&N(o)?t[i]=At(o,r):t[i]=o},{allOwnKeys:n}),t),Fn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),jn=(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)},Mn=(t,e,r,n)=>{let o,i,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!n||n(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=r!==!1&&Le(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Bn=(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},In=t=>{if(!t)return null;if(X(t))return t;let e=t.length;if(!Rt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Un=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Le(Uint8Array)),Ln=(t,e)=>{const n=(t&&t[we]).call(t);let o;for(;(o=n.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},$n=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Vn=P("HTMLFormElement"),Hn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),ze=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Wn=P("RegExp"),_t=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};te(r,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(n[i]=s||o)}),Object.defineProperties(t,n)},zn=t=>{_t(t,(e,r)=>{if(N(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(N(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+"'")})}})},Jn=(t,e)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return X(t)?n(t):n(String(t).split(e)),r},Qn=()=>{},Kn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Xn(t){return!!(t&&N(t.append)&&t[Tt]==="FormData"&&t[we])}const Gn=t=>{const e=new Array(10),r=(n,o)=>{if(Ee(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[o]=n;const i=X(n)?[]:{};return te(n,(s,a)=>{const c=r(s,o+1);!ee(c)&&(i[a]=c)}),e[o]=void 0,i}}return n};return r(t,0)},Yn=P("AsyncFunction"),Zn=t=>t&&(Ee(t)||N(t))&&N(t.then)&&N(t.catch),xt=((t,e)=>t?setImmediate:e?((r,n)=>(B.addEventListener("message",({source:o,data:i})=>{o===B&&i===r&&n.length&&n.shift()()},!1),o=>{n.push(o),B.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",N(B.postMessage)),er=typeof queueMicrotask<"u"?queueMicrotask.bind(B):typeof process<"u"&&process.nextTick||xt,tr=t=>t!=null&&N(t[we]),d={isArray:X,isArrayBuffer:Ot,isBuffer:bn,isFormData:Nn,isArrayBufferView:wn,isString:Sn,isNumber:Rt,isBoolean:vn,isObject:Ee,isPlainObject:fe,isReadableStream:_n,isRequest:xn,isResponse:Pn,isHeaders:Cn,isUndefined:ee,isDate:En,isFile:An,isBlob:Tn,isRegExp:Wn,isFunction:N,isStream:Rn,isURLSearchParams:kn,isTypedArray:Un,isFileList:On,forEach:te,merge:Fe,extend:qn,trim:Dn,stripBOM:Fn,inherits:jn,toFlatObject:Mn,kindOf:Se,kindOfTest:P,endsWith:Bn,toArray:In,forEachEntry:Ln,matchAll:$n,isHTMLForm:Vn,hasOwnProperty:ze,hasOwnProp:ze,reduceDescriptors:_t,freezeMethods:zn,toObjectSet:Jn,toCamelCase:Hn,noop:Qn,toFiniteNumber:Kn,findKey:Nt,global:B,isContextDefined:kt,isSpecCompliantForm:Xn,toJSONObject:Gn,isAsyncFn:Yn,isThenable:Zn,setImmediate:xt,asap:er,isIterable:tr};function b(t,e,r,n,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(b,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:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Pt=b.prototype,Ct={};["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=>{Ct[t]={value:t}});Object.defineProperties(b,Ct);Object.defineProperty(Pt,"isAxiosError",{value:!0});b.from=(t,e,r,n,o,i)=>{const s=Object.create(Pt);return d.toFlatObject(t,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),b.call(s,t.message,e,r,n,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const nr=null;function je(t){return d.isPlainObject(t)||d.isArray(t)}function Dt(t){return d.endsWith(t,"[]")?t.slice(0,-2):t}function Je(t,e,r){return t?t.concat(e).map(function(o,i){return o=Dt(o),!r&&i?"["+o+"]":o}).join(r?".":""):e}function rr(t){return d.isArray(t)&&!t.some(je)}const or=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function Ae(t,e,r){if(!d.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=d.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!d.isUndefined(h[y])});const n=r.metaTokens,o=r.visitor||l,i=r.dots,s=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!c&&d.isBlob(p))throw new b("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,y,h){let w=p;if(p&&!h&&typeof p=="object"){if(d.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&rr(p)||(d.isFileList(p)||d.endsWith(y,"[]"))&&(w=d.toArray(p)))return y=Dt(y),w.forEach(function(A,D){!(d.isUndefined(A)||A===null)&&e.append(s===!0?Je([y],D,i):s===null?y:y+"[]",u(A))}),!1}return je(p)?!0:(e.append(Je(h,y,i),u(p)),!1)}const f=[],m=Object.assign(or,{defaultVisitor:l,convertValue:u,isVisitable:je});function g(p,y){if(!d.isUndefined(p)){if(f.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(p),d.forEach(p,function(w,S){(!(d.isUndefined(w)||w===null)&&o.call(e,w,d.isString(S)?S.trim():S,y,m))===!0&&g(w,y?y.concat(S):[S])}),f.pop()}}if(!d.isObject(t))throw new TypeError("data must be an object");return g(t),e}function Qe(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function $e(t,e){this._pairs=[],t&&Ae(t,this,e)}const qt=$e.prototype;qt.append=function(e,r){this._pairs.push([e,r])};qt.toString=function(e){const r=e?function(n){return e.call(this,n,Qe)}:Qe;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function ir(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ft(t,e,r){if(!e)return t;const n=r&&r.encode||ir;d.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(e,r):i=d.isURLSearchParams(e)?e.toString():new $e(e,r).toString(n),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Ke{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){d.forEach(this.handlers,function(n){n!==null&&e(n)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sr=typeof URLSearchParams<"u"?URLSearchParams:$e,ar=typeof FormData<"u"?FormData:null,cr=typeof Blob<"u"?Blob:null,ur={isBrowser:!0,classes:{URLSearchParams:sr,FormData:ar,Blob:cr},protocols:["http","https","file","blob","url","data"]},Ve=typeof window<"u"&&typeof document<"u",Me=typeof navigator=="object"&&navigator||void 0,lr=Ve&&(!Me||["ReactNative","NativeScript","NS"].indexOf(Me.product)<0),dr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fr=Ve&&window.location.href||"http://localhost",pr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ve,hasStandardBrowserEnv:lr,hasStandardBrowserWebWorkerEnv:dr,navigator:Me,origin:fr},Symbol.toStringTag,{value:"Module"})),O={...pr,...ur};function mr(t,e){return Ae(t,new O.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return O.isNode&&d.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function hr(t){return d.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function yr(t){const e={},r=Object.keys(t);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],e[i]=t[i];return e}function Mt(t){function e(r,n,o,i){let s=r[i++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=i>=r.length;return s=!s&&d.isArray(o)?o.length:s,c?(d.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!a):((!o[s]||!d.isObject(o[s]))&&(o[s]=[]),e(r,n,o[s],i)&&d.isArray(o[s])&&(o[s]=yr(o[s])),!a)}if(d.isFormData(t)&&d.isFunction(t.entries)){const r={};return d.forEachEntry(t,(n,o)=>{e(hr(n),o,r,0)}),r}return null}function gr(t,e,r){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const ne={transitional:jt,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=d.isObject(e);if(i&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return o?JSON.stringify(Mt(e)):e;if(d.isArrayBuffer(e)||d.isBuffer(e)||d.isStream(e)||d.isFile(e)||d.isBlob(e)||d.isReadableStream(e))return e;if(d.isArrayBufferView(e))return e.buffer;if(d.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return mr(e,this.formSerializer).toString();if((a=d.isFileList(e))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ae(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),gr(e)):e}],transformResponse:[function(e){const r=this.transitional||ne.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(n&&!this.responseType||o)){const s=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?b.from(a,b.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:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],t=>{ne.headers[t]={}});const br=d.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"]),wr=t=>{const e={};let r,n,o;return t&&t.split(`
|
|
2
2
|
`).forEach(function(s){o=s.indexOf(":"),r=s.substring(0,o).trim().toLowerCase(),n=s.substring(o+1).trim(),!(!r||e[r]&&br[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Xe=Symbol("internals");function Y(t){return t&&String(t).trim().toLowerCase()}function pe(t){return t===!1||t==null?t:d.isArray(t)?t.map(pe):String(t)}function Sr(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 vr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Pe(t,e,r,n,o){if(d.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!d.isString(e)){if(d.isString(n))return e.indexOf(n)!==-1;if(d.isRegExp(n))return n.test(e)}}function Er(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Ar(t,e){const r=d.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(o,i,s){return this[n].call(this,e,o,i,s)},configurable:!0})})}let k=class{constructor(e){e&&this.set(e)}set(e,r,n){const o=this;function i(a,c,u){const l=Y(c);if(!l)throw new Error("header name must be a non-empty string");const f=d.findKey(o,l);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||c]=pe(a))}const s=(a,c)=>d.forEach(a,(u,l)=>i(u,l,c));if(d.isPlainObject(e)||e instanceof this.constructor)s(e,r);else if(d.isString(e)&&(e=e.trim())&&!vr(e))s(wr(e),r);else if(d.isObject(e)&&d.isIterable(e)){let a={},c,u;for(const l of e){if(!d.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(c=a[u])?d.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}s(a,r)}else e!=null&&i(r,e,n);return this}get(e,r){if(e=Y(e),e){const n=d.findKey(this,e);if(n){const o=this[n];if(!r)return o;if(r===!0)return Sr(o);if(d.isFunction(r))return r.call(this,o,n);if(d.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Y(e),e){const n=d.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Pe(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let o=!1;function i(s){if(s=Y(s),s){const a=d.findKey(n,s);a&&(!r||Pe(n,n[a],a,r))&&(delete n[a],o=!0)}}return d.isArray(e)?e.forEach(i):i(e),o}clear(e){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!e||Pe(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const r=this,n={};return d.forEach(this,(o,i)=>{const s=d.findKey(n,i);if(s){r[s]=pe(o),delete r[i];return}const a=e?Er(i):String(i).trim();a!==i&&delete r[i],r[a]=pe(o),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return d.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&d.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
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(o=>n.set(o)),n}static accessor(e){const n=(this[Xe]=this[Xe]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Y(s);n[a]||(Ar(o,s),n[a]=!0)}return d.isArray(e)?e.forEach(i):i(e),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(k.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});d.freezeMethods(k);function Ce(t,e){const r=this||ne,n=e||r,o=k.from(n.headers);let i=n.data;return d.forEach(t,function(a){i=a.call(r,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function Bt(t){return!!(t&&t.__CANCEL__)}function G(t,e,r){b.call(this,t??"canceled",b.ERR_CANCELED,e,r),this.name="CanceledError"}d.inherits(G,b,{__CANCEL__:!0});function It(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new b("Request failed with status code "+r.status,[b.ERR_BAD_REQUEST,b.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Tr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Or(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),l=n[i];s||(s=u),r[o]=c,n[o]=u;let f=i,m=0;for(;f!==o;)m+=r[f++],f=f%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),u-s<e)return;const g=l&&u-l;return g?Math.round(m*1e3/g):void 0}}function Rr(t,e){let r=0,n=1e3/e,o,i;const s=(u,l=Date.now())=>{r=l,o=null,i&&(clearTimeout(i),i=null),t.apply(null,u)};return[(...u)=>{const l=Date.now(),f=l-r;f>=n?s(u,l):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},n-f)))},()=>o&&s(o)]}const ye=(t,e,r=3)=>{let n=0;const o=Or(50,250);return Rr(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,c=s-n,u=o(c),l=s<=a;n=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},r)},Ge=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ye=t=>(...e)=>d.asap(()=>t(...e)),Nr=O.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,O.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,kr=O.hasStandardBrowserEnv?{write(t,e,r,n,o,i){const s=[t+"="+encodeURIComponent(e)];d.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),d.isString(n)&&s.push("path="+n),d.isString(o)&&s.push("domain="+o),i===!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 _r(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function xr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ut(t,e,r){let n=!_r(e);return t&&(n||r==!1)?xr(t,e):e}const Ze=t=>t instanceof k?{...t}:t;function L(t,e){e=e||{};const r={};function n(u,l,f,m){return d.isPlainObject(u)&&d.isPlainObject(l)?d.merge.call({caseless:m},u,l):d.isPlainObject(l)?d.merge({},l):d.isArray(l)?l.slice():l}function o(u,l,f,m){if(d.isUndefined(l)){if(!d.isUndefined(u))return n(void 0,u,f,m)}else return n(u,l,f,m)}function i(u,l){if(!d.isUndefined(l))return n(void 0,l)}function s(u,l){if(d.isUndefined(l)){if(!d.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function a(u,l,f){if(f in e)return n(u,l);if(f in t)return n(void 0,u)}const c={url:i,method:i,data:i,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:(u,l,f)=>o(Ze(u),Ze(l),f,!0)};return d.forEach(Object.keys(Object.assign({},t,e)),function(l){const f=c[l]||o,m=f(t[l],e[l],l);d.isUndefined(m)&&f!==a||(r[l]=m)}),r}const Lt=t=>{const e=L({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=e;e.headers=s=k.from(s),e.url=Ft(Ut(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 c;if(d.isFormData(r)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){const[u,...l]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...l].join("; "))}}if(O.hasStandardBrowserEnv&&(n&&d.isFunction(n)&&(n=n(e)),n||n!==!1&&Nr(e.url))){const u=o&&i&&kr.read(i);u&&s.set(o,u)}return e},Pr=typeof XMLHttpRequest<"u",Cr=Pr&&function(t){return new Promise(function(r,n){const o=Lt(t);let i=o.data;const s=k.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,l,f,m,g,p;function y(){g&&g(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function w(){if(!h)return;const A=k.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:A,config:t,request:h};It(function(M){r(M),y()},function(M){n(M),y()},R),h=null}"onloadend"in h?h.onloadend=w:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(w)},h.onabort=function(){h&&(n(new b("Request aborted",b.ECONNABORTED,t,h)),h=null)},h.onerror=function(){n(new b("Network Error",b.ERR_NETWORK,t,h)),h=null},h.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||jt;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),n(new b(D,R.clarifyTimeoutError?b.ETIMEDOUT:b.ECONNABORTED,t,h)),h=null},i===void 0&&s.setContentType(null),"setRequestHeader"in h&&d.forEach(s.toJSON(),function(D,R){h.setRequestHeader(R,D)}),d.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),a&&a!=="json"&&(h.responseType=o.responseType),u&&([m,p]=ye(u,!0),h.addEventListener("progress",m)),c&&h.upload&&([f,g]=ye(c),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(l=A=>{h&&(n(!A||A.type?new G(null,t,h):A),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const S=Tr(o.url);if(S&&O.protocols.indexOf(S)===-1){n(new b("Unsupported protocol "+S+":",b.ERR_BAD_REQUEST,t));return}h.send(i||null)})},Dr=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,o;const i=function(u){if(!o){o=!0,a();const l=u instanceof Error?u:this.reason;n.abort(l instanceof b?l:new G(l instanceof Error?l.message:l))}};let s=e&&setTimeout(()=>{s=null,i(new b(`timeout ${e} of ms exceeded`,b.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),t=null)};t.forEach(u=>u.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=()=>d.asap(a),c}},qr=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,o;for(;n<r;)o=n+e,yield t.slice(n,o),n=o},Fr=async function*(t,e){for await(const r of jr(t))yield*qr(r,e)},jr=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()}},et=(t,e,r,n)=>{const o=Fr(t,e);let i=0,s,a=c=>{s||(s=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await o.next();if(u){a(),c.close();return}let f=l.byteLength;if(r){let m=i+=f;r(m)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},Te=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",$t=Te&&typeof ReadableStream=="function",Mr=Te&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Vt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Br=$t&&Vt(()=>{let t=!1;const e=new Request(O.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),tt=64*1024,Be=$t&&Vt(()=>d.isReadableStream(new Response("").body)),ge={stream:Be&&(t=>t.body)};Te&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ge[e]&&(ge[e]=d.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new b(`Response type '${e}' is not supported`,b.ERR_NOT_SUPPORT,n)})})})(new Response);const Ir=async t=>{if(t==null)return 0;if(d.isBlob(t))return t.size;if(d.isSpecCompliantForm(t))return(await new Request(O.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(d.isArrayBufferView(t)||d.isArrayBuffer(t))return t.byteLength;if(d.isURLSearchParams(t)&&(t=t+""),d.isString(t))return(await Mr(t)).byteLength},Ur=async(t,e)=>{const r=d.toFiniteNumber(t.getContentLength());return r??Ir(e)},Lr=Te&&(async t=>{let{url:e,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:m}=Lt(t);u=u?(u+"").toLowerCase():"text";let g=Dr([o,i&&i.toAbortSignal()],s),p;const y=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let h;try{if(c&&Br&&r!=="get"&&r!=="head"&&(h=await Ur(l,n))!==0){let R=new Request(e,{method:"POST",body:n,duplex:"half"}),q;if(d.isFormData(n)&&(q=R.headers.get("content-type"))&&l.setContentType(q),R.body){const[M,ie]=Ge(h,ye(Ye(c)));n=et(R.body,tt,M,ie)}}d.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;p=new Request(e,{...m,signal:g,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:w?f:void 0});let S=await fetch(p,m);const A=Be&&(u==="stream"||u==="response");if(Be&&(a||A&&y)){const R={};["status","statusText","headers"].forEach(He=>{R[He]=S[He]});const q=d.toFiniteNumber(S.headers.get("content-length")),[M,ie]=a&&Ge(q,ye(Ye(a),!0))||[];S=new Response(et(S.body,tt,M,()=>{ie&&ie(),y&&y()}),R)}u=u||"text";let D=await ge[d.findKey(ge,u)||"text"](S,t);return!A&&y&&y(),await new Promise((R,q)=>{It(R,q,{data:D,headers:k.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:p})})}catch(w){throw y&&y(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new b("Network Error",b.ERR_NETWORK,t,p),{cause:w.cause||w}):b.from(w,w&&w.code,t,p)}}),Ie={http:nr,xhr:Cr,fetch:Lr};d.forEach(Ie,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const nt=t=>`- ${t}`,$r=t=>d.isFunction(t)||t===null||t===!1,Ht={getAdapter:t=>{t=d.isArray(t)?t:[t];const{length:e}=t;let r,n;const o={};for(let i=0;i<e;i++){r=t[i];let s;if(n=r,!$r(r)&&(n=Ie[(s=String(r)).toLowerCase()],n===void 0))throw new b(`Unknown adapter '${s}'`);if(n)break;o[s||"#"+i]=n}if(!n){const i=Object.entries(o).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=e?i.length>1?`since :
|
|
4
4
|
`+i.map(nt).join(`
|
|
5
5
|
`):" "+nt(i[0]):"as no adapter specified";throw new b("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Ie};function De(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new G(null,t)}function rt(t){return De(t),t.headers=k.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),Ht.getAdapter(t.adapter||ne.adapter)(t).then(function(n){return De(t),n.data=Ce.call(t,t.transformResponse,n),n.headers=k.from(n.headers),n},function(n){return Bt(n)||(De(t),n&&n.response&&(n.response.data=Ce.call(t,t.transformResponse,n.response),n.response.headers=k.from(n.response.headers))),Promise.reject(n)})}const Wt="1.10.0",Oe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Oe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const ot={};Oe.transitional=function(e,r,n){function o(i,s){return"[Axios v"+Wt+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,a)=>{if(e===!1)throw new b(o(s," has been removed"+(r?" in "+r:"")),b.ERR_DEPRECATED);return r&&!ot[s]&&(ot[s]=!0,console.warn(o(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,s,a):!0}};Oe.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Vr(t,e,r){if(typeof t!="object")throw new b("options must be an object",b.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let o=n.length;for(;o-- >0;){const i=n[o],s=e[i];if(s){const a=t[i],c=a===void 0||s(a,i,t);if(c!==!0)throw new b("option "+i+" must be "+c,b.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new b("Unknown option "+i,b.ERR_BAD_OPTION)}}const me={assertOptions:Vr,validators:Oe},C=me.validators;let I=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ke,response:new Ke}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
6
|
-
`+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=L(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&me.assertOptions(n,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1),o!=null&&(d.isFunction(o)?r.paramsSerializer={serialize:o}:me.assertOptions(o,{encode:C.function,serialize:C.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),me.assertOptions(r,{baseUrl:C.spelling("baseURL"),withXsrfToken:C.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[r.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=k.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(c=c&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let l,f=0,m;if(!c){const p=[rt.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),m=p.length,l=Promise.resolve(r);f<m;)l=l.then(p[f++],p[f++]);return l}m=a.length;let g=r;for(f=0;f<m;){const p=a[f++],y=a[f++];try{g=p(g)}catch(h){y.call(this,h);break}}try{l=rt.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,m=u.length;f<m;)l=l.then(u[f++],u[f++]);return l}getUri(e){e=L(this.defaults,e);const r=Ut(e.baseURL,e.url,e.allowAbsoluteUrls);return Ft(r,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){I.prototype[e]=function(r,n){return this.request(L(n||{},{method:e,url:r,data:(n||{}).data}))}});d.forEach(["post","put","patch"],function(e){function r(n){return function(i,s,a){return this.request(L(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}I.prototype[e]=r(),I.prototype[e+"Form"]=r(!0)});let Hr=class zt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},e(function(i,s,a){n.reason||(n.reason=new G(i,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 zt(function(o){e=o}),cancel:e}}};function Wr(t){return function(r){return t.apply(null,r)}}function zr(t){return d.isObject(t)&&t.isAxiosError===!0}const Ue={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(Ue).forEach(([t,e])=>{Ue[e]=t});function Jt(t){const e=new I(t),r=At(I.prototype.request,e);return d.extend(r,I.prototype,e,{allOwnKeys:!0}),d.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return Jt(L(t,o))},r}const v=Jt(ne);v.Axios=I;v.CanceledError=G;v.CancelToken=Hr;v.isCancel=Bt;v.VERSION=Wt;v.toFormData=Ae;v.AxiosError=b;v.Cancel=v.CanceledError;v.all=function(e){return Promise.all(e)};v.spread=Wr;v.isAxiosError=zr;v.mergeConfig=L;v.AxiosHeaders=k;v.formToJSON=t=>Mt(d.isHTMLForm(t)?new FormData(t):t);v.getAdapter=Ht.getAdapter;v.HttpStatusCode=Ue;v.default=v;const{Axios:Ro,AxiosError:it,CanceledError:No,isCancel:ko,CancelToken:_o,VERSION:xo,all:Po,Cancel:Co,isAxiosError:Do,spread:qo,toFormData:Fo,AxiosHeaders:jo,HttpStatusCode:Mo,formToJSON:Bo,getAdapter:Io,mergeConfig:Uo}=v,Jr=t=>he.lodashExports.some(t,e=>e&&e.errorCode!==void 0)||t?.errorCode!==void 0;function st(){return new vt.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})}function at(){return Qt?(globalThis.__STORE_QUERY_CLIENT__||(globalThis.__STORE_QUERY_CLIENT__=st()),globalThis.__STORE_QUERY_CLIENT__):st()}const Qt=typeof window<"u";let Qr;const ct="auth_token",Kr="lang",Xr="currencyCode";let Gr=async(t,e)=>{await e(t)};function Yr(t){return t.interceptors.request.use(async e=>(await Gr(e,async n=>{const o=await F.getItem(ct),i=await F.getItem("channelToken"),s=await F.getItem(Xr),a=await F.getItem(Kr);o&&(n.headers.Authorization=`Bearer ${o}`),i&&(n.headers["vendure-token"]=i),n.params=n.params||{},s&&(n.params.currencyCode=s),a&&(n.params.languageCode=a)}),e)),t.interceptors.response.use(async e=>(await Zr(e,async n=>{const o=n.headers["vendure-auth-token"];if(o&&F.setItem(ct,o),Jr(n.data.data)){const i=Object.values(n.data.data)[0],s=new it(i.errorCode);return s.response=n,s.request=n.request,s.config=n.config,Promise.reject(s)}if(n.data.errors?.length>0){const i=n.data.errors[0],s=new it(i.message);return s.response=n,s.request=n.request,s.config=n.config,Promise.reject(s)}}),e),e=>(Et.error("Axios error","vendure/axiosClient",e),Promise.reject(e))),t}function ut(t){const e=v.create({baseURL:Qr,withCredentials:!0,headers:{"vendure-token":""}});return Yr(e)}function lt(){return Qt?(globalThis.__STORE_API_CLIENT__||(globalThis.__STORE_API_CLIENT__=ut()),globalThis.__STORE_API_CLIENT__):ut()}let Zr=async(t,e)=>{await e(t)};new Proxy({},{get:(t,e)=>{const r=lt(),n=Reflect.get(r,e);return typeof n=="function"?n.bind(r):n},set:(t,e,r)=>Reflect.set(lt(),e,r)});new Proxy({},{get:(t,e)=>{const r=at(),n=Reflect.get(r,e);return typeof n=="function"?n.bind(r):n},set:(t,e,r)=>Reflect.set(at(),e,r)});const eo=globalThis.__STORE_SDK_CONTEXT__||=K.createContext(void 0),to=()=>{const e=K.useContext(eo)?.sdk;return e||console.error("You must wrap your component in a <DataProvider>"),e?.sdkType==="dummy"||e?.sdkType==="vendure",e};new Event("searchParamsUpdate");var x={},ae={},ce={},ue={},dt;function re(){if(dt)return ue;dt=1,Object.defineProperty(ue,"__esModule",{value:!0});var t;return function(e){e.Mutation="mutation",e.Query="query",e.Subscription="subscription"}(t||(t={})),ue.default=t,ue}var W={},Z={},ft;function no(){if(ft)return Z;ft=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.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 Z.isNestedField=t,Z}var pt;function oe(){if(pt)return W;pt=1;var t=W&&W.__assign||function(){return t=Object.assign||function(n){for(var o,i=1,s=arguments.length;i<s;i++){o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},t.apply(this,arguments)};Object.defineProperty(W,"__esModule",{value:!0});var e=no(),r=function(){function n(){}return n.resolveVariables=function(o){for(var i={},s=0,a=o;s<a.length;s++){var c=a[s],u=c.variables,l=c.fields;i=t(t(t({},i),u),l&&n.getNestedVariables(l)||{})}return i},n.queryDataNameAndArgumentMap=function(o){return o&&Object.keys(o).length?"(".concat(Object.entries(o).reduce(function(i,s,a){var c=s[0],u=s[1];return"".concat(i).concat(a!==0?", ":"").concat(u&&u.name?u.name:c,": $").concat(c)},""),")"):""},n.queryFieldsMap=function(o){var i=this;return o?o.map(function(s){if((0,e.isNestedField)(s))return n.queryNestedFieldMap(s);if(typeof s=="object"){var a="";return Object.entries(s).forEach(function(c,u,l){var f=c[0],m=c[1];a+="".concat(f," ").concat(m.length>0?"{ "+i.queryFieldsMap(m)+" }":""),u<l.length-1&&(a+=", ")}),a}else return"".concat(s)}).join(", "):""},n.operationOrAlias=function(o){return typeof o=="string"?o:"".concat(o.alias,": ").concat(o.name)},n.isFragment=function(o){var i;return(i=o?.fragment===!0)!==null&&i!==void 0?i:!1},n.operationOrFragment=function(o){return n.isFragment(o)?o.operation:n.operationOrAlias(o.operation)},n.getFragment=function(o){return n.isFragment(o)?"... on ":""},n.queryNestedFieldMap=function(o){return"".concat(n.getFragment(o)).concat(n.operationOrFragment(o)," ").concat(this.isFragment(o)?"":this.queryDataNameAndArgumentMap(o.variables)," ").concat(o.fields.length>0?"{ "+this.queryFieldsMap(o.fields)+" }":"")},n.queryVariablesMap=function(o,i){var s={},a=function(c){c&&Object.keys(c).map(function(u){s[u]=typeof c[u]=="object"?c[u].value:c[u]})};return a(o),i&&typeof i=="object"&&a(n.getNestedVariables(i)),s},n.getNestedVariables=function(o){var i={};function s(a){return a?.forEach(function(c){if((0,e.isNestedField)(c))i=t(t(t({},c.variables),i),c.fields&&s(c.fields));else if(typeof c=="object")for(var u=0,l=Object.entries(c);u<l.length;u++){var f=l[u],m=f[1];s(m)}}),i}return s(o),i},n.queryDataType=function(o){var i="String",s=typeof o=="object"?o.value:o;if(o?.type!=null)i=o.type;else{var a=Array.isArray(s)?s[0]:s;switch(typeof a){case"object":i="Object";break;case"boolean":i="Boolean";break;case"number":i=a%1===0?"Int":"Float";break}}return typeof o=="object"&&(o.list===!0?i="[".concat(i,"]"):Array.isArray(o.list)&&(i="[".concat(i).concat(o.list[0]?"!":"","]")),o.required&&(i+="!")),i},n}();return W.default=r,W}var mt;function ro(){if(mt)return ce;mt=1,Object.defineProperty(ce,"__esModule",{value:!0});var t=re(),e=oe(),r=function(){function n(o){Array.isArray(o)?this.variables=e.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields,this.operation=o.operation)}return n.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},n.prototype.mutationsBuilder=function(o){var i=this,s=o.map(function(a){return i.operation=a.operation,i.variables=a.variables,i.fields=a.fields,i.operationTemplate(a.operation)});return this.operationWrapperTemplate(e.default.resolveVariables(o),s.join(`
|
|
6
|
+
`+i):n.stack=i}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=L(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&me.assertOptions(n,{silentJSONParsing:C.transitional(C.boolean),forcedJSONParsing:C.transitional(C.boolean),clarifyTimeoutError:C.transitional(C.boolean)},!1),o!=null&&(d.isFunction(o)?r.paramsSerializer={serialize:o}:me.assertOptions(o,{encode:C.function,serialize:C.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),me.assertOptions(r,{baseUrl:C.spelling("baseURL"),withXsrfToken:C.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=i&&d.merge(i.common,i[r.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),r.headers=k.concat(s,i);const a=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(c=c&&y.synchronous,a.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let l,f=0,m;if(!c){const p=[rt.bind(this),void 0];for(p.unshift.apply(p,a),p.push.apply(p,u),m=p.length,l=Promise.resolve(r);f<m;)l=l.then(p[f++],p[f++]);return l}m=a.length;let g=r;for(f=0;f<m;){const p=a[f++],y=a[f++];try{g=p(g)}catch(h){y.call(this,h);break}}try{l=rt.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,m=u.length;f<m;)l=l.then(u[f++],u[f++]);return l}getUri(e){e=L(this.defaults,e);const r=Ut(e.baseURL,e.url,e.allowAbsoluteUrls);return Ft(r,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){I.prototype[e]=function(r,n){return this.request(L(n||{},{method:e,url:r,data:(n||{}).data}))}});d.forEach(["post","put","patch"],function(e){function r(n){return function(i,s,a){return this.request(L(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}I.prototype[e]=r(),I.prototype[e+"Form"]=r(!0)});let Hr=class zt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{n.subscribe(a),i=a}).then(o);return s.cancel=function(){n.unsubscribe(i)},s},e(function(i,s,a){n.reason||(n.reason=new G(i,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 zt(function(o){e=o}),cancel:e}}};function Wr(t){return function(r){return t.apply(null,r)}}function zr(t){return d.isObject(t)&&t.isAxiosError===!0}const Ue={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(Ue).forEach(([t,e])=>{Ue[e]=t});function Jt(t){const e=new I(t),r=At(I.prototype.request,e);return d.extend(r,I.prototype,e,{allOwnKeys:!0}),d.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return Jt(L(t,o))},r}const v=Jt(ne);v.Axios=I;v.CanceledError=G;v.CancelToken=Hr;v.isCancel=Bt;v.VERSION=Wt;v.toFormData=Ae;v.AxiosError=b;v.Cancel=v.CanceledError;v.all=function(e){return Promise.all(e)};v.spread=Wr;v.isAxiosError=zr;v.mergeConfig=L;v.AxiosHeaders=k;v.formToJSON=t=>Mt(d.isHTMLForm(t)?new FormData(t):t);v.getAdapter=Ht.getAdapter;v.HttpStatusCode=Ue;v.default=v;const{Axios:Ro,AxiosError:it,CanceledError:No,isCancel:ko,CancelToken:_o,VERSION:xo,all:Po,Cancel:Co,isAxiosError:Do,spread:qo,toFormData:Fo,AxiosHeaders:jo,HttpStatusCode:Mo,formToJSON:Bo,getAdapter:Io,mergeConfig:Uo}=v,Jr=t=>he.lodashExports.some(t,e=>e&&e.errorCode!==void 0)||t?.errorCode!==void 0;function st(){return new vt.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})}function at(t){return Qt?(globalThis.__STORE_QUERY_CLIENT__||(globalThis.__STORE_QUERY_CLIENT__=st()),globalThis.__STORE_QUERY_CLIENT__):st()}const Qt=typeof window<"u";let Qr;const ct="auth_token",Kr="lang",Xr="currencyCode";let Gr=async(t,e)=>{await e(t)};function Yr(t){return t.interceptors.request.use(async e=>(await Gr(e,async n=>{const o=await F.getItem(ct),i=await F.getItem("channelToken"),s=await F.getItem(Xr),a=await F.getItem(Kr);o&&(n.headers.Authorization=`Bearer ${o}`),i&&(n.headers["vendure-token"]=i),n.params=n.params||{},s&&(n.params.currencyCode=s),a&&(n.params.languageCode=a)}),e)),t.interceptors.response.use(async e=>(await Zr(e,async n=>{const o=n.headers["vendure-auth-token"];if(o&&F.setItem(ct,o),Jr(n.data.data)){const i=Object.values(n.data.data)[0],s=new it(i.errorCode);return s.response=n,s.request=n.request,s.config=n.config,Promise.reject(s)}if(n.data.errors?.length>0){const i=n.data.errors[0],s=new it(i.message);return s.response=n,s.request=n.request,s.config=n.config,Promise.reject(s)}}),e),e=>(Et.error("Axios error","vendure/axiosClient",e),Promise.reject(e))),t}function ut(t){const e=v.create({baseURL:Qr,withCredentials:!0,headers:{"vendure-token":""}});return Yr(e)}function lt(){return Qt?(globalThis.__STORE_API_CLIENT__||(globalThis.__STORE_API_CLIENT__=ut()),globalThis.__STORE_API_CLIENT__):ut()}let Zr=async(t,e)=>{await e(t)};new Proxy({},{get:(t,e)=>{const r=lt(),n=Reflect.get(r,e);return typeof n=="function"?n.bind(r):n},set:(t,e,r)=>Reflect.set(lt(),e,r)});new Proxy({},{get:(t,e)=>{const r=at(),n=Reflect.get(r,e);return typeof n=="function"?n.bind(r):n},set:(t,e,r)=>Reflect.set(at(),e,r)});const eo=globalThis.__STORE_SDK_CONTEXT__||=K.createContext(void 0),to=()=>{const e=K.useContext(eo)?.sdk;return e||console.error("You must wrap your component in a <DataProvider>"),e?.sdkType==="dummy"||e?.sdkType==="vendure",e};new Event("searchParamsUpdate");var x={},ae={},ce={},ue={},dt;function re(){if(dt)return ue;dt=1,Object.defineProperty(ue,"__esModule",{value:!0});var t;return function(e){e.Mutation="mutation",e.Query="query",e.Subscription="subscription"}(t||(t={})),ue.default=t,ue}var W={},Z={},ft;function no(){if(ft)return Z;ft=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.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 Z.isNestedField=t,Z}var pt;function oe(){if(pt)return W;pt=1;var t=W&&W.__assign||function(){return t=Object.assign||function(n){for(var o,i=1,s=arguments.length;i<s;i++){o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},t.apply(this,arguments)};Object.defineProperty(W,"__esModule",{value:!0});var e=no(),r=function(){function n(){}return n.resolveVariables=function(o){for(var i={},s=0,a=o;s<a.length;s++){var c=a[s],u=c.variables,l=c.fields;i=t(t(t({},i),u),l&&n.getNestedVariables(l)||{})}return i},n.queryDataNameAndArgumentMap=function(o){return o&&Object.keys(o).length?"(".concat(Object.entries(o).reduce(function(i,s,a){var c=s[0],u=s[1];return"".concat(i).concat(a!==0?", ":"").concat(u&&u.name?u.name:c,": $").concat(c)},""),")"):""},n.queryFieldsMap=function(o){var i=this;return o?o.map(function(s){if((0,e.isNestedField)(s))return n.queryNestedFieldMap(s);if(typeof s=="object"){var a="";return Object.entries(s).forEach(function(c,u,l){var f=c[0],m=c[1];a+="".concat(f," ").concat(m.length>0?"{ "+i.queryFieldsMap(m)+" }":""),u<l.length-1&&(a+=", ")}),a}else return"".concat(s)}).join(", "):""},n.operationOrAlias=function(o){return typeof o=="string"?o:"".concat(o.alias,": ").concat(o.name)},n.isFragment=function(o){var i;return(i=o?.fragment===!0)!==null&&i!==void 0?i:!1},n.operationOrFragment=function(o){return n.isFragment(o)?o.operation:n.operationOrAlias(o.operation)},n.getFragment=function(o){return n.isFragment(o)?"... on ":""},n.queryNestedFieldMap=function(o){return"".concat(n.getFragment(o)).concat(n.operationOrFragment(o)," ").concat(this.isFragment(o)?"":this.queryDataNameAndArgumentMap(o.variables)," ").concat(o.fields.length>0?"{ "+this.queryFieldsMap(o.fields)+" }":"")},n.queryVariablesMap=function(o,i){var s={},a=function(c){c&&Object.keys(c).map(function(u){s[u]=typeof c[u]=="object"?c[u].value:c[u]})};return a(o),i&&typeof i=="object"&&a(n.getNestedVariables(i)),s},n.getNestedVariables=function(o){var i={};function s(a){return a?.forEach(function(c){if((0,e.isNestedField)(c))i=t(t(t({},c.variables),i),c.fields&&s(c.fields));else if(typeof c=="object")for(var u=0,l=Object.entries(c);u<l.length;u++){var f=l[u],m=f[1];s(m)}}),i}return s(o),i},n.queryDataType=function(o){var i="String",s=typeof o=="object"?o.value:o;if(o?.type!=null)i=o.type;else{var a=Array.isArray(s)?s[0]:s;switch(typeof a){case"object":i="Object";break;case"boolean":i="Boolean";break;case"number":i=a%1===0?"Int":"Float";break}}return typeof o=="object"&&(o.list===!0?i="[".concat(i,"]"):Array.isArray(o.list)&&(i="[".concat(i).concat(o.list[0]?"!":"","]")),o.required&&(i+="!")),i},n}();return W.default=r,W}var mt;function ro(){if(mt)return ce;mt=1,Object.defineProperty(ce,"__esModule",{value:!0});var t=re(),e=oe(),r=function(){function n(o){Array.isArray(o)?this.variables=e.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields,this.operation=o.operation)}return n.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},n.prototype.mutationsBuilder=function(o){var i=this,s=o.map(function(a){return i.operation=a.operation,i.variables=a.variables,i.fields=a.fields,i.operationTemplate(a.operation)});return this.operationWrapperTemplate(e.default.resolveVariables(o),s.join(`
|
|
7
7
|
`))},n.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(o,i,s){return"".concat(o).concat(s!==0?", ":"").concat(i,": $").concat(i)},""),")"):""},n.prototype.queryDataArgumentAndTypeMap=function(o){return Object.keys(o).length?"(".concat(Object.keys(o).reduce(function(i,s,a){return"".concat(i).concat(a!==0?", ":"","$").concat(s,": ").concat(e.default.queryDataType(o[s]))},""),")"):""},n.prototype.operationWrapperTemplate=function(o,i){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(o),` {
|
|
8
8
|
`).concat(i,`
|
|
9
9
|
}`),variables:e.default.queryVariablesMap(o)}},n.prototype.operationTemplate=function(o){var i=typeof o=="string"?o:"".concat(o.alias,": ").concat(o.name);return"".concat(i," ").concat(this.queryDataNameAndArgumentMap(),` {
|
package/badge.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { V as tn, l as Ue } from "./index-RBMJ45wv.mjs";
|
|
2
|
-
import { c as M, j as D, r as vt } from "./index-
|
|
2
|
+
import { c as M, j as D, r as vt } from "./index-DZUW5rtF.mjs";
|
|
3
3
|
import * as E from "react";
|
|
4
4
|
import nn, { createContext as At, useContext as rn, useRef as on } from "react";
|
|
5
5
|
import { QueryClient as Et } from "@tanstack/react-query";
|
|
@@ -2307,7 +2307,7 @@ function st() {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
});
|
|
2309
2309
|
}
|
|
2310
|
-
function at() {
|
|
2310
|
+
function at(t) {
|
|
2311
2311
|
return Xt ? (globalThis.__STORE_QUERY_CLIENT__ || (globalThis.__STORE_QUERY_CLIENT__ = st()), globalThis.__STORE_QUERY_CLIENT__) : st();
|
|
2312
2312
|
}
|
|
2313
2313
|
const Xt = typeof window < "u";
|
package/campaign.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-CzxpJe9c.js"),e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-CzxpJe9c.js"),e=require("./index-jyV3VKB7.js"),d=new c.VendurePluginConfig({name:"campaign",enableFeatures:{ordinaryPrice:({variant:i,orderLine:r,searchResult:n,product:a})=>{if(r){const t=r.productVariant;return t?.ordinaryPrice?e.getPrice(t?.ordinaryPrice)*r.quantity:r.discountedLinePriceWithTax}return i?e.getPrice(i.ordinaryPrice||0):n?e.getPrice(n.ordinaryPrice||0):a?e.getProductPriceFromVariants(a.variants):0}},queryUpdates:{}});d.setQueryUpdates({search:{fields:[{items:[{ordinaryPrice:[{operation:"PriceRange",fields:["min, max"],fragment:!0},{operation:"SinglePrice",fields:["value"],fragment:!0}]}]}]},product:{fields:[{ordinaryPrice:[{operation:"PriceRange",fields:["min, max"],fragment:!0},{operation:"SinglePrice",fields:["value"],fragment:!0}]},{variants:["ordinaryPrice"]}]},briefProducts:{fields:[{items:[{ordinaryPrice:[{operation:"PriceRange",fields:["min, max"],fragment:!0},{operation:"SinglePrice",fields:["value"],fragment:!0}]},{variants:["ordinaryPrice"]}]}]},activeOrder:{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]},orderByCode:{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]},adjustOrderLine:{fields:[{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]}]},addItemToOrder:{fields:[{fields:[{lines:[{productVariant:["ordinaryPrice"]}]}]}]}});const o=(i,r)=>{const n=e.getPrice(i),a=e.getPrice(r);return e.getPrice(i)===0?!1:a!==n};exports.VendureCampaignPlugin=d;exports.isCampaign=o;
|
package/campaign.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./index-RBMJ45wv.mjs";
|
|
2
|
-
import
|
|
3
|
-
var
|
|
2
|
+
import g from "react";
|
|
3
|
+
var v = { exports: {} }, d = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -10,29 +10,29 @@ var b = { exports: {} }, E = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
13
|
+
var F;
|
|
14
|
+
function ue() {
|
|
15
|
+
if (F) return d;
|
|
16
|
+
F = 1;
|
|
17
17
|
var t = Symbol.for("react.transitional.element"), u = Symbol.for("react.fragment");
|
|
18
|
-
function s(
|
|
19
|
-
var
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
for (var
|
|
23
|
-
|
|
24
|
-
} else
|
|
25
|
-
return i =
|
|
18
|
+
function s(c, i, l) {
|
|
19
|
+
var m = null;
|
|
20
|
+
if (l !== void 0 && (m = "" + l), i.key !== void 0 && (m = "" + i.key), "key" in i) {
|
|
21
|
+
l = {};
|
|
22
|
+
for (var _ in i)
|
|
23
|
+
_ !== "key" && (l[_] = i[_]);
|
|
24
|
+
} else l = i;
|
|
25
|
+
return i = l.ref, {
|
|
26
26
|
$$typeof: t,
|
|
27
|
-
type:
|
|
28
|
-
key:
|
|
27
|
+
type: c,
|
|
28
|
+
key: m,
|
|
29
29
|
ref: i !== void 0 ? i : null,
|
|
30
|
-
props:
|
|
30
|
+
props: l
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return d.Fragment = u, d.jsx = s, d.jsxs = s, d;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var R = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -42,44 +42,44 @@ var p = {};
|
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return
|
|
45
|
+
var L;
|
|
46
|
+
function se() {
|
|
47
|
+
return L || (L = 1, process.env.NODE_ENV !== "production" && function() {
|
|
48
48
|
function t(e) {
|
|
49
49
|
if (e == null) return null;
|
|
50
50
|
if (typeof e == "function")
|
|
51
|
-
return e.$$typeof ===
|
|
51
|
+
return e.$$typeof === ne ? null : e.displayName || e.name || null;
|
|
52
52
|
if (typeof e == "string") return e;
|
|
53
53
|
switch (e) {
|
|
54
|
-
case
|
|
54
|
+
case T:
|
|
55
55
|
return "Fragment";
|
|
56
|
-
case
|
|
56
|
+
case X:
|
|
57
57
|
return "Profiler";
|
|
58
58
|
case V:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case
|
|
60
|
+
case K:
|
|
61
61
|
return "Suspense";
|
|
62
|
-
case
|
|
62
|
+
case ee:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case te:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof e == "object")
|
|
68
68
|
switch (typeof e.tag == "number" && console.error(
|
|
69
69
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
70
|
), e.$$typeof) {
|
|
71
|
-
case
|
|
71
|
+
case z:
|
|
72
72
|
return "Portal";
|
|
73
|
-
case Q:
|
|
74
|
-
return (e.displayName || "Context") + ".Provider";
|
|
75
73
|
case Z:
|
|
74
|
+
return e.displayName || "Context";
|
|
75
|
+
case B:
|
|
76
76
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
77
|
-
case
|
|
77
|
+
case Q:
|
|
78
78
|
var r = e.render;
|
|
79
79
|
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
80
|
-
case
|
|
80
|
+
case re:
|
|
81
81
|
return r = e.displayName || null, r !== null ? r : t(e.type) || "Memo";
|
|
82
|
-
case
|
|
82
|
+
case h:
|
|
83
83
|
r = e._payload, e = e._init;
|
|
84
84
|
try {
|
|
85
85
|
return t(e(r));
|
|
@@ -108,9 +108,9 @@ function ie() {
|
|
|
108
108
|
), u(e);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (e ===
|
|
113
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
111
|
+
function c(e) {
|
|
112
|
+
if (e === T) return "<>";
|
|
113
|
+
if (typeof e == "object" && e !== null && e.$$typeof === h)
|
|
114
114
|
return "<...>";
|
|
115
115
|
try {
|
|
116
116
|
var r = t(e);
|
|
@@ -123,19 +123,19 @@ function ie() {
|
|
|
123
123
|
var e = O.A;
|
|
124
124
|
return e === null ? null : e.getOwner();
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function l() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
129
|
+
function m(e) {
|
|
130
|
+
if (j.call(e, "key")) {
|
|
131
131
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
132
132
|
if (r && r.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
134
|
return e.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function _(e, r) {
|
|
137
137
|
function n() {
|
|
138
|
-
|
|
138
|
+
Y || (Y = !0, console.error(
|
|
139
139
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
140
140
|
r
|
|
141
141
|
));
|
|
@@ -145,22 +145,23 @@ function ie() {
|
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function H() {
|
|
149
149
|
var e = t(this.type);
|
|
150
|
-
return
|
|
150
|
+
return I[e] || (I[e] = !0, console.error(
|
|
151
151
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
152
152
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
function J(e, r, n, o, E, S) {
|
|
155
|
+
var a = n.ref;
|
|
156
|
+
return e = {
|
|
157
|
+
$$typeof: C,
|
|
157
158
|
type: e,
|
|
158
159
|
key: r,
|
|
159
|
-
props:
|
|
160
|
-
_owner:
|
|
161
|
-
}, (
|
|
160
|
+
props: n,
|
|
161
|
+
_owner: o
|
|
162
|
+
}, (a !== void 0 ? a : null) !== null ? Object.defineProperty(e, "ref", {
|
|
162
163
|
enumerable: !1,
|
|
163
|
-
get:
|
|
164
|
+
get: H
|
|
164
165
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
165
166
|
configurable: !1,
|
|
166
167
|
enumerable: !1,
|
|
@@ -175,33 +176,33 @@ function ie() {
|
|
|
175
176
|
configurable: !1,
|
|
176
177
|
enumerable: !1,
|
|
177
178
|
writable: !0,
|
|
178
|
-
value:
|
|
179
|
+
value: E
|
|
179
180
|
}), Object.defineProperty(e, "_debugTask", {
|
|
180
181
|
configurable: !1,
|
|
181
182
|
enumerable: !1,
|
|
182
183
|
writable: !0,
|
|
183
|
-
value:
|
|
184
|
+
value: S
|
|
184
185
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
185
186
|
}
|
|
186
|
-
function
|
|
187
|
+
function P(e, r, n, o, E, S) {
|
|
187
188
|
var a = r.children;
|
|
188
189
|
if (a !== void 0)
|
|
189
190
|
if (o)
|
|
190
|
-
if (
|
|
191
|
+
if (oe(a)) {
|
|
191
192
|
for (o = 0; o < a.length; o++)
|
|
192
|
-
|
|
193
|
+
y(a[o]);
|
|
193
194
|
Object.freeze && Object.freeze(a);
|
|
194
195
|
} else
|
|
195
196
|
console.error(
|
|
196
197
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
198
|
);
|
|
198
|
-
else
|
|
199
|
-
if (
|
|
199
|
+
else y(a);
|
|
200
|
+
if (j.call(r, "key")) {
|
|
200
201
|
a = t(e);
|
|
201
|
-
var
|
|
202
|
-
return
|
|
202
|
+
var f = Object.keys(r).filter(function(ae) {
|
|
203
|
+
return ae !== "key";
|
|
203
204
|
});
|
|
204
|
-
o = 0 <
|
|
205
|
+
o = 0 < f.length ? "{key: someKey, " + f.join(": ..., ") + ": ...}" : "{key: someKey}", U[a + o] || (f = 0 < f.length ? "{" + f.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
207
|
let props = %s;
|
|
207
208
|
<%s {...props} />
|
|
@@ -210,76 +211,73 @@ React keys must be passed directly to JSX without using spread:
|
|
|
210
211
|
<%s key={someKey} {...props} />`,
|
|
211
212
|
o,
|
|
212
213
|
a,
|
|
213
|
-
|
|
214
|
+
f,
|
|
214
215
|
a
|
|
215
|
-
),
|
|
216
|
+
), U[a + o] = !0);
|
|
216
217
|
}
|
|
217
|
-
if (a = null, n !== void 0 && (s(n), a = "" + n),
|
|
218
|
+
if (a = null, n !== void 0 && (s(n), a = "" + n), m(r) && (s(r.key), a = "" + r.key), "key" in r) {
|
|
218
219
|
n = {};
|
|
219
|
-
for (var
|
|
220
|
-
|
|
220
|
+
for (var A in r)
|
|
221
|
+
A !== "key" && (n[A] = r[A]);
|
|
221
222
|
} else n = r;
|
|
222
|
-
return a &&
|
|
223
|
+
return a && _(
|
|
223
224
|
n,
|
|
224
225
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
225
|
-
),
|
|
226
|
+
), J(
|
|
226
227
|
e,
|
|
227
228
|
a,
|
|
228
|
-
l,
|
|
229
|
-
m,
|
|
230
|
-
i(),
|
|
231
229
|
n,
|
|
232
|
-
|
|
233
|
-
|
|
230
|
+
i(),
|
|
231
|
+
E,
|
|
232
|
+
S
|
|
234
233
|
);
|
|
235
234
|
}
|
|
236
|
-
function
|
|
237
|
-
typeof e == "object" && e !== null && e.$$typeof ===
|
|
235
|
+
function y(e) {
|
|
236
|
+
w(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === h && (e._payload.status === "fulfilled" ? w(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
238
237
|
}
|
|
239
|
-
|
|
238
|
+
function w(e) {
|
|
239
|
+
return typeof e == "object" && e !== null && e.$$typeof === C;
|
|
240
|
+
}
|
|
241
|
+
var p = g, C = Symbol.for("react.transitional.element"), z = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), V = Symbol.for("react.strict_mode"), X = Symbol.for("react.profiler"), B = Symbol.for("react.consumer"), Z = Symbol.for("react.context"), Q = Symbol.for("react.forward_ref"), K = Symbol.for("react.suspense"), ee = Symbol.for("react.suspense_list"), re = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), ne = Symbol.for("react.client.reference"), O = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, oe = Array.isArray, k = console.createTask ? console.createTask : function() {
|
|
240
242
|
return null;
|
|
241
243
|
};
|
|
242
|
-
|
|
244
|
+
p = {
|
|
243
245
|
react_stack_bottom_frame: function(e) {
|
|
244
246
|
return e();
|
|
245
247
|
}
|
|
246
248
|
};
|
|
247
|
-
var
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
)(),
|
|
251
|
-
|
|
252
|
-
var
|
|
253
|
-
return
|
|
249
|
+
var Y, I = {}, D = p.react_stack_bottom_frame.bind(
|
|
250
|
+
p,
|
|
251
|
+
l
|
|
252
|
+
)(), M = k(c(l)), U = {};
|
|
253
|
+
R.Fragment = T, R.jsx = function(e, r, n) {
|
|
254
|
+
var o = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
255
|
+
return P(
|
|
254
256
|
e,
|
|
255
257
|
r,
|
|
256
258
|
n,
|
|
257
259
|
!1,
|
|
258
|
-
o,
|
|
259
|
-
|
|
260
|
-
l ? Error("react-stack-top-frame") : M,
|
|
261
|
-
l ? k(f(e)) : U
|
|
260
|
+
o ? Error("react-stack-top-frame") : D,
|
|
261
|
+
o ? k(c(e)) : M
|
|
262
262
|
);
|
|
263
|
-
},
|
|
264
|
-
var
|
|
265
|
-
return
|
|
263
|
+
}, R.jsxs = function(e, r, n) {
|
|
264
|
+
var o = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
265
|
+
return P(
|
|
266
266
|
e,
|
|
267
267
|
r,
|
|
268
268
|
n,
|
|
269
269
|
!0,
|
|
270
|
-
o,
|
|
271
|
-
|
|
272
|
-
l ? Error("react-stack-top-frame") : M,
|
|
273
|
-
l ? k(f(e)) : U
|
|
270
|
+
o ? Error("react-stack-top-frame") : D,
|
|
271
|
+
o ? k(c(e)) : M
|
|
274
272
|
);
|
|
275
273
|
};
|
|
276
|
-
}()),
|
|
274
|
+
}()), R;
|
|
277
275
|
}
|
|
278
|
-
var
|
|
279
|
-
function
|
|
280
|
-
return
|
|
276
|
+
var $;
|
|
277
|
+
function ie() {
|
|
278
|
+
return $ || ($ = 1, process.env.NODE_ENV === "production" ? v.exports = ue() : v.exports = se()), v.exports;
|
|
281
279
|
}
|
|
282
|
-
var
|
|
280
|
+
var Re = ie(), b = { exports: {} }, N = {};
|
|
283
281
|
/**
|
|
284
282
|
* @license React
|
|
285
283
|
* react-compiler-runtime.production.js
|
|
@@ -289,16 +287,16 @@ var Ee = ce(), T = { exports: {} }, x = {};
|
|
|
289
287
|
* This source code is licensed under the MIT license found in the
|
|
290
288
|
* LICENSE file in the root directory of this source tree.
|
|
291
289
|
*/
|
|
292
|
-
var
|
|
290
|
+
var q;
|
|
293
291
|
function le() {
|
|
294
|
-
if (
|
|
295
|
-
|
|
296
|
-
var t =
|
|
297
|
-
return
|
|
292
|
+
if (q) return N;
|
|
293
|
+
q = 1;
|
|
294
|
+
var t = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
295
|
+
return N.c = function(u) {
|
|
298
296
|
return t.H.useMemoCache(u);
|
|
299
|
-
},
|
|
297
|
+
}, N;
|
|
300
298
|
}
|
|
301
|
-
var
|
|
299
|
+
var x = {};
|
|
302
300
|
/**
|
|
303
301
|
* @license React
|
|
304
302
|
* react-compiler-runtime.development.js
|
|
@@ -308,11 +306,11 @@ var g = {};
|
|
|
308
306
|
* This source code is licensed under the MIT license found in the
|
|
309
307
|
* LICENSE file in the root directory of this source tree.
|
|
310
308
|
*/
|
|
311
|
-
var
|
|
312
|
-
function
|
|
313
|
-
return
|
|
314
|
-
var t =
|
|
315
|
-
|
|
309
|
+
var W;
|
|
310
|
+
function ce() {
|
|
311
|
+
return W || (W = 1, process.env.NODE_ENV !== "production" && function() {
|
|
312
|
+
var t = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
313
|
+
x.c = function(u) {
|
|
316
314
|
var s = t.H;
|
|
317
315
|
return s === null && console.error(
|
|
318
316
|
`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
@@ -322,28 +320,28 @@ function fe() {
|
|
|
322
320
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
323
321
|
), s.useMemoCache(u);
|
|
324
322
|
};
|
|
325
|
-
}()),
|
|
323
|
+
}()), x;
|
|
326
324
|
}
|
|
327
|
-
var
|
|
328
|
-
function
|
|
329
|
-
return
|
|
325
|
+
var G;
|
|
326
|
+
function fe() {
|
|
327
|
+
return G || (G = 1, process.env.NODE_ENV === "production" ? b.exports = le() : b.exports = ce()), b.exports;
|
|
330
328
|
}
|
|
331
|
-
var pe =
|
|
332
|
-
const
|
|
333
|
-
const u = t.map((i) =>
|
|
334
|
-
return s === void 0 ||
|
|
329
|
+
var pe = fe();
|
|
330
|
+
const me = (t) => t == null ? 0 : typeof t == "number" ? t : "value" in t ? t.value : "min" in t ? t.min : 0, Ee = (t) => {
|
|
331
|
+
const u = t.map((i) => me(i.price)), s = Math.min(...u), c = Math.max(...u);
|
|
332
|
+
return s === void 0 || c === void 0 ? {
|
|
335
333
|
value: 0
|
|
336
|
-
} : s ===
|
|
334
|
+
} : s === c ? {
|
|
337
335
|
value: s
|
|
338
336
|
} : {
|
|
339
337
|
min: s,
|
|
340
|
-
max:
|
|
338
|
+
max: c
|
|
341
339
|
};
|
|
342
|
-
},
|
|
340
|
+
}, ve = (t, u) => typeof t == "function" ? t(u) : t;
|
|
343
341
|
export {
|
|
344
|
-
|
|
342
|
+
Ee as a,
|
|
345
343
|
pe as c,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
344
|
+
me as g,
|
|
345
|
+
Re as j,
|
|
346
|
+
ve as r
|
|
349
347
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";require("./index-CzxpJe9c.js");const P=require("react");var v={exports:{}},_={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var U;function ie(){if(U)return _;U=1;var t=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function i(l,s,c){var m=null;if(c!==void 0&&(m=""+c),s.key!==void 0&&(m=""+s.key),"key"in s){c={};for(var d in s)d!=="key"&&(c[d]=s[d])}else c=s;return s=c.ref,{$$typeof:t,type:l,key:m,ref:s!==void 0?s:null,props:c}}return _.Fragment=u,_.jsx=i,_.jsxs=i,_}var R={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var $;function se(){return $||($=1,process.env.NODE_ENV!=="production"&&function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case B:return"Profiler";case X:return"StrictMode";case ee:return"Suspense";case re:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case V:return"Portal";case Q:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case K:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return r=e.displayName||null,r!==null?r:t(e.type)||"Memo";case h:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function u(e){return""+e}function i(e){try{u(e);var r=!1}catch{r=!0}if(r){r=console;var n=r.error,o=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),u(e)}}function l(e){if(e===T)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===h)return"<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function s(){var e=O.A;return e===null?null:e.getOwner()}function c(){return Error("react-stack-top-frame")}function m(e){if(j.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function d(e,r){function n(){Y||(Y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function J(){var e=t(this.type);return I[e]||(I[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function z(e,r,n,o,E,S){var a=n.ref;return e={$$typeof:w,type:e,key:r,props:n,_owner:o},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:J}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:E}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function g(e,r,n,o,E,S){var a=r.children;if(a!==void 0)if(o)if(ae(a)){for(o=0;o<a.length;o++)y(a[o]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else y(a);if(j.call(r,"key")){a=t(e);var f=Object.keys(r).filter(function(ue){return ue!=="key"});o=0<f.length?"{key: someKey, "+f.join(": ..., ")+": ...}":"{key: someKey}",M[a+o]||(f=0<f.length?"{"+f.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,o,a,f,a),M[a+o]=!0)}if(a=null,n!==void 0&&(i(n),a=""+n),m(r)&&(i(r.key),a=""+r.key),"key"in r){n={};for(var A in r)A!=="key"&&(n[A]=r[A])}else n=r;return a&&d(n,typeof e=="function"?e.displayName||e.name||"Unknown":e),z(e,a,n,s(),E,S)}function y(e){C(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===h&&(e._payload.status==="fulfilled"?C(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function C(e){return typeof e=="object"&&e!==null&&e.$$typeof===w}var p=P,w=Symbol.for("react.transitional.element"),V=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),oe=Symbol.for("react.client.reference"),O=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,ae=Array.isArray,k=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(e){return e()}};var Y,I={},D=p.react_stack_bottom_frame.bind(p,c)(),F=k(l(c)),M={};R.Fragment=T,R.jsx=function(e,r,n){var o=1e4>O.recentlyCreatedOwnerStacks++;return g(e,r,n,!1,o?Error("react-stack-top-frame"):D,o?k(l(e)):F)},R.jsxs=function(e,r,n){var o=1e4>O.recentlyCreatedOwnerStacks++;return g(e,r,n,!0,o?Error("react-stack-top-frame"):D,o?k(l(e)):F)}}()),R}var q;function ce(){return q||(q=1,process.env.NODE_ENV==="production"?v.exports=ie():v.exports=se()),v.exports}var le=ce(),b={exports:{}},N={};/**
|
|
23
|
+
* @license React
|
|
24
|
+
* react-compiler-runtime.production.js
|
|
25
|
+
*
|
|
26
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
27
|
+
*
|
|
28
|
+
* This source code is licensed under the MIT license found in the
|
|
29
|
+
* LICENSE file in the root directory of this source tree.
|
|
30
|
+
*/var L;function fe(){if(L)return N;L=1;var t=P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return N.c=function(u){return t.H.useMemoCache(u)},N}var x={};/**
|
|
31
|
+
* @license React
|
|
32
|
+
* react-compiler-runtime.development.js
|
|
33
|
+
*
|
|
34
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the MIT license found in the
|
|
37
|
+
* LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/var W;function me(){return W||(W=1,process.env.NODE_ENV!=="production"&&function(){var t=P.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;x.c=function(u){var i=t.H;return i===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
39
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
40
|
+
2. You might be breaking the Rules of Hooks
|
|
41
|
+
3. You might have more than one copy of React in the same app
|
|
42
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),i.useMemoCache(u)}}()),x}var G;function de(){return G||(G=1,process.env.NODE_ENV==="production"?b.exports=fe():b.exports=me()),b.exports}var _e=de();const H=t=>t==null?0:typeof t=="number"?t:"value"in t?t.value:"min"in t?t.min:0,Re=t=>{const u=t.map(s=>H(s.price)),i=Math.min(...u),l=Math.max(...u);return i===void 0||l===void 0?{value:0}:i===l?{value:i}:{min:i,max:l}},pe=(t,u)=>typeof t=="function"?t(u):t;exports.compilerRuntimeExports=_e;exports.getPrice=H;exports.getProductPriceFromVariants=Re;exports.jsxRuntimeExports=le;exports.renderChildren=pe;
|
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.44",
|
|
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.44",
|
|
45
|
+
"@haus-storefront-react/core": "0.0.44",
|
|
46
|
+
"@haus-storefront-react/shared-types": "0.0.44"
|
|
47
47
|
}
|
|
48
48
|
}
|
package/index-C5vj0ljt.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";require("./index-CzxpJe9c.js");const g=require("react");var b={exports:{}},E={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var q;function se(){if(q)return E;q=1;var t=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function i(f,s,c){var R=null;if(c!==void 0&&(R=""+c),s.key!==void 0&&(R=""+s.key),"key"in s){c={};for(var _ in s)_!=="key"&&(c[_]=s[_])}else c=s;return s=c.ref,{$$typeof:t,type:f,key:R,ref:s!==void 0?s:null,props:c}}return E.Fragment=u,E.jsx=i,E.jsxs=i,E}var p={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var L;function ce(){return L||(L=1,process.env.NODE_ENV!=="production"&&function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case h:return"Fragment";case Z:return"Profiler";case B:return"StrictMode";case re:return"Suspense";case te:return"SuspenseList";case oe:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case X:return"Portal";case K:return(e.displayName||"Context")+".Provider";case Q:return(e._context.displayName||"Context")+".Consumer";case ee:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ne:return r=e.displayName||null,r!==null?r:t(e.type)||"Memo";case y:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function u(e){return""+e}function i(e){try{u(e);var r=!1}catch{r=!0}if(r){r=console;var n=r.error,o=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return n.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),u(e)}}function f(e){if(e===h)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===y)return"<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function s(){var e=O.A;return e===null?null:e.getOwner()}function c(){return Error("react-stack-top-frame")}function R(e){if(Y.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function _(e,r){function n(){I||(I=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function z(){var e=t(this.type);return D[e]||(D[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function V(e,r,n,o,m,l,S,A){return n=l.ref,e={$$typeof:j,type:e,key:r,props:l,_owner:m},(n!==void 0?n:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:z}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function C(e,r,n,o,m,l,S,A){var a=r.children;if(a!==void 0)if(o)if(ue(a)){for(o=0;o<a.length;o++)w(a[o]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else w(a);if(Y.call(r,"key")){a=t(e);var d=Object.keys(r).filter(function(ie){return ie!=="key"});o=0<d.length?"{key: someKey, "+d.join(": ..., ")+": ...}":"{key: someKey}",U[a+o]||(d=0<d.length?"{"+d.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
-
let props = %s;
|
|
19
|
-
<%s {...props} />
|
|
20
|
-
React keys must be passed directly to JSX without using spread:
|
|
21
|
-
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,o,a,d,a),U[a+o]=!0)}if(a=null,n!==void 0&&(i(n),a=""+n),R(r)&&(i(r.key),a=""+r.key),"key"in r){n={};for(var N in r)N!=="key"&&(n[N]=r[N])}else n=r;return a&&_(n,typeof e=="function"?e.displayName||e.name||"Unknown":e),V(e,a,l,m,s(),n,S,A)}function w(e){typeof e=="object"&&e!==null&&e.$$typeof===j&&e._store&&(e._store.validated=1)}var v=g,j=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),K=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),ae=Symbol.for("react.client.reference"),O=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,ue=Array.isArray,k=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(e){return e()}};var I,D={},F=v.react_stack_bottom_frame.bind(v,c)(),M=k(f(c)),U={};p.Fragment=h,p.jsx=function(e,r,n,o,m){var l=1e4>O.recentlyCreatedOwnerStacks++;return C(e,r,n,!1,o,m,l?Error("react-stack-top-frame"):F,l?k(f(e)):M)},p.jsxs=function(e,r,n,o,m){var l=1e4>O.recentlyCreatedOwnerStacks++;return C(e,r,n,!0,o,m,l?Error("react-stack-top-frame"):F,l?k(f(e)):M)}}()),p}var $;function le(){return $||($=1,process.env.NODE_ENV==="production"?b.exports=se():b.exports=ce()),b.exports}var fe=le(),T={exports:{}},x={};/**
|
|
23
|
-
* @license React
|
|
24
|
-
* react-compiler-runtime.production.js
|
|
25
|
-
*
|
|
26
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
27
|
-
*
|
|
28
|
-
* This source code is licensed under the MIT license found in the
|
|
29
|
-
* LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/var W;function me(){if(W)return x;W=1;var t=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return x.c=function(u){return t.H.useMemoCache(u)},x}var P={};/**
|
|
31
|
-
* @license React
|
|
32
|
-
* react-compiler-runtime.development.js
|
|
33
|
-
*
|
|
34
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
35
|
-
*
|
|
36
|
-
* This source code is licensed under the MIT license found in the
|
|
37
|
-
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var G;function de(){return G||(G=1,process.env.NODE_ENV!=="production"&&function(){var t=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;P.c=function(u){var i=t.H;return i===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
39
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
40
|
-
2. You might be breaking the Rules of Hooks
|
|
41
|
-
3. You might have more than one copy of React in the same app
|
|
42
|
-
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),i.useMemoCache(u)}}()),P}var H;function Re(){return H||(H=1,process.env.NODE_ENV==="production"?T.exports=me():T.exports=de()),T.exports}var _e=Re();const J=t=>t==null?0:typeof t=="number"?t:"value"in t?t.value:"min"in t?t.min:0,Ee=t=>{const u=t.map(s=>J(s.price)),i=Math.min(...u),f=Math.max(...u);return i===void 0||f===void 0?{value:0}:i===f?{value:i}:{min:i,max:f}},pe=(t,u)=>typeof t=="function"?t(u):t;exports.compilerRuntimeExports=_e;exports.getPrice=J;exports.getProductPriceFromVariants=Ee;exports.jsxRuntimeExports=fe;exports.renderChildren=pe;
|