@magiclabs.ai/magicbook-client 0.4.0 → 0.4.1-dev
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/data/design-request.d.ts +1 -1
- package/magicbook-client.js +467 -463
- package/magicbook-client.umd.cjs +3 -3
- package/package.json +1 -1
package/magicbook-client.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var Je = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var h = (e, t,
|
|
4
|
-
function
|
|
5
|
-
const
|
|
2
|
+
var Ke = (e, t, s) => t in e ? Je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var h = (e, t, s) => (Ke(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
|
+
function Ve(e, t, s) {
|
|
5
|
+
const n = t.pop() || "", r = t.reduce(
|
|
6
6
|
(o, i) => o[i] = o[i] || {},
|
|
7
7
|
e
|
|
8
8
|
);
|
|
9
|
-
r[
|
|
9
|
+
r[n] = s;
|
|
10
10
|
}
|
|
11
11
|
function Se(e, t) {
|
|
12
|
-
return Object.keys(t).map((
|
|
13
|
-
typeof e[
|
|
12
|
+
return Object.keys(t).map((s) => {
|
|
13
|
+
typeof e[s] == "object" && typeof t[s] == "object" ? Se(e[s], t[s]) : e[s] = t[s];
|
|
14
14
|
}), e;
|
|
15
15
|
}
|
|
16
16
|
function We(e) {
|
|
@@ -18,8 +18,8 @@ function We(e) {
|
|
|
18
18
|
}
|
|
19
19
|
function Ge(e) {
|
|
20
20
|
return Object.keys(e).map((t) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const s = We(t);
|
|
22
|
+
s.includes("_") && (e[s] = e[t], delete e[t]);
|
|
23
23
|
}), e;
|
|
24
24
|
}
|
|
25
25
|
function Xe(e) {
|
|
@@ -27,8 +27,8 @@ function Xe(e) {
|
|
|
27
27
|
}
|
|
28
28
|
function Qe(e) {
|
|
29
29
|
return Object.keys(e).map((t) => {
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
const s = Xe(t);
|
|
31
|
+
s !== t && (e[s] = e[t], delete e[t]);
|
|
32
32
|
}), e;
|
|
33
33
|
}
|
|
34
34
|
function Oe(e, t) {
|
|
@@ -36,9 +36,9 @@ function Oe(e, t) {
|
|
|
36
36
|
return e.apply(t, arguments);
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
const { toString: Ze } = Object.prototype, { getPrototypeOf:
|
|
40
|
-
const
|
|
41
|
-
return e[
|
|
39
|
+
const { toString: Ze } = Object.prototype, { getPrototypeOf: ne } = Object, M = ((e) => (t) => {
|
|
40
|
+
const s = Ze.call(t);
|
|
41
|
+
return e[s] || (e[s] = s.slice(8, -1).toLowerCase());
|
|
42
42
|
})(/* @__PURE__ */ Object.create(null)), A = (e) => (e = e.toLowerCase(), (t) => M(t) === e), $ = (e) => (t) => typeof t === e, { isArray: N } = Array, B = $("undefined");
|
|
43
43
|
function Ye(e) {
|
|
44
44
|
return e !== null && !B(e) && e.constructor !== null && !B(e.constructor) && E(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
@@ -51,67 +51,67 @@ function qe(e) {
|
|
|
51
51
|
const et = $("string"), E = $("function"), Te = $("number"), J = (e) => e !== null && typeof e == "object", tt = (e) => e === !0 || e === !1, I = (e) => {
|
|
52
52
|
if (M(e) !== "object")
|
|
53
53
|
return !1;
|
|
54
|
-
const t =
|
|
54
|
+
const t = ne(e);
|
|
55
55
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
56
|
-
},
|
|
56
|
+
}, st = A("Date"), nt = A("File"), rt = A("Blob"), ot = A("FileList"), it = (e) => J(e) && E(e.pipe), at = (e) => {
|
|
57
57
|
let t;
|
|
58
58
|
return e && (typeof FormData == "function" && e instanceof FormData || E(e.append) && ((t = M(e)) === "formdata" || // detect form-data instance
|
|
59
59
|
t === "object" && E(e.toString) && e.toString() === "[object FormData]"));
|
|
60
60
|
}, lt = A("URLSearchParams"), ct = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
61
|
-
function D(e, t, { allOwnKeys:
|
|
61
|
+
function D(e, t, { allOwnKeys: s = !1 } = {}) {
|
|
62
62
|
if (e === null || typeof e > "u")
|
|
63
63
|
return;
|
|
64
|
-
let
|
|
64
|
+
let n, r;
|
|
65
65
|
if (typeof e != "object" && (e = [e]), N(e))
|
|
66
|
-
for (
|
|
67
|
-
t.call(null, e[
|
|
66
|
+
for (n = 0, r = e.length; n < r; n++)
|
|
67
|
+
t.call(null, e[n], n, e);
|
|
68
68
|
else {
|
|
69
|
-
const o =
|
|
69
|
+
const o = s ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
70
70
|
let c;
|
|
71
|
-
for (
|
|
72
|
-
c = o[
|
|
71
|
+
for (n = 0; n < i; n++)
|
|
72
|
+
c = o[n], t.call(null, e[c], c, e);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
function ke(e, t) {
|
|
76
76
|
t = t.toLowerCase();
|
|
77
|
-
const
|
|
78
|
-
let
|
|
79
|
-
for (;
|
|
80
|
-
if (r = n
|
|
77
|
+
const s = Object.keys(e);
|
|
78
|
+
let n = s.length, r;
|
|
79
|
+
for (; n-- > 0; )
|
|
80
|
+
if (r = s[n], t === r.toLowerCase())
|
|
81
81
|
return r;
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
|
-
const xe = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(),
|
|
84
|
+
const xe = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), ve = (e) => !B(e) && e !== xe;
|
|
85
85
|
function q() {
|
|
86
|
-
const { caseless: e } =
|
|
86
|
+
const { caseless: e } = ve(this) && this || {}, t = {}, s = (n, r) => {
|
|
87
87
|
const o = e && ke(t, r) || r;
|
|
88
|
-
I(t[o]) && I(
|
|
88
|
+
I(t[o]) && I(n) ? t[o] = q(t[o], n) : I(n) ? t[o] = q({}, n) : N(n) ? t[o] = n.slice() : t[o] = n;
|
|
89
89
|
};
|
|
90
|
-
for (let
|
|
91
|
-
arguments[
|
|
90
|
+
for (let n = 0, r = arguments.length; n < r; n++)
|
|
91
|
+
arguments[n] && D(arguments[n], s);
|
|
92
92
|
return t;
|
|
93
93
|
}
|
|
94
|
-
const ut = (e, t,
|
|
95
|
-
|
|
96
|
-
}, { allOwnKeys:
|
|
97
|
-
e.prototype = Object.create(t.prototype,
|
|
94
|
+
const ut = (e, t, s, { allOwnKeys: n } = {}) => (D(t, (r, o) => {
|
|
95
|
+
s && E(r) ? e[o] = Oe(r, s) : e[o] = r;
|
|
96
|
+
}, { allOwnKeys: n }), e), ft = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), dt = (e, t, s, n) => {
|
|
97
|
+
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
98
98
|
value: t.prototype
|
|
99
|
-
}),
|
|
100
|
-
}, yt = (e, t,
|
|
99
|
+
}), s && Object.assign(e.prototype, s);
|
|
100
|
+
}, yt = (e, t, s, n) => {
|
|
101
101
|
let r, o, i;
|
|
102
102
|
const c = {};
|
|
103
103
|
if (t = t || {}, e == null)
|
|
104
104
|
return t;
|
|
105
105
|
do {
|
|
106
106
|
for (r = Object.getOwnPropertyNames(e), o = r.length; o-- > 0; )
|
|
107
|
-
i = r[o], (!
|
|
108
|
-
e =
|
|
109
|
-
} while (e && (!
|
|
107
|
+
i = r[o], (!n || n(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
108
|
+
e = s !== !1 && ne(e);
|
|
109
|
+
} while (e && (!s || s(e, t)) && e !== Object.prototype);
|
|
110
110
|
return t;
|
|
111
|
-
}, ht = (e, t,
|
|
112
|
-
e = String(e), (
|
|
113
|
-
const
|
|
114
|
-
return
|
|
111
|
+
}, ht = (e, t, s) => {
|
|
112
|
+
e = String(e), (s === void 0 || s > e.length) && (s = e.length), s -= t.length;
|
|
113
|
+
const n = e.indexOf(t, s);
|
|
114
|
+
return n !== -1 && n === s;
|
|
115
115
|
}, mt = (e) => {
|
|
116
116
|
if (!e)
|
|
117
117
|
return null;
|
|
@@ -120,88 +120,88 @@ const ut = (e, t, n, { allOwnKeys: s } = {}) => (D(t, (r, o) => {
|
|
|
120
120
|
let t = e.length;
|
|
121
121
|
if (!Te(t))
|
|
122
122
|
return null;
|
|
123
|
-
const
|
|
123
|
+
const s = new Array(t);
|
|
124
124
|
for (; t-- > 0; )
|
|
125
|
-
|
|
126
|
-
return
|
|
127
|
-
}, pt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
128
|
-
const
|
|
125
|
+
s[t] = e[t];
|
|
126
|
+
return s;
|
|
127
|
+
}, pt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ne(Uint8Array)), gt = (e, t) => {
|
|
128
|
+
const n = (e && e[Symbol.iterator]).call(e);
|
|
129
129
|
let r;
|
|
130
|
-
for (; (r =
|
|
130
|
+
for (; (r = n.next()) && !r.done; ) {
|
|
131
131
|
const o = r.value;
|
|
132
132
|
t.call(e, o[0], o[1]);
|
|
133
133
|
}
|
|
134
134
|
}, bt = (e, t) => {
|
|
135
|
-
let
|
|
136
|
-
const
|
|
137
|
-
for (; (
|
|
138
|
-
|
|
139
|
-
return
|
|
135
|
+
let s;
|
|
136
|
+
const n = [];
|
|
137
|
+
for (; (s = e.exec(t)) !== null; )
|
|
138
|
+
n.push(s);
|
|
139
|
+
return n;
|
|
140
140
|
}, wt = A("HTMLFormElement"), Et = (e) => e.toLowerCase().replace(
|
|
141
141
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
142
|
-
function(
|
|
143
|
-
return
|
|
142
|
+
function(s, n, r) {
|
|
143
|
+
return n.toUpperCase() + r;
|
|
144
144
|
}
|
|
145
|
-
), fe = (({ hasOwnProperty: e }) => (t,
|
|
146
|
-
const
|
|
147
|
-
D(
|
|
148
|
-
t(r, o, e) !== !1 && (
|
|
149
|
-
}), Object.defineProperties(e,
|
|
145
|
+
), fe = (({ hasOwnProperty: e }) => (t, s) => e.call(t, s))(Object.prototype), St = A("RegExp"), _e = (e, t) => {
|
|
146
|
+
const s = Object.getOwnPropertyDescriptors(e), n = {};
|
|
147
|
+
D(s, (r, o) => {
|
|
148
|
+
t(r, o, e) !== !1 && (n[o] = r);
|
|
149
|
+
}), Object.defineProperties(e, n);
|
|
150
150
|
}, Ot = (e) => {
|
|
151
|
-
|
|
152
|
-
if (E(e) && ["arguments", "caller", "callee"].indexOf(
|
|
151
|
+
_e(e, (t, s) => {
|
|
152
|
+
if (E(e) && ["arguments", "caller", "callee"].indexOf(s) !== -1)
|
|
153
153
|
return !1;
|
|
154
|
-
const
|
|
155
|
-
if (E(
|
|
154
|
+
const n = e[s];
|
|
155
|
+
if (E(n)) {
|
|
156
156
|
if (t.enumerable = !1, "writable" in t) {
|
|
157
157
|
t.writable = !1;
|
|
158
158
|
return;
|
|
159
159
|
}
|
|
160
160
|
t.set || (t.set = () => {
|
|
161
|
-
throw Error("Can not rewrite read-only method '" +
|
|
161
|
+
throw Error("Can not rewrite read-only method '" + s + "'");
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
}, At = (e, t) => {
|
|
166
|
-
const
|
|
166
|
+
const s = {}, n = (r) => {
|
|
167
167
|
r.forEach((o) => {
|
|
168
|
-
|
|
168
|
+
s[o] = !0;
|
|
169
169
|
});
|
|
170
170
|
};
|
|
171
|
-
return N(e) ?
|
|
171
|
+
return N(e) ? n(e) : n(String(e).split(t)), s;
|
|
172
172
|
}, Tt = () => {
|
|
173
173
|
}, kt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), X = "abcdefghijklmnopqrstuvwxyz", de = "0123456789", Ne = {
|
|
174
174
|
DIGIT: de,
|
|
175
175
|
ALPHA: X,
|
|
176
176
|
ALPHA_DIGIT: X + X.toUpperCase() + de
|
|
177
177
|
}, xt = (e = 16, t = Ne.ALPHA_DIGIT) => {
|
|
178
|
-
let
|
|
179
|
-
const { length:
|
|
178
|
+
let s = "";
|
|
179
|
+
const { length: n } = t;
|
|
180
180
|
for (; e--; )
|
|
181
|
-
|
|
182
|
-
return
|
|
181
|
+
s += t[Math.random() * n | 0];
|
|
182
|
+
return s;
|
|
183
183
|
};
|
|
184
|
-
function
|
|
184
|
+
function vt(e) {
|
|
185
185
|
return !!(e && E(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
186
186
|
}
|
|
187
|
-
const
|
|
188
|
-
const t = new Array(10),
|
|
189
|
-
if (J(
|
|
190
|
-
if (t.indexOf(
|
|
187
|
+
const _t = (e) => {
|
|
188
|
+
const t = new Array(10), s = (n, r) => {
|
|
189
|
+
if (J(n)) {
|
|
190
|
+
if (t.indexOf(n) >= 0)
|
|
191
191
|
return;
|
|
192
|
-
if (!("toJSON" in
|
|
193
|
-
t[r] =
|
|
194
|
-
const o = N(
|
|
195
|
-
return D(
|
|
196
|
-
const d =
|
|
192
|
+
if (!("toJSON" in n)) {
|
|
193
|
+
t[r] = n;
|
|
194
|
+
const o = N(n) ? [] : {};
|
|
195
|
+
return D(n, (i, c) => {
|
|
196
|
+
const d = s(i, r + 1);
|
|
197
197
|
!B(d) && (o[c] = d);
|
|
198
198
|
}), t[r] = void 0, o;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
return
|
|
201
|
+
return n;
|
|
202
202
|
};
|
|
203
|
-
return
|
|
204
|
-
}, Nt = A("AsyncFunction"),
|
|
203
|
+
return s(e, 0);
|
|
204
|
+
}, Nt = A("AsyncFunction"), Ct = (e) => e && (J(e) || E(e)) && E(e.then) && E(e.catch), a = {
|
|
205
205
|
isArray: N,
|
|
206
206
|
isArrayBuffer: Ae,
|
|
207
207
|
isBuffer: Ye,
|
|
@@ -213,8 +213,8 @@ const vt = (e) => {
|
|
|
213
213
|
isObject: J,
|
|
214
214
|
isPlainObject: I,
|
|
215
215
|
isUndefined: B,
|
|
216
|
-
isDate:
|
|
217
|
-
isFile:
|
|
216
|
+
isDate: st,
|
|
217
|
+
isFile: nt,
|
|
218
218
|
isBlob: rt,
|
|
219
219
|
isRegExp: St,
|
|
220
220
|
isFunction: E,
|
|
@@ -239,7 +239,7 @@ const vt = (e) => {
|
|
|
239
239
|
hasOwnProperty: fe,
|
|
240
240
|
hasOwnProp: fe,
|
|
241
241
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
242
|
-
reduceDescriptors:
|
|
242
|
+
reduceDescriptors: _e,
|
|
243
243
|
freezeMethods: Ot,
|
|
244
244
|
toObjectSet: At,
|
|
245
245
|
toCamelCase: Et,
|
|
@@ -247,16 +247,16 @@ const vt = (e) => {
|
|
|
247
247
|
toFiniteNumber: kt,
|
|
248
248
|
findKey: ke,
|
|
249
249
|
global: xe,
|
|
250
|
-
isContextDefined:
|
|
250
|
+
isContextDefined: ve,
|
|
251
251
|
ALPHABET: Ne,
|
|
252
252
|
generateString: xt,
|
|
253
|
-
isSpecCompliantForm:
|
|
254
|
-
toJSONObject:
|
|
253
|
+
isSpecCompliantForm: vt,
|
|
254
|
+
toJSONObject: _t,
|
|
255
255
|
isAsyncFn: Nt,
|
|
256
|
-
isThenable:
|
|
256
|
+
isThenable: Ct
|
|
257
257
|
};
|
|
258
|
-
function p(e, t,
|
|
259
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t),
|
|
258
|
+
function p(e, t, s, n, r) {
|
|
259
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), s && (this.config = s), n && (this.request = n), r && (this.response = r);
|
|
260
260
|
}
|
|
261
261
|
a.inherits(p, Error, {
|
|
262
262
|
toJSON: function() {
|
|
@@ -279,7 +279,7 @@ a.inherits(p, Error, {
|
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
281
|
});
|
|
282
|
-
const
|
|
282
|
+
const Ce = p.prototype, Re = {};
|
|
283
283
|
[
|
|
284
284
|
"ERR_BAD_OPTION_VALUE",
|
|
285
285
|
"ERR_BAD_OPTION",
|
|
@@ -295,27 +295,27 @@ const Re = p.prototype, Ce = {};
|
|
|
295
295
|
"ERR_INVALID_URL"
|
|
296
296
|
// eslint-disable-next-line func-names
|
|
297
297
|
].forEach((e) => {
|
|
298
|
-
|
|
298
|
+
Re[e] = { value: e };
|
|
299
299
|
});
|
|
300
|
-
Object.defineProperties(p,
|
|
301
|
-
Object.defineProperty(
|
|
302
|
-
p.from = (e, t,
|
|
303
|
-
const i = Object.create(
|
|
300
|
+
Object.defineProperties(p, Re);
|
|
301
|
+
Object.defineProperty(Ce, "isAxiosError", { value: !0 });
|
|
302
|
+
p.from = (e, t, s, n, r, o) => {
|
|
303
|
+
const i = Object.create(Ce);
|
|
304
304
|
return a.toFlatObject(e, i, function(d) {
|
|
305
305
|
return d !== Error.prototype;
|
|
306
|
-
}, (c) => c !== "isAxiosError"), p.call(i, e.message, t,
|
|
306
|
+
}, (c) => c !== "isAxiosError"), p.call(i, e.message, t, s, n, r), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
307
307
|
};
|
|
308
|
-
const
|
|
308
|
+
const Rt = null;
|
|
309
309
|
function ee(e) {
|
|
310
310
|
return a.isPlainObject(e) || a.isArray(e);
|
|
311
311
|
}
|
|
312
312
|
function Fe(e) {
|
|
313
313
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
314
314
|
}
|
|
315
|
-
function ye(e, t,
|
|
315
|
+
function ye(e, t, s) {
|
|
316
316
|
return e ? e.concat(t).map(function(r, o) {
|
|
317
|
-
return r = Fe(r), !
|
|
318
|
-
}).join(
|
|
317
|
+
return r = Fe(r), !s && o ? "[" + r + "]" : r;
|
|
318
|
+
}).join(s ? "." : "") : t;
|
|
319
319
|
}
|
|
320
320
|
function Ft(e) {
|
|
321
321
|
return a.isArray(e) && !e.some(ee);
|
|
@@ -323,17 +323,17 @@ function Ft(e) {
|
|
|
323
323
|
const Bt = a.toFlatObject(a, {}, null, function(t) {
|
|
324
324
|
return /^is[A-Z]/.test(t);
|
|
325
325
|
});
|
|
326
|
-
function
|
|
326
|
+
function K(e, t, s) {
|
|
327
327
|
if (!a.isObject(e))
|
|
328
328
|
throw new TypeError("target must be an object");
|
|
329
|
-
t = t || new FormData(),
|
|
329
|
+
t = t || new FormData(), s = a.toFlatObject(s, {
|
|
330
330
|
metaTokens: !0,
|
|
331
331
|
dots: !1,
|
|
332
332
|
indexes: !1
|
|
333
333
|
}, !1, function(m, T) {
|
|
334
334
|
return !a.isUndefined(T[m]);
|
|
335
335
|
});
|
|
336
|
-
const
|
|
336
|
+
const n = s.metaTokens, r = s.visitor || u, o = s.dots, i = s.indexes, d = (s.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
337
337
|
if (!a.isFunction(r))
|
|
338
338
|
throw new TypeError("visitor must be a function");
|
|
339
339
|
function l(f) {
|
|
@@ -349,7 +349,7 @@ function V(e, t, n) {
|
|
|
349
349
|
let S = f;
|
|
350
350
|
if (f && !T && typeof f == "object") {
|
|
351
351
|
if (a.endsWith(m, "{}"))
|
|
352
|
-
m =
|
|
352
|
+
m = n ? m : m.slice(0, -2), f = JSON.stringify(f);
|
|
353
353
|
else if (a.isArray(f) && Ft(f) || (a.isFileList(f) || a.endsWith(m, "[]")) && (S = a.toArray(f)))
|
|
354
354
|
return m = Fe(m), S.forEach(function(U, $e) {
|
|
355
355
|
!(a.isUndefined(U) || U === null) && t.append(
|
|
@@ -370,14 +370,14 @@ function V(e, t, n) {
|
|
|
370
370
|
if (!a.isUndefined(f)) {
|
|
371
371
|
if (y.indexOf(f) !== -1)
|
|
372
372
|
throw Error("Circular reference detected in " + m.join("."));
|
|
373
|
-
y.push(f), a.forEach(f, function(S,
|
|
373
|
+
y.push(f), a.forEach(f, function(S, v) {
|
|
374
374
|
(!(a.isUndefined(S) || S === null) && r.call(
|
|
375
375
|
t,
|
|
376
376
|
S,
|
|
377
|
-
a.isString(
|
|
377
|
+
a.isString(v) ? v.trim() : v,
|
|
378
378
|
m,
|
|
379
379
|
w
|
|
380
|
-
)) === !0 && g(S, m ? m.concat(
|
|
380
|
+
)) === !0 && g(S, m ? m.concat(v) : [v]);
|
|
381
381
|
}), y.pop();
|
|
382
382
|
}
|
|
383
383
|
}
|
|
@@ -395,34 +395,34 @@ function he(e) {
|
|
|
395
395
|
"%20": "+",
|
|
396
396
|
"%00": "\0"
|
|
397
397
|
};
|
|
398
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
399
|
-
return t[
|
|
398
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
|
|
399
|
+
return t[n];
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
function re(e, t) {
|
|
403
|
-
this._pairs = [], e &&
|
|
403
|
+
this._pairs = [], e && K(e, this, t);
|
|
404
404
|
}
|
|
405
405
|
const Be = re.prototype;
|
|
406
|
-
Be.append = function(t,
|
|
407
|
-
this._pairs.push([t,
|
|
406
|
+
Be.append = function(t, s) {
|
|
407
|
+
this._pairs.push([t, s]);
|
|
408
408
|
};
|
|
409
409
|
Be.toString = function(t) {
|
|
410
|
-
const
|
|
411
|
-
return t.call(this,
|
|
410
|
+
const s = t ? function(n) {
|
|
411
|
+
return t.call(this, n, he);
|
|
412
412
|
} : he;
|
|
413
413
|
return this._pairs.map(function(r) {
|
|
414
|
-
return
|
|
414
|
+
return s(r[0]) + "=" + s(r[1]);
|
|
415
415
|
}, "").join("&");
|
|
416
416
|
};
|
|
417
417
|
function Dt(e) {
|
|
418
418
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
419
419
|
}
|
|
420
|
-
function De(e, t,
|
|
420
|
+
function De(e, t, s) {
|
|
421
421
|
if (!t)
|
|
422
422
|
return e;
|
|
423
|
-
const
|
|
423
|
+
const n = s && s.encode || Dt, r = s && s.serialize;
|
|
424
424
|
let o;
|
|
425
|
-
if (r ? o = r(t,
|
|
425
|
+
if (r ? o = r(t, s) : o = a.isURLSearchParams(t) ? t.toString() : new re(t, s).toString(n), o) {
|
|
426
426
|
const i = e.indexOf("#");
|
|
427
427
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
428
428
|
}
|
|
@@ -440,12 +440,12 @@ class Lt {
|
|
|
440
440
|
*
|
|
441
441
|
* @return {Number} An ID used to remove interceptor later
|
|
442
442
|
*/
|
|
443
|
-
use(t,
|
|
443
|
+
use(t, s, n) {
|
|
444
444
|
return this.handlers.push({
|
|
445
445
|
fulfilled: t,
|
|
446
|
-
rejected:
|
|
447
|
-
synchronous:
|
|
448
|
-
runWhen:
|
|
446
|
+
rejected: s,
|
|
447
|
+
synchronous: n ? n.synchronous : !1,
|
|
448
|
+
runWhen: n ? n.runWhen : null
|
|
449
449
|
}), this.handlers.length - 1;
|
|
450
450
|
}
|
|
451
451
|
/**
|
|
@@ -477,8 +477,8 @@ class Lt {
|
|
|
477
477
|
* @returns {void}
|
|
478
478
|
*/
|
|
479
479
|
forEach(t) {
|
|
480
|
-
a.forEach(this.handlers, function(
|
|
481
|
-
|
|
480
|
+
a.forEach(this.handlers, function(n) {
|
|
481
|
+
n !== null && t(n);
|
|
482
482
|
});
|
|
483
483
|
}
|
|
484
484
|
}
|
|
@@ -489,7 +489,7 @@ const me = Lt, Le = {
|
|
|
489
489
|
}, Ut = typeof URLSearchParams < "u" ? URLSearchParams : re, It = typeof FormData < "u" ? FormData : null, jt = typeof Blob < "u" ? Blob : null, Pt = (() => {
|
|
490
490
|
let e;
|
|
491
491
|
return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
|
492
|
-
})(),
|
|
492
|
+
})(), zt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
493
493
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), O = {
|
|
494
494
|
isBrowser: !0,
|
|
495
495
|
classes: {
|
|
@@ -498,13 +498,13 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
|
498
498
|
Blob: jt
|
|
499
499
|
},
|
|
500
500
|
isStandardBrowserEnv: Pt,
|
|
501
|
-
isStandardBrowserWebWorkerEnv:
|
|
501
|
+
isStandardBrowserWebWorkerEnv: zt,
|
|
502
502
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
503
503
|
};
|
|
504
|
-
function
|
|
505
|
-
return
|
|
506
|
-
visitor: function(
|
|
507
|
-
return O.isNode && a.isBuffer(
|
|
504
|
+
function Ht(e, t) {
|
|
505
|
+
return K(e, new O.classes.URLSearchParams(), Object.assign({
|
|
506
|
+
visitor: function(s, n, r, o) {
|
|
507
|
+
return O.isNode && a.isBuffer(s) ? (this.append(n, s.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
508
508
|
}
|
|
509
509
|
}, t));
|
|
510
510
|
}
|
|
@@ -512,46 +512,46 @@ function Mt(e) {
|
|
|
512
512
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
513
513
|
}
|
|
514
514
|
function $t(e) {
|
|
515
|
-
const t = {},
|
|
516
|
-
let
|
|
517
|
-
const r =
|
|
515
|
+
const t = {}, s = Object.keys(e);
|
|
516
|
+
let n;
|
|
517
|
+
const r = s.length;
|
|
518
518
|
let o;
|
|
519
|
-
for (
|
|
520
|
-
o = n
|
|
519
|
+
for (n = 0; n < r; n++)
|
|
520
|
+
o = s[n], t[o] = e[o];
|
|
521
521
|
return t;
|
|
522
522
|
}
|
|
523
523
|
function Ue(e) {
|
|
524
|
-
function t(
|
|
525
|
-
let i =
|
|
526
|
-
const c = Number.isFinite(+i), d = o >=
|
|
527
|
-
return i = !i && a.isArray(r) ? r.length : i, d ? (a.hasOwnProp(r, i) ? r[i] = [r[i],
|
|
524
|
+
function t(s, n, r, o) {
|
|
525
|
+
let i = s[o++];
|
|
526
|
+
const c = Number.isFinite(+i), d = o >= s.length;
|
|
527
|
+
return i = !i && a.isArray(r) ? r.length : i, d ? (a.hasOwnProp(r, i) ? r[i] = [r[i], n] : r[i] = n, !c) : ((!r[i] || !a.isObject(r[i])) && (r[i] = []), t(s, n, r[i], o) && a.isArray(r[i]) && (r[i] = $t(r[i])), !c);
|
|
528
528
|
}
|
|
529
529
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
530
|
-
const
|
|
531
|
-
return a.forEachEntry(e, (
|
|
532
|
-
t(Mt(
|
|
533
|
-
}),
|
|
530
|
+
const s = {};
|
|
531
|
+
return a.forEachEntry(e, (n, r) => {
|
|
532
|
+
t(Mt(n), r, s, 0);
|
|
533
|
+
}), s;
|
|
534
534
|
}
|
|
535
535
|
return null;
|
|
536
536
|
}
|
|
537
537
|
const Jt = {
|
|
538
538
|
"Content-Type": void 0
|
|
539
539
|
};
|
|
540
|
-
function
|
|
540
|
+
function Kt(e, t, s) {
|
|
541
541
|
if (a.isString(e))
|
|
542
542
|
try {
|
|
543
543
|
return (t || JSON.parse)(e), a.trim(e);
|
|
544
|
-
} catch (
|
|
545
|
-
if (
|
|
546
|
-
throw
|
|
544
|
+
} catch (n) {
|
|
545
|
+
if (n.name !== "SyntaxError")
|
|
546
|
+
throw n;
|
|
547
547
|
}
|
|
548
|
-
return (
|
|
548
|
+
return (s || JSON.stringify)(e);
|
|
549
549
|
}
|
|
550
|
-
const
|
|
550
|
+
const V = {
|
|
551
551
|
transitional: Le,
|
|
552
552
|
adapter: ["xhr", "http"],
|
|
553
|
-
transformRequest: [function(t,
|
|
554
|
-
const
|
|
553
|
+
transformRequest: [function(t, s) {
|
|
554
|
+
const n = s.getContentType() || "", r = n.indexOf("application/json") > -1, o = a.isObject(t);
|
|
555
555
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
556
556
|
return r && r ? JSON.stringify(Ue(t)) : t;
|
|
557
557
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
@@ -559,26 +559,26 @@ const K = {
|
|
|
559
559
|
if (a.isArrayBufferView(t))
|
|
560
560
|
return t.buffer;
|
|
561
561
|
if (a.isURLSearchParams(t))
|
|
562
|
-
return
|
|
562
|
+
return s.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
563
563
|
let c;
|
|
564
564
|
if (o) {
|
|
565
|
-
if (
|
|
566
|
-
return
|
|
567
|
-
if ((c = a.isFileList(t)) ||
|
|
565
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
566
|
+
return Ht(t, this.formSerializer).toString();
|
|
567
|
+
if ((c = a.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
568
568
|
const d = this.env && this.env.FormData;
|
|
569
|
-
return
|
|
569
|
+
return K(
|
|
570
570
|
c ? { "files[]": t } : t,
|
|
571
571
|
d && new d(),
|
|
572
572
|
this.formSerializer
|
|
573
573
|
);
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
return o || r ? (
|
|
576
|
+
return o || r ? (s.setContentType("application/json", !1), Kt(t)) : t;
|
|
577
577
|
}],
|
|
578
578
|
transformResponse: [function(t) {
|
|
579
|
-
const
|
|
580
|
-
if (t && a.isString(t) && (
|
|
581
|
-
const i = !(
|
|
579
|
+
const s = this.transitional || V.transitional, n = s && s.forcedJSONParsing, r = this.responseType === "json";
|
|
580
|
+
if (t && a.isString(t) && (n && !this.responseType || r)) {
|
|
581
|
+
const i = !(s && s.silentJSONParsing) && r;
|
|
582
582
|
try {
|
|
583
583
|
return JSON.parse(t);
|
|
584
584
|
} catch (c) {
|
|
@@ -611,12 +611,12 @@ const K = {
|
|
|
611
611
|
}
|
|
612
612
|
};
|
|
613
613
|
a.forEach(["delete", "get", "head"], function(t) {
|
|
614
|
-
|
|
614
|
+
V.headers[t] = {};
|
|
615
615
|
});
|
|
616
616
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
617
|
-
|
|
617
|
+
V.headers[t] = a.merge(Jt);
|
|
618
618
|
});
|
|
619
|
-
const oe =
|
|
619
|
+
const oe = V, Vt = a.toObjectSet([
|
|
620
620
|
"age",
|
|
621
621
|
"authorization",
|
|
622
622
|
"content-length",
|
|
@@ -636,10 +636,10 @@ const oe = K, Kt = a.toObjectSet([
|
|
|
636
636
|
"user-agent"
|
|
637
637
|
]), Wt = (e) => {
|
|
638
638
|
const t = {};
|
|
639
|
-
let
|
|
639
|
+
let s, n, r;
|
|
640
640
|
return e && e.split(`
|
|
641
641
|
`).forEach(function(i) {
|
|
642
|
-
r = i.indexOf(":"),
|
|
642
|
+
r = i.indexOf(":"), s = i.substring(0, r).trim().toLowerCase(), n = i.substring(r + 1).trim(), !(!s || t[s] && Vt[s]) && (s === "set-cookie" ? t[s] ? t[s].push(n) : t[s] = [n] : t[s] = t[s] ? t[s] + ", " + n : n);
|
|
643
643
|
}), t;
|
|
644
644
|
}, pe = Symbol("internals");
|
|
645
645
|
function F(e) {
|
|
@@ -649,32 +649,32 @@ function j(e) {
|
|
|
649
649
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(j) : String(e);
|
|
650
650
|
}
|
|
651
651
|
function Gt(e) {
|
|
652
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
653
|
-
let
|
|
654
|
-
for (;
|
|
655
|
-
t[
|
|
652
|
+
const t = /* @__PURE__ */ Object.create(null), s = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
653
|
+
let n;
|
|
654
|
+
for (; n = s.exec(e); )
|
|
655
|
+
t[n[1]] = n[2];
|
|
656
656
|
return t;
|
|
657
657
|
}
|
|
658
658
|
const Xt = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
659
|
-
function Q(e, t,
|
|
660
|
-
if (a.isFunction(
|
|
661
|
-
return
|
|
662
|
-
if (r && (t =
|
|
663
|
-
if (a.isString(
|
|
664
|
-
return t.indexOf(
|
|
665
|
-
if (a.isRegExp(
|
|
666
|
-
return
|
|
659
|
+
function Q(e, t, s, n, r) {
|
|
660
|
+
if (a.isFunction(n))
|
|
661
|
+
return n.call(this, t, s);
|
|
662
|
+
if (r && (t = s), !!a.isString(t)) {
|
|
663
|
+
if (a.isString(n))
|
|
664
|
+
return t.indexOf(n) !== -1;
|
|
665
|
+
if (a.isRegExp(n))
|
|
666
|
+
return n.test(t);
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
669
|
function Qt(e) {
|
|
670
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
670
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, s, n) => s.toUpperCase() + n);
|
|
671
671
|
}
|
|
672
672
|
function Zt(e, t) {
|
|
673
|
-
const
|
|
674
|
-
["get", "set", "has"].forEach((
|
|
675
|
-
Object.defineProperty(e,
|
|
673
|
+
const s = a.toCamelCase(" " + t);
|
|
674
|
+
["get", "set", "has"].forEach((n) => {
|
|
675
|
+
Object.defineProperty(e, n + s, {
|
|
676
676
|
value: function(r, o, i) {
|
|
677
|
-
return this[
|
|
677
|
+
return this[n].call(this, t, r, o, i);
|
|
678
678
|
},
|
|
679
679
|
configurable: !0
|
|
680
680
|
});
|
|
@@ -684,7 +684,7 @@ class W {
|
|
|
684
684
|
constructor(t) {
|
|
685
685
|
t && this.set(t);
|
|
686
686
|
}
|
|
687
|
-
set(t,
|
|
687
|
+
set(t, s, n) {
|
|
688
688
|
const r = this;
|
|
689
689
|
function o(c, d, l) {
|
|
690
690
|
const u = F(d);
|
|
@@ -694,78 +694,78 @@ class W {
|
|
|
694
694
|
(!y || r[y] === void 0 || l === !0 || l === void 0 && r[y] !== !1) && (r[y || d] = j(c));
|
|
695
695
|
}
|
|
696
696
|
const i = (c, d) => a.forEach(c, (l, u) => o(l, u, d));
|
|
697
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? i(t,
|
|
697
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, s) : a.isString(t) && (t = t.trim()) && !Xt(t) ? i(Wt(t), s) : t != null && o(s, t, n), this;
|
|
698
698
|
}
|
|
699
|
-
get(t,
|
|
699
|
+
get(t, s) {
|
|
700
700
|
if (t = F(t), t) {
|
|
701
|
-
const
|
|
702
|
-
if (
|
|
703
|
-
const r = this[
|
|
704
|
-
if (!
|
|
701
|
+
const n = a.findKey(this, t);
|
|
702
|
+
if (n) {
|
|
703
|
+
const r = this[n];
|
|
704
|
+
if (!s)
|
|
705
705
|
return r;
|
|
706
|
-
if (
|
|
706
|
+
if (s === !0)
|
|
707
707
|
return Gt(r);
|
|
708
|
-
if (a.isFunction(
|
|
709
|
-
return
|
|
710
|
-
if (a.isRegExp(
|
|
711
|
-
return
|
|
708
|
+
if (a.isFunction(s))
|
|
709
|
+
return s.call(this, r, n);
|
|
710
|
+
if (a.isRegExp(s))
|
|
711
|
+
return s.exec(r);
|
|
712
712
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
713
713
|
}
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
has(t,
|
|
716
|
+
has(t, s) {
|
|
717
717
|
if (t = F(t), t) {
|
|
718
|
-
const
|
|
719
|
-
return !!(
|
|
718
|
+
const n = a.findKey(this, t);
|
|
719
|
+
return !!(n && this[n] !== void 0 && (!s || Q(this, this[n], n, s)));
|
|
720
720
|
}
|
|
721
721
|
return !1;
|
|
722
722
|
}
|
|
723
|
-
delete(t,
|
|
724
|
-
const
|
|
723
|
+
delete(t, s) {
|
|
724
|
+
const n = this;
|
|
725
725
|
let r = !1;
|
|
726
726
|
function o(i) {
|
|
727
727
|
if (i = F(i), i) {
|
|
728
|
-
const c = a.findKey(
|
|
729
|
-
c && (!
|
|
728
|
+
const c = a.findKey(n, i);
|
|
729
|
+
c && (!s || Q(n, n[c], c, s)) && (delete n[c], r = !0);
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
return a.isArray(t) ? t.forEach(o) : o(t), r;
|
|
733
733
|
}
|
|
734
734
|
clear(t) {
|
|
735
|
-
const
|
|
736
|
-
let
|
|
737
|
-
for (;
|
|
738
|
-
const o = n
|
|
735
|
+
const s = Object.keys(this);
|
|
736
|
+
let n = s.length, r = !1;
|
|
737
|
+
for (; n--; ) {
|
|
738
|
+
const o = s[n];
|
|
739
739
|
(!t || Q(this, this[o], o, t, !0)) && (delete this[o], r = !0);
|
|
740
740
|
}
|
|
741
741
|
return r;
|
|
742
742
|
}
|
|
743
743
|
normalize(t) {
|
|
744
|
-
const
|
|
744
|
+
const s = this, n = {};
|
|
745
745
|
return a.forEach(this, (r, o) => {
|
|
746
|
-
const i = a.findKey(
|
|
746
|
+
const i = a.findKey(n, o);
|
|
747
747
|
if (i) {
|
|
748
|
-
|
|
748
|
+
s[i] = j(r), delete s[o];
|
|
749
749
|
return;
|
|
750
750
|
}
|
|
751
751
|
const c = t ? Qt(o) : String(o).trim();
|
|
752
|
-
c !== o && delete
|
|
752
|
+
c !== o && delete s[o], s[c] = j(r), n[c] = !0;
|
|
753
753
|
}), this;
|
|
754
754
|
}
|
|
755
755
|
concat(...t) {
|
|
756
756
|
return this.constructor.concat(this, ...t);
|
|
757
757
|
}
|
|
758
758
|
toJSON(t) {
|
|
759
|
-
const
|
|
760
|
-
return a.forEach(this, (
|
|
761
|
-
|
|
762
|
-
}),
|
|
759
|
+
const s = /* @__PURE__ */ Object.create(null);
|
|
760
|
+
return a.forEach(this, (n, r) => {
|
|
761
|
+
n != null && n !== !1 && (s[r] = t && a.isArray(n) ? n.join(", ") : n);
|
|
762
|
+
}), s;
|
|
763
763
|
}
|
|
764
764
|
[Symbol.iterator]() {
|
|
765
765
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
766
766
|
}
|
|
767
767
|
toString() {
|
|
768
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
768
|
+
return Object.entries(this.toJSON()).map(([t, s]) => t + ": " + s).join(`
|
|
769
769
|
`);
|
|
770
770
|
}
|
|
771
771
|
get [Symbol.toStringTag]() {
|
|
@@ -774,17 +774,17 @@ class W {
|
|
|
774
774
|
static from(t) {
|
|
775
775
|
return t instanceof this ? t : new this(t);
|
|
776
776
|
}
|
|
777
|
-
static concat(t, ...
|
|
778
|
-
const
|
|
779
|
-
return
|
|
777
|
+
static concat(t, ...s) {
|
|
778
|
+
const n = new this(t);
|
|
779
|
+
return s.forEach((r) => n.set(r)), n;
|
|
780
780
|
}
|
|
781
781
|
static accessor(t) {
|
|
782
|
-
const
|
|
782
|
+
const n = (this[pe] = this[pe] = {
|
|
783
783
|
accessors: {}
|
|
784
784
|
}).accessors, r = this.prototype;
|
|
785
785
|
function o(i) {
|
|
786
786
|
const c = F(i);
|
|
787
|
-
|
|
787
|
+
n[c] || (Zt(r, i), n[c] = !0);
|
|
788
788
|
}
|
|
789
789
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
790
790
|
}
|
|
@@ -794,45 +794,45 @@ a.freezeMethods(W.prototype);
|
|
|
794
794
|
a.freezeMethods(W);
|
|
795
795
|
const k = W;
|
|
796
796
|
function Z(e, t) {
|
|
797
|
-
const
|
|
798
|
-
let o =
|
|
797
|
+
const s = this || oe, n = t || s, r = k.from(n.headers);
|
|
798
|
+
let o = n.data;
|
|
799
799
|
return a.forEach(e, function(c) {
|
|
800
|
-
o = c.call(
|
|
800
|
+
o = c.call(s, o, r.normalize(), t ? t.status : void 0);
|
|
801
801
|
}), r.normalize(), o;
|
|
802
802
|
}
|
|
803
803
|
function Ie(e) {
|
|
804
804
|
return !!(e && e.__CANCEL__);
|
|
805
805
|
}
|
|
806
|
-
function L(e, t,
|
|
807
|
-
p.call(this, e ?? "canceled", p.ERR_CANCELED, t,
|
|
806
|
+
function L(e, t, s) {
|
|
807
|
+
p.call(this, e ?? "canceled", p.ERR_CANCELED, t, s), this.name = "CanceledError";
|
|
808
808
|
}
|
|
809
809
|
a.inherits(L, p, {
|
|
810
810
|
__CANCEL__: !0
|
|
811
811
|
});
|
|
812
|
-
function Yt(e, t,
|
|
813
|
-
const
|
|
814
|
-
!
|
|
815
|
-
"Request failed with status code " +
|
|
816
|
-
[p.ERR_BAD_REQUEST, p.ERR_BAD_RESPONSE][Math.floor(
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
812
|
+
function Yt(e, t, s) {
|
|
813
|
+
const n = s.config.validateStatus;
|
|
814
|
+
!s.status || !n || n(s.status) ? e(s) : t(new p(
|
|
815
|
+
"Request failed with status code " + s.status,
|
|
816
|
+
[p.ERR_BAD_REQUEST, p.ERR_BAD_RESPONSE][Math.floor(s.status / 100) - 4],
|
|
817
|
+
s.config,
|
|
818
|
+
s.request,
|
|
819
|
+
s
|
|
820
820
|
));
|
|
821
821
|
}
|
|
822
822
|
const qt = O.isStandardBrowserEnv ? (
|
|
823
823
|
// Standard browser envs support document.cookie
|
|
824
824
|
function() {
|
|
825
825
|
return {
|
|
826
|
-
write: function(
|
|
826
|
+
write: function(s, n, r, o, i, c) {
|
|
827
827
|
const d = [];
|
|
828
|
-
d.push(
|
|
828
|
+
d.push(s + "=" + encodeURIComponent(n)), a.isNumber(r) && d.push("expires=" + new Date(r).toGMTString()), a.isString(o) && d.push("path=" + o), a.isString(i) && d.push("domain=" + i), c === !0 && d.push("secure"), document.cookie = d.join("; ");
|
|
829
829
|
},
|
|
830
|
-
read: function(
|
|
831
|
-
const
|
|
832
|
-
return
|
|
830
|
+
read: function(s) {
|
|
831
|
+
const n = document.cookie.match(new RegExp("(^|;\\s*)(" + s + ")=([^;]*)"));
|
|
832
|
+
return n ? decodeURIComponent(n[3]) : null;
|
|
833
833
|
},
|
|
834
|
-
remove: function(
|
|
835
|
-
this.write(
|
|
834
|
+
remove: function(s) {
|
|
835
|
+
this.write(s, "", Date.now() - 864e5);
|
|
836
836
|
}
|
|
837
837
|
};
|
|
838
838
|
}()
|
|
@@ -850,37 +850,37 @@ const qt = O.isStandardBrowserEnv ? (
|
|
|
850
850
|
};
|
|
851
851
|
}()
|
|
852
852
|
);
|
|
853
|
-
function
|
|
853
|
+
function es(e) {
|
|
854
854
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function ts(e, t) {
|
|
857
857
|
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
858
858
|
}
|
|
859
859
|
function je(e, t) {
|
|
860
|
-
return e && !
|
|
860
|
+
return e && !es(t) ? ts(e, t) : t;
|
|
861
861
|
}
|
|
862
|
-
const
|
|
862
|
+
const ss = O.isStandardBrowserEnv ? (
|
|
863
863
|
// Standard browser envs have full support of the APIs needed to test
|
|
864
864
|
// whether the request URL is of the same origin as current location.
|
|
865
865
|
function() {
|
|
866
|
-
const t = /(msie|trident)/i.test(navigator.userAgent),
|
|
867
|
-
let
|
|
866
|
+
const t = /(msie|trident)/i.test(navigator.userAgent), s = document.createElement("a");
|
|
867
|
+
let n;
|
|
868
868
|
function r(o) {
|
|
869
869
|
let i = o;
|
|
870
|
-
return t && (
|
|
871
|
-
href:
|
|
872
|
-
protocol:
|
|
873
|
-
host:
|
|
874
|
-
search:
|
|
875
|
-
hash:
|
|
876
|
-
hostname:
|
|
877
|
-
port:
|
|
878
|
-
pathname:
|
|
870
|
+
return t && (s.setAttribute("href", i), i = s.href), s.setAttribute("href", i), {
|
|
871
|
+
href: s.href,
|
|
872
|
+
protocol: s.protocol ? s.protocol.replace(/:$/, "") : "",
|
|
873
|
+
host: s.host,
|
|
874
|
+
search: s.search ? s.search.replace(/^\?/, "") : "",
|
|
875
|
+
hash: s.hash ? s.hash.replace(/^#/, "") : "",
|
|
876
|
+
hostname: s.hostname,
|
|
877
|
+
port: s.port,
|
|
878
|
+
pathname: s.pathname.charAt(0) === "/" ? s.pathname : "/" + s.pathname
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
|
-
return
|
|
881
|
+
return n = r(window.location.href), function(i) {
|
|
882
882
|
const c = a.isString(i) ? r(i) : i;
|
|
883
|
-
return c.protocol ===
|
|
883
|
+
return c.protocol === n.protocol && c.host === n.host;
|
|
884
884
|
};
|
|
885
885
|
}()
|
|
886
886
|
) : (
|
|
@@ -891,20 +891,20 @@ const nn = O.isStandardBrowserEnv ? (
|
|
|
891
891
|
};
|
|
892
892
|
}()
|
|
893
893
|
);
|
|
894
|
-
function
|
|
894
|
+
function ns(e) {
|
|
895
895
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
896
896
|
return t && t[1] || "";
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function rs(e, t) {
|
|
899
899
|
e = e || 10;
|
|
900
|
-
const
|
|
900
|
+
const s = new Array(e), n = new Array(e);
|
|
901
901
|
let r = 0, o = 0, i;
|
|
902
902
|
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
903
|
-
const l = Date.now(), u =
|
|
904
|
-
i || (i = l),
|
|
903
|
+
const l = Date.now(), u = n[o];
|
|
904
|
+
i || (i = l), s[r] = d, n[r] = l;
|
|
905
905
|
let y = o, w = 0;
|
|
906
906
|
for (; y !== r; )
|
|
907
|
-
w +=
|
|
907
|
+
w += s[y++], y = y % e;
|
|
908
908
|
if (r = (r + 1) % e, r === o && (o = (o + 1) % e), l - i < t)
|
|
909
909
|
return;
|
|
910
910
|
const g = u && l - u;
|
|
@@ -912,11 +912,11 @@ function rn(e, t) {
|
|
|
912
912
|
};
|
|
913
913
|
}
|
|
914
914
|
function ge(e, t) {
|
|
915
|
-
let
|
|
916
|
-
const
|
|
915
|
+
let s = 0;
|
|
916
|
+
const n = rs(50, 250);
|
|
917
917
|
return (r) => {
|
|
918
|
-
const o = r.loaded, i = r.lengthComputable ? r.total : void 0, c = o -
|
|
919
|
-
|
|
918
|
+
const o = r.loaded, i = r.lengthComputable ? r.total : void 0, c = o - s, d = n(c), l = o <= i;
|
|
919
|
+
s = o;
|
|
920
920
|
const u = {
|
|
921
921
|
loaded: o,
|
|
922
922
|
total: i,
|
|
@@ -929,8 +929,8 @@ function ge(e, t) {
|
|
|
929
929
|
u[t ? "download" : "upload"] = !0, e(u);
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
|
-
const
|
|
933
|
-
return new Promise(function(
|
|
932
|
+
const os = typeof XMLHttpRequest < "u", is = os && function(e) {
|
|
933
|
+
return new Promise(function(s, n) {
|
|
934
934
|
let r = e.data;
|
|
935
935
|
const o = k.from(e.headers).normalize(), i = e.responseType;
|
|
936
936
|
let c;
|
|
@@ -959,45 +959,45 @@ const on = typeof XMLHttpRequest < "u", an = on && function(e) {
|
|
|
959
959
|
request: l
|
|
960
960
|
};
|
|
961
961
|
Yt(function(S) {
|
|
962
|
-
n(S), d();
|
|
963
|
-
}, function(S) {
|
|
964
962
|
s(S), d();
|
|
963
|
+
}, function(S) {
|
|
964
|
+
n(S), d();
|
|
965
965
|
}, m), l = null;
|
|
966
966
|
}
|
|
967
967
|
if ("onloadend" in l ? l.onloadend = y : l.onreadystatechange = function() {
|
|
968
968
|
!l || l.readyState !== 4 || l.status === 0 && !(l.responseURL && l.responseURL.indexOf("file:") === 0) || setTimeout(y);
|
|
969
969
|
}, l.onabort = function() {
|
|
970
|
-
l && (
|
|
970
|
+
l && (n(new p("Request aborted", p.ECONNABORTED, e, l)), l = null);
|
|
971
971
|
}, l.onerror = function() {
|
|
972
|
-
|
|
972
|
+
n(new p("Network Error", p.ERR_NETWORK, e, l)), l = null;
|
|
973
973
|
}, l.ontimeout = function() {
|
|
974
974
|
let f = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
975
975
|
const m = e.transitional || Le;
|
|
976
|
-
e.timeoutErrorMessage && (f = e.timeoutErrorMessage),
|
|
976
|
+
e.timeoutErrorMessage && (f = e.timeoutErrorMessage), n(new p(
|
|
977
977
|
f,
|
|
978
978
|
m.clarifyTimeoutError ? p.ETIMEDOUT : p.ECONNABORTED,
|
|
979
979
|
e,
|
|
980
980
|
l
|
|
981
981
|
)), l = null;
|
|
982
982
|
}, O.isStandardBrowserEnv) {
|
|
983
|
-
const g = (e.withCredentials ||
|
|
983
|
+
const g = (e.withCredentials || ss(u)) && e.xsrfCookieName && qt.read(e.xsrfCookieName);
|
|
984
984
|
g && o.set(e.xsrfHeaderName, g);
|
|
985
985
|
}
|
|
986
986
|
r === void 0 && o.setContentType(null), "setRequestHeader" in l && a.forEach(o.toJSON(), function(f, m) {
|
|
987
987
|
l.setRequestHeader(m, f);
|
|
988
988
|
}), a.isUndefined(e.withCredentials) || (l.withCredentials = !!e.withCredentials), i && i !== "json" && (l.responseType = e.responseType), typeof e.onDownloadProgress == "function" && l.addEventListener("progress", ge(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && l.upload && l.upload.addEventListener("progress", ge(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (g) => {
|
|
989
|
-
l && (
|
|
989
|
+
l && (n(!g || g.type ? new L(null, e, l) : g), l.abort(), l = null);
|
|
990
990
|
}, e.cancelToken && e.cancelToken.subscribe(c), e.signal && (e.signal.aborted ? c() : e.signal.addEventListener("abort", c)));
|
|
991
|
-
const w =
|
|
991
|
+
const w = ns(u);
|
|
992
992
|
if (w && O.protocols.indexOf(w) === -1) {
|
|
993
|
-
|
|
993
|
+
n(new p("Unsupported protocol " + w + ":", p.ERR_BAD_REQUEST, e));
|
|
994
994
|
return;
|
|
995
995
|
}
|
|
996
996
|
l.send(r || null);
|
|
997
997
|
});
|
|
998
998
|
}, P = {
|
|
999
|
-
http:
|
|
1000
|
-
xhr:
|
|
999
|
+
http: Rt,
|
|
1000
|
+
xhr: is
|
|
1001
1001
|
};
|
|
1002
1002
|
a.forEach(P, (e, t) => {
|
|
1003
1003
|
if (e) {
|
|
@@ -1008,23 +1008,23 @@ a.forEach(P, (e, t) => {
|
|
|
1008
1008
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1009
1009
|
}
|
|
1010
1010
|
});
|
|
1011
|
-
const
|
|
1011
|
+
const as = {
|
|
1012
1012
|
getAdapter: (e) => {
|
|
1013
1013
|
e = a.isArray(e) ? e : [e];
|
|
1014
1014
|
const { length: t } = e;
|
|
1015
|
-
let
|
|
1016
|
-
for (let r = 0; r < t && (
|
|
1015
|
+
let s, n;
|
|
1016
|
+
for (let r = 0; r < t && (s = e[r], !(n = a.isString(s) ? P[s.toLowerCase()] : s)); r++)
|
|
1017
1017
|
;
|
|
1018
|
-
if (!
|
|
1019
|
-
throw
|
|
1020
|
-
`Adapter ${
|
|
1018
|
+
if (!n)
|
|
1019
|
+
throw n === !1 ? new p(
|
|
1020
|
+
`Adapter ${s} is not supported by the environment`,
|
|
1021
1021
|
"ERR_NOT_SUPPORT"
|
|
1022
1022
|
) : new Error(
|
|
1023
|
-
a.hasOwnProp(P,
|
|
1023
|
+
a.hasOwnProp(P, s) ? `Adapter '${s}' is not available in the build` : `Unknown adapter '${s}'`
|
|
1024
1024
|
);
|
|
1025
|
-
if (!a.isFunction(
|
|
1025
|
+
if (!a.isFunction(n))
|
|
1026
1026
|
throw new TypeError("adapter is not a function");
|
|
1027
|
-
return
|
|
1027
|
+
return n;
|
|
1028
1028
|
},
|
|
1029
1029
|
adapters: P
|
|
1030
1030
|
};
|
|
@@ -1036,50 +1036,50 @@ function be(e) {
|
|
|
1036
1036
|
return Y(e), e.headers = k.from(e.headers), e.data = Z.call(
|
|
1037
1037
|
e,
|
|
1038
1038
|
e.transformRequest
|
|
1039
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1040
|
-
return Y(e),
|
|
1039
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), as.getAdapter(e.adapter || oe.adapter)(e).then(function(n) {
|
|
1040
|
+
return Y(e), n.data = Z.call(
|
|
1041
1041
|
e,
|
|
1042
1042
|
e.transformResponse,
|
|
1043
|
-
|
|
1044
|
-
),
|
|
1045
|
-
}, function(
|
|
1046
|
-
return Ie(
|
|
1043
|
+
n
|
|
1044
|
+
), n.headers = k.from(n.headers), n;
|
|
1045
|
+
}, function(n) {
|
|
1046
|
+
return Ie(n) || (Y(e), n && n.response && (n.response.data = Z.call(
|
|
1047
1047
|
e,
|
|
1048
1048
|
e.transformResponse,
|
|
1049
|
-
|
|
1050
|
-
),
|
|
1049
|
+
n.response
|
|
1050
|
+
), n.response.headers = k.from(n.response.headers))), Promise.reject(n);
|
|
1051
1051
|
});
|
|
1052
1052
|
}
|
|
1053
1053
|
const we = (e) => e instanceof k ? e.toJSON() : e;
|
|
1054
|
-
function
|
|
1054
|
+
function _(e, t) {
|
|
1055
1055
|
t = t || {};
|
|
1056
|
-
const
|
|
1057
|
-
function
|
|
1056
|
+
const s = {};
|
|
1057
|
+
function n(l, u, y) {
|
|
1058
1058
|
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: y }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
1059
1059
|
}
|
|
1060
1060
|
function r(l, u, y) {
|
|
1061
1061
|
if (a.isUndefined(u)) {
|
|
1062
1062
|
if (!a.isUndefined(l))
|
|
1063
|
-
return
|
|
1063
|
+
return n(void 0, l, y);
|
|
1064
1064
|
} else
|
|
1065
|
-
return
|
|
1065
|
+
return n(l, u, y);
|
|
1066
1066
|
}
|
|
1067
1067
|
function o(l, u) {
|
|
1068
1068
|
if (!a.isUndefined(u))
|
|
1069
|
-
return
|
|
1069
|
+
return n(void 0, u);
|
|
1070
1070
|
}
|
|
1071
1071
|
function i(l, u) {
|
|
1072
1072
|
if (a.isUndefined(u)) {
|
|
1073
1073
|
if (!a.isUndefined(l))
|
|
1074
|
-
return
|
|
1074
|
+
return n(void 0, l);
|
|
1075
1075
|
} else
|
|
1076
|
-
return
|
|
1076
|
+
return n(void 0, u);
|
|
1077
1077
|
}
|
|
1078
1078
|
function c(l, u, y) {
|
|
1079
1079
|
if (y in t)
|
|
1080
|
-
return
|
|
1080
|
+
return n(l, u);
|
|
1081
1081
|
if (y in e)
|
|
1082
|
-
return
|
|
1082
|
+
return n(void 0, l);
|
|
1083
1083
|
}
|
|
1084
1084
|
const d = {
|
|
1085
1085
|
url: o,
|
|
@@ -1113,56 +1113,56 @@ function v(e, t) {
|
|
|
1113
1113
|
};
|
|
1114
1114
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
1115
1115
|
const y = d[u] || r, w = y(e[u], t[u], u);
|
|
1116
|
-
a.isUndefined(w) && y !== c || (
|
|
1117
|
-
}),
|
|
1116
|
+
a.isUndefined(w) && y !== c || (s[u] = w);
|
|
1117
|
+
}), s;
|
|
1118
1118
|
}
|
|
1119
1119
|
const Pe = "1.4.0", ie = {};
|
|
1120
1120
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1121
|
-
ie[e] = function(
|
|
1122
|
-
return typeof
|
|
1121
|
+
ie[e] = function(n) {
|
|
1122
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1123
1123
|
};
|
|
1124
1124
|
});
|
|
1125
1125
|
const Ee = {};
|
|
1126
|
-
ie.transitional = function(t,
|
|
1126
|
+
ie.transitional = function(t, s, n) {
|
|
1127
1127
|
function r(o, i) {
|
|
1128
|
-
return "[Axios v" + Pe + "] Transitional option '" + o + "'" + i + (
|
|
1128
|
+
return "[Axios v" + Pe + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
1129
1129
|
}
|
|
1130
1130
|
return (o, i, c) => {
|
|
1131
1131
|
if (t === !1)
|
|
1132
1132
|
throw new p(
|
|
1133
|
-
r(i, " has been removed" + (
|
|
1133
|
+
r(i, " has been removed" + (s ? " in " + s : "")),
|
|
1134
1134
|
p.ERR_DEPRECATED
|
|
1135
1135
|
);
|
|
1136
|
-
return
|
|
1136
|
+
return s && !Ee[i] && (Ee[i] = !0, console.warn(
|
|
1137
1137
|
r(
|
|
1138
1138
|
i,
|
|
1139
|
-
" has been deprecated since v" +
|
|
1139
|
+
" has been deprecated since v" + s + " and will be removed in the near future"
|
|
1140
1140
|
)
|
|
1141
1141
|
)), t ? t(o, i, c) : !0;
|
|
1142
1142
|
};
|
|
1143
1143
|
};
|
|
1144
|
-
function
|
|
1144
|
+
function ls(e, t, s) {
|
|
1145
1145
|
if (typeof e != "object")
|
|
1146
1146
|
throw new p("options must be an object", p.ERR_BAD_OPTION_VALUE);
|
|
1147
|
-
const
|
|
1148
|
-
let r =
|
|
1147
|
+
const n = Object.keys(e);
|
|
1148
|
+
let r = n.length;
|
|
1149
1149
|
for (; r-- > 0; ) {
|
|
1150
|
-
const o =
|
|
1150
|
+
const o = n[r], i = t[o];
|
|
1151
1151
|
if (i) {
|
|
1152
1152
|
const c = e[o], d = c === void 0 || i(c, o, e);
|
|
1153
1153
|
if (d !== !0)
|
|
1154
1154
|
throw new p("option " + o + " must be " + d, p.ERR_BAD_OPTION_VALUE);
|
|
1155
1155
|
continue;
|
|
1156
1156
|
}
|
|
1157
|
-
if (
|
|
1157
|
+
if (s !== !0)
|
|
1158
1158
|
throw new p("Unknown option " + o, p.ERR_BAD_OPTION);
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
const te = {
|
|
1162
|
-
assertOptions:
|
|
1162
|
+
assertOptions: ls,
|
|
1163
1163
|
validators: ie
|
|
1164
1164
|
}, x = te.validators;
|
|
1165
|
-
class
|
|
1165
|
+
class H {
|
|
1166
1166
|
constructor(t) {
|
|
1167
1167
|
this.defaults = t, this.interceptors = {
|
|
1168
1168
|
request: new me(),
|
|
@@ -1177,33 +1177,33 @@ class z {
|
|
|
1177
1177
|
*
|
|
1178
1178
|
* @returns {Promise} The Promise to be fulfilled
|
|
1179
1179
|
*/
|
|
1180
|
-
request(t,
|
|
1181
|
-
typeof t == "string" ? (
|
|
1182
|
-
const { transitional:
|
|
1183
|
-
|
|
1180
|
+
request(t, s) {
|
|
1181
|
+
typeof t == "string" ? (s = s || {}, s.url = t) : s = t || {}, s = _(this.defaults, s);
|
|
1182
|
+
const { transitional: n, paramsSerializer: r, headers: o } = s;
|
|
1183
|
+
n !== void 0 && te.assertOptions(n, {
|
|
1184
1184
|
silentJSONParsing: x.transitional(x.boolean),
|
|
1185
1185
|
forcedJSONParsing: x.transitional(x.boolean),
|
|
1186
1186
|
clarifyTimeoutError: x.transitional(x.boolean)
|
|
1187
|
-
}, !1), r != null && (a.isFunction(r) ?
|
|
1187
|
+
}, !1), r != null && (a.isFunction(r) ? s.paramsSerializer = {
|
|
1188
1188
|
serialize: r
|
|
1189
1189
|
} : te.assertOptions(r, {
|
|
1190
1190
|
encode: x.function,
|
|
1191
1191
|
serialize: x.function
|
|
1192
|
-
}, !0)),
|
|
1192
|
+
}, !0)), s.method = (s.method || this.defaults.method || "get").toLowerCase();
|
|
1193
1193
|
let i;
|
|
1194
1194
|
i = o && a.merge(
|
|
1195
1195
|
o.common,
|
|
1196
|
-
o[
|
|
1196
|
+
o[s.method]
|
|
1197
1197
|
), i && a.forEach(
|
|
1198
1198
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1199
1199
|
(f) => {
|
|
1200
1200
|
delete o[f];
|
|
1201
1201
|
}
|
|
1202
|
-
),
|
|
1202
|
+
), s.headers = k.concat(i, o);
|
|
1203
1203
|
const c = [];
|
|
1204
1204
|
let d = !0;
|
|
1205
1205
|
this.interceptors.request.forEach(function(m) {
|
|
1206
|
-
typeof m.runWhen == "function" && m.runWhen(
|
|
1206
|
+
typeof m.runWhen == "function" && m.runWhen(s) === !1 || (d = d && m.synchronous, c.unshift(m.fulfilled, m.rejected));
|
|
1207
1207
|
});
|
|
1208
1208
|
const l = [];
|
|
1209
1209
|
this.interceptors.response.forEach(function(m) {
|
|
@@ -1212,12 +1212,12 @@ class z {
|
|
|
1212
1212
|
let u, y = 0, w;
|
|
1213
1213
|
if (!d) {
|
|
1214
1214
|
const f = [be.bind(this), void 0];
|
|
1215
|
-
for (f.unshift.apply(f, c), f.push.apply(f, l), w = f.length, u = Promise.resolve(
|
|
1215
|
+
for (f.unshift.apply(f, c), f.push.apply(f, l), w = f.length, u = Promise.resolve(s); y < w; )
|
|
1216
1216
|
u = u.then(f[y++], f[y++]);
|
|
1217
1217
|
return u;
|
|
1218
1218
|
}
|
|
1219
1219
|
w = c.length;
|
|
1220
|
-
let g =
|
|
1220
|
+
let g = s;
|
|
1221
1221
|
for (y = 0; y < w; ) {
|
|
1222
1222
|
const f = c[y++], m = c[y++];
|
|
1223
1223
|
try {
|
|
@@ -1237,26 +1237,26 @@ class z {
|
|
|
1237
1237
|
return u;
|
|
1238
1238
|
}
|
|
1239
1239
|
getUri(t) {
|
|
1240
|
-
t =
|
|
1241
|
-
const
|
|
1242
|
-
return De(
|
|
1240
|
+
t = _(this.defaults, t);
|
|
1241
|
+
const s = je(t.baseURL, t.url);
|
|
1242
|
+
return De(s, t.params, t.paramsSerializer);
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
1245
1245
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1246
|
-
|
|
1247
|
-
return this.request(
|
|
1246
|
+
H.prototype[t] = function(s, n) {
|
|
1247
|
+
return this.request(_(n || {}, {
|
|
1248
1248
|
method: t,
|
|
1249
|
-
url:
|
|
1250
|
-
data: (
|
|
1249
|
+
url: s,
|
|
1250
|
+
data: (n || {}).data
|
|
1251
1251
|
}));
|
|
1252
1252
|
};
|
|
1253
1253
|
});
|
|
1254
1254
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1255
|
-
function n
|
|
1255
|
+
function s(n) {
|
|
1256
1256
|
return function(o, i, c) {
|
|
1257
|
-
return this.request(
|
|
1257
|
+
return this.request(_(c || {}, {
|
|
1258
1258
|
method: t,
|
|
1259
|
-
headers:
|
|
1259
|
+
headers: n ? {
|
|
1260
1260
|
"Content-Type": "multipart/form-data"
|
|
1261
1261
|
} : {},
|
|
1262
1262
|
url: o,
|
|
@@ -1264,35 +1264,35 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1264
1264
|
}));
|
|
1265
1265
|
};
|
|
1266
1266
|
}
|
|
1267
|
-
|
|
1267
|
+
H.prototype[t] = s(), H.prototype[t + "Form"] = s(!0);
|
|
1268
1268
|
});
|
|
1269
|
-
const
|
|
1269
|
+
const z = H;
|
|
1270
1270
|
class ae {
|
|
1271
1271
|
constructor(t) {
|
|
1272
1272
|
if (typeof t != "function")
|
|
1273
1273
|
throw new TypeError("executor must be a function.");
|
|
1274
|
-
let
|
|
1274
|
+
let s;
|
|
1275
1275
|
this.promise = new Promise(function(o) {
|
|
1276
|
-
|
|
1276
|
+
s = o;
|
|
1277
1277
|
});
|
|
1278
|
-
const
|
|
1278
|
+
const n = this;
|
|
1279
1279
|
this.promise.then((r) => {
|
|
1280
|
-
if (!
|
|
1280
|
+
if (!n._listeners)
|
|
1281
1281
|
return;
|
|
1282
|
-
let o =
|
|
1282
|
+
let o = n._listeners.length;
|
|
1283
1283
|
for (; o-- > 0; )
|
|
1284
|
-
|
|
1285
|
-
|
|
1284
|
+
n._listeners[o](r);
|
|
1285
|
+
n._listeners = null;
|
|
1286
1286
|
}), this.promise.then = (r) => {
|
|
1287
1287
|
let o;
|
|
1288
1288
|
const i = new Promise((c) => {
|
|
1289
|
-
|
|
1289
|
+
n.subscribe(c), o = c;
|
|
1290
1290
|
}).then(r);
|
|
1291
1291
|
return i.cancel = function() {
|
|
1292
|
-
|
|
1292
|
+
n.unsubscribe(o);
|
|
1293
1293
|
}, i;
|
|
1294
1294
|
}, t(function(o, i, c) {
|
|
1295
|
-
|
|
1295
|
+
n.reason || (n.reason = new L(o, i, c), s(n.reason));
|
|
1296
1296
|
});
|
|
1297
1297
|
}
|
|
1298
1298
|
/**
|
|
@@ -1318,8 +1318,8 @@ class ae {
|
|
|
1318
1318
|
unsubscribe(t) {
|
|
1319
1319
|
if (!this._listeners)
|
|
1320
1320
|
return;
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1321
|
+
const s = this._listeners.indexOf(t);
|
|
1322
|
+
s !== -1 && this._listeners.splice(s, 1);
|
|
1323
1323
|
}
|
|
1324
1324
|
/**
|
|
1325
1325
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -1335,16 +1335,16 @@ class ae {
|
|
|
1335
1335
|
};
|
|
1336
1336
|
}
|
|
1337
1337
|
}
|
|
1338
|
-
const
|
|
1339
|
-
function
|
|
1340
|
-
return function(
|
|
1341
|
-
return e.apply(null,
|
|
1338
|
+
const cs = ae;
|
|
1339
|
+
function us(e) {
|
|
1340
|
+
return function(s) {
|
|
1341
|
+
return e.apply(null, s);
|
|
1342
1342
|
};
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function fs(e) {
|
|
1345
1345
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1346
1346
|
}
|
|
1347
|
-
const
|
|
1347
|
+
const se = {
|
|
1348
1348
|
Continue: 100,
|
|
1349
1349
|
SwitchingProtocols: 101,
|
|
1350
1350
|
Processing: 102,
|
|
@@ -1409,75 +1409,75 @@ const ne = {
|
|
|
1409
1409
|
NotExtended: 510,
|
|
1410
1410
|
NetworkAuthenticationRequired: 511
|
|
1411
1411
|
};
|
|
1412
|
-
Object.entries(
|
|
1413
|
-
|
|
1412
|
+
Object.entries(se).forEach(([e, t]) => {
|
|
1413
|
+
se[t] = e;
|
|
1414
1414
|
});
|
|
1415
|
-
const
|
|
1416
|
-
function
|
|
1417
|
-
const t = new
|
|
1418
|
-
return a.extend(
|
|
1419
|
-
return
|
|
1420
|
-
},
|
|
1421
|
-
}
|
|
1422
|
-
const b =
|
|
1423
|
-
b.Axios =
|
|
1415
|
+
const ds = se;
|
|
1416
|
+
function ze(e) {
|
|
1417
|
+
const t = new z(e), s = Oe(z.prototype.request, t);
|
|
1418
|
+
return a.extend(s, z.prototype, t, { allOwnKeys: !0 }), a.extend(s, t, null, { allOwnKeys: !0 }), s.create = function(r) {
|
|
1419
|
+
return ze(_(e, r));
|
|
1420
|
+
}, s;
|
|
1421
|
+
}
|
|
1422
|
+
const b = ze(oe);
|
|
1423
|
+
b.Axios = z;
|
|
1424
1424
|
b.CanceledError = L;
|
|
1425
|
-
b.CancelToken =
|
|
1425
|
+
b.CancelToken = cs;
|
|
1426
1426
|
b.isCancel = Ie;
|
|
1427
1427
|
b.VERSION = Pe;
|
|
1428
|
-
b.toFormData =
|
|
1428
|
+
b.toFormData = K;
|
|
1429
1429
|
b.AxiosError = p;
|
|
1430
1430
|
b.Cancel = b.CanceledError;
|
|
1431
1431
|
b.all = function(t) {
|
|
1432
1432
|
return Promise.all(t);
|
|
1433
1433
|
};
|
|
1434
|
-
b.spread =
|
|
1435
|
-
b.isAxiosError =
|
|
1436
|
-
b.mergeConfig =
|
|
1434
|
+
b.spread = us;
|
|
1435
|
+
b.isAxiosError = fs;
|
|
1436
|
+
b.mergeConfig = _;
|
|
1437
1437
|
b.AxiosHeaders = k;
|
|
1438
1438
|
b.formToJSON = (e) => Ue(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1439
|
-
b.HttpStatusCode =
|
|
1439
|
+
b.HttpStatusCode = ds;
|
|
1440
1440
|
b.default = b;
|
|
1441
1441
|
const le = b;
|
|
1442
1442
|
function ce({ needsToken: e = !0, options: t }) {
|
|
1443
|
-
let
|
|
1444
|
-
return e &&
|
|
1443
|
+
let s = {};
|
|
1444
|
+
return e && Ve(s, ["headers", "Authorization"], "Bearer TOKEN"), t && (s = Se(s, t)), s;
|
|
1445
1445
|
}
|
|
1446
|
-
async function ue({ url: e, needsToken: t, options:
|
|
1447
|
-
return await le.get(e, ce({ needsToken: t, options:
|
|
1446
|
+
async function ue({ url: e, needsToken: t, options: s }) {
|
|
1447
|
+
return await le.get(e, ce({ needsToken: t, options: s }));
|
|
1448
1448
|
}
|
|
1449
|
-
async function
|
|
1450
|
-
return await le.post(e,
|
|
1449
|
+
async function He({ url: e, needsToken: t, options: s, payload: n = {} }) {
|
|
1450
|
+
return await le.post(e, n, ce({ needsToken: t, options: s }));
|
|
1451
1451
|
}
|
|
1452
|
-
async function
|
|
1453
|
-
return await le.put(e,
|
|
1452
|
+
async function ys({ url: e, needsToken: t, options: s, payload: n }) {
|
|
1453
|
+
return await le.put(e, n, ce({ needsToken: t, options: s }));
|
|
1454
1454
|
}
|
|
1455
|
-
async function
|
|
1455
|
+
async function C(e) {
|
|
1456
1456
|
try {
|
|
1457
1457
|
return await e();
|
|
1458
1458
|
} catch (t) {
|
|
1459
1459
|
return Promise.reject(t);
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
|
-
const
|
|
1463
|
-
async function
|
|
1464
|
-
return
|
|
1465
|
-
async () => await
|
|
1462
|
+
const R = " https://jmpuf4u3tj.execute-api.us-east-1.amazonaws.com/dev", hs = "1000";
|
|
1463
|
+
async function ms(e, t) {
|
|
1464
|
+
return C(
|
|
1465
|
+
async () => await He({ url: `${R}/api/v1/images/book/${e}`, payload: t })
|
|
1466
1466
|
);
|
|
1467
1467
|
}
|
|
1468
|
-
class
|
|
1468
|
+
class ps {
|
|
1469
1469
|
constructor(t) {
|
|
1470
1470
|
h(this, "parentId");
|
|
1471
1471
|
h(this, "images");
|
|
1472
1472
|
this.parentId = t, this.images = [];
|
|
1473
1473
|
}
|
|
1474
1474
|
async add(t) {
|
|
1475
|
-
return this.images.push(t), await
|
|
1476
|
-
|
|
1475
|
+
return this.images.push(t), await ms(this.parentId, new gs(t)), new Promise((s) => {
|
|
1476
|
+
s(this.images.length);
|
|
1477
1477
|
});
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
|
-
class
|
|
1480
|
+
class gs {
|
|
1481
1481
|
constructor(t) {
|
|
1482
1482
|
h(this, "handle");
|
|
1483
1483
|
h(this, "url");
|
|
@@ -1491,19 +1491,23 @@ class bn {
|
|
|
1491
1491
|
this.handle = t.handle, this.url = t.url, this.width = t.width, this.height = t.height, this.orientation = t.rotation, this.taken_at = t.captureTime, this.camera_make = t.cameraMake, this.camera = t.cameraModel, this.filename = t.filename;
|
|
1492
1492
|
}
|
|
1493
1493
|
}
|
|
1494
|
-
const
|
|
1494
|
+
const Ls = [
|
|
1495
1495
|
"new",
|
|
1496
1496
|
"ingesting",
|
|
1497
1497
|
"submitted",
|
|
1498
|
-
"waiting for storyboard",
|
|
1499
1498
|
"storyboarding",
|
|
1500
|
-
"
|
|
1501
|
-
"design initialized",
|
|
1502
|
-
"waiting for design",
|
|
1499
|
+
"storyboarding succeeded",
|
|
1503
1500
|
"designing",
|
|
1501
|
+
"designing succeeded",
|
|
1502
|
+
"layouting",
|
|
1503
|
+
"layouting succeeded",
|
|
1504
|
+
"embellishing",
|
|
1505
|
+
"embellishing succeeded",
|
|
1506
|
+
"polishing",
|
|
1507
|
+
"polishing succeeded",
|
|
1504
1508
|
"ready",
|
|
1505
1509
|
"error"
|
|
1506
|
-
],
|
|
1510
|
+
], bs = [
|
|
1507
1511
|
"baby",
|
|
1508
1512
|
"birthday",
|
|
1509
1513
|
"default",
|
|
@@ -1680,8 +1684,8 @@ const Un = [
|
|
|
1680
1684
|
6097: { slug: "boho-wedding-sfly" },
|
|
1681
1685
|
6098: { slug: "black-and-white-rustic-sfly" },
|
|
1682
1686
|
6099: { slug: "bright-color-pop-sfly" }
|
|
1683
|
-
},
|
|
1684
|
-
class
|
|
1687
|
+
}, ws = ["8x8", "10x10", "12x12", "8x11", "11x8", "11x14"], Es = ["sc", "hc", "pl"], Ss = ["sp", "sl", "dl"], Os = ["low", "medium", "high"], As = ["best", "most", "all"], Ts = ["none", "few", "lots"], ks = ["none", "few", "lots"];
|
|
1688
|
+
class xs {
|
|
1685
1689
|
constructor(t) {
|
|
1686
1690
|
h(this, "occasion");
|
|
1687
1691
|
h(this, "style");
|
|
@@ -1701,46 +1705,46 @@ class G {
|
|
|
1701
1705
|
h(this, "state");
|
|
1702
1706
|
h(this, "title");
|
|
1703
1707
|
h(this, "design_request");
|
|
1704
|
-
this.id = t.id, this.state = t.state, this.title = t.title, this.design_request = new
|
|
1708
|
+
this.id = t.id, this.state = t.state, this.title = t.title, this.design_request = new xs(t.design_request);
|
|
1705
1709
|
}
|
|
1706
1710
|
}
|
|
1707
|
-
function
|
|
1708
|
-
const t = Me[e.style].slug,
|
|
1709
|
-
return
|
|
1711
|
+
function vs(e) {
|
|
1712
|
+
const t = Me[e.style].slug, s = Ge({ ...e });
|
|
1713
|
+
return s.style = t, new G({
|
|
1710
1714
|
id: e.parentId,
|
|
1711
1715
|
state: "new",
|
|
1712
1716
|
title: e.title,
|
|
1713
|
-
design_request:
|
|
1717
|
+
design_request: s
|
|
1714
1718
|
});
|
|
1715
1719
|
}
|
|
1716
|
-
async function
|
|
1717
|
-
return
|
|
1718
|
-
const
|
|
1719
|
-
return Qe(
|
|
1720
|
+
async function _s(e, t) {
|
|
1721
|
+
return C(async () => {
|
|
1722
|
+
const s = await ue({ url: `${R}/api/v1/designoptions/booksize/${e}/imagecount/${t}` });
|
|
1723
|
+
return Qe(s.data);
|
|
1720
1724
|
});
|
|
1721
1725
|
}
|
|
1722
|
-
async function
|
|
1723
|
-
return
|
|
1724
|
-
async () => new G((await
|
|
1726
|
+
async function Ns(e) {
|
|
1727
|
+
return C(
|
|
1728
|
+
async () => new G((await He({ url: `${R}/api/v1/books`, payload: e })).data)
|
|
1725
1729
|
);
|
|
1726
1730
|
}
|
|
1727
|
-
async function
|
|
1728
|
-
return
|
|
1729
|
-
async () => new G((await ue({ url: `${
|
|
1731
|
+
async function Cs(e) {
|
|
1732
|
+
return C(
|
|
1733
|
+
async () => new G((await ue({ url: `${R}/api/v1/books/${e}` })).data)
|
|
1730
1734
|
);
|
|
1731
1735
|
}
|
|
1732
|
-
async function
|
|
1733
|
-
return
|
|
1734
|
-
async () => new G((await
|
|
1736
|
+
async function Rs(e) {
|
|
1737
|
+
return C(
|
|
1738
|
+
async () => new G((await ys({ url: `${R}/api/v1/books/${e.id}`, payload: e })).data)
|
|
1735
1739
|
);
|
|
1736
1740
|
}
|
|
1737
|
-
async function
|
|
1738
|
-
return
|
|
1739
|
-
async () => (await ue({ url: `${
|
|
1741
|
+
async function Fs(e) {
|
|
1742
|
+
return C(
|
|
1743
|
+
async () => (await ue({ url: `${R}/api/v1/books/${e}/format/galleon` })).data
|
|
1740
1744
|
);
|
|
1741
1745
|
}
|
|
1742
|
-
class
|
|
1743
|
-
constructor(t,
|
|
1746
|
+
class Bs {
|
|
1747
|
+
constructor(t, s) {
|
|
1744
1748
|
h(this, "parentId");
|
|
1745
1749
|
h(this, "title");
|
|
1746
1750
|
h(this, "occasion");
|
|
@@ -1753,56 +1757,56 @@ class Dn {
|
|
|
1753
1757
|
h(this, "embellishmentLevel");
|
|
1754
1758
|
h(this, "textStickerLevel");
|
|
1755
1759
|
h(this, "images");
|
|
1756
|
-
this.parentId = t, this.title = (
|
|
1760
|
+
this.parentId = t, this.title = (s == null ? void 0 : s.title) || "", this.occasion = (s == null ? void 0 : s.occasion) || bs[0], this.style = (s == null ? void 0 : s.style) || parseInt(Object.keys(Me)[0]), this.bookSize = (s == null ? void 0 : s.bookSize) || ws[0], this.coverType = (s == null ? void 0 : s.coverType) || Es[0], this.pageType = (s == null ? void 0 : s.pageType) || Ss[0], this.imageDensity = (s == null ? void 0 : s.imageDensity) || Os[0], this.imageFiltering = (s == null ? void 0 : s.imageFiltering) || As[0], this.embellishmentLevel = (s == null ? void 0 : s.embellishmentLevel) || Ts[0], this.textStickerLevel = (s == null ? void 0 : s.textStickerLevel) || ks[0], this.images = new ps(t);
|
|
1757
1761
|
}
|
|
1758
1762
|
async getOptions(t) {
|
|
1759
|
-
return await
|
|
1763
|
+
return await _s(this.bookSize, t);
|
|
1760
1764
|
}
|
|
1761
1765
|
async submit(t) {
|
|
1762
|
-
return t && Object.assign(this, t), await
|
|
1766
|
+
return t && Object.assign(this, t), await Rs(vs(this)), this.getProgress(), this;
|
|
1763
1767
|
}
|
|
1764
1768
|
async getJSON() {
|
|
1765
|
-
return await
|
|
1769
|
+
return await Fs(this.parentId);
|
|
1766
1770
|
}
|
|
1767
1771
|
async getProgress() {
|
|
1768
1772
|
let t = "";
|
|
1769
|
-
const
|
|
1770
|
-
const
|
|
1771
|
-
if (t !==
|
|
1772
|
-
t =
|
|
1773
|
+
const s = setInterval(async () => {
|
|
1774
|
+
const n = (await Cs(this.parentId)).state;
|
|
1775
|
+
if (t !== n) {
|
|
1776
|
+
t = n;
|
|
1773
1777
|
const r = new CustomEvent("MagicBook.designRequestUpdated", {
|
|
1774
1778
|
detail: {
|
|
1775
|
-
state:
|
|
1779
|
+
state: n
|
|
1776
1780
|
}
|
|
1777
1781
|
});
|
|
1778
|
-
window.dispatchEvent(r), ["error", "ready"].includes(
|
|
1782
|
+
window.dispatchEvent(r), ["error", "ready"].includes(n) && clearInterval(s);
|
|
1779
1783
|
}
|
|
1780
|
-
},
|
|
1784
|
+
}, hs);
|
|
1781
1785
|
}
|
|
1782
1786
|
}
|
|
1783
|
-
class
|
|
1787
|
+
class Us {
|
|
1784
1788
|
constructor(t) {
|
|
1785
1789
|
h(this, "apiKey");
|
|
1786
1790
|
this.apiKey = t;
|
|
1787
1791
|
}
|
|
1788
1792
|
async createDesignRequest(t) {
|
|
1789
|
-
const
|
|
1790
|
-
return new
|
|
1793
|
+
const s = await Ns();
|
|
1794
|
+
return new Bs(s.id, t);
|
|
1791
1795
|
}
|
|
1792
1796
|
}
|
|
1793
1797
|
export {
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1798
|
+
Bs as DesignRequest,
|
|
1799
|
+
gs as ImageServer,
|
|
1800
|
+
ps as Images,
|
|
1801
|
+
Us as MagicBookClient,
|
|
1802
|
+
ws as bookSizes,
|
|
1803
|
+
Es as coverTypes,
|
|
1804
|
+
Ts as embellishmentLevels,
|
|
1805
|
+
Os as imageDensities,
|
|
1806
|
+
As as imageFilterings,
|
|
1807
|
+
bs as occasions,
|
|
1808
|
+
Ss as pageTypes,
|
|
1809
|
+
Ls as states,
|
|
1806
1810
|
Me as styles,
|
|
1807
|
-
|
|
1811
|
+
ks as textStickerLevels
|
|
1808
1812
|
};
|