@haus-storefront-react/vendure-plugin-configs 0.0.52-4 → 1.0.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ ## 1.0.0-next.0 (2025-12-30)
2
+
3
+ ### 🚀 Features
4
+
5
+ - introduce providers library and enhance vendure integration
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated core to 1.0.0-next.0
10
+ - Updated common/utils to 1.0.0-next.0
11
+ - Updated shared/types to 1.0.0-next.0
12
+
13
+ ## 0.0.52-4 (2025-12-15)
14
+
15
+ ### 🧱 Updated Dependencies
16
+
17
+ - Updated core to 0.0.52-4
18
+ - Updated common/utils to 0.0.52-4
19
+ - Updated shared/types to 0.0.52-4
20
+
1
21
  ## 0.0.52-3 (2025-12-12)
2
22
 
3
23
  ### 🧱 Updated Dependencies
package/badge.js CHANGED
@@ -1,47 +1,21 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xe=require("./index-TovLbd0h.js"),v=require("./index-BXYyq-8r.js"),se=require("react"),ke=require("@tanstack/react-query");function hn(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const E=hn(se),H=new xe.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const n=e?H.getSettings().availablePositions[e]:H.getSettings().defaultPositions;return{badges:xe.lodashExports.filter(t,i=>n?n.includes(i.position):!0),availablePositions:n}}},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"]}}});H.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"]}]}]}]}});H.setRequests({getBadges:async()=>H.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 yn(t){const e=[];function n(i,o){const s=E.createContext(o),a=e.length;e.push(s);const c=l=>{const f=v.compilerRuntimeExports.c(8);let h,g,p;f[0]!==l?({scope:p,children:h,...g}=l,f[0]=l,f[1]=h,f[2]=g,f[3]=p):(h=f[1],g=f[2],p=f[3]);const y=p?.[t]?.[a]||s,m=g;let S;return f[4]!==y.Provider||f[5]!==h||f[6]!==m?(S=v.jsxRuntimeExports.jsx(y.Provider,{value:m,children:h}),f[4]=y.Provider,f[5]=h,f[6]=m,f[7]=S):S=f[7],S};c.displayName=i+"Provider";function u(l,f){const h=f?.[t]?.[a]||s,g=E.useContext(h);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${l}\` must be used within \`${i}\``)}return[c,u]}function r(){const i=e.map(o=>E.createContext(o));return function(s){const a=s?.[t]||i;return E.useMemo(()=>({[`__scope${t}`]:{...s,[t]:a}}),[s,a])}}return r.scopeName=t,[n,r]}function gn(t,e){if(e==="web")return t;const{src:n,alt:r,width:i,height:o,...s}=t,a=[typeof i=="number"?{width:i}:void 0,typeof o=="number"?{height:o}:void 0].filter(Boolean);let c;return a.length===1?c=a[0]:a.length>1&&(c=a),{...s,source:{uri:n},...c?{style:c}:{}}}function bn(t){const{src:e,alt:n,...r}=t;return e?{...r,source:{uri:e}}:r}const Sn={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 wn(t,e){if(e==="web")return t;let n=null;try{n=require("react-native")}catch{n=null}if(!n)return console.warn(`react-native is not available at runtime; falling back to 'View' for '${t}'`),"div";const r=Sn[t];if(!r)return console.warn(`No native component mapping found for '${t}', falling back to View`),n.View;if(r==="Image"){const o=se.forwardRef((s,a)=>{const c=v.compilerRuntimeExports.c(5);if(!s.src)return null;let u;c[0]!==s?(u=bn(s),c[0]=s,c[1]=u):u=c[1];let l;return c[2]!==a||c[3]!==u?(l=v.jsxRuntimeExports.jsx(n.Image,{ref:a,...u}),c[2]=a,c[3]=u,c[4]=l):l=c[4],l});return o.displayName="PlatformPrimitiveImage",o}const i=n[r];return i||(console.warn(`Native component '${r}' not found, falling back to View`),n.View)}const vn=Symbol("radix.slottable");function An(...t){return e=>t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}function En(t,e){const n={...e};for(const r in e){const i=t[r],o=e[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const c=o(...a);return i(...a),c}:i&&(n[r]=i):r==="style"?n[r]=On(i,o):r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...t,...n}}function On(t,e){let n=null;try{n=require("react-native")}catch{n=null}const r=n?.StyleSheet?.flatten;if(typeof t=="function"&&typeof e=="function")return o=>{const s=[t(o),e(o)];return r?r(s):s};if(typeof t=="function")return o=>{const s=e?[t(o),e]:t(o);return r?r(s):s};if(typeof e=="function")return o=>{const s=t?[t,e(o)]:e(o);return r?r(s):s};const i=[t,e].filter(Boolean);return r?r(i):i}function Tn(t){return E.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===vn}function xn(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Rn(t,e){const n=E.forwardRef((r,i)=>{const{children:o,...s}=r;if(E.isValidElement(o)){const a=xn(o),c=En(s,o.props);return o.type!==E.Fragment&&(c.ref=i?An(i,a):a),E.cloneElement(o,c)}return E.Children.count(o)>1?E.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}function Ne(t,e=!1,n="div"){if(!e)return wn(n,t);const r=Rn("Slot"),i=E.forwardRef((o,s)=>{const a=v.compilerRuntimeExports.c(15);let c,u;a[0]!==o?({children:c,...u}=o,a[0]=o,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 h=E.Children.toArray(c),g=h.find(Tn);if(g){const p=g.props.children,y=h.map(T=>T===g?E.Children.count(p)>1?E.Children.only(null):E.isValidElement(p)?p.props.children:null:T),m=E.isValidElement(p)?E.cloneElement(p,void 0,y):null;let S;a[7]!==s||a[8]!==u||a[9]!==m?(S=v.jsxRuntimeExports.jsx(r,{...u,ref:s,children:m}),a[7]=s,a[8]=u,a[9]=m,a[10]=S):S=a[10],l=S;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=v.jsxRuntimeExports.jsx(r,{...u,ref:s,children:c}),a[11]=c,a[12]=s,a[13]=u,a[14]=f):f=a[14],f});return i.displayName="Slot",i}const kn="debug",_=()=>{try{if(typeof window>"u"||typeof localStorage>"u")return!1;const t=localStorage.getItem(kn);return t==="true"||t==="1"}catch{return!1}},Nn=()=>{const t=(e,n,r=[])=>n?typeof e=="string"?[`<${n}> ${e}`,...r]:[`<${n}>`,e,...r]:Array.isArray(e)?[...e,...r]:[e,...r];return{log:(e,n,...r)=>{_()&&console.log(...t(e,n,r))},info:(e,n,...r)=>{_()&&console.info(...t(e,n,r))},warn:(e,n,...r)=>{_()&&console.warn(...t(e,n,r))},error:(e,n,...r)=>{_()&&console.error(...t(e,n,r))},debug:(e,n,...r)=>{_()&&console.debug(...t(e,n,r))},group:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.group(n?r?`<${n}> ${r}`:`<${n}>`:r)}},groupCollapsed:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.groupCollapsed(n?r?`<${n}> ${r}`:`<${n}>`:r)}},groupEnd:()=>{_()&&console.groupEnd()},table:(e,n,r)=>{_()&&(n&&console.log(`<${n}>`),console.table(e,r))},time:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.time(n?r?`<${n}> ${r}`:`<${n}>`:r)}},timeEnd:(e,n)=>{if(_()){const r=typeof e=="string"?e:void 0;console.timeEnd(n?r?`<${n}> ${r}`:`<${n}>`:r)}}}},Cn=Nn();function _n(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(i){i(n)}),(r=t.get("*"))&&r.slice().map(function(i){i(e,n)})}}}let Z;try{Z=require("@react-native-async-storage/async-storage").default}catch{Z=null}let We=null;try{const{AsyncLocalStorage:t}=require("node:async_hooks");We=new t}catch{We=null}const K=typeof window<"u"&&typeof window.localStorage<"u",J=!!Z,ye={},$e={getItem:async()=>null,setItem:async()=>{},removeItem:async()=>{}},Le=()=>{try{return We?.getStore?.()??null}catch{return null}},B={getItem:async t=>{const e=!K&&!J?Le():null;return e?e.getItem(t):J?Z.getItem(t):K?new Promise(n=>{Promise.resolve().then(()=>{const r=window.localStorage.getItem(t),i=ye[t];r!==i&&(ye[t]=r||""),n(r)})}):$e.getItem(t)},setItem:async(t,e)=>{const n=!K&&!J?Le():null;return n?n.setItem(t,e):J?Z.setItem(t,e):K?new Promise((r,i)=>{Promise.resolve().then(()=>{try{window.localStorage.setItem(t,e);const o=window.localStorage.getItem(t);o===e?(ye[t]=e,r()):i(new Error(`Failed to set localStorage item: expected "${e}", got "${o}"`))}catch(o){i(o)}})}):$e.setItem(t,e)},removeItem:async t=>{const e=!K&&!J?Le():null;return e?e.removeItem(t):J?Z.removeItem(t):K?new Promise((n,r)=>{Promise.resolve().then(()=>{try{window.localStorage.removeItem(t);const i=window.localStorage.getItem(t);i===null?(delete ye[t],n()):r(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${i}"`))}catch(i){r(i)}})}):$e.removeItem(t)}},at=50,I={get:async()=>{try{const t=await B.getItem("eventHistory");return t?JSON.parse(t):[]}catch(t){return console.error("Error getting event history",t),[]}},set:async t=>{try{await B.setItem("eventHistory",JSON.stringify(t.slice(-at)))}catch(e){console.error("Error setting event history",e)}},clear:async()=>{try{await B.removeItem("eventHistory")}catch(t){console.error("Error clearing event history",t)}},push:async t=>{const e=await I.get();await I.set([{...t,timestamp:Date.now()},...e].slice(-at))},find:async t=>(await I.get()).find(n=>n.key===t.key&&n.identifier===t.identifier),filter:async(t,e)=>{const n=await I.get();return e?n.filter(e):n.filter(({key:r,identifier:i})=>(!r||t.key===r)&&(!i||t.identifier===i))}};function Pn(){const t=globalThis;return t.__HAUS_EVENT_EMITTER__||=_n(),t.__HAUS_EVENT_EMITTER__}function W(t){const e=Pn(),n=(...c)=>console.error(...c);I.get().then(c=>{const l=xe.lodashExports.first(c)?.timestamp;l&&l<Date.now()-1e3*60*60&&(Cn.info("Clearing event history since it is older than 1 hour:","eventBus",l),I.clear())});const r=(c,u,l)=>{const f=h=>{try{if(typeof h=="object"&&h!==null){const{identifier:g,data:p}=h;(!g||g===l)&&u(p)}else u(h)}catch(g){n(g)}};return e.on(c,f),()=>{i(c,u,l)}},i=(c,u,l)=>{const f=h=>{if(typeof h=="object"&&h!==null){const{identifier:g}=h;(!g||g===l)&&e.off(c,u)}};e.off(c,f)};return{on:r,off:i,once:(c,u,l)=>{const f=h=>{try{if(typeof h=="object"&&h!==null){const{identifier:g,data:p}=h;(!g||g===l)&&u(p)}else u(h)}finally{i(c,f,l)}};e.on(c,f)},emit:(c,u,...l)=>{const f={identifier:u,data:l.length===1?l[0]:l};I.push({key:c,identifier:u,payload:f.data}),e.emit(c,f)},getEventHistory:(c,u)=>I.filter({key:c,identifier:u})}}W();W();W();W();W();W();W();new ke.QueryClient;function jt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Dn}=Object.prototype,{getPrototypeOf:Xe}=Object,{iterator:Ce,toStringTag:Mt}=Symbol,_e=(t=>e=>{const n=Dn.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),D=t=>(t=t.toLowerCase(),e=>_e(e)===t),Pe=t=>e=>typeof e===t,{isArray:te}=Array,ee=Pe("undefined");function ae(t){return t!==null&&!ee(t)&&t.constructor!==null&&!ee(t.constructor)&&R(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Bt=D("ArrayBuffer");function qn(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Bt(t.buffer),e}const Fn=Pe("string"),R=Pe("function"),It=Pe("number"),ce=t=>t!==null&&typeof t=="object",jn=t=>t===!0||t===!1,Ee=t=>{if(_e(t)!=="object")return!1;const e=Xe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Mt in t)&&!(Ce in t)},Mn=t=>{if(!ce(t)||ae(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Bn=D("Date"),In=D("File"),Un=D("Blob"),$n=D("FileList"),Ln=t=>ce(t)&&R(t.pipe),Vn=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||R(t.append)&&((e=_e(t))==="formdata"||e==="object"&&R(t.toString)&&t.toString()==="[object FormData]"))},Hn=D("URLSearchParams"),[Qn,Wn,zn,Kn]=["ReadableStream","Request","Response","Headers"].map(D),Jn=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ue(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),te(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{if(ae(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function Ut(t,e){if(ae(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$t=t=>!ee(t)&&t!==L;function ze(){const{caseless:t,skipUndefined:e}=$t(this)&&this||{},n={},r=(i,o)=>{const s=t&&Ut(n,o)||o;Ee(n[s])&&Ee(i)?n[s]=ze(n[s],i):Ee(i)?n[s]=ze({},i):te(i)?n[s]=i.slice():(!e||!ee(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&ue(arguments[i],r);return n}const Gn=(t,e,n,{allOwnKeys:r}={})=>(ue(e,(i,o)=>{n&&R(i)?t[o]=jt(i,n):t[o]=i},{allOwnKeys:r}),t),Xn=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Yn=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Zn=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&Xe(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},er=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},tr=t=>{if(!t)return null;if(te(t))return t;let e=t.length;if(!It(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},nr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Xe(Uint8Array)),rr=(t,e)=>{const r=(t&&t[Ce]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},ir=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},or=D("HTMLFormElement"),sr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ct=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),ar=D("RegExp"),Lt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ue(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},cr=t=>{Lt(t,(e,n)=>{if(R(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(R(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ur=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return te(t)?r(t):r(String(t).split(e)),n},lr=()=>{},dr=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function fr(t){return!!(t&&R(t.append)&&t[Mt]==="FormData"&&t[Ce])}const pr=t=>{const e=new Array(10),n=(r,i)=>{if(ce(r)){if(e.indexOf(r)>=0)return;if(ae(r))return r;if(!("toJSON"in r)){e[i]=r;const o=te(r)?[]:{};return ue(r,(s,a)=>{const c=n(s,i+1);!ee(c)&&(o[a]=c)}),e[i]=void 0,o}}return r};return n(t,0)},mr=D("AsyncFunction"),hr=t=>t&&(ce(t)||R(t))&&R(t.then)&&R(t.catch),Vt=((t,e)=>t?setImmediate:e?((n,r)=>(L.addEventListener("message",({source:i,data:o})=>{i===L&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),L.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",R(L.postMessage)),yr=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Vt,gr=t=>t!=null&&R(t[Ce]),d={isArray:te,isArrayBuffer:Bt,isBuffer:ae,isFormData:Vn,isArrayBufferView:qn,isString:Fn,isNumber:It,isBoolean:jn,isObject:ce,isPlainObject:Ee,isEmptyObject:Mn,isReadableStream:Qn,isRequest:Wn,isResponse:zn,isHeaders:Kn,isUndefined:ee,isDate:Bn,isFile:In,isBlob:Un,isRegExp:ar,isFunction:R,isStream:Ln,isURLSearchParams:Hn,isTypedArray:nr,isFileList:$n,forEach:ue,merge:ze,extend:Gn,trim:Jn,stripBOM:Xn,inherits:Yn,toFlatObject:Zn,kindOf:_e,kindOfTest:D,endsWith:er,toArray:tr,forEachEntry:rr,matchAll:ir,isHTMLForm:or,hasOwnProperty:ct,hasOwnProp:ct,reduceDescriptors:Lt,freezeMethods:cr,toObjectSet:ur,toCamelCase:sr,noop:lr,toFiniteNumber:dr,findKey:Ut,global:L,isContextDefined:$t,isSpecCompliantForm:fr,toJSONObject:pr,isAsyncFn:mr,isThenable:hr,setImmediate:Vt,asap:yr,isIterable:gr};function b(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.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 Ht=b.prototype,Qt={};["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=>{Qt[t]={value:t}});Object.defineProperties(b,Qt);Object.defineProperty(Ht,"isAxiosError",{value:!0});b.from=(t,e,n,r,i,o)=>{const s=Object.create(Ht);d.toFlatObject(t,s,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");const a=t&&t.message?t.message:"Error",c=e==null&&t?t.code:e;return b.call(s,a,c,n,r,i),t&&s.cause==null&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",o&&Object.assign(s,o),s};const br=null;function Ke(t){return d.isPlainObject(t)||d.isArray(t)}function Wt(t){return d.endsWith(t,"[]")?t.slice(0,-2):t}function ut(t,e,n){return t?t.concat(e).map(function(i,o){return i=Wt(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Sr(t){return d.isArray(t)&&!t.some(Ke)}const wr=d.toFlatObject(d,{},null,function(e){return/^is[A-Z]/.test(e)});function De(t,e,n){if(!d.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!d.isUndefined(m[y])});const r=n.metaTokens,i=n.visitor||l,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(e);if(!d.isFunction(i))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,m){let S=p;if(p&&!m&&typeof p=="object"){if(d.endsWith(y,"{}"))y=r?y:y.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&Sr(p)||(d.isFileList(p)||d.endsWith(y,"[]"))&&(S=d.toArray(p)))return y=Wt(y),S.forEach(function(A,x){!(d.isUndefined(A)||A===null)&&e.append(s===!0?ut([y],x,o):s===null?y:y+"[]",u(A))}),!1}return Ke(p)?!0:(e.append(ut(m,y,o),u(p)),!1)}const f=[],h=Object.assign(wr,{defaultVisitor:l,convertValue:u,isVisitable:Ke});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(S,T){(!(d.isUndefined(S)||S===null)&&i.call(e,S,d.isString(T)?T.trim():T,y,h))===!0&&g(S,y?y.concat(T):[T])}),f.pop()}}if(!d.isObject(t))throw new TypeError("data must be an object");return g(t),e}function lt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Ye(t,e){this._pairs=[],t&&De(t,this,e)}const zt=Ye.prototype;zt.append=function(e,n){this._pairs.push([e,n])};zt.toString=function(e){const n=e?function(r){return e.call(this,r,lt)}:lt;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function vr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Kt(t,e,n){if(!e)return t;const r=n&&n.encode||vr;d.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(e,n):o=d.isURLSearchParams(e)?e.toString():new Ye(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class dt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.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(r){r!==null&&e(r)})}}const Jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ar=typeof URLSearchParams<"u"?URLSearchParams:Ye,Er=typeof FormData<"u"?FormData:null,Or=typeof Blob<"u"?Blob:null,Tr={isBrowser:!0,classes:{URLSearchParams:Ar,FormData:Er,Blob:Or},protocols:["http","https","file","blob","url","data"]},Ze=typeof window<"u"&&typeof document<"u",Je=typeof navigator=="object"&&navigator||void 0,xr=Ze&&(!Je||["ReactNative","NativeScript","NS"].indexOf(Je.product)<0),Rr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kr=Ze&&window.location.href||"http://localhost",Nr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ze,hasStandardBrowserEnv:xr,hasStandardBrowserWebWorkerEnv:Rr,navigator:Je,origin:kr},Symbol.toStringTag,{value:"Module"})),O={...Nr,...Tr};function Cr(t,e){return De(t,new O.classes.URLSearchParams,{visitor:function(n,r,i,o){return O.isNode&&d.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function _r(t){return d.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Pr(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function Gt(t){function e(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=o>=n.length;return s=!s&&d.isArray(i)?i.length:s,c?(d.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!d.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&d.isArray(i[s])&&(i[s]=Pr(i[s])),!a)}if(d.isFormData(t)&&d.isFunction(t.entries)){const n={};return d.forEachEntry(t,(r,i)=>{e(_r(r),i,n,0)}),n}return null}function Dr(t,e,n){if(d.isString(t))try{return(e||JSON.parse)(t),d.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const le={transitional:Jt,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=d.isObject(e);if(o&&d.isHTMLForm(e)&&(e=new FormData(e)),d.isFormData(e))return i?JSON.stringify(Gt(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 n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Cr(e,this.formSerializer).toString();if((a=d.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return De(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Dr(e)):e}],transformResponse:[function(e){const n=this.transitional||le.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(d.isResponse(e)||d.isReadableStream(e))return e;if(e&&d.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}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=>{le.headers[t]={}});const qr=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"]),Fr=t=>{const e={};let n,r,i;return t&&t.split(`
2
- `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&qr[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},ft=Symbol("internals");function ie(t){return t&&String(t).trim().toLowerCase()}function Oe(t){return t===!1||t==null?t:d.isArray(t)?t.map(Oe):String(t)}function jr(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Mr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ve(t,e,n,r,i){if(d.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!d.isString(e)){if(d.isString(r))return e.indexOf(r)!==-1;if(d.isRegExp(r))return r.test(e)}}function Br(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Ir(t,e){const n=d.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}let k=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,c,u){const l=ie(c);if(!l)throw new Error("header name must be a non-empty string");const f=d.findKey(i,l);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||c]=Oe(a))}const s=(a,c)=>d.forEach(a,(u,l)=>o(u,l,c));if(d.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(d.isString(e)&&(e=e.trim())&&!Mr(e))s(Fr(e),n);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,n)}else e!=null&&o(n,e,r);return this}get(e,n){if(e=ie(e),e){const r=d.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return jr(i);if(d.isFunction(n))return n.call(this,i,r);if(d.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ie(e),e){const r=d.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ve(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=ie(s),s){const a=d.findKey(r,s);a&&(!n||Ve(r,r[a],a,n))&&(delete r[a],i=!0)}}return d.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||Ve(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return d.forEach(this,(i,o)=>{const s=d.findKey(r,o);if(s){n[s]=Oe(i),delete n[o];return}const a=e?Br(o):String(o).trim();a!==o&&delete n[o],n[a]=Oe(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return d.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&d.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[ft]=this[ft]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=ie(s);r[a]||(Ir(i,s),r[a]=!0)}return d.isArray(e)?e.forEach(o):o(e),this}};k.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);d.reduceDescriptors(k.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});d.freezeMethods(k);function He(t,e){const n=this||le,r=e||n,i=k.from(r.headers);let o=r.data;return d.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Xt(t){return!!(t&&t.__CANCEL__)}function ne(t,e,n){b.call(this,t??"canceled",b.ERR_CANCELED,e,n),this.name="CanceledError"}d.inherits(ne,b,{__CANCEL__:!0});function Yt(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new b("Request failed with status code "+n.status,[b.ERR_BAD_REQUEST,b.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ur(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function $r(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),l=r[o];s||(s=u),n[i]=c,r[i]=u;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-s<e)return;const g=l&&u-l;return g?Math.round(h*1e3/g):void 0}}function Lr(t,e){let n=0,r=1e3/e,i,o;const s=(u,l=Date.now())=>{n=l,i=null,o&&(clearTimeout(o),o=null),t(...u)};return[(...u)=>{const l=Date.now(),f=l-n;f>=r?s(u,l):(i=u,o||(o=setTimeout(()=>{o=null,s(i)},r-f)))},()=>i&&s(i)]}const Re=(t,e,n=3)=>{let r=0;const i=$r(50,250);return Lr(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,c=s-r,u=i(c),l=s<=a;r=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:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(f)},n)},pt=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},mt=t=>(...e)=>d.asap(()=>t(...e)),Vr=O.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,O.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(O.origin),O.navigator&&/(msie|trident)/i.test(O.navigator.userAgent)):()=>!0,Hr=O.hasStandardBrowserEnv?{write(t,e,n,r,i,o,s){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];d.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),d.isString(r)&&a.push(`path=${r}`),d.isString(i)&&a.push(`domain=${i}`),o===!0&&a.push("secure"),d.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Qr(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Wr(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Zt(t,e,n){let r=!Qr(e);return t&&(r||n==!1)?Wr(t,e):e}const ht=t=>t instanceof k?{...t}:t;function Q(t,e){e=e||{};const n={};function r(u,l,f,h){return d.isPlainObject(u)&&d.isPlainObject(l)?d.merge.call({caseless:h},u,l):d.isPlainObject(l)?d.merge({},l):d.isArray(l)?l.slice():l}function i(u,l,f,h){if(d.isUndefined(l)){if(!d.isUndefined(u))return r(void 0,u,f,h)}else return r(u,l,f,h)}function o(u,l){if(!d.isUndefined(l))return r(void 0,l)}function s(u,l){if(d.isUndefined(l)){if(!d.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function a(u,l,f){if(f in e)return r(u,l);if(f in t)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,l,f)=>i(ht(u),ht(l),f,!0)};return d.forEach(Object.keys({...t,...e}),function(l){const f=c[l]||i,h=f(t[l],e[l],l);d.isUndefined(h)&&f!==a||(n[l]=h)}),n}const en=t=>{const e=Q({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=e;if(e.headers=s=k.from(s),e.url=Kt(Zt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),d.isFormData(n)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(d.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,f])=>{u.includes(l.toLowerCase())&&s.set(l,f)})}}if(O.hasStandardBrowserEnv&&(r&&d.isFunction(r)&&(r=r(e)),r||r!==!1&&Vr(e.url))){const c=i&&o&&Hr.read(o);c&&s.set(i,c)}return e},zr=typeof XMLHttpRequest<"u",Kr=zr&&function(t){return new Promise(function(n,r){const i=en(t);let o=i.data;const s=k.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=i,l,f,h,g,p;function y(){g&&g(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(l),i.signal&&i.signal.removeEventListener("abort",l)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function S(){if(!m)return;const A=k.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:A,config:t,request:m};Yt(function(N){n(N),y()},function(N){r(N),y()},C),m=null}"onloadend"in m?m.onloadend=S:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(S)},m.onabort=function(){m&&(r(new b("Request aborted",b.ECONNABORTED,t,m)),m=null)},m.onerror=function(x){const C=x&&x.message?x.message:"Network Error",U=new b(C,b.ERR_NETWORK,t,m);U.event=x||null,r(U),m=null},m.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||Jt;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),r(new b(x,C.clarifyTimeoutError?b.ETIMEDOUT:b.ECONNABORTED,t,m)),m=null},o===void 0&&s.setContentType(null),"setRequestHeader"in m&&d.forEach(s.toJSON(),function(x,C){m.setRequestHeader(C,x)}),d.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),u&&([h,p]=Re(u,!0),m.addEventListener("progress",h)),c&&m.upload&&([f,g]=Re(c),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",g)),(i.cancelToken||i.signal)&&(l=A=>{m&&(r(!A||A.type?new ne(null,t,m):A),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(l),i.signal&&(i.signal.aborted?l():i.signal.addEventListener("abort",l)));const T=Ur(i.url);if(T&&O.protocols.indexOf(T)===-1){r(new b("Unsupported protocol "+T+":",b.ERR_BAD_REQUEST,t));return}m.send(o||null)})},Jr=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,a();const l=u instanceof Error?u:this.reason;r.abort(l instanceof b?l:new ne(l instanceof Error?l.message:l))}};let s=e&&setTimeout(()=>{s=null,o(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(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>d.asap(a),c}},Gr=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},Xr=async function*(t,e){for await(const n of Yr(t))yield*Gr(n,e)},Yr=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},yt=(t,e,n,r)=>{const i=Xr(t,e);let o=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await i.next();if(u){a(),c.close();return}let f=l.byteLength;if(n){let h=o+=f;n(h)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},gt=64*1024,{isFunction:ge}=d,Zr=(({Request:t,Response:e})=>({Request:t,Response:e}))(d.global),{ReadableStream:bt,TextEncoder:St}=d.global,wt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ei=t=>{t=d.merge.call({skipUndefined:!0},Zr,t);const{fetch:e,Request:n,Response:r}=t,i=e?ge(e):typeof fetch=="function",o=ge(n),s=ge(r);if(!i)return!1;const a=i&&ge(bt),c=i&&(typeof St=="function"?(p=>y=>p.encode(y))(new St):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&a&&wt(()=>{let p=!1;const y=new n(O.origin,{body:new bt,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!y}),l=s&&a&&wt(()=>d.isReadableStream(new r("").body)),f={stream:l&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!f[p]&&(f[p]=(y,m)=>{let S=y&&y[p];if(S)return S.call(y);throw new b(`Response type '${p}' is not supported`,b.ERR_NOT_SUPPORT,m)})});const h=async p=>{if(p==null)return 0;if(d.isBlob(p))return p.size;if(d.isSpecCompliantForm(p))return(await new n(O.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(d.isArrayBufferView(p)||d.isArrayBuffer(p))return p.byteLength;if(d.isURLSearchParams(p)&&(p=p+""),d.isString(p))return(await c(p)).byteLength},g=async(p,y)=>{const m=d.toFiniteNumber(p.getContentLength());return m??h(y)};return async p=>{let{url:y,method:m,data:S,signal:T,cancelToken:A,timeout:x,onDownloadProgress:C,onUploadProgress:U,responseType:N,headers:Ie,withCredentials:pe="same-origin",fetchOptions:tt}=en(p),nt=e||fetch;N=N?(N+"").toLowerCase():"text";let me=Jr([T,A&&A.toAbortSignal()],x),re=null;const $=me&&me.unsubscribe&&(()=>{me.unsubscribe()});let rt;try{if(U&&u&&m!=="get"&&m!=="head"&&(rt=await g(Ie,S))!==0){let M=new n(y,{method:"POST",body:S,duplex:"half"}),z;if(d.isFormData(S)&&(z=M.headers.get("content-type"))&&Ie.setContentType(z),M.body){const[Ue,he]=pt(rt,Re(mt(U)));S=yt(M.body,gt,Ue,he)}}d.isString(pe)||(pe=pe?"include":"omit");const q=o&&"credentials"in n.prototype,it={...tt,signal:me,method:m.toUpperCase(),headers:Ie.normalize().toJSON(),body:S,duplex:"half",credentials:q?pe:void 0};re=o&&new n(y,it);let j=await(o?nt(re,tt):nt(y,it));const ot=l&&(N==="stream"||N==="response");if(l&&(C||ot&&$)){const M={};["status","statusText","headers"].forEach(st=>{M[st]=j[st]});const z=d.toFiniteNumber(j.headers.get("content-length")),[Ue,he]=C&&pt(z,Re(mt(C),!0))||[];j=new r(yt(j.body,gt,Ue,()=>{he&&he(),$&&$()}),M)}N=N||"text";let mn=await f[d.findKey(f,N)||"text"](j,p);return!ot&&$&&$(),await new Promise((M,z)=>{Yt(M,z,{data:mn,headers:k.from(j.headers),status:j.status,statusText:j.statusText,config:p,request:re})})}catch(q){throw $&&$(),q&&q.name==="TypeError"&&/Load failed|fetch/i.test(q.message)?Object.assign(new b("Network Error",b.ERR_NETWORK,p,re),{cause:q.cause||q}):b.from(q,q&&q.code,p,re)}}},ti=new Map,tn=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:i}=e,o=[r,i,n];let s=o.length,a=s,c,u,l=ti;for(;a--;)c=o[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:ei(e)),l=u;return u};tn();const et={http:br,xhr:Kr,fetch:{get:tn}};d.forEach(et,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const vt=t=>`- ${t}`,ni=t=>d.isFunction(t)||t===null||t===!1;function ri(t,e){t=d.isArray(t)?t:[t];const{length:n}=t;let r,i;const o={};for(let s=0;s<n;s++){r=t[s];let a;if(i=r,!ni(r)&&(i=et[(a=String(r)).toLowerCase()],i===void 0))throw new b(`Unknown adapter '${a}'`);if(i&&(d.isFunction(i)||(i=i.get(e))))break;o[a||"#"+s]=i}if(!i){const s=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
4
- `+s.map(vt).join(`
5
- `):" "+vt(s[0]):"as no adapter specified";throw new b("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const nn={getAdapter:ri,adapters:et};function Qe(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ne(null,t)}function At(t){return Qe(t),t.headers=k.from(t.headers),t.data=He.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),nn.getAdapter(t.adapter||le.adapter,t)(t).then(function(r){return Qe(t),r.data=He.call(t,t.transformResponse,r),r.headers=k.from(r.headers),r},function(r){return Xt(r)||(Qe(t),r&&r.response&&(r.response.data=He.call(t,t.transformResponse,r.response),r.response.headers=k.from(r.response.headers))),Promise.reject(r)})}const rn="1.13.2",qe={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{qe[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Et={};qe.transitional=function(e,n,r){function i(o,s){return"[Axios v"+rn+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new b(i(s," has been removed"+(n?" in "+n:"")),b.ERR_DEPRECATED);return n&&!Et[s]&&(Et[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};qe.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function ii(t,e,n){if(typeof t!="object")throw new b("options must be an object",b.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],c=a===void 0||s(a,o,t);if(c!==!0)throw new b("option "+o+" must be "+c,b.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new b("Unknown option "+o,b.ERR_BAD_OPTION)}}const Te={assertOptions:ii,validators:qe},F=Te.validators;let V=class{constructor(e){this.defaults=e||{},this.interceptors={request:new dt,response:new dt}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Q(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Te.assertOptions(r,{silentJSONParsing:F.transitional(F.boolean),forcedJSONParsing:F.transitional(F.boolean),clarifyTimeoutError:F.transitional(F.boolean)},!1),i!=null&&(d.isFunction(i)?n.paramsSerializer={serialize:i}:Te.assertOptions(i,{encode:F.function,serialize:F.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Te.assertOptions(n,{baseUrl:F.spelling("baseURL"),withXsrfToken:F.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&d.merge(o.common,o[n.method]);o&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=k.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!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,h;if(!c){const p=[At.bind(this),void 0];for(p.unshift(...a),p.push(...u),h=p.length,l=Promise.resolve(n);f<h;)l=l.then(p[f++],p[f++]);return l}h=a.length;let g=n;for(;f<h;){const p=a[f++],y=a[f++];try{g=p(g)}catch(m){y.call(this,m);break}}try{l=At.call(this,g)}catch(p){return Promise.reject(p)}for(f=0,h=u.length;f<h;)l=l.then(u[f++],u[f++]);return l}getUri(e){e=Q(this.defaults,e);const n=Zt(e.baseURL,e.url,e.allowAbsoluteUrls);return Kt(n,e.params,e.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(e){V.prototype[e]=function(n,r){return this.request(Q(r||{},{method:e,url:n,data:(r||{}).data}))}});d.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(Q(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}V.prototype[e]=n(),V.prototype[e+"Form"]=n(!0)});let oi=class on{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new ne(o,s,a),n(r.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 n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new on(function(i){e=i}),cancel:e}}};function si(t){return function(n){return t.apply(null,n)}}function ai(t){return d.isObject(t)&&t.isAxiosError===!0}const Ge={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ge).forEach(([t,e])=>{Ge[e]=t});function sn(t){const e=new V(t),n=jt(V.prototype.request,e);return d.extend(n,V.prototype,e,{allOwnKeys:!0}),d.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return sn(Q(t,i))},n}const w=sn(le);w.Axios=V;w.CanceledError=ne;w.CancelToken=oi;w.isCancel=Xt;w.VERSION=rn;w.toFormData=De;w.AxiosError=b;w.Cancel=w.CanceledError;w.all=function(e){return Promise.all(e)};w.spread=si;w.isAxiosError=ai;w.mergeConfig=Q;w.AxiosHeaders=k;w.formToJSON=t=>Gt(d.isHTMLForm(t)?new FormData(t):t);w.getAdapter=nn.getAdapter;w.HttpStatusCode=Ge;w.default=w;const{Axios:ji,AxiosError:Ot,CanceledError:Mi,isCancel:Bi,CancelToken:Ii,VERSION:Ui,all:$i,Cancel:Li,isAxiosError:Vi,spread:Hi,toFormData:Qi,AxiosHeaders:Wi,HttpStatusCode:zi,formToJSON:Ki,getAdapter:Ji,mergeConfig:Gi}=w,ci=t=>(t&&xe.lodashExports.some(t,e=>e&&e?.errorCode!==void 0)||t?.errorCode!==void 0)&&t!==void 0,Tt=typeof window<"u";class an{constructor(e={}){this.requestStrategy=async(n,r)=>{await r(n)},this.responseStrategy=async(n,r)=>{await r(n)},this.defaultBaseUrl=e.defaultBaseUrl,this.useGlobalSingletons=e.useGlobalSingletons??!1,this.globalQueryClientKey=e.globalQueryClientKey||"__STORE_QUERY_CLIENT__",this.globalAxiosKey=e.globalAxiosKey||"__STORE_API_CLIENT__",this.createQueryClientImpl=e.createQueryClient||(()=>new ke.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})),this.createAxiosImpl=e.createAxios||(n=>{const r=w.create({baseURL:n||this.defaultBaseUrl,withCredentials:!0});return this.configureAxios(r)})}getQueryClient(e){if(Tt){if(e?.client)return e.client;if(this.useGlobalSingletons){const n=globalThis,r=n[this.globalQueryClientKey];if(r)return r;const i=this.createQueryClientImpl();return n[this.globalQueryClientKey]=i,i}return this.queryClientSingleton||(this.queryClientSingleton=this.createQueryClientImpl()),this.queryClientSingleton}return this.createQueryClientImpl()}getAxiosInstance(){if(Tt){if(this.useGlobalSingletons){const e=globalThis,n=e[this.globalAxiosKey];if(n)return n;const r=this.configureAxios(this.createAxiosImpl());return e[this.globalAxiosKey]=r,r}return this.axiosSingleton||(this.axiosSingleton=this.configureAxios(this.createAxiosImpl())),this.axiosSingleton}return this.configureAxios(this.createAxiosImpl())}setDefaultApiBaseUrl(e){this.defaultBaseUrl=e}async setApiUrl(e){const n=this.getAxiosInstance();n.defaults.baseURL=e}setRequestInterceptorStrategy(e){this.requestStrategy=e,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}setResponseInterceptorStrategy(e){this.responseStrategy=e,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}getAxiosProxy(){return new Proxy({},{get:(e,n)=>{const r=this.getAxiosInstance(),i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i},set:(e,n,r)=>Reflect.set(this.getAxiosInstance(),n,r)})}getQueryClientProxy(){return new Proxy({},{get:(e,n)=>{const r=this.getQueryClient(),i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i},set:(e,n,r)=>Reflect.set(this.getQueryClient(),n,r)})}configureAxios(e){return e.interceptors.request.clear(),e.interceptors.response.clear(),e.interceptors.request.use(async n=>{const r=async i=>{};return await this.requestStrategy(n,r),n}),e.interceptors.response.use(async n=>{const r=async i=>{};return await this.responseStrategy(n,r),n}),e}}const cn="auth_token",ui="lang",li="currencyCode",Fe=new an({createQueryClient:()=>new ke.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}}),createAxios:t=>w.create({baseURL:t,withCredentials:!0,headers:{"vendure-token":""}}),useGlobalSingletons:!0,globalQueryClientKey:"__STORE_QUERY_CLIENT__",globalAxiosKey:"__STORE_API_CLIENT__"});Fe.setRequestInterceptorStrategy(async(t,e)=>{const n=await B.getItem(cn),r=await B.getItem("channelToken"),i=await B.getItem(li),o=await B.getItem(ui);n&&(t.headers.Authorization=`Bearer ${n}`),r&&(t.headers["vendure-token"]=r),t.params=t.params||{},i&&(t.params.currencyCode=i),o&&(t.params.languageCode=o),await e(t)});Fe.setResponseInterceptorStrategy(async(t,e)=>{const n=t.headers["vendure-auth-token"];if(n&&B.setItem(cn,n),ci(t.data.data)){const r=Object.values(t.data.data)[0],i=new Ot(r.errorCode);return i.response=t,i.config=t.config,Promise.reject(i)}if(t.data.errors?.length>0){const r=t.data.errors[0],i=new Ot(r.message);return i.response=t,i.config=t.config,Promise.reject(i)}await e(t)});Fe.getAxiosProxy();Fe.getQueryClientProxy();const di=globalThis.__STORE_SDK_CONTEXT__||=se.createContext(void 0),fi=()=>{const e=se.useContext(di)?.sdk;return e||console.error("You must wrap your component in a <DataProvider>"),e?.sdkType==="dummy"||e?.sdkType==="vendure",e};var P={},be={},Se={},we={},xt;function de(){if(xt)return we;xt=1,Object.defineProperty(we,"__esModule",{value:!0});var t;return function(e){e.Mutation="mutation",e.Query="query",e.Subscription="subscription"}(t||(t={})),we.default=t,we}var G={},oe={},Rt;function pi(){if(Rt)return oe;Rt=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.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 oe.isNestedField=t,oe}var kt;function fe(){if(kt)return G;kt=1;var t=G&&G.__assign||function(){return t=Object.assign||function(r){for(var i,o=1,s=arguments.length;o<s;o++){i=arguments[o];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},t.apply(this,arguments)};Object.defineProperty(G,"__esModule",{value:!0});var e=pi(),n=function(){function r(){}return r.resolveVariables=function(i){for(var o={},s=0,a=i;s<a.length;s++){var c=a[s],u=c.variables,l=c.fields;o=t(t(t({},o),u),l&&r.getNestedVariables(l)||{})}return o},r.queryDataNameAndArgumentMap=function(i){return i&&Object.keys(i).length?"(".concat(Object.entries(i).reduce(function(o,s,a){var c=s[0],u=s[1];return"".concat(o).concat(a!==0?", ":"").concat(u&&u.name?u.name:c,": $").concat(c)},""),")"):""},r.queryFieldsMap=function(i){var o=this;return i?i.map(function(s){if((0,e.isNestedField)(s))return r.queryNestedFieldMap(s);if(typeof s=="object"){var a="";return Object.entries(s).forEach(function(c,u,l){var f=c[0],h=c[1];a+="".concat(f," ").concat(h.length>0?"{ "+o.queryFieldsMap(h)+" }":""),u<l.length-1&&(a+=", ")}),a}else return"".concat(s)}).join(", "):""},r.operationOrAlias=function(i){return typeof i=="string"?i:"".concat(i.alias,": ").concat(i.name)},r.isFragment=function(i){var o;return(o=i?.fragment===!0)!==null&&o!==void 0?o:!1},r.operationOrFragment=function(i){return r.isFragment(i)?i.operation:r.operationOrAlias(i.operation)},r.getFragment=function(i){return r.isFragment(i)?"... on ":""},r.queryNestedFieldMap=function(i){return"".concat(r.getFragment(i)).concat(r.operationOrFragment(i)," ").concat(this.isFragment(i)?"":this.queryDataNameAndArgumentMap(i.variables)," ").concat(i.fields.length>0?"{ "+this.queryFieldsMap(i.fields)+" }":"")},r.queryVariablesMap=function(i,o){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(i),o&&typeof o=="object"&&a(r.getNestedVariables(o)),s},r.getNestedVariables=function(i){var o={};function s(a){return a?.forEach(function(c){if((0,e.isNestedField)(c))o=t(t(t({},c.variables),o),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],h=f[1];s(h)}}),o}return s(i),o},r.queryDataType=function(i){var o="String",s=typeof i=="object"?i.value:i;if(i?.type!=null)o=i.type;else{var a=Array.isArray(s)?s[0]:s;switch(typeof a){case"object":o="Object";break;case"boolean":o="Boolean";break;case"number":o=a%1===0?"Int":"Float";break}}return typeof i=="object"&&(i.list===!0?o="[".concat(o,"]"):Array.isArray(i.list)&&(o="[".concat(o).concat(i.list[0]?"!":"","]")),i.required&&(o+="!")),o},r}();return G.default=n,G}var Nt;function mi(){if(Nt)return Se;Nt=1,Object.defineProperty(Se,"__esModule",{value:!0});var t=de(),e=fe(),n=function(){function r(i){Array.isArray(i)?this.variables=e.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields,this.operation=i.operation)}return r.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(this.variables,this.operationTemplate(this.operation))},r.prototype.mutationsBuilder=function(i){var o=this,s=i.map(function(a){return o.operation=a.operation,o.variables=a.variables,o.fields=a.fields,o.operationTemplate(a.operation)});return this.operationWrapperTemplate(e.default.resolveVariables(i),s.join(`
7
- `))},r.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(i,o,s){return"".concat(i).concat(s!==0?", ":"").concat(o,": $").concat(o)},""),")"):""},r.prototype.queryDataArgumentAndTypeMap=function(i){return Object.keys(i).length?"(".concat(Object.keys(i).reduce(function(o,s,a){return"".concat(o).concat(a!==0?", ":"","$").concat(s,": ").concat(e.default.queryDataType(i[s]))},""),")"):""},r.prototype.operationWrapperTemplate=function(i,o){var s=typeof this.operation=="string"?this.operation:this.operation.name;return{query:"".concat(t.default.Mutation," ").concat(s.charAt(0).toUpperCase()+s.slice(1)," ").concat(this.queryDataArgumentAndTypeMap(i),` {
8
- `).concat(o,`
9
- }`),variables:e.default.queryVariablesMap(i)}},r.prototype.operationTemplate=function(i){var o=typeof i=="string"?i:"".concat(i.alias,": ").concat(i.name);return"".concat(o," ").concat(this.queryDataNameAndArgumentMap(),` {
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ke=require("./index-CR_HNPF-.js"),S=require("./index-Dg7Cnz9b.js"),se=require("react"),ze=require("@tanstack/react-query");function pr(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 O=pr(se),H=new ke.VendurePluginConfig({name:"badges",enableFeatures:{showBadges:({badges:t=[],parentComponent:e})=>{const r=e?H.getSettings().availablePositions[e]:H.getSettings().defaultPositions;return{badges:ke.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"]}}});H.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"]}]}]}]}});H.setRequests({getBadges:async()=>H.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 hr(t){const e=[];function r(o,s){const i=O.createContext(s),a=e.length;e.push(i);const c=l=>{const d=S.compilerRuntimeExports.c(8);let m,g,p;d[0]!==l?({scope:p,children:m,...g}=l,d[0]=l,d[1]=m,d[2]=g,d[3]=p):(m=d[1],g=d[2],p=d[3]);const y=p?.[t]?.[a]||i,h=g;let w;return d[4]!==y.Provider||d[5]!==m||d[6]!==h?(w=S.jsxRuntimeExports.jsx(y.Provider,{value:h,children:m}),d[4]=y.Provider,d[5]=m,d[6]=h,d[7]=w):w=d[7],w};c.displayName=o+"Provider";function u(l,d){const m=d?.[t]?.[a]||i,g=O.useContext(m);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${l}\` must be used within \`${o}\``)}return[c,u]}function n(){const o=e.map(s=>O.createContext(s));return function(i){const a=i?.[t]||o;return O.useMemo(()=>({[`__scope${t}`]:{...i,[t]:a}}),[i,a])}}return n.scopeName=t,[r,n]}function mr(t,e){if(e==="web")return t;const{src:r,alt:n,width:o,height:s,...i}=t,a=[typeof o=="number"?{width:o}:void 0,typeof s=="number"?{height:s}:void 0].filter(Boolean);let c;return a.length===1?c=a[0]:a.length>1&&(c=a),{...i,source:{uri:r},...c?{style:c}:{}}}function yr(t){const{src:e,alt:r,...n}=t;return e?{...n,source:{uri:e}}:n}const gr={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 br(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=gr[t];if(!n)return console.warn(`No native component mapping found for '${t}', falling back to View`),r.View;if(n==="Image"){const s=se.forwardRef((i,a)=>{const c=S.compilerRuntimeExports.c(5);if(!i.src)return null;let u;c[0]!==i?(u=yr(i),c[0]=i,c[1]=u):u=c[1];let l;return c[2]!==a||c[3]!==u?(l=S.jsxRuntimeExports.jsx(r.Image,{ref:a,...u}),c[2]=a,c[3]=u,c[4]=l):l=c[4],l});return s.displayName="PlatformPrimitiveImage",s}const o=r[n];return o||(console.warn(`Native component '${n}' not found, falling back to View`),r.View)}const wr=Symbol("radix.slottable");function Ar(...t){return e=>t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}function Sr(t,e){const r={...e};for(const n in e){const o=t[n],s=e[n];/^on[A-Z]/.test(n)?o&&s?r[n]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(r[n]=o):n==="style"?r[n]=Er(o,s):n==="className"&&(r[n]=[o,s].filter(Boolean).join(" "))}return{...t,...r}}function Er(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 s=>{const i=[t(s),e(s)];return n?n(i):i};if(typeof t=="function")return s=>{const i=e?[t(s),e]:t(s);return n?n(i):i};if(typeof e=="function")return s=>{const i=t?[t,e(s)]:e(s);return n?n(i):i};const o=[t,e].filter(Boolean);return n?n(o):o}function Or(t){return O.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===wr}function vr(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 Tr(t,e){const r=O.forwardRef((n,o)=>{const{children:s,...i}=n;if(O.isValidElement(s)){const a=vr(s),c=Sr(i,s.props);return s.type!==O.Fragment&&(c.ref=o?Ar(o,a):a),O.cloneElement(s,c)}return O.Children.count(s)>1?O.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}function Re(t,e=!1,r="div"){if(!e)return br(r,t);const n=Tr("Slot"),o=O.forwardRef((s,i)=>{const a=S.compilerRuntimeExports.c(15);let c,u;a[0]!==s?({children:c,...u}=s,a[0]=s,a[1]=c,a[2]=u):(c=a[1],u=a[2]);let l;if(a[3]!==c||a[4]!==i||a[5]!==u){l=Symbol.for("react.early_return_sentinel");e:{const m=O.Children.toArray(c),g=m.find(Or);if(g){const p=g.props.children,y=m.map(T=>T===g?O.Children.count(p)>1?O.Children.only(null):O.isValidElement(p)?p.props.children:null:T),h=O.isValidElement(p)?O.cloneElement(p,void 0,y):null;let w;a[7]!==i||a[8]!==u||a[9]!==h?(w=S.jsxRuntimeExports.jsx(n,{...u,ref:i,children:h}),a[7]=i,a[8]=u,a[9]=h,a[10]=w):w=a[10],l=w;break e}}a[3]=c,a[4]=i,a[5]=u,a[6]=l}else l=a[6];if(l!==Symbol.for("react.early_return_sentinel"))return l;let d;return a[11]!==c||a[12]!==i||a[13]!==u?(d=S.jsxRuntimeExports.jsx(n,{...u,ref:i,children:c}),a[11]=c,a[12]=i,a[13]=u,a[14]=d):d=a[14],d});return o.displayName="Slot",o}const Rr="debug",N=()=>{try{if(typeof window>"u"||typeof localStorage>"u")return!1;const t=localStorage.getItem(Rr);return t==="true"||t==="1"}catch{return!1}},xr=()=>{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)=>{N()&&console.log(...t(e,r,n))},info:(e,r,...n)=>{N()&&console.info(...t(e,r,n))},warn:(e,r,...n)=>{N()&&console.warn(...t(e,r,n))},error:(e,r,...n)=>{N()&&console.error(...t(e,r,n))},debug:(e,r,...n)=>{N()&&console.debug(...t(e,r,n))},group:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.group(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupCollapsed:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.groupCollapsed(r?n?`<${r}> ${n}`:`<${r}>`:n)}},groupEnd:()=>{N()&&console.groupEnd()},table:(e,r,n)=>{N()&&(r&&console.log(`<${r}>`),console.table(e,n))},time:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.time(r?n?`<${r}> ${n}`:`<${r}>`:n)}},timeEnd:(e,r)=>{if(N()){const n=typeof e=="string"?e:void 0;console.timeEnd(r?n?`<${r}> ${n}`:`<${r}>`:n)}}}},_r=xr();function Cr(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 Y;try{Y=require("@react-native-async-storage/async-storage").default}catch{Y=null}let He=null;try{const{AsyncLocalStorage:t}=require("node:async_hooks");He=new t}catch{He=null}const K=typeof window<"u"&&typeof window.localStorage<"u",z=!!Y,me={},Fe={getItem:async()=>null,setItem:async()=>{},removeItem:async()=>{}},Ie=()=>{try{return He?.getStore?.()??null}catch{return null}},Me={getItem:async t=>{const e=!K&&!z?Ie():null;return e?e.getItem(t):z?Y.getItem(t):K?new Promise(r=>{Promise.resolve().then(()=>{const n=window.localStorage.getItem(t),o=me[t];n!==o&&(me[t]=n||""),r(n)})}):Fe.getItem(t)},setItem:async(t,e)=>{const r=!K&&!z?Ie():null;return r?r.setItem(t,e):z?Y.setItem(t,e):K?new Promise((n,o)=>{Promise.resolve().then(()=>{try{window.localStorage.setItem(t,e);const s=window.localStorage.getItem(t);s===e?(me[t]=e,n()):o(new Error(`Failed to set localStorage item: expected "${e}", got "${s}"`))}catch(s){o(s)}})}):Fe.setItem(t,e)},removeItem:async t=>{const e=!K&&!z?Ie():null;return e?e.removeItem(t):z?Y.removeItem(t):K?new Promise((r,n)=>{Promise.resolve().then(()=>{try{window.localStorage.removeItem(t);const o=window.localStorage.getItem(t);o===null?(delete me[t],r()):n(new Error(`Failed to remove localStorage item: key "${t}" still exists with value "${o}"`))}catch(o){n(o)}})}):Fe.removeItem(t)}},it=50,M={get:async()=>{try{const t=await Me.getItem("eventHistory");return t?JSON.parse(t):[]}catch(t){return console.error("Error getting event history",t),[]}},set:async t=>{try{await Me.setItem("eventHistory",JSON.stringify(t.slice(-it)))}catch(e){console.error("Error setting event history",e)}},clear:async()=>{try{await Me.removeItem("eventHistory")}catch(t){console.error("Error clearing event history",t)}},push:async t=>{const e=await M.get();await M.set([{...t,timestamp:Date.now()},...e].slice(-it))},find:async t=>(await M.get()).find(r=>r.key===t.key&&r.identifier===t.identifier),filter:async(t,e)=>{const r=await M.get();return e?r.filter(e):r.filter(({key:n,identifier:o})=>(!n||t.key===n)&&(!o||t.identifier===o))}};function Pr(){const t=globalThis;return t.__HAUS_EVENT_EMITTER__||=Cr(),t.__HAUS_EVENT_EMITTER__}function Q(t){const e=Pr(),r=((...c)=>console.error(...c));M.get().then(c=>{const l=ke.lodashExports.first(c)?.timestamp;l&&l<Date.now()-1e3*60*60&&(_r.info("Clearing event history since it is older than 1 hour:","eventBus",l),M.clear())});const n=(c,u,l)=>{const d=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,d),()=>{o(c,u,l)}},o=(c,u,l)=>{const d=m=>{if(typeof m=="object"&&m!==null){const{identifier:g}=m;(!g||g===l)&&e.off(c,u)}};e.off(c,d)};return{on:n,off:o,once:(c,u,l)=>{const d=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,d,l)}};e.on(c,d)},emit:(c,u,...l)=>{const d={identifier:u,data:l.length===1?l[0]:l};M.push({key:c,identifier:u,payload:d.data}),e.emit(c,d)},getEventHistory:(c,u)=>M.filter({key:c,identifier:u})}}Q();Q();Q();Q();Q();Q();Q();const Nr=globalThis.__STORE_SDK_CONTEXT__||=se.createContext(void 0);function Bt(t,e){return function(){return t.apply(e,arguments)}}const{toString:qr}=Object.prototype,{getPrototypeOf:Je}=Object,{iterator:xe,toStringTag:Ft}=Symbol,_e=(t=>e=>{const r=qr.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),D=t=>(t=t.toLowerCase(),e=>_e(e)===t),Ce=t=>e=>typeof e===t,{isArray:ee}=Array,Z=Ce("undefined");function ie(t){return t!==null&&!Z(t)&&t.constructor!==null&&!Z(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const It=D("ArrayBuffer");function Dr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&It(t.buffer),e}const jr=Ce("string"),x=Ce("function"),Mt=Ce("number"),ae=t=>t!==null&&typeof t=="object",Br=t=>t===!0||t===!1,Ee=t=>{if(_e(t)!=="object")return!1;const e=Je(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Ft in t)&&!(xe in t)},Fr=t=>{if(!ae(t)||ie(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Ir=D("Date"),Mr=D("File"),Ur=D("Blob"),Lr=D("FileList"),$r=t=>ae(t)&&x(t.pipe),kr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||x(t.append)&&((e=_e(t))==="formdata"||e==="object"&&x(t.toString)&&t.toString()==="[object FormData]"))},Hr=D("URLSearchParams"),[Vr,Qr,Wr,Kr]=["ReadableStream","Request","Response","Headers"].map(D),zr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ce(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,o;if(typeof t!="object"&&(t=[t]),ee(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{if(ie(t))return;const s=r?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length;let a;for(n=0;n<i;n++)a=s[n],e.call(null,t[a],a,t)}}function Ut(t,e){if(ie(t))return null;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 $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Lt=t=>!Z(t)&&t!==$;function Ve(){const{caseless:t,skipUndefined:e}=Lt(this)&&this||{},r={},n=(o,s)=>{const i=t&&Ut(r,s)||s;Ee(r[i])&&Ee(o)?r[i]=Ve(r[i],o):Ee(o)?r[i]=Ve({},o):ee(o)?r[i]=o.slice():(!e||!Z(o))&&(r[i]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&ce(arguments[o],n);return r}const Jr=(t,e,r,{allOwnKeys:n}={})=>(ce(e,(o,s)=>{r&&x(o)?t[s]=Bt(o,r):t[s]=o},{allOwnKeys:n}),t),Gr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Xr=(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)},Yr=(t,e,r,n)=>{let o,s,i;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)i=o[s],(!n||n(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=r!==!1&&Je(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Zr=(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},en=t=>{if(!t)return null;if(ee(t))return t;let e=t.length;if(!Mt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},tn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Je(Uint8Array)),rn=(t,e)=>{const n=(t&&t[xe]).call(t);let o;for(;(o=n.next())&&!o.done;){const s=o.value;e.call(t,s[0],s[1])}},nn=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},on=D("HTMLFormElement"),sn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),at=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),an=D("RegExp"),$t=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};ce(r,(o,s)=>{let i;(i=e(o,s,t))!==!1&&(n[s]=i||o)}),Object.defineProperties(t,n)},cn=t=>{$t(t,(e,r)=>{if(x(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(x(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+"'")})}})},un=(t,e)=>{const r={},n=o=>{o.forEach(s=>{r[s]=!0})};return ee(t)?n(t):n(String(t).split(e)),r},ln=()=>{},fn=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function dn(t){return!!(t&&x(t.append)&&t[Ft]==="FormData"&&t[xe])}const pn=t=>{const e=new Array(10),r=(n,o)=>{if(ae(n)){if(e.indexOf(n)>=0)return;if(ie(n))return n;if(!("toJSON"in n)){e[o]=n;const s=ee(n)?[]:{};return ce(n,(i,a)=>{const c=r(i,o+1);!Z(c)&&(s[a]=c)}),e[o]=void 0,s}}return n};return r(t,0)},hn=D("AsyncFunction"),mn=t=>t&&(ae(t)||x(t))&&x(t.then)&&x(t.catch),kt=((t,e)=>t?setImmediate:e?((r,n)=>($.addEventListener("message",({source:o,data:s})=>{o===$&&s===r&&n.length&&n.shift()()},!1),o=>{n.push(o),$.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",x($.postMessage)),yn=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||kt,gn=t=>t!=null&&x(t[xe]),f={isArray:ee,isArrayBuffer:It,isBuffer:ie,isFormData:kr,isArrayBufferView:Dr,isString:jr,isNumber:Mt,isBoolean:Br,isObject:ae,isPlainObject:Ee,isEmptyObject:Fr,isReadableStream:Vr,isRequest:Qr,isResponse:Wr,isHeaders:Kr,isUndefined:Z,isDate:Ir,isFile:Mr,isBlob:Ur,isRegExp:an,isFunction:x,isStream:$r,isURLSearchParams:Hr,isTypedArray:tn,isFileList:Lr,forEach:ce,merge:Ve,extend:Jr,trim:zr,stripBOM:Gr,inherits:Xr,toFlatObject:Yr,kindOf:_e,kindOfTest:D,endsWith:Zr,toArray:en,forEachEntry:rn,matchAll:nn,isHTMLForm:on,hasOwnProperty:at,hasOwnProp:at,reduceDescriptors:$t,freezeMethods:cn,toObjectSet:un,toCamelCase:sn,noop:ln,toFiniteNumber:fn,findKey:Ut,global:$,isContextDefined:Lt,isSpecCompliantForm:dn,toJSONObject:pn,isAsyncFn:hn,isThenable:mn,setImmediate:kt,asap:yn,isIterable:gn};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)}f.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:f.toJSONObject(this.config),code:this.code,status:this.status}}});const Ht=b.prototype,Vt={};["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=>{Vt[t]={value:t}});Object.defineProperties(b,Vt);Object.defineProperty(Ht,"isAxiosError",{value:!0});b.from=(t,e,r,n,o,s)=>{const i=Object.create(Ht);f.toFlatObject(t,i,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");const a=t&&t.message?t.message:"Error",c=e==null&&t?t.code:e;return b.call(i,a,c,r,n,o),t&&i.cause==null&&Object.defineProperty(i,"cause",{value:t,configurable:!0}),i.name=t&&t.name||"Error",s&&Object.assign(i,s),i};const bn=null;function Qe(t){return f.isPlainObject(t)||f.isArray(t)}function Qt(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function ct(t,e,r){return t?t.concat(e).map(function(o,s){return o=Qt(o),!r&&s?"["+o+"]":o}).join(r?".":""):e}function wn(t){return f.isArray(t)&&!t.some(Qe)}const An=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function Pe(t,e,r){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=f.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!f.isUndefined(h[y])});const n=r.metaTokens,o=r.visitor||l,s=r.dots,i=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(f.isDate(p))return p.toISOString();if(f.isBoolean(p))return p.toString();if(!c&&f.isBlob(p))throw new b("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(p)||f.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(f.endsWith(y,"{}"))y=n?y:y.slice(0,-2),p=JSON.stringify(p);else if(f.isArray(p)&&wn(p)||(f.isFileList(p)||f.endsWith(y,"[]"))&&(w=f.toArray(p)))return y=Qt(y),w.forEach(function(E,R){!(f.isUndefined(E)||E===null)&&e.append(i===!0?ct([y],R,s):i===null?y:y+"[]",u(E))}),!1}return Qe(p)?!0:(e.append(ct(h,y,s),u(p)),!1)}const d=[],m=Object.assign(An,{defaultVisitor:l,convertValue:u,isVisitable:Qe});function g(p,y){if(!f.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(p),f.forEach(p,function(w,T){(!(f.isUndefined(w)||w===null)&&o.call(e,w,f.isString(T)?T.trim():T,y,m))===!0&&g(w,y?y.concat(T):[T])}),d.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return g(t),e}function ut(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Ge(t,e){this._pairs=[],t&&Pe(t,this,e)}const Wt=Ge.prototype;Wt.append=function(e,r){this._pairs.push([e,r])};Wt.toString=function(e){const r=e?function(n){return e.call(this,n,ut)}:ut;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Sn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Kt(t,e,r){if(!e)return t;const n=r&&r.encode||Sn;f.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(o?s=o(e,r):s=f.isURLSearchParams(e)?e.toString():new Ge(e,r).toString(n),s){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class lt{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(n){n!==null&&e(n)})}}const zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},En=typeof URLSearchParams<"u"?URLSearchParams:Ge,On=typeof FormData<"u"?FormData:null,vn=typeof Blob<"u"?Blob:null,Tn={isBrowser:!0,classes:{URLSearchParams:En,FormData:On,Blob:vn},protocols:["http","https","file","blob","url","data"]},Xe=typeof window<"u"&&typeof document<"u",We=typeof navigator=="object"&&navigator||void 0,Rn=Xe&&(!We||["ReactNative","NativeScript","NS"].indexOf(We.product)<0),xn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_n=Xe&&window.location.href||"http://localhost",Cn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Xe,hasStandardBrowserEnv:Rn,hasStandardBrowserWebWorkerEnv:xn,navigator:We,origin:_n},Symbol.toStringTag,{value:"Module"})),v={...Cn,...Tn};function Pn(t,e){return Pe(t,new v.classes.URLSearchParams,{visitor:function(r,n,o,s){return v.isNode&&f.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function Nn(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function qn(t){const e={},r=Object.keys(t);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],e[s]=t[s];return e}function Jt(t){function e(r,n,o,s){let i=r[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=s>=r.length;return i=!i&&f.isArray(o)?o.length:i,c?(f.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!a):((!o[i]||!f.isObject(o[i]))&&(o[i]=[]),e(r,n,o[i],s)&&f.isArray(o[i])&&(o[i]=qn(o[i])),!a)}if(f.isFormData(t)&&f.isFunction(t.entries)){const r={};return f.forEachEntry(t,(n,o)=>{e(Nn(n),o,r,0)}),r}return null}function Dn(t,e,r){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const ue={transitional:zt,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,s=f.isObject(e);if(s&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return o?JSON.stringify(Jt(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Pn(e,this.formSerializer).toString();if((a=f.isFileList(e))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Pe(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return s||o?(r.setContentType("application/json",!1),Dn(e)):e}],transformResponse:[function(e){const r=this.transitional||ue.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(n&&!this.responseType||o)){const i=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(a){if(i)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:v.classes.FormData,Blob:v.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{ue.headers[t]={}});const jn=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Bn=t=>{const e={};let r,n,o;return t&&t.split(`
2
+ `).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||e[r]&&jn[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},ft=Symbol("internals");function ne(t){return t&&String(t).trim().toLowerCase()}function Oe(t){return t===!1||t==null?t:f.isArray(t)?t.map(Oe):String(t)}function Fn(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 In=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ue(t,e,r,n,o){if(f.isFunction(n))return n.call(this,e,r);if(o&&(e=r),!!f.isString(e)){if(f.isString(n))return e.indexOf(n)!==-1;if(f.isRegExp(n))return n.test(e)}}function Mn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Un(t,e){const r=f.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(o,s,i){return this[n].call(this,e,o,s,i)},configurable:!0})})}let _=class{constructor(e){e&&this.set(e)}set(e,r,n){const o=this;function s(a,c,u){const l=ne(c);if(!l)throw new Error("header name must be a non-empty string");const d=f.findKey(o,l);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||c]=Oe(a))}const i=(a,c)=>f.forEach(a,(u,l)=>s(u,l,c));if(f.isPlainObject(e)||e instanceof this.constructor)i(e,r);else if(f.isString(e)&&(e=e.trim())&&!In(e))i(Bn(e),r);else if(f.isObject(e)&&f.isIterable(e)){let a={},c,u;for(const l of e){if(!f.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(c=a[u])?f.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}i(a,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=ne(e),e){const n=f.findKey(this,e);if(n){const o=this[n];if(!r)return o;if(r===!0)return Fn(o);if(f.isFunction(r))return r.call(this,o,n);if(f.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=ne(e),e){const n=f.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Ue(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let o=!1;function s(i){if(i=ne(i),i){const a=f.findKey(n,i);a&&(!r||Ue(n,n[a],a,r))&&(delete n[a],o=!0)}}return f.isArray(e)?e.forEach(s):s(e),o}clear(e){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const s=r[n];(!e||Ue(this,this[s],s,e,!0))&&(delete this[s],o=!0)}return o}normalize(e){const r=this,n={};return f.forEach(this,(o,s)=>{const i=f.findKey(n,s);if(i){r[i]=Oe(o),delete r[s];return}const a=e?Mn(s):String(s).trim();a!==s&&delete r[s],r[a]=Oe(o),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return f.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=e&&f.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(o=>n.set(o)),n}static accessor(e){const n=(this[ft]=this[ft]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=ne(i);n[a]||(Un(o,i),n[a]=!0)}return f.isArray(e)?e.forEach(s):s(e),this}};_.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(_.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});f.freezeMethods(_);function Le(t,e){const r=this||ue,n=e||r,o=_.from(n.headers);let s=n.data;return f.forEach(t,function(a){s=a.call(r,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function Gt(t){return!!(t&&t.__CANCEL__)}function te(t,e,r){b.call(this,t??"canceled",b.ERR_CANCELED,e,r),this.name="CanceledError"}f.inherits(te,b,{__CANCEL__:!0});function Xt(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 Ln(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function $n(t,e){t=t||10;const r=new Array(t),n=new Array(t);let o=0,s=0,i;return e=e!==void 0?e:1e3,function(c){const u=Date.now(),l=n[s];i||(i=u),r[o]=c,n[o]=u;let d=s,m=0;for(;d!==o;)m+=r[d++],d=d%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),u-i<e)return;const g=l&&u-l;return g?Math.round(m*1e3/g):void 0}}function kn(t,e){let r=0,n=1e3/e,o,s;const i=(u,l=Date.now())=>{r=l,o=null,s&&(clearTimeout(s),s=null),t(...u)};return[(...u)=>{const l=Date.now(),d=l-r;d>=n?i(u,l):(o=u,s||(s=setTimeout(()=>{s=null,i(o)},n-d)))},()=>o&&i(o)]}const Te=(t,e,r=3)=>{let n=0;const o=$n(50,250);return kn(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,c=i-n,u=o(c),l=i<=a;n=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},r)},dt=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},pt=t=>(...e)=>f.asap(()=>t(...e)),Hn=v.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,v.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(v.origin),v.navigator&&/(msie|trident)/i.test(v.navigator.userAgent)):()=>!0,Vn=v.hasStandardBrowserEnv?{write(t,e,r,n,o,s,i){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];f.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),f.isString(n)&&a.push(`path=${n}`),f.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),f.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Qn(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Wn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Yt(t,e,r){let n=!Qn(e);return t&&(n||r==!1)?Wn(t,e):e}const ht=t=>t instanceof _?{...t}:t;function V(t,e){e=e||{};const r={};function n(u,l,d,m){return f.isPlainObject(u)&&f.isPlainObject(l)?f.merge.call({caseless:m},u,l):f.isPlainObject(l)?f.merge({},l):f.isArray(l)?l.slice():l}function o(u,l,d,m){if(f.isUndefined(l)){if(!f.isUndefined(u))return n(void 0,u,d,m)}else return n(u,l,d,m)}function s(u,l){if(!f.isUndefined(l))return n(void 0,l)}function i(u,l){if(f.isUndefined(l)){if(!f.isUndefined(u))return n(void 0,u)}else return n(void 0,l)}function a(u,l,d){if(d in e)return n(u,l);if(d in t)return n(void 0,u)}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,l,d)=>o(ht(u),ht(l),d,!0)};return f.forEach(Object.keys({...t,...e}),function(l){const d=c[l]||o,m=d(t[l],e[l],l);f.isUndefined(m)&&d!==a||(r[l]=m)}),r}const Zt=t=>{const e=V({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=e;if(e.headers=i=_.from(i),e.url=Kt(Yt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),f.isFormData(r)){if(v.hasStandardBrowserEnv||v.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(f.isFunction(r.getHeaders)){const c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.includes(l.toLowerCase())&&i.set(l,d)})}}if(v.hasStandardBrowserEnv&&(n&&f.isFunction(n)&&(n=n(e)),n||n!==!1&&Hn(e.url))){const c=o&&s&&Vn.read(s);c&&i.set(o,c)}return e},Kn=typeof XMLHttpRequest<"u",zn=Kn&&function(t){return new Promise(function(r,n){const o=Zt(t);let s=o.data;const i=_.from(o.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=o,l,d,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 E=_.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),P={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:E,config:t,request:h};Xt(function(C){r(C),y()},function(C){n(C),y()},P),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(R){const P=R&&R.message?R.message:"Network Error",U=new b(P,b.ERR_NETWORK,t,h);U.event=R||null,n(U),h=null},h.ontimeout=function(){let R=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const P=o.transitional||zt;o.timeoutErrorMessage&&(R=o.timeoutErrorMessage),n(new b(R,P.clarifyTimeoutError?b.ETIMEDOUT:b.ECONNABORTED,t,h)),h=null},s===void 0&&i.setContentType(null),"setRequestHeader"in h&&f.forEach(i.toJSON(),function(R,P){h.setRequestHeader(P,R)}),f.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),a&&a!=="json"&&(h.responseType=o.responseType),u&&([m,p]=Te(u,!0),h.addEventListener("progress",m)),c&&h.upload&&([d,g]=Te(c),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(l=E=>{h&&(n(!E||E.type?new te(null,t,h):E),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const T=Ln(o.url);if(T&&v.protocols.indexOf(T)===-1){n(new b("Unsupported protocol "+T+":",b.ERR_BAD_REQUEST,t));return}h.send(s||null)})},Jn=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,o;const s=function(u){if(!o){o=!0,a();const l=u instanceof Error?u:this.reason;n.abort(l instanceof b?l:new te(l instanceof Error?l.message:l))}};let i=e&&setTimeout(()=>{i=null,s(new b(`timeout ${e} of ms exceeded`,b.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>f.asap(a),c}},Gn=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},Xn=async function*(t,e){for await(const r of Yn(t))yield*Gn(r,e)},Yn=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()}},mt=(t,e,r,n)=>{const o=Xn(t,e);let s=0,i,a=c=>{i||(i=!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 d=l.byteLength;if(r){let m=s+=d;r(m)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),o.return()}},{highWaterMark:2})},yt=64*1024,{isFunction:ye}=f,Zn=(({Request:t,Response:e})=>({Request:t,Response:e}))(f.global),{ReadableStream:gt,TextEncoder:bt}=f.global,wt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},eo=t=>{t=f.merge.call({skipUndefined:!0},Zn,t);const{fetch:e,Request:r,Response:n}=t,o=e?ye(e):typeof fetch=="function",s=ye(r),i=ye(n);if(!o)return!1;const a=o&&ye(gt),c=o&&(typeof bt=="function"?(p=>y=>p.encode(y))(new bt):async p=>new Uint8Array(await new r(p).arrayBuffer())),u=s&&a&&wt(()=>{let p=!1;const y=new r(v.origin,{body:new gt,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!y}),l=i&&a&&wt(()=>f.isReadableStream(new n("").body)),d={stream:l&&(p=>p.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(y,h)=>{let w=y&&y[p];if(w)return w.call(y);throw new b(`Response type '${p}' is not supported`,b.ERR_NOT_SUPPORT,h)})});const m=async p=>{if(p==null)return 0;if(f.isBlob(p))return p.size;if(f.isSpecCompliantForm(p))return(await new r(v.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(f.isArrayBufferView(p)||f.isArrayBuffer(p))return p.byteLength;if(f.isURLSearchParams(p)&&(p=p+""),f.isString(p))return(await c(p)).byteLength},g=async(p,y)=>{const h=f.toFiniteNumber(p.getContentLength());return h??m(y)};return async p=>{let{url:y,method:h,data:w,signal:T,cancelToken:E,timeout:R,onDownloadProgress:P,onUploadProgress:U,responseType:C,headers:je,withCredentials:de="same-origin",fetchOptions:et}=Zt(p),tt=e||fetch;C=C?(C+"").toLowerCase():"text";let pe=Jn([T,E&&E.toAbortSignal()],R),re=null;const L=pe&&pe.unsubscribe&&(()=>{pe.unsubscribe()});let rt;try{if(U&&u&&h!=="get"&&h!=="head"&&(rt=await g(je,w))!==0){let I=new r(y,{method:"POST",body:w,duplex:"half"}),W;if(f.isFormData(w)&&(W=I.headers.get("content-type"))&&je.setContentType(W),I.body){const[Be,he]=dt(rt,Te(pt(U)));w=mt(I.body,yt,Be,he)}}f.isString(de)||(de=de?"include":"omit");const j=s&&"credentials"in r.prototype,nt={...et,signal:pe,method:h.toUpperCase(),headers:je.normalize().toJSON(),body:w,duplex:"half",credentials:j?de:void 0};re=s&&new r(y,nt);let F=await(s?tt(re,et):tt(y,nt));const ot=l&&(C==="stream"||C==="response");if(l&&(P||ot&&L)){const I={};["status","statusText","headers"].forEach(st=>{I[st]=F[st]});const W=f.toFiniteNumber(F.headers.get("content-length")),[Be,he]=P&&dt(W,Te(pt(P),!0))||[];F=new n(mt(F.body,yt,Be,()=>{he&&he(),L&&L()}),I)}C=C||"text";let dr=await d[f.findKey(d,C)||"text"](F,p);return!ot&&L&&L(),await new Promise((I,W)=>{Xt(I,W,{data:dr,headers:_.from(F.headers),status:F.status,statusText:F.statusText,config:p,request:re})})}catch(j){throw L&&L(),j&&j.name==="TypeError"&&/Load failed|fetch/i.test(j.message)?Object.assign(new b("Network Error",b.ERR_NETWORK,p,re),{cause:j.cause||j}):b.from(j,j&&j.code,p,re)}}},to=new Map,er=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:o}=e,s=[n,o,r];let i=s.length,a=i,c,u,l=to;for(;a--;)c=s[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:eo(e)),l=u;return u};er();const Ye={http:bn,xhr:zn,fetch:{get:er}};f.forEach(Ye,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const At=t=>`- ${t}`,ro=t=>f.isFunction(t)||t===null||t===!1;function no(t,e){t=f.isArray(t)?t:[t];const{length:r}=t;let n,o;const s={};for(let i=0;i<r;i++){n=t[i];let a;if(o=n,!ro(n)&&(o=Ye[(a=String(n)).toLowerCase()],o===void 0))throw new b(`Unknown adapter '${a}'`);if(o&&(f.isFunction(o)||(o=o.get(e))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=r?i.length>1?`since :
4
+ `+i.map(At).join(`
5
+ `):" "+At(i[0]):"as no adapter specified";throw new b("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const tr={getAdapter:no,adapters:Ye};function $e(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new te(null,t)}function St(t){return $e(t),t.headers=_.from(t.headers),t.data=Le.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),tr.getAdapter(t.adapter||ue.adapter,t)(t).then(function(n){return $e(t),n.data=Le.call(t,t.transformResponse,n),n.headers=_.from(n.headers),n},function(n){return Gt(n)||($e(t),n&&n.response&&(n.response.data=Le.call(t,t.transformResponse,n.response),n.response.headers=_.from(n.response.headers))),Promise.reject(n)})}const rr="1.13.2",Ne={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ne[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Et={};Ne.transitional=function(e,r,n){function o(s,i){return"[Axios v"+rr+"] Transitional option '"+s+"'"+i+(n?". "+n:"")}return(s,i,a)=>{if(e===!1)throw new b(o(i," has been removed"+(r?" in "+r:"")),b.ERR_DEPRECATED);return r&&!Et[i]&&(Et[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,i,a):!0}};Ne.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function oo(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 s=n[o],i=e[s];if(i){const a=t[s],c=a===void 0||i(a,s,t);if(c!==!0)throw new b("option "+s+" must be "+c,b.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new b("Unknown option "+s,b.ERR_BAD_OPTION)}}const ve={assertOptions:oo,validators:Ne},B=ve.validators;let k=class{constructor(e){this.defaults=e||{},this.interceptors={request:new lt,response:new lt}}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 s=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
+ `+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=V(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:s}=r;n!==void 0&&ve.assertOptions(n,{silentJSONParsing:B.transitional(B.boolean),forcedJSONParsing:B.transitional(B.boolean),clarifyTimeoutError:B.transitional(B.boolean)},!1),o!=null&&(f.isFunction(o)?r.paramsSerializer={serialize:o}:ve.assertOptions(o,{encode:B.function,serialize:B.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),ve.assertOptions(r,{baseUrl:B.spelling("baseURL"),withXsrfToken:B.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&f.merge(s.common,s[r.method]);s&&f.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),r.headers=_.concat(i,s);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,d=0,m;if(!c){const p=[St.bind(this),void 0];for(p.unshift(...a),p.push(...u),m=p.length,l=Promise.resolve(r);d<m;)l=l.then(p[d++],p[d++]);return l}m=a.length;let g=r;for(;d<m;){const p=a[d++],y=a[d++];try{g=p(g)}catch(h){y.call(this,h);break}}try{l=St.call(this,g)}catch(p){return Promise.reject(p)}for(d=0,m=u.length;d<m;)l=l.then(u[d++],u[d++]);return l}getUri(e){e=V(this.defaults,e);const r=Yt(e.baseURL,e.url,e.allowAbsoluteUrls);return Kt(r,e.params,e.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(e){k.prototype[e]=function(r,n){return this.request(V(n||{},{method:e,url:r,data:(n||{}).data}))}});f.forEach(["post","put","patch"],function(e){function r(n){return function(s,i,a){return this.request(V(a||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}k.prototype[e]=r(),k.prototype[e+"Form"]=r(!0)});let so=class nr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(o=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](o);n._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{n.subscribe(a),s=a}).then(o);return i.cancel=function(){n.unsubscribe(s)},i},e(function(s,i,a){n.reason||(n.reason=new te(s,i,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 nr(function(o){e=o}),cancel:e}}};function io(t){return function(r){return t.apply(null,r)}}function ao(t){return f.isObject(t)&&t.isAxiosError===!0}const Ke={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ke).forEach(([t,e])=>{Ke[e]=t});function or(t){const e=new k(t),r=Bt(k.prototype.request,e);return f.extend(r,k.prototype,e,{allOwnKeys:!0}),f.extend(r,e,null,{allOwnKeys:!0}),r.create=function(o){return or(V(t,o))},r}const A=or(ue);A.Axios=k;A.CanceledError=te;A.CancelToken=so;A.isCancel=Gt;A.VERSION=rr;A.toFormData=Pe;A.AxiosError=b;A.Cancel=A.CanceledError;A.all=function(e){return Promise.all(e)};A.spread=io;A.isAxiosError=ao;A.mergeConfig=V;A.AxiosHeaders=_;A.formToJSON=t=>Jt(f.isHTMLForm(t)?new FormData(t):t);A.getAdapter=tr.getAdapter;A.HttpStatusCode=Ke;A.default=A;const{Axios:Co,AxiosError:Po,CanceledError:No,isCancel:qo,CancelToken:Do,VERSION:jo,all:Bo,Cancel:Fo,isAxiosError:Io,spread:Mo,toFormData:Uo,AxiosHeaders:Lo,HttpStatusCode:$o,formToJSON:ko,getAdapter:Ho,mergeConfig:Vo}=A,Ot=typeof window<"u";class co{constructor(e={}){this.requestStrategy=async(r,n)=>{await n(r)},this.responseStrategy=async(r,n)=>{await n(r)},this.defaultBaseUrl=e.defaultBaseUrl,this.useGlobalSingletons=e.useGlobalSingletons??!1,this.globalQueryClientKey=e.globalQueryClientKey||"__STORE_QUERY_CLIENT__",this.globalAxiosKey=e.globalAxiosKey||"__STORE_API_CLIENT__",this.createQueryClientImpl=e.createQueryClient||(()=>new ze.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})),this.createAxiosImpl=e.createAxios||(r=>{const n=A.create({baseURL:r||this.defaultBaseUrl,withCredentials:!0});return this.configureAxios(n)})}getQueryClient(e){if(Ot){if(e?.client)return e.client;if(this.useGlobalSingletons){const r=globalThis,n=r[this.globalQueryClientKey];if(n)return n;const o=this.createQueryClientImpl();return r[this.globalQueryClientKey]=o,o}return this.queryClientSingleton||(this.queryClientSingleton=this.createQueryClientImpl()),this.queryClientSingleton}return this.createQueryClientImpl()}getAxiosInstance(){if(Ot){if(this.useGlobalSingletons){const e=globalThis,r=e[this.globalAxiosKey];if(r)return r;const n=this.configureAxios(this.createAxiosImpl());return e[this.globalAxiosKey]=n,n}return this.axiosSingleton||(this.axiosSingleton=this.configureAxios(this.createAxiosImpl())),this.axiosSingleton}return this.configureAxios(this.createAxiosImpl())}setDefaultApiBaseUrl(e){this.defaultBaseUrl=e}async setApiUrl(e){const r=this.getAxiosInstance();r.defaults.baseURL=e}setRequestInterceptorStrategy(e){this.requestStrategy=e,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}setResponseInterceptorStrategy(e){this.responseStrategy=e,this.axiosSingleton&&(this.axiosSingleton=this.configureAxios(this.axiosSingleton))}getAxiosProxy(){return new Proxy({},{get:(e,r)=>{const n=this.getAxiosInstance(),o=Reflect.get(n,r);return typeof o=="function"?o.bind(n):o},set:(e,r,n)=>Reflect.set(this.getAxiosInstance(),r,n)})}getQueryClientProxy(){return new Proxy({},{get:(e,r)=>{const n=this.getQueryClient(),o=Reflect.get(n,r);return typeof o=="function"?o.bind(n):o},set:(e,r,n)=>Reflect.set(this.getQueryClient(),r,n)})}configureAxios(e){return e.interceptors.request.clear(),e.interceptors.response.clear(),e.interceptors.request.use(async r=>{const n=async o=>{};return await this.requestStrategy(r,n),r}),e.interceptors.response.use(async r=>{const n=async o=>{};return await this.responseStrategy(r,n),r}),e}}const vt="__HAUS_NAMED_HTTP_CLIENTS__",uo=typeof window<"u",sr="default";function Ze(){if(uo){const e=globalThis,r=e[vt];if(r)return r;const n={};return e[vt]=n,n}const t=Ze;return t._ssr||(t._ssr={}),t._ssr}function ir(t={}){return new co({createQueryClient:t.createQueryClient||(()=>new ze.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}})),createAxios:t.createAxios||(e=>A.create({baseURL:e??t.defaultBaseUrl,withCredentials:!0})),defaultBaseUrl:t.defaultBaseUrl,useGlobalSingletons:t.useGlobalSingletons,globalQueryClientKey:t.globalQueryClientKey,globalAxiosKey:t.globalAxiosKey})}function lo(t,e={},r={}){const n=Ze();if(n[t]&&!r.overwrite)return n[t];const o=ir(e);return n[t]=o,o}function fo(t,e={}){const r=Ze();return r[t]||(r[t]=ir(e)),r[t]}lo(sr,{useGlobalSingletons:!0,globalQueryClientKey:"__STORE_QUERY_CLIENT__",globalAxiosKey:"__STORE_API_CLIENT__"},{overwrite:!1});const ar=fo(sr,{createQueryClient:()=>new ze.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}}),createAxios:t=>A.create({baseURL:t,withCredentials:!0})});ar.getAxiosProxy();ar.getQueryClientProxy();var q={},ge={},be={},we={},Tt;function le(){if(Tt)return we;Tt=1,Object.defineProperty(we,"__esModule",{value:!0});var t;return(function(e){e.Mutation="mutation",e.Query="query",e.Subscription="subscription"})(t||(t={})),we.default=t,we}var J={},oe={},Rt;function po(){if(Rt)return oe;Rt=1,Object.defineProperty(oe,"__esModule",{value:!0}),oe.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 oe.isNestedField=t,oe}var xt;function fe(){if(xt)return J;xt=1;var t=J&&J.__assign||function(){return t=Object.assign||function(n){for(var o,s=1,i=arguments.length;s<i;s++){o=arguments[s];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(n[a]=o[a])}return n},t.apply(this,arguments)};Object.defineProperty(J,"__esModule",{value:!0});var e=po(),r=(function(){function n(){}return n.resolveVariables=function(o){for(var s={},i=0,a=o;i<a.length;i++){var c=a[i],u=c.variables,l=c.fields;s=t(t(t({},s),u),l&&n.getNestedVariables(l)||{})}return s},n.queryDataNameAndArgumentMap=function(o){return o&&Object.keys(o).length?"(".concat(Object.entries(o).reduce(function(s,i,a){var c=i[0],u=i[1];return"".concat(s).concat(a!==0?", ":"").concat(u&&u.name?u.name:c,": $").concat(c)},""),")"):""},n.queryFieldsMap=function(o){var s=this;return o?o.map(function(i){if((0,e.isNestedField)(i))return n.queryNestedFieldMap(i);if(typeof i=="object"){var a="";return Object.entries(i).forEach(function(c,u,l){var d=c[0],m=c[1];a+="".concat(d," ").concat(m.length>0?"{ "+s.queryFieldsMap(m)+" }":""),u<l.length-1&&(a+=", ")}),a}else return"".concat(i)}).join(", "):""},n.operationOrAlias=function(o){return typeof o=="string"?o:"".concat(o.alias,": ").concat(o.name)},n.isFragment=function(o){var s;return(s=o?.fragment===!0)!==null&&s!==void 0?s:!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,s){var i={},a=function(c){c&&Object.keys(c).map(function(u){i[u]=typeof c[u]=="object"?c[u].value:c[u]})};return a(o),s&&typeof s=="object"&&a(n.getNestedVariables(s)),i},n.getNestedVariables=function(o){var s={};function i(a){return a?.forEach(function(c){if((0,e.isNestedField)(c))s=t(t(t({},c.variables),s),c.fields&&i(c.fields));else if(typeof c=="object")for(var u=0,l=Object.entries(c);u<l.length;u++){var d=l[u],m=d[1];i(m)}}),s}return i(o),s},n.queryDataType=function(o){var s="String",i=typeof o=="object"?o.value:o;if(o?.type!=null)s=o.type;else{var a=Array.isArray(i)?i[0]:i;switch(typeof a){case"object":s="Object";break;case"boolean":s="Boolean";break;case"number":s=a%1===0?"Int":"Float";break}}return typeof o=="object"&&(o.list===!0?s="[".concat(s,"]"):Array.isArray(o.list)&&(s="[".concat(s).concat(o.list[0]?"!":"","]")),o.required&&(s+="!")),s},n})();return J.default=r,J}var _t;function ho(){if(_t)return be;_t=1,Object.defineProperty(be,"__esModule",{value:!0});var t=le(),e=fe(),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 s=this,i=o.map(function(a){return s.operation=a.operation,s.variables=a.variables,s.fields=a.fields,s.operationTemplate(a.operation)});return this.operationWrapperTemplate(e.default.resolveVariables(o),i.join(`
7
+ `))},n.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(o,s,i){return"".concat(o).concat(i!==0?", ":"").concat(s,": $").concat(s)},""),")"):""},n.prototype.queryDataArgumentAndTypeMap=function(o){return Object.keys(o).length?"(".concat(Object.keys(o).reduce(function(s,i,a){return"".concat(s).concat(a!==0?", ":"","$").concat(i,": ").concat(e.default.queryDataType(o[i]))},""),")"):""},n.prototype.operationWrapperTemplate=function(o,s){var i=typeof this.operation=="string"?this.operation:this.operation.name;return{query:"".concat(t.default.Mutation," ").concat(i.charAt(0).toUpperCase()+i.slice(1)," ").concat(this.queryDataArgumentAndTypeMap(o),` {
8
+ `).concat(s,`
9
+ }`),variables:e.default.queryVariablesMap(o)}},n.prototype.operationTemplate=function(o){var s=typeof o=="string"?o:"".concat(o.alias,": ").concat(o.name);return"".concat(s," ").concat(this.queryDataNameAndArgumentMap(),` {
10
10
  `).concat(this.queryFieldsMap(this.fields),`
11
- }`)},r.prototype.queryFieldsMap=function(i){var o=this;return Array.isArray(i)?i.map(function(s){return typeof s=="object"?"".concat(Object.keys(s)[0]," { ").concat(o.queryFieldsMap(Object.values(s)[0])," }"):"".concat(s)}).join(", "):""},r}();return Se.default=n,Se}var ve={},Ct;function hi(){if(Ct)return ve;Ct=1,Object.defineProperty(ve,"__esModule",{value:!0});var t=de(),e=fe(),n=function(){function r(i){this.queryDataType=function(o){var s="String",a=typeof o=="object"?o.value:o;if(o.type!==void 0)s=o.type;else switch(typeof a){case"object":s="Object";break;case"boolean":s="Boolean";break;case"number":s=a%1===0?"Int":"Float";break}return typeof o=="object"&&o.required&&(s+="!"),s},Array.isArray(i)?this.variables=e.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields||[],this.operation=i.operation)}return r.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate())},r.prototype.queriesBuilder=function(i){var o=this,s=function(){var a=[];return i.forEach(function(c){c&&(o.operation=c.operation,o.fields=c.fields,o.variables=c.variables,a.push(o.operationTemplate()))}),a.join(" ")};return this.operationWrapperTemplate(s())},r.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(i,o,s){return"".concat(i).concat(s!==0?", ":"").concat(o,": $").concat(o)},""),")"):""},r.prototype.queryDataArgumentAndTypeMap=function(){var i=this;return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(o,s,a){return"".concat(o).concat(a!==0?", ":"","$").concat(s,": ").concat(i.queryDataType(i.variables[s]))},""),")"):""},r.prototype.operationWrapperTemplate=function(i){var o=typeof this.operation=="string"?this.operation:this.operation.name;return{query:"".concat(t.default.Query," ").concat(o.charAt(0).toUpperCase()).concat(o.slice(1)," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(i," }"),variables:e.default.queryVariablesMap(this.variables)}},r.prototype.operationTemplate=function(){var i=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(i," ").concat(this.queryDataNameAndArgumentMap()," { nodes { ").concat(e.default.queryFieldsMap(this.fields)," } }")},r}();return ve.default=n,ve}var _t;function yi(){if(_t)return be;_t=1,Object.defineProperty(be,"__esModule",{value:!0});var t=mi(),e=hi();return be.default={DefaultAppSyncQueryAdapter:e.default,DefaultAppSyncMutationAdapter:t.default},be}var X={},Pt;function gi(){if(Pt)return X;Pt=1;var t=X&&X.__assign||function(){return t=Object.assign||function(i){for(var o,s=1,a=arguments.length;s<a;s++){o=arguments[s];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(i[c]=o[c])}return i},t.apply(this,arguments)};Object.defineProperty(X,"__esModule",{value:!0});var e=de(),n=fe(),r=function(){function i(o,s){var a=this;Array.isArray(o)?this.variables=n.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields,this.operation=o.operation),this.config={operationName:""},s&&Object.entries(s).forEach(function(c){var u=c[0],l=c[1];a.config[u]=l})}return i.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(e.default.Mutation,this.variables,this.operationTemplate(this.operation))},i.prototype.mutationsBuilder=function(o){var s=this,a=o.map(function(c){return s.operation=c.operation,s.variables=c.variables,s.fields=c.fields,s.operationTemplate(c.operation)});return this.operationWrapperTemplate(e.default.Mutation,n.default.resolveVariables(o),a.join(`
12
- `))},i.prototype.queryDataArgumentAndTypeMap=function(o){return this.fields&&typeof this.fields=="object"&&(o=t(t({},n.default.getNestedVariables(this.fields)),o)),o&&Object.keys(o).length>0?"(".concat(Object.keys(o).reduce(function(s,a,c){return"".concat(s).concat(c!==0?", ":"","$").concat(a,": ").concat(n.default.queryDataType(o[a]))},""),")"):""},i.prototype.operationWrapperTemplate=function(o,s,a){var c="".concat(o," ").concat(this.queryDataArgumentAndTypeMap(s),` {
11
+ }`)},n.prototype.queryFieldsMap=function(o){var s=this;return Array.isArray(o)?o.map(function(i){return typeof i=="object"?"".concat(Object.keys(i)[0]," { ").concat(s.queryFieldsMap(Object.values(i)[0])," }"):"".concat(i)}).join(", "):""},n})();return be.default=r,be}var Ae={},Ct;function mo(){if(Ct)return Ae;Ct=1,Object.defineProperty(Ae,"__esModule",{value:!0});var t=le(),e=fe(),r=(function(){function n(o){this.queryDataType=function(s){var i="String",a=typeof s=="object"?s.value:s;if(s.type!==void 0)i=s.type;else switch(typeof a){case"object":i="Object";break;case"boolean":i="Boolean";break;case"number":i=a%1===0?"Int":"Float";break}return typeof s=="object"&&s.required&&(i+="!"),i},Array.isArray(o)?this.variables=e.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields||[],this.operation=o.operation)}return n.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate())},n.prototype.queriesBuilder=function(o){var s=this,i=function(){var a=[];return o.forEach(function(c){c&&(s.operation=c.operation,s.fields=c.fields,s.variables=c.variables,a.push(s.operationTemplate()))}),a.join(" ")};return this.operationWrapperTemplate(i())},n.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(o,s,i){return"".concat(o).concat(i!==0?", ":"").concat(s,": $").concat(s)},""),")"):""},n.prototype.queryDataArgumentAndTypeMap=function(){var o=this;return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(s,i,a){return"".concat(s).concat(a!==0?", ":"","$").concat(i,": ").concat(o.queryDataType(o.variables[i]))},""),")"):""},n.prototype.operationWrapperTemplate=function(o){var s=typeof this.operation=="string"?this.operation:this.operation.name;return{query:"".concat(t.default.Query," ").concat(s.charAt(0).toUpperCase()).concat(s.slice(1)," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(o," }"),variables:e.default.queryVariablesMap(this.variables)}},n.prototype.operationTemplate=function(){var o=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(o," ").concat(this.queryDataNameAndArgumentMap()," { nodes { ").concat(e.default.queryFieldsMap(this.fields)," } }")},n})();return Ae.default=r,Ae}var Pt;function yo(){if(Pt)return ge;Pt=1,Object.defineProperty(ge,"__esModule",{value:!0});var t=ho(),e=mo();return ge.default={DefaultAppSyncQueryAdapter:e.default,DefaultAppSyncMutationAdapter:t.default},ge}var G={},Nt;function go(){if(Nt)return G;Nt=1;var t=G&&G.__assign||function(){return t=Object.assign||function(o){for(var s,i=1,a=arguments.length;i<a;i++){s=arguments[i];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(o[c]=s[c])}return o},t.apply(this,arguments)};Object.defineProperty(G,"__esModule",{value:!0});var e=le(),r=fe(),n=(function(){function o(s,i){var a=this;Array.isArray(s)?this.variables=r.default.resolveVariables(s):(this.variables=s.variables,this.fields=s.fields,this.operation=s.operation),this.config={operationName:""},i&&Object.entries(i).forEach(function(c){var u=c[0],l=c[1];a.config[u]=l})}return o.prototype.mutationBuilder=function(){return this.operationWrapperTemplate(e.default.Mutation,this.variables,this.operationTemplate(this.operation))},o.prototype.mutationsBuilder=function(s){var i=this,a=s.map(function(c){return i.operation=c.operation,i.variables=c.variables,i.fields=c.fields,i.operationTemplate(c.operation)});return this.operationWrapperTemplate(e.default.Mutation,r.default.resolveVariables(s),a.join(`
12
+ `))},o.prototype.queryDataArgumentAndTypeMap=function(s){return this.fields&&typeof this.fields=="object"&&(s=t(t({},r.default.getNestedVariables(this.fields)),s)),s&&Object.keys(s).length>0?"(".concat(Object.keys(s).reduce(function(i,a,c){return"".concat(i).concat(c!==0?", ":"","$").concat(a,": ").concat(r.default.queryDataType(s[a]))},""),")"):""},o.prototype.operationWrapperTemplate=function(s,i,a){var c="".concat(s," ").concat(this.queryDataArgumentAndTypeMap(i),` {
13
13
  `).concat(a,`
14
- }`);return this.config.operationName&&(c=c.replace("mutation","mutation ".concat(this.config.operationName))),{query:c,variables:n.default.queryVariablesMap(s,this.fields)}},i.prototype.operationTemplate=function(o){var s=typeof o=="string"?o:"".concat(o.alias,": ").concat(o.name);return"".concat(s," ").concat(n.default.queryDataNameAndArgumentMap(this.variables)," ").concat(this.fields&&this.fields.length>0?`{
15
- `.concat(n.default.queryFieldsMap(this.fields),`
16
- }`):"")},i}();return X.default=r,X}var Y={},Dt;function bi(){if(Dt)return Y;Dt=1;var t=Y&&Y.__assign||function(){return t=Object.assign||function(i){for(var o,s=1,a=arguments.length;s<a;s++){o=arguments[s];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(i[c]=o[c])}return i},t.apply(this,arguments)};Object.defineProperty(Y,"__esModule",{value:!0});var e=de(),n=fe(),r=function(){function i(o,s){var a=this;this.config={operationName:""},s&&Object.entries(s).forEach(function(c){var u=c[0],l=c[1];a.config[u]=l}),Array.isArray(o)?this.variables=n.default.resolveVariables(o):(this.variables=o.variables,this.fields=o.fields||[],this.operation=o.operation)}return i.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate(this.variables))},i.prototype.queriesBuilder=function(o){var s=this,a=function(){var c=[];return o.forEach(function(u){u&&(s.operation=u.operation,s.fields=u.fields,c.push(s.operationTemplate(u.variables)))}),c.join(" ")};return this.operationWrapperTemplate(a())},i.prototype.queryDataArgumentAndTypeMap=function(){var o=this.variables;return this.fields&&typeof this.fields=="object"&&(o=t(t({},n.default.getNestedVariables(this.fields)),o)),o&&Object.keys(o).length>0?"(".concat(Object.keys(o).reduce(function(s,a,c){return"".concat(s).concat(c!==0?", ":"","$").concat(a,": ").concat(n.default.queryDataType(o[a]))},""),")"):""},i.prototype.operationWrapperTemplate=function(o){var s="".concat(e.default.Query," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(o," }");return s=s.replace("query","query".concat(this.config.operationName!==""?" "+this.config.operationName:"")),{query:s,variables:n.default.queryVariablesMap(this.variables,this.fields)}},i.prototype.operationTemplate=function(o){var s=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(s," ").concat(o?n.default.queryDataNameAndArgumentMap(o):""," ").concat(this.fields&&this.fields.length>0?"{ "+n.default.queryFieldsMap(this.fields)+" }":"")},i}();return Y.default=r,Y}var Ae={},qt;function Si(){if(qt)return Ae;qt=1,Object.defineProperty(Ae,"__esModule",{value:!0});var t=de(),e=fe(),n=function(){function r(i){Array.isArray(i)?this.variables=e.default.resolveVariables(i):(this.variables=i.variables,this.fields=i.fields,this.operation=i.operation)}return r.prototype.subscriptionBuilder=function(){return this.operationWrapperTemplate(t.default.Subscription,this.variables,this.operationTemplate(this.operation))},r.prototype.subscriptionsBuilder=function(i){var o=this,s=i.map(function(a){return o.operation=a.operation,o.variables=a.variables,o.fields=a.fields,o.operationTemplate(a.operation)});return this.operationWrapperTemplate(t.default.Subscription,e.default.resolveVariables(i),s.join(`
17
- `))},r.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(i,o,s){return"".concat(i).concat(s!==0?", ":"").concat(o,": $").concat(o)},""),")"):""},r.prototype.queryDataArgumentAndTypeMap=function(i){return Object.keys(i).length?"(".concat(Object.keys(i).reduce(function(o,s,a){return"".concat(o).concat(a!==0?", ":"","$").concat(s,": ").concat(e.default.queryDataType(i[s]))},""),")"):""},r.prototype.operationWrapperTemplate=function(i,o,s){return{query:"".concat(i," ").concat(this.queryDataArgumentAndTypeMap(o),` {
18
- `).concat(s,`
19
- }`),variables:e.default.queryVariablesMap(o)}},r.prototype.operationTemplate=function(i){var o=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(o," ").concat(this.queryDataNameAndArgumentMap(),` {
14
+ }`);return this.config.operationName&&(c=c.replace("mutation","mutation ".concat(this.config.operationName))),{query:c,variables:r.default.queryVariablesMap(i,this.fields)}},o.prototype.operationTemplate=function(s){var i=typeof s=="string"?s:"".concat(s.alias,": ").concat(s.name);return"".concat(i," ").concat(r.default.queryDataNameAndArgumentMap(this.variables)," ").concat(this.fields&&this.fields.length>0?`{
15
+ `.concat(r.default.queryFieldsMap(this.fields),`
16
+ }`):"")},o})();return G.default=n,G}var X={},qt;function bo(){if(qt)return X;qt=1;var t=X&&X.__assign||function(){return t=Object.assign||function(o){for(var s,i=1,a=arguments.length;i<a;i++){s=arguments[i];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(o[c]=s[c])}return o},t.apply(this,arguments)};Object.defineProperty(X,"__esModule",{value:!0});var e=le(),r=fe(),n=(function(){function o(s,i){var a=this;this.config={operationName:""},i&&Object.entries(i).forEach(function(c){var u=c[0],l=c[1];a.config[u]=l}),Array.isArray(s)?this.variables=r.default.resolveVariables(s):(this.variables=s.variables,this.fields=s.fields||[],this.operation=s.operation)}return o.prototype.queryBuilder=function(){return this.operationWrapperTemplate(this.operationTemplate(this.variables))},o.prototype.queriesBuilder=function(s){var i=this,a=function(){var c=[];return s.forEach(function(u){u&&(i.operation=u.operation,i.fields=u.fields,c.push(i.operationTemplate(u.variables)))}),c.join(" ")};return this.operationWrapperTemplate(a())},o.prototype.queryDataArgumentAndTypeMap=function(){var s=this.variables;return this.fields&&typeof this.fields=="object"&&(s=t(t({},r.default.getNestedVariables(this.fields)),s)),s&&Object.keys(s).length>0?"(".concat(Object.keys(s).reduce(function(i,a,c){return"".concat(i).concat(c!==0?", ":"","$").concat(a,": ").concat(r.default.queryDataType(s[a]))},""),")"):""},o.prototype.operationWrapperTemplate=function(s){var i="".concat(e.default.Query," ").concat(this.queryDataArgumentAndTypeMap()," { ").concat(s," }");return i=i.replace("query","query".concat(this.config.operationName!==""?" "+this.config.operationName:"")),{query:i,variables:r.default.queryVariablesMap(this.variables,this.fields)}},o.prototype.operationTemplate=function(s){var i=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(i," ").concat(s?r.default.queryDataNameAndArgumentMap(s):""," ").concat(this.fields&&this.fields.length>0?"{ "+r.default.queryFieldsMap(this.fields)+" }":"")},o})();return X.default=n,X}var Se={},Dt;function wo(){if(Dt)return Se;Dt=1,Object.defineProperty(Se,"__esModule",{value:!0});var t=le(),e=fe(),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.subscriptionBuilder=function(){return this.operationWrapperTemplate(t.default.Subscription,this.variables,this.operationTemplate(this.operation))},n.prototype.subscriptionsBuilder=function(o){var s=this,i=o.map(function(a){return s.operation=a.operation,s.variables=a.variables,s.fields=a.fields,s.operationTemplate(a.operation)});return this.operationWrapperTemplate(t.default.Subscription,e.default.resolveVariables(o),i.join(`
17
+ `))},n.prototype.queryDataNameAndArgumentMap=function(){return this.variables&&Object.keys(this.variables).length?"(".concat(Object.keys(this.variables).reduce(function(o,s,i){return"".concat(o).concat(i!==0?", ":"").concat(s,": $").concat(s)},""),")"):""},n.prototype.queryDataArgumentAndTypeMap=function(o){return Object.keys(o).length?"(".concat(Object.keys(o).reduce(function(s,i,a){return"".concat(s).concat(a!==0?", ":"","$").concat(i,": ").concat(e.default.queryDataType(o[i]))},""),")"):""},n.prototype.operationWrapperTemplate=function(o,s,i){return{query:"".concat(o," ").concat(this.queryDataArgumentAndTypeMap(s),` {
18
+ `).concat(i,`
19
+ }`),variables:e.default.queryVariablesMap(s)}},n.prototype.operationTemplate=function(o){var s=typeof this.operation=="string"?this.operation:"".concat(this.operation.alias,": ").concat(this.operation.name);return"".concat(s," ").concat(this.queryDataNameAndArgumentMap(),` {
20
20
  `).concat(this.queryFieldsMap(this.fields),`
21
- }`)},r.prototype.queryFieldsMap=function(i){var o=this;return i?i.map(function(s){return typeof s=="object"?"".concat(Object.keys(s)[0]," { ").concat(o.queryFieldsMap(Object.values(s)[0])," }"):"".concat(s)}).join(", "):""},r}();return Ae.default=n,Ae}var Ft;function wi(){if(Ft)return P;Ft=1,Object.defineProperty(P,"__esModule",{value:!0}),P.adapters=P.query=P.mutation=P.subscription=void 0;var t=yi();P.adapters=t.default;var e=gi(),n=bi(),r=Si();function i(a,c,u){var l;if(Array.isArray(a)){if(c){var f=new c(a,u);return f.queriesBuilder(a)}return l=new n.default(a,u),l.queriesBuilder(a)}if(c){var f=new c(a,u);return f.queryBuilder()}return l=new n.default(a,u),l.queryBuilder()}P.query=i;function o(a,c,u){var l,f;return Array.isArray(a)?c?(l=new c(a,u),l.mutationsBuilder(a)):(f=new e.default(a,u),f.mutationsBuilder(a)):c?(l=new c(a,u),l.mutationBuilder()):(f=new e.default(a,u),f.mutationBuilder())}P.mutation=o;function s(a,c){var u,l;return Array.isArray(a)?c?(u=new c(a),u.subscriptionsBuilder(a)):(l=new r.default(a),l.subscriptionsBuilder(a)):c?(u=new c(a),u.subscriptionBuilder()):(l=new r.default(a),l.subscriptionBuilder())}return P.subscription=s,P}wi();const vi={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"EligiblePaymentMethods"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PaymentMethodQuote"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"code"}}]}}]},Ai={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"login"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"email"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"password"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"rememberMe"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"email"}}},{kind:"Argument",name:{kind:"Name",value:"password"},value:{kind:"Variable",name:{kind:"Name",value:"password"}}},{kind:"Argument",name:{kind:"Name",value:"rememberMe"},value:{kind:"Variable",name:{kind:"Name",value:"rememberMe"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CurrentUser"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"identifier"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Ei={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"logout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"logout"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}}]}}]}}]},Oi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]},Ti={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"transitionOrderToState"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"transitionOrderToState"},arguments:[{kind:"Argument",name:{kind:"Name",value:"state"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorResult"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"errorCode"}},{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},xi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"nextOrderStates"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nextOrderStates"}}]}}]},Ri={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EligiblePaymentMethods"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"eligiblePaymentMethods"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"EligiblePaymentMethods"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"EligiblePaymentMethods"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PaymentMethodQuote"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"code"}}]}}]},ki={"\n mutation login($email: String!, $password: String!, $rememberMe: Boolean) {\n login(username: $email, password: $password, rememberMe: $rememberMe) {\n __typename\n ... on CurrentUser {\n id\n identifier\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n":Ai,"\n mutation logout {\n logout {\n success\n }\n }\n":Ei,"\n query me {\n me {\n id\n }\n }\n":Oi,"\n mutation transitionOrderToState($input: String!) {\n transitionOrderToState(state: $input) {\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n":Ti,"\n query nextOrderStates {\n nextOrderStates\n }\n":xi,"\n fragment EligiblePaymentMethods on PaymentMethodQuote {\n id\n name\n description\n code\n }\n":vi,"\n query EligiblePaymentMethods {\n eligiblePaymentMethods {\n ...EligiblePaymentMethods\n }\n }\n":Ri};function je(t){return ki[t]??{}}je(`
22
- mutation transitionOrderToState($input: String!) {
23
- transitionOrderToState(state: $input) {
24
- ... on ErrorResult {
25
- errorCode
26
- message
27
- }
28
- }
29
- }
30
- `);je(`
31
- query nextOrderStates {
32
- nextOrderStates
33
- }
34
- `);je(`
35
- fragment EligiblePaymentMethods on PaymentMethodQuote {
36
- id
37
- name
38
- description
39
- code
40
- }
41
- `);je(`
42
- query EligiblePaymentMethods {
43
- eligiblePaymentMethods {
44
- ...EligiblePaymentMethods
45
- }
46
- }
47
- `);const un=new an({createQueryClient:()=>new ke.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!0,refetchOnMount:!1,retry:3,staleTime:1e3*60*5}}}),createAxios:t=>w.create({baseURL:t,withCredentials:!0})});un.getAxiosProxy();un.getQueryClientProxy();const Me=()=>{const t=v.compilerRuntimeExports.c(2),{getPlatform:e}=fi();let n;return t[0]!==e?(n=e(),t[0]=e,t[1]=n):n=t[1],n},Be="ProductBadge",[Ni]=yn(Be),[Ci,_i]=Ni(Be),ln=t=>{const e=v.compilerRuntimeExports.c(13);let n,r,i,o,s;e[0]!==t?({children:r,product:i,__scopeProductBadge:n,style:s,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=s):(n=e[1],r=e[2],i=e[3],o=e[4],s=e[5]);const a=se.useRef(null),c=Me();let u;e[6]!==c?(u=Ne(c),e[6]=c,e[7]=u):u=e[7];const l=u;if(!H.getEnabled())return null;const{badges:f}=i;if(!f)return null;const h=f.reduce(Di,{}),g=Object.keys(h),p={groupedBadges:h,badges:f,badgesRef:a,positions:g},y=v.renderChildren(r,p);let m;return e[8]!==l||e[9]!==o||e[10]!==s||e[11]!==y?(m=v.jsxRuntimeExports.jsx(l,{...o,style:s,children:y}),e[8]=l,e[9]=o,e[10]=s,e[11]=y,e[12]=m):m=e[12],v.jsxRuntimeExports.jsx(Ci,{scope:n,...p,children:m})};ln.displayName=Be;const dn=t=>{const e=v.compilerRuntimeExports.c(18);let n,r,i,o,s;e[0]!==t?({children:i,position:o,asChild:r,__scopeProductBadge:n,...s}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=s):(n=e[1],r=e[2],i=e[3],o=e[4],s=e[5]);const a=Me();let c;e[6]!==r||e[7]!==a?(c=Ne(a,r,"div"),e[6]=r,e[7]=a,e[8]=c):c=e[8];const u=c,{groupedBadges:l}=_i(Be,n),f=l[o];let h;e[9]!==f||e[10]!==i||e[11]!==o?(h=v.renderChildren(i,{badges:f,position:o}),e[9]=f,e[10]=i,e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==u||e[14]!==o||e[15]!==s||e[16]!==h?(g=v.jsxRuntimeExports.jsx(u,{...s,"data-position":o,children:h}),e[13]=u,e[14]=o,e[15]=s,e[16]=h,e[17]=g):g=e[17],g},fn=t=>{const e=v.compilerRuntimeExports.c(13);let n,r,i,o;e[0]!==t?({children:i,asChild:n,badge:r,...o}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o):(n=e[1],r=e[2],i=e[3],o=e[4]);const s=Me();let a;e[5]!==n||e[6]!==s?(a=Ne(s,n,"div"),e[5]=n,e[6]=s,e[7]=a):a=e[7];const c=a,u=r?.id;let l;return e[8]!==c||e[9]!==i||e[10]!==o||e[11]!==u?(l=v.jsxRuntimeExports.jsx(c,{...o,"data-badge-id":u,children:i}),e[8]=c,e[9]=i,e[10]=o,e[11]=u,e[12]=l):l=e[12],l},pn=t=>{const e=v.compilerRuntimeExports.c(8),{badge:n,asChild:r,...i}=t,o=Me();let s;e[0]!==r||e[1]!==o?(s=Ne(o,r,"img"),e[0]=r,e[1]=o,e[2]=s):s=e[2];const a=s,c=gn(i,o),u=n.asset?.preview;let l;return e[3]!==a||e[4]!==n.collection.name||e[5]!==u||e[6]!==c?(l=v.jsxRuntimeExports.jsx(a,{src:u,alt:n.collection.name,"data-badge-name":n.collection.name,...c}),e[3]=a,e[4]=n.collection.name,e[5]=u,e[6]=c,e[7]=l):l=e[7],l};dn.displayName="ProductBadgeGroup";fn.displayName="ProductBadgeItem";pn.displayName="ProductBadgeImage";const Pi={Root:ln,Group:dn,Item:fn,Image:pn};function Di(t,e){return t[e.position]||(t[e.position]=[]),t[e.position].push(e),t}exports.ProductBadge=Pi;exports.VendureBadgePlugin=H;
21
+ }`)},n.prototype.queryFieldsMap=function(o){var s=this;return o?o.map(function(i){return typeof i=="object"?"".concat(Object.keys(i)[0]," { ").concat(s.queryFieldsMap(Object.values(i)[0])," }"):"".concat(i)}).join(", "):""},n})();return Se.default=r,Se}var jt;function Ao(){if(jt)return q;jt=1,Object.defineProperty(q,"__esModule",{value:!0}),q.adapters=q.query=q.mutation=q.subscription=void 0;var t=yo();q.adapters=t.default;var e=go(),r=bo(),n=wo();function o(a,c,u){var l;if(Array.isArray(a)){if(c){var d=new c(a,u);return d.queriesBuilder(a)}return l=new r.default(a,u),l.queriesBuilder(a)}if(c){var d=new c(a,u);return d.queryBuilder()}return l=new r.default(a,u),l.queryBuilder()}q.query=o;function s(a,c,u){var l,d;return Array.isArray(a)?c?(l=new c(a,u),l.mutationsBuilder(a)):(d=new e.default(a,u),d.mutationsBuilder(a)):c?(l=new c(a,u),l.mutationBuilder()):(d=new e.default(a,u),d.mutationBuilder())}q.mutation=s;function i(a,c){var u,l;return Array.isArray(a)?c?(u=new c(a),u.subscriptionsBuilder(a)):(l=new n.default(a),l.subscriptionsBuilder(a)):c?(u=new c(a),u.subscriptionBuilder()):(l=new n.default(a),l.subscriptionBuilder())}return q.subscription=i,q}Ao();const So=()=>{const e=se.useContext(Nr)?.sdk;return e||console.error("You must wrap your component in a <DataProvider>"),e?.sdkType==="dummy"||e?.sdkType==="vendure",e},qe=()=>{const t=S.compilerRuntimeExports.c(2),{getPlatform:e}=So();let r;return t[0]!==e?(r=e(),t[0]=e,t[1]=r):r=t[1],r},De="ProductBadge",[Eo]=hr(De),[Oo,vo]=Eo(De),cr=t=>{const e=S.compilerRuntimeExports.c(13);let r,n,o,s,i;e[0]!==t?({children:n,product:o,__scopeProductBadge:r,style:i,...s}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=s,e[5]=i):(r=e[1],n=e[2],o=e[3],s=e[4],i=e[5]);const a=se.useRef(null),c=qe();let u;e[6]!==c?(u=Re(c),e[6]=c,e[7]=u):u=e[7];const l=u;if(!H.getEnabled())return null;const{badges:d}=o;if(!d)return null;const m=d.reduce(Ro,{}),g=Object.keys(m),p={groupedBadges:m,badges:d,badgesRef:a,positions:g},y=S.renderChildren(n,p);let h;return e[8]!==l||e[9]!==s||e[10]!==i||e[11]!==y?(h=S.jsxRuntimeExports.jsx(l,{...s,style:i,children:y}),e[8]=l,e[9]=s,e[10]=i,e[11]=y,e[12]=h):h=e[12],S.jsxRuntimeExports.jsx(Oo,{scope:r,...p,children:h})};cr.displayName=De;const ur=t=>{const e=S.compilerRuntimeExports.c(18);let r,n,o,s,i;e[0]!==t?({children:o,position:s,asChild:n,__scopeProductBadge:r,...i}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=s,e[5]=i):(r=e[1],n=e[2],o=e[3],s=e[4],i=e[5]);const a=qe();let c;e[6]!==n||e[7]!==a?(c=Re(a,n,"div"),e[6]=n,e[7]=a,e[8]=c):c=e[8];const u=c,{groupedBadges:l}=vo(De,r),d=l[s];let m;e[9]!==d||e[10]!==o||e[11]!==s?(m=S.renderChildren(o,{badges:d,position:s}),e[9]=d,e[10]=o,e[11]=s,e[12]=m):m=e[12];let g;return e[13]!==u||e[14]!==s||e[15]!==i||e[16]!==m?(g=S.jsxRuntimeExports.jsx(u,{...i,"data-position":s,children:m}),e[13]=u,e[14]=s,e[15]=i,e[16]=m,e[17]=g):g=e[17],g},lr=t=>{const e=S.compilerRuntimeExports.c(13);let r,n,o,s;e[0]!==t?({children:o,asChild:r,badge:n,...s}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=o,e[4]=s):(r=e[1],n=e[2],o=e[3],s=e[4]);const i=qe();let a;e[5]!==r||e[6]!==i?(a=Re(i,r,"div"),e[5]=r,e[6]=i,e[7]=a):a=e[7];const c=a,u=n?.id;let l;return e[8]!==c||e[9]!==o||e[10]!==s||e[11]!==u?(l=S.jsxRuntimeExports.jsx(c,{...s,"data-badge-id":u,children:o}),e[8]=c,e[9]=o,e[10]=s,e[11]=u,e[12]=l):l=e[12],l},fr=t=>{const e=S.compilerRuntimeExports.c(8),{badge:r,asChild:n,...o}=t,s=qe();let i;e[0]!==n||e[1]!==s?(i=Re(s,n,"img"),e[0]=n,e[1]=s,e[2]=i):i=e[2];const a=i,c=mr(o,s),u=r.asset?.preview;let l;return e[3]!==a||e[4]!==r.collection.name||e[5]!==u||e[6]!==c?(l=S.jsxRuntimeExports.jsx(a,{src:u,alt:r.collection.name,"data-badge-name":r.collection.name,...c}),e[3]=a,e[4]=r.collection.name,e[5]=u,e[6]=c,e[7]=l):l=e[7],l};ur.displayName="ProductBadgeGroup";lr.displayName="ProductBadgeItem";fr.displayName="ProductBadgeImage";const To={Root:cr,Group:ur,Item:lr,Image:fr};function Ro(t,e){return t[e.position]||(t[e.position]=[]),t[e.position].push(e),t}exports.ProductBadge=To;exports.VendureBadgePlugin=H;