@haus-storefront-react/vendure-plugin-configs 0.0.7 → 0.0.8

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/badge.mjs CHANGED
@@ -1,15 +1,22 @@
1
- import { V as a, l as d } from "./index-RBMJ45wv.mjs";
2
- const t = new a({
1
+ import { V as pn, l as Pt } from "./index-Wcc0o6jA.mjs";
2
+ import { c as X, j as C, b as be, t as mn, r as qt } from "./index-DZ5mwdPZ.mjs";
3
+ import * as A from "react";
4
+ import { createContext as pe, useContext as hn, useRef as yn } from "react";
5
+ import { initReactI18next as Ye } from "react-i18next";
6
+ import Ze from "i18next";
7
+ import { QueryClient as Me } from "@tanstack/react-query";
8
+ import { StyleSheet as ie } from "react-native";
9
+ const V = new pn({
3
10
  name: "badges",
4
11
  enableFeatures: {
5
12
  showBadges: ({
6
- badges: e = [],
7
- parentComponent: i
13
+ badges: t = [],
14
+ parentComponent: e
8
15
  }) => {
9
- const s = i ? t.getSettings().availablePositions[i] : t.getSettings().defaultPositions;
16
+ const r = e ? V.getSettings().availablePositions[e] : V.getSettings().defaultPositions;
10
17
  return {
11
- badges: d.filter(e, (o) => s ? s.includes(o.position) : !0),
12
- availablePositions: s
18
+ badges: Pt.filter(t, (i) => r ? r.includes(i.position) : !0),
19
+ availablePositions: r
13
20
  };
14
21
  }
15
22
  },
@@ -23,7 +30,7 @@ const t = new a({
23
30
  }
24
31
  }
25
32
  });
26
- t.setQueryUpdates({
33
+ V.setQueryUpdates({
27
34
  product: {
28
35
  fields: [{
29
36
  badges: ["id", "position", "assetId", {
@@ -67,8 +74,8 @@ t.setQueryUpdates({
67
74
  }]
68
75
  }
69
76
  });
70
- t.setRequests({
71
- getBadges: async () => t.getSdk().createRequest({
77
+ V.setRequests({
78
+ getBadges: async () => V.getSdk().createRequest({
72
79
  operation: "badges",
73
80
  fields: ["totalItems", {
74
81
  items: ["id", "createdAt", "updatedAt", "collectionId", "position", "assetId", {
@@ -81,11 +88,3315 @@ t.setRequests({
81
88
  options: {
82
89
  take: 100
83
90
  }
84
- }, !1).then((e) => e.data).catch((e) => ({
85
- message: e.message,
86
- errorCode: e.code || "unknown"
91
+ }, !1).then((t) => t.data).catch((t) => ({
92
+ message: t.message,
93
+ errorCode: t.code || "unknown"
87
94
  }))
88
95
  });
96
+ function bn(t) {
97
+ const e = [];
98
+ function r(i, o) {
99
+ const a = A.createContext(o), s = e.length;
100
+ e.push(a);
101
+ const u = (l) => {
102
+ const d = X.c(8);
103
+ let m, b, p;
104
+ d[0] !== l ? ({
105
+ scope: p,
106
+ children: m,
107
+ ...b
108
+ } = l, d[0] = l, d[1] = m, d[2] = b, d[3] = p) : (m = d[1], b = d[2], p = d[3]);
109
+ const y = p?.[t]?.[s] || a;
110
+ let h;
111
+ h = b;
112
+ const v = h;
113
+ let w;
114
+ return d[4] !== y.Provider || d[5] !== m || d[6] !== v ? (w = /* @__PURE__ */ C.jsx(y.Provider, { value: v, children: m }), d[4] = y.Provider, d[5] = m, d[6] = v, d[7] = w) : w = d[7], w;
115
+ };
116
+ u.displayName = i + "Provider";
117
+ function c(l, d) {
118
+ const m = d?.[t]?.[s] || a, b = A.useContext(m);
119
+ if (b)
120
+ return b;
121
+ if (o !== void 0)
122
+ return o;
123
+ throw new Error(`\`${l}\` must be used within \`${i}\``);
124
+ }
125
+ return [u, c];
126
+ }
127
+ function n() {
128
+ const i = e.map((o) => A.createContext(o));
129
+ return function(a) {
130
+ const s = a?.[t] || i;
131
+ return A.useMemo(() => ({
132
+ [`__scope${t}`]: {
133
+ ...a,
134
+ [t]: s
135
+ }
136
+ }), [a, s]);
137
+ };
138
+ }
139
+ return n.scopeName = t, [r, n];
140
+ }
141
+ const gn = Symbol("radix.slottable");
142
+ function vn(...t) {
143
+ return (e) => t.forEach((r) => {
144
+ typeof r == "function" ? r(e) : r != null && (r.current = e);
145
+ });
146
+ }
147
+ function wn(t, e) {
148
+ const r = {
149
+ ...e
150
+ };
151
+ for (const n in e) {
152
+ const i = t[n], o = e[n];
153
+ /^on[A-Z]/.test(n) ? i && o ? r[n] = (...s) => {
154
+ const u = o(...s);
155
+ return i(...s), u;
156
+ } : i && (r[n] = i) : n === "style" ? r[n] = Sn(i, o) : n === "className" && (r[n] = [i, o].filter(Boolean).join(" "));
157
+ }
158
+ return {
159
+ ...t,
160
+ ...r
161
+ };
162
+ }
163
+ function Sn(t, e) {
164
+ return typeof t == "function" && typeof e == "function" ? (r) => ie.flatten([t(r), e(r)]) : typeof t == "function" ? (r) => e ? ie.flatten([t(r), e]) : t(r) : typeof e == "function" ? (r) => t ? ie.flatten([t, e(r)]) : e(r) : ie.flatten([t, e].filter(Boolean));
165
+ }
166
+ function On(t) {
167
+ return A.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === gn;
168
+ }
169
+ function An(t) {
170
+ let e = Object.getOwnPropertyDescriptor(t.props, "ref")?.get, r = e && "isReactWarning" in e && e.isReactWarning;
171
+ 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);
172
+ }
173
+ function En(t, e) {
174
+ const r = A.forwardRef((n, i) => {
175
+ const {
176
+ children: o,
177
+ ...a
178
+ } = n;
179
+ if (A.isValidElement(o)) {
180
+ const s = An(o), u = wn(a, o.props);
181
+ return o.type !== A.Fragment && (u.ref = i ? vn(i, s) : s), A.cloneElement(o, u);
182
+ }
183
+ return A.Children.count(o) > 1 ? A.Children.only(null) : null;
184
+ });
185
+ return r.displayName = `${t}.SlotClone`, r;
186
+ }
187
+ function ge(t) {
188
+ const e = En("Slot"), r = A.forwardRef((n, i) => {
189
+ const o = X.c(15);
190
+ let a, s;
191
+ o[0] !== n ? ({
192
+ children: a,
193
+ ...s
194
+ } = n, o[0] = n, o[1] = a, o[2] = s) : (a = o[1], s = o[2]);
195
+ let u;
196
+ if (o[3] !== a || o[4] !== i || o[5] !== s) {
197
+ u = Symbol.for("react.early_return_sentinel");
198
+ e: {
199
+ const l = A.Children.toArray(a), d = l.find(On);
200
+ if (d) {
201
+ const m = d.props.children, b = l.map((h) => h === d ? A.Children.count(m) > 1 ? A.Children.only(null) : A.isValidElement(m) ? m.props.children : null : h), p = A.isValidElement(m) ? A.cloneElement(m, void 0, b) : null;
202
+ let y;
203
+ o[7] !== i || o[8] !== s || o[9] !== p ? (y = /* @__PURE__ */ C.jsx(e, { ...s, ref: i, children: p }), o[7] = i, o[8] = s, o[9] = p, o[10] = y) : y = o[10], u = y;
204
+ break e;
205
+ }
206
+ }
207
+ o[3] = a, o[4] = i, o[5] = s, o[6] = u;
208
+ } else
209
+ u = o[6];
210
+ if (u !== Symbol.for("react.early_return_sentinel"))
211
+ return u;
212
+ let c;
213
+ return o[11] !== a || o[12] !== i || o[13] !== s ? (c = /* @__PURE__ */ C.jsx(e, { ...s, ref: i, children: a }), o[11] = a, o[12] = i, o[13] = s, o[14] = c) : c = o[14], c;
214
+ });
215
+ return r.displayName = "Slot", r;
216
+ }
217
+ let Ne;
218
+ typeof window < "u" ? (window.__STORE_I18N_INSTANCE__ || (window.__STORE_I18N_INSTANCE__ = Ze.createInstance()), window.__STORE_I18N_INSTANCE__.use(Ye), Ne = window.__STORE_I18N_INSTANCE__) : (Ne = Ze.createInstance(), Ne.use(Ye));
219
+ function Be(t) {
220
+ "@babel/helpers - typeof";
221
+ return Be = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
222
+ return typeof e;
223
+ } : function(e) {
224
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
225
+ }, Be(t);
226
+ }
227
+ function jt() {
228
+ return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : Be(XMLHttpRequest)) === "object";
229
+ }
230
+ function Tn(t) {
231
+ return !!t && typeof t.then == "function";
232
+ }
233
+ function _n(t) {
234
+ return Tn(t) ? t : Promise.resolve(t);
235
+ }
236
+ function et(t, e) {
237
+ var r = Object.keys(t);
238
+ if (Object.getOwnPropertySymbols) {
239
+ var n = Object.getOwnPropertySymbols(t);
240
+ e && (n = n.filter(function(i) {
241
+ return Object.getOwnPropertyDescriptor(t, i).enumerable;
242
+ })), r.push.apply(r, n);
243
+ }
244
+ return r;
245
+ }
246
+ function tt(t) {
247
+ for (var e = 1; e < arguments.length; e++) {
248
+ var r = arguments[e] != null ? arguments[e] : {};
249
+ e % 2 ? et(Object(r), !0).forEach(function(n) {
250
+ Rn(t, n, r[n]);
251
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : et(Object(r)).forEach(function(n) {
252
+ Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
253
+ });
254
+ }
255
+ return t;
256
+ }
257
+ function Rn(t, e, r) {
258
+ return (e = kn(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
259
+ }
260
+ function kn(t) {
261
+ var e = Nn(t, "string");
262
+ return B(e) == "symbol" ? e : e + "";
263
+ }
264
+ function Nn(t, e) {
265
+ if (B(t) != "object" || !t) return t;
266
+ var r = t[Symbol.toPrimitive];
267
+ if (r !== void 0) {
268
+ var n = r.call(t, e);
269
+ if (B(n) != "object") return n;
270
+ throw new TypeError("@@toPrimitive must return a primitive value.");
271
+ }
272
+ return (e === "string" ? String : Number)(t);
273
+ }
274
+ function B(t) {
275
+ "@babel/helpers - typeof";
276
+ return B = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
277
+ return typeof e;
278
+ } : function(e) {
279
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
280
+ }, B(t);
281
+ }
282
+ var D = typeof fetch == "function" ? fetch : void 0;
283
+ typeof global < "u" && global.fetch ? D = global.fetch : typeof window < "u" && window.fetch && (D = window.fetch);
284
+ var G;
285
+ jt() && (typeof global < "u" && global.XMLHttpRequest ? G = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (G = window.XMLHttpRequest));
286
+ var me;
287
+ typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? me = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (me = window.ActiveXObject));
288
+ typeof D != "function" && (D = void 0);
289
+ if (!D && !G && !me)
290
+ try {
291
+ import("./browser-ponyfill-DYgay_ta.mjs").then((t) => t.b).then(function(t) {
292
+ D = t.default;
293
+ }).catch(function() {
294
+ });
295
+ } catch {
296
+ }
297
+ var Ue = function(e, r) {
298
+ if (r && B(r) === "object") {
299
+ var n = "";
300
+ for (var i in r)
301
+ n += "&" + encodeURIComponent(i) + "=" + encodeURIComponent(r[i]);
302
+ if (!n) return e;
303
+ e = e + (e.indexOf("?") !== -1 ? "&" : "?") + n.slice(1);
304
+ }
305
+ return e;
306
+ }, nt = function(e, r, n, i) {
307
+ var o = function(u) {
308
+ if (!u.ok) return n(u.statusText || "Error", {
309
+ status: u.status
310
+ });
311
+ u.text().then(function(c) {
312
+ n(null, {
313
+ status: u.status,
314
+ data: c
315
+ });
316
+ }).catch(n);
317
+ };
318
+ if (i) {
319
+ var a = i(e, r);
320
+ if (a instanceof Promise) {
321
+ a.then(o).catch(n);
322
+ return;
323
+ }
324
+ }
325
+ typeof fetch == "function" ? fetch(e, r).then(o).catch(n) : D(e, r).then(o).catch(n);
326
+ }, rt = !1, Pn = function(e, r, n, i) {
327
+ e.queryStringParams && (r = Ue(r, e.queryStringParams));
328
+ var o = tt({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
329
+ typeof window > "u" && typeof global < "u" && typeof global.process < "u" && global.process.versions && global.process.versions.node && (o["User-Agent"] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")")), n && (o["Content-Type"] = "application/json");
330
+ var a = typeof e.requestOptions == "function" ? e.requestOptions(n) : e.requestOptions, s = tt({
331
+ method: n ? "POST" : "GET",
332
+ body: n ? e.stringify(n) : void 0,
333
+ headers: o
334
+ }, rt ? {} : a), u = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
335
+ try {
336
+ nt(r, s, i, u);
337
+ } catch (c) {
338
+ if (!a || Object.keys(a).length === 0 || !c.message || c.message.indexOf("not implemented") < 0)
339
+ return i(c);
340
+ try {
341
+ Object.keys(a).forEach(function(l) {
342
+ delete s[l];
343
+ }), nt(r, s, i, u), rt = !0;
344
+ } catch (l) {
345
+ i(l);
346
+ }
347
+ }
348
+ }, qn = function(e, r, n, i) {
349
+ n && B(n) === "object" && (n = Ue("", n).slice(1)), e.queryStringParams && (r = Ue(r, e.queryStringParams));
350
+ try {
351
+ var o = G ? new G() : new me("MSXML2.XMLHTTP.3.0");
352
+ o.open(n ? "POST" : "GET", r, 1), e.crossDomain || o.setRequestHeader("X-Requested-With", "XMLHttpRequest"), o.withCredentials = !!e.withCredentials, n && o.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), o.overrideMimeType && o.overrideMimeType("application/json");
353
+ var a = e.customHeaders;
354
+ if (a = typeof a == "function" ? a() : a, a)
355
+ for (var s in a)
356
+ o.setRequestHeader(s, a[s]);
357
+ o.onreadystatechange = function() {
358
+ o.readyState > 3 && i(o.status >= 400 ? o.statusText : null, {
359
+ status: o.status,
360
+ data: o.responseText
361
+ });
362
+ }, o.send(n);
363
+ } catch (u) {
364
+ console && console.log(u);
365
+ }
366
+ }, jn = function(e, r, n, i) {
367
+ if (typeof n == "function" && (i = n, n = void 0), i = i || function() {
368
+ }, D && r.indexOf("file:") !== 0)
369
+ return Pn(e, r, n, i);
370
+ if (jt() || typeof ActiveXObject == "function")
371
+ return qn(e, r, n, i);
372
+ i(new Error("No fetch and no xhr implementation found!"));
373
+ };
374
+ function W(t) {
375
+ "@babel/helpers - typeof";
376
+ return W = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
377
+ return typeof e;
378
+ } : function(e) {
379
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
380
+ }, W(t);
381
+ }
382
+ function it(t, e) {
383
+ var r = Object.keys(t);
384
+ if (Object.getOwnPropertySymbols) {
385
+ var n = Object.getOwnPropertySymbols(t);
386
+ e && (n = n.filter(function(i) {
387
+ return Object.getOwnPropertyDescriptor(t, i).enumerable;
388
+ })), r.push.apply(r, n);
389
+ }
390
+ return r;
391
+ }
392
+ function Pe(t) {
393
+ for (var e = 1; e < arguments.length; e++) {
394
+ var r = arguments[e] != null ? arguments[e] : {};
395
+ e % 2 ? it(Object(r), !0).forEach(function(n) {
396
+ Ct(t, n, r[n]);
397
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : it(Object(r)).forEach(function(n) {
398
+ Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
399
+ });
400
+ }
401
+ return t;
402
+ }
403
+ function Cn(t, e) {
404
+ if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
405
+ }
406
+ function Dn(t, e) {
407
+ for (var r = 0; r < e.length; r++) {
408
+ var n = e[r];
409
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, Dt(n.key), n);
410
+ }
411
+ }
412
+ function Fn(t, e, r) {
413
+ return e && Dn(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
414
+ }
415
+ function Ct(t, e, r) {
416
+ return (e = Dt(e)) in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
417
+ }
418
+ function Dt(t) {
419
+ var e = xn(t, "string");
420
+ return W(e) == "symbol" ? e : e + "";
421
+ }
422
+ function xn(t, e) {
423
+ if (W(t) != "object" || !t) return t;
424
+ var r = t[Symbol.toPrimitive];
425
+ if (r !== void 0) {
426
+ var n = r.call(t, e);
427
+ if (W(n) != "object") return n;
428
+ throw new TypeError("@@toPrimitive must return a primitive value.");
429
+ }
430
+ return String(t);
431
+ }
432
+ var Mn = function() {
433
+ return {
434
+ loadPath: "/locales/{{lng}}/{{ns}}.json",
435
+ addPath: "/locales/add/{{lng}}/{{ns}}",
436
+ parse: function(r) {
437
+ return JSON.parse(r);
438
+ },
439
+ stringify: JSON.stringify,
440
+ parsePayload: function(r, n, i) {
441
+ return Ct({}, n, i || "");
442
+ },
443
+ parseLoadPayload: function(r, n) {
444
+ },
445
+ request: jn,
446
+ reloadInterval: typeof window < "u" ? !1 : 60 * 60 * 1e3,
447
+ customHeaders: {},
448
+ queryStringParams: {},
449
+ crossDomain: !1,
450
+ withCredentials: !1,
451
+ overrideMimeType: !1,
452
+ requestOptions: {
453
+ mode: "cors",
454
+ credentials: "same-origin",
455
+ cache: "default"
456
+ }
457
+ };
458
+ }, Bn = function() {
459
+ function t(e) {
460
+ var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
461
+ Cn(this, t), this.services = e, this.options = r, this.allOptions = n, this.type = "backend", this.init(e, r, n);
462
+ }
463
+ return Fn(t, [{
464
+ key: "init",
465
+ value: function(r) {
466
+ var n = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
467
+ if (this.services = r, this.options = Pe(Pe(Pe({}, Mn()), this.options || {}), i), this.allOptions = o, this.services && this.options.reloadInterval) {
468
+ var a = setInterval(function() {
469
+ return n.reload();
470
+ }, this.options.reloadInterval);
471
+ W(a) === "object" && typeof a.unref == "function" && a.unref();
472
+ }
473
+ }
474
+ }, {
475
+ key: "readMulti",
476
+ value: function(r, n, i) {
477
+ this._readAny(r, r, n, n, i);
478
+ }
479
+ }, {
480
+ key: "read",
481
+ value: function(r, n, i) {
482
+ this._readAny([r], r, [n], n, i);
483
+ }
484
+ }, {
485
+ key: "_readAny",
486
+ value: function(r, n, i, o, a) {
487
+ var s = this, u = this.options.loadPath;
488
+ typeof this.options.loadPath == "function" && (u = this.options.loadPath(r, i)), u = _n(u), u.then(function(c) {
489
+ if (!c) return a(null, {});
490
+ var l = s.services.interpolator.interpolate(c, {
491
+ lng: r.join("+"),
492
+ ns: i.join("+")
493
+ });
494
+ s.loadUrl(l, a, n, o);
495
+ });
496
+ }
497
+ }, {
498
+ key: "loadUrl",
499
+ value: function(r, n, i, o) {
500
+ var a = this, s = typeof i == "string" ? [i] : i, u = typeof o == "string" ? [o] : o, c = this.options.parseLoadPayload(s, u);
501
+ this.options.request(this.options, r, c, function(l, d) {
502
+ if (d && (d.status >= 500 && d.status < 600 || !d.status)) return n("failed loading " + r + "; status code: " + d.status, !0);
503
+ if (d && d.status >= 400 && d.status < 500) return n("failed loading " + r + "; status code: " + d.status, !1);
504
+ if (!d && l && l.message) {
505
+ var m = l.message.toLowerCase(), b = ["failed", "fetch", "network", "load"].find(function(h) {
506
+ return m.indexOf(h) > -1;
507
+ });
508
+ if (b)
509
+ return n("failed loading " + r + ": " + l.message, !0);
510
+ }
511
+ if (l) return n(l, !1);
512
+ var p, y;
513
+ try {
514
+ typeof d.data == "string" ? p = a.options.parse(d.data, i, o) : p = d.data;
515
+ } catch {
516
+ y = "failed parsing " + r + " to json";
517
+ }
518
+ if (y) return n(y, !1);
519
+ n(null, p);
520
+ });
521
+ }
522
+ }, {
523
+ key: "create",
524
+ value: function(r, n, i, o, a) {
525
+ var s = this;
526
+ if (this.options.addPath) {
527
+ typeof r == "string" && (r = [r]);
528
+ var u = this.options.parsePayload(n, i, o), c = 0, l = [], d = [];
529
+ r.forEach(function(m) {
530
+ var b = s.options.addPath;
531
+ typeof s.options.addPath == "function" && (b = s.options.addPath(m, n));
532
+ var p = s.services.interpolator.interpolate(b, {
533
+ lng: m,
534
+ ns: n
535
+ });
536
+ s.options.request(s.options, p, u, function(y, h) {
537
+ c += 1, l.push(y), d.push(h), c === r.length && typeof a == "function" && a(l, d);
538
+ });
539
+ });
540
+ }
541
+ }
542
+ }, {
543
+ key: "reload",
544
+ value: function() {
545
+ var r = this, n = this.services, i = n.backendConnector, o = n.languageUtils, a = n.logger, s = i.language;
546
+ if (!(s && s.toLowerCase() === "cimode")) {
547
+ var u = [], c = function(d) {
548
+ var m = o.toResolveHierarchy(d);
549
+ m.forEach(function(b) {
550
+ u.indexOf(b) < 0 && u.push(b);
551
+ });
552
+ };
553
+ c(s), this.allOptions.preload && this.allOptions.preload.forEach(function(l) {
554
+ return c(l);
555
+ }), u.forEach(function(l) {
556
+ r.allOptions.ns.forEach(function(d) {
557
+ i.read(l, d, "read", null, null, function(m, b) {
558
+ m && a.warn("loading namespace ".concat(d, " for language ").concat(l, " failed"), m), !m && b && a.log("loaded namespace ".concat(d, " for language ").concat(l), b), i.loaded("".concat(l, "|").concat(d), m, b);
559
+ });
560
+ });
561
+ });
562
+ }
563
+ }
564
+ }]);
565
+ }();
566
+ Bn.type = "backend";
567
+ let Le;
568
+ typeof window < "u" ? (window.__STORE_SDK_CONTEXT__ || (window.__STORE_SDK_CONTEXT__ = pe(void 0)), Le = window.__STORE_SDK_CONTEXT__) : Le = pe(void 0);
569
+ const Un = () => {
570
+ const t = hn(Le);
571
+ return t || console.error("You must wrap your component in a <DataProvider>"), t?.sdkType === "dummy" || t?.sdkType === "vendure", t;
572
+ };
573
+ new Me();
574
+ function Ft(t, e) {
575
+ return function() {
576
+ return t.apply(e, arguments);
577
+ };
578
+ }
579
+ const { toString: Ln } = Object.prototype, { getPrototypeOf: Je } = Object, { iterator: ve, toStringTag: xt } = Symbol, we = /* @__PURE__ */ ((t) => (e) => {
580
+ const r = Ln.call(e);
581
+ return t[r] || (t[r] = r.slice(8, -1).toLowerCase());
582
+ })(/* @__PURE__ */ Object.create(null)), N = (t) => (t = t.toLowerCase(), (e) => we(e) === t), Se = (t) => (e) => typeof e === t, { isArray: z } = Array, Y = Se("undefined");
583
+ function In(t) {
584
+ return t !== null && !Y(t) && t.constructor !== null && !Y(t.constructor) && _(t.constructor.isBuffer) && t.constructor.isBuffer(t);
585
+ }
586
+ const Mt = N("ArrayBuffer");
587
+ function $n(t) {
588
+ let e;
589
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Mt(t.buffer), e;
590
+ }
591
+ const Hn = Se("string"), _ = Se("function"), Bt = Se("number"), Oe = (t) => t !== null && typeof t == "object", Vn = (t) => t === !0 || t === !1, le = (t) => {
592
+ if (we(t) !== "object")
593
+ return !1;
594
+ const e = Je(t);
595
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(xt in t) && !(ve in t);
596
+ }, Wn = N("Date"), Xn = N("File"), zn = N("Blob"), Jn = N("FileList"), Kn = (t) => Oe(t) && _(t.pipe), Qn = (t) => {
597
+ let e;
598
+ return t && (typeof FormData == "function" && t instanceof FormData || _(t.append) && ((e = we(t)) === "formdata" || // detect form-data instance
599
+ e === "object" && _(t.toString) && t.toString() === "[object FormData]"));
600
+ }, Gn = N("URLSearchParams"), [Yn, Zn, er, tr] = ["ReadableStream", "Request", "Response", "Headers"].map(N), nr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
601
+ function Z(t, e, { allOwnKeys: r = !1 } = {}) {
602
+ if (t === null || typeof t > "u")
603
+ return;
604
+ let n, i;
605
+ if (typeof t != "object" && (t = [t]), z(t))
606
+ for (n = 0, i = t.length; n < i; n++)
607
+ e.call(null, t[n], n, t);
608
+ else {
609
+ const o = r ? Object.getOwnPropertyNames(t) : Object.keys(t), a = o.length;
610
+ let s;
611
+ for (n = 0; n < a; n++)
612
+ s = o[n], e.call(null, t[s], s, t);
613
+ }
614
+ }
615
+ function Ut(t, e) {
616
+ e = e.toLowerCase();
617
+ const r = Object.keys(t);
618
+ let n = r.length, i;
619
+ for (; n-- > 0; )
620
+ if (i = r[n], e === i.toLowerCase())
621
+ return i;
622
+ return null;
623
+ }
624
+ const x = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Lt = (t) => !Y(t) && t !== x;
625
+ function Ie() {
626
+ const { caseless: t } = Lt(this) && this || {}, e = {}, r = (n, i) => {
627
+ const o = t && Ut(e, i) || i;
628
+ le(e[o]) && le(n) ? e[o] = Ie(e[o], n) : le(n) ? e[o] = Ie({}, n) : z(n) ? e[o] = n.slice() : e[o] = n;
629
+ };
630
+ for (let n = 0, i = arguments.length; n < i; n++)
631
+ arguments[n] && Z(arguments[n], r);
632
+ return e;
633
+ }
634
+ const rr = (t, e, r, { allOwnKeys: n } = {}) => (Z(e, (i, o) => {
635
+ r && _(i) ? t[o] = Ft(i, r) : t[o] = i;
636
+ }, { allOwnKeys: n }), t), ir = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), or = (t, e, r, n) => {
637
+ t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t, Object.defineProperty(t, "super", {
638
+ value: e.prototype
639
+ }), r && Object.assign(t.prototype, r);
640
+ }, ar = (t, e, r, n) => {
641
+ let i, o, a;
642
+ const s = {};
643
+ if (e = e || {}, t == null) return e;
644
+ do {
645
+ for (i = Object.getOwnPropertyNames(t), o = i.length; o-- > 0; )
646
+ a = i[o], (!n || n(a, t, e)) && !s[a] && (e[a] = t[a], s[a] = !0);
647
+ t = r !== !1 && Je(t);
648
+ } while (t && (!r || r(t, e)) && t !== Object.prototype);
649
+ return e;
650
+ }, sr = (t, e, r) => {
651
+ t = String(t), (r === void 0 || r > t.length) && (r = t.length), r -= e.length;
652
+ const n = t.indexOf(e, r);
653
+ return n !== -1 && n === r;
654
+ }, ur = (t) => {
655
+ if (!t) return null;
656
+ if (z(t)) return t;
657
+ let e = t.length;
658
+ if (!Bt(e)) return null;
659
+ const r = new Array(e);
660
+ for (; e-- > 0; )
661
+ r[e] = t[e];
662
+ return r;
663
+ }, cr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Je(Uint8Array)), lr = (t, e) => {
664
+ const n = (t && t[ve]).call(t);
665
+ let i;
666
+ for (; (i = n.next()) && !i.done; ) {
667
+ const o = i.value;
668
+ e.call(t, o[0], o[1]);
669
+ }
670
+ }, fr = (t, e) => {
671
+ let r;
672
+ const n = [];
673
+ for (; (r = t.exec(e)) !== null; )
674
+ n.push(r);
675
+ return n;
676
+ }, dr = N("HTMLFormElement"), pr = (t) => t.toLowerCase().replace(
677
+ /[-_\s]([a-z\d])(\w*)/g,
678
+ function(r, n, i) {
679
+ return n.toUpperCase() + i;
680
+ }
681
+ ), ot = (({ hasOwnProperty: t }) => (e, r) => t.call(e, r))(Object.prototype), mr = N("RegExp"), It = (t, e) => {
682
+ const r = Object.getOwnPropertyDescriptors(t), n = {};
683
+ Z(r, (i, o) => {
684
+ let a;
685
+ (a = e(i, o, t)) !== !1 && (n[o] = a || i);
686
+ }), Object.defineProperties(t, n);
687
+ }, hr = (t) => {
688
+ It(t, (e, r) => {
689
+ if (_(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
690
+ return !1;
691
+ const n = t[r];
692
+ if (_(n)) {
693
+ if (e.enumerable = !1, "writable" in e) {
694
+ e.writable = !1;
695
+ return;
696
+ }
697
+ e.set || (e.set = () => {
698
+ throw Error("Can not rewrite read-only method '" + r + "'");
699
+ });
700
+ }
701
+ });
702
+ }, yr = (t, e) => {
703
+ const r = {}, n = (i) => {
704
+ i.forEach((o) => {
705
+ r[o] = !0;
706
+ });
707
+ };
708
+ return z(t) ? n(t) : n(String(t).split(e)), r;
709
+ }, br = () => {
710
+ }, gr = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
711
+ function vr(t) {
712
+ return !!(t && _(t.append) && t[xt] === "FormData" && t[ve]);
713
+ }
714
+ const wr = (t) => {
715
+ const e = new Array(10), r = (n, i) => {
716
+ if (Oe(n)) {
717
+ if (e.indexOf(n) >= 0)
718
+ return;
719
+ if (!("toJSON" in n)) {
720
+ e[i] = n;
721
+ const o = z(n) ? [] : {};
722
+ return Z(n, (a, s) => {
723
+ const u = r(a, i + 1);
724
+ !Y(u) && (o[s] = u);
725
+ }), e[i] = void 0, o;
726
+ }
727
+ }
728
+ return n;
729
+ };
730
+ return r(t, 0);
731
+ }, Sr = N("AsyncFunction"), Or = (t) => t && (Oe(t) || _(t)) && _(t.then) && _(t.catch), $t = ((t, e) => t ? setImmediate : e ? ((r, n) => (x.addEventListener("message", ({ source: i, data: o }) => {
732
+ i === x && o === r && n.length && n.shift()();
733
+ }, !1), (i) => {
734
+ n.push(i), x.postMessage(r, "*");
735
+ }))(`axios@${Math.random()}`, []) : (r) => setTimeout(r))(
736
+ typeof setImmediate == "function",
737
+ _(x.postMessage)
738
+ ), Ar = typeof queueMicrotask < "u" ? queueMicrotask.bind(x) : typeof process < "u" && process.nextTick || $t, Er = (t) => t != null && _(t[ve]), f = {
739
+ isArray: z,
740
+ isArrayBuffer: Mt,
741
+ isBuffer: In,
742
+ isFormData: Qn,
743
+ isArrayBufferView: $n,
744
+ isString: Hn,
745
+ isNumber: Bt,
746
+ isBoolean: Vn,
747
+ isObject: Oe,
748
+ isPlainObject: le,
749
+ isReadableStream: Yn,
750
+ isRequest: Zn,
751
+ isResponse: er,
752
+ isHeaders: tr,
753
+ isUndefined: Y,
754
+ isDate: Wn,
755
+ isFile: Xn,
756
+ isBlob: zn,
757
+ isRegExp: mr,
758
+ isFunction: _,
759
+ isStream: Kn,
760
+ isURLSearchParams: Gn,
761
+ isTypedArray: cr,
762
+ isFileList: Jn,
763
+ forEach: Z,
764
+ merge: Ie,
765
+ extend: rr,
766
+ trim: nr,
767
+ stripBOM: ir,
768
+ inherits: or,
769
+ toFlatObject: ar,
770
+ kindOf: we,
771
+ kindOfTest: N,
772
+ endsWith: sr,
773
+ toArray: ur,
774
+ forEachEntry: lr,
775
+ matchAll: fr,
776
+ isHTMLForm: dr,
777
+ hasOwnProperty: ot,
778
+ hasOwnProp: ot,
779
+ // an alias to avoid ESLint no-prototype-builtins detection
780
+ reduceDescriptors: It,
781
+ freezeMethods: hr,
782
+ toObjectSet: yr,
783
+ toCamelCase: pr,
784
+ noop: br,
785
+ toFiniteNumber: gr,
786
+ findKey: Ut,
787
+ global: x,
788
+ isContextDefined: Lt,
789
+ isSpecCompliantForm: vr,
790
+ toJSONObject: wr,
791
+ isAsyncFn: Sr,
792
+ isThenable: Or,
793
+ setImmediate: $t,
794
+ asap: Ar,
795
+ isIterable: Er
796
+ };
797
+ function g(t, e, r, n, i) {
798
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), r && (this.config = r), n && (this.request = n), i && (this.response = i, this.status = i.status ? i.status : null);
799
+ }
800
+ f.inherits(g, Error, {
801
+ toJSON: function() {
802
+ return {
803
+ // Standard
804
+ message: this.message,
805
+ name: this.name,
806
+ // Microsoft
807
+ description: this.description,
808
+ number: this.number,
809
+ // Mozilla
810
+ fileName: this.fileName,
811
+ lineNumber: this.lineNumber,
812
+ columnNumber: this.columnNumber,
813
+ stack: this.stack,
814
+ // Axios
815
+ config: f.toJSONObject(this.config),
816
+ code: this.code,
817
+ status: this.status
818
+ };
819
+ }
820
+ });
821
+ const Ht = g.prototype, Vt = {};
822
+ [
823
+ "ERR_BAD_OPTION_VALUE",
824
+ "ERR_BAD_OPTION",
825
+ "ECONNABORTED",
826
+ "ETIMEDOUT",
827
+ "ERR_NETWORK",
828
+ "ERR_FR_TOO_MANY_REDIRECTS",
829
+ "ERR_DEPRECATED",
830
+ "ERR_BAD_RESPONSE",
831
+ "ERR_BAD_REQUEST",
832
+ "ERR_CANCELED",
833
+ "ERR_NOT_SUPPORT",
834
+ "ERR_INVALID_URL"
835
+ // eslint-disable-next-line func-names
836
+ ].forEach((t) => {
837
+ Vt[t] = { value: t };
838
+ });
839
+ Object.defineProperties(g, Vt);
840
+ Object.defineProperty(Ht, "isAxiosError", { value: !0 });
841
+ g.from = (t, e, r, n, i, o) => {
842
+ const a = Object.create(Ht);
843
+ return f.toFlatObject(t, a, function(u) {
844
+ return u !== Error.prototype;
845
+ }, (s) => s !== "isAxiosError"), g.call(a, t.message, e, r, n, i), a.cause = t, a.name = t.name, o && Object.assign(a, o), a;
846
+ };
847
+ const Tr = null;
848
+ function $e(t) {
849
+ return f.isPlainObject(t) || f.isArray(t);
850
+ }
851
+ function Wt(t) {
852
+ return f.endsWith(t, "[]") ? t.slice(0, -2) : t;
853
+ }
854
+ function at(t, e, r) {
855
+ return t ? t.concat(e).map(function(i, o) {
856
+ return i = Wt(i), !r && o ? "[" + i + "]" : i;
857
+ }).join(r ? "." : "") : e;
858
+ }
859
+ function _r(t) {
860
+ return f.isArray(t) && !t.some($e);
861
+ }
862
+ const Rr = f.toFlatObject(f, {}, null, function(e) {
863
+ return /^is[A-Z]/.test(e);
864
+ });
865
+ function Ae(t, e, r) {
866
+ if (!f.isObject(t))
867
+ throw new TypeError("target must be an object");
868
+ e = e || new FormData(), r = f.toFlatObject(r, {
869
+ metaTokens: !0,
870
+ dots: !1,
871
+ indexes: !1
872
+ }, !1, function(y, h) {
873
+ return !f.isUndefined(h[y]);
874
+ });
875
+ const n = r.metaTokens, i = r.visitor || l, o = r.dots, a = r.indexes, u = (r.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(e);
876
+ if (!f.isFunction(i))
877
+ throw new TypeError("visitor must be a function");
878
+ function c(p) {
879
+ if (p === null) return "";
880
+ if (f.isDate(p))
881
+ return p.toISOString();
882
+ if (f.isBoolean(p))
883
+ return p.toString();
884
+ if (!u && f.isBlob(p))
885
+ throw new g("Blob is not supported. Use a Buffer instead.");
886
+ return f.isArrayBuffer(p) || f.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
887
+ }
888
+ function l(p, y, h) {
889
+ let v = p;
890
+ if (p && !h && typeof p == "object") {
891
+ if (f.endsWith(y, "{}"))
892
+ y = n ? y : y.slice(0, -2), p = JSON.stringify(p);
893
+ else if (f.isArray(p) && _r(p) || (f.isFileList(p) || f.endsWith(y, "[]")) && (v = f.toArray(p)))
894
+ return y = Wt(y), v.forEach(function(O, q) {
895
+ !(f.isUndefined(O) || O === null) && e.append(
896
+ // eslint-disable-next-line no-nested-ternary
897
+ a === !0 ? at([y], q, o) : a === null ? y : y + "[]",
898
+ c(O)
899
+ );
900
+ }), !1;
901
+ }
902
+ return $e(p) ? !0 : (e.append(at(h, y, o), c(p)), !1);
903
+ }
904
+ const d = [], m = Object.assign(Rr, {
905
+ defaultVisitor: l,
906
+ convertValue: c,
907
+ isVisitable: $e
908
+ });
909
+ function b(p, y) {
910
+ if (!f.isUndefined(p)) {
911
+ if (d.indexOf(p) !== -1)
912
+ throw Error("Circular reference detected in " + y.join("."));
913
+ d.push(p), f.forEach(p, function(v, w) {
914
+ (!(f.isUndefined(v) || v === null) && i.call(
915
+ e,
916
+ v,
917
+ f.isString(w) ? w.trim() : w,
918
+ y,
919
+ m
920
+ )) === !0 && b(v, y ? y.concat(w) : [w]);
921
+ }), d.pop();
922
+ }
923
+ }
924
+ if (!f.isObject(t))
925
+ throw new TypeError("data must be an object");
926
+ return b(t), e;
927
+ }
928
+ function st(t) {
929
+ const e = {
930
+ "!": "%21",
931
+ "'": "%27",
932
+ "(": "%28",
933
+ ")": "%29",
934
+ "~": "%7E",
935
+ "%20": "+",
936
+ "%00": "\0"
937
+ };
938
+ return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(n) {
939
+ return e[n];
940
+ });
941
+ }
942
+ function Ke(t, e) {
943
+ this._pairs = [], t && Ae(t, this, e);
944
+ }
945
+ const Xt = Ke.prototype;
946
+ Xt.append = function(e, r) {
947
+ this._pairs.push([e, r]);
948
+ };
949
+ Xt.toString = function(e) {
950
+ const r = e ? function(n) {
951
+ return e.call(this, n, st);
952
+ } : st;
953
+ return this._pairs.map(function(i) {
954
+ return r(i[0]) + "=" + r(i[1]);
955
+ }, "").join("&");
956
+ };
957
+ function kr(t) {
958
+ return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
959
+ }
960
+ function zt(t, e, r) {
961
+ if (!e)
962
+ return t;
963
+ const n = r && r.encode || kr;
964
+ f.isFunction(r) && (r = {
965
+ serialize: r
966
+ });
967
+ const i = r && r.serialize;
968
+ let o;
969
+ if (i ? o = i(e, r) : o = f.isURLSearchParams(e) ? e.toString() : new Ke(e, r).toString(n), o) {
970
+ const a = t.indexOf("#");
971
+ a !== -1 && (t = t.slice(0, a)), t += (t.indexOf("?") === -1 ? "?" : "&") + o;
972
+ }
973
+ return t;
974
+ }
975
+ class ut {
976
+ constructor() {
977
+ this.handlers = [];
978
+ }
979
+ /**
980
+ * Add a new interceptor to the stack
981
+ *
982
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
983
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
984
+ *
985
+ * @return {Number} An ID used to remove interceptor later
986
+ */
987
+ use(e, r, n) {
988
+ return this.handlers.push({
989
+ fulfilled: e,
990
+ rejected: r,
991
+ synchronous: n ? n.synchronous : !1,
992
+ runWhen: n ? n.runWhen : null
993
+ }), this.handlers.length - 1;
994
+ }
995
+ /**
996
+ * Remove an interceptor from the stack
997
+ *
998
+ * @param {Number} id The ID that was returned by `use`
999
+ *
1000
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
1001
+ */
1002
+ eject(e) {
1003
+ this.handlers[e] && (this.handlers[e] = null);
1004
+ }
1005
+ /**
1006
+ * Clear all interceptors from the stack
1007
+ *
1008
+ * @returns {void}
1009
+ */
1010
+ clear() {
1011
+ this.handlers && (this.handlers = []);
1012
+ }
1013
+ /**
1014
+ * Iterate over all the registered interceptors
1015
+ *
1016
+ * This method is particularly useful for skipping over any
1017
+ * interceptors that may have become `null` calling `eject`.
1018
+ *
1019
+ * @param {Function} fn The function to call for each interceptor
1020
+ *
1021
+ * @returns {void}
1022
+ */
1023
+ forEach(e) {
1024
+ f.forEach(this.handlers, function(n) {
1025
+ n !== null && e(n);
1026
+ });
1027
+ }
1028
+ }
1029
+ const Jt = {
1030
+ silentJSONParsing: !0,
1031
+ forcedJSONParsing: !0,
1032
+ clarifyTimeoutError: !1
1033
+ }, Nr = typeof URLSearchParams < "u" ? URLSearchParams : Ke, Pr = typeof FormData < "u" ? FormData : null, qr = typeof Blob < "u" ? Blob : null, jr = {
1034
+ isBrowser: !0,
1035
+ classes: {
1036
+ URLSearchParams: Nr,
1037
+ FormData: Pr,
1038
+ Blob: qr
1039
+ },
1040
+ protocols: ["http", "https", "file", "blob", "url", "data"]
1041
+ }, Qe = typeof window < "u" && typeof document < "u", He = typeof navigator == "object" && navigator || void 0, Cr = Qe && (!He || ["ReactNative", "NativeScript", "NS"].indexOf(He.product) < 0), Dr = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1042
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Fr = Qe && window.location.href || "http://localhost", xr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1043
+ __proto__: null,
1044
+ hasBrowserEnv: Qe,
1045
+ hasStandardBrowserEnv: Cr,
1046
+ hasStandardBrowserWebWorkerEnv: Dr,
1047
+ navigator: He,
1048
+ origin: Fr
1049
+ }, Symbol.toStringTag, { value: "Module" })), E = {
1050
+ ...xr,
1051
+ ...jr
1052
+ };
1053
+ function Mr(t, e) {
1054
+ return Ae(t, new E.classes.URLSearchParams(), Object.assign({
1055
+ visitor: function(r, n, i, o) {
1056
+ return E.isNode && f.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
1057
+ }
1058
+ }, e));
1059
+ }
1060
+ function Br(t) {
1061
+ return f.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
1062
+ }
1063
+ function Ur(t) {
1064
+ const e = {}, r = Object.keys(t);
1065
+ let n;
1066
+ const i = r.length;
1067
+ let o;
1068
+ for (n = 0; n < i; n++)
1069
+ o = r[n], e[o] = t[o];
1070
+ return e;
1071
+ }
1072
+ function Kt(t) {
1073
+ function e(r, n, i, o) {
1074
+ let a = r[o++];
1075
+ if (a === "__proto__") return !0;
1076
+ const s = Number.isFinite(+a), u = o >= r.length;
1077
+ return a = !a && f.isArray(i) ? i.length : a, u ? (f.hasOwnProp(i, a) ? i[a] = [i[a], n] : i[a] = n, !s) : ((!i[a] || !f.isObject(i[a])) && (i[a] = []), e(r, n, i[a], o) && f.isArray(i[a]) && (i[a] = Ur(i[a])), !s);
1078
+ }
1079
+ if (f.isFormData(t) && f.isFunction(t.entries)) {
1080
+ const r = {};
1081
+ return f.forEachEntry(t, (n, i) => {
1082
+ e(Br(n), i, r, 0);
1083
+ }), r;
1084
+ }
1085
+ return null;
1086
+ }
1087
+ function Lr(t, e, r) {
1088
+ if (f.isString(t))
1089
+ try {
1090
+ return (e || JSON.parse)(t), f.trim(t);
1091
+ } catch (n) {
1092
+ if (n.name !== "SyntaxError")
1093
+ throw n;
1094
+ }
1095
+ return (r || JSON.stringify)(t);
1096
+ }
1097
+ const ee = {
1098
+ transitional: Jt,
1099
+ adapter: ["xhr", "http", "fetch"],
1100
+ transformRequest: [function(e, r) {
1101
+ const n = r.getContentType() || "", i = n.indexOf("application/json") > -1, o = f.isObject(e);
1102
+ if (o && f.isHTMLForm(e) && (e = new FormData(e)), f.isFormData(e))
1103
+ return i ? JSON.stringify(Kt(e)) : e;
1104
+ if (f.isArrayBuffer(e) || f.isBuffer(e) || f.isStream(e) || f.isFile(e) || f.isBlob(e) || f.isReadableStream(e))
1105
+ return e;
1106
+ if (f.isArrayBufferView(e))
1107
+ return e.buffer;
1108
+ if (f.isURLSearchParams(e))
1109
+ return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
1110
+ let s;
1111
+ if (o) {
1112
+ if (n.indexOf("application/x-www-form-urlencoded") > -1)
1113
+ return Mr(e, this.formSerializer).toString();
1114
+ if ((s = f.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
1115
+ const u = this.env && this.env.FormData;
1116
+ return Ae(
1117
+ s ? { "files[]": e } : e,
1118
+ u && new u(),
1119
+ this.formSerializer
1120
+ );
1121
+ }
1122
+ }
1123
+ return o || i ? (r.setContentType("application/json", !1), Lr(e)) : e;
1124
+ }],
1125
+ transformResponse: [function(e) {
1126
+ const r = this.transitional || ee.transitional, n = r && r.forcedJSONParsing, i = this.responseType === "json";
1127
+ if (f.isResponse(e) || f.isReadableStream(e))
1128
+ return e;
1129
+ if (e && f.isString(e) && (n && !this.responseType || i)) {
1130
+ const a = !(r && r.silentJSONParsing) && i;
1131
+ try {
1132
+ return JSON.parse(e);
1133
+ } catch (s) {
1134
+ if (a)
1135
+ throw s.name === "SyntaxError" ? g.from(s, g.ERR_BAD_RESPONSE, this, null, this.response) : s;
1136
+ }
1137
+ }
1138
+ return e;
1139
+ }],
1140
+ /**
1141
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1142
+ * timeout is not created.
1143
+ */
1144
+ timeout: 0,
1145
+ xsrfCookieName: "XSRF-TOKEN",
1146
+ xsrfHeaderName: "X-XSRF-TOKEN",
1147
+ maxContentLength: -1,
1148
+ maxBodyLength: -1,
1149
+ env: {
1150
+ FormData: E.classes.FormData,
1151
+ Blob: E.classes.Blob
1152
+ },
1153
+ validateStatus: function(e) {
1154
+ return e >= 200 && e < 300;
1155
+ },
1156
+ headers: {
1157
+ common: {
1158
+ Accept: "application/json, text/plain, */*",
1159
+ "Content-Type": void 0
1160
+ }
1161
+ }
1162
+ };
1163
+ f.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
1164
+ ee.headers[t] = {};
1165
+ });
1166
+ const Ir = f.toObjectSet([
1167
+ "age",
1168
+ "authorization",
1169
+ "content-length",
1170
+ "content-type",
1171
+ "etag",
1172
+ "expires",
1173
+ "from",
1174
+ "host",
1175
+ "if-modified-since",
1176
+ "if-unmodified-since",
1177
+ "last-modified",
1178
+ "location",
1179
+ "max-forwards",
1180
+ "proxy-authorization",
1181
+ "referer",
1182
+ "retry-after",
1183
+ "user-agent"
1184
+ ]), $r = (t) => {
1185
+ const e = {};
1186
+ let r, n, i;
1187
+ return t && t.split(`
1188
+ `).forEach(function(a) {
1189
+ i = a.indexOf(":"), r = a.substring(0, i).trim().toLowerCase(), n = a.substring(i + 1).trim(), !(!r || e[r] && Ir[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n);
1190
+ }), e;
1191
+ }, ct = Symbol("internals");
1192
+ function K(t) {
1193
+ return t && String(t).trim().toLowerCase();
1194
+ }
1195
+ function fe(t) {
1196
+ return t === !1 || t == null ? t : f.isArray(t) ? t.map(fe) : String(t);
1197
+ }
1198
+ function Hr(t) {
1199
+ const e = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1200
+ let n;
1201
+ for (; n = r.exec(t); )
1202
+ e[n[1]] = n[2];
1203
+ return e;
1204
+ }
1205
+ const Vr = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
1206
+ function qe(t, e, r, n, i) {
1207
+ if (f.isFunction(n))
1208
+ return n.call(this, e, r);
1209
+ if (i && (e = r), !!f.isString(e)) {
1210
+ if (f.isString(n))
1211
+ return e.indexOf(n) !== -1;
1212
+ if (f.isRegExp(n))
1213
+ return n.test(e);
1214
+ }
1215
+ }
1216
+ function Wr(t) {
1217
+ return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n);
1218
+ }
1219
+ function Xr(t, e) {
1220
+ const r = f.toCamelCase(" " + e);
1221
+ ["get", "set", "has"].forEach((n) => {
1222
+ Object.defineProperty(t, n + r, {
1223
+ value: function(i, o, a) {
1224
+ return this[n].call(this, e, i, o, a);
1225
+ },
1226
+ configurable: !0
1227
+ });
1228
+ });
1229
+ }
1230
+ let R = class {
1231
+ constructor(e) {
1232
+ e && this.set(e);
1233
+ }
1234
+ set(e, r, n) {
1235
+ const i = this;
1236
+ function o(s, u, c) {
1237
+ const l = K(u);
1238
+ if (!l)
1239
+ throw new Error("header name must be a non-empty string");
1240
+ const d = f.findKey(i, l);
1241
+ (!d || i[d] === void 0 || c === !0 || c === void 0 && i[d] !== !1) && (i[d || u] = fe(s));
1242
+ }
1243
+ const a = (s, u) => f.forEach(s, (c, l) => o(c, l, u));
1244
+ if (f.isPlainObject(e) || e instanceof this.constructor)
1245
+ a(e, r);
1246
+ else if (f.isString(e) && (e = e.trim()) && !Vr(e))
1247
+ a($r(e), r);
1248
+ else if (f.isObject(e) && f.isIterable(e)) {
1249
+ let s = {}, u, c;
1250
+ for (const l of e) {
1251
+ if (!f.isArray(l))
1252
+ throw TypeError("Object iterator must return a key-value pair");
1253
+ s[c = l[0]] = (u = s[c]) ? f.isArray(u) ? [...u, l[1]] : [u, l[1]] : l[1];
1254
+ }
1255
+ a(s, r);
1256
+ } else
1257
+ e != null && o(r, e, n);
1258
+ return this;
1259
+ }
1260
+ get(e, r) {
1261
+ if (e = K(e), e) {
1262
+ const n = f.findKey(this, e);
1263
+ if (n) {
1264
+ const i = this[n];
1265
+ if (!r)
1266
+ return i;
1267
+ if (r === !0)
1268
+ return Hr(i);
1269
+ if (f.isFunction(r))
1270
+ return r.call(this, i, n);
1271
+ if (f.isRegExp(r))
1272
+ return r.exec(i);
1273
+ throw new TypeError("parser must be boolean|regexp|function");
1274
+ }
1275
+ }
1276
+ }
1277
+ has(e, r) {
1278
+ if (e = K(e), e) {
1279
+ const n = f.findKey(this, e);
1280
+ return !!(n && this[n] !== void 0 && (!r || qe(this, this[n], n, r)));
1281
+ }
1282
+ return !1;
1283
+ }
1284
+ delete(e, r) {
1285
+ const n = this;
1286
+ let i = !1;
1287
+ function o(a) {
1288
+ if (a = K(a), a) {
1289
+ const s = f.findKey(n, a);
1290
+ s && (!r || qe(n, n[s], s, r)) && (delete n[s], i = !0);
1291
+ }
1292
+ }
1293
+ return f.isArray(e) ? e.forEach(o) : o(e), i;
1294
+ }
1295
+ clear(e) {
1296
+ const r = Object.keys(this);
1297
+ let n = r.length, i = !1;
1298
+ for (; n--; ) {
1299
+ const o = r[n];
1300
+ (!e || qe(this, this[o], o, e, !0)) && (delete this[o], i = !0);
1301
+ }
1302
+ return i;
1303
+ }
1304
+ normalize(e) {
1305
+ const r = this, n = {};
1306
+ return f.forEach(this, (i, o) => {
1307
+ const a = f.findKey(n, o);
1308
+ if (a) {
1309
+ r[a] = fe(i), delete r[o];
1310
+ return;
1311
+ }
1312
+ const s = e ? Wr(o) : String(o).trim();
1313
+ s !== o && delete r[o], r[s] = fe(i), n[s] = !0;
1314
+ }), this;
1315
+ }
1316
+ concat(...e) {
1317
+ return this.constructor.concat(this, ...e);
1318
+ }
1319
+ toJSON(e) {
1320
+ const r = /* @__PURE__ */ Object.create(null);
1321
+ return f.forEach(this, (n, i) => {
1322
+ n != null && n !== !1 && (r[i] = e && f.isArray(n) ? n.join(", ") : n);
1323
+ }), r;
1324
+ }
1325
+ [Symbol.iterator]() {
1326
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1327
+ }
1328
+ toString() {
1329
+ return Object.entries(this.toJSON()).map(([e, r]) => e + ": " + r).join(`
1330
+ `);
1331
+ }
1332
+ getSetCookie() {
1333
+ return this.get("set-cookie") || [];
1334
+ }
1335
+ get [Symbol.toStringTag]() {
1336
+ return "AxiosHeaders";
1337
+ }
1338
+ static from(e) {
1339
+ return e instanceof this ? e : new this(e);
1340
+ }
1341
+ static concat(e, ...r) {
1342
+ const n = new this(e);
1343
+ return r.forEach((i) => n.set(i)), n;
1344
+ }
1345
+ static accessor(e) {
1346
+ const n = (this[ct] = this[ct] = {
1347
+ accessors: {}
1348
+ }).accessors, i = this.prototype;
1349
+ function o(a) {
1350
+ const s = K(a);
1351
+ n[s] || (Xr(i, a), n[s] = !0);
1352
+ }
1353
+ return f.isArray(e) ? e.forEach(o) : o(e), this;
1354
+ }
1355
+ };
1356
+ R.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1357
+ f.reduceDescriptors(R.prototype, ({ value: t }, e) => {
1358
+ let r = e[0].toUpperCase() + e.slice(1);
1359
+ return {
1360
+ get: () => t,
1361
+ set(n) {
1362
+ this[r] = n;
1363
+ }
1364
+ };
1365
+ });
1366
+ f.freezeMethods(R);
1367
+ function je(t, e) {
1368
+ const r = this || ee, n = e || r, i = R.from(n.headers);
1369
+ let o = n.data;
1370
+ return f.forEach(t, function(s) {
1371
+ o = s.call(r, o, i.normalize(), e ? e.status : void 0);
1372
+ }), i.normalize(), o;
1373
+ }
1374
+ function Qt(t) {
1375
+ return !!(t && t.__CANCEL__);
1376
+ }
1377
+ function J(t, e, r) {
1378
+ g.call(this, t ?? "canceled", g.ERR_CANCELED, e, r), this.name = "CanceledError";
1379
+ }
1380
+ f.inherits(J, g, {
1381
+ __CANCEL__: !0
1382
+ });
1383
+ function Gt(t, e, r) {
1384
+ const n = r.config.validateStatus;
1385
+ !r.status || !n || n(r.status) ? t(r) : e(new g(
1386
+ "Request failed with status code " + r.status,
1387
+ [g.ERR_BAD_REQUEST, g.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
1388
+ r.config,
1389
+ r.request,
1390
+ r
1391
+ ));
1392
+ }
1393
+ function zr(t) {
1394
+ const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
1395
+ return e && e[1] || "";
1396
+ }
1397
+ function Jr(t, e) {
1398
+ t = t || 10;
1399
+ const r = new Array(t), n = new Array(t);
1400
+ let i = 0, o = 0, a;
1401
+ return e = e !== void 0 ? e : 1e3, function(u) {
1402
+ const c = Date.now(), l = n[o];
1403
+ a || (a = c), r[i] = u, n[i] = c;
1404
+ let d = o, m = 0;
1405
+ for (; d !== i; )
1406
+ m += r[d++], d = d % t;
1407
+ if (i = (i + 1) % t, i === o && (o = (o + 1) % t), c - a < e)
1408
+ return;
1409
+ const b = l && c - l;
1410
+ return b ? Math.round(m * 1e3 / b) : void 0;
1411
+ };
1412
+ }
1413
+ function Kr(t, e) {
1414
+ let r = 0, n = 1e3 / e, i, o;
1415
+ const a = (c, l = Date.now()) => {
1416
+ r = l, i = null, o && (clearTimeout(o), o = null), t.apply(null, c);
1417
+ };
1418
+ return [(...c) => {
1419
+ const l = Date.now(), d = l - r;
1420
+ d >= n ? a(c, l) : (i = c, o || (o = setTimeout(() => {
1421
+ o = null, a(i);
1422
+ }, n - d)));
1423
+ }, () => i && a(i)];
1424
+ }
1425
+ const he = (t, e, r = 3) => {
1426
+ let n = 0;
1427
+ const i = Jr(50, 250);
1428
+ return Kr((o) => {
1429
+ const a = o.loaded, s = o.lengthComputable ? o.total : void 0, u = a - n, c = i(u), l = a <= s;
1430
+ n = a;
1431
+ const d = {
1432
+ loaded: a,
1433
+ total: s,
1434
+ progress: s ? a / s : void 0,
1435
+ bytes: u,
1436
+ rate: c || void 0,
1437
+ estimated: c && s && l ? (s - a) / c : void 0,
1438
+ event: o,
1439
+ lengthComputable: s != null,
1440
+ [e ? "download" : "upload"]: !0
1441
+ };
1442
+ t(d);
1443
+ }, r);
1444
+ }, lt = (t, e) => {
1445
+ const r = t != null;
1446
+ return [(n) => e[0]({
1447
+ lengthComputable: r,
1448
+ total: t,
1449
+ loaded: n
1450
+ }), e[1]];
1451
+ }, ft = (t) => (...e) => f.asap(() => t(...e)), Qr = E.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (r) => (r = new URL(r, E.origin), t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(
1452
+ new URL(E.origin),
1453
+ E.navigator && /(msie|trident)/i.test(E.navigator.userAgent)
1454
+ ) : () => !0, Gr = E.hasStandardBrowserEnv ? (
1455
+ // Standard browser envs support document.cookie
1456
+ {
1457
+ write(t, e, r, n, i, o) {
1458
+ const a = [t + "=" + encodeURIComponent(e)];
1459
+ f.isNumber(r) && a.push("expires=" + new Date(r).toGMTString()), f.isString(n) && a.push("path=" + n), f.isString(i) && a.push("domain=" + i), o === !0 && a.push("secure"), document.cookie = a.join("; ");
1460
+ },
1461
+ read(t) {
1462
+ const e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
1463
+ return e ? decodeURIComponent(e[3]) : null;
1464
+ },
1465
+ remove(t) {
1466
+ this.write(t, "", Date.now() - 864e5);
1467
+ }
1468
+ }
1469
+ ) : (
1470
+ // Non-standard browser env (web workers, react-native) lack needed support.
1471
+ {
1472
+ write() {
1473
+ },
1474
+ read() {
1475
+ return null;
1476
+ },
1477
+ remove() {
1478
+ }
1479
+ }
1480
+ );
1481
+ function Yr(t) {
1482
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
1483
+ }
1484
+ function Zr(t, e) {
1485
+ return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
1486
+ }
1487
+ function Yt(t, e, r) {
1488
+ let n = !Yr(e);
1489
+ return t && (n || r == !1) ? Zr(t, e) : e;
1490
+ }
1491
+ const dt = (t) => t instanceof R ? { ...t } : t;
1492
+ function U(t, e) {
1493
+ e = e || {};
1494
+ const r = {};
1495
+ function n(c, l, d, m) {
1496
+ return f.isPlainObject(c) && f.isPlainObject(l) ? f.merge.call({ caseless: m }, c, l) : f.isPlainObject(l) ? f.merge({}, l) : f.isArray(l) ? l.slice() : l;
1497
+ }
1498
+ function i(c, l, d, m) {
1499
+ if (f.isUndefined(l)) {
1500
+ if (!f.isUndefined(c))
1501
+ return n(void 0, c, d, m);
1502
+ } else return n(c, l, d, m);
1503
+ }
1504
+ function o(c, l) {
1505
+ if (!f.isUndefined(l))
1506
+ return n(void 0, l);
1507
+ }
1508
+ function a(c, l) {
1509
+ if (f.isUndefined(l)) {
1510
+ if (!f.isUndefined(c))
1511
+ return n(void 0, c);
1512
+ } else return n(void 0, l);
1513
+ }
1514
+ function s(c, l, d) {
1515
+ if (d in e)
1516
+ return n(c, l);
1517
+ if (d in t)
1518
+ return n(void 0, c);
1519
+ }
1520
+ const u = {
1521
+ url: o,
1522
+ method: o,
1523
+ data: o,
1524
+ baseURL: a,
1525
+ transformRequest: a,
1526
+ transformResponse: a,
1527
+ paramsSerializer: a,
1528
+ timeout: a,
1529
+ timeoutMessage: a,
1530
+ withCredentials: a,
1531
+ withXSRFToken: a,
1532
+ adapter: a,
1533
+ responseType: a,
1534
+ xsrfCookieName: a,
1535
+ xsrfHeaderName: a,
1536
+ onUploadProgress: a,
1537
+ onDownloadProgress: a,
1538
+ decompress: a,
1539
+ maxContentLength: a,
1540
+ maxBodyLength: a,
1541
+ beforeRedirect: a,
1542
+ transport: a,
1543
+ httpAgent: a,
1544
+ httpsAgent: a,
1545
+ cancelToken: a,
1546
+ socketPath: a,
1547
+ responseEncoding: a,
1548
+ validateStatus: s,
1549
+ headers: (c, l, d) => i(dt(c), dt(l), d, !0)
1550
+ };
1551
+ return f.forEach(Object.keys(Object.assign({}, t, e)), function(l) {
1552
+ const d = u[l] || i, m = d(t[l], e[l], l);
1553
+ f.isUndefined(m) && d !== s || (r[l] = m);
1554
+ }), r;
1555
+ }
1556
+ const Zt = (t) => {
1557
+ const e = U({}, t);
1558
+ let { data: r, withXSRFToken: n, xsrfHeaderName: i, xsrfCookieName: o, headers: a, auth: s } = e;
1559
+ e.headers = a = R.from(a), e.url = zt(Yt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), s && a.set(
1560
+ "Authorization",
1561
+ "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
1562
+ );
1563
+ let u;
1564
+ if (f.isFormData(r)) {
1565
+ if (E.hasStandardBrowserEnv || E.hasStandardBrowserWebWorkerEnv)
1566
+ a.setContentType(void 0);
1567
+ else if ((u = a.getContentType()) !== !1) {
1568
+ const [c, ...l] = u ? u.split(";").map((d) => d.trim()).filter(Boolean) : [];
1569
+ a.setContentType([c || "multipart/form-data", ...l].join("; "));
1570
+ }
1571
+ }
1572
+ if (E.hasStandardBrowserEnv && (n && f.isFunction(n) && (n = n(e)), n || n !== !1 && Qr(e.url))) {
1573
+ const c = i && o && Gr.read(o);
1574
+ c && a.set(i, c);
1575
+ }
1576
+ return e;
1577
+ }, ei = typeof XMLHttpRequest < "u", ti = ei && function(t) {
1578
+ return new Promise(function(r, n) {
1579
+ const i = Zt(t);
1580
+ let o = i.data;
1581
+ const a = R.from(i.headers).normalize();
1582
+ let { responseType: s, onUploadProgress: u, onDownloadProgress: c } = i, l, d, m, b, p;
1583
+ function y() {
1584
+ b && b(), p && p(), i.cancelToken && i.cancelToken.unsubscribe(l), i.signal && i.signal.removeEventListener("abort", l);
1585
+ }
1586
+ let h = new XMLHttpRequest();
1587
+ h.open(i.method.toUpperCase(), i.url, !0), h.timeout = i.timeout;
1588
+ function v() {
1589
+ if (!h)
1590
+ return;
1591
+ const O = R.from(
1592
+ "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1593
+ ), T = {
1594
+ data: !s || s === "text" || s === "json" ? h.responseText : h.response,
1595
+ status: h.status,
1596
+ statusText: h.statusText,
1597
+ headers: O,
1598
+ config: t,
1599
+ request: h
1600
+ };
1601
+ Gt(function(F) {
1602
+ r(F), y();
1603
+ }, function(F) {
1604
+ n(F), y();
1605
+ }, T), h = null;
1606
+ }
1607
+ "onloadend" in h ? h.onloadend = v : h.onreadystatechange = function() {
1608
+ !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(v);
1609
+ }, h.onabort = function() {
1610
+ h && (n(new g("Request aborted", g.ECONNABORTED, t, h)), h = null);
1611
+ }, h.onerror = function() {
1612
+ n(new g("Network Error", g.ERR_NETWORK, t, h)), h = null;
1613
+ }, h.ontimeout = function() {
1614
+ let q = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
1615
+ const T = i.transitional || Jt;
1616
+ i.timeoutErrorMessage && (q = i.timeoutErrorMessage), n(new g(
1617
+ q,
1618
+ T.clarifyTimeoutError ? g.ETIMEDOUT : g.ECONNABORTED,
1619
+ t,
1620
+ h
1621
+ )), h = null;
1622
+ }, o === void 0 && a.setContentType(null), "setRequestHeader" in h && f.forEach(a.toJSON(), function(q, T) {
1623
+ h.setRequestHeader(T, q);
1624
+ }), f.isUndefined(i.withCredentials) || (h.withCredentials = !!i.withCredentials), s && s !== "json" && (h.responseType = i.responseType), c && ([m, p] = he(c, !0), h.addEventListener("progress", m)), u && h.upload && ([d, b] = he(u), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", b)), (i.cancelToken || i.signal) && (l = (O) => {
1625
+ h && (n(!O || O.type ? new J(null, t, h) : O), h.abort(), h = null);
1626
+ }, i.cancelToken && i.cancelToken.subscribe(l), i.signal && (i.signal.aborted ? l() : i.signal.addEventListener("abort", l)));
1627
+ const w = zr(i.url);
1628
+ if (w && E.protocols.indexOf(w) === -1) {
1629
+ n(new g("Unsupported protocol " + w + ":", g.ERR_BAD_REQUEST, t));
1630
+ return;
1631
+ }
1632
+ h.send(o || null);
1633
+ });
1634
+ }, ni = (t, e) => {
1635
+ const { length: r } = t = t ? t.filter(Boolean) : [];
1636
+ if (e || r) {
1637
+ let n = new AbortController(), i;
1638
+ const o = function(c) {
1639
+ if (!i) {
1640
+ i = !0, s();
1641
+ const l = c instanceof Error ? c : this.reason;
1642
+ n.abort(l instanceof g ? l : new J(l instanceof Error ? l.message : l));
1643
+ }
1644
+ };
1645
+ let a = e && setTimeout(() => {
1646
+ a = null, o(new g(`timeout ${e} of ms exceeded`, g.ETIMEDOUT));
1647
+ }, e);
1648
+ const s = () => {
1649
+ t && (a && clearTimeout(a), a = null, t.forEach((c) => {
1650
+ c.unsubscribe ? c.unsubscribe(o) : c.removeEventListener("abort", o);
1651
+ }), t = null);
1652
+ };
1653
+ t.forEach((c) => c.addEventListener("abort", o));
1654
+ const { signal: u } = n;
1655
+ return u.unsubscribe = () => f.asap(s), u;
1656
+ }
1657
+ }, ri = function* (t, e) {
1658
+ let r = t.byteLength;
1659
+ if (r < e) {
1660
+ yield t;
1661
+ return;
1662
+ }
1663
+ let n = 0, i;
1664
+ for (; n < r; )
1665
+ i = n + e, yield t.slice(n, i), n = i;
1666
+ }, ii = async function* (t, e) {
1667
+ for await (const r of oi(t))
1668
+ yield* ri(r, e);
1669
+ }, oi = async function* (t) {
1670
+ if (t[Symbol.asyncIterator]) {
1671
+ yield* t;
1672
+ return;
1673
+ }
1674
+ const e = t.getReader();
1675
+ try {
1676
+ for (; ; ) {
1677
+ const { done: r, value: n } = await e.read();
1678
+ if (r)
1679
+ break;
1680
+ yield n;
1681
+ }
1682
+ } finally {
1683
+ await e.cancel();
1684
+ }
1685
+ }, pt = (t, e, r, n) => {
1686
+ const i = ii(t, e);
1687
+ let o = 0, a, s = (u) => {
1688
+ a || (a = !0, n && n(u));
1689
+ };
1690
+ return new ReadableStream({
1691
+ async pull(u) {
1692
+ try {
1693
+ const { done: c, value: l } = await i.next();
1694
+ if (c) {
1695
+ s(), u.close();
1696
+ return;
1697
+ }
1698
+ let d = l.byteLength;
1699
+ if (r) {
1700
+ let m = o += d;
1701
+ r(m);
1702
+ }
1703
+ u.enqueue(new Uint8Array(l));
1704
+ } catch (c) {
1705
+ throw s(c), c;
1706
+ }
1707
+ },
1708
+ cancel(u) {
1709
+ return s(u), i.return();
1710
+ }
1711
+ }, {
1712
+ highWaterMark: 2
1713
+ });
1714
+ }, Ee = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", en = Ee && typeof ReadableStream == "function", ai = Ee && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), tn = (t, ...e) => {
1715
+ try {
1716
+ return !!t(...e);
1717
+ } catch {
1718
+ return !1;
1719
+ }
1720
+ }, si = en && tn(() => {
1721
+ let t = !1;
1722
+ const e = new Request(E.origin, {
1723
+ body: new ReadableStream(),
1724
+ method: "POST",
1725
+ get duplex() {
1726
+ return t = !0, "half";
1727
+ }
1728
+ }).headers.has("Content-Type");
1729
+ return t && !e;
1730
+ }), mt = 64 * 1024, Ve = en && tn(() => f.isReadableStream(new Response("").body)), ye = {
1731
+ stream: Ve && ((t) => t.body)
1732
+ };
1733
+ Ee && ((t) => {
1734
+ ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((e) => {
1735
+ !ye[e] && (ye[e] = f.isFunction(t[e]) ? (r) => r[e]() : (r, n) => {
1736
+ throw new g(`Response type '${e}' is not supported`, g.ERR_NOT_SUPPORT, n);
1737
+ });
1738
+ });
1739
+ })(new Response());
1740
+ const ui = async (t) => {
1741
+ if (t == null)
1742
+ return 0;
1743
+ if (f.isBlob(t))
1744
+ return t.size;
1745
+ if (f.isSpecCompliantForm(t))
1746
+ return (await new Request(E.origin, {
1747
+ method: "POST",
1748
+ body: t
1749
+ }).arrayBuffer()).byteLength;
1750
+ if (f.isArrayBufferView(t) || f.isArrayBuffer(t))
1751
+ return t.byteLength;
1752
+ if (f.isURLSearchParams(t) && (t = t + ""), f.isString(t))
1753
+ return (await ai(t)).byteLength;
1754
+ }, ci = async (t, e) => {
1755
+ const r = f.toFiniteNumber(t.getContentLength());
1756
+ return r ?? ui(e);
1757
+ }, li = Ee && (async (t) => {
1758
+ let {
1759
+ url: e,
1760
+ method: r,
1761
+ data: n,
1762
+ signal: i,
1763
+ cancelToken: o,
1764
+ timeout: a,
1765
+ onDownloadProgress: s,
1766
+ onUploadProgress: u,
1767
+ responseType: c,
1768
+ headers: l,
1769
+ withCredentials: d = "same-origin",
1770
+ fetchOptions: m
1771
+ } = Zt(t);
1772
+ c = c ? (c + "").toLowerCase() : "text";
1773
+ let b = ni([i, o && o.toAbortSignal()], a), p;
1774
+ const y = b && b.unsubscribe && (() => {
1775
+ b.unsubscribe();
1776
+ });
1777
+ let h;
1778
+ try {
1779
+ if (u && si && r !== "get" && r !== "head" && (h = await ci(l, n)) !== 0) {
1780
+ let T = new Request(e, {
1781
+ method: "POST",
1782
+ body: n,
1783
+ duplex: "half"
1784
+ }), j;
1785
+ if (f.isFormData(n) && (j = T.headers.get("content-type")) && l.setContentType(j), T.body) {
1786
+ const [F, re] = lt(
1787
+ h,
1788
+ he(ft(u))
1789
+ );
1790
+ n = pt(T.body, mt, F, re);
1791
+ }
1792
+ }
1793
+ f.isString(d) || (d = d ? "include" : "omit");
1794
+ const v = "credentials" in Request.prototype;
1795
+ p = new Request(e, {
1796
+ ...m,
1797
+ signal: b,
1798
+ method: r.toUpperCase(),
1799
+ headers: l.normalize().toJSON(),
1800
+ body: n,
1801
+ duplex: "half",
1802
+ credentials: v ? d : void 0
1803
+ });
1804
+ let w = await fetch(p, m);
1805
+ const O = Ve && (c === "stream" || c === "response");
1806
+ if (Ve && (s || O && y)) {
1807
+ const T = {};
1808
+ ["status", "statusText", "headers"].forEach((Ge) => {
1809
+ T[Ge] = w[Ge];
1810
+ });
1811
+ const j = f.toFiniteNumber(w.headers.get("content-length")), [F, re] = s && lt(
1812
+ j,
1813
+ he(ft(s), !0)
1814
+ ) || [];
1815
+ w = new Response(
1816
+ pt(w.body, mt, F, () => {
1817
+ re && re(), y && y();
1818
+ }),
1819
+ T
1820
+ );
1821
+ }
1822
+ c = c || "text";
1823
+ let q = await ye[f.findKey(ye, c) || "text"](w, t);
1824
+ return !O && y && y(), await new Promise((T, j) => {
1825
+ Gt(T, j, {
1826
+ data: q,
1827
+ headers: R.from(w.headers),
1828
+ status: w.status,
1829
+ statusText: w.statusText,
1830
+ config: t,
1831
+ request: p
1832
+ });
1833
+ });
1834
+ } catch (v) {
1835
+ throw y && y(), v && v.name === "TypeError" && /Load failed|fetch/i.test(v.message) ? Object.assign(
1836
+ new g("Network Error", g.ERR_NETWORK, t, p),
1837
+ {
1838
+ cause: v.cause || v
1839
+ }
1840
+ ) : g.from(v, v && v.code, t, p);
1841
+ }
1842
+ }), We = {
1843
+ http: Tr,
1844
+ xhr: ti,
1845
+ fetch: li
1846
+ };
1847
+ f.forEach(We, (t, e) => {
1848
+ if (t) {
1849
+ try {
1850
+ Object.defineProperty(t, "name", { value: e });
1851
+ } catch {
1852
+ }
1853
+ Object.defineProperty(t, "adapterName", { value: e });
1854
+ }
1855
+ });
1856
+ const ht = (t) => `- ${t}`, fi = (t) => f.isFunction(t) || t === null || t === !1, nn = {
1857
+ getAdapter: (t) => {
1858
+ t = f.isArray(t) ? t : [t];
1859
+ const { length: e } = t;
1860
+ let r, n;
1861
+ const i = {};
1862
+ for (let o = 0; o < e; o++) {
1863
+ r = t[o];
1864
+ let a;
1865
+ if (n = r, !fi(r) && (n = We[(a = String(r)).toLowerCase()], n === void 0))
1866
+ throw new g(`Unknown adapter '${a}'`);
1867
+ if (n)
1868
+ break;
1869
+ i[a || "#" + o] = n;
1870
+ }
1871
+ if (!n) {
1872
+ const o = Object.entries(i).map(
1873
+ ([s, u]) => `adapter ${s} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
1874
+ );
1875
+ let a = e ? o.length > 1 ? `since :
1876
+ ` + o.map(ht).join(`
1877
+ `) : " " + ht(o[0]) : "as no adapter specified";
1878
+ throw new g(
1879
+ "There is no suitable adapter to dispatch the request " + a,
1880
+ "ERR_NOT_SUPPORT"
1881
+ );
1882
+ }
1883
+ return n;
1884
+ },
1885
+ adapters: We
1886
+ };
1887
+ function Ce(t) {
1888
+ if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1889
+ throw new J(null, t);
1890
+ }
1891
+ function yt(t) {
1892
+ return Ce(t), t.headers = R.from(t.headers), t.data = je.call(
1893
+ t,
1894
+ t.transformRequest
1895
+ ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), nn.getAdapter(t.adapter || ee.adapter)(t).then(function(n) {
1896
+ return Ce(t), n.data = je.call(
1897
+ t,
1898
+ t.transformResponse,
1899
+ n
1900
+ ), n.headers = R.from(n.headers), n;
1901
+ }, function(n) {
1902
+ return Qt(n) || (Ce(t), n && n.response && (n.response.data = je.call(
1903
+ t,
1904
+ t.transformResponse,
1905
+ n.response
1906
+ ), n.response.headers = R.from(n.response.headers))), Promise.reject(n);
1907
+ });
1908
+ }
1909
+ const rn = "1.10.0", Te = {};
1910
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
1911
+ Te[t] = function(n) {
1912
+ return typeof n === t || "a" + (e < 1 ? "n " : " ") + t;
1913
+ };
1914
+ });
1915
+ const bt = {};
1916
+ Te.transitional = function(e, r, n) {
1917
+ function i(o, a) {
1918
+ return "[Axios v" + rn + "] Transitional option '" + o + "'" + a + (n ? ". " + n : "");
1919
+ }
1920
+ return (o, a, s) => {
1921
+ if (e === !1)
1922
+ throw new g(
1923
+ i(a, " has been removed" + (r ? " in " + r : "")),
1924
+ g.ERR_DEPRECATED
1925
+ );
1926
+ return r && !bt[a] && (bt[a] = !0, console.warn(
1927
+ i(
1928
+ a,
1929
+ " has been deprecated since v" + r + " and will be removed in the near future"
1930
+ )
1931
+ )), e ? e(o, a, s) : !0;
1932
+ };
1933
+ };
1934
+ Te.spelling = function(e) {
1935
+ return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`), !0);
1936
+ };
1937
+ function di(t, e, r) {
1938
+ if (typeof t != "object")
1939
+ throw new g("options must be an object", g.ERR_BAD_OPTION_VALUE);
1940
+ const n = Object.keys(t);
1941
+ let i = n.length;
1942
+ for (; i-- > 0; ) {
1943
+ const o = n[i], a = e[o];
1944
+ if (a) {
1945
+ const s = t[o], u = s === void 0 || a(s, o, t);
1946
+ if (u !== !0)
1947
+ throw new g("option " + o + " must be " + u, g.ERR_BAD_OPTION_VALUE);
1948
+ continue;
1949
+ }
1950
+ if (r !== !0)
1951
+ throw new g("Unknown option " + o, g.ERR_BAD_OPTION);
1952
+ }
1953
+ }
1954
+ const de = {
1955
+ assertOptions: di,
1956
+ validators: Te
1957
+ }, P = de.validators;
1958
+ let M = class {
1959
+ constructor(e) {
1960
+ this.defaults = e || {}, this.interceptors = {
1961
+ request: new ut(),
1962
+ response: new ut()
1963
+ };
1964
+ }
1965
+ /**
1966
+ * Dispatch a request
1967
+ *
1968
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1969
+ * @param {?Object} config
1970
+ *
1971
+ * @returns {Promise} The Promise to be fulfilled
1972
+ */
1973
+ async request(e, r) {
1974
+ try {
1975
+ return await this._request(e, r);
1976
+ } catch (n) {
1977
+ if (n instanceof Error) {
1978
+ let i = {};
1979
+ Error.captureStackTrace ? Error.captureStackTrace(i) : i = new Error();
1980
+ const o = i.stack ? i.stack.replace(/^.+\n/, "") : "";
1981
+ try {
1982
+ n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
1983
+ ` + o) : n.stack = o;
1984
+ } catch {
1985
+ }
1986
+ }
1987
+ throw n;
1988
+ }
1989
+ }
1990
+ _request(e, r) {
1991
+ typeof e == "string" ? (r = r || {}, r.url = e) : r = e || {}, r = U(this.defaults, r);
1992
+ const { transitional: n, paramsSerializer: i, headers: o } = r;
1993
+ n !== void 0 && de.assertOptions(n, {
1994
+ silentJSONParsing: P.transitional(P.boolean),
1995
+ forcedJSONParsing: P.transitional(P.boolean),
1996
+ clarifyTimeoutError: P.transitional(P.boolean)
1997
+ }, !1), i != null && (f.isFunction(i) ? r.paramsSerializer = {
1998
+ serialize: i
1999
+ } : de.assertOptions(i, {
2000
+ encode: P.function,
2001
+ serialize: P.function
2002
+ }, !0)), r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0), de.assertOptions(r, {
2003
+ baseUrl: P.spelling("baseURL"),
2004
+ withXsrfToken: P.spelling("withXSRFToken")
2005
+ }, !0), r.method = (r.method || this.defaults.method || "get").toLowerCase();
2006
+ let a = o && f.merge(
2007
+ o.common,
2008
+ o[r.method]
2009
+ );
2010
+ o && f.forEach(
2011
+ ["delete", "get", "head", "post", "put", "patch", "common"],
2012
+ (p) => {
2013
+ delete o[p];
2014
+ }
2015
+ ), r.headers = R.concat(a, o);
2016
+ const s = [];
2017
+ let u = !0;
2018
+ this.interceptors.request.forEach(function(y) {
2019
+ typeof y.runWhen == "function" && y.runWhen(r) === !1 || (u = u && y.synchronous, s.unshift(y.fulfilled, y.rejected));
2020
+ });
2021
+ const c = [];
2022
+ this.interceptors.response.forEach(function(y) {
2023
+ c.push(y.fulfilled, y.rejected);
2024
+ });
2025
+ let l, d = 0, m;
2026
+ if (!u) {
2027
+ const p = [yt.bind(this), void 0];
2028
+ for (p.unshift.apply(p, s), p.push.apply(p, c), m = p.length, l = Promise.resolve(r); d < m; )
2029
+ l = l.then(p[d++], p[d++]);
2030
+ return l;
2031
+ }
2032
+ m = s.length;
2033
+ let b = r;
2034
+ for (d = 0; d < m; ) {
2035
+ const p = s[d++], y = s[d++];
2036
+ try {
2037
+ b = p(b);
2038
+ } catch (h) {
2039
+ y.call(this, h);
2040
+ break;
2041
+ }
2042
+ }
2043
+ try {
2044
+ l = yt.call(this, b);
2045
+ } catch (p) {
2046
+ return Promise.reject(p);
2047
+ }
2048
+ for (d = 0, m = c.length; d < m; )
2049
+ l = l.then(c[d++], c[d++]);
2050
+ return l;
2051
+ }
2052
+ getUri(e) {
2053
+ e = U(this.defaults, e);
2054
+ const r = Yt(e.baseURL, e.url, e.allowAbsoluteUrls);
2055
+ return zt(r, e.params, e.paramsSerializer);
2056
+ }
2057
+ };
2058
+ f.forEach(["delete", "get", "head", "options"], function(e) {
2059
+ M.prototype[e] = function(r, n) {
2060
+ return this.request(U(n || {}, {
2061
+ method: e,
2062
+ url: r,
2063
+ data: (n || {}).data
2064
+ }));
2065
+ };
2066
+ });
2067
+ f.forEach(["post", "put", "patch"], function(e) {
2068
+ function r(n) {
2069
+ return function(o, a, s) {
2070
+ return this.request(U(s || {}, {
2071
+ method: e,
2072
+ headers: n ? {
2073
+ "Content-Type": "multipart/form-data"
2074
+ } : {},
2075
+ url: o,
2076
+ data: a
2077
+ }));
2078
+ };
2079
+ }
2080
+ M.prototype[e] = r(), M.prototype[e + "Form"] = r(!0);
2081
+ });
2082
+ let pi = class on {
2083
+ constructor(e) {
2084
+ if (typeof e != "function")
2085
+ throw new TypeError("executor must be a function.");
2086
+ let r;
2087
+ this.promise = new Promise(function(o) {
2088
+ r = o;
2089
+ });
2090
+ const n = this;
2091
+ this.promise.then((i) => {
2092
+ if (!n._listeners) return;
2093
+ let o = n._listeners.length;
2094
+ for (; o-- > 0; )
2095
+ n._listeners[o](i);
2096
+ n._listeners = null;
2097
+ }), this.promise.then = (i) => {
2098
+ let o;
2099
+ const a = new Promise((s) => {
2100
+ n.subscribe(s), o = s;
2101
+ }).then(i);
2102
+ return a.cancel = function() {
2103
+ n.unsubscribe(o);
2104
+ }, a;
2105
+ }, e(function(o, a, s) {
2106
+ n.reason || (n.reason = new J(o, a, s), r(n.reason));
2107
+ });
2108
+ }
2109
+ /**
2110
+ * Throws a `CanceledError` if cancellation has been requested.
2111
+ */
2112
+ throwIfRequested() {
2113
+ if (this.reason)
2114
+ throw this.reason;
2115
+ }
2116
+ /**
2117
+ * Subscribe to the cancel signal
2118
+ */
2119
+ subscribe(e) {
2120
+ if (this.reason) {
2121
+ e(this.reason);
2122
+ return;
2123
+ }
2124
+ this._listeners ? this._listeners.push(e) : this._listeners = [e];
2125
+ }
2126
+ /**
2127
+ * Unsubscribe from the cancel signal
2128
+ */
2129
+ unsubscribe(e) {
2130
+ if (!this._listeners)
2131
+ return;
2132
+ const r = this._listeners.indexOf(e);
2133
+ r !== -1 && this._listeners.splice(r, 1);
2134
+ }
2135
+ toAbortSignal() {
2136
+ const e = new AbortController(), r = (n) => {
2137
+ e.abort(n);
2138
+ };
2139
+ return this.subscribe(r), e.signal.unsubscribe = () => this.unsubscribe(r), e.signal;
2140
+ }
2141
+ /**
2142
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
2143
+ * cancels the `CancelToken`.
2144
+ */
2145
+ static source() {
2146
+ let e;
2147
+ return {
2148
+ token: new on(function(i) {
2149
+ e = i;
2150
+ }),
2151
+ cancel: e
2152
+ };
2153
+ }
2154
+ };
2155
+ function mi(t) {
2156
+ return function(r) {
2157
+ return t.apply(null, r);
2158
+ };
2159
+ }
2160
+ function hi(t) {
2161
+ return f.isObject(t) && t.isAxiosError === !0;
2162
+ }
2163
+ const Xe = {
2164
+ Continue: 100,
2165
+ SwitchingProtocols: 101,
2166
+ Processing: 102,
2167
+ EarlyHints: 103,
2168
+ Ok: 200,
2169
+ Created: 201,
2170
+ Accepted: 202,
2171
+ NonAuthoritativeInformation: 203,
2172
+ NoContent: 204,
2173
+ ResetContent: 205,
2174
+ PartialContent: 206,
2175
+ MultiStatus: 207,
2176
+ AlreadyReported: 208,
2177
+ ImUsed: 226,
2178
+ MultipleChoices: 300,
2179
+ MovedPermanently: 301,
2180
+ Found: 302,
2181
+ SeeOther: 303,
2182
+ NotModified: 304,
2183
+ UseProxy: 305,
2184
+ Unused: 306,
2185
+ TemporaryRedirect: 307,
2186
+ PermanentRedirect: 308,
2187
+ BadRequest: 400,
2188
+ Unauthorized: 401,
2189
+ PaymentRequired: 402,
2190
+ Forbidden: 403,
2191
+ NotFound: 404,
2192
+ MethodNotAllowed: 405,
2193
+ NotAcceptable: 406,
2194
+ ProxyAuthenticationRequired: 407,
2195
+ RequestTimeout: 408,
2196
+ Conflict: 409,
2197
+ Gone: 410,
2198
+ LengthRequired: 411,
2199
+ PreconditionFailed: 412,
2200
+ PayloadTooLarge: 413,
2201
+ UriTooLong: 414,
2202
+ UnsupportedMediaType: 415,
2203
+ RangeNotSatisfiable: 416,
2204
+ ExpectationFailed: 417,
2205
+ ImATeapot: 418,
2206
+ MisdirectedRequest: 421,
2207
+ UnprocessableEntity: 422,
2208
+ Locked: 423,
2209
+ FailedDependency: 424,
2210
+ TooEarly: 425,
2211
+ UpgradeRequired: 426,
2212
+ PreconditionRequired: 428,
2213
+ TooManyRequests: 429,
2214
+ RequestHeaderFieldsTooLarge: 431,
2215
+ UnavailableForLegalReasons: 451,
2216
+ InternalServerError: 500,
2217
+ NotImplemented: 501,
2218
+ BadGateway: 502,
2219
+ ServiceUnavailable: 503,
2220
+ GatewayTimeout: 504,
2221
+ HttpVersionNotSupported: 505,
2222
+ VariantAlsoNegotiates: 506,
2223
+ InsufficientStorage: 507,
2224
+ LoopDetected: 508,
2225
+ NotExtended: 510,
2226
+ NetworkAuthenticationRequired: 511
2227
+ };
2228
+ Object.entries(Xe).forEach(([t, e]) => {
2229
+ Xe[e] = t;
2230
+ });
2231
+ function an(t) {
2232
+ const e = new M(t), r = Ft(M.prototype.request, e);
2233
+ return f.extend(r, M.prototype, e, { allOwnKeys: !0 }), f.extend(r, e, null, { allOwnKeys: !0 }), r.create = function(i) {
2234
+ return an(U(t, i));
2235
+ }, r;
2236
+ }
2237
+ const S = an(ee);
2238
+ S.Axios = M;
2239
+ S.CanceledError = J;
2240
+ S.CancelToken = pi;
2241
+ S.isCancel = Qt;
2242
+ S.VERSION = rn;
2243
+ S.toFormData = Ae;
2244
+ S.AxiosError = g;
2245
+ S.Cancel = S.CanceledError;
2246
+ S.all = function(e) {
2247
+ return Promise.all(e);
2248
+ };
2249
+ S.spread = mi;
2250
+ S.isAxiosError = hi;
2251
+ S.mergeConfig = U;
2252
+ S.AxiosHeaders = R;
2253
+ S.formToJSON = (t) => Kt(f.isHTMLForm(t) ? new FormData(t) : t);
2254
+ S.getAdapter = nn.getAdapter;
2255
+ S.HttpStatusCode = Xe;
2256
+ S.default = S;
2257
+ const {
2258
+ Axios: zi,
2259
+ AxiosError: gt,
2260
+ CanceledError: Ji,
2261
+ isCancel: Ki,
2262
+ CancelToken: Qi,
2263
+ VERSION: Gi,
2264
+ all: Yi,
2265
+ Cancel: Zi,
2266
+ isAxiosError: eo,
2267
+ spread: to,
2268
+ toFormData: no,
2269
+ AxiosHeaders: ro,
2270
+ HttpStatusCode: io,
2271
+ formToJSON: oo,
2272
+ getAdapter: ao,
2273
+ mergeConfig: so
2274
+ } = S, yi = (t) => Pt.some(t, (e) => e && e.errorCode !== void 0) || t?.errorCode !== void 0;
2275
+ let H;
2276
+ try {
2277
+ H = require("@react-native-async-storage/async-storage").default;
2278
+ } catch {
2279
+ H = null;
2280
+ }
2281
+ const De = typeof window < "u" && typeof window.localStorage < "u", Fe = !!H, xe = {}, ze = {
2282
+ getItem: async (t) => Fe ? H.getItem(t) : De ? window.localStorage.getItem(t) : xe[t] || null,
2283
+ setItem: async (t, e) => {
2284
+ if (Fe)
2285
+ return H.setItem(t, e);
2286
+ if (De) {
2287
+ window.localStorage.setItem(t, e);
2288
+ return;
2289
+ }
2290
+ xe[t] = e;
2291
+ },
2292
+ removeItem: async (t) => {
2293
+ if (Fe)
2294
+ return H.removeItem(t);
2295
+ if (De) {
2296
+ window.localStorage.removeItem(t);
2297
+ return;
2298
+ }
2299
+ delete xe[t];
2300
+ }
2301
+ };
2302
+ typeof window < "u" ? window.__STORE_QUERY_CLIENT__ || (window.__STORE_QUERY_CLIENT__ = new Me({
2303
+ defaultOptions: {
2304
+ queries: {
2305
+ refetchOnWindowFocus: !0,
2306
+ refetchOnMount: !1,
2307
+ retry: 3,
2308
+ staleTime: 1e3 * 60 * 5
2309
+ }
2310
+ }
2311
+ })) : new Me({
2312
+ defaultOptions: {
2313
+ queries: {
2314
+ refetchOnWindowFocus: !0,
2315
+ refetchOnMount: !1,
2316
+ retry: 3,
2317
+ staleTime: 1e3 * 60 * 5
2318
+ }
2319
+ }
2320
+ });
2321
+ const sn = "auth_token", bi = "https://localhost:3000/shop-api", un = S.create({
2322
+ baseURL: bi,
2323
+ withCredentials: !0,
2324
+ // Required for cookie-based sessions
2325
+ headers: {
2326
+ "vendure-token": ""
2327
+ // We'll set this in the request interceptor
2328
+ }
2329
+ });
2330
+ let gi = async (t, e) => {
2331
+ await e(t);
2332
+ };
2333
+ un.interceptors.request.use(async (t) => (gi(t, async (r) => {
2334
+ const n = await ze.getItem(sn), i = await ze.getItem("channelToken");
2335
+ n && (r.headers.Authorization = `Bearer ${n}`), i && (r.headers["vendure-token"] = i);
2336
+ }), t));
2337
+ un.interceptors.response.use((t) => {
2338
+ const e = t.headers["vendure-auth-token"];
2339
+ if (e && ze.setItem(sn, e), yi(t.data.data)) {
2340
+ const r = Object.values(t.data.data)[0], n = new gt(r.errorCode);
2341
+ return n.response = t, n.request = t.request, n.config = t.config, Promise.reject(n);
2342
+ }
2343
+ if (t.data.errors?.length > 0) {
2344
+ const r = t.data.errors[0], n = new gt(r.message);
2345
+ return n.response = t, n.request = t.request, n.config = t.config, Promise.reject(n);
2346
+ }
2347
+ return t;
2348
+ }, (t) => Promise.reject(t));
2349
+ var k = {}, oe = {}, ae = {}, se = {}, vt;
2350
+ function te() {
2351
+ if (vt) return se;
2352
+ vt = 1, Object.defineProperty(se, "__esModule", { value: !0 });
2353
+ var t;
2354
+ return function(e) {
2355
+ e.Mutation = "mutation", e.Query = "query", e.Subscription = "subscription";
2356
+ }(t || (t = {})), se.default = t, se;
2357
+ }
2358
+ var L = {}, Q = {}, wt;
2359
+ function vi() {
2360
+ if (wt) return Q;
2361
+ wt = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.isNestedField = void 0;
2362
+ function t(e) {
2363
+ 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");
2364
+ }
2365
+ return Q.isNestedField = t, Q;
2366
+ }
2367
+ var St;
2368
+ function ne() {
2369
+ if (St) return L;
2370
+ St = 1;
2371
+ var t = L && L.__assign || function() {
2372
+ return t = Object.assign || function(n) {
2373
+ for (var i, o = 1, a = arguments.length; o < a; o++) {
2374
+ i = arguments[o];
2375
+ for (var s in i) Object.prototype.hasOwnProperty.call(i, s) && (n[s] = i[s]);
2376
+ }
2377
+ return n;
2378
+ }, t.apply(this, arguments);
2379
+ };
2380
+ Object.defineProperty(L, "__esModule", { value: !0 });
2381
+ var e = vi(), r = (
2382
+ /** @class */
2383
+ function() {
2384
+ function n() {
2385
+ }
2386
+ return n.resolveVariables = function(i) {
2387
+ for (var o = {}, a = 0, s = i; a < s.length; a++) {
2388
+ var u = s[a], c = u.variables, l = u.fields;
2389
+ o = t(t(t({}, o), c), l && n.getNestedVariables(l) || {});
2390
+ }
2391
+ return o;
2392
+ }, n.queryDataNameAndArgumentMap = function(i) {
2393
+ return i && Object.keys(i).length ? "(".concat(Object.entries(i).reduce(function(o, a, s) {
2394
+ var u = a[0], c = a[1];
2395
+ return "".concat(o).concat(s !== 0 ? ", " : "").concat(c && c.name ? c.name : u, ": $").concat(u);
2396
+ }, ""), ")") : "";
2397
+ }, n.queryFieldsMap = function(i) {
2398
+ var o = this;
2399
+ return i ? i.map(function(a) {
2400
+ if ((0, e.isNestedField)(a))
2401
+ return n.queryNestedFieldMap(a);
2402
+ if (typeof a == "object") {
2403
+ var s = "";
2404
+ return Object.entries(a).forEach(function(u, c, l) {
2405
+ var d = u[0], m = u[1];
2406
+ s += "".concat(d, " ").concat(m.length > 0 ? "{ " + o.queryFieldsMap(m) + " }" : ""), c < l.length - 1 && (s += ", ");
2407
+ }), s;
2408
+ } else
2409
+ return "".concat(a);
2410
+ }).join(", ") : "";
2411
+ }, n.operationOrAlias = function(i) {
2412
+ return typeof i == "string" ? i : "".concat(i.alias, ": ").concat(i.name);
2413
+ }, n.isFragment = function(i) {
2414
+ var o;
2415
+ return (o = i?.fragment === !0) !== null && o !== void 0 ? o : !1;
2416
+ }, n.operationOrFragment = function(i) {
2417
+ return n.isFragment(i) ? i.operation : n.operationOrAlias(i.operation);
2418
+ }, n.getFragment = function(i) {
2419
+ return n.isFragment(i) ? "... on " : "";
2420
+ }, n.queryNestedFieldMap = function(i) {
2421
+ return "".concat(n.getFragment(i)).concat(n.operationOrFragment(i), " ").concat(this.isFragment(i) ? "" : this.queryDataNameAndArgumentMap(i.variables), " ").concat(i.fields.length > 0 ? "{ " + this.queryFieldsMap(i.fields) + " }" : "");
2422
+ }, n.queryVariablesMap = function(i, o) {
2423
+ var a = {}, s = function(u) {
2424
+ u && Object.keys(u).map(function(c) {
2425
+ a[c] = typeof u[c] == "object" ? u[c].value : u[c];
2426
+ });
2427
+ };
2428
+ return s(i), o && typeof o == "object" && s(n.getNestedVariables(o)), a;
2429
+ }, n.getNestedVariables = function(i) {
2430
+ var o = {};
2431
+ function a(s) {
2432
+ return s?.forEach(function(u) {
2433
+ if ((0, e.isNestedField)(u))
2434
+ o = t(t(t({}, u.variables), o), u.fields && a(u.fields));
2435
+ else if (typeof u == "object")
2436
+ for (var c = 0, l = Object.entries(u); c < l.length; c++) {
2437
+ var d = l[c], m = d[1];
2438
+ a(m);
2439
+ }
2440
+ }), o;
2441
+ }
2442
+ return a(i), o;
2443
+ }, n.queryDataType = function(i) {
2444
+ var o = "String", a = typeof i == "object" ? i.value : i;
2445
+ if (i?.type != null)
2446
+ o = i.type;
2447
+ else {
2448
+ var s = Array.isArray(a) ? a[0] : a;
2449
+ switch (typeof s) {
2450
+ case "object":
2451
+ o = "Object";
2452
+ break;
2453
+ case "boolean":
2454
+ o = "Boolean";
2455
+ break;
2456
+ case "number":
2457
+ o = s % 1 === 0 ? "Int" : "Float";
2458
+ break;
2459
+ }
2460
+ }
2461
+ 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;
2462
+ }, n;
2463
+ }()
2464
+ );
2465
+ return L.default = r, L;
2466
+ }
2467
+ var Ot;
2468
+ function wi() {
2469
+ if (Ot) return ae;
2470
+ Ot = 1, Object.defineProperty(ae, "__esModule", { value: !0 });
2471
+ var t = te(), e = ne(), r = (
2472
+ /** @class */
2473
+ function() {
2474
+ function n(i) {
2475
+ Array.isArray(i) ? this.variables = e.default.resolveVariables(i) : (this.variables = i.variables, this.fields = i.fields, this.operation = i.operation);
2476
+ }
2477
+ return n.prototype.mutationBuilder = function() {
2478
+ return this.operationWrapperTemplate(this.variables, this.operationTemplate(this.operation));
2479
+ }, n.prototype.mutationsBuilder = function(i) {
2480
+ var o = this, a = i.map(function(s) {
2481
+ return o.operation = s.operation, o.variables = s.variables, o.fields = s.fields, o.operationTemplate(s.operation);
2482
+ });
2483
+ return this.operationWrapperTemplate(e.default.resolveVariables(i), a.join(`
2484
+ `));
2485
+ }, n.prototype.queryDataNameAndArgumentMap = function() {
2486
+ return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(i, o, a) {
2487
+ return "".concat(i).concat(a !== 0 ? ", " : "").concat(o, ": $").concat(o);
2488
+ }, ""), ")") : "";
2489
+ }, n.prototype.queryDataArgumentAndTypeMap = function(i) {
2490
+ return Object.keys(i).length ? "(".concat(Object.keys(i).reduce(function(o, a, s) {
2491
+ return "".concat(o).concat(s !== 0 ? ", " : "", "$").concat(a, ": ").concat(e.default.queryDataType(i[a]));
2492
+ }, ""), ")") : "";
2493
+ }, n.prototype.operationWrapperTemplate = function(i, o) {
2494
+ var a = typeof this.operation == "string" ? this.operation : this.operation.name;
2495
+ return {
2496
+ query: "".concat(t.default.Mutation, " ").concat(a.charAt(0).toUpperCase() + a.slice(1), " ").concat(this.queryDataArgumentAndTypeMap(i), ` {
2497
+ `).concat(o, `
2498
+ }`),
2499
+ variables: e.default.queryVariablesMap(i)
2500
+ };
2501
+ }, n.prototype.operationTemplate = function(i) {
2502
+ var o = typeof i == "string" ? i : "".concat(i.alias, ": ").concat(i.name);
2503
+ return "".concat(o, " ").concat(this.queryDataNameAndArgumentMap(), ` {
2504
+ `).concat(this.queryFieldsMap(this.fields), `
2505
+ }`);
2506
+ }, n.prototype.queryFieldsMap = function(i) {
2507
+ var o = this;
2508
+ return Array.isArray(i) ? i.map(function(a) {
2509
+ return typeof a == "object" ? "".concat(Object.keys(a)[0], " { ").concat(o.queryFieldsMap(Object.values(a)[0]), " }") : "".concat(a);
2510
+ }).join(", ") : "";
2511
+ }, n;
2512
+ }()
2513
+ );
2514
+ return ae.default = r, ae;
2515
+ }
2516
+ var ue = {}, At;
2517
+ function Si() {
2518
+ if (At) return ue;
2519
+ At = 1, Object.defineProperty(ue, "__esModule", { value: !0 });
2520
+ var t = te(), e = ne(), r = (
2521
+ /** @class */
2522
+ function() {
2523
+ function n(i) {
2524
+ this.queryDataType = function(o) {
2525
+ var a = "String", s = typeof o == "object" ? o.value : o;
2526
+ if (o.type !== void 0)
2527
+ a = o.type;
2528
+ else
2529
+ switch (typeof s) {
2530
+ case "object":
2531
+ a = "Object";
2532
+ break;
2533
+ case "boolean":
2534
+ a = "Boolean";
2535
+ break;
2536
+ case "number":
2537
+ a = s % 1 === 0 ? "Int" : "Float";
2538
+ break;
2539
+ }
2540
+ return typeof o == "object" && o.required && (a += "!"), a;
2541
+ }, Array.isArray(i) ? this.variables = e.default.resolveVariables(i) : (this.variables = i.variables, this.fields = i.fields || [], this.operation = i.operation);
2542
+ }
2543
+ return n.prototype.queryBuilder = function() {
2544
+ return this.operationWrapperTemplate(this.operationTemplate());
2545
+ }, n.prototype.queriesBuilder = function(i) {
2546
+ var o = this, a = function() {
2547
+ var s = [];
2548
+ return i.forEach(function(u) {
2549
+ u && (o.operation = u.operation, o.fields = u.fields, o.variables = u.variables, s.push(o.operationTemplate()));
2550
+ }), s.join(" ");
2551
+ };
2552
+ return this.operationWrapperTemplate(a());
2553
+ }, n.prototype.queryDataNameAndArgumentMap = function() {
2554
+ return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(i, o, a) {
2555
+ return "".concat(i).concat(a !== 0 ? ", " : "").concat(o, ": $").concat(o);
2556
+ }, ""), ")") : "";
2557
+ }, n.prototype.queryDataArgumentAndTypeMap = function() {
2558
+ var i = this;
2559
+ return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(o, a, s) {
2560
+ return "".concat(o).concat(s !== 0 ? ", " : "", "$").concat(a, ": ").concat(i.queryDataType(i.variables[a]));
2561
+ }, ""), ")") : "";
2562
+ }, n.prototype.operationWrapperTemplate = function(i) {
2563
+ var o = typeof this.operation == "string" ? this.operation : this.operation.name;
2564
+ return {
2565
+ query: "".concat(t.default.Query, " ").concat(o.charAt(0).toUpperCase()).concat(o.slice(1), " ").concat(this.queryDataArgumentAndTypeMap(), " { ").concat(i, " }"),
2566
+ variables: e.default.queryVariablesMap(this.variables)
2567
+ };
2568
+ }, n.prototype.operationTemplate = function() {
2569
+ var i = typeof this.operation == "string" ? this.operation : "".concat(this.operation.alias, ": ").concat(this.operation.name);
2570
+ return "".concat(i, " ").concat(this.queryDataNameAndArgumentMap(), " { nodes { ").concat(e.default.queryFieldsMap(this.fields), " } }");
2571
+ }, n;
2572
+ }()
2573
+ );
2574
+ return ue.default = r, ue;
2575
+ }
2576
+ var Et;
2577
+ function Oi() {
2578
+ if (Et) return oe;
2579
+ Et = 1, Object.defineProperty(oe, "__esModule", { value: !0 });
2580
+ var t = wi(), e = Si();
2581
+ return oe.default = { DefaultAppSyncQueryAdapter: e.default, DefaultAppSyncMutationAdapter: t.default }, oe;
2582
+ }
2583
+ var I = {}, Tt;
2584
+ function Ai() {
2585
+ if (Tt) return I;
2586
+ Tt = 1;
2587
+ var t = I && I.__assign || function() {
2588
+ return t = Object.assign || function(i) {
2589
+ for (var o, a = 1, s = arguments.length; a < s; a++) {
2590
+ o = arguments[a];
2591
+ for (var u in o) Object.prototype.hasOwnProperty.call(o, u) && (i[u] = o[u]);
2592
+ }
2593
+ return i;
2594
+ }, t.apply(this, arguments);
2595
+ };
2596
+ Object.defineProperty(I, "__esModule", { value: !0 });
2597
+ var e = te(), r = ne(), n = (
2598
+ /** @class */
2599
+ function() {
2600
+ function i(o, a) {
2601
+ var s = this;
2602
+ Array.isArray(o) ? this.variables = r.default.resolveVariables(o) : (this.variables = o.variables, this.fields = o.fields, this.operation = o.operation), this.config = {
2603
+ operationName: ""
2604
+ }, a && Object.entries(a).forEach(function(u) {
2605
+ var c = u[0], l = u[1];
2606
+ s.config[c] = l;
2607
+ });
2608
+ }
2609
+ return i.prototype.mutationBuilder = function() {
2610
+ return this.operationWrapperTemplate(e.default.Mutation, this.variables, this.operationTemplate(this.operation));
2611
+ }, i.prototype.mutationsBuilder = function(o) {
2612
+ var a = this, s = o.map(function(u) {
2613
+ return a.operation = u.operation, a.variables = u.variables, a.fields = u.fields, a.operationTemplate(u.operation);
2614
+ });
2615
+ return this.operationWrapperTemplate(e.default.Mutation, r.default.resolveVariables(o), s.join(`
2616
+ `));
2617
+ }, i.prototype.queryDataArgumentAndTypeMap = function(o) {
2618
+ return this.fields && typeof this.fields == "object" && (o = t(t({}, r.default.getNestedVariables(this.fields)), o)), o && Object.keys(o).length > 0 ? "(".concat(Object.keys(o).reduce(function(a, s, u) {
2619
+ return "".concat(a).concat(u !== 0 ? ", " : "", "$").concat(s, ": ").concat(r.default.queryDataType(o[s]));
2620
+ }, ""), ")") : "";
2621
+ }, i.prototype.operationWrapperTemplate = function(o, a, s) {
2622
+ var u = "".concat(o, " ").concat(this.queryDataArgumentAndTypeMap(a), ` {
2623
+ `).concat(s, `
2624
+ }`);
2625
+ return this.config.operationName && (u = u.replace("mutation", "mutation ".concat(this.config.operationName))), {
2626
+ query: u,
2627
+ variables: r.default.queryVariablesMap(a, this.fields)
2628
+ };
2629
+ }, i.prototype.operationTemplate = function(o) {
2630
+ var a = typeof o == "string" ? o : "".concat(o.alias, ": ").concat(o.name);
2631
+ return "".concat(a, " ").concat(r.default.queryDataNameAndArgumentMap(this.variables), " ").concat(this.fields && this.fields.length > 0 ? `{
2632
+ `.concat(r.default.queryFieldsMap(this.fields), `
2633
+ }`) : "");
2634
+ }, i;
2635
+ }()
2636
+ );
2637
+ return I.default = n, I;
2638
+ }
2639
+ var $ = {}, _t;
2640
+ function Ei() {
2641
+ if (_t) return $;
2642
+ _t = 1;
2643
+ var t = $ && $.__assign || function() {
2644
+ return t = Object.assign || function(i) {
2645
+ for (var o, a = 1, s = arguments.length; a < s; a++) {
2646
+ o = arguments[a];
2647
+ for (var u in o) Object.prototype.hasOwnProperty.call(o, u) && (i[u] = o[u]);
2648
+ }
2649
+ return i;
2650
+ }, t.apply(this, arguments);
2651
+ };
2652
+ Object.defineProperty($, "__esModule", { value: !0 });
2653
+ var e = te(), r = ne(), n = (
2654
+ /** @class */
2655
+ function() {
2656
+ function i(o, a) {
2657
+ var s = this;
2658
+ this.config = {
2659
+ operationName: ""
2660
+ }, a && Object.entries(a).forEach(function(u) {
2661
+ var c = u[0], l = u[1];
2662
+ s.config[c] = l;
2663
+ }), Array.isArray(o) ? this.variables = r.default.resolveVariables(o) : (this.variables = o.variables, this.fields = o.fields || [], this.operation = o.operation);
2664
+ }
2665
+ return i.prototype.queryBuilder = function() {
2666
+ return this.operationWrapperTemplate(this.operationTemplate(this.variables));
2667
+ }, i.prototype.queriesBuilder = function(o) {
2668
+ var a = this, s = function() {
2669
+ var u = [];
2670
+ return o.forEach(function(c) {
2671
+ c && (a.operation = c.operation, a.fields = c.fields, u.push(a.operationTemplate(c.variables)));
2672
+ }), u.join(" ");
2673
+ };
2674
+ return this.operationWrapperTemplate(s());
2675
+ }, i.prototype.queryDataArgumentAndTypeMap = function() {
2676
+ var o = this.variables;
2677
+ return this.fields && typeof this.fields == "object" && (o = t(t({}, r.default.getNestedVariables(this.fields)), o)), o && Object.keys(o).length > 0 ? "(".concat(Object.keys(o).reduce(function(a, s, u) {
2678
+ return "".concat(a).concat(u !== 0 ? ", " : "", "$").concat(s, ": ").concat(r.default.queryDataType(o[s]));
2679
+ }, ""), ")") : "";
2680
+ }, i.prototype.operationWrapperTemplate = function(o) {
2681
+ var a = "".concat(e.default.Query, " ").concat(this.queryDataArgumentAndTypeMap(), " { ").concat(o, " }");
2682
+ return a = a.replace("query", "query".concat(this.config.operationName !== "" ? " " + this.config.operationName : "")), {
2683
+ query: a,
2684
+ variables: r.default.queryVariablesMap(this.variables, this.fields)
2685
+ };
2686
+ }, i.prototype.operationTemplate = function(o) {
2687
+ var a = typeof this.operation == "string" ? this.operation : "".concat(this.operation.alias, ": ").concat(this.operation.name);
2688
+ return "".concat(a, " ").concat(o ? r.default.queryDataNameAndArgumentMap(o) : "", " ").concat(this.fields && this.fields.length > 0 ? "{ " + r.default.queryFieldsMap(this.fields) + " }" : "");
2689
+ }, i;
2690
+ }()
2691
+ );
2692
+ return $.default = n, $;
2693
+ }
2694
+ var ce = {}, Rt;
2695
+ function Ti() {
2696
+ if (Rt) return ce;
2697
+ Rt = 1, Object.defineProperty(ce, "__esModule", { value: !0 });
2698
+ var t = te(), e = ne(), r = (
2699
+ /** @class */
2700
+ function() {
2701
+ function n(i) {
2702
+ Array.isArray(i) ? this.variables = e.default.resolveVariables(i) : (this.variables = i.variables, this.fields = i.fields, this.operation = i.operation);
2703
+ }
2704
+ return n.prototype.subscriptionBuilder = function() {
2705
+ return this.operationWrapperTemplate(t.default.Subscription, this.variables, this.operationTemplate(this.operation));
2706
+ }, n.prototype.subscriptionsBuilder = function(i) {
2707
+ var o = this, a = i.map(function(s) {
2708
+ return o.operation = s.operation, o.variables = s.variables, o.fields = s.fields, o.operationTemplate(s.operation);
2709
+ });
2710
+ return this.operationWrapperTemplate(t.default.Subscription, e.default.resolveVariables(i), a.join(`
2711
+ `));
2712
+ }, n.prototype.queryDataNameAndArgumentMap = function() {
2713
+ return this.variables && Object.keys(this.variables).length ? "(".concat(Object.keys(this.variables).reduce(function(i, o, a) {
2714
+ return "".concat(i).concat(a !== 0 ? ", " : "").concat(o, ": $").concat(o);
2715
+ }, ""), ")") : "";
2716
+ }, n.prototype.queryDataArgumentAndTypeMap = function(i) {
2717
+ return Object.keys(i).length ? "(".concat(Object.keys(i).reduce(function(o, a, s) {
2718
+ return "".concat(o).concat(s !== 0 ? ", " : "", "$").concat(a, ": ").concat(e.default.queryDataType(i[a]));
2719
+ }, ""), ")") : "";
2720
+ }, n.prototype.operationWrapperTemplate = function(i, o, a) {
2721
+ return {
2722
+ query: "".concat(i, " ").concat(this.queryDataArgumentAndTypeMap(o), ` {
2723
+ `).concat(a, `
2724
+ }`),
2725
+ variables: e.default.queryVariablesMap(o)
2726
+ };
2727
+ }, n.prototype.operationTemplate = function(i) {
2728
+ var o = typeof this.operation == "string" ? this.operation : "".concat(this.operation.alias, ": ").concat(this.operation.name);
2729
+ return "".concat(o, " ").concat(this.queryDataNameAndArgumentMap(), ` {
2730
+ `).concat(this.queryFieldsMap(this.fields), `
2731
+ }`);
2732
+ }, n.prototype.queryFieldsMap = function(i) {
2733
+ var o = this;
2734
+ return i ? i.map(function(a) {
2735
+ return typeof a == "object" ? "".concat(Object.keys(a)[0], " { ").concat(o.queryFieldsMap(Object.values(a)[0]), " }") : "".concat(a);
2736
+ }).join(", ") : "";
2737
+ }, n;
2738
+ }()
2739
+ );
2740
+ return ce.default = r, ce;
2741
+ }
2742
+ var kt;
2743
+ function _i() {
2744
+ if (kt) return k;
2745
+ kt = 1, Object.defineProperty(k, "__esModule", { value: !0 }), k.adapters = k.query = k.mutation = k.subscription = void 0;
2746
+ var t = Oi();
2747
+ k.adapters = t.default;
2748
+ var e = Ai(), r = Ei(), n = Ti();
2749
+ function i(s, u, c) {
2750
+ var l;
2751
+ if (Array.isArray(s)) {
2752
+ if (u) {
2753
+ var d = new u(s, c);
2754
+ return d.queriesBuilder(s);
2755
+ }
2756
+ return l = new r.default(s, c), l.queriesBuilder(s);
2757
+ }
2758
+ if (u) {
2759
+ var d = new u(s, c);
2760
+ return d.queryBuilder();
2761
+ }
2762
+ return l = new r.default(s, c), l.queryBuilder();
2763
+ }
2764
+ k.query = i;
2765
+ function o(s, u, c) {
2766
+ var l, d;
2767
+ return Array.isArray(s) ? u ? (l = new u(s, c), l.mutationsBuilder(s)) : (d = new e.default(s, c), d.mutationsBuilder(s)) : u ? (l = new u(s, c), l.mutationBuilder()) : (d = new e.default(s, c), d.mutationBuilder());
2768
+ }
2769
+ k.mutation = o;
2770
+ function a(s, u) {
2771
+ var c, l;
2772
+ return Array.isArray(s) ? u ? (c = new u(s), c.subscriptionsBuilder(s)) : (l = new n.default(s), l.subscriptionsBuilder(s)) : u ? (c = new u(s), c.subscriptionBuilder()) : (l = new n.default(s), l.subscriptionBuilder());
2773
+ }
2774
+ return k.subscription = a, k;
2775
+ }
2776
+ _i();
2777
+ const Ri = {
2778
+ kind: "Document",
2779
+ definitions: [{
2780
+ kind: "FragmentDefinition",
2781
+ name: {
2782
+ kind: "Name",
2783
+ value: "EligiblePaymentMethods"
2784
+ },
2785
+ typeCondition: {
2786
+ kind: "NamedType",
2787
+ name: {
2788
+ kind: "Name",
2789
+ value: "PaymentMethodQuote"
2790
+ }
2791
+ },
2792
+ selectionSet: {
2793
+ kind: "SelectionSet",
2794
+ selections: [{
2795
+ kind: "Field",
2796
+ name: {
2797
+ kind: "Name",
2798
+ value: "id"
2799
+ }
2800
+ }, {
2801
+ kind: "Field",
2802
+ name: {
2803
+ kind: "Name",
2804
+ value: "name"
2805
+ }
2806
+ }, {
2807
+ kind: "Field",
2808
+ name: {
2809
+ kind: "Name",
2810
+ value: "description"
2811
+ }
2812
+ }, {
2813
+ kind: "Field",
2814
+ name: {
2815
+ kind: "Name",
2816
+ value: "code"
2817
+ }
2818
+ }]
2819
+ }
2820
+ }]
2821
+ }, ki = {
2822
+ kind: "Document",
2823
+ definitions: [{
2824
+ kind: "OperationDefinition",
2825
+ operation: "mutation",
2826
+ name: {
2827
+ kind: "Name",
2828
+ value: "login"
2829
+ },
2830
+ variableDefinitions: [{
2831
+ kind: "VariableDefinition",
2832
+ variable: {
2833
+ kind: "Variable",
2834
+ name: {
2835
+ kind: "Name",
2836
+ value: "email"
2837
+ }
2838
+ },
2839
+ type: {
2840
+ kind: "NonNullType",
2841
+ type: {
2842
+ kind: "NamedType",
2843
+ name: {
2844
+ kind: "Name",
2845
+ value: "String"
2846
+ }
2847
+ }
2848
+ }
2849
+ }, {
2850
+ kind: "VariableDefinition",
2851
+ variable: {
2852
+ kind: "Variable",
2853
+ name: {
2854
+ kind: "Name",
2855
+ value: "password"
2856
+ }
2857
+ },
2858
+ type: {
2859
+ kind: "NonNullType",
2860
+ type: {
2861
+ kind: "NamedType",
2862
+ name: {
2863
+ kind: "Name",
2864
+ value: "String"
2865
+ }
2866
+ }
2867
+ }
2868
+ }, {
2869
+ kind: "VariableDefinition",
2870
+ variable: {
2871
+ kind: "Variable",
2872
+ name: {
2873
+ kind: "Name",
2874
+ value: "rememberMe"
2875
+ }
2876
+ },
2877
+ type: {
2878
+ kind: "NamedType",
2879
+ name: {
2880
+ kind: "Name",
2881
+ value: "Boolean"
2882
+ }
2883
+ }
2884
+ }],
2885
+ selectionSet: {
2886
+ kind: "SelectionSet",
2887
+ selections: [{
2888
+ kind: "Field",
2889
+ name: {
2890
+ kind: "Name",
2891
+ value: "login"
2892
+ },
2893
+ arguments: [{
2894
+ kind: "Argument",
2895
+ name: {
2896
+ kind: "Name",
2897
+ value: "username"
2898
+ },
2899
+ value: {
2900
+ kind: "Variable",
2901
+ name: {
2902
+ kind: "Name",
2903
+ value: "email"
2904
+ }
2905
+ }
2906
+ }, {
2907
+ kind: "Argument",
2908
+ name: {
2909
+ kind: "Name",
2910
+ value: "password"
2911
+ },
2912
+ value: {
2913
+ kind: "Variable",
2914
+ name: {
2915
+ kind: "Name",
2916
+ value: "password"
2917
+ }
2918
+ }
2919
+ }, {
2920
+ kind: "Argument",
2921
+ name: {
2922
+ kind: "Name",
2923
+ value: "rememberMe"
2924
+ },
2925
+ value: {
2926
+ kind: "Variable",
2927
+ name: {
2928
+ kind: "Name",
2929
+ value: "rememberMe"
2930
+ }
2931
+ }
2932
+ }],
2933
+ selectionSet: {
2934
+ kind: "SelectionSet",
2935
+ selections: [{
2936
+ kind: "Field",
2937
+ name: {
2938
+ kind: "Name",
2939
+ value: "__typename"
2940
+ }
2941
+ }, {
2942
+ kind: "InlineFragment",
2943
+ typeCondition: {
2944
+ kind: "NamedType",
2945
+ name: {
2946
+ kind: "Name",
2947
+ value: "CurrentUser"
2948
+ }
2949
+ },
2950
+ selectionSet: {
2951
+ kind: "SelectionSet",
2952
+ selections: [{
2953
+ kind: "Field",
2954
+ name: {
2955
+ kind: "Name",
2956
+ value: "id"
2957
+ }
2958
+ }, {
2959
+ kind: "Field",
2960
+ name: {
2961
+ kind: "Name",
2962
+ value: "identifier"
2963
+ }
2964
+ }]
2965
+ }
2966
+ }, {
2967
+ kind: "InlineFragment",
2968
+ typeCondition: {
2969
+ kind: "NamedType",
2970
+ name: {
2971
+ kind: "Name",
2972
+ value: "ErrorResult"
2973
+ }
2974
+ },
2975
+ selectionSet: {
2976
+ kind: "SelectionSet",
2977
+ selections: [{
2978
+ kind: "Field",
2979
+ name: {
2980
+ kind: "Name",
2981
+ value: "errorCode"
2982
+ }
2983
+ }, {
2984
+ kind: "Field",
2985
+ name: {
2986
+ kind: "Name",
2987
+ value: "message"
2988
+ }
2989
+ }]
2990
+ }
2991
+ }]
2992
+ }
2993
+ }]
2994
+ }
2995
+ }]
2996
+ }, Ni = {
2997
+ kind: "Document",
2998
+ definitions: [{
2999
+ kind: "OperationDefinition",
3000
+ operation: "mutation",
3001
+ name: {
3002
+ kind: "Name",
3003
+ value: "logout"
3004
+ },
3005
+ selectionSet: {
3006
+ kind: "SelectionSet",
3007
+ selections: [{
3008
+ kind: "Field",
3009
+ name: {
3010
+ kind: "Name",
3011
+ value: "logout"
3012
+ },
3013
+ selectionSet: {
3014
+ kind: "SelectionSet",
3015
+ selections: [{
3016
+ kind: "Field",
3017
+ name: {
3018
+ kind: "Name",
3019
+ value: "success"
3020
+ }
3021
+ }]
3022
+ }
3023
+ }]
3024
+ }
3025
+ }]
3026
+ }, Pi = {
3027
+ kind: "Document",
3028
+ definitions: [{
3029
+ kind: "OperationDefinition",
3030
+ operation: "query",
3031
+ name: {
3032
+ kind: "Name",
3033
+ value: "me"
3034
+ },
3035
+ selectionSet: {
3036
+ kind: "SelectionSet",
3037
+ selections: [{
3038
+ kind: "Field",
3039
+ name: {
3040
+ kind: "Name",
3041
+ value: "me"
3042
+ },
3043
+ selectionSet: {
3044
+ kind: "SelectionSet",
3045
+ selections: [{
3046
+ kind: "Field",
3047
+ name: {
3048
+ kind: "Name",
3049
+ value: "id"
3050
+ }
3051
+ }]
3052
+ }
3053
+ }]
3054
+ }
3055
+ }]
3056
+ }, qi = {
3057
+ kind: "Document",
3058
+ definitions: [{
3059
+ kind: "OperationDefinition",
3060
+ operation: "mutation",
3061
+ name: {
3062
+ kind: "Name",
3063
+ value: "transitionOrderToState"
3064
+ },
3065
+ variableDefinitions: [{
3066
+ kind: "VariableDefinition",
3067
+ variable: {
3068
+ kind: "Variable",
3069
+ name: {
3070
+ kind: "Name",
3071
+ value: "input"
3072
+ }
3073
+ },
3074
+ type: {
3075
+ kind: "NonNullType",
3076
+ type: {
3077
+ kind: "NamedType",
3078
+ name: {
3079
+ kind: "Name",
3080
+ value: "String"
3081
+ }
3082
+ }
3083
+ }
3084
+ }],
3085
+ selectionSet: {
3086
+ kind: "SelectionSet",
3087
+ selections: [{
3088
+ kind: "Field",
3089
+ name: {
3090
+ kind: "Name",
3091
+ value: "transitionOrderToState"
3092
+ },
3093
+ arguments: [{
3094
+ kind: "Argument",
3095
+ name: {
3096
+ kind: "Name",
3097
+ value: "state"
3098
+ },
3099
+ value: {
3100
+ kind: "Variable",
3101
+ name: {
3102
+ kind: "Name",
3103
+ value: "input"
3104
+ }
3105
+ }
3106
+ }],
3107
+ selectionSet: {
3108
+ kind: "SelectionSet",
3109
+ selections: [{
3110
+ kind: "InlineFragment",
3111
+ typeCondition: {
3112
+ kind: "NamedType",
3113
+ name: {
3114
+ kind: "Name",
3115
+ value: "ErrorResult"
3116
+ }
3117
+ },
3118
+ selectionSet: {
3119
+ kind: "SelectionSet",
3120
+ selections: [{
3121
+ kind: "Field",
3122
+ name: {
3123
+ kind: "Name",
3124
+ value: "errorCode"
3125
+ }
3126
+ }, {
3127
+ kind: "Field",
3128
+ name: {
3129
+ kind: "Name",
3130
+ value: "message"
3131
+ }
3132
+ }]
3133
+ }
3134
+ }]
3135
+ }
3136
+ }]
3137
+ }
3138
+ }]
3139
+ }, ji = {
3140
+ kind: "Document",
3141
+ definitions: [{
3142
+ kind: "OperationDefinition",
3143
+ operation: "query",
3144
+ name: {
3145
+ kind: "Name",
3146
+ value: "nextOrderStates"
3147
+ },
3148
+ selectionSet: {
3149
+ kind: "SelectionSet",
3150
+ selections: [{
3151
+ kind: "Field",
3152
+ name: {
3153
+ kind: "Name",
3154
+ value: "nextOrderStates"
3155
+ }
3156
+ }]
3157
+ }
3158
+ }]
3159
+ }, Ci = {
3160
+ kind: "Document",
3161
+ definitions: [{
3162
+ kind: "OperationDefinition",
3163
+ operation: "query",
3164
+ name: {
3165
+ kind: "Name",
3166
+ value: "EligiblePaymentMethods"
3167
+ },
3168
+ selectionSet: {
3169
+ kind: "SelectionSet",
3170
+ selections: [{
3171
+ kind: "Field",
3172
+ name: {
3173
+ kind: "Name",
3174
+ value: "eligiblePaymentMethods"
3175
+ },
3176
+ selectionSet: {
3177
+ kind: "SelectionSet",
3178
+ selections: [{
3179
+ kind: "FragmentSpread",
3180
+ name: {
3181
+ kind: "Name",
3182
+ value: "EligiblePaymentMethods"
3183
+ }
3184
+ }]
3185
+ }
3186
+ }]
3187
+ }
3188
+ }, {
3189
+ kind: "FragmentDefinition",
3190
+ name: {
3191
+ kind: "Name",
3192
+ value: "EligiblePaymentMethods"
3193
+ },
3194
+ typeCondition: {
3195
+ kind: "NamedType",
3196
+ name: {
3197
+ kind: "Name",
3198
+ value: "PaymentMethodQuote"
3199
+ }
3200
+ },
3201
+ selectionSet: {
3202
+ kind: "SelectionSet",
3203
+ selections: [{
3204
+ kind: "Field",
3205
+ name: {
3206
+ kind: "Name",
3207
+ value: "id"
3208
+ }
3209
+ }, {
3210
+ kind: "Field",
3211
+ name: {
3212
+ kind: "Name",
3213
+ value: "name"
3214
+ }
3215
+ }, {
3216
+ kind: "Field",
3217
+ name: {
3218
+ kind: "Name",
3219
+ value: "description"
3220
+ }
3221
+ }, {
3222
+ kind: "Field",
3223
+ name: {
3224
+ kind: "Name",
3225
+ value: "code"
3226
+ }
3227
+ }]
3228
+ }
3229
+ }]
3230
+ }, Di = {
3231
+ "\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": ki,
3232
+ "\n mutation logout {\n logout {\n success\n }\n }\n": Ni,
3233
+ "\n query me {\n me {\n id\n }\n }\n": Pi,
3234
+ "\n mutation transitionOrderToState($input: String!) {\n transitionOrderToState(state: $input) {\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n": qi,
3235
+ "\n query nextOrderStates {\n nextOrderStates\n }\n": ji,
3236
+ "\n fragment EligiblePaymentMethods on PaymentMethodQuote {\n id\n name\n description\n code\n }\n": Ri,
3237
+ "\n query EligiblePaymentMethods {\n eligiblePaymentMethods {\n ...EligiblePaymentMethods\n }\n }\n": Ci
3238
+ };
3239
+ function _e(t) {
3240
+ return Di[t] ?? {};
3241
+ }
3242
+ _e(
3243
+ /* GraphQL */
3244
+ `
3245
+ mutation transitionOrderToState($input: String!) {
3246
+ transitionOrderToState(state: $input) {
3247
+ ... on ErrorResult {
3248
+ errorCode
3249
+ message
3250
+ }
3251
+ }
3252
+ }
3253
+ `
3254
+ );
3255
+ _e(
3256
+ /* GraphQL */
3257
+ `
3258
+ query nextOrderStates {
3259
+ nextOrderStates
3260
+ }
3261
+ `
3262
+ );
3263
+ _e(
3264
+ /* GraphQL */
3265
+ `
3266
+ fragment EligiblePaymentMethods on PaymentMethodQuote {
3267
+ id
3268
+ name
3269
+ description
3270
+ code
3271
+ }
3272
+ `
3273
+ );
3274
+ _e(
3275
+ /* GraphQL */
3276
+ `
3277
+ query EligiblePaymentMethods {
3278
+ eligiblePaymentMethods {
3279
+ ...EligiblePaymentMethods
3280
+ }
3281
+ }
3282
+ `
3283
+ );
3284
+ let Nt = "web";
3285
+ try {
3286
+ const {
3287
+ Platform: t
3288
+ } = require("react-native");
3289
+ Nt = t.OS === "web" ? "web" : "native";
3290
+ } catch {
3291
+ Nt = "web";
3292
+ }
3293
+ const Re = () => {
3294
+ const t = X.c(2), {
3295
+ getPlatform: e
3296
+ } = Un();
3297
+ let r;
3298
+ return t[0] !== e ? (r = e(), t[0] = e, t[1] = r) : r = t[1], r;
3299
+ };
3300
+ typeof window < "u" ? window.__STORE_COMPONENT_PROVIDER_CONTEXT__ || (window.__STORE_COMPONENT_PROVIDER_CONTEXT__ = pe(void 0)) : pe(void 0);
3301
+ const ke = "ProductBadge", [Fi] = bn(ke), [xi, Mi] = Fi(ke), cn = ({
3302
+ children: t,
3303
+ product: e,
3304
+ __scopeProductBadge: r,
3305
+ style: n,
3306
+ ...i
3307
+ }) => {
3308
+ const o = yn(null), a = Re(), s = ge(), u = i.asChild ? s : be("div", a);
3309
+ if (!V.getEnabled())
3310
+ return null;
3311
+ const {
3312
+ badges: c
3313
+ } = e;
3314
+ if (!c)
3315
+ return null;
3316
+ const l = c.reduce((b, p) => (b[p.position] || (b[p.position] = []), b[p.position].push(p), b), {}), d = Object.keys(l), m = {
3317
+ groupedBadges: l,
3318
+ badges: c,
3319
+ badgesRef: o,
3320
+ positions: d
3321
+ };
3322
+ return /* @__PURE__ */ C.jsx(xi, { scope: r, ...m, children: /* @__PURE__ */ C.jsx(u, { ...i, style: n, children: qt(t, m) }) });
3323
+ };
3324
+ cn.displayName = ke;
3325
+ const ln = (t) => {
3326
+ const e = X.c(21);
3327
+ let r, n, i, o, a;
3328
+ e[0] !== t ? ({
3329
+ children: i,
3330
+ position: o,
3331
+ asChild: n,
3332
+ __scopeProductBadge: r,
3333
+ ...a
3334
+ } = t, e[0] = t, e[1] = r, e[2] = n, e[3] = i, e[4] = o, e[5] = a) : (r = e[1], n = e[2], i = e[3], o = e[4], a = e[5]);
3335
+ const s = Re();
3336
+ let u;
3337
+ e[6] !== s ? (u = ge(), e[6] = s, e[7] = u) : u = e[7];
3338
+ const c = u;
3339
+ let l;
3340
+ e[8] !== c || e[9] !== n || e[10] !== s ? (l = n ? c : be("div", s), e[8] = c, e[9] = n, e[10] = s, e[11] = l) : l = e[11];
3341
+ const d = l, {
3342
+ groupedBadges: m
3343
+ } = Mi(ke, r), b = m[o];
3344
+ let p;
3345
+ e[12] !== b || e[13] !== i || e[14] !== o ? (p = qt(i, {
3346
+ badges: b,
3347
+ position: o
3348
+ }), e[12] = b, e[13] = i, e[14] = o, e[15] = p) : p = e[15];
3349
+ let y;
3350
+ return e[16] !== d || e[17] !== o || e[18] !== a || e[19] !== p ? (y = /* @__PURE__ */ C.jsx(d, { ...a, "data-position": o, children: p }), e[16] = d, e[17] = o, e[18] = a, e[19] = p, e[20] = y) : y = e[20], y;
3351
+ }, fn = (t) => {
3352
+ const e = X.c(16);
3353
+ let r, n, i, o;
3354
+ e[0] !== t ? ({
3355
+ children: i,
3356
+ asChild: r,
3357
+ badge: n,
3358
+ ...o
3359
+ } = t, e[0] = t, e[1] = r, e[2] = n, e[3] = i, e[4] = o) : (r = e[1], n = e[2], i = e[3], o = e[4]);
3360
+ const a = Re();
3361
+ let s;
3362
+ e[5] !== a ? (s = ge(), e[5] = a, e[6] = s) : s = e[6];
3363
+ const u = s;
3364
+ let c;
3365
+ e[7] !== u || e[8] !== r || e[9] !== a ? (c = r ? u : be("div", a), e[7] = u, e[8] = r, e[9] = a, e[10] = c) : c = e[10];
3366
+ const l = c, d = n?.id;
3367
+ let m;
3368
+ return e[11] !== l || e[12] !== i || e[13] !== o || e[14] !== d ? (m = /* @__PURE__ */ C.jsx(l, { ...o, "data-badge-id": d, children: i }), e[11] = l, e[12] = i, e[13] = o, e[14] = d, e[15] = m) : m = e[15], m;
3369
+ }, dn = (t) => {
3370
+ const e = X.c(18);
3371
+ let r, n, i;
3372
+ e[0] !== t ? ({
3373
+ badge: n,
3374
+ asChild: r,
3375
+ ...i
3376
+ } = t, e[0] = t, e[1] = r, e[2] = n, e[3] = i) : (r = e[1], n = e[2], i = e[3]);
3377
+ const o = Re();
3378
+ let a;
3379
+ e[4] !== o ? (a = ge(), e[4] = o, e[5] = a) : a = e[5];
3380
+ const s = a;
3381
+ let u;
3382
+ e[6] !== s || e[7] !== r || e[8] !== o ? (u = r ? s : be("img", o), e[6] = s, e[7] = r, e[8] = o, e[9] = u) : u = e[9];
3383
+ const c = u;
3384
+ let l;
3385
+ e[10] !== o || e[11] !== i ? (l = mn(i, o), e[10] = o, e[11] = i, e[12] = l) : l = e[12];
3386
+ const d = l, m = n.asset?.preview;
3387
+ let b;
3388
+ return e[13] !== c || e[14] !== n.collection.name || e[15] !== m || e[16] !== d ? (b = /* @__PURE__ */ C.jsx(c, { src: m, alt: n.collection.name, "data-badge-name": n.collection.name, ...d }), e[13] = c, e[14] = n.collection.name, e[15] = m, e[16] = d, e[17] = b) : b = e[17], b;
3389
+ };
3390
+ ln.displayName = "ProductBadgeGroup";
3391
+ fn.displayName = "ProductBadgeItem";
3392
+ dn.displayName = "ProductBadgeImage";
3393
+ const uo = {
3394
+ Root: cn,
3395
+ Group: ln,
3396
+ Item: fn,
3397
+ Image: dn
3398
+ };
89
3399
  export {
90
- t as VendureBadgePlugin
3400
+ uo as ProductBadge,
3401
+ V as VendureBadgePlugin
91
3402
  };