varsnap 1.8.1 → 1.8.4

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/dist/varsnap.js CHANGED
@@ -1,270 +1,857 @@
1
1
  /*
2
- * Varsnap.js v1.8.1
2
+ * Varsnap.js v1.8.4
3
3
  */
4
4
  (function(exports) {
5
- !function(e) {
6
- if ("object" == typeof exports && "undefined" != typeof module) module.exports = e(); else if ("function" == typeof define && define.amd) define([], e); else {
7
- ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).varsnap = e();
5
+ !function(t) {
6
+ if ("object" == typeof exports && "undefined" != typeof module) module.exports = t(); else if ("function" == typeof define && define.amd) define([], t); else {
7
+ ("undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).varsnap = t();
8
8
  }
9
9
  }(function() {
10
- var e = function(e) {
11
- var t;
12
- return function(n) {
13
- return t || e(t = {
14
- exports: {},
15
- parent: n
16
- }, t.exports), t.exports;
17
- };
18
- }, t = e(function(e, t) {
10
+ var t, e, r, n = (t = function(t, r) {
19
11
  (function(t) {
20
12
  (function() {
21
13
  "use strict";
22
- var r = {
23
- "Content-Type": "application/x-www-form-urlencoded"
24
- };
25
- function o(e, t) {
26
- !f.isUndefined(e) && f.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t);
14
+ function t(t) {
15
+ if (t > 2147483647) throw new RangeError('The value "' + t + '" is invalid for option "size"');
16
+ var e = new Uint8Array(t);
17
+ return e.__proto__ = n.prototype, e;
27
18
  }
28
- var i, a = {
29
- transitional: {
30
- silentJSONParsing: !0,
31
- forcedJSONParsing: !0,
32
- clarifyTimeoutError: !1
33
- },
34
- adapter: (("undefined" != typeof XMLHttpRequest || void 0 !== t && "[object process]" === Object.prototype.toString.call(t)) && (i = n({})),
35
- i),
36
- transformRequest: [ function(e, t) {
37
- return g(t, "Accept"), g(t, "Content-Type"), f.isFormData(e) || f.isArrayBuffer(e) || f.isBuffer(e) || f.isStream(e) || f.isFile(e) || f.isBlob(e) ? e : f.isArrayBufferView(e) ? e.buffer : f.isURLSearchParams(e) ? (o(t, "application/x-www-form-urlencoded;charset=utf-8"),
38
- e.toString()) : f.isObject(e) || t && "application/json" === t["Content-Type"] ? (o(t, "application/json"),
39
- function(e, t, n) {
40
- if (f.isString(e)) try {
41
- return (0, JSON.parse)(e), f.trim(e);
42
- } catch (r) {
43
- if ("SyntaxError" !== r.name) throw r;
44
- }
45
- return (0, JSON.stringify)(e);
46
- }(e)) : e;
47
- } ],
48
- transformResponse: [ function(e) {
49
- var t = this.transitional || a.transitional, n = t && t.silentJSONParsing, r = t && t.forcedJSONParsing, o = !n && "json" === this.responseType;
50
- if (o || r && f.isString(e) && e.length) try {
51
- return JSON.parse(e);
52
- } catch (i) {
53
- if (o) {
54
- if ("SyntaxError" === i.name) throw m(i, this, "E_JSON_PARSE");
55
- throw i;
56
- }
19
+ function n(t, e, r) {
20
+ if ("number" == typeof t) {
21
+ if ("string" == typeof e) throw new TypeError('The "string" argument must be of type string. Received type number');
22
+ return s(t);
23
+ }
24
+ return o(t, e, r);
25
+ }
26
+ function o(e, r, o) {
27
+ if ("string" == typeof e) return function(e, r) {
28
+ if ("string" == typeof r && "" !== r || (r = "utf8"),
29
+ !n.isEncoding(r)) throw new TypeError("Unknown encoding: " + r);
30
+ var o = 0 | f(e, r), i = t(o), s = i.write(e, r);
31
+ return s !== o && (i = i.slice(0, s)), i;
32
+ }(e, r);
33
+ if (ArrayBuffer.isView(e)) return a(e);
34
+ if (null == e) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
35
+ if (L(e, ArrayBuffer) || e && L(e.buffer, ArrayBuffer)) return function(t, e, r) {
36
+ if (e < 0 || t.byteLength < e) throw new RangeError('"offset" is outside of buffer bounds');
37
+ if (t.byteLength < e + (r || 0)) throw new RangeError('"length" is outside of buffer bounds');
38
+ var o;
39
+ return (o = void 0 === e && void 0 === r ? new Uint8Array(t) : void 0 === r ? new Uint8Array(t, e) : new Uint8Array(t, e, r)).__proto__ = n.prototype,
40
+ o;
41
+ }(e, r, o);
42
+ if ("number" == typeof e) throw new TypeError('The "value" argument must not be of type number. Received type number');
43
+ var i = e.valueOf && e.valueOf();
44
+ if (null != i && i !== e) return n.from(i, r, o);
45
+ var s = function(e) {
46
+ if (n.isBuffer(e)) {
47
+ var r = 0 | u(e.length), o = t(r);
48
+ return 0 === o.length || e.copy(o, 0, 0, r), o;
49
+ }
50
+ return void 0 !== e.length ? "number" != typeof e.length || I(e.length) ? t(0) : a(e) : "Buffer" === e.type && Array.isArray(e.data) ? a(e.data) : void 0;
51
+ }(e);
52
+ if (s) return s;
53
+ if ("undefined" != typeof Symbol && null != Symbol.toPrimitive && "function" == typeof e[Symbol.toPrimitive]) return n.from(e[Symbol.toPrimitive]("string"), r, o);
54
+ throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
55
+ }
56
+ function i(t) {
57
+ if ("number" != typeof t) throw new TypeError('"size" argument must be of type number');
58
+ if (t < 0) throw new RangeError('The value "' + t + '" is invalid for option "size"');
59
+ }
60
+ function s(e) {
61
+ return i(e), t(e < 0 ? 0 : 0 | u(e));
62
+ }
63
+ function a(e) {
64
+ for (var r = e.length < 0 ? 0 : 0 | u(e.length), n = t(r), o = 0; o < r; o += 1) n[o] = 255 & e[o];
65
+ return n;
66
+ }
67
+ function u(t) {
68
+ if (t >= 2147483647) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + 2147483647..toString(16) + " bytes");
69
+ return 0 | t;
70
+ }
71
+ function f(t, e) {
72
+ if (n.isBuffer(t)) return t.length;
73
+ if (ArrayBuffer.isView(t) || L(t, ArrayBuffer)) return t.byteLength;
74
+ if ("string" != typeof t) throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof t);
75
+ var r = t.length, o = arguments.length > 2 && !0 === arguments[2];
76
+ if (!o && 0 === r) return 0;
77
+ for (var i = !1; ;) switch (e) {
78
+ case "ascii":
79
+ case "latin1":
80
+ case "binary":
81
+ return r;
82
+
83
+ case "utf8":
84
+ case "utf-8":
85
+ return x(t).length;
86
+
87
+ case "ucs2":
88
+ case "ucs-2":
89
+ case "utf16le":
90
+ case "utf-16le":
91
+ return 2 * r;
92
+
93
+ case "hex":
94
+ return r >>> 1;
95
+
96
+ case "base64":
97
+ return P(t).length;
98
+
99
+ default:
100
+ if (i) return o ? -1 : x(t).length;
101
+ e = ("" + e).toLowerCase(), i = !0;
102
+ }
103
+ }
104
+ function c(t, e, r) {
105
+ var n = t[e];
106
+ t[e] = t[r], t[r] = n;
107
+ }
108
+ function l(t, e, r, o, i) {
109
+ if (0 === t.length) return -1;
110
+ if ("string" == typeof r ? (o = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648),
111
+ I(r = +r) && (r = i ? 0 : t.length - 1), r < 0 && (r = t.length + r),
112
+ r >= t.length) {
113
+ if (i) return -1;
114
+ r = t.length - 1;
115
+ } else if (r < 0) {
116
+ if (!i) return -1;
117
+ r = 0;
118
+ }
119
+ if ("string" == typeof e && (e = n.from(e, o)), n.isBuffer(e)) return 0 === e.length ? -1 : h(t, e, r, o, i);
120
+ if ("number" == typeof e) return e &= 255, "function" == typeof Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(t, e, r) : Uint8Array.prototype.lastIndexOf.call(t, e, r) : h(t, [ e ], r, o, i);
121
+ throw new TypeError("val must be string, number or Buffer");
122
+ }
123
+ function h(t, e, r, n, o) {
124
+ var i, s = 1, a = t.length, u = e.length;
125
+ if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) {
126
+ if (t.length < 2 || e.length < 2) return -1;
127
+ s = 2, a /= 2, u /= 2, r /= 2;
128
+ }
129
+ function f(t, e) {
130
+ return 1 === s ? t[e] : t.readUInt16BE(e * s);
131
+ }
132
+ if (o) {
133
+ var c = -1;
134
+ for (i = r; i < a; i++) if (f(t, i) === f(e, -1 === c ? 0 : i - c)) {
135
+ if (-1 === c && (c = i), i - c + 1 === u) return c * s;
136
+ } else -1 !== c && (i -= i - c), c = -1;
137
+ } else for (r + u > a && (r = a - u), i = r; i >= 0; i--) {
138
+ for (var l = !0, h = 0; h < u; h++) if (f(t, i + h) !== f(e, h)) {
139
+ l = !1;
140
+ break;
57
141
  }
142
+ if (l) return i;
143
+ }
144
+ return -1;
145
+ }
146
+ function p(t, e, r, n) {
147
+ r = Number(r) || 0;
148
+ var o = t.length - r;
149
+ n ? (n = Number(n)) > o && (n = o) : n = o;
150
+ var i = e.length;
151
+ n > i / 2 && (n = i / 2);
152
+ for (var s = 0; s < n; ++s) {
153
+ var a = parseInt(e.substr(2 * s, 2), 16);
154
+ if (I(a)) return s;
155
+ t[r + s] = a;
156
+ }
157
+ return s;
158
+ }
159
+ function d(t, e, r, n) {
160
+ return N(x(e, t.length - r), t, r, n);
161
+ }
162
+ function g(t, e, r, n) {
163
+ return N(function(t) {
164
+ for (var e = [], r = 0; r < t.length; ++r) e.push(255 & t.charCodeAt(r));
58
165
  return e;
59
- } ],
60
- timeout: 0,
61
- xsrfCookieName: "XSRF-TOKEN",
62
- xsrfHeaderName: "X-XSRF-TOKEN",
63
- maxContentLength: -1,
64
- maxBodyLength: -1,
65
- validateStatus: function(e) {
66
- return e >= 200 && e < 300;
67
- },
68
- headers: {
69
- common: {
70
- Accept: "application/json, text/plain, */*"
166
+ }(e), t, r, n);
167
+ }
168
+ function y(t, e, r, n) {
169
+ return g(t, e, r, n);
170
+ }
171
+ function v(t, e, r, n) {
172
+ return N(P(e), t, r, n);
173
+ }
174
+ function m(t, e, r, n) {
175
+ return N(function(t, e) {
176
+ for (var r, n, o, i = [], s = 0; s < t.length && !((e -= 2) < 0); ++s) n = (r = t.charCodeAt(s)) >> 8,
177
+ o = r % 256, i.push(o), i.push(n);
178
+ return i;
179
+ }(e, t.length - r), t, r, n);
180
+ }
181
+ function w(t, e, r) {
182
+ return 0 === e && r === t.length ? j.fromByteArray(t) : j.fromByteArray(t.slice(e, r));
183
+ }
184
+ function b(t, e, r) {
185
+ r = Math.min(t.length, r);
186
+ for (var n = [], o = e; o < r; ) {
187
+ var i, s, a, u, f = t[o], c = null, l = f > 239 ? 4 : f > 223 ? 3 : f > 191 ? 2 : 1;
188
+ if (o + l <= r) switch (l) {
189
+ case 1:
190
+ f < 128 && (c = f);
191
+ break;
192
+
193
+ case 2:
194
+ 128 == (192 & (i = t[o + 1])) && (u = (31 & f) << 6 | 63 & i) > 127 && (c = u);
195
+ break;
196
+
197
+ case 3:
198
+ i = t[o + 1], s = t[o + 2], 128 == (192 & i) && 128 == (192 & s) && (u = (15 & f) << 12 | (63 & i) << 6 | 63 & s) > 2047 && (u < 55296 || u > 57343) && (c = u);
199
+ break;
200
+
201
+ case 4:
202
+ i = t[o + 1], s = t[o + 2], a = t[o + 3], 128 == (192 & i) && 128 == (192 & s) && 128 == (192 & a) && (u = (15 & f) << 18 | (63 & i) << 12 | (63 & s) << 6 | 63 & a) > 65535 && u < 1114112 && (c = u);
71
203
  }
204
+ null === c ? (c = 65533, l = 1) : c > 65535 && (c -= 65536,
205
+ n.push(c >>> 10 & 1023 | 55296), c = 56320 | 1023 & c),
206
+ n.push(c), o += l;
207
+ }
208
+ return function(t) {
209
+ var e = t.length;
210
+ if (e <= E) return String.fromCharCode.apply(String, t);
211
+ for (var r = "", n = 0; n < e; ) r += String.fromCharCode.apply(String, t.slice(n, n += E));
212
+ return r;
213
+ }(n);
214
+ }
215
+ r.Buffer = n, r.INSPECT_MAX_BYTES = 50, n.TYPED_ARRAY_SUPPORT = function() {
216
+ try {
217
+ var t = new Uint8Array(1);
218
+ return t.__proto__ = {
219
+ __proto__: Uint8Array.prototype,
220
+ foo: function() {
221
+ return 42;
222
+ }
223
+ }, 42 === t.foo();
224
+ } catch (e) {
225
+ return !1;
226
+ }
227
+ }(), n.TYPED_ARRAY_SUPPORT || "undefined" == typeof console || "function" != typeof console.error || console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),
228
+ Object.defineProperty(n.prototype, "parent", {
229
+ enumerable: !0,
230
+ get: function() {
231
+ if (n.isBuffer(this)) return this.buffer;
232
+ }
233
+ }), Object.defineProperty(n.prototype, "offset", {
234
+ enumerable: !0,
235
+ get: function() {
236
+ if (n.isBuffer(this)) return this.byteOffset;
237
+ }
238
+ }), "undefined" != typeof Symbol && null != Symbol.species && n[Symbol.species] === n && Object.defineProperty(n, Symbol.species, {
239
+ value: null,
240
+ configurable: !0,
241
+ enumerable: !1,
242
+ writable: !1
243
+ }), n.poolSize = 8192, n.from = function(t, e, r) {
244
+ return o(t, e, r);
245
+ }, n.prototype.__proto__ = Uint8Array.prototype, n.__proto__ = Uint8Array,
246
+ n.alloc = function(e, r, n) {
247
+ return function(e, r, n) {
248
+ return i(e), e <= 0 ? t(e) : void 0 !== r ? "string" == typeof n ? t(e).fill(r, n) : t(e).fill(r) : t(e);
249
+ }(e, r, n);
250
+ }, n.allocUnsafe = function(t) {
251
+ return s(t);
252
+ }, n.allocUnsafeSlow = function(t) {
253
+ return s(t);
254
+ }, n.isBuffer = function(t) {
255
+ return null != t && !0 === t._isBuffer && t !== n.prototype;
256
+ }, n.compare = function(t, e) {
257
+ if (L(t, Uint8Array) && (t = n.from(t, t.offset, t.byteLength)),
258
+ L(e, Uint8Array) && (e = n.from(e, e.offset, e.byteLength)),
259
+ !n.isBuffer(t) || !n.isBuffer(e)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
260
+ if (t === e) return 0;
261
+ for (var r = t.length, o = e.length, i = 0, s = Math.min(r, o); i < s; ++i) if (t[i] !== e[i]) {
262
+ r = t[i], o = e[i];
263
+ break;
72
264
  }
265
+ return r < o ? -1 : o < r ? 1 : 0;
266
+ }, n.isEncoding = function(t) {
267
+ switch (String(t).toLowerCase()) {
268
+ case "hex":
269
+ case "utf8":
270
+ case "utf-8":
271
+ case "ascii":
272
+ case "latin1":
273
+ case "binary":
274
+ case "base64":
275
+ case "ucs2":
276
+ case "ucs-2":
277
+ case "utf16le":
278
+ case "utf-16le":
279
+ return !0;
280
+
281
+ default:
282
+ return !1;
283
+ }
284
+ }, n.concat = function(t, e) {
285
+ if (!Array.isArray(t)) throw new TypeError('"list" argument must be an Array of Buffers');
286
+ if (0 === t.length) return n.alloc(0);
287
+ var r;
288
+ if (void 0 === e) for (e = 0, r = 0; r < t.length; ++r) e += t[r].length;
289
+ var o = n.allocUnsafe(e), i = 0;
290
+ for (r = 0; r < t.length; ++r) {
291
+ var s = t[r];
292
+ if (L(s, Uint8Array) && (s = n.from(s)), !n.isBuffer(s)) throw new TypeError('"list" argument must be an Array of Buffers');
293
+ s.copy(o, i), i += s.length;
294
+ }
295
+ return o;
296
+ }, n.byteLength = f, n.prototype._isBuffer = !0, n.prototype.swap16 = function() {
297
+ var t = this.length;
298
+ if (t % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
299
+ for (var e = 0; e < t; e += 2) c(this, e, e + 1);
300
+ return this;
301
+ }, n.prototype.swap32 = function() {
302
+ var t = this.length;
303
+ if (t % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
304
+ for (var e = 0; e < t; e += 4) c(this, e, e + 3), c(this, e + 1, e + 2);
305
+ return this;
306
+ }, n.prototype.swap64 = function() {
307
+ var t = this.length;
308
+ if (t % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
309
+ for (var e = 0; e < t; e += 8) c(this, e, e + 7), c(this, e + 1, e + 6),
310
+ c(this, e + 2, e + 5), c(this, e + 3, e + 4);
311
+ return this;
312
+ }, n.prototype.toString = function() {
313
+ var t = this.length;
314
+ return 0 === t ? "" : 0 === arguments.length ? b(this, 0, t) : function(t, e, r) {
315
+ var n = !1;
316
+ if ((void 0 === e || e < 0) && (e = 0), e > this.length) return "";
317
+ if ((void 0 === r || r > this.length) && (r = this.length),
318
+ r <= 0) return "";
319
+ if ((r >>>= 0) <= (e >>>= 0)) return "";
320
+ for (t || (t = "utf8"); ;) switch (t) {
321
+ case "hex":
322
+ return S(this, e, r);
323
+
324
+ case "utf8":
325
+ case "utf-8":
326
+ return b(this, e, r);
327
+
328
+ case "ascii":
329
+ return A(this, e, r);
330
+
331
+ case "latin1":
332
+ case "binary":
333
+ return T(this, e, r);
334
+
335
+ case "base64":
336
+ return w(this, e, r);
337
+
338
+ case "ucs2":
339
+ case "ucs-2":
340
+ case "utf16le":
341
+ case "utf-16le":
342
+ return _(this, e, r);
343
+
344
+ default:
345
+ if (n) throw new TypeError("Unknown encoding: " + t);
346
+ t = (t + "").toLowerCase(), n = !0;
347
+ }
348
+ }.apply(this, arguments);
349
+ }, n.prototype.toLocaleString = n.prototype.toString, n.prototype.equals = function(t) {
350
+ if (!n.isBuffer(t)) throw new TypeError("Argument must be a Buffer");
351
+ return this === t || 0 === n.compare(this, t);
352
+ }, n.prototype.inspect = function() {
353
+ var t = "", e = r.INSPECT_MAX_BYTES;
354
+ return t = this.toString("hex", 0, e).replace(/(.{2})/g, "$1 ").trim(),
355
+ this.length > e && (t += " ... "), "<Buffer " + t + ">";
356
+ }, n.prototype.compare = function(t, e, r, o, i) {
357
+ if (L(t, Uint8Array) && (t = n.from(t, t.offset, t.byteLength)),
358
+ !n.isBuffer(t)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof t);
359
+ if (void 0 === e && (e = 0), void 0 === r && (r = t ? t.length : 0),
360
+ void 0 === o && (o = 0), void 0 === i && (i = this.length),
361
+ e < 0 || r > t.length || o < 0 || i > this.length) throw new RangeError("out of range index");
362
+ if (o >= i && e >= r) return 0;
363
+ if (o >= i) return -1;
364
+ if (e >= r) return 1;
365
+ if (this === t) return 0;
366
+ for (var s = (i >>>= 0) - (o >>>= 0), a = (r >>>= 0) - (e >>>= 0), u = Math.min(s, a), f = this.slice(o, i), c = t.slice(e, r), l = 0; l < u; ++l) if (f[l] !== c[l]) {
367
+ s = f[l], a = c[l];
368
+ break;
369
+ }
370
+ return s < a ? -1 : a < s ? 1 : 0;
371
+ }, n.prototype.includes = function(t, e, r) {
372
+ return -1 !== this.indexOf(t, e, r);
373
+ }, n.prototype.indexOf = function(t, e, r) {
374
+ return l(this, t, e, r, !0);
375
+ }, n.prototype.lastIndexOf = function(t, e, r) {
376
+ return l(this, t, e, r, !1);
377
+ }, n.prototype.write = function(t, e, r, n) {
378
+ if (void 0 === e) n = "utf8", r = this.length, e = 0; else if (void 0 === r && "string" == typeof e) n = e,
379
+ r = this.length, e = 0; else {
380
+ if (!isFinite(e)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
381
+ e >>>= 0, isFinite(r) ? (r >>>= 0, void 0 === n && (n = "utf8")) : (n = r,
382
+ r = void 0);
383
+ }
384
+ var o = this.length - e;
385
+ if ((void 0 === r || r > o) && (r = o), t.length > 0 && (r < 0 || e < 0) || e > this.length) throw new RangeError("Attempt to write outside buffer bounds");
386
+ n || (n = "utf8");
387
+ for (var i = !1; ;) switch (n) {
388
+ case "hex":
389
+ return p(this, t, e, r);
390
+
391
+ case "utf8":
392
+ case "utf-8":
393
+ return d(this, t, e, r);
394
+
395
+ case "ascii":
396
+ return g(this, t, e, r);
397
+
398
+ case "latin1":
399
+ case "binary":
400
+ return y(this, t, e, r);
401
+
402
+ case "base64":
403
+ return v(this, t, e, r);
404
+
405
+ case "ucs2":
406
+ case "ucs-2":
407
+ case "utf16le":
408
+ case "utf-16le":
409
+ return m(this, t, e, r);
410
+
411
+ default:
412
+ if (i) throw new TypeError("Unknown encoding: " + n);
413
+ n = ("" + n).toLowerCase(), i = !0;
414
+ }
415
+ }, n.prototype.toJSON = function() {
416
+ return {
417
+ type: "Buffer",
418
+ data: Array.prototype.slice.call(this._arr || this, 0)
419
+ };
73
420
  };
74
- f.forEach([ "delete", "get", "head" ], function(e) {
75
- a.headers[e] = {};
76
- }), f.forEach([ "post", "put", "patch" ], function(e) {
77
- a.headers[e] = f.merge(r);
78
- }), e.exports = a;
79
- }).call(this);
80
- }).call(this, x);
81
- }), n = e(function(e, n) {
82
- "use strict";
83
- var r = t({});
84
- e.exports = function(e) {
85
- return new Promise(function(t, n) {
86
- var o, i = e.data, a = e.headers, s = e.responseType;
87
- function u() {
88
- e.cancelToken && e.cancelToken.unsubscribe(o), e.signal && e.signal.removeEventListener("abort", o);
421
+ var E = 4096;
422
+ function A(t, e, r) {
423
+ var n = "";
424
+ r = Math.min(t.length, r);
425
+ for (var o = e; o < r; ++o) n += String.fromCharCode(127 & t[o]);
426
+ return n;
89
427
  }
90
- f.isFormData(i) && delete a["Content-Type"];
91
- var c = new XMLHttpRequest();
92
- if (e.auth) {
93
- var l = e.auth.username || "", d = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
94
- a.Authorization = "Basic " + btoa(l + ":" + d);
428
+ function T(t, e, r) {
429
+ var n = "";
430
+ r = Math.min(t.length, r);
431
+ for (var o = e; o < r; ++o) n += String.fromCharCode(t[o]);
432
+ return n;
95
433
  }
96
- var h = w(e.baseURL, e.url);
97
- function g() {
98
- if (c) {
99
- var r = "getAllResponseHeaders" in c ? T(c.getAllResponseHeaders()) : null, o = {
100
- data: s && "text" !== s && "json" !== s ? c.response : c.responseText,
101
- status: c.status,
102
- statusText: c.statusText,
103
- headers: r,
104
- config: e,
105
- request: c
106
- };
107
- y(function(e) {
108
- t(e), u();
109
- }, function(e) {
110
- n(e), u();
111
- }, o), c = null;
434
+ function S(t, e, r) {
435
+ var n, o = t.length;
436
+ (!e || e < 0) && (e = 0), (!r || r < 0 || r > o) && (r = o);
437
+ for (var i = "", s = e; s < r; ++s) i += (n = t[s]) < 16 ? "0" + n.toString(16) : n.toString(16);
438
+ return i;
439
+ }
440
+ function _(t, e, r) {
441
+ for (var n = t.slice(e, r), o = "", i = 0; i < n.length; i += 2) o += String.fromCharCode(n[i] + 256 * n[i + 1]);
442
+ return o;
443
+ }
444
+ function R(t, e, r) {
445
+ if (t % 1 != 0 || t < 0) throw new RangeError("offset is not uint");
446
+ if (t + e > r) throw new RangeError("Trying to access beyond buffer length");
447
+ }
448
+ function O(t, e, r, o, i, s) {
449
+ if (!n.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance');
450
+ if (e > i || e < s) throw new RangeError('"value" argument is out of bounds');
451
+ if (r + o > t.length) throw new RangeError("Index out of range");
452
+ }
453
+ function C(t, e, r, n, o, i) {
454
+ if (r + n > t.length) throw new RangeError("Index out of range");
455
+ if (r < 0) throw new RangeError("Index out of range");
456
+ }
457
+ function B(t, e, r, n, o) {
458
+ return e = +e, r >>>= 0, o || C(t, 0, r, 4), q.write(t, e, r, n, 23, 4),
459
+ r + 4;
460
+ }
461
+ function U(t, e, r, n, o) {
462
+ return e = +e, r >>>= 0, o || C(t, 0, r, 8), q.write(t, e, r, n, 52, 8),
463
+ r + 8;
464
+ }
465
+ n.prototype.slice = function(t, e) {
466
+ var r = this.length;
467
+ (t = ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r),
468
+ (e = void 0 === e ? r : ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r),
469
+ e < t && (e = t);
470
+ var o = this.subarray(t, e);
471
+ return o.__proto__ = n.prototype, o;
472
+ }, n.prototype.readUIntLE = function(t, e, r) {
473
+ t >>>= 0, e >>>= 0, r || R(t, e, this.length);
474
+ for (var n = this[t], o = 1, i = 0; ++i < e && (o *= 256); ) n += this[t + i] * o;
475
+ return n;
476
+ }, n.prototype.readUIntBE = function(t, e, r) {
477
+ t >>>= 0, e >>>= 0, r || R(t, e, this.length);
478
+ for (var n = this[t + --e], o = 1; e > 0 && (o *= 256); ) n += this[t + --e] * o;
479
+ return n;
480
+ }, n.prototype.readUInt8 = function(t, e) {
481
+ return t >>>= 0, e || R(t, 1, this.length), this[t];
482
+ }, n.prototype.readUInt16LE = function(t, e) {
483
+ return t >>>= 0, e || R(t, 2, this.length), this[t] | this[t + 1] << 8;
484
+ }, n.prototype.readUInt16BE = function(t, e) {
485
+ return t >>>= 0, e || R(t, 2, this.length), this[t] << 8 | this[t + 1];
486
+ }, n.prototype.readUInt32LE = function(t, e) {
487
+ return t >>>= 0, e || R(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + 16777216 * this[t + 3];
488
+ }, n.prototype.readUInt32BE = function(t, e) {
489
+ return t >>>= 0, e || R(t, 4, this.length), 16777216 * this[t] + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
490
+ }, n.prototype.readIntLE = function(t, e, r) {
491
+ t >>>= 0, e >>>= 0, r || R(t, e, this.length);
492
+ for (var n = this[t], o = 1, i = 0; ++i < e && (o *= 256); ) n += this[t + i] * o;
493
+ return n >= (o *= 128) && (n -= Math.pow(2, 8 * e)), n;
494
+ }, n.prototype.readIntBE = function(t, e, r) {
495
+ t >>>= 0, e >>>= 0, r || R(t, e, this.length);
496
+ for (var n = e, o = 1, i = this[t + --n]; n > 0 && (o *= 256); ) i += this[t + --n] * o;
497
+ return i >= (o *= 128) && (i -= Math.pow(2, 8 * e)), i;
498
+ }, n.prototype.readInt8 = function(t, e) {
499
+ return t >>>= 0, e || R(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t];
500
+ }, n.prototype.readInt16LE = function(t, e) {
501
+ t >>>= 0, e || R(t, 2, this.length);
502
+ var r = this[t] | this[t + 1] << 8;
503
+ return 32768 & r ? 4294901760 | r : r;
504
+ }, n.prototype.readInt16BE = function(t, e) {
505
+ t >>>= 0, e || R(t, 2, this.length);
506
+ var r = this[t + 1] | this[t] << 8;
507
+ return 32768 & r ? 4294901760 | r : r;
508
+ }, n.prototype.readInt32LE = function(t, e) {
509
+ return t >>>= 0, e || R(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
510
+ }, n.prototype.readInt32BE = function(t, e) {
511
+ return t >>>= 0, e || R(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];
512
+ }, n.prototype.readFloatLE = function(t, e) {
513
+ return t >>>= 0, e || R(t, 4, this.length), q.read(this, t, !0, 23, 4);
514
+ }, n.prototype.readFloatBE = function(t, e) {
515
+ return t >>>= 0, e || R(t, 4, this.length), q.read(this, t, !1, 23, 4);
516
+ }, n.prototype.readDoubleLE = function(t, e) {
517
+ return t >>>= 0, e || R(t, 8, this.length), q.read(this, t, !0, 52, 8);
518
+ }, n.prototype.readDoubleBE = function(t, e) {
519
+ return t >>>= 0, e || R(t, 8, this.length), q.read(this, t, !1, 52, 8);
520
+ }, n.prototype.writeUIntLE = function(t, e, r, n) {
521
+ t = +t, e >>>= 0, r >>>= 0, n || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0);
522
+ var o = 1, i = 0;
523
+ for (this[e] = 255 & t; ++i < r && (o *= 256); ) this[e + i] = t / o & 255;
524
+ return e + r;
525
+ }, n.prototype.writeUIntBE = function(t, e, r, n) {
526
+ t = +t, e >>>= 0, r >>>= 0, n || O(this, t, e, r, Math.pow(2, 8 * r) - 1, 0);
527
+ var o = r - 1, i = 1;
528
+ for (this[e + o] = 255 & t; --o >= 0 && (i *= 256); ) this[e + o] = t / i & 255;
529
+ return e + r;
530
+ }, n.prototype.writeUInt8 = function(t, e, r) {
531
+ return t = +t, e >>>= 0, r || O(this, t, e, 1, 255, 0),
532
+ this[e] = 255 & t, e + 1;
533
+ }, n.prototype.writeUInt16LE = function(t, e, r) {
534
+ return t = +t, e >>>= 0, r || O(this, t, e, 2, 65535, 0),
535
+ this[e] = 255 & t, this[e + 1] = t >>> 8, e + 2;
536
+ }, n.prototype.writeUInt16BE = function(t, e, r) {
537
+ return t = +t, e >>>= 0, r || O(this, t, e, 2, 65535, 0),
538
+ this[e] = t >>> 8, this[e + 1] = 255 & t, e + 2;
539
+ }, n.prototype.writeUInt32LE = function(t, e, r) {
540
+ return t = +t, e >>>= 0, r || O(this, t, e, 4, 4294967295, 0),
541
+ this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8,
542
+ this[e] = 255 & t, e + 4;
543
+ }, n.prototype.writeUInt32BE = function(t, e, r) {
544
+ return t = +t, e >>>= 0, r || O(this, t, e, 4, 4294967295, 0),
545
+ this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8,
546
+ this[e + 3] = 255 & t, e + 4;
547
+ }, n.prototype.writeIntLE = function(t, e, r, n) {
548
+ if (t = +t, e >>>= 0, !n) {
549
+ var o = Math.pow(2, 8 * r - 1);
550
+ O(this, t, e, r, o - 1, -o);
112
551
  }
552
+ var i = 0, s = 1, a = 0;
553
+ for (this[e] = 255 & t; ++i < r && (s *= 256); ) t < 0 && 0 === a && 0 !== this[e + i - 1] && (a = 1),
554
+ this[e + i] = (t / s >> 0) - a & 255;
555
+ return e + r;
556
+ }, n.prototype.writeIntBE = function(t, e, r, n) {
557
+ if (t = +t, e >>>= 0, !n) {
558
+ var o = Math.pow(2, 8 * r - 1);
559
+ O(this, t, e, r, o - 1, -o);
560
+ }
561
+ var i = r - 1, s = 1, a = 0;
562
+ for (this[e + i] = 255 & t; --i >= 0 && (s *= 256); ) t < 0 && 0 === a && 0 !== this[e + i + 1] && (a = 1),
563
+ this[e + i] = (t / s >> 0) - a & 255;
564
+ return e + r;
565
+ }, n.prototype.writeInt8 = function(t, e, r) {
566
+ return t = +t, e >>>= 0, r || O(this, t, e, 1, 127, -128),
567
+ t < 0 && (t = 255 + t + 1), this[e] = 255 & t, e + 1;
568
+ }, n.prototype.writeInt16LE = function(t, e, r) {
569
+ return t = +t, e >>>= 0, r || O(this, t, e, 2, 32767, -32768),
570
+ this[e] = 255 & t, this[e + 1] = t >>> 8, e + 2;
571
+ }, n.prototype.writeInt16BE = function(t, e, r) {
572
+ return t = +t, e >>>= 0, r || O(this, t, e, 2, 32767, -32768),
573
+ this[e] = t >>> 8, this[e + 1] = 255 & t, e + 2;
574
+ }, n.prototype.writeInt32LE = function(t, e, r) {
575
+ return t = +t, e >>>= 0, r || O(this, t, e, 4, 2147483647, -2147483648),
576
+ this[e] = 255 & t, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16,
577
+ this[e + 3] = t >>> 24, e + 4;
578
+ }, n.prototype.writeInt32BE = function(t, e, r) {
579
+ return t = +t, e >>>= 0, r || O(this, t, e, 4, 2147483647, -2147483648),
580
+ t < 0 && (t = 4294967295 + t + 1), this[e] = t >>> 24, this[e + 1] = t >>> 16,
581
+ this[e + 2] = t >>> 8, this[e + 3] = 255 & t, e + 4;
582
+ }, n.prototype.writeFloatLE = function(t, e, r) {
583
+ return B(this, t, e, !0, r);
584
+ }, n.prototype.writeFloatBE = function(t, e, r) {
585
+ return B(this, t, e, !1, r);
586
+ }, n.prototype.writeDoubleLE = function(t, e, r) {
587
+ return U(this, t, e, !0, r);
588
+ }, n.prototype.writeDoubleBE = function(t, e, r) {
589
+ return U(this, t, e, !1, r);
590
+ }, n.prototype.copy = function(t, e, r, o) {
591
+ if (!n.isBuffer(t)) throw new TypeError("argument should be a Buffer");
592
+ if (r || (r = 0), o || 0 === o || (o = this.length), e >= t.length && (e = t.length),
593
+ e || (e = 0), o > 0 && o < r && (o = r), o === r) return 0;
594
+ if (0 === t.length || 0 === this.length) return 0;
595
+ if (e < 0) throw new RangeError("targetStart out of bounds");
596
+ if (r < 0 || r >= this.length) throw new RangeError("Index out of range");
597
+ if (o < 0) throw new RangeError("sourceEnd out of bounds");
598
+ o > this.length && (o = this.length), t.length - e < o - r && (o = t.length - e + r);
599
+ var i = o - r;
600
+ if (this === t && "function" == typeof Uint8Array.prototype.copyWithin) this.copyWithin(e, r, o); else if (this === t && r < e && e < o) for (var s = i - 1; s >= 0; --s) t[s + e] = this[s + r]; else Uint8Array.prototype.set.call(t, this.subarray(r, o), e);
601
+ return i;
602
+ }, n.prototype.fill = function(t, e, r, o) {
603
+ if ("string" == typeof t) {
604
+ if ("string" == typeof e ? (o = e, e = 0, r = this.length) : "string" == typeof r && (o = r,
605
+ r = this.length), void 0 !== o && "string" != typeof o) throw new TypeError("encoding must be a string");
606
+ if ("string" == typeof o && !n.isEncoding(o)) throw new TypeError("Unknown encoding: " + o);
607
+ if (1 === t.length) {
608
+ var i = t.charCodeAt(0);
609
+ ("utf8" === o && i < 128 || "latin1" === o) && (t = i);
610
+ }
611
+ } else "number" == typeof t && (t &= 255);
612
+ if (e < 0 || this.length < e || this.length < r) throw new RangeError("Out of range index");
613
+ if (r <= e) return this;
614
+ var s;
615
+ if (e >>>= 0, r = void 0 === r ? this.length : r >>> 0,
616
+ t || (t = 0), "number" == typeof t) for (s = e; s < r; ++s) this[s] = t; else {
617
+ var a = n.isBuffer(t) ? t : n.from(t, o), u = a.length;
618
+ if (0 === u) throw new TypeError('The value "' + t + '" is invalid for argument "value"');
619
+ for (s = 0; s < r - e; ++s) this[s + e] = a[s % u];
620
+ }
621
+ return this;
622
+ };
623
+ var k = /[^+/0-9A-Za-z-_]/g;
624
+ function x(t, e) {
625
+ var r;
626
+ e = e || 1 / 0;
627
+ for (var n = t.length, o = null, i = [], s = 0; s < n; ++s) {
628
+ if ((r = t.charCodeAt(s)) > 55295 && r < 57344) {
629
+ if (!o) {
630
+ if (r > 56319) {
631
+ (e -= 3) > -1 && i.push(239, 191, 189);
632
+ continue;
633
+ }
634
+ if (s + 1 === n) {
635
+ (e -= 3) > -1 && i.push(239, 191, 189);
636
+ continue;
637
+ }
638
+ o = r;
639
+ continue;
640
+ }
641
+ if (r < 56320) {
642
+ (e -= 3) > -1 && i.push(239, 191, 189), o = r;
643
+ continue;
644
+ }
645
+ r = 65536 + (o - 55296 << 10 | r - 56320);
646
+ } else o && (e -= 3) > -1 && i.push(239, 191, 189);
647
+ if (o = null, r < 128) {
648
+ if ((e -= 1) < 0) break;
649
+ i.push(r);
650
+ } else if (r < 2048) {
651
+ if ((e -= 2) < 0) break;
652
+ i.push(r >> 6 | 192, 63 & r | 128);
653
+ } else if (r < 65536) {
654
+ if ((e -= 3) < 0) break;
655
+ i.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128);
656
+ } else {
657
+ if (!(r < 1114112)) throw new Error("Invalid code point");
658
+ if ((e -= 4) < 0) break;
659
+ i.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128);
660
+ }
661
+ }
662
+ return i;
113
663
  }
114
- if (c.open(e.method.toUpperCase(), p(h, e.params, e.paramsSerializer), !0), c.timeout = e.timeout,
115
- "onloadend" in c ? c.onloadend = g : c.onreadystatechange = function() {
116
- c && 4 === c.readyState && (0 !== c.status || c.responseURL && 0 === c.responseURL.indexOf("file:")) && setTimeout(g);
117
- }, c.onabort = function() {
118
- c && (n(v("Request aborted", e, "ECONNABORTED", c)), c = null);
119
- }, c.onerror = function() {
120
- n(v("Network Error", e, null, c)), c = null;
121
- }, c.ontimeout = function() {
122
- var t = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded", o = e.transitional || r.transitional;
123
- e.timeoutErrorMessage && (t = e.timeoutErrorMessage), n(v(t, e, o.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", c)),
124
- c = null;
125
- }, f.isStandardBrowserEnv()) {
126
- var m = (e.withCredentials || k(h)) && e.xsrfCookieName ? b.read(e.xsrfCookieName) : void 0;
127
- m && (a[e.xsrfHeaderName] = m);
664
+ function P(t) {
665
+ return j.toByteArray(function(t) {
666
+ if ((t = (t = t.split("=")[0]).trim().replace(k, "")).length < 2) return "";
667
+ for (;t.length % 4 != 0; ) t += "=";
668
+ return t;
669
+ }(t));
128
670
  }
129
- "setRequestHeader" in c && f.forEach(a, function(e, t) {
130
- void 0 === i && "content-type" === t.toLowerCase() ? delete a[t] : c.setRequestHeader(t, e);
131
- }), f.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials),
132
- s && "json" !== s && (c.responseType = e.responseType), "function" == typeof e.onDownloadProgress && c.addEventListener("progress", e.onDownloadProgress),
133
- "function" == typeof e.onUploadProgress && c.upload && c.upload.addEventListener("progress", e.onUploadProgress),
134
- (e.cancelToken || e.signal) && (o = function(e) {
135
- c && (n(!e || e && e.type ? new C("canceled") : e), c.abort(), c = null);
136
- }, e.cancelToken && e.cancelToken.subscribe(o), e.signal && (e.signal.aborted ? o() : e.signal.addEventListener("abort", o))),
137
- i || (i = null), c.send(i);
138
- });
139
- };
140
- }), r = function(e, t) {
671
+ function N(t, e, r, n) {
672
+ for (var o = 0; o < n && !(o + r >= e.length || o >= t.length); ++o) e[o + r] = t[o];
673
+ return o;
674
+ }
675
+ function L(t, e) {
676
+ return t instanceof e || null != t && null != t.constructor && null != t.constructor.name && t.constructor.name === e.name;
677
+ }
678
+ function I(t) {
679
+ return t != t;
680
+ }
681
+ }).call(this);
682
+ }).call(this, n({}).Buffer);
683
+ }, function(r) {
684
+ return e || t(e = {
685
+ exports: {},
686
+ parent: r
687
+ }, e.exports), e.exports;
688
+ }), o = function(t, e) {
141
689
  return function() {
142
- for (var n = new Array(arguments.length), r = 0; r < n.length; r++) n[r] = arguments[r];
143
- return e.apply(t, n);
690
+ for (var r = new Array(arguments.length), n = 0; n < r.length; n++) r[n] = arguments[n];
691
+ return t.apply(e, r);
692
+ };
693
+ }, i = Object.prototype.toString, s = (r = Object.create(null), function(t) {
694
+ var e = i.call(t);
695
+ return r[e] || (r[e] = e.slice(8, -1).toLowerCase());
696
+ });
697
+ function a(t) {
698
+ return t = t.toLowerCase(), function(e) {
699
+ return s(e) === t;
144
700
  };
145
- }, o = Object.prototype.toString;
146
- function i(e) {
147
- return "[object Array]" === o.call(e);
148
701
  }
149
- function a(e) {
150
- return void 0 === e;
702
+ function u(t) {
703
+ return Array.isArray(t);
151
704
  }
152
- function s(e) {
153
- return null !== e && "object" == typeof e;
705
+ function f(t) {
706
+ return void 0 === t;
154
707
  }
155
- function u(e) {
156
- if ("[object Object]" !== o.call(e)) return !1;
157
- var t = Object.getPrototypeOf(e);
158
- return null === t || t === Object.prototype;
708
+ var c = a("ArrayBuffer");
709
+ function l(t) {
710
+ return null !== t && "object" == typeof t;
159
711
  }
160
- function c(e, t) {
161
- if (null != e) if ("object" != typeof e && (e = [ e ]), i(e)) for (var n = 0, r = e.length; n < r; n++) t.call(null, e[n], n, e); else for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.call(null, e[o], o, e);
712
+ function h(t) {
713
+ if ("object" !== s(t)) return !1;
714
+ var e = Object.getPrototypeOf(t);
715
+ return null === e || e === Object.prototype;
162
716
  }
163
- var f = {
164
- isArray: i,
165
- isArrayBuffer: function(e) {
166
- return "[object ArrayBuffer]" === o.call(e);
717
+ var p = a("Date"), d = a("File"), g = a("Blob"), y = a("FileList");
718
+ function v(t) {
719
+ return "[object Function]" === i.call(t);
720
+ }
721
+ var m = a("URLSearchParams");
722
+ function w(t, e) {
723
+ if (null != t) if ("object" != typeof t && (t = [ t ]), u(t)) for (var r = 0, n = t.length; r < n; r++) e.call(null, t[r], r, t); else for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && e.call(null, t[o], o, t);
724
+ }
725
+ var b, E = (b = "undefined" != typeof Uint8Array && Object.getPrototypeOf(Uint8Array),
726
+ function(t) {
727
+ return b && t instanceof b;
728
+ }), A = {
729
+ isArray: u,
730
+ isArrayBuffer: c,
731
+ isBuffer: function(t) {
732
+ return null !== t && !f(t) && null !== t.constructor && !f(t.constructor) && "function" == typeof t.constructor.isBuffer && t.constructor.isBuffer(t);
167
733
  },
168
- isBuffer: function(e) {
169
- return null !== e && !a(e) && null !== e.constructor && !a(e.constructor) && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e);
734
+ isFormData: function(t) {
735
+ return t && ("function" == typeof FormData && t instanceof FormData || "[object FormData]" === i.call(t) || v(t.toString) && "[object FormData]" === t.toString());
170
736
  },
171
- isFormData: function(e) {
172
- return "undefined" != typeof FormData && e instanceof FormData;
737
+ isArrayBufferView: function(t) {
738
+ return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(t) : t && t.buffer && c(t.buffer);
173
739
  },
174
- isArrayBufferView: function(e) {
175
- return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && e.buffer instanceof ArrayBuffer;
740
+ isString: function(t) {
741
+ return "string" == typeof t;
176
742
  },
177
- isString: function(e) {
178
- return "string" == typeof e;
743
+ isNumber: function(t) {
744
+ return "number" == typeof t;
179
745
  },
180
- isNumber: function(e) {
181
- return "number" == typeof e;
746
+ isObject: l,
747
+ isPlainObject: h,
748
+ isUndefined: f,
749
+ isDate: p,
750
+ isFile: d,
751
+ isBlob: g,
752
+ isStream: function(t) {
753
+ return l(t) && v(t.pipe);
182
754
  },
183
- isObject: s,
184
- isPlainObject: u,
185
- isUndefined: a,
186
- isDate: function(e) {
187
- return "[object Date]" === o.call(e);
755
+ isURLSearchParams: m,
756
+ isStandardBrowserEnv: function() {
757
+ return ("undefined" == typeof navigator || "ReactNative" !== navigator.product && "NativeScript" !== navigator.product && "NS" !== navigator.product) && "undefined" != typeof window && "undefined" != typeof document;
188
758
  },
189
- isFile: function(e) {
190
- return "[object File]" === o.call(e);
759
+ forEach: w,
760
+ merge: function t() {
761
+ var e = {};
762
+ function r(r, n) {
763
+ h(e[n]) && h(r) ? e[n] = t(e[n], r) : h(r) ? e[n] = t({}, r) : u(r) ? e[n] = r.slice() : e[n] = r;
764
+ }
765
+ for (var n = 0, o = arguments.length; n < o; n++) w(arguments[n], r);
766
+ return e;
191
767
  },
192
- isBlob: function(e) {
193
- return "[object Blob]" === o.call(e);
768
+ extend: function(t, e, r) {
769
+ return w(e, function(e, n) {
770
+ t[n] = r && "function" == typeof e ? o(e, r) : e;
771
+ }), t;
194
772
  },
195
- isStream: function(e) {
196
- return s(e) && function(e) {
197
- return "[object Function]" === o.call(e);
198
- }(e.pipe);
773
+ trim: function(t) {
774
+ return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "");
199
775
  },
200
- isURLSearchParams: function(e) {
201
- return "undefined" != typeof URLSearchParams && e instanceof URLSearchParams;
776
+ inherits: function(t, e, r, n) {
777
+ t.prototype = Object.create(e.prototype, n), t.prototype.constructor = t,
778
+ r && Object.assign(t.prototype, r);
202
779
  },
203
- isStandardBrowserEnv: function() {
204
- return ("undefined" == typeof navigator || "ReactNative" !== navigator.product && "NativeScript" !== navigator.product && "NS" !== navigator.product) && "undefined" != typeof window && "undefined" != typeof document;
780
+ toFlatObject: function(t, e, r) {
781
+ var n, o, i, s = {};
782
+ e = e || {};
783
+ do {
784
+ for (o = (n = Object.getOwnPropertyNames(t)).length; o-- > 0; ) s[i = n[o]] || (e[i] = t[i],
785
+ s[i] = !0);
786
+ t = Object.getPrototypeOf(t);
787
+ } while (t && (!r || r(t, e)) && t !== Object.prototype);
788
+ return e;
205
789
  },
206
- forEach: c,
207
- merge: function e() {
208
- var t = {};
209
- function n(n, r) {
210
- u(t[r]) && u(n) ? t[r] = e(t[r], n) : u(n) ? t[r] = e({}, n) : i(n) ? t[r] = n.slice() : t[r] = n;
211
- }
212
- for (var r = 0, o = arguments.length; r < o; r++) c(arguments[r], n);
213
- return t;
790
+ endsWith: function(t, e, r) {
791
+ t = String(t), (void 0 === r || r > t.length) && (r = t.length),
792
+ r -= e.length;
793
+ var n = t.indexOf(e, r);
794
+ return -1 !== n && n === r;
214
795
  },
215
- extend: function(e, t, n) {
216
- return c(t, function(t, o) {
217
- e[o] = n && "function" == typeof t ? r(t, n) : t;
218
- }), e;
796
+ toArray: function(t) {
797
+ if (!t) return null;
798
+ var e = t.length;
799
+ if (f(e)) return null;
800
+ for (var r = new Array(e); e-- > 0; ) r[e] = t[e];
801
+ return r;
219
802
  },
220
- trim: function(e) {
221
- return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");
222
- }
803
+ isTypedArray: E,
804
+ isFileList: y
223
805
  };
224
- function l(e) {
225
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
806
+ function T(t) {
807
+ return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
226
808
  }
227
- var p = function(e, t, n) {
228
- if (!t) return e;
229
- var r;
230
- if (n) r = n(t); else if (f.isURLSearchParams(t)) r = t.toString(); else {
809
+ var S = function(t, e, r) {
810
+ if (!e) return t;
811
+ var n;
812
+ if (r) n = r(e); else if (A.isURLSearchParams(e)) n = e.toString(); else {
231
813
  var o = [];
232
- f.forEach(t, function(e, t) {
233
- null != e && (f.isArray(e) ? t += "[]" : e = [ e ], f.forEach(e, function(e) {
234
- f.isDate(e) ? e = e.toISOString() : f.isObject(e) && (e = JSON.stringify(e)), o.push(l(t) + "=" + l(e));
814
+ A.forEach(e, function(t, e) {
815
+ null != t && (A.isArray(t) ? e += "[]" : t = [ t ], A.forEach(t, function(t) {
816
+ A.isDate(t) ? t = t.toISOString() : A.isObject(t) && (t = JSON.stringify(t)),
817
+ o.push(T(e) + "=" + T(t));
235
818
  }));
236
- }), r = o.join("&");
819
+ }), n = o.join("&");
237
820
  }
238
- if (r) {
239
- var i = e.indexOf("#");
240
- -1 !== i && (e = e.slice(0, i)), e += (-1 === e.indexOf("?") ? "?" : "&") + r;
821
+ if (n) {
822
+ var i = t.indexOf("#");
823
+ -1 !== i && (t = t.slice(0, i)), t += (-1 === t.indexOf("?") ? "?" : "&") + n;
241
824
  }
242
- return e;
243
- }, d = {};
244
- function h() {
825
+ return t;
826
+ }, _ = {};
827
+ function R() {
245
828
  this.handlers = [];
246
829
  }
247
- h.prototype.use = function(e, t, n) {
830
+ R.prototype.use = function(t, e, r) {
248
831
  return this.handlers.push({
249
- fulfilled: e,
250
- rejected: t,
251
- synchronous: !!n && n.synchronous,
252
- runWhen: n ? n.runWhen : null
832
+ fulfilled: t,
833
+ rejected: e,
834
+ synchronous: !!r && r.synchronous,
835
+ runWhen: r ? r.runWhen : null
253
836
  }), this.handlers.length - 1;
254
- }, h.prototype.eject = function(e) {
255
- this.handlers[e] && (this.handlers[e] = null);
256
- }, h.prototype.forEach = function(e) {
257
- f.forEach(this.handlers, function(t) {
258
- null !== t && e(t);
837
+ }, R.prototype.eject = function(t) {
838
+ this.handlers[t] && (this.handlers[t] = null);
839
+ }, R.prototype.forEach = function(t) {
840
+ A.forEach(this.handlers, function(e) {
841
+ null !== e && t(e);
259
842
  });
260
- }, d = h;
261
- var g = function(e, t) {
262
- f.forEach(e, function(n, r) {
263
- r !== t && r.toUpperCase() === t.toUpperCase() && (e[t] = n, delete e[r]);
843
+ }, _ = R;
844
+ var O = function(t, e) {
845
+ A.forEach(t, function(r, n) {
846
+ n !== e && n.toUpperCase() === e.toUpperCase() && (t[e] = r, delete t[n]);
264
847
  });
265
- }, m = function(e, t, n, r, o) {
266
- return e.config = t, n && (e.code = n), e.request = r, e.response = o, e.isAxiosError = !0,
267
- e.toJSON = function() {
848
+ }, C = {};
849
+ function B(t, e, r, n, o) {
850
+ Error.call(this), this.message = t, this.name = "AxiosError", e && (this.code = e),
851
+ r && (this.config = r), n && (this.request = n), o && (this.response = o);
852
+ }
853
+ A.inherits(B, Error, {
854
+ toJSON: function() {
268
855
  return {
269
856
  message: this.message,
270
857
  name: this.name,
@@ -278,26 +865,121 @@
278
865
  code: this.code,
279
866
  status: this.response && this.response.status ? this.response.status : null
280
867
  };
281
- }, e;
282
- }, v = function(e, t, n, r, o) {
283
- var i = new Error(e);
284
- return m(i, t, n, r, o);
285
- }, y = function(e, t, n) {
286
- var r = n.config.validateStatus;
287
- n.status && r && !r(n.status) ? t(v("Request failed with status code " + n.status, n.config, null, n.request, n)) : e(n);
288
- }, b = f.isStandardBrowserEnv() ? {
289
- write: function(e, t, n, r, o, i) {
290
- var a = [];
291
- a.push(e + "=" + encodeURIComponent(t)), f.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()),
292
- f.isString(r) && a.push("path=" + r), f.isString(o) && a.push("domain=" + o), !0 === i && a.push("secure"),
293
- document.cookie = a.join("; ");
868
+ }
869
+ });
870
+ var U = B.prototype, k = {};
871
+ [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED" ].forEach(function(t) {
872
+ k[t] = {
873
+ value: t
874
+ };
875
+ }), Object.defineProperties(B, k), Object.defineProperty(U, "isAxiosError", {
876
+ value: !0
877
+ }), B.from = function(t, e, r, n, o, i) {
878
+ var s = Object.create(U);
879
+ return A.toFlatObject(t, s, function(t) {
880
+ return t !== Error.prototype;
881
+ }), B.call(s, t.message, e, r, n, o), s.name = t.name, i && Object.assign(s, i),
882
+ s;
883
+ }, C = B;
884
+ for (var x = {
885
+ silentJSONParsing: !0,
886
+ forcedJSONParsing: !0,
887
+ clarifyTimeoutError: !1
888
+ }, j = {
889
+ toByteArray: function(t) {
890
+ var e, r, n = F(t), o = n[0], i = n[1], s = new L(function(t, e, r) {
891
+ return 3 * (e + r) / 4 - r;
892
+ }(0, o, i)), a = 0, u = i > 0 ? o - 4 : o;
893
+ for (r = 0; r < u; r += 4) e = N[t.charCodeAt(r)] << 18 | N[t.charCodeAt(r + 1)] << 12 | N[t.charCodeAt(r + 2)] << 6 | N[t.charCodeAt(r + 3)],
894
+ s[a++] = e >> 16 & 255, s[a++] = e >> 8 & 255, s[a++] = 255 & e;
895
+ return 2 === i && (e = N[t.charCodeAt(r)] << 2 | N[t.charCodeAt(r + 1)] >> 4,
896
+ s[a++] = 255 & e), 1 === i && (e = N[t.charCodeAt(r)] << 10 | N[t.charCodeAt(r + 1)] << 4 | N[t.charCodeAt(r + 2)] >> 2,
897
+ s[a++] = e >> 8 & 255, s[a++] = 255 & e), s;
294
898
  },
295
- read: function(e) {
296
- var t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
297
- return t ? decodeURIComponent(t[3]) : null;
899
+ fromByteArray: function(t) {
900
+ for (var e, r = t.length, n = r % 3, o = [], i = 0, s = r - n; i < s; i += 16383) o.push(z(t, i, i + 16383 > s ? s : i + 16383));
901
+ return 1 === n ? (e = t[r - 1], o.push(P[e >> 2] + P[e << 4 & 63] + "==")) : 2 === n && (e = (t[r - 2] << 8) + t[r - 1],
902
+ o.push(P[e >> 10] + P[e >> 4 & 63] + P[e << 2 & 63] + "=")), o.join("");
903
+ }
904
+ }, P = [], N = [], L = "undefined" != typeof Uint8Array ? Uint8Array : Array, I = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", D = 0, M = I.length; D < M; ++D) P[D] = I[D],
905
+ N[I.charCodeAt(D)] = D;
906
+ function F(t) {
907
+ var e = t.length;
908
+ if (e % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
909
+ var r = t.indexOf("=");
910
+ return -1 === r && (r = e), [ r, r === e ? 0 : 4 - r % 4 ];
911
+ }
912
+ function z(t, e, r) {
913
+ for (var n, o, i = [], s = e; s < r; s += 3) n = (t[s] << 16 & 16711680) + (t[s + 1] << 8 & 65280) + (255 & t[s + 2]),
914
+ i.push(P[(o = n) >> 18 & 63] + P[o >> 12 & 63] + P[o >> 6 & 63] + P[63 & o]);
915
+ return i.join("");
916
+ }
917
+ N["-".charCodeAt(0)] = 62, N["_".charCodeAt(0)] = 63;
918
+ var q = {
919
+ read: function(t, e, r, n, o) {
920
+ var i, s, a = 8 * o - n - 1, u = (1 << a) - 1, f = u >> 1, c = -7, l = r ? o - 1 : 0, h = r ? -1 : 1, p = t[e + l];
921
+ for (l += h, i = p & (1 << -c) - 1, p >>= -c, c += a; c > 0; i = 256 * i + t[e + l],
922
+ l += h, c -= 8);
923
+ for (s = i & (1 << -c) - 1, i >>= -c, c += n; c > 0; s = 256 * s + t[e + l],
924
+ l += h, c -= 8);
925
+ if (0 === i) i = 1 - f; else {
926
+ if (i === u) return s ? NaN : 1 / 0 * (p ? -1 : 1);
927
+ s += Math.pow(2, n), i -= f;
928
+ }
929
+ return (p ? -1 : 1) * s * Math.pow(2, i - n);
298
930
  },
299
- remove: function(e) {
300
- this.write(e, "", Date.now() - 864e5);
931
+ write: function(t, e, r, n, o, i) {
932
+ var s, a, u, f = 8 * i - o - 1, c = (1 << f) - 1, l = c >> 1, h = 23 === o ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : i - 1, d = n ? 1 : -1, g = e < 0 || 0 === e && 1 / e < 0 ? 1 : 0;
933
+ for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (a = isNaN(e) ? 1 : 0,
934
+ s = c) : (s = Math.floor(Math.log(e) / Math.LN2), e * (u = Math.pow(2, -s)) < 1 && (s--,
935
+ u *= 2), (e += s + l >= 1 ? h / u : h * Math.pow(2, 1 - l)) * u >= 2 && (s++,
936
+ u /= 2), s + l >= c ? (a = 0, s = c) : s + l >= 1 ? (a = (e * u - 1) * Math.pow(2, o),
937
+ s += l) : (a = e * Math.pow(2, l - 1) * Math.pow(2, o), s = 0)); o >= 8; t[r + p] = 255 & a,
938
+ p += d, a /= 256, o -= 8);
939
+ for (s = s << o | a, f += o; f > 0; t[r + p] = 255 & s, p += d,
940
+ s /= 256, f -= 8);
941
+ t[r + p - d] |= 128 * g;
942
+ }
943
+ }, V = {};
944
+ (function(t) {
945
+ (function() {
946
+ "use strict";
947
+ V = function(e, r) {
948
+ r = r || new FormData();
949
+ var n = [];
950
+ function o(e) {
951
+ return null === e ? "" : A.isDate(e) ? e.toISOString() : A.isArrayBuffer(e) || A.isTypedArray(e) ? "function" == typeof Blob ? new Blob([ e ]) : t.from(e) : e;
952
+ }
953
+ return function t(e, i) {
954
+ if (A.isPlainObject(e) || A.isArray(e)) {
955
+ if (-1 !== n.indexOf(e)) throw Error("Circular reference detected in " + i);
956
+ n.push(e), A.forEach(e, function(e, n) {
957
+ if (!A.isUndefined(e)) {
958
+ var s, a = i ? i + "." + n : n;
959
+ if (e && !i && "object" == typeof e) if (A.endsWith(n, "{}")) e = JSON.stringify(e); else if (A.endsWith(n, "[]") && (s = A.toArray(e))) return void s.forEach(function(t) {
960
+ !A.isUndefined(t) && r.append(a, o(t));
961
+ });
962
+ t(e, a);
963
+ }
964
+ }), n.pop();
965
+ } else r.append(i, o(e));
966
+ }(e), r;
967
+ };
968
+ }).call(this);
969
+ }).call(this, n({}).Buffer);
970
+ var J = A.isStandardBrowserEnv() ? {
971
+ write: function(t, e, r, n, o, i) {
972
+ var s = [];
973
+ s.push(t + "=" + encodeURIComponent(e)), A.isNumber(r) && s.push("expires=" + new Date(r).toGMTString()),
974
+ A.isString(n) && s.push("path=" + n), A.isString(o) && s.push("domain=" + o),
975
+ !0 === i && s.push("secure"), document.cookie = s.join("; ");
976
+ },
977
+ read: function(t) {
978
+ var e = document.cookie.match(new RegExp("(^|;\\s*)(" + t + ")=([^;]*)"));
979
+ return e ? decodeURIComponent(e[3]) : null;
980
+ },
981
+ remove: function(t) {
982
+ this.write(t, "", Date.now() - 864e5);
301
983
  }
302
984
  } : {
303
985
  write: function() {},
@@ -305,479 +987,586 @@
305
987
  return null;
306
988
  },
307
989
  remove: function() {}
308
- }, w = function(e, t) {
309
- return e && !/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t) ? function(e, t) {
310
- return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
311
- }(e, t) : t;
312
- }, S = [ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ], T = function(e) {
313
- var t, n, r, o = {};
314
- return e ? (f.forEach(e.split("\n"), function(e) {
315
- if (r = e.indexOf(":"), t = f.trim(e.substr(0, r)).toLowerCase(), n = f.trim(e.substr(r + 1)),
316
- t) {
317
- if (o[t] && S.indexOf(t) >= 0) return;
318
- o[t] = "set-cookie" === t ? (o[t] ? o[t] : []).concat([ n ]) : o[t] ? o[t] + ", " + n : n;
319
- }
320
- }), o) : o;
321
- }, k = f.isStandardBrowserEnv() ? function() {
322
- var e, t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
323
- function r(e) {
324
- var r = e;
325
- return t && (n.setAttribute("href", r), r = n.href), n.setAttribute("href", r),
990
+ }, W = function(t, e) {
991
+ return t && !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) ? function(t, e) {
992
+ return e ? t.replace(/\/+$/, "") + "/" + e.replace(/^\/+/, "") : t;
993
+ }(t, e) : e;
994
+ }, H = [ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ], Y = A.isStandardBrowserEnv() ? function() {
995
+ var t, e = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a");
996
+ function n(t) {
997
+ var n = t;
998
+ return e && (r.setAttribute("href", n), n = r.href), r.setAttribute("href", n),
326
999
  {
327
- href: n.href,
328
- protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
329
- host: n.host,
330
- search: n.search ? n.search.replace(/^\?/, "") : "",
331
- hash: n.hash ? n.hash.replace(/^#/, "") : "",
332
- hostname: n.hostname,
333
- port: n.port,
334
- pathname: "/" === n.pathname.charAt(0) ? n.pathname : "/" + n.pathname
1000
+ href: r.href,
1001
+ protocol: r.protocol ? r.protocol.replace(/:$/, "") : "",
1002
+ host: r.host,
1003
+ search: r.search ? r.search.replace(/^\?/, "") : "",
1004
+ hash: r.hash ? r.hash.replace(/^#/, "") : "",
1005
+ hostname: r.hostname,
1006
+ port: r.port,
1007
+ pathname: "/" === r.pathname.charAt(0) ? r.pathname : "/" + r.pathname
335
1008
  };
336
1009
  }
337
- return e = r(window.location.href), function(t) {
338
- var n = f.isString(t) ? r(t) : t;
339
- return n.protocol === e.protocol && n.host === e.host;
1010
+ return t = n(window.location.href), function(e) {
1011
+ var r = A.isString(e) ? n(e) : e;
1012
+ return r.protocol === t.protocol && r.host === t.host;
340
1013
  };
341
1014
  }() : function() {
342
1015
  return !0;
343
- }, C = {};
344
- function j(e) {
345
- this.message = e;
1016
+ }, X = {};
1017
+ function $(t) {
1018
+ C.call(this, null == t ? "canceled" : t, C.ERR_CANCELED), this.name = "CanceledError";
346
1019
  }
347
- j.prototype.toString = function() {
348
- return "Cancel" + (this.message ? ": " + this.message : "");
349
- }, j.prototype.__CANCEL__ = !0, C = j;
350
- var E, O, x = {}, A = x = {};
351
- function _() {
1020
+ A.inherits($, C, {
1021
+ __CANCEL__: !0
1022
+ }), X = $;
1023
+ var G, K, Q, Z = function(t) {
1024
+ return new Promise(function(e, r) {
1025
+ var n, o = t.data, i = t.headers, s = t.responseType;
1026
+ function a() {
1027
+ t.cancelToken && t.cancelToken.unsubscribe(n), t.signal && t.signal.removeEventListener("abort", n);
1028
+ }
1029
+ A.isFormData(o) && A.isStandardBrowserEnv() && delete i["Content-Type"];
1030
+ var u = new XMLHttpRequest();
1031
+ if (t.auth) {
1032
+ var f = t.auth.username || "", c = t.auth.password ? unescape(encodeURIComponent(t.auth.password)) : "";
1033
+ i.Authorization = "Basic " + btoa(f + ":" + c);
1034
+ }
1035
+ var l = W(t.baseURL, t.url);
1036
+ function h() {
1037
+ if (u) {
1038
+ var n = "getAllResponseHeaders" in u ? function(t) {
1039
+ var e, r, n, o = {};
1040
+ return t ? (A.forEach(t.split("\n"), function(t) {
1041
+ if (n = t.indexOf(":"), e = A.trim(t.substr(0, n)).toLowerCase(),
1042
+ r = A.trim(t.substr(n + 1)), e) {
1043
+ if (o[e] && H.indexOf(e) >= 0) return;
1044
+ o[e] = "set-cookie" === e ? (o[e] ? o[e] : []).concat([ r ]) : o[e] ? o[e] + ", " + r : r;
1045
+ }
1046
+ }), o) : o;
1047
+ }(u.getAllResponseHeaders()) : null;
1048
+ (function(t, e, r) {
1049
+ var n = r.config.validateStatus;
1050
+ r.status && n && !n(r.status) ? e(new C("Request failed with status code " + r.status, [ C.ERR_BAD_REQUEST, C.ERR_BAD_RESPONSE ][Math.floor(r.status / 100) - 4], r.config, r.request, r)) : t(r);
1051
+ })(function(t) {
1052
+ e(t), a();
1053
+ }, function(t) {
1054
+ r(t), a();
1055
+ }, {
1056
+ data: s && "text" !== s && "json" !== s ? u.response : u.responseText,
1057
+ status: u.status,
1058
+ statusText: u.statusText,
1059
+ headers: n,
1060
+ config: t,
1061
+ request: u
1062
+ }), u = null;
1063
+ }
1064
+ }
1065
+ if (u.open(t.method.toUpperCase(), S(l, t.params, t.paramsSerializer), !0),
1066
+ u.timeout = t.timeout, "onloadend" in u ? u.onloadend = h : u.onreadystatechange = function() {
1067
+ u && 4 === u.readyState && (0 !== u.status || u.responseURL && 0 === u.responseURL.indexOf("file:")) && setTimeout(h);
1068
+ }, u.onabort = function() {
1069
+ u && (r(new C("Request aborted", C.ECONNABORTED, t, u)), u = null);
1070
+ }, u.onerror = function() {
1071
+ r(new C("Network Error", C.ERR_NETWORK, t, u, u)), u = null;
1072
+ }, u.ontimeout = function() {
1073
+ var e = t.timeout ? "timeout of " + t.timeout + "ms exceeded" : "timeout exceeded", n = t.transitional || x;
1074
+ t.timeoutErrorMessage && (e = t.timeoutErrorMessage), r(new C(e, n.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED, t, u)),
1075
+ u = null;
1076
+ }, A.isStandardBrowserEnv()) {
1077
+ var p = (t.withCredentials || Y(l)) && t.xsrfCookieName ? J.read(t.xsrfCookieName) : void 0;
1078
+ p && (i[t.xsrfHeaderName] = p);
1079
+ }
1080
+ "setRequestHeader" in u && A.forEach(i, function(t, e) {
1081
+ void 0 === o && "content-type" === e.toLowerCase() ? delete i[e] : u.setRequestHeader(e, t);
1082
+ }), A.isUndefined(t.withCredentials) || (u.withCredentials = !!t.withCredentials),
1083
+ s && "json" !== s && (u.responseType = t.responseType), "function" == typeof t.onDownloadProgress && u.addEventListener("progress", t.onDownloadProgress),
1084
+ "function" == typeof t.onUploadProgress && u.upload && u.upload.addEventListener("progress", t.onUploadProgress),
1085
+ (t.cancelToken || t.signal) && (n = function(t) {
1086
+ u && (r(!t || t && t.type ? new X() : t), u.abort(), u = null);
1087
+ }, t.cancelToken && t.cancelToken.subscribe(n), t.signal && (t.signal.aborted ? n() : t.signal.addEventListener("abort", n))),
1088
+ o || (o = null);
1089
+ var d, g = (d = /^([-+\w]{1,25})(:?\/\/|:)/.exec(l)) && d[1] || "";
1090
+ g && -1 === [ "http", "https", "file" ].indexOf(g) ? r(new C("Unsupported protocol " + g + ":", C.ERR_BAD_REQUEST, t)) : u.send(o);
1091
+ });
1092
+ }, tt = G = {};
1093
+ function et() {
352
1094
  throw new Error("setTimeout has not been defined");
353
1095
  }
354
- function P() {
1096
+ function rt() {
355
1097
  throw new Error("clearTimeout has not been defined");
356
1098
  }
357
- function N(e) {
358
- if (E === setTimeout) return setTimeout(e, 0);
359
- if ((E === _ || !E) && setTimeout) return E = setTimeout, setTimeout(e, 0);
1099
+ function nt(t) {
1100
+ if (K === setTimeout) return setTimeout(t, 0);
1101
+ if ((K === et || !K) && setTimeout) return K = setTimeout, setTimeout(t, 0);
360
1102
  try {
361
- return E(e, 0);
362
- } catch (t) {
1103
+ return K(t, 0);
1104
+ } catch (e) {
363
1105
  try {
364
- return E.call(null, e, 0);
365
- } catch (t) {
366
- return E.call(this, e, 0);
1106
+ return K.call(null, t, 0);
1107
+ } catch (e) {
1108
+ return K.call(this, t, 0);
367
1109
  }
368
1110
  }
369
1111
  }
370
1112
  !function() {
371
1113
  try {
372
- E = "function" == typeof setTimeout ? setTimeout : _;
1114
+ K = "function" == typeof setTimeout ? setTimeout : et;
373
1115
  } catch (e) {
374
- E = _;
1116
+ K = et;
375
1117
  }
376
1118
  try {
377
- O = "function" == typeof clearTimeout ? clearTimeout : P;
1119
+ Q = "function" == typeof clearTimeout ? clearTimeout : rt;
378
1120
  } catch (e) {
379
- O = P;
1121
+ Q = rt;
380
1122
  }
381
1123
  }();
382
- var R, U = [], L = !1, B = -1;
383
- function q() {
384
- L && R && (L = !1, R.length ? U = R.concat(U) : B = -1, U.length && z());
1124
+ var ot, it = [], st = !1, at = -1;
1125
+ function ut() {
1126
+ st && ot && (st = !1, ot.length ? it = ot.concat(it) : at = -1, it.length && ft());
385
1127
  }
386
- function z() {
387
- if (!L) {
388
- var e = N(q);
389
- L = !0;
390
- for (var t = U.length; t; ) {
391
- for (R = U, U = []; ++B < t; ) R && R[B].run();
392
- B = -1, t = U.length;
1128
+ function ft() {
1129
+ if (!st) {
1130
+ var t = nt(ut);
1131
+ st = !0;
1132
+ for (var r = it.length; r; ) {
1133
+ for (ot = it, it = []; ++at < r; ) ot && ot[at].run();
1134
+ at = -1, r = it.length;
393
1135
  }
394
- R = null, L = !1, function(e) {
395
- if (O === clearTimeout) return clearTimeout(e);
396
- if ((O === P || !O) && clearTimeout) return O = clearTimeout, clearTimeout(e);
1136
+ ot = null, st = !1, function(t) {
1137
+ if (Q === clearTimeout) return clearTimeout(t);
1138
+ if ((Q === rt || !Q) && clearTimeout) return Q = clearTimeout,
1139
+ clearTimeout(t);
397
1140
  try {
398
- O(e);
399
- } catch (t) {
1141
+ Q(t);
1142
+ } catch (e) {
400
1143
  try {
401
- return O.call(null, e);
402
- } catch (t) {
403
- return O.call(this, e);
1144
+ return Q.call(null, t);
1145
+ } catch (e) {
1146
+ return Q.call(this, t);
404
1147
  }
405
1148
  }
406
- }(e);
1149
+ }(t);
407
1150
  }
408
1151
  }
409
- function I(e, t) {
410
- this.fun = e, this.array = t;
1152
+ function ct(t, e) {
1153
+ this.fun = t, this.array = e;
411
1154
  }
412
- function D() {}
413
- A.nextTick = function(e) {
414
- var t = new Array(arguments.length - 1);
415
- if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
416
- U.push(new I(e, t)), 1 !== U.length || L || N(z);
417
- }, I.prototype.run = function() {
1155
+ function lt() {}
1156
+ tt.nextTick = function(t) {
1157
+ var e = new Array(arguments.length - 1);
1158
+ if (arguments.length > 1) for (var r = 1; r < arguments.length; r++) e[r - 1] = arguments[r];
1159
+ it.push(new ct(t, e)), 1 !== it.length || st || nt(ft);
1160
+ }, ct.prototype.run = function() {
418
1161
  this.fun.apply(null, this.array);
419
- }, A.title = "browser", A.browser = !0, A.env = {}, A.argv = [], A.version = "",
420
- A.versions = {}, A.on = D, A.addListener = D, A.once = D, A.off = D, A.removeListener = D,
421
- A.removeAllListeners = D, A.emit = D, A.prependListener = D, A.prependOnceListener = D,
422
- A.listeners = function(e) {
1162
+ }, tt.title = "browser", tt.browser = !0, tt.env = {}, tt.argv = [], tt.version = "",
1163
+ tt.versions = {}, tt.on = lt, tt.addListener = lt, tt.once = lt, tt.off = lt,
1164
+ tt.removeListener = lt, tt.removeAllListeners = lt, tt.emit = lt, tt.prependListener = lt,
1165
+ tt.prependOnceListener = lt, tt.listeners = function(t) {
423
1166
  return [];
424
- }, A.binding = function(e) {
1167
+ }, tt.binding = function(t) {
425
1168
  throw new Error("process.binding is not supported");
426
- }, A.cwd = function() {
1169
+ }, tt.cwd = function() {
427
1170
  return "/";
428
- }, A.chdir = function(e) {
1171
+ }, tt.chdir = function(t) {
429
1172
  throw new Error("process.chdir is not supported");
430
- }, A.umask = function() {
1173
+ }, tt.umask = function() {
431
1174
  return 0;
432
1175
  };
433
- var F = t({}), J = function(e, t, n) {
434
- var r = this || F;
435
- return f.forEach(n, function(n) {
436
- e = n.call(r, e, t);
437
- }), e;
438
- }, V = function(e) {
439
- return !(!e || !e.__CANCEL__);
440
- }, H = t({});
441
- function M(e) {
442
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new C("canceled");
1176
+ var ht = {};
1177
+ (function(t) {
1178
+ (function() {
1179
+ "use strict";
1180
+ var r = {
1181
+ "Content-Type": "application/x-www-form-urlencoded"
1182
+ };
1183
+ function n(t, e) {
1184
+ !A.isUndefined(t) && A.isUndefined(t["Content-Type"]) && (t["Content-Type"] = e);
1185
+ }
1186
+ var o, i = {
1187
+ transitional: x,
1188
+ adapter: (("undefined" != typeof XMLHttpRequest || void 0 !== t && "[object process]" === Object.prototype.toString.call(t)) && (o = Z),
1189
+ o),
1190
+ transformRequest: [ function(t, r) {
1191
+ if (O(r, "Accept"), O(r, "Content-Type"), A.isFormData(t) || A.isArrayBuffer(t) || A.isBuffer(t) || A.isStream(t) || A.isFile(t) || A.isBlob(t)) return t;
1192
+ if (A.isArrayBufferView(t)) return t.buffer;
1193
+ if (A.isURLSearchParams(t)) return n(r, "application/x-www-form-urlencoded;charset=utf-8"),
1194
+ t.toString();
1195
+ var o, i = A.isObject(t), s = r && r["Content-Type"];
1196
+ if ((o = A.isFileList(t)) || i && "multipart/form-data" === s) {
1197
+ var a = this.env && this.env.FormData;
1198
+ return V(o ? {
1199
+ "files[]": t
1200
+ } : t, a && new a());
1201
+ }
1202
+ return i || "application/json" === s ? (n(r, "application/json"),
1203
+ function(t, r, n) {
1204
+ if (A.isString(t)) try {
1205
+ return (0, JSON.parse)(t), A.trim(t);
1206
+ } catch (e) {
1207
+ if ("SyntaxError" !== e.name) throw e;
1208
+ }
1209
+ return (0, JSON.stringify)(t);
1210
+ }(t)) : t;
1211
+ } ],
1212
+ transformResponse: [ function(t) {
1213
+ var r = this.transitional || i.transitional, n = r && r.silentJSONParsing, o = r && r.forcedJSONParsing, s = !n && "json" === this.responseType;
1214
+ if (s || o && A.isString(t) && t.length) try {
1215
+ return JSON.parse(t);
1216
+ } catch (e) {
1217
+ if (s) {
1218
+ if ("SyntaxError" === e.name) throw C.from(e, C.ERR_BAD_RESPONSE, this, null, this.response);
1219
+ throw e;
1220
+ }
1221
+ }
1222
+ return t;
1223
+ } ],
1224
+ timeout: 0,
1225
+ xsrfCookieName: "XSRF-TOKEN",
1226
+ xsrfHeaderName: "X-XSRF-TOKEN",
1227
+ maxContentLength: -1,
1228
+ maxBodyLength: -1,
1229
+ env: {
1230
+ FormData: null
1231
+ },
1232
+ validateStatus: function(t) {
1233
+ return t >= 200 && t < 300;
1234
+ },
1235
+ headers: {
1236
+ common: {
1237
+ Accept: "application/json, text/plain, */*"
1238
+ }
1239
+ }
1240
+ };
1241
+ A.forEach([ "delete", "get", "head" ], function(t) {
1242
+ i.headers[t] = {};
1243
+ }), A.forEach([ "post", "put", "patch" ], function(t) {
1244
+ i.headers[t] = A.merge(r);
1245
+ }), ht = i;
1246
+ }).call(this);
1247
+ }).call(this, G);
1248
+ var pt = function(t, e, r) {
1249
+ var n = this || ht;
1250
+ return A.forEach(r, function(r) {
1251
+ t = r.call(n, t, e);
1252
+ }), t;
1253
+ }, dt = function(t) {
1254
+ return !(!t || !t.__CANCEL__);
1255
+ };
1256
+ function gt(t) {
1257
+ if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted) throw new X();
443
1258
  }
444
- var $, G = function(e) {
445
- return M(e), e.headers = e.headers || {}, e.data = J.call(e, e.data, e.headers, e.transformRequest),
446
- e.headers = f.merge(e.headers.common || {}, e.headers[e.method] || {}, e.headers),
447
- f.forEach([ "delete", "get", "head", "post", "put", "patch", "common" ], function(t) {
448
- delete e.headers[t];
449
- }), (e.adapter || H.adapter)(e).then(function(t) {
450
- return M(e), t.data = J.call(e, t.data, t.headers, e.transformResponse), t;
451
- }, function(t) {
452
- return V(t) || (M(e), t && t.response && (t.response.data = J.call(e, t.response.data, t.response.headers, e.transformResponse))),
453
- Promise.reject(t);
1259
+ var yt, vt = function(t) {
1260
+ return gt(t), t.headers = t.headers || {}, t.data = pt.call(t, t.data, t.headers, t.transformRequest),
1261
+ t.headers = A.merge(t.headers.common || {}, t.headers[t.method] || {}, t.headers),
1262
+ A.forEach([ "delete", "get", "head", "post", "put", "patch", "common" ], function(e) {
1263
+ delete t.headers[e];
1264
+ }), (t.adapter || ht.adapter)(t).then(function(e) {
1265
+ return gt(t), e.data = pt.call(t, e.data, e.headers, t.transformResponse),
1266
+ e;
1267
+ }, function(e) {
1268
+ return dt(e) || (gt(t), e && e.response && (e.response.data = pt.call(t, e.response.data, e.response.headers, t.transformResponse))),
1269
+ Promise.reject(e);
454
1270
  });
455
- }, X = function(e, t) {
456
- t = t || {};
457
- var n = {};
458
- function r(e, t) {
459
- return f.isPlainObject(e) && f.isPlainObject(t) ? f.merge(e, t) : f.isPlainObject(t) ? f.merge({}, t) : f.isArray(t) ? t.slice() : t;
1271
+ }, mt = function(t, e) {
1272
+ e = e || {};
1273
+ var r = {};
1274
+ function n(t, e) {
1275
+ return A.isPlainObject(t) && A.isPlainObject(e) ? A.merge(t, e) : A.isPlainObject(e) ? A.merge({}, e) : A.isArray(e) ? e.slice() : e;
460
1276
  }
461
- function o(n) {
462
- return f.isUndefined(t[n]) ? f.isUndefined(e[n]) ? void 0 : r(void 0, e[n]) : r(e[n], t[n]);
1277
+ function o(r) {
1278
+ return A.isUndefined(e[r]) ? A.isUndefined(t[r]) ? void 0 : n(void 0, t[r]) : n(t[r], e[r]);
463
1279
  }
464
- function i(e) {
465
- if (!f.isUndefined(t[e])) return r(void 0, t[e]);
1280
+ function i(t) {
1281
+ if (!A.isUndefined(e[t])) return n(void 0, e[t]);
466
1282
  }
467
- function a(n) {
468
- return f.isUndefined(t[n]) ? f.isUndefined(e[n]) ? void 0 : r(void 0, e[n]) : r(void 0, t[n]);
1283
+ function s(r) {
1284
+ return A.isUndefined(e[r]) ? A.isUndefined(t[r]) ? void 0 : n(void 0, t[r]) : n(void 0, e[r]);
469
1285
  }
470
- function s(n) {
471
- return n in t ? r(e[n], t[n]) : n in e ? r(void 0, e[n]) : void 0;
1286
+ function a(r) {
1287
+ return r in e ? n(t[r], e[r]) : r in t ? n(void 0, t[r]) : void 0;
472
1288
  }
473
1289
  var u = {
474
1290
  url: i,
475
1291
  method: i,
476
1292
  data: i,
477
- baseURL: a,
478
- transformRequest: a,
479
- transformResponse: a,
480
- paramsSerializer: a,
481
- timeout: a,
482
- timeoutMessage: a,
483
- withCredentials: a,
484
- adapter: a,
485
- responseType: a,
486
- xsrfCookieName: a,
487
- xsrfHeaderName: a,
488
- onUploadProgress: a,
489
- onDownloadProgress: a,
490
- decompress: a,
491
- maxContentLength: a,
492
- maxBodyLength: a,
493
- transport: a,
494
- httpAgent: a,
495
- httpsAgent: a,
496
- cancelToken: a,
497
- socketPath: a,
498
- responseEncoding: a,
499
- validateStatus: s
1293
+ baseURL: s,
1294
+ transformRequest: s,
1295
+ transformResponse: s,
1296
+ paramsSerializer: s,
1297
+ timeout: s,
1298
+ timeoutMessage: s,
1299
+ withCredentials: s,
1300
+ adapter: s,
1301
+ responseType: s,
1302
+ xsrfCookieName: s,
1303
+ xsrfHeaderName: s,
1304
+ onUploadProgress: s,
1305
+ onDownloadProgress: s,
1306
+ decompress: s,
1307
+ maxContentLength: s,
1308
+ maxBodyLength: s,
1309
+ beforeRedirect: s,
1310
+ transport: s,
1311
+ httpAgent: s,
1312
+ httpsAgent: s,
1313
+ cancelToken: s,
1314
+ socketPath: s,
1315
+ responseEncoding: s,
1316
+ validateStatus: a
500
1317
  };
501
- return f.forEach(Object.keys(e).concat(Object.keys(t)), function(e) {
502
- var t = u[e] || o, r = t(e);
503
- f.isUndefined(r) && t !== s || (n[e] = r);
504
- }), n;
505
- }, W = "0.24.0", K = W, Y = {};
506
- [ "object", "boolean", "number", "function", "string", "symbol" ].forEach(function(e, t) {
507
- Y[e] = function(n) {
508
- return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
1318
+ return A.forEach(Object.keys(t).concat(Object.keys(e)), function(t) {
1319
+ var e = u[t] || o, n = e(t);
1320
+ A.isUndefined(n) && e !== a || (r[t] = n);
1321
+ }), r;
1322
+ }, wt = "0.27.2", bt = wt, Et = {};
1323
+ [ "object", "boolean", "number", "function", "string", "symbol" ].forEach(function(t, e) {
1324
+ Et[t] = function(r) {
1325
+ return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
509
1326
  };
510
1327
  });
511
- var Q = {};
512
- Y.transitional = function(e, t, n) {
513
- function r(e, t) {
514
- return "[Axios v" + K + "] Transitional option '" + e + "'" + t + (n ? ". " + n : "");
1328
+ var At = {};
1329
+ Et.transitional = function(t, e, r) {
1330
+ function n(t, e) {
1331
+ return "[Axios v" + bt + "] Transitional option '" + t + "'" + e + (r ? ". " + r : "");
515
1332
  }
516
- return function(n, o, i) {
517
- if (!1 === e) throw new Error(r(o, " has been removed" + (t ? " in " + t : "")));
518
- return t && !Q[o] && (Q[o] = !0, console.warn(r(o, " has been deprecated since v" + t + " and will be removed in the near future"))),
519
- !e || e(n, o, i);
1333
+ return function(r, o, i) {
1334
+ if (!1 === t) throw new C(n(o, " has been removed" + (e ? " in " + e : "")), C.ERR_DEPRECATED);
1335
+ return e && !At[o] && (At[o] = !0, console.warn(n(o, " has been deprecated since v" + e + " and will be removed in the near future"))),
1336
+ !t || t(r, o, i);
520
1337
  };
521
1338
  };
522
- var Z = {}, ee = ($ = {
523
- assertOptions: function(e, t, n) {
524
- if ("object" != typeof e) throw new TypeError("options must be an object");
525
- for (var r = Object.keys(e), o = r.length; o-- > 0; ) {
526
- var i = r[o], a = t[i];
527
- if (a) {
528
- var s = e[i], u = void 0 === s || a(s, i, e);
529
- if (!0 !== u) throw new TypeError("option " + i + " must be " + u);
530
- } else if (!0 !== n) throw Error("Unknown option " + i);
1339
+ var Tt = {}, St = (yt = {
1340
+ assertOptions: function(t, e, r) {
1341
+ if ("object" != typeof t) throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
1342
+ for (var n = Object.keys(t), o = n.length; o-- > 0; ) {
1343
+ var i = n[o], s = e[i];
1344
+ if (s) {
1345
+ var a = t[i], u = void 0 === a || s(a, i, t);
1346
+ if (!0 !== u) throw new C("option " + i + " must be " + u, C.ERR_BAD_OPTION_VALUE);
1347
+ } else if (!0 !== r) throw new C("Unknown option " + i, C.ERR_BAD_OPTION);
531
1348
  }
532
1349
  },
533
- validators: Y
1350
+ validators: Et
534
1351
  }).validators;
535
- function te(e) {
536
- this.defaults = e, this.interceptors = {
537
- request: new d(),
538
- response: new d()
1352
+ function _t(t) {
1353
+ this.defaults = t, this.interceptors = {
1354
+ request: new _(),
1355
+ response: new _()
539
1356
  };
540
1357
  }
541
- te.prototype.request = function(e) {
542
- "string" == typeof e ? (e = arguments[1] || {}).url = arguments[0] : e = e || {},
543
- (e = X(this.defaults, e)).method ? e.method = e.method.toLowerCase() : this.defaults.method ? e.method = this.defaults.method.toLowerCase() : e.method = "get";
544
- var t = e.transitional;
545
- void 0 !== t && $.assertOptions(t, {
546
- silentJSONParsing: ee.transitional(ee.boolean),
547
- forcedJSONParsing: ee.transitional(ee.boolean),
548
- clarifyTimeoutError: ee.transitional(ee.boolean)
1358
+ _t.prototype.request = function(t, e) {
1359
+ "string" == typeof t ? (e = e || {}).url = t : e = t || {}, (e = mt(this.defaults, e)).method ? e.method = e.method.toLowerCase() : this.defaults.method ? e.method = this.defaults.method.toLowerCase() : e.method = "get";
1360
+ var r = e.transitional;
1361
+ void 0 !== r && yt.assertOptions(r, {
1362
+ silentJSONParsing: St.transitional(St.boolean),
1363
+ forcedJSONParsing: St.transitional(St.boolean),
1364
+ clarifyTimeoutError: St.transitional(St.boolean)
549
1365
  }, !1);
550
- var n = [], r = !0;
1366
+ var n = [], o = !0;
551
1367
  this.interceptors.request.forEach(function(t) {
552
- "function" == typeof t.runWhen && !1 === t.runWhen(e) || (r = r && t.synchronous,
1368
+ "function" == typeof t.runWhen && !1 === t.runWhen(e) || (o = o && t.synchronous,
553
1369
  n.unshift(t.fulfilled, t.rejected));
554
1370
  });
555
- var o, i = [];
556
- if (this.interceptors.response.forEach(function(e) {
557
- i.push(e.fulfilled, e.rejected);
558
- }), !r) {
559
- var a = [ G, void 0 ];
560
- for (Array.prototype.unshift.apply(a, n), a = a.concat(i), o = Promise.resolve(e); a.length; ) o = o.then(a.shift(), a.shift());
561
- return o;
1371
+ var i, s = [];
1372
+ if (this.interceptors.response.forEach(function(t) {
1373
+ s.push(t.fulfilled, t.rejected);
1374
+ }), !o) {
1375
+ var a = [ vt, void 0 ];
1376
+ for (Array.prototype.unshift.apply(a, n), a = a.concat(s), i = Promise.resolve(e); a.length; ) i = i.then(a.shift(), a.shift());
1377
+ return i;
562
1378
  }
563
- for (var s = e; n.length; ) {
564
- var u = n.shift(), c = n.shift();
1379
+ for (var u = e; n.length; ) {
1380
+ var f = n.shift(), c = n.shift();
565
1381
  try {
566
- s = u(s);
567
- } catch (f) {
568
- c(f);
1382
+ u = f(u);
1383
+ } catch (l) {
1384
+ c(l);
569
1385
  break;
570
1386
  }
571
1387
  }
572
1388
  try {
573
- o = G(s);
574
- } catch (f) {
575
- return Promise.reject(f);
1389
+ i = vt(u);
1390
+ } catch (l) {
1391
+ return Promise.reject(l);
576
1392
  }
577
- for (;i.length; ) o = o.then(i.shift(), i.shift());
578
- return o;
579
- }, te.prototype.getUri = function(e) {
580
- return e = X(this.defaults, e), p(e.url, e.params, e.paramsSerializer).replace(/^\?/, "");
581
- }, f.forEach([ "delete", "get", "head", "options" ], function(e) {
582
- te.prototype[e] = function(t, n) {
583
- return this.request(X(n || {}, {
584
- method: e,
585
- url: t,
586
- data: (n || {}).data
587
- }));
588
- };
589
- }), f.forEach([ "post", "put", "patch" ], function(e) {
590
- te.prototype[e] = function(t, n, r) {
591
- return this.request(X(r || {}, {
592
- method: e,
593
- url: t,
594
- data: n
1393
+ for (;s.length; ) i = i.then(s.shift(), s.shift());
1394
+ return i;
1395
+ }, _t.prototype.getUri = function(t) {
1396
+ t = mt(this.defaults, t);
1397
+ var e = W(t.baseURL, t.url);
1398
+ return S(e, t.params, t.paramsSerializer);
1399
+ }, A.forEach([ "delete", "get", "head", "options" ], function(t) {
1400
+ _t.prototype[t] = function(e, r) {
1401
+ return this.request(mt(r || {}, {
1402
+ method: t,
1403
+ url: e,
1404
+ data: (r || {}).data
595
1405
  }));
596
1406
  };
597
- }), Z = te;
598
- var ne;
599
- function re(e) {
600
- if ("function" != typeof e) throw new TypeError("executor must be a function.");
601
- var t;
602
- this.promise = new Promise(function(e) {
603
- t = e;
1407
+ }), A.forEach([ "post", "put", "patch" ], function(t) {
1408
+ function e(e) {
1409
+ return function(r, n, o) {
1410
+ return this.request(mt(o || {}, {
1411
+ method: t,
1412
+ headers: e ? {
1413
+ "Content-Type": "multipart/form-data"
1414
+ } : {},
1415
+ url: r,
1416
+ data: n
1417
+ }));
1418
+ };
1419
+ }
1420
+ _t.prototype[t] = e(), _t.prototype[t + "Form"] = e(!0);
1421
+ }), Tt = _t;
1422
+ var Rt;
1423
+ function Ot(t) {
1424
+ if ("function" != typeof t) throw new TypeError("executor must be a function.");
1425
+ var e;
1426
+ this.promise = new Promise(function(t) {
1427
+ e = t;
604
1428
  });
605
- var n = this;
606
- this.promise.then(function(e) {
607
- if (n._listeners) {
608
- var t, r = n._listeners.length;
609
- for (t = 0; t < r; t++) n._listeners[t](e);
610
- n._listeners = null;
1429
+ var r = this;
1430
+ this.promise.then(function(t) {
1431
+ if (r._listeners) {
1432
+ var e, n = r._listeners.length;
1433
+ for (e = 0; e < n; e++) r._listeners[e](t);
1434
+ r._listeners = null;
611
1435
  }
612
- }), this.promise.then = function(e) {
613
- var t, r = new Promise(function(e) {
614
- n.subscribe(e), t = e;
615
- }).then(e);
616
- return r.cancel = function() {
617
- n.unsubscribe(t);
618
- }, r;
619
- }, e(function(e) {
620
- n.reason || (n.reason = new C(e), t(n.reason));
1436
+ }), this.promise.then = function(t) {
1437
+ var e, n = new Promise(function(t) {
1438
+ r.subscribe(t), e = t;
1439
+ }).then(t);
1440
+ return n.cancel = function() {
1441
+ r.unsubscribe(e);
1442
+ }, n;
1443
+ }, t(function(t) {
1444
+ r.reason || (r.reason = new X(t), e(r.reason));
621
1445
  });
622
1446
  }
623
- re.prototype.throwIfRequested = function() {
1447
+ Ot.prototype.throwIfRequested = function() {
624
1448
  if (this.reason) throw this.reason;
625
- }, re.prototype.subscribe = function(e) {
626
- this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [ e ];
627
- }, re.prototype.unsubscribe = function(e) {
1449
+ }, Ot.prototype.subscribe = function(t) {
1450
+ this.reason ? t(this.reason) : this._listeners ? this._listeners.push(t) : this._listeners = [ t ];
1451
+ }, Ot.prototype.unsubscribe = function(t) {
628
1452
  if (this._listeners) {
629
- var t = this._listeners.indexOf(e);
630
- -1 !== t && this._listeners.splice(t, 1);
1453
+ var e = this._listeners.indexOf(t);
1454
+ -1 !== e && this._listeners.splice(e, 1);
631
1455
  }
632
- }, re.source = function() {
633
- var e;
1456
+ }, Ot.source = function() {
1457
+ var t;
634
1458
  return {
635
- token: new re(function(t) {
636
- e = t;
1459
+ token: new Ot(function(e) {
1460
+ t = e;
637
1461
  }),
638
- cancel: e
1462
+ cancel: t
639
1463
  };
640
- }, ne = re;
641
- var oe = {}, ie = function e(t) {
642
- var n = new Z(t), o = r(Z.prototype.request, n);
643
- return f.extend(o, Z.prototype, n), f.extend(o, n), o.create = function(n) {
644
- return e(X(t, n));
645
- }, o;
646
- }(t({}));
647
- ie.Axios = Z, ie.Cancel = C, ie.CancelToken = ne, ie.isCancel = V, ie.VERSION = W,
648
- ie.all = function(e) {
649
- return Promise.all(e);
650
- }, ie.spread = function(e) {
651
- return function(t) {
652
- return e.apply(null, t);
1464
+ }, Rt = Ot;
1465
+ var Ct = {}, Bt = function t(e) {
1466
+ var r = new Tt(e), n = o(Tt.prototype.request, r);
1467
+ return A.extend(n, Tt.prototype, r), A.extend(n, r), n.create = function(r) {
1468
+ return t(mt(e, r));
1469
+ }, n;
1470
+ }(ht);
1471
+ Bt.Axios = Tt, Bt.CanceledError = X, Bt.CancelToken = Rt, Bt.isCancel = dt,
1472
+ Bt.VERSION = wt, Bt.toFormData = V, Bt.AxiosError = C, Bt.Cancel = Bt.CanceledError,
1473
+ Bt.all = function(t) {
1474
+ return Promise.all(t);
1475
+ }, Bt.spread = function(t) {
1476
+ return function(e) {
1477
+ return t.apply(null, e);
653
1478
  };
654
- }, ie.isAxiosError = function(e) {
655
- return "object" == typeof e && !0 === e.isAxiosError;
656
- }, (oe = ie).default = ie;
657
- var ae = oe;
658
- Array.isArray;
659
- var se = function(e) {
660
- switch (typeof e) {
661
- case "string":
662
- return e;
663
-
664
- case "boolean":
665
- return e ? "true" : "false";
666
-
667
- case "number":
668
- return isFinite(e) ? e : "";
669
-
670
- default:
671
- return "";
672
- }
673
- }, ue = Array.isArray || function(e) {
674
- return "[object Array]" === Object.prototype.toString.call(e);
675
- };
676
- function ce(e, t) {
677
- if (e.map) return e.map(t);
678
- for (var n = [], r = 0; r < e.length; r++) n.push(t(e[r], r));
679
- return n;
680
- }
681
- var fe = Object.keys || function(e) {
682
- var t = [];
683
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
684
- return t;
685
- }, le = {
686
- stringify: function(e, t, n, r) {
687
- return t = t || "&", n = n || "=", null === e && (e = void 0), "object" == typeof e ? ce(fe(e), function(r) {
688
- var o = encodeURIComponent(se(r)) + n;
689
- return ue(e[r]) ? ce(e[r], function(e) {
690
- return o + encodeURIComponent(se(e));
691
- }).join(t) : o + encodeURIComponent(se(e[r]));
692
- }).join(t) : r ? encodeURIComponent(se(r)) + n + encodeURIComponent(se(e)) : "";
693
- }
694
- }, pe = {}, de = {};
695
- return function(e) {
1479
+ }, Bt.isAxiosError = function(t) {
1480
+ return A.isObject(t) && !0 === t.isAxiosError;
1481
+ }, (Ct = Bt).default = Bt;
1482
+ var Ut = Ct, kt = {}, xt = {};
1483
+ return function(t) {
696
1484
  (function() {
697
1485
  "use strict";
698
- function t(e, t) {
699
- var r = "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
700
- if (!r) {
701
- if (Array.isArray(e) || (r = n(e)) || t && e && "number" == typeof e.length) {
702
- r && (e = r);
1486
+ function e(t, e) {
1487
+ var n = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
1488
+ if (!n) {
1489
+ if (Array.isArray(t) || (n = r(t)) || e && t && "number" == typeof t.length) {
1490
+ n && (t = n);
703
1491
  var o = 0, i = function() {};
704
1492
  return {
705
1493
  s: i,
706
1494
  n: function() {
707
- return o >= e.length ? {
1495
+ return o >= t.length ? {
708
1496
  done: !0
709
1497
  } : {
710
1498
  done: !1,
711
- value: e[o++]
1499
+ value: t[o++]
712
1500
  };
713
1501
  },
714
- e: function(e) {
715
- throw e;
1502
+ e: function(t) {
1503
+ throw t;
716
1504
  },
717
1505
  f: i
718
1506
  };
719
1507
  }
720
1508
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
721
1509
  }
722
- var a, s = !0, u = !1;
1510
+ var s, a = !0, u = !1;
723
1511
  return {
724
1512
  s: function() {
725
- r = r.call(e);
1513
+ n = n.call(t);
726
1514
  },
727
1515
  n: function() {
728
- var e = r.next();
729
- return s = e.done, e;
1516
+ var t = n.next();
1517
+ return a = t.done, t;
730
1518
  },
731
- e: function(e) {
732
- u = !0, a = e;
1519
+ e: function(t) {
1520
+ u = !0, s = t;
733
1521
  },
734
1522
  f: function() {
735
1523
  try {
736
- s || null == r.return || r.return();
1524
+ a || null == n.return || n.return();
737
1525
  } finally {
738
- if (u) throw a;
1526
+ if (u) throw s;
739
1527
  }
740
1528
  }
741
1529
  };
742
1530
  }
743
- function n(e, t) {
744
- if (e) {
745
- if ("string" == typeof e) return r(e, t);
746
- var n = Object.prototype.toString.call(e).slice(8, -1);
747
- return "Object" === n && e.constructor && (n = e.constructor.name), "Map" === n || "Set" === n ? Array.from(e) : "Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? r(e, t) : void 0;
1531
+ function r(t, e) {
1532
+ if (t) {
1533
+ if ("string" == typeof t) return n(t, e);
1534
+ var r = Object.prototype.toString.call(t).slice(8, -1);
1535
+ return "Object" === r && t.constructor && (r = t.constructor.name),
1536
+ "Map" === r || "Set" === r ? Array.from(t) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? n(t, e) : void 0;
748
1537
  }
749
1538
  }
750
- function r(e, t) {
751
- (null == t || t > e.length) && (t = e.length);
752
- for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
753
- return r;
1539
+ function n(t, e) {
1540
+ (null == e || e > t.length) && (e = t.length);
1541
+ for (var r = 0, n = new Array(e); r < e; r++) n[r] = t[r];
1542
+ return n;
754
1543
  }
755
- function o(e) {
756
- return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
757
- return typeof e;
758
- } : function(e) {
759
- return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
760
- })(e);
1544
+ function o(t) {
1545
+ return (o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
1546
+ return typeof t;
1547
+ } : function(t) {
1548
+ return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
1549
+ })(t);
761
1550
  }
762
- function i(e, t) {
763
- if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
1551
+ function i(t, e) {
1552
+ if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
764
1553
  }
765
- function a(e, t) {
766
- for (var n = 0; n < t.length; n++) {
767
- var r = t[n];
768
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
769
- Object.defineProperty(e, r.key, r);
1554
+ function s(t, e) {
1555
+ for (var r = 0; r < e.length; r++) {
1556
+ var n = e[r];
1557
+ n.enumerable = n.enumerable || !1, n.configurable = !0,
1558
+ "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
770
1559
  }
771
1560
  }
772
- function s(e, t, n) {
773
- return t && a(e.prototype, t), n && a(e, n), Object.defineProperty(e, "prototype", {
1561
+ function a(t, e, r) {
1562
+ return e && s(t.prototype, e), r && s(t, r), Object.defineProperty(t, "prototype", {
774
1563
  writable: !1
775
- }), e;
1564
+ }), t;
776
1565
  }
777
- Object.defineProperty(de, "__esModule", {
1566
+ Object.defineProperty(xt, "__esModule", {
778
1567
  value: !0
779
- }), de.varsnap = de.clientName = de.version = void 0;
780
- de.version = "1.8.1", de.clientName = "javascript." + de.version;
1568
+ }), xt.varsnap = xt.clientName = xt.version = void 0;
1569
+ xt.version = "1.8.4", xt.clientName = "javascript." + xt.version;
781
1570
  var u = {
782
1571
  varsnap: !0,
783
1572
  env: "development",
@@ -785,159 +1574,162 @@
785
1574
  producerToken: "",
786
1575
  consumerToken: "",
787
1576
  logger: console
788
- }, c = [], f = [], l = function() {
789
- function t() {
790
- i(this, t);
1577
+ }, f = [], c = [], l = function() {
1578
+ function e() {
1579
+ i(this, e);
791
1580
  }
792
- return s(t, null, [ {
1581
+ return a(e, null, [ {
793
1582
  key: "getConfig",
794
- value: function(e, t) {
795
- if (!e) return "";
796
- var n = e[t];
797
- return n ? n = n.toString().toLowerCase() : "";
1583
+ value: function(t, e) {
1584
+ if (!t) return "";
1585
+ var r = t[e];
1586
+ return r ? r = r.toString().toLowerCase() : "";
798
1587
  }
799
1588
  }, {
800
1589
  key: "setConfig",
801
- value: function(e, t, n) {
802
- return "varsnap" === t && ("string" == typeof n && (n = "true" === n), e[t] = n),
803
- "env" !== t && "producerToken" !== t && "consumerToken" !== t && "branch" !== t || (e[t] = n),
804
- "logger" === t && (e[t] = n), e;
1590
+ value: function(t, e, r) {
1591
+ return "varsnap" === e && ("string" == typeof r && (r = "true" === r),
1592
+ t[e] = r), "env" !== e && "producerToken" !== e && "consumerToken" !== e && "branch" !== e || (t[e] = r),
1593
+ "logger" === e && (t[e] = r), t;
805
1594
  }
806
1595
  }, {
807
1596
  key: "getSignature",
808
- value: function(e, t) {
809
- var n = "";
810
- return n = "" !== t && void 0 !== t ? t : (n = (n = e.toString().split("{")[0]).replace(/^\s+|\s+$/g, "")).replace(/,\s+/g, ","),
811
- "javascript." + de.version + "." + n;
1597
+ value: function(t, e) {
1598
+ var r = "";
1599
+ return r = "" !== e && void 0 !== e ? e : (r = (r = t.toString().split("{")[0]).replace(/^\s+|\s+$/g, "")).replace(/,\s+/g, ","),
1600
+ "javascript." + xt.version + "." + r;
812
1601
  }
813
1602
  }, {
814
1603
  key: "ajax",
815
- value: function(e, n) {
816
- var r = {
1604
+ value: function(t, r) {
1605
+ var n = {
817
1606
  method: "POST",
818
- url: e,
1607
+ url: t,
819
1608
  headers: {
820
1609
  "Content-Type": "application/x-www-form-urlencoded"
821
1610
  },
822
- data: le.stringify(n),
1611
+ data: new URLSearchParams(r).toString(),
823
1612
  responseType: "json"
824
1613
  };
825
- return t.isNode() && r.headers && (r.headers["User-Agent"] = "varsnap.js"), (0,
826
- ae.default)(r).then(function(e) {
827
- return e.data;
1614
+ return e.isNode() && n.headers && (n.headers["User-Agent"] = "varsnap.js"),
1615
+ (0, Ut.default)(n).then(function(t) {
1616
+ return t.data;
1617
+ }).catch(function(t) {
1618
+ return t;
828
1619
  });
829
1620
  }
830
1621
  }, {
831
1622
  key: "debug",
832
- value: function(e, t) {
833
- e.logger && e.logger.debug(t);
1623
+ value: function(t, e) {
1624
+ t.logger && t.logger.debug(e);
834
1625
  }
835
1626
  }, {
836
1627
  key: "log",
837
- value: function(e, t) {
838
- e.logger && e.logger.log(t);
1628
+ value: function(t, e) {
1629
+ t.logger && t.logger.log(e);
839
1630
  }
840
1631
  }, {
841
1632
  key: "error",
842
- value: function(e, t) {
843
- e.logger && e.logger.error(t);
1633
+ value: function(t, e) {
1634
+ t.logger && t.logger.error(e);
844
1635
  }
845
1636
  }, {
846
1637
  key: "resetProducers",
847
1638
  value: function() {
848
- c = [];
1639
+ f = [];
849
1640
  }
850
1641
  }, {
851
1642
  key: "resetConsumers",
852
1643
  value: function() {
853
- f = [];
1644
+ c = [];
854
1645
  }
855
1646
  }, {
856
1647
  key: "getProducers",
857
1648
  value: function() {
858
- return c;
1649
+ return f;
859
1650
  }
860
1651
  }, {
861
1652
  key: "getConsumers",
862
1653
  value: function() {
863
- return f;
1654
+ return c;
864
1655
  }
865
1656
  }, {
866
1657
  key: "limitString",
867
- value: function(e) {
868
- var t = String(e);
869
- return t.length <= 30 ? t : t.substring(0, 30 - "...".length) + "...";
1658
+ value: function(t) {
1659
+ var e = String(t);
1660
+ return e.length <= 30 ? e : e.substring(0, 30 - "...".length) + "...";
870
1661
  }
871
1662
  }, {
872
1663
  key: "isNode",
873
1664
  value: function() {
874
- return "object" === (void 0 === e ? "undefined" : o(e)) && "undefined" == typeof window;
1665
+ return "object" === (void 0 === t ? "undefined" : o(t)) && "undefined" == typeof window;
875
1666
  }
876
1667
  }, {
877
1668
  key: "getBranch",
878
- value: function(e) {
879
- var n = t.getConfig(e, "branch");
880
- return n ? new Promise(function(e) {
881
- return e(n);
882
- }) : t.isNode() ? new Promise(function(e) {
883
- (0, pe.exec)("git rev-parse --abbrev-ref HEAD", function(t, n) {
884
- return e(n.trim());
1669
+ value: function(t) {
1670
+ var r = e.getConfig(t, "branch");
1671
+ return r ? new Promise(function(t) {
1672
+ return t(r);
1673
+ }) : e.isNode() ? new Promise(function(t) {
1674
+ (0, kt.exec)("git rev-parse --abbrev-ref HEAD", function(e, r) {
1675
+ return t(r.trim());
885
1676
  });
886
- }) : new Promise(function(e) {
887
- return e("");
1677
+ }) : new Promise(function(t) {
1678
+ return t("");
888
1679
  });
889
1680
  }
890
- } ]), t;
891
- }(), p = function() {
892
- function e(t, n, r) {
893
- i(this, e), this.targetFunc = t, this.signature = n, this.config = r;
1681
+ } ]), e;
1682
+ }(), h = function() {
1683
+ function t(e, r, n) {
1684
+ i(this, t), this.targetFunc = e, this.signature = r, this.config = n;
894
1685
  }
895
- return s(e, [ {
1686
+ return a(t, [ {
896
1687
  key: "isEnabled",
897
1688
  value: function() {
898
1689
  return !!this.config.varsnap && "production" === l.getConfig(this.config, "env") && !!l.getConfig(this.config, "producerToken");
899
1690
  }
900
1691
  }, {
901
1692
  key: "produce",
902
- value: function(t, n) {
903
- var r = this;
904
- return this.isEnabled() ? (l.debug(this.config, "Sending call to Varsnap"), Promise.resolve(n).then(function(n) {
1693
+ value: function(e, r) {
1694
+ var n = this;
1695
+ return this.isEnabled() ? (l.debug(this.config, "Sending call to Varsnap"),
1696
+ Promise.resolve(r).then(function(r) {
905
1697
  var o = {
906
- producer_token: l.getConfig(r.config, "producerToken"),
907
- signature: r.signature,
908
- inputs: e.serialize(t),
909
- prod_outputs: e.serialize(n)
1698
+ producer_token: l.getConfig(n.config, "producerToken"),
1699
+ signature: n.signature,
1700
+ inputs: t.serialize(e),
1701
+ prod_outputs: t.serialize(r)
910
1702
  };
911
1703
  return l.ajax("https://www.varsnap.com/api/snap/produce/", o).then(function() {
912
1704
  return !0;
913
- }).catch(function(e) {
914
- if (e.response) {
915
- if (429 === e.response.status) return l.error(r.config, "Cannot produce to Varsnap; Signature at rate limit"),
1705
+ }).catch(function(t) {
1706
+ if (t.response) {
1707
+ if (429 === t.response.status) return l.error(n.config, "Cannot produce to Varsnap; Signature at rate limit"),
916
1708
  !0;
917
- 404 === e.response.status ? l.error(r.config, "Cannot produce to Varsnap; check your producer token") : l.error(r.config, e.response.statusText);
1709
+ 404 === t.response.status ? l.error(n.config, "Cannot produce to Varsnap; check your producer token") : l.error(n.config, t.response.statusText);
918
1710
  }
919
1711
  return !1;
920
1712
  });
921
- })) : new Promise(function(e) {
922
- return e(!1);
1713
+ })) : new Promise(function(t) {
1714
+ return t(!1);
923
1715
  });
924
1716
  }
925
1717
  } ], [ {
926
1718
  key: "serialize",
927
- value: function(e) {
928
- return JSON.stringify(e);
1719
+ value: function(t) {
1720
+ return JSON.stringify(t);
929
1721
  }
930
1722
  }, {
931
1723
  key: "serialize_formatted",
932
- value: function(e) {
933
- return JSON.stringify(e, null, 2);
1724
+ value: function(t) {
1725
+ return JSON.stringify(t, null, 2);
934
1726
  }
935
- } ]), e;
936
- }(), d = function() {
937
- function e(t, n, r) {
938
- i(this, e), this.targetFunc = t, this.signature = n, this.config = r;
1727
+ } ]), t;
1728
+ }(), p = function() {
1729
+ function t(e, r, n) {
1730
+ i(this, t), this.targetFunc = e, this.signature = r, this.config = n;
939
1731
  }
940
- return s(e, [ {
1732
+ return a(t, [ {
941
1733
  key: "isEnabled",
942
1734
  value: function() {
943
1735
  return !!this.config.varsnap && "development" === l.getConfig(this.config, "env") && !!l.getConfig(this.config, "consumerToken");
@@ -946,164 +1738,174 @@
946
1738
  key: "consume",
947
1739
  value: function(o) {
948
1740
  var i = this;
949
- if (!this.isEnabled()) return new Promise(function(e) {
950
- return l.error(i.config, "Varsnap not enabled for testing"), e(!1);
1741
+ if (!this.isEnabled()) return new Promise(function(t) {
1742
+ return l.error(i.config, "Varsnap not enabled for testing"),
1743
+ t(!1);
951
1744
  });
952
- var a = {
1745
+ var s = {
953
1746
  consumer_token: l.getConfig(this.config, "consumerToken"),
954
1747
  signature: this.signature
955
1748
  };
956
- return l.ajax("https://www.varsnap.com/api/snap/consume/", a).then(function(s) {
957
- var u = s;
958
- if (!u || "ok" !== u.status) return [ new Promise(function(e) {
959
- return l.error(i.config, "Received error from Varsnap: " + u.status), e(!1);
1749
+ return l.ajax("https://www.varsnap.com/api/snap/consume/", s).then(function(a) {
1750
+ var u = a;
1751
+ if (!u || "ok" !== u.status) return [ new Promise(function(t) {
1752
+ return l.error(i.config, "Received error from Varsnap: " + u.status),
1753
+ t(!1);
960
1754
  }) ];
961
- 0 === u.results.length && l.log(i.config, "No snaps found for signature: " + a.signature);
962
- var c, f = [], d = t(u.results);
1755
+ 0 === u.results.length && l.log(i.config, "No snaps found for signature: " + s.signature);
1756
+ var f, c = [], p = e(u.results);
963
1757
  try {
964
- var h = function() {
965
- var t, a = c.value, s = e.deserialize(a.inputs), u = e.deserialize(a.prod_outputs), l = void 0;
1758
+ var d = function() {
1759
+ var e, s = f.value, a = t.deserialize(s.inputs), u = t.deserialize(s.prod_outputs), l = void 0;
966
1760
  try {
967
- l = i.targetFunc.apply(i, function(e) {
968
- if (Array.isArray(e)) return r(e);
969
- }(t = s) || function(e) {
970
- if ("undefined" != typeof Symbol && null != e[Symbol.iterator] || null != e["@@iterator"]) return Array.from(e);
971
- }(t) || n(t) || function() {
1761
+ l = i.targetFunc.apply(i, function(t) {
1762
+ if (Array.isArray(t)) return n(t);
1763
+ }(e = a) || function(t) {
1764
+ if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"]) return Array.from(t);
1765
+ }(e) || r(e) || function() {
972
1766
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
973
1767
  }());
974
- } catch (h) {
975
- l = h;
1768
+ } catch (d) {
1769
+ l = d;
976
1770
  }
977
- var d = Promise.resolve(l).then(function(e) {
978
- var t = p.serialize(u) === p.serialize(e);
979
- return i.reportCentral(o, a, u, e, t).then(function(n) {
980
- i.reportLog(a.id, s, u, e, t, n);
981
- }), t;
1771
+ var p = Promise.resolve(l).then(function(t) {
1772
+ var e = h.serialize(u) === h.serialize(t);
1773
+ return i.reportCentral(o, s, u, t, e).then(function(r) {
1774
+ i.reportLog(s.id, a, u, t, e, r);
1775
+ }), e;
982
1776
  });
983
- f.push(d);
1777
+ c.push(p);
984
1778
  };
985
- for (d.s(); !(c = d.n()).done; ) h();
1779
+ for (p.s(); !(f = p.n()).done; ) d();
986
1780
  } catch (g) {
987
- d.e(g);
1781
+ p.e(g);
988
1782
  } finally {
989
- d.f();
1783
+ p.f();
990
1784
  }
991
- return i.reportTrialGroup(o), f;
992
- }).then(function(e) {
993
- return Promise.all(e).then(function(e) {
994
- return e.every(function(e) {
995
- return e;
1785
+ return c;
1786
+ }).then(function(t) {
1787
+ return Promise.all(t).then(function(t) {
1788
+ return t.every(function(t) {
1789
+ return t;
996
1790
  });
997
1791
  });
998
- }).catch(function(e) {
999
- return l.error(i.config, "Cannot contact Varsnap: " + e), !1;
1792
+ }).catch(function(t) {
1793
+ return l.error(i.config, "Cannot contact Varsnap: " + t),
1794
+ !1;
1000
1795
  });
1001
1796
  }
1002
1797
  }, {
1003
1798
  key: "reportCentral",
1004
- value: function(e, t, n, r, o) {
1005
- var i = this, a = {
1006
- trial_group_id: e.trial_group_id,
1799
+ value: function(t, e, r, n, o) {
1800
+ var i = this, s = {
1801
+ trial_group_id: t.trial_group_id,
1007
1802
  consumer_token: l.getConfig(this.config, "consumerToken"),
1008
- snap_id: t.id,
1009
- test_outputs: p.serialize(r),
1010
- matches: o,
1011
- snap_outputs_formatted: p.serialize_formatted(n),
1012
- test_outputs_formatted: p.serialize_formatted(r)
1803
+ snap_id: e.id,
1804
+ test_outputs: h.serialize(n),
1805
+ matches: o.toString(),
1806
+ snap_outputs_formatted: h.serialize_formatted(r),
1807
+ test_outputs_formatted: h.serialize_formatted(n)
1013
1808
  };
1014
- return l.ajax("https://www.varsnap.com/api/trial/produce/", a).then(function(e) {
1015
- var t = e;
1016
- return !(!t || "ok" !== t.status) && t.trial_url;
1017
- }).catch(function(e) {
1018
- return l.error(i.config, "Cannot upload test results to Varsnap: " + e), !1;
1809
+ return l.ajax("https://www.varsnap.com/api/trial/produce/", s).then(function(t) {
1810
+ var e = t;
1811
+ return !(!e || "ok" !== e.status) && e.trial_url;
1812
+ }).catch(function(t) {
1813
+ return l.error(i.config, "Cannot upload test results to Varsnap: " + t),
1814
+ !1;
1019
1815
  });
1020
1816
  }
1021
1817
  }, {
1022
1818
  key: "reportLog",
1023
- value: function(e, t, n, r, o, i) {
1024
- l.log(this.config, ""), l.log(this.config, "Testing with Varsnap uuid: " + e),
1025
- l.log(this.config, "Signature: " + this.signature), l.log(this.config, "Function input args: " + l.limitString(t)),
1026
- l.log(this.config, "Production function outputs: " + l.limitString(n)), l.log(this.config, "Your function outputs: " + l.limitString(r)),
1027
- l.log(this.config, "Matching outputs: " + o);
1028
- var a = "Cannot upload trial";
1029
- i && (a = String(i)), l.log(this.config, "Trial URL: " + a);
1819
+ value: function(t, e, r, n, o, i) {
1820
+ if (!o) {
1821
+ l.log(this.config, ""), l.log(this.config, "Testing with Varsnap uuid: " + t),
1822
+ l.log(this.config, "Signature: " + this.signature),
1823
+ l.log(this.config, "Function input args: " + l.limitString(e)),
1824
+ l.log(this.config, "Production function outputs: " + l.limitString(r)),
1825
+ l.log(this.config, "Your function outputs: " + l.limitString(n)),
1826
+ l.log(this.config, "Matching outputs: " + o);
1827
+ var s = "Cannot upload trial";
1828
+ i && (s = String(i)), l.log(this.config, "Trial URL: " + s);
1829
+ }
1030
1830
  }
1031
1831
  }, {
1032
1832
  key: "reportTrialGroup",
1033
- value: function(e) {
1034
- l.log(this.config, "Trial Group: " + e.trial_group_url);
1833
+ value: function(t) {
1834
+ l.log(this.config, "Trial Group: " + t.trial_group_url);
1035
1835
  }
1036
1836
  } ], [ {
1037
1837
  key: "deserialize",
1038
- value: function(e) {
1039
- if ("" !== e) return JSON.parse(e);
1838
+ value: function(t) {
1839
+ if ("" !== t) return JSON.parse(t);
1040
1840
  }
1041
- } ]), e;
1841
+ } ]), t;
1042
1842
  }();
1043
- function h(e, t) {
1044
- void 0 === t && (t = "");
1045
- var n = l.getSignature(e, t), r = new p(e, n, h._config), o = new d(e, n, h._config), i = function() {
1046
- for (var t, n = arguments.length, o = new Array(n), i = 0; i < n; i++) o[i] = arguments[i];
1843
+ function d(t, e) {
1844
+ void 0 === e && (e = "");
1845
+ var r = l.getSignature(t, e), n = new h(t, r, d._config), o = new p(t, r, d._config), i = function() {
1846
+ for (var e, r = arguments.length, o = new Array(r), i = 0; i < r; i++) o[i] = arguments[i];
1047
1847
  try {
1048
- t = e.apply(void 0, o);
1049
- } catch (a) {
1050
- throw r.produce(o, a), a;
1848
+ e = t.apply(void 0, o);
1849
+ } catch (s) {
1850
+ throw n.produce(o, s), s;
1051
1851
  }
1052
- return r.produce(o, t), t;
1852
+ return n.produce(o, e), e;
1053
1853
  };
1054
- return i.producer = r, i.consumer = o, i.signature = n, c.push(r), f.push(o), i;
1854
+ return i.producer = n, i.consumer = o, i.signature = r, f.push(n),
1855
+ c.push(o), i;
1055
1856
  }
1056
1857
  function g() {
1057
- var e, n = l.getConsumers();
1058
- return 0 === n.length ? Promise.resolve(!0) : (e = n[0].config, l.getBranch(e).then(function(t) {
1858
+ var t, r = l.getConsumers();
1859
+ return 0 === r.length ? Promise.resolve(!0) : (t = r[0].config,
1860
+ l.getBranch(t).then(function(e) {
1059
1861
  return {
1060
- branch: t,
1061
- consumer_token: l.getConfig(e, "consumerToken"),
1062
- client: de.clientName
1862
+ branch: e,
1863
+ consumer_token: l.getConfig(t, "consumerToken"),
1864
+ client: xt.clientName
1063
1865
  };
1064
- }).then(function(e) {
1065
- var t = e;
1066
- return l.ajax("https://www.varsnap.com/api/trial_group/", t);
1067
- }).then(function(e) {
1068
- return e;
1069
- }).catch(function(t) {
1070
- var n;
1071
- return n = t && t.response && t.response.data && t.response.data.error ? t.response.data.error : t.toString(),
1072
- l.error(e, "Cannot generate a new Trial Group: " + n), {
1866
+ }).then(function(t) {
1867
+ var e = t;
1868
+ return l.ajax("https://www.varsnap.com/api/trial_group/", e);
1869
+ }).then(function(t) {
1870
+ return t;
1871
+ }).catch(function(e) {
1872
+ var r;
1873
+ return r = e && e.response && e.response.data ? e.response.data.error : e.toString(),
1874
+ l.error(t, "Cannot generate a new Trial Group: " + r), {
1073
1875
  status: "not ok",
1074
1876
  project_id: "",
1075
1877
  trial_group_id: "",
1076
1878
  trial_group_url: ""
1077
1879
  };
1078
- })).then(function(e) {
1079
- var r, o = [], i = t(n);
1880
+ })).then(function(t) {
1881
+ var n, o = [], i = e(r);
1080
1882
  try {
1081
- for (i.s(); !(r = i.n()).done; ) {
1082
- var a = r.value.consume(e);
1083
- o.push(a);
1883
+ for (i.s(); !(n = i.n()).done; ) {
1884
+ var s = n.value.consume(t);
1885
+ o.push(s);
1084
1886
  }
1085
- } catch (s) {
1086
- i.e(s);
1887
+ } catch (a) {
1888
+ i.e(a);
1087
1889
  } finally {
1088
1890
  i.f();
1089
1891
  }
1090
- return Promise.all(o);
1091
- }).then(function(e) {
1092
- return e.every(function(e) {
1093
- return e;
1892
+ return r.length > 0 && r[0].reportTrialGroup(t), Promise.all(o);
1893
+ }).then(function(t) {
1894
+ return t.every(function(t) {
1895
+ return t;
1094
1896
  });
1095
1897
  });
1096
1898
  }
1097
- de.varsnap = h, h._config = u, h.updateConfig = function(e) {
1098
- for (var t = h._config, n = 0, r = Object.keys(h._config); n < r.length; n++) {
1099
- var o = r[n];
1100
- Object.prototype.hasOwnProperty.call(e, o) && (t = l.setConfig(t, o, e[o]));
1899
+ xt.varsnap = d, d._config = u, d.updateConfig = function(t) {
1900
+ for (var e = d._config, r = 0, n = Object.keys(d._config); r < n.length; r++) {
1901
+ var o = n[r];
1902
+ Object.prototype.hasOwnProperty.call(t, o) && (e = l.setConfig(e, o, t[o]));
1101
1903
  }
1102
- h._config = t;
1103
- }, h.reset = function() {
1904
+ d._config = e;
1905
+ }, d.reset = function() {
1104
1906
  l.resetConsumers(), l.resetProducers();
1105
- }, h.version = de.version, h.runTests = g;
1907
+ }, d.version = xt.version, d.runTests = g;
1106
1908
  }).call(this);
1107
- }.call(this, x), de.varsnap;
1909
+ }.call(this, G), xt.varsnap;
1108
1910
  });
1109
1911
  })(typeof Varsnap == "undefined" ? Varsnap = {} : Varsnap);