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