varsnap 1.8.3 → 1.8.5

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